/* Site palette (owner, 2026-11-03): dark — card #222831, backdrop #171a1e, accent and glow #ff5722;
   light — card #f9f7ec, backdrop #f1debe, accent #500000, glow and lines #500000 (2026-11-03: text accents #500000, every line that is orange in the dark theme #500000). --ui-glow drives the hover/focus glow of interactions.css. */
:root{--ui-glow:255,87,34}
:root.light{--ui-glow:80,0,0}
/* Windows (2026-11-03): one look for every dialog of the builder; the engine's markup is unchanged.
   List windows (.modal-content-listview) are a centred card: tabs on top, the list on the left, the description on the right,
   the button bar at the bottom with the main button filled. Form windows share the card, the title and the buttons.
   The start screen (#root-no_character) keeps its own design. Light theme rules are at the end. */
html body .modal:not(#root-no_character){background-color:rgba(8,10,13,.62)}
html body .modal:not(#root-no_character)>.modal-content{box-sizing:border-box;border:1px solid #3b4b5e;border-radius:12px;overflow:hidden;background:#222831;box-shadow:0 18px 50px rgba(0,0,0,.55)}
/* Form windows (languages, rest, abilities…) are as wide as their content needs, never the whole screen. */
html body .modal:not(#root-no_character)>.modal-content:not(.modal-content-listview){max-width:min(900px,calc(100vw - 32px))!important}
/* 2026-11-06 (owner): windows are as tall as their content, up to 88% of the screen, and grow when a hidden list
   opens (window-fit.js keeps the height reached so the window does not jump back while it is open). */
/* The character choice window (.pb-character-browser, cloud.css) keeps its own fixed size (owner, 2026-11-06). */
html body .modal:not(#root-no_character):not(.pb-character-browser)>.modal-content{height:auto!important;max-height:min(88vh,980px)!important;margin:auto!important}
html body .modal:not(#root-no_character):not(.pb-character-browser)>.modal-content.modal-content-listview{width:min(1200px,calc(100vw - 32px))!important;max-width:none!important;min-height:min(460px,70vh)}
html body .modal.pb-character-browser>.modal-content.modal-content-listview{width:min(1200px,calc(100vw - 32px))!important;max-width:none!important;height:min(85vh,920px)!important;max-height:none!important}
/* 2026-11-06 (owner: «зафиксируем в некоторых местах размеры окон… особенно в ритуалах»): the big catalogs — list
   windows with a filter button (rituals, spells, feats, items, weapons, armor…) or 10+ choices (window-fit.js marks
   them .pb-fixed-size) — have one fixed size, like the character choice window; the list and the description scroll
   inside. Short choice windows still fit their content. */
html body .modal:not(#root-no_character):not(.pb-character-browser)>.modal-content.modal-content-listview:is(.pb-fixed-size,:has(.button-filter)){height:min(85vh,920px)!important;max-height:none!important;min-height:0!important}
/* Inner boxes of form and information windows: no fixed 60vh block (the engine's .scrollable), a scrollbar only when
   the content is taller than the window; the middle part fills the window so the buttons stay at the bottom. */
html body .modal:not(#root-no_character):not(.pb-character-browser)>.modal-content>div:not(.div-topbar_holder):not(.modal-buttons):not(.dialog-top-bar){min-height:0;overflow-y:auto;overflow-x:hidden;flex:1 1 auto}
/* A list window's middle part never scrolls itself: its list and description do. */
html body .modal:not(#root-no_character)>.modal-content>.content-listview{overflow:hidden!important}
/* One line under a title: the holder's border; the title bar inside it has none (2026-11-06). */
html body .modal:not(#root-no_character) .div-topbar_holder .dialog-top-bar{border-bottom:0!important}
/* The new character window has its own design (cloud.css): the generic window rules above must not change its
   title bar, body or buttons (owner, 2026-11-06: «окна создания нового персонажа кривые»). */
html body .modal.pb-new-character>.modal-content{height:auto!important;min-height:0!important;max-height:calc(100dvh - 32px)!important;overflow-y:auto!important;display:flex;flex-direction:column}
html body .modal.pb-new-character>.modal-content>.dialog-top-bar{position:relative;padding:19px 60px 19px 24px!important;background:var(--pb-panel)!important;border-bottom:1px solid var(--pb-edge)!important}
html body .modal.pb-new-character .pb-new-close{top:50%!important;transform:translateY(-50%)}
/* 2026-11-13 (owner, «Нашелся косяк верстки»): the character settings window has its own title bar (cloud.css: padding 20/58/18/24, the divider below it,
   the × at the right). The generic window rule above (.modal:not(#root-no_character) ... with an id inside :not) is stronger than cloud.css, so the bar lost
   its padding and the divider, and the × (top:16px, 32px high) stood lower than the title and its frame crossed the bar's lower edge. As for the new character
   window: the bar keeps its own padding (equal above and below the title; 11px on the left because the holder around the bar already gives 13px: the title
   stands at the 24px of the window's body) and the × is centred on the bar. */
html body .modal.pb-character-settings .div-topbar_holder .dialog-top-bar{position:relative;padding:19px 58px 19px 11px!important;border-bottom:1px solid var(--pb-edge)!important}
html body .modal.pb-character-settings .pb-settings-close{top:50%!important;transform:translateY(-50%)}
html body .modal.pb-new-character>.modal-content>.pb-new-body{flex:none!important;overflow:visible!important;min-height:auto!important}
html body .modal.pb-new-character>.modal-content>.modal-buttons{padding:20px 24px 24px!important;background:var(--pb-panel)!important;border-top:0!important;gap:10px}
html body .modal.pb-new-character>.modal-content>.modal-buttons>.modal-button{flex:1;min-width:0;max-height:none;min-height:42px;border-radius:7px}
/* Card buttons keep one line: a longer label («В снаряжение») makes its button wider, the others stay 6.5em. */
html body .div-button-simple.weapon-button{width:auto!important;min-width:6.5em;white-space:nowrap;padding-left:.7em;padding-right:.7em;box-sizing:border-box}
/* Card stats: «КБ с поднятым щитом +1» on one line. */
html body .weapon-span,html body :has(>.weapon-span){white-space:nowrap}
/* The engine gives the raised-shield cell a fixed 6.5em; on one line it needs its own width (the next icon keeps
   its 1em margin), otherwise the label runs into «Твёрдость». */
html body div:has(>.weapon-span){width:auto!important}
/* Skill and save windows: the roll button and the proficiency row share one line and wrap instead of overflowing
   (the proficiency row is 100% wide for the skill-training window). */
html body .modal:not(#root-no_character) .layout-item:has(>.dice-button){display:flex;align-items:center;gap:12px}
html body .modal:not(#root-no_character) .layout-item:has(>.dice-button)>.dice-button{flex:none;margin:0!important}
html body .modal:not(#root-no_character) .layout-item:has(>.dice-button)>.prof-layout{flex:1 1 auto;width:auto!important;min-width:0;max-width:100%}
html body .modal:not(#root-no_character) .layout-item{overflow-x:hidden!important}
/* One control row: the icon retains its click handler; its frame is not inverted in the light theme. */
html body .modal:not(#root-no_character) .pb-list-toolbar{display:flex!important;flex-wrap:nowrap;align-items:center!important;gap:8px;min-width:0;margin:.5em 0!important}
html body .modal:not(#root-no_character) .pb-list-toolbar>.tabbed-area-menu-sb{min-width:0}
html body .modal:not(#root-no_character) :is(.pb-list-sort,.pb-list-filter){box-sizing:border-box;flex:none;align-self:center;height:32px;margin:0;border:1px solid #3b4b5e;border-radius:5px;background:#222831;color:#edf1f7}
html body .modal:not(#root-no_character) .pb-list-sort{max-width:100%;margin-left:auto;padding:0 .5em;font-size:.9rem;line-height:normal;cursor:pointer}
html body .modal:not(#root-no_character) .pb-list-filter{display:inline-flex;width:32px;align-items:center;justify-content:center}
html body .modal:not(#root-no_character) .pb-list-filter>.button-filter{box-sizing:border-box;align-self:center;width:30px;height:30px;margin:0;padding:5px;border:0!important;border-radius:4px;background:transparent;box-shadow:none!important}
:root.light body .modal:not(#root-no_character) :is(.pb-list-sort,.pb-list-filter){border-color:#dcc39a;background:#f9f7ec;color:#292523}
html body .modal:not(#root-no_character) :is(.pb-list-sort,.pb-list-filter):is(:hover,:focus-visible,:focus-within){outline:none!important;border-color:rgba(var(--ui-glow),.52)!important;box-shadow:0 0 6px rgba(var(--ui-glow),.12),0 0 12px rgba(var(--ui-glow),.06)!important}
html body .modal:not(#root-no_character) .pb-list-filter:has(.button-filter-selected){border-color:rgb(var(--ui-glow))}
/* Ten ritual ranks fit alongside the order/filter controls at a 1000px window width in either language. */
html body .modal:not(#root-no_character) .pb-ritual-tabs{display:flex!important;flex-wrap:nowrap;align-items:center;min-width:0;overflow-x:auto}
html body .modal:not(#root-no_character) .pb-ritual-tabs>.section-menu{flex:1 0 auto;text-align:center;font-size:.78rem!important;white-space:nowrap;margin:0;padding:.35em .3em .5em}
/* Main page: no empty scroll tracks where nothing scrolls (the engine forces overflow-y:scroll). */
html body #dice-history,html body .tabbed-area-display-holder{overflow-y:auto!important}
html body .modal:not(#root-no_character) .scrollable{height:auto!important;flex:1 1 auto!important;min-height:0;overflow-y:auto}
html body .modal:not(#root-no_character) :is(.div-listview-scroller,.div-listview-info){overflow-y:auto!important}

/* Title bar and tabs */
html body .modal:not(#root-no_character) .div-topbar_holder{flex:none;background:#171a1e;border-bottom:1px solid #3b4b5e;padding:0 1em}
html body .modal:not(#root-no_character) .dialog-top-bar{background:transparent;padding:.75em 0 .55em}
html body .modal:not(#root-no_character) .dialog-title{font-size:1.25em;font-weight:600;letter-spacing:.01em}
/* 2026-11-05: confirmation windows have the title bar without its holder; it gets the holder's look and padding. */
html body .modal:not(#root-no_character) .modal-content>.dialog-top-bar{flex:none;background:#171a1e;border-bottom:1px solid #3b4b5e;padding:.75em 1em .55em}
html body .modal:not(#root-no_character) .tabbed-area-menu{border-bottom:0;padding:.55em 0 0}
html body .modal:not(#root-no_character) .tabbed-area-menu-sb{border-bottom:1px solid #3b4b5e}
html body .modal:not(#root-no_character) .section-menu{font-size:1.05em;margin-right:.35em;padding:.35em .65em .5em;border-bottom:2px solid transparent;color:#aab6c5}
html body .modal:not(#root-no_character) .section-menu:hover{color:#edf1f7}
html body .modal:not(#root-no_character) .section-menu-selected{color:#ff5722;border-bottom-color:#ff5722}

/* List and description */
html body .modal:not(#root-no_character) .content-listview{background:#222831;flex:1 1 auto;min-height:0;height:auto!important}
html body .modal:not(#root-no_character):not(.pb-character-browser) .div-listview-scroller{flex:0 0 auto;width:max-content;min-width:min(16em,40%);max-width:min(36em,48%);padding:.4em 0;border-right:1px solid #3b4b5e;overflow-y:auto;box-sizing:border-box}
/* 2026-11-06 (owner): the list column fits its longest name; a name longer than the column wraps instead of «…». */
html body .modal:not(#root-no_character):not(.pb-character-browser) .div-listview-scroller :is(.listview-title,.listview-title-limited){width:auto!important;max-width:none!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere}
html body .modal:not(#root-no_character):not(.pb-character-browser) .div-listview-scroller .listview-topdiv{gap:.6em}
html body .modal:not(#root-no_character):not(.pb-character-browser) .div-listview-scroller .listview-topdiv>.listview-title{flex:0 1 auto;min-width:0}
html body .modal:not(#root-no_character) .listview-item{padding:0}
/* 2026-11-06: a description is shown on the right only; the engine's re-sort can unhide the selected row's copy. */
html body .modal:not(#root-no_character) .div-listview-scroller .listview-detail{display:none!important}
html body .modal:not(#root-no_character) .div-listview-scroller .listview-topdiv{box-sizing:border-box;min-height:2.3em;padding:0 .8em 0 calc(.8em + 3px);display:flex;align-items:center;border:0!important;border-radius:0!important}
html body .modal:not(#root-no_character) .div-listview-scroller .listview-topdiv:not(.listview-topdiv-selected):hover{background-color:rgba(255,255,255,.045)!important}
html body .modal:not(#root-no_character) .div-listview-scroller .listview-topdiv-selected{background-color:#2c3542!important;box-shadow:inset 3px 0 0 #ff5722!important}
html body .modal:not(#root-no_character) .listview-title-selected{font-weight:600}
html body .modal:not(#root-no_character) .div-listview-info{padding:1.4em 1.8em;overflow-y:auto;line-height:1.55}
html body .modal:not(#root-no_character) .div-info-lm-box>.listview-topdiv{border:0!important;background:transparent!important;margin-bottom:.4em}
html body .modal:not(#root-no_character) .div-info-lm-box>.listview-topdiv .listview-title{font-size:1.3em}
/* Nothing chosen yet: a quiet hint instead of an empty half of the window. */
html body .modal:not(#root-no_character) .div-listview-info:empty{display:flex;align-items:center;justify-content:center}
html body .modal:not(#root-no_character) .div-listview-info:empty::before{content:var(--pb-list-select-left);color:#7e8a99;font-size:.95em}
/* 2026-11-06: an empty list (no custom effects yet…) has no empty column and says so. */
html body .modal:not(#root-no_character) .content-listview:not(:has(.listview-item)) .div-listview-scroller{display:none}
html body .modal:not(#root-no_character) .content-listview:not(:has(.listview-item)) .div-listview-info:empty::before{content:var(--pb-list-empty)}

/* Form windows: the sections become quiet cards. */
html body .modal:not(#root-no_character) #content.padding-standard{padding:1em}
html body .modal:not(#root-no_character) #content .rounded-rectangle-white:not(.small-text){border:1px solid #33404f;border-radius:10px;background:#1d232b;padding:.75em .9em;margin-bottom:.6em}
/* A one-line hint under a form («Введите ПЗ…») is plain small text, not a card that looks like an empty field. */
html body .modal:not(#root-no_character) #content .rounded-rectangle-white.small-text{border:0!important;background:transparent!important;padding:.2em .3em 0!important;margin:0!important;color:#8b97a6}
:root.light body .modal:not(#root-no_character) #content .rounded-rectangle-white.small-text{color:#7a6e62}

/* Button bar: the first button is the main one. */
/* 2026-11-07 (owner: a long label stuck out of its button): buttons keep their label width and the bar wraps;
   a label wider than the window wraps inside its button. */
html body .modal:not(#root-no_character)>.modal-content>.modal-buttons{flex:none;flex-wrap:wrap;align-items:center;gap:.5em;padding:.75em 1em;background:#171a1e;border-top:1px solid #3b4b5e}
html body .modal:not(#root-no_character) .modal-buttons>.modal-button{width:auto;min-width:7.5em;min-height:2.5em;max-height:none;white-space:normal;flex-shrink:0;max-width:100%;text-align:center;padding:.45em 1.1em;border:1px solid #4a5b70;border-radius:8px;background:transparent;color:#edf1f7;font-weight:500}
html body .modal:not(#root-no_character) .modal-buttons>.modal-button:hover{background:rgba(255,255,255,.06);border-color:#6b7d93}
html body .modal:not(#root-no_character) .modal-buttons>.modal-button:first-child:not(.modal-button-disabled){background:#ff5722;border-color:#ff5722;color:#fff}
html body .modal:not(#root-no_character) .modal-buttons>.modal-button:first-child:not(.modal-button-disabled):hover{background:#ff6e40;border-color:#ff6e40}
html body .modal:not(#root-no_character) .modal-buttons>.modal-button-disabled{opacity:.5;cursor:not-allowed}
html body .modal .pb-item-actions>button:disabled{opacity:.58;cursor:default;box-shadow:none}
html body .modal .pb-item-tools{flex-wrap:wrap;gap:.5em;align-items:center}
/* Everything that is not a button (the coins of the shop, a checkbox) goes last, at the right end of the bar:
   the buttons stay together in the engine's order whatever its markup order is. */
html body .modal:not(#root-no_character) .modal-buttons>:not(.modal-button){order:99}
html body .modal:not(#root-no_character) .modal-buttons>:not(.modal-button){margin-left:auto}
html body .modal:not(#root-no_character) .modal-buttons>:not(.modal-button)~:not(.modal-button){margin-left:0}
/* The engine's invisible spacer buttons are not needed once the coins sit at the right end. */
html body .modal:not(#root-no_character) .modal-buttons>.modal-button.invisible{display:none}

/* Thin scrollbars inside windows. */
html body .modal:not(#root-no_character) ::-webkit-scrollbar{width:8px;height:8px}
html body .modal:not(#root-no_character) ::-webkit-scrollbar-track{background:transparent}
html body .modal:not(#root-no_character) ::-webkit-scrollbar-thumb{background:#3b4b5e;border-radius:4px}
html body .modal:not(#root-no_character) ::-webkit-scrollbar-thumb:hover{background:#56697f}

/* Light theme: the same windows as the dark theme in light colours (flat light card, light header and button bar,
   dark text, the light theme's dark orange accent). It overrides the engine's light-mode red blocks inside windows. */
:root.light body .modal:not(#root-no_character){background-color:rgba(60,45,30,.4)}
:root.light body .modal:not(#root-no_character)>.modal-content{border-color:#d8c4a0;box-shadow:none;background:#f9f7ec;color:#292523}
:root.light body .modal:not(#root-no_character) .div-topbar_holder,
:root.light body .modal:not(#root-no_character)>.modal-content>.modal-buttons{background:#f1debe;border-color:#dcc39a}
:root.light body .modal:not(#root-no_character) .dialog-top-bar{background:transparent!important;color:#292523}
:root.light body .modal:not(#root-no_character) .dialog-title{color:#292523}
:root.light body .modal:not(#root-no_character) .modal-content>.dialog-top-bar{background:#f1debe!important;border-color:#dcc39a}
:root.light body .modal:not(#root-no_character) .tabbed-area-menu-sb{border-bottom-color:#dcc39a}
:root.light body .modal:not(#root-no_character) .section-menu{color:#6f6458}
:root.light body .modal:not(#root-no_character) .section-menu:hover{color:#292523}
:root.light body .modal:not(#root-no_character) .section-menu-selected{color:#500000;border-bottom-color:#500000;font-weight:inherit}
:root.light body .modal:not(#root-no_character) .content-listview{background:#f9f7ec}
:root.light body .modal:not(#root-no_character) .div-listview-scroller{border-right-color:#dcc39a}
:root.light body .modal:not(#root-no_character) .listview-topdiv{background:transparent!important;border:0!important;border-radius:0!important}
:root.light body .modal:not(#root-no_character) .listview-title{color:#292523}
:root.light body .modal:not(#root-no_character) .div-listview-scroller .listview-topdiv:not(.listview-topdiv-selected):hover{background-color:rgba(60,45,30,.06)!important}
:root.light body .modal:not(#root-no_character) .div-listview-scroller .listview-topdiv-selected{background-color:#f1debe!important;box-shadow:inset 3px 0 0 #500000!important}
:root.light body .modal:not(#root-no_character) .listview-title-selected{color:#500000}
/* The description: no framed card, section names as accent text (like the dark theme), not red bars. */
:root.light body .modal:not(#root-no_character) .div-info-lm-box{background:transparent;border:0;padding:0}
:root.light body .modal:not(#root-no_character) .subtitle,
:root.light body .modal:not(#root-no_character) .subtitle-map{background:transparent;border-radius:0;color:#500000!important;width:auto;padding:0;margin:.9em 0 .2em;text-align:left;font-size:1.05em}
:root.light body .modal:not(#root-no_character) .subtitle b,:root.light body .modal:not(#root-no_character) .subtitle-map b{color:inherit}
:root.light body .modal:not(#root-no_character) .div-listview-info:empty::before{color:#8a7d70}
/* The engine paints the tab strip, the coin labels and the filter icon for its red light-mode bars. */
:root.light body .modal:not(#root-no_character) :is(.lm-section-menu-background,.tabbed-area-menu,.tabbed-area-menu-sb){background:transparent!important}
:root.light body .modal:not(#root-no_character) .modal-buttons .button-money .small-text{color:#6f6458!important}
:root.light body .modal:not(#root-no_character) .modal-buttons .button-money .button-selection{color:#292523!important}
:root.light body .modal:not(#root-no_character) .button-filter{filter:invert(.75);background:transparent}
:root.light body .modal:not(#root-no_character) #content .rounded-rectangle-white:not(.small-text),
:root.light body .modal:not(#root-no_character) #content .rounded-rectangle{border-color:#dcc39a;background:#fffdf7}
:root.light body .modal:not(#root-no_character) .modal-buttons>.modal-button{border-color:#c4b49b;background:transparent;color:#292523}
:root.light body .modal:not(#root-no_character) .modal-buttons>.modal-button:hover{background:rgba(60,45,30,.06);border-color:#a8977c}
:root.light body .modal:not(#root-no_character) .modal-buttons>.modal-button:first-child:not(.modal-button-disabled){background:#500000;border-color:#500000;color:#fff}
:root.light body .modal:not(#root-no_character) .modal-buttons>.modal-button:first-child:not(.modal-button-disabled):hover{background:#500000;border-color:#500000}
:root.light body .modal.pb-level-dialog > .modal-content > .modal-buttons > .modal-button:first-child:not(.modal-button-disabled) {
  color: var(--shop-on-accent, #fff) !important;
}
:root.light body .modal:not(#root-no_character) ::-webkit-scrollbar-thumb{background:#b18484}

/* The light theme is flat (owner, 2026-11-03): no parchment texture on the page, windows, the dice tray or the start screen. */
:root.light,:root.light body{background-image:none!important;background-color:#f1debe!important}
:root.light .modal-content,:root.light .dice-tray,:root.light #root-no_character>.modal-content{background-image:none!important}
:root.light .modal-content:not(.modal-content-listview),:root.light #root-no_character>.modal-content,:root.light .dice-tray{background-color:#f9f7ec}
/* Light theme top bar: no fill, like the dark one, with the accent line instead of the engine's black bar; dark menu icon and text. */
:root.light .top-bar{background:transparent!important;border-bottom:2px solid #500000!important}
:root.light .top-bar .hamburger{filter:brightness(0);opacity:.82}
:root.light .top-bar,:root.light .top-bar .menu-title,:root.light #active-builds{color:#292523}
:root.light .top-bar .active-build-section{color:#6f6458}
:root.light .top-bar .active-build-section-active{color:#292523}
/* The menu's last link keeps the light theme's accent, not the dark theme's orange. */
:root.light #mySidenav #sidenav-ogl{color:var(--ui-license-color,#500000)!important}
/* Light theme: no shadows on windows or the planner boxes (the engine gives them a grey drop shadow). */
:root.light :is(.div-button,.div-button-simple){filter:none!important}
/* Hover/focus glow on buttons, in the glow colour: #ff5722 dark, #500000 light. It also covers window buttons and
   completed planner choices, which other rules leave without one; the notes board keeps its own flat buttons. */
html body :is(button,[role=button],.div-button,.div-button-simple,.modal-button,.cogButton,.button-show-plan,.button-filter):not(:disabled):not([aria-disabled=true]):not(.pb-notes-workspace *):is(:hover,:focus-visible),
html body #divBuild#divBuild :is(.div-button,.cogButton):is(:hover,:focus-visible),
html body .modal:not(#root-no_character) .modal-buttons>.modal-button.modal-button:not(.modal-button-disabled):is(:hover,:focus-visible){box-shadow:0 0 6px rgba(var(--ui-glow),.38),0 0 14px rgba(var(--ui-glow),.2)!important}
/* The top-bar menu uses its label for keyboard focus, without the button halo. */
html body .top-bar #menu:is(:hover,:focus-visible,:active){box-shadow:none!important;border-color:transparent!important}
html body .top-bar #menu:focus-visible .menu-title{text-decoration:underline;text-underline-offset:.18em}
/* 2026-11-05: coin icons are 64x64 (sharp on HiDPI) and stay 32 px in the money panel. */
.button-money img[src*="icon_money_"]{width:32px;height:32px;object-fit:contain}
/* 2026-11-08 (owner): a spell's roll button in place of «Сотворение» (engine topic spell-row-dice): the dice with the site's d20 icon. */
html body .spell-button-row>.button-cast.pb-cast-roll{white-space:nowrap;flex-direction:row;align-items:center;justify-content:flex-start}
/* 2026-11-12 (owner): the «Cast» cell was 3em wide, so the Russian word «Сотворение» (about 5.7em) ran over the spell's name;
   the cell now holds the word in every row (its width is the same for all rows, so the names stay aligned). */
html body .spell-button-row>.button-cast{box-sizing:border-box;min-width:6.6em;white-space:nowrap}
html body .spell-button-row>.button-cast.pb-cast-roll::before{content:"";display:inline-block;width:1.1em;height:1.1em;margin-right:.35em;vertical-align:-.2em;background:url(/assets/images/ui/icon_d20_orange.png) center/contain no-repeat}
/* 2026-11-08 (owner): the coin window's exchange block — a coin, how many, «up» and «down» (engine topic coins-simplify). */
/* Coin window, variant 1 (owner 08.11): one frame; «Exchange» field (~90px) with its result line; two equal buttons. */
html body .pb-coin-exchange{display:flex;flex-direction:column;gap:8px;margin-top:.75em}
html body .pb-coin-exchange-row{display:flex;gap:10px;align-items:center}
html body .pb-coin-exchange-row input{flex:none;width:90px;box-sizing:border-box;line-height:1.5em}
html body .pb-coin-exchange-result{opacity:.75;font-size:.9em;min-width:0}
html body .pb-coin-exchange .pb-coin-exchange-row input.edittext-dark.pb-invalid:not(:disabled){box-shadow:0 0 0 2px #e5484d!important}
html body .pb-coin-exchange-buttons{display:flex;gap:8px}
html body .pb-coin-exchange-buttons>*{flex:1 1 0;min-width:0;margin:0!important;text-align:center}
html body .pb-coin-exchange .pb-disabled{opacity:.4;pointer-events:none}
html body .pb-coin-exchange-hint{margin:0;color:#e5484d}
html body .pb-coin-exchange-hint[hidden]{display:none}
html body .pb-coin-exchange-simplify{margin:0!important;align-self:stretch;text-align:center}
/* 2026-11-11 (owner, b46 «окна-списки»): one calmer look for every list window, like the deity window — larger text,
   taller rows with the selection bar, neutral level badges, quiet section labels in the description, traits as chips,
   a centred hint instead of an empty right half. Only the look changes; the engine's markup and behaviour are untouched. */
html body .modal:not(#root-no_character)>.modal-content.modal-content-listview{font-size:13.5px}
html body .modal:not(#root-no_character) .modal-content-listview .div-listview-scroller{padding:.3em 0;scrollbar-gutter:stable}
/* 2026-11-13 (owner): in «Load character» the folder blocks and cards touched the left edge while the right side had the scrollbar gutter: the gutter is reserved on both edges, so both gaps are equal */
/* 2026-11-13 (second try): the first rule never matched (the box is .content-listview, not .modal-content-listview); an explicit gap of 11px on both sides plus the gutter on both edges: equal with a classic scrollbar (gutter = its width) and with an overlay one (no gutter) alike */
/* 14.11: the general rule `html body .modal:not(#root-no_character) .modal-content-listview .div-listview-scroller{padding:.3em 0}` has an id inside :not() and beat the plain
   `.modal.pb-character-browser` rule, so the list stood against the frame (left 0); the same prefix with the window's class wins. */
html body .modal:not(#root-no_character).pb-character-browser .modal-content-listview .div-listview-scroller{scrollbar-gutter:stable both-edges;padding-left:11px;padding-right:11px}
html body .modal:not(#root-no_character) .modal-content-listview .div-listview-scroller .listview-topdiv{min-height:2.75em;padding:.2em 1em .2em calc(1em + 3px);gap:.7em}
html body .modal:not(#root-no_character) .modal-content-listview .div-listview-scroller .listview-title{font-size:1em;line-height:1.3;padding:.25em 0}
html body .modal:not(#root-no_character) .modal-content-listview .div-listview-scroller .listview-topdiv:not(.listview-topdiv-selected) .listview-title{color:#dfe5ee}
html body .modal:not(#root-no_character) .modal-content-listview .listview-item-level{display:inline-flex!important;align-items:center;justify-content:center;flex:none;min-width:1.9em;height:1.7em;box-sizing:border-box;border-radius:6px;font-size:.88em;font-weight:600;line-height:1}
html body .modal:not(#root-no_character) .modal-content-listview .listview-item-level>img{height:1.25em;width:auto;opacity:.8;background:transparent!important}
html body .modal:not(#root-no_character):is([data-pb-window-origin="sheet"], [data-pb-window-origin="planner"])
  .div-listview-scroller .listview-item-level > img {
  height: 1.5em;
}
html body .modal:not(#root-no_character) .modal-content-listview .div-listview-info{padding:1.6em 2.1em!important;line-height:1.6;font-size:1.02em}
html body .modal:not(#root-no_character) .modal-content-listview .div-info-lm-box>.listview-topdiv .listview-title{font-size:1.5em;font-weight:700;line-height:1.25;padding:0}
html body .modal:not(#root-no_character) .modal-content-listview .div-listview-info .subtitle{color:#9aa6b5!important;font-size:.8em!important;letter-spacing:.07em;text-transform:uppercase;margin-top:1.2em!important;margin-bottom:.15em;width:auto!important}
html body .modal:not(#root-no_character) .modal-content-listview .div-listview-info .subtitle b{color:inherit;font-weight:600}
html body .modal:not(#root-no_character) .modal-content-listview .div-listview-info .trait{display:inline-block;border-radius:999px;padding:.2em .75em!important;margin:0 .35em .35em 0;font-size:.85em;background:#2a3a50;border:1px solid #3d5573}
html body .modal:not(#root-no_character) .modal-content-listview .div-listview-info:empty{display:flex;align-items:center;justify-content:center}
html body .modal:not(#root-no_character) .modal-content-listview .div-listview-info:empty::before{display:block;padding-top:3.2em;color:#7d8896;font-size:1.05em;background:no-repeat center top/2.4em url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8896' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3Crect x='3' y='3' width='18' height='18' rx='3' opacity='.45'/%3E%3C/svg%3E")}
:root.light body .modal:not(#root-no_character) .modal-content-listview .div-listview-scroller .listview-topdiv:not(.listview-topdiv-selected) .listview-title{color:#292523}
:root.light body .modal:not(#root-no_character) .modal-content-listview .div-listview-info .subtitle{color:#7a6553!important}
:root.light body .modal:not(#root-no_character) .modal-content-listview .div-listview-info .trait{background:#eadfca;border-color:#d3bf9c;color:#292523}
/* Legacy dialogs can set an inline 8em width. Size text buttons to their translated
   label and move the whole button to the next row when there is room for it. */
html body .modal:not(#root-no_character) .modal-buttons>.modal-button:not(img,svg){
  width:auto!important;
  min-width:min(7.5em,100%);
  overflow-wrap:anywhere;
}
html body .modal:not(#root-no_character)>.modal-content:not(.modal-content-listview){min-width:min(440px,calc(100vw - 32px))}
/* 2026-11-11 (owner, b46 «кубик»): the round dice button hides while a window is open and sits above the «Связи»
   board's toolbar and mini-map instead of on top of them. */
body:has(>.modal:not(#root-no_character):not([style*="display: none"]):not([style*="display:none"])) #dice-switch,
body:has(.pb-deity-window) #dice-switch{display:none!important}
/* 2026-11-11 (owner, b46 «окна-формы»): characteristics, languages, settings, save… — sections are headed parts divided
   by a thin line instead of boxes inside the window's box; a little larger text. */
html body .modal:not(#root-no_character)>.modal-content:not(.modal-content-listview){font-size:13px}
html body .modal:not(#root-no_character)>.modal-content:not(.modal-content-listview) .padding-standard{padding:.4em 1.4em .8em!important}
html body .modal:not(#root-no_character)>.modal-content:not(.modal-content-listview) .rounded-rectangle-white{background:transparent!important;border:0!important;border-top:1px solid #323d4b!important;border-radius:0!important;box-shadow:none!important;margin:0!important;padding:.95em 0 .8em!important}
html body .modal:not(#root-no_character)>.modal-content:not(.modal-content-listview) .rounded-rectangle-white:first-child{border-top:0!important}
html body .modal:not(#root-no_character)>.modal-content:not(.modal-content-listview) .rounded-rectangle-white>.bold-standard{display:block;margin:0 0 .55em;color:#9aa6b5;font-size:.82em;letter-spacing:.07em;text-transform:uppercase;font-weight:600}
:root.light body .modal:not(#root-no_character)>.modal-content:not(.modal-content-listview) .rounded-rectangle-white{border-top-color:#dcc39a!important}
:root.light body .modal:not(#root-no_character)>.modal-content:not(.modal-content-listview) .rounded-rectangle-white>.bold-standard{color:#7a6553}
/* the dice button hides while the «Связи» board is open too: lifting it put it over the portrait on short screens */
body:has(.pb-note-graph:not([hidden])) #dice-switch{display:none!important}
/* «Доступные книги правил» in the settings is a button that opens the books window: it looks like one (owner, b46) */
html body .modal:not(#root-no_character) .div-button-simple.button-text[style*="font-size: 1.3em"]{font-size:1em!important;display:inline-flex!important;flex-direction:row!important;width:auto!important;height:auto!important;white-space:nowrap;align-items:center;gap:.5em;padding:.5em 1.1em!important;margin:0!important;border:1px solid #3b4b5e;border-radius:7px;background:rgba(255,255,255,.03);cursor:pointer}
html body .modal:not(#root-no_character) .div-button-simple.button-text[style*="font-size: 1.3em"]::after{content:"›";font-size:1.25em;line-height:1;opacity:.7}
:root.light body .modal:not(#root-no_character) .div-button-simple.button-text[style*="font-size: 1.3em"]{border-color:#c4b49b;background:transparent}
/* 2026-11-12 (audit PC): the header row of the spell tab (the class DC with its attack, «Extra spells», «Print») is a centred flex row; in a narrow window or with a long tradition
   name it was wider than its box and was cut off on both sides. It wraps now: the buttons go under the DC. */
html body .layout-tabbed-line>div:has(>.prof-layout){flex-wrap:wrap;row-gap:.3em}
/* 14.11 (owner): the hint of the multiple attack penalty («Штраф за последовательные атаки: -5 / Атака 1 +16 ...») had the original's fixed 160 px frame: the red heading was wider
   than the frame. The frame now takes the width of its content (wraps at 340 px, also for a long English text), stands above the neighbouring rows. */
html body .tooltip .tooltiptextCrit{box-sizing:border-box;width:max-content!important;max-width:min(340px,80vw);left:0!important;margin-left:0!important;transform:none;padding:8px 12px!important;white-space:normal;overflow-wrap:anywhere;text-align:left;opacity:1;z-index:50;box-shadow:0 6px 18px rgba(0,0,0,.45)}
html body .tooltip .tooltiptext{box-sizing:border-box;width:max-content!important;max-width:min(340px,80vw);left:0!important;margin-left:0!important;transform:none;padding:6px 10px!important;white-space:normal;overflow-wrap:anywhere;z-index:50}
html body .tooltip .tooltiptext::after{left:20px}
/* 2026-11-14 (owner, b77-hp): the hit-point window of the character and the shield window, as the phone's: the big «now / maximum», the step row, the three actions, the rest,
   the line «Hardness · Broken» with the mark. Only these two windows carry .pb-hp-window; the colours follow the window (dark #ff5722 / light #500000). */
html body .modal .pb-hp-window{padding:1em 1.4em .4em!important;text-align:center}
html body .modal .pb-hp-big{font-size:3.3em;font-weight:700;line-height:1.1;margin:.1em 0 .05em}
html body .modal .pb-hp-big small{font-size:.42em;font-weight:400;opacity:.7}
html body .modal .pb-hp-temp{opacity:.75;margin-bottom:.3em}
html body .modal .pb-hp-row{display:grid;grid-template-columns:repeat(5,1fr);gap:.5em;margin:.9em 0 .6em}
html body .modal .pb-hp-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:.5em}
html body .modal .pb-hp-window .pb-hp-btn,html body .modal .pb-hp-window .pb-hp-amount{box-sizing:border-box;width:100%;min-width:0;height:2.7em;margin:0;border-radius:8px;font-size:1em;text-align:center}
html body .modal .pb-hp-window .pb-hp-btn{border:1px solid #4a5b70;background:transparent;color:#edf1f7;cursor:pointer}
html body .modal .pb-hp-window .pb-hp-btn:hover{background:rgba(255,255,255,.06);border-color:#6b7d93}
html body .modal .pb-hp-window .pb-hp-amount{font-weight:700}
html body .modal .pb-hp-window .pb-hp-wide{margin-top:.5em}
html body .modal .pb-hp-line{margin-top:.8em;padding-top:.6em;border-top:1px solid #3b4b5e;opacity:.85}
html body .modal .pb-hp-line.pb-hp-warn{color:#ff7a5c;opacity:1;font-weight:700}
:root.light body .modal .pb-hp-window .pb-hp-btn{border-color:#c4b49b;color:#292523}
:root.light body .modal .pb-hp-window .pb-hp-btn:hover{background:rgba(60,45,30,.06);border-color:#a8977c}
:root.light body .modal .pb-hp-line{border-top-color:#dcc39a}
:root.light body .modal .pb-hp-line.pb-hp-warn{color:#a3281f}
html body .modal:has(.pb-hp-window) .modal-buttons>.modal-button{width:auto!important;min-width:7.5em}

/* HP controls are text divs: centre their contents, including wrapped labels and shield footer actions. */
html body .modal .pb-hp-window .pb-hp-btn,html body .modal:has(.pb-hp-window) .modal-buttons>.modal-button{display:flex;align-items:center;justify-content:center;line-height:1.2;padding:.45em .65em!important}
html body .modal .pb-hp-window .pb-hp-btn{height:auto;min-height:2.7em}

/* Light-theme scroll thumbs: muted at rest, site accent on hover (owner, 2026-11-14). */
:root.light::-webkit-scrollbar-thumb,:root.light ::-webkit-scrollbar-thumb{background:#b18484}
/* Chromium can compute ancestor-qualified thumb hover without repainting it.
   Keep hover on the thumb itself; inherit the theme/window colour instead.
   Important overrides the legacy ancestor-qualified background declarations. */
:root{--pb-scrollbar-hover:#ff5722}
html body .modal:not(#root-no_character){--pb-scrollbar-hover:#56697f}
:root.light,:root.light body .modal:not(#root-no_character){--pb-scrollbar-hover:#500000}
::-webkit-scrollbar-thumb:hover{background-color:var(--pb-scrollbar-hover)!important}

/* Sheet and planner dialogs use the accent of the planner scrollbar. */
:root {
  --pb-window-scrollbar-track: #363636;
  --pb-window-scrollbar-thumb: #3b4b5e;
  --pb-window-scrollbar-hover: #ff5722;
}
:root.light {
  --pb-window-scrollbar-track: rgb(211 211 211 / .5);
  --pb-window-scrollbar-thumb: #b18484;
  --pb-window-scrollbar-hover: #500000;
}
:root[data-interface="desktop"] body .modal:not(#root-no_character):is([data-pb-window-origin="sheet"], [data-pb-window-origin="planner"]) {
  --pb-scrollbar-hover: var(--shop-action, var(--pb-window-scrollbar-hover));
}
:root[data-interface="desktop"] body .modal:not(#root-no_character):is([data-pb-window-origin="sheet"], [data-pb-window-origin="planner"]) ::-webkit-scrollbar-track {
  background: var(--shop-chosen, var(--pb-window-scrollbar-track));
}
:root[data-interface="desktop"] body .modal:not(#root-no_character):is([data-pb-window-origin="sheet"], [data-pb-window-origin="planner"]) ::-webkit-scrollbar-thumb {
  background-color: var(--shop-line, var(--pb-window-scrollbar-thumb));
}

/* Spell/item rank tooltips sit at the right edge of the sheet: open inward, not past the scroll area. */
#tabbed-area .listview-item-level .tooltip .tooltiptext{left:auto!important;right:0}
#tabbed-area .listview-item-level .tooltip .tooltiptext::after{left:auto;right:4px}

/* Feat catalogue: native controls and listeners, shared dialog palette and responsive sizing. */
html body .modal:not(#root-no_character)>.modal-content.pb-feat-catalog .div-topbar_holder{padding:16px 18px 14px;flex:none}
html body .modal:not(#root-no_character) .pb-feat-catalog .dialog-top-bar{padding:0!important}
html body .modal:not(#root-no_character) .pb-feat-catalog .dialog-title{margin:0 0 14px!important;font-size:1.2em;font-weight:700}
html body .modal:not(#root-no_character) .pb-feat-catalog .pb-feat-filters{display:grid;grid-template-columns:minmax(18em,1.5fr) minmax(12em,1fr) minmax(8em,.65fr) minmax(10em,.75fr);gap:12px;align-items:end}
.pb-feat-filter{display:flex;flex-direction:column;gap:6px;min-width:0;position:relative}
.pb-feat-filter>span{font-size:.85em;color:#aeb7c3;line-height:1.3}
html body .modal:not(#root-no_character) .pb-feat-catalog .pb-feat-filter> :is(input,select){box-sizing:border-box;width:100%!important;min-width:0;max-width:100%;height:36px;margin:0!important;padding:0 10px;border:1px solid #3b4b5e;border-radius:6px;background:#222831;color:#edf1f7;font:inherit;line-height:normal}
html body .modal:not(#root-no_character) .pb-feat-catalog .pb-feat-search>input{padding-right:34px}
html body .modal:not(#root-no_character) .pb-feat-catalog .pb-feat-search-reset{position:absolute;right:2px;bottom:2px;width:30px;height:32px;padding:0;border:0;background:transparent;color:inherit;font-size:20px;cursor:pointer;border-radius:4px}
html body .modal:not(#root-no_character) .pb-feat-catalog .content-listview{position:relative}
html body .modal:not(#root-no_character) .pb-feat-catalog .div-listview-scroller{flex:0 0 34%;width:34%;min-width:0;box-sizing:border-box}
html body .modal:not(#root-no_character) .pb-feat-catalog .div-listview-info{flex:1;min-width:0}
/* The feat catalog keeps scroll space for rows outside the rendered window. */
.pb-feat-scroll{overflow-anchor:none}
.pb-feat-scroll::before,.pb-feat-scroll::after{content:"";display:block;pointer-events:none}
.pb-feat-scroll::before{height:var(--pb-feats-before,0px)}
.pb-feat-scroll::after{height:var(--pb-feats-after,0px)}
html body .modal:not(#root-no_character) .pb-feat-catalog .listview-title{overflow-wrap:anywhere;min-width:0}
html body .modal:not(#root-no_character) .pb-feat-catalog .listview-item-level{background:#344456;color:#edf1f7}
html body .modal:not(#root-no_character) .pb-feat-catalog .modal-buttons{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;padding:12px 16px!important;flex:none}
html body .modal:not(#root-no_character) .pb-feat-catalog .modal-buttons>.modal-button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;flex:0 1 auto;width:auto!important;min-width:100px;max-width:100%;height:auto;min-height:36px;margin:0!important;padding:8px 14px;line-height:1.3;white-space:normal;text-align:center;overflow-wrap:anywhere}
html body .modal:not(#root-no_character) .pb-feat-catalog .modal-buttons>[aria-disabled=true]{opacity:.45;cursor:default;pointer-events:none}
.pb-feat-empty{position:absolute;left:0;top:0;width:34%;box-sizing:border-box;padding:20px;margin:0;color:#aeb7c3;line-height:1.5;text-align:center}
.pb-feat-empty[hidden]{display:none}
:root.light .pb-feat-filter>span,:root.light .pb-feat-empty{color:#6f6253}
:root.light body .modal:not(#root-no_character) .pb-feat-catalog .pb-feat-filter>:is(input,select){background:#f9f7ec;color:#292523;border-color:#dcc39a}
:root.light body .modal:not(#root-no_character) .pb-feat-catalog .listview-item-level{background:#eadfca;color:#500000}
@media(max-width:1050px){html body .modal:not(#root-no_character) .pb-feat-catalog .pb-feat-filters{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}}
@media(max-width:600px){html body .modal:not(#root-no_character) .pb-feat-catalog .pb-feat-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.pb-feat-category,.pb-feat-search{grid-column:1/-1}html body .modal:not(#root-no_character)>.modal-content.pb-feat-catalog .div-topbar_holder{padding:12px}html body .modal:not(#root-no_character) .pb-feat-catalog .modal-buttons>.modal-button{flex:1 1 40%;min-width:0}html body .modal:not(#root-no_character) .pb-feat-catalog .div-listview-scroller{flex-basis:40%;width:40%}.pb-feat-empty{width:40%;padding:10px}}

/* Shared character link: consistent spacing, readable URL and flexible copy control. */
html body .modal:not(#root-no_character)>.modal-content.pb-share-dialog{width:560px!important;max-width:calc(100vw - 32px)!important;font-size:14px;line-height:1.5}
html body .modal:not(#root-no_character)>.pb-share-dialog>div:not(.dialog-top-bar):not(.modal-buttons){padding:20px!important}
html body .modal:not(#root-no_character) .pb-share-dialog .rounded-rectangle-white{margin:0!important;padding:0!important;border:0!important;background:transparent!important;color:inherit;box-shadow:none}
html body .modal:not(#root-no_character) .pb-share-dialog .rounded-rectangle-white>p{margin:0 0 16px;line-height:1.5}
html body .modal:not(#root-no_character) .pb-share-dialog .rounded-rectangle-white>div{display:flex;gap:10px;align-items:stretch!important;min-width:0}
html body .modal:not(#root-no_character) .pb-share-dialog input{box-sizing:border-box;min-width:0;width:0;flex:1 1 auto!important;height:42px;padding:8px 12px!important;border:1px solid #3b4b5e;border-radius:6px;background:#171a1e;color:#edf1f7;font:inherit;line-height:24px}
html body .modal:not(#root-no_character) .pb-share-dialog input+div{display:flex!important;align-items:center;justify-content:center;box-sizing:border-box;width:auto!important;min-width:112px;min-height:42px;margin:0!important;padding:8px 14px;line-height:1.4;white-space:nowrap;flex:0 0 auto}
:root.light body .modal:not(#root-no_character) .pb-share-dialog input{background:#f9f7ec;color:#292523;border-color:#dcc39a}
@media(max-width:480px){html body .modal:not(#root-no_character) .pb-share-dialog .rounded-rectangle-white>div{flex-direction:column}html body .modal:not(#root-no_character) .pb-share-dialog input{width:100%;flex:none!important}}

/* Settings tabs are text tabs: only the bottom rule is highlighted. */
html body .modal:not(#root-no_character).pb-character-settings .pb-settings-tabs>button,
html body .modal:not(#root-no_character).pb-character-settings .pb-settings-tabs>button:is(:hover,:focus-visible){border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;outline:none!important;box-shadow:none!important;background:transparent!important}
html body .modal:not(#root-no_character).pb-character-settings .pb-settings-tabs>button:is([aria-selected=true],:hover,:focus-visible){border-bottom-color:var(--pb-accent)!important}

/* Rule drafts remain readable on both character-sheet themes. */
body .pb-feat-draft-warning, body .pb-cleric-font-warning {
  color: #ffb09b !important;
  font-weight: 600;
  line-height: 1.45;
  margin: 6px 0;
}
:root.light body .pb-feat-draft-warning, :root.light body .pb-cleric-font-warning {
  color: #500000 !important;
}
html body .pb-weapon-picker .pb-weapon-search{display:block;width:100%;min-height:2.5em;margin:0 0 .6em;box-sizing:border-box}
html body .pb-weapon-picker .pb-weapon-filter{display:inline-flex;flex-direction:column;gap:.25em;max-width:calc(100% - .5em);margin:.25em .5em .25em 0;vertical-align:top}
html body .pb-weapon-picker .pb-weapon-filter select{width:100%;margin:0}
html body .modal.pb-weapon-picker:not(#root-no_character) .div-listview-scroller{width:27.5%}
html body .modal.pb-weapon-picker .modal-buttons>button.modal-button{font-size:inherit;font-family:inherit}
html body .pb-weapon-picker .modal-buttons>button:disabled{opacity:.58;cursor:default;box-shadow:none!important}
html body .modal.pb-weapon-picker .div-listview-info .div-info-lm-box > .listview-topdiv > img[src*="/images/proficiency/"]:has(+ .listview-title) {
  margin-inline-end: .45em;
  flex-shrink: 0;
}
html body .spell-button-row>.button-cast[hidden]{display:none!important}

html:not(.light) body .pb-foundry-consent button.pb-import-primary{color:#21120e!important}

/* Filter controls in native list windows. */
html body .modal .filter-controls:has(> input + select) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 4px;
}
html body .modal .filter-controls > :is(input, select),
html body .modal .pb-item-tools > .modal-button {
  box-sizing: border-box;
  min-height: 34px;
  margin: 0 !important;
  border: 1px solid var(--ui-control-stroke, #3b4b5e);
  border-radius: 6px;
  background: var(--ui-field, #222831);
  color: var(--ui-ink, #edf1f7);
  padding: 5px 10px;
}
:root.light body .modal .filter-controls > :is(input, select),
:root.light body .modal .pb-item-tools > .modal-button {
  border-color: var(--ui-control-stroke, #dcc39a);
  background: var(--ui-field, #f9f7ec);
  color: var(--ui-ink, #292523);
}
html body .modal .filter-controls > input {
  flex: 1 1 13rem;
  min-width: min(100%, 9rem);
  max-width: 100%;
  width: 100%;
}
html body .modal .filter-controls > select { flex: 0 1 auto; min-width: min(100%, 8rem); max-width: 100%; }
html body .modal .pb-item-tools > .modal-button { width: auto; min-width: 0; line-height: 1.25; }
html body .modal .filter-controls > :is(input, select):focus-visible,
html body .modal .pb-list-filter:has(.button-filter:focus-visible) {
  outline: 2px solid rgb(var(--ui-glow));
  outline-offset: 1px;
}
html body .modal .pb-list-filter:has(.button-filter-selected) {
  background: color-mix(in srgb, rgb(var(--ui-glow)) 9%, var(--ui-field, #222831));
}
:root.light body .modal .pb-list-filter:has(.button-filter-selected) {
  background: color-mix(in srgb, rgb(var(--ui-glow)) 9%, var(--ui-field, #f9f7ec));
}
@media (min-width: 700px) {
  /* Use the grid only while the engine marks this dialog filter as open. */
  html body .modal .modal-content:has(.button-filter-selected) .dialog-top-bar:has(> div > .filter-controls):has(> .pb-item-tools) {
    display: grid !important;
    grid-template-columns: minmax(0, 34rem) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
  }
  html body .modal .dialog-top-bar:has(> div > .filter-controls):has(> .pb-item-tools) > * { grid-column: 1 / -1; }
  html body .modal .dialog-top-bar:has(> div > .filter-controls):has(> .pb-item-tools) > div:has(> .filter-controls) { grid-column: 1; }
  html body .modal .dialog-top-bar:has(> div > .filter-controls):has(> .pb-item-tools) > div:has(> .filter-controls) + .pb-item-tools { grid-column: 2; }
}

/* The Custom action belongs to the selected Custom category in this picker. */
html body .modal .modal-content-listview:not(:has(.section-menu-selected[data-pb-custom-category])) [data-pb-custom-action] {
  display: none !important;
}


/* Match the gear picker to the other character-sheet equipment windows. */
html body .modal:not(#root-no_character)[data-pb-window-origin="sheet"] .pb-gear-picker .div-topbar_holder > .submenu {
  display: block !important;
}
html body .modal:not(#root-no_character)[data-pb-window-origin="sheet"] .pb-gear-picker .div-listview-scroller {
  width: 27.5%;
}
html body .modal:not(#root-no_character)[data-pb-window-origin="sheet"] .pb-gear-picker .div-listview-scroller > .listview-item {
  margin: 0 !important;
}
html body .modal:not(#root-no_character)[data-pb-window-origin="sheet"] .pb-gear-picker .pb-item-actions > button.modal-button {
  font: inherit;
}
