@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Unbounded:wght@400;500;600&display=swap');
:root{color-scheme:dark;--ink:#f2f0e8;--green:#93c7a5}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:'DM Sans',Manrope,system-ui,sans-serif;color:var(--ink);background:#0c1311}button,input,textarea,select{font:inherit}button{color:inherit;cursor:pointer}
.topbar{height:62px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:#0e1513f2;border-bottom:1px solid #ffffff14;position:relative;z-index:20}.wordmark{display:flex;align-items:center;gap:10px;color:#f2f0e8;text-decoration:none;font-size:calc(11px * var(--site-font-scale, 1));line-height:1.1;font-weight:800;letter-spacing:.17em}.wordmark i{font-style:normal;color:#a8c5aa}.mark{display:grid;place-items:center;width:32px;height:32px;border:1px solid #90bd9875;border-radius:50%;color:#b3dbb9;font-size:calc(18px * var(--site-font-scale, 1))}.top-actions{display:flex;align-items:center;gap:10px}.icon-button,.profile-button{height:36px;border:1px solid transparent;background:transparent;border-radius:6px;color:#dce2d8}.icon-button{width:38px;font-size:calc(18px * var(--site-font-scale, 1))}.icon-button:hover,.profile-button:hover{border-color:#ffffff26;background:#ffffff0b}.cart-button{position:relative}.cart-button small{position:absolute;right:1px;top:0;font-size:calc(9px * var(--site-font-scale, 1));color:var(--green)}.profile-button{display:flex;align-items:center;gap:9px;padding:3px 10px;font-size:calc(12px * var(--site-font-scale, 1))}.avatar{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#466653;color:white;font-weight:700}.chevron{color:#b5c2b7}.mobile-menu{display:none}
.scene{min-height:calc(100vh - 62px);position:relative;overflow:hidden;background:#111a17 url('/alley-bg.png') center 54%/cover fixed}.scene-shade{position:absolute;inset:0;background:linear-gradient(180deg,#08110edb 0%,#0b15129c 18%,#09100e42 55%,#07100da8 100%),linear-gradient(90deg,#06100de0,transparent 30%,transparent 82%,#07100d88);pointer-events:none}.tool-nav{height:58px;position:relative;z-index:3;padding:0 25px;display:flex;align-items:stretch;justify-content:space-between;border-bottom:1px solid #ffffff2a;background:#0b1512bf;backdrop-filter:blur(13px)}.nav-tabs,.nav-right{display:flex;align-items:stretch;gap:4px}.nav-tab,.nav-action{border:0;background:none;color:#d0d8d0;display:flex;align-items:center;gap:9px;padding:0 15px;position:relative;font-size:calc(12px * var(--site-font-scale, 1));white-space:nowrap}.nav-tab span,.nav-action span{font-size:calc(16px * var(--site-font-scale, 1));color:#a3c4a8}.nav-tab b,.nav-action b{font-weight:600}.nav-tab:hover,.nav-action:hover{background:#ffffff0c;color:white}.nav-tab.active{color:#f6f6ee}.nav-tab.active:after{content:"";position:absolute;height:2px;left:12px;right:12px;bottom:0;background:#a6d2ad;box-shadow:0 0 11px #9bd9a5}.nav-action{border-left:1px solid #ffffff18;padding-inline:18px}.nav-action small{color:#aeb9ad}.display-action{border-right:1px solid #ffffff18}.menu-wrap{position:relative;display:flex}.dropdown{position:absolute;top:52px;right:0;width:226px;padding:7px;background:#101a17;border:1px solid #496351;border-radius:7px;box-shadow:0 16px 50px #000b;z-index:15}.dropdown button{width:100%;padding:10px;border:0;text-align:left;background:transparent;color:#d9e3d9;font-size:calc(12px * var(--site-font-scale, 1));border-radius:4px}.dropdown button:hover{background:#23382c}.dropdown hr{border:0;border-top:1px solid #ffffff1a;margin:5px 0}
.stage-strip{position:relative;z-index:2;display:flex;align-items:center;gap:8px;padding:10px 25px;background:#0c1713a8;border-bottom:1px solid #ffffff20;backdrop-filter:blur(8px)}.eyebrow{font-size:calc(9px * var(--site-font-scale, 1));color:#b4c4b6;letter-spacing:.16em;font-weight:700;margin-right:4px}.stage-list{display:flex;align-items:center;gap:5px}.stage-chip,.stage-add,.stage-rename{height:30px;border:1px solid #ffffff27;border-radius:4px;background:#14231caa;color:#c9d8ca;font-size:calc(11px * var(--site-font-scale, 1))}.stage-chip{padding:0 11px}.stage-chip.active{border-color:#91c49e;color:#e5f3e6;background:#254b35c9;box-shadow:inset 0 -2px #97cba1}.stage-chip small{margin-left:7px;color:#e0c982}.stage-add{width:32px;padding:0;font-size:calc(17px * var(--site-font-scale, 1))}.stage-rename{width:28px;padding:0;color:#b7cbb9}.stage-rename:hover,.stage-add:hover{border-color:#91c49e}.stage-separator{flex:1}.utility-button{height:31px;padding:0 10px;display:flex;align-items:center;gap:8px;border:1px solid #ffffff27;border-radius:4px;background:#14231caa;color:#d7e0d6;font-size:calc(11px * var(--site-font-scale, 1))}.utility-button span{color:#b8d1bc}.utility-button small{display:grid;place-items:center;min-width:18px;height:18px;border-radius:50%;background:#315d43;color:#f2f7ef;font-size:calc(10px * var(--site-font-scale, 1))}
.stage-tools{position:absolute;z-index:2;top:145px;left:26px;right:26px;display:flex;align-items:center;gap:8px}.difficulty-pill,.premade-button,.add-adversary{height:36px;display:flex;align-items:center;gap:8px;border:1px solid #ffffff32;border-radius:5px;padding:0 12px;background:#0c1713c9;backdrop-filter:blur(9px);color:#e3e8df;font-size:calc(11px * var(--site-font-scale, 1))}.difficulty-pill{padding:0 11px}.difficulty-pill strong{font:700 calc(14px * var(--site-font-scale, 1)) Manrope,sans-serif}.difficulty-pill>span:nth-of-type(2){font-size:calc(9px * var(--site-font-scale, 1));letter-spacing:.08em;color:#d1dfce}.difficulty-dot,.live-dot{width:7px;height:7px;border-radius:50%;background:#94d5a4;box-shadow:0 0 9px #8bda9d}.add-adversary{border-color:#8bbf98;background:#275338e8;color:#f1f7ef;font-weight:700}.add-adversary:hover{background:#356b48}.add-adversary>span{font-size:calc(18px * var(--site-font-scale, 1));line-height:0}.premade-button:hover,.difficulty-pill:hover{border-color:#9dbe9f}
.active-panel{position:relative;z-index:1;max-width:min(960px,calc(100% - 50px));margin:110px auto 180px;display:none;padding:22px;background:#0b1512df;border:1px solid #ffffff26;border-radius:8px;backdrop-filter:blur(12px);box-shadow:0 20px 70px #0008}.active-panel.open{display:block}.panel-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}.panel-heading h2{font:600 calc(25px * var(--site-font-scale, 1)) Manrope,sans-serif;margin:4px 0}.panel-heading p{color:#b2bdb1;font-size:calc(12px * var(--site-font-scale, 1));margin:4px 0}.panel-close{border:0;background:none;color:#b9c6ba;font-size:calc(23px * var(--site-font-scale, 1))}.panel-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:11px}.content-card{padding:14px;background:#17241e;border:1px solid #ffffff24;border-radius:6px}.content-card h3{font:600 calc(17px * var(--site-font-scale, 1)) Manrope,sans-serif;margin:0 0 7px}.content-card p,.content-card small{color:#aebbad;font-size:calc(11px * var(--site-font-scale, 1));line-height:1.55}.content-card button,.soft-button{border:1px solid #689277;border-radius:4px;background:#203d2d;color:#dceddd;padding:7px 9px;font-size:calc(10px * var(--site-font-scale, 1))}.content-card button:hover,.soft-button:hover{background:#2e5940}.empty-copy{color:#afbdaf;font-size:calc(13px * var(--site-font-scale, 1))}.member-layer{position:relative;z-index:1;display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,300px));gap:12px;padding:0 28px;margin:260px auto 180px;max-width:1450px}.member-card{padding:13px;background:#0c1713d9;border:1px solid #8cb3977a;border-radius:7px;backdrop-filter:blur(8px);box-shadow:0 12px 30px #0007}.member-card header{display:flex;justify-content:space-between;align-items:center;gap:8px}.member-card h3{font:600 calc(18px * var(--site-font-scale, 1)) Manrope;margin:0}.member-card small{color:#b5c8b5}.member-card p{font-size:calc(11px * var(--site-font-scale, 1));color:#c7d0c5;line-height:1.5}.member-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:10px 0}.member-stats div{padding:7px;background:#ffffff0b;border-radius:4px;font-size:calc(10px * var(--site-font-scale, 1));color:#a9b8a9}.member-stats b{display:block;color:#f0f2ea;font-size:calc(14px * var(--site-font-scale, 1))}.health-pips{display:flex;gap:5px;margin:8px 0}.health-pips button{width:16px;height:16px;border:1px solid #c68072;border-radius:3px;background:#251a19}.health-pips button.filled{background:#d17869}.member-actions{display:flex;gap:6px;margin-top:9px}.member-actions button{border:1px solid #ffffff30;border-radius:4px;background:#18251d;color:#dce7dc;padding:6px 8px;font-size:calc(10px * var(--site-font-scale, 1))}
.fear-tracker{position:fixed;z-index:5;left:24px;bottom:23px;width:255px;padding:12px 13px 10px;border:1px solid #ffffff40;border-radius:9px;background:#101a17de;backdrop-filter:blur(13px);box-shadow:0 9px 32px #0008}.fear-spend{position:absolute;left:-12px;top:45px;width:24px;height:24px;border:1px solid #ffffff38;border-radius:50%;background:#15221c;color:#d4e5d5;font-size:calc(14px * var(--site-font-scale, 1))}.fear-spend:disabled{opacity:.35;cursor:default}.fear-heading{display:flex;align-items:center;gap:9px;color:#d9e3d9;font-size:calc(10px * var(--site-font-scale, 1));font-weight:700;letter-spacing:.12em}.fear-symbol{font-size:calc(19px * var(--site-font-scale, 1));color:#d8bf81}.fear-heading strong{margin-left:auto;font:700 calc(18px * var(--site-font-scale, 1)) Manrope;color:#f1e7c9;letter-spacing:0}.fear-more{width:24px;height:24px;border:1px solid #ffffff30;border-radius:50%;background:#233a2b;color:#bce0c0}.fear-pips{display:flex;gap:5px;margin:9px 0 8px}.fear-pip{width:14px;height:14px;border:1px solid #92b69a;border-radius:50%;background:#17251d}.fear-pip.active{background:#c8ad70;border-color:#f0d89d;box-shadow:0 0 7px #dbbb72a6}.fear-add{width:100%;height:27px;border:1px solid #ffffff24;border-radius:4px;background:#1a3022;color:#c9dfcb;font-size:calc(10px * var(--site-font-scale, 1))}.scene-caption{position:fixed;z-index:3;left:50%;bottom:27px;transform:translateX(-50%);display:flex;align-items:center;gap:9px;padding:9px 13px;border:1px solid #ffffff26;border-radius:20px;background:#101815c2;color:#d3dfd1;backdrop-filter:blur(8px);font-size:calc(11px * var(--site-font-scale, 1))}.scene-caption button{border:0;background:none;color:#bacbb9}
.toast{position:fixed;z-index:30;left:50%;bottom:91px;transform:translate(-50%,12px);padding:10px 14px;border:1px solid #85b294;border-radius:6px;background:#182a20;color:#edf4e8;font-size:calc(12px * var(--site-font-scale, 1));opacity:0;transition:.2s;pointer-events:none}.toast.show{opacity:1;transform:translate(-50%,0)}.modal{width:min(620px,calc(100% - 28px));max-height:88vh;overflow:auto;padding:21px;border:1px solid #6a8d70;border-radius:9px;background:#101a17;color:#eff2e8;box-shadow:0 25px 90px #000c}.modal::backdrop{background:#050908ad;backdrop-filter:blur(5px)}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;padding-bottom:13px;border-bottom:1px solid #ffffff24;margin-bottom:16px}.modal-head h2{font:600 calc(24px * var(--site-font-scale, 1)) Manrope;margin:3px 0}.modal-head p{color:#aeb9ab;font-size:calc(12px * var(--site-font-scale, 1));margin:5px 0}.modal-close{border:0;background:none;color:#c9d4c8;font-size:calc(24px * var(--site-font-scale, 1))}.modal-body{display:grid;gap:11px}.modal label{display:grid;gap:6px;color:#b2c0b1;font-size:calc(11px * var(--site-font-scale, 1))}.modal input,.modal textarea,.modal select{width:100%;padding:9px 10px;border:1px solid #4c6753;border-radius:4px;background:#0c1311;color:#f0f2e9}.modal input[type=checkbox]{width:16px;accent-color:#8fc29a}.modal label:has(input[type=checkbox]){display:flex;align-items:center;gap:8px}.modal textarea{min-height:80px;resize:vertical}.modal-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:17px}.modal-actions button{padding:8px 13px;border-radius:4px;font-size:calc(11px * var(--site-font-scale, 1))}.modal-actions .cancel{border:1px solid #ffffff2d;background:transparent;color:#d7ded5}.modal-actions .confirm{border:1px solid #84b092;background:#2a5638;color:#f1f7ef}.choice-list{display:grid;gap:7px}.choice{display:flex;justify-content:space-between;align-items:center;padding:11px 12px;border:1px solid #3d5a45;border-radius:5px;background:#17241d;color:#e4ebe2;text-align:left}.choice:hover,.choice.selected{background:#254332;border-color:#8cba96}.choice small{color:#aec2af}.countdown-item{display:grid;grid-template-columns:1fr auto;gap:8px;padding:10px;background:#18251e;border:1px solid #395242;border-radius:5px;margin:8px 0}.countdown-item label{display:flex;align-items:center;gap:8px;color:#e2e9df}.countdown-item input[type=checkbox]{width:auto;accent-color:#8fc29a}.countdown-item small{color:#a7b5a7}.pip-row{display:flex;gap:5px;margin-top:9px}.pip-row button{width:20px;height:20px;border:1px solid #76987c;border-radius:50%;background:#0e1712}.pip-row button.on{background:#d2b776}.tabs-gm{display:flex;gap:7px;flex-wrap:wrap}.tabs-gm button{padding:8px 10px;border:1px solid #58725d;border-radius:4px;background:#1b3022;color:#dce9dd}.light-mode{--ink:#18231b}.light-mode .topbar{background:#e9eee8;color:#1c281e;border-color:#ccd6cd}.light-mode .wordmark,.light-mode .top-actions{color:#1c281e}.light-mode .scene-shade{background:linear-gradient(180deg,#08110ec7 0%,#0b15127a 18%,#09100e1c 55%,#07100d91 100%),linear-gradient(90deg,#06100dd0,transparent 30%,transparent 82%,#07100d68)}
@media(max-width:820px){.topbar{height:54px;padding:0 14px}.profile-name,.cart-button{display:none}.scene{min-height:calc(100vh - 54px);background-attachment:scroll}.tool-nav{height:auto;min-height:54px;padding:0 8px;overflow-x:auto}.nav-tabs{min-width:max-content}.nav-tab{gap:6px;padding:0 9px;font-size:calc(10px * var(--site-font-scale, 1))}.nav-tab span{font-size:calc(14px * var(--site-font-scale, 1))}.nav-action{padding:0 11px;font-size:calc(10px * var(--site-font-scale, 1))}.nav-action b{display:none}.nav-right{position:sticky;right:0;background:#0b1512e8}.stage-strip{padding:8px 10px;gap:5px;flex-wrap:wrap}.eyebrow{font-size:calc(8px * var(--site-font-scale, 1))}.stage-separator{flex:1}.utility-button{font-size:calc(10px * var(--site-font-scale, 1));padding:0 7px}.stage-tools{top:160px;left:12px;right:12px;justify-content:flex-end;gap:5px}.difficulty-pill,.premade-button,.add-adversary{height:33px;padding:0 8px;font-size:calc(9px * var(--site-font-scale, 1))}.premade-button{max-width:138px}.active-panel{margin:105px 12px 140px;max-width:none;padding:15px}.member-layer{margin:220px 10px 160px;padding:0;grid-template-columns:1fr}.fear-tracker{left:10px;bottom:10px;width:230px;padding:9px}.scene-caption{left:auto;right:10px;bottom:13px;transform:none;max-width:calc(100% - 255px);font-size:calc(9px * var(--site-font-scale, 1))}.fear-pip{width:12px;height:12px}.modal-row{grid-template-columns:1fr}}
@media(max-width:520px){.wordmark{font-size:calc(9px * var(--site-font-scale, 1))}.mark{width:28px;height:28px}.tool-nav{padding:0 4px}.nav-tab{padding:0 7px}.nav-tab b{font-size:calc(9px * var(--site-font-scale, 1))}.nav-action{padding:0 8px}.stage-tools{top:158px}.premade-button{display:none}.fear-tracker{width:205px;left:7px;bottom:7px}.fear-pip{width:10px;height:10px}.fear-pips{gap:4px}.scene-caption{bottom:14px;right:7px;max-width:calc(100% - 222px);padding:7px 8px}.active-panel{margin-top:98px}.panel-grid{grid-template-columns:1fr}}

.bestiary-filters{display:grid;grid-template-columns:minmax(180px,1fr) 130px 150px;gap:10px;align-items:end}.bestiary-filters input,.bestiary-filters select{width:100%;min-width:0}.bestiary-count{color:#aebbad;font-size:calc(11px * var(--site-font-scale, 1))}.enemy-card h3{margin-bottom:2px}.enemy-en{margin:0 0 4px;opacity:.75}.enemy-detail{display:grid;gap:4px;margin:7px 0 10px;color:#b7c2b5;font-size:calc(10px * var(--site-font-scale, 1))}.estimate-note{display:block;color:#ddba76!important;margin:-3px 0 7px}@media(max-width:520px){.bestiary-filters{grid-template-columns:1fr 1fr}.bestiary-filters label:first-child{grid-column:1/-1}}

.source-note{font-size:calc(10px * var(--site-font-scale, 1));color:#aebbad}.source-note a{color:#b8d4b4}

.member-reference{display:grid;gap:3px;margin:6px 0 10px;color:#b7c2b5;font-size:calc(10px * var(--site-font-scale, 1))}

.enemy-source{display:block;margin:0 0 9px;color:#b8d4b4;font-size:calc(10px * var(--site-font-scale, 1));text-decoration:underline}
.member-layer{grid-template-columns:repeat(auto-fill,minmax(310px,380px))}.member-card{padding:15px 16px}.member-title h3{font-size:calc(19px * var(--site-font-scale, 1))}.enemy-description{margin:9px 0 12px;font-size:calc(12px * var(--site-font-scale, 1))!important;color:#d4ddd1!important}.enemy-meta{display:grid;grid-template-columns:120px 1fr;gap:8px;margin:7px 0;color:#c3cec1;font-size:calc(11px * var(--site-font-scale, 1));line-height:1.45}.enemy-meta b{color:#e7ece2}.enemy-combat{display:grid;gap:8px;padding:10px 0;border-top:1px solid #ffffff18;border-bottom:1px solid #ffffff18}.enemy-combat>div{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px}.enemy-combat span{font-size:calc(10px * var(--site-font-scale, 1));color:#c2cdbf}.roll-link,.inline-roll{border:0;border-radius:4px;background:#3a2819;color:#ffcf94;padding:4px 7px;font-size:calc(11px * var(--site-font-scale, 1));font-weight:700;cursor:pointer}.roll-link:hover,.inline-roll:hover{background:#6b3c1d;color:#ffe1b7}.roll-link:disabled{opacity:.5;cursor:default}.enemy-thresholds{margin-top:8px;color:#aebdad;font-size:calc(10px * var(--site-font-scale, 1))}.enemy-features{margin-top:12px}.enemy-features h4{margin:0 0 6px;font:700 calc(13px * var(--site-font-scale, 1)) Manrope,sans-serif;color:#f1e7cf}.enemy-feature{border-top:1px solid #ffffff16;padding:7px 0 2px}.enemy-feature header{display:flex;align-items:center;justify-content:space-between;gap:8px}.enemy-feature header b{font:700 calc(12px * var(--site-font-scale, 1)) Manrope,sans-serif;color:#f0f2ea}.enemy-feature header span{flex:none;padding:2px 5px;border-radius:3px;background:#ffffff16;color:#c6d0c3;font-size:calc(9px * var(--site-font-scale, 1));text-transform:uppercase}.enemy-feature p{margin:5px 0 3px;font-size:calc(11px * var(--site-font-scale, 1));line-height:1.5;color:#c8d1c5}.inline-roll{display:inline;padding:0 3px;background:transparent;color:#ffae74;text-decoration:underline;text-underline-offset:2px;font-size:inherit}.member-track{margin-top:8px}.member-track>small{font-size:calc(9px * var(--site-font-scale, 1));letter-spacing:.08em}.member-actions button:hover{border-color:#d2ae74;color:#ffe0ae}@media(max-width:520px){.member-layer{grid-template-columns:1fr}.enemy-meta{grid-template-columns:105px 1fr}}
.details-note{padding:9px 10px;border-left:2px solid #ba8e55;background:#ffffff08;color:#c5b9a1;font-size:calc(10px * var(--site-font-scale, 1));line-height:1.5}.details-note a{color:#ffd293;text-decoration:underline;text-underline-offset:2px}.source-note{margin:15px 0 0;color:#99a699;font-size:calc(10px * var(--site-font-scale, 1));line-height:1.55}.source-note a{color:#d2b174}
/* Сцена: карточки вплотную к началу поля */
.member-layer{grid-template-columns:repeat(auto-fill,minmax(310px,380px));margin:56px 34px 180px;padding:0;max-width:none}
.member-card-mini{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px;min-height:70px;padding:10px 13px}.mini-identity h3{font-size:calc(15px * var(--site-font-scale, 1))}.mini-identity small{display:block;margin-top:3px}.mini-stats{display:grid;gap:3px;color:#b5c8b5;font-size:calc(10px * var(--site-font-scale, 1))}.mini-stats b{color:#f0f2ea}.mini-actions,.card-head-actions{display:flex;align-items:center;gap:3px}.mini-actions button,.card-collapse{display:grid;place-items:center;width:27px;height:27px;border:1px solid #ffffff24;border-radius:4px;background:#ffffff08;color:#dce7dc;font-size:calc(14px * var(--site-font-scale, 1))}.catalog-actions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:13px}.catalog-actions button{min-height:36px;padding:8px 14px}.catalog-grid{max-height:58vh;overflow:auto;padding:2px 4px 6px}.catalog-card{min-width:0}.catalog-card details{margin:8px 0;color:#d8e1d7;font-size:calc(11px * var(--site-font-scale, 1))}.catalog-card summary{cursor:pointer;color:#c5d8c4}.catalog-feature{padding:7px 0;border-top:1px solid #ffffff19}.catalog-feature p{white-space:pre-wrap}.catalog-stats{color:#d7c39d!important}.catalog-filters{display:grid;grid-template-columns:1fr 190px;gap:10px;align-items:end}.theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.theme-choice{display:flex;align-items:center;gap:11px;padding:12px;border:1px solid #ffffff24;border-radius:6px;background:#17241e;text-align:left;color:#eef2e8}.theme-choice.selected{border-color:#a7d2ae;background:#20392b}.theme-choice span{display:grid;gap:3px}.theme-choice small{color:#aebbad;font-size:calc(10px * var(--site-font-scale, 1))}.theme-swatch{width:34px;height:34px;flex:none;border-radius:50%;background:radial-gradient(circle at 33% 28%,#e3f0d9,#4d8c66 46%,#12291e 75%);box-shadow:0 2px 9px #0008}.theme-amethyst{background:radial-gradient(circle at 33% 28%,#f0dcff,#925bc0 46%,#20122d 75%)}.theme-ice{background:radial-gradient(circle at 33% 28%,#e5fcff,#599cb5 46%,#10252d 75%)}.theme-ember{background:radial-gradient(circle at 33% 28%,#ffe4bd,#cb7046 46%,#2a1712 75%)}
.fear-tracker{position:fixed;z-index:25;left:50%;top:13px;bottom:auto;width:auto;padding:5px 12px;transform:translateX(-50%);border:1px solid #ffffff1c;border-radius:24px;background:#101a17b8;backdrop-filter:blur(12px);box-shadow:0 5px 18px #0005;pointer-events:auto}.fear-pips{position:relative;display:flex;align-items:center;gap:3px;margin:0;padding:0 1px}.fear-pips::before{content:"";position:absolute;z-index:0;left:8px;right:8px;top:50%;height:3px;transform:translateY(-50%);border-radius:4px;background:linear-gradient(180deg,#c9c4b7,#41434b 47%,#191c23 65%,#92909a);box-shadow:0 1px 3px #000,0 0 1px #fff9}.fear-pip{position:relative;z-index:1;display:grid;place-items:center;width:24px;height:29px;padding:0;border:0;background:transparent;color:#f0f0ec;filter:drop-shadow(0 2px 1px #000c);transition:transform .22s ease}.fear-pip svg{display:block;width:24px;height:26px;overflow:visible}.fear-pip .skull-shape{fill:currentColor;stroke:#747781;stroke-width:.8}.fear-pip .skull-brow{fill:none;stroke:#ffffff88;stroke-width:1.25;stroke-linecap:round}.fear-pip .skull-eye,.fear-pip .skull-nose{fill:#20222b;stroke:#777985;stroke-width:.55}.fear-pip .skull-teeth{fill:#f2f0ed;stroke:#565963;stroke-width:.65}.fear-pip.active{color:#9c6bd2;filter:drop-shadow(0 2px 1px #000) drop-shadow(0 0 4px #9c6bd266)}.fear-pip.active .skull-shape{stroke:#5d397d}.fear-pip:hover{transform:translateY(-2px) scale(1.12)}.fear-pip.rolling{animation:skull-roll-in .55s cubic-bezier(.2,.8,.25,1)}@keyframes skull-roll-in{0%{transform:translateY(-14px) rotate(-35deg) scale(.7);opacity:.1}62%{transform:translateY(2px) rotate(12deg) scale(1.08)}100%{transform:translateY(0) rotate(0) scale(1);opacity:1}}
body[data-theme="amethyst"] .scene-shade{background:linear-gradient(180deg,#120a22d9 0%,#24103299 22%,#18102742 58%,#0c0912b5 100%),linear-gradient(90deg,#10091bdc,transparent 30%,transparent 82%,#10091b88)}body[data-theme="amethyst"] .topbar,body[data-theme="amethyst"] .tool-nav,body[data-theme="amethyst"] .stage-strip{background-color:#171021dc}body[data-theme="amethyst"] .nav-tab.active:after{background:#d3a8ff}body[data-theme="amethyst"] .stage-chip.active,body[data-theme="amethyst"] .add-adversary,body[data-theme="amethyst"] .modal-actions .confirm{border-color:#ad7dd7;background-color:#43245f}
body[data-theme="ice"] .scene-shade{background:linear-gradient(180deg,#071725d9 0%,#102d3b99 22%,#17314042 58%,#07131db5 100%),linear-gradient(90deg,#081925dc,transparent 30%,transparent 82%,#08192588)}body[data-theme="ice"] .topbar,body[data-theme="ice"] .tool-nav,body[data-theme="ice"] .stage-strip{background-color:#0b1c25dc}body[data-theme="ice"] .nav-tab.active:after{background:#a5d8f2}body[data-theme="ice"] .stage-chip.active,body[data-theme="ice"] .add-adversary,body[data-theme="ice"] .modal-actions .confirm{border-color:#79b9d5;background-color:#1c4354}
body[data-theme="ember"] .scene-shade{background:linear-gradient(180deg,#1a100bd9 0%,#3c201699 22%,#29170c42 58%,#100907b5 100%),linear-gradient(90deg,#170c08dc,transparent 30%,transparent 82%,#170c0888)}body[data-theme="ember"] .topbar,body[data-theme="ember"] .tool-nav,body[data-theme="ember"] .stage-strip{background-color:#20140fdf}body[data-theme="ember"] .nav-tab.active:after{background:#e6a16e}body[data-theme="ember"] .stage-chip.active,body[data-theme="ember"] .add-adversary,body[data-theme="ember"] .modal-actions .confirm{border-color:#c77b4f;background-color:#513021}
@media(max-width:820px){.member-layer{margin:52px 16px 160px}.fear-tracker{top:62px;padding:4px 8px}.fear-pip,.fear-pip svg{width:20px}.fear-pip{height:24px}.fear-pip svg{height:22px}}
@media(max-width:520px){.member-layer{margin:48px 10px 150px}.fear-tracker{top:58px;padding:3px 6px}.fear-pips{gap:1px}.fear-pip,.fear-pip svg{width:17px}.fear-pip{height:22px}.fear-pip svg{height:19px}.catalog-filters,.theme-grid{grid-template-columns:1fr}.catalog-grid{max-height:62vh}}
.scene.empty-adversary .stage-tools{top:53%;left:50%;right:auto;transform:translate(-50%,-50%);width:min(390px,calc(100% - 32px));display:flex;flex-direction:column;align-items:stretch;gap:12px}
.scene.empty-adversary .stage-tools::before{content:'Сцена пока пуста';color:#f0eee4;text-align:center;font:700 calc(24px * var(--site-font-scale, 1)) Manrope,sans-serif;letter-spacing:.01em;text-shadow:0 3px 18px #000b;margin-bottom:2px}
.scene.empty-adversary .stage-tools::after{content:'Добавьте противника или начните с готовой встречи';color:#c2cabb;text-align:center;font-size:calc(12px * var(--site-font-scale, 1));line-height:1.5;order:5;margin-top:1px}
.scene.empty-adversary .difficulty-pill{align-self:center;order:0;height:32px}
.scene.empty-adversary .add-adversary{order:1;justify-content:center;min-height:62px;width:100%;border-color:#a4c6a0;background:linear-gradient(135deg,#264b37ed,#17291eeb);box-shadow:0 12px 36px #0008, inset 0 1px #ffffff20;font:700 calc(16px * var(--site-font-scale, 1)) Manrope,sans-serif;letter-spacing:.01em;transition:transform .16s,border-color .16s,background .16s}
.scene.empty-adversary .add-adversary span{font-size:calc(24px * var(--site-font-scale, 1));line-height:1;color:#bfe4b6}
.scene.empty-adversary .add-adversary:hover{transform:translateY(-2px);border-color:#d2e6bf;background:linear-gradient(135deg,#315c42,#20382a)}
.scene.empty-adversary .premade-button{order:2;justify-content:center;min-height:44px;width:100%;background:#101a17d9}
.dice-roll-overlay{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:18px;background:#020705a8;backdrop-filter:blur(3px);animation:dice-overlay-in .18s ease-out}
.dice-roll-overlay[hidden]{display:none}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.dice-roll-panel{width:min(530px,100%);overflow:hidden;border:1px solid #96bd9c9c;border-radius:12px;background:radial-gradient(ellipse at 50% 15%,#233b2c,#101815 72%);box-shadow:0 24px 90px #000c,0 0 36px #9bc59b20}
.dice-roll-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 16px 5px}
.dice-roll-heading div{display:grid;gap:3px}.dice-roll-heading span{color:#a9c6a5;font-size:calc(9px * var(--site-font-scale, 1));font-weight:800;letter-spacing:.15em}.dice-roll-heading b{color:#f1f0e7;font:700 calc(16px * var(--site-font-scale, 1)) Manrope,sans-serif}
.dice-roll-close{width:30px;height:30px;border:1px solid #ffffff24;border-radius:50%;background:#ffffff0a;color:#ecf1e9;font-size:calc(20px * var(--site-font-scale, 1));line-height:1}.dice-roll-close:hover{background:#ffffff18}
.dice-canvas-host{position:relative;width:100%;height:270px;overflow:hidden}.dice-canvas-host canvas{display:block;width:100%!important;height:100%!important;outline:0}
.dice-roll-result{display:block;min-height:44px;padding:9px 16px 14px;border-top:1px solid #ffffff18;color:#f2deb7;text-align:center;font:700 calc(13px * var(--site-font-scale, 1)) Manrope,sans-serif}
@keyframes dice-overlay-in{from{opacity:0}to{opacity:1}}
@media(max-width:820px){.member-layer{margin:20px 16px 160px;padding:0;grid-template-columns:minmax(0,380px)}.scene.empty-adversary .stage-tools{top:52%;left:50%;right:auto;justify-content:initial}}
@media(max-width:520px){.member-layer{margin:18px 10px 150px;grid-template-columns:minmax(0,1fr)}.scene.empty-adversary .stage-tools{width:min(360px,calc(100% - 28px))}.scene.empty-adversary .stage-tools::before{font-size:calc(21px * var(--site-font-scale, 1))}.dice-roll-overlay{padding:12px}.dice-canvas-host{height:225px}}
.item-pager{display:flex;justify-content:center;align-items:center;gap:12px;margin:10px 0}.item-pager button{padding:7px 11px;border:1px solid #45624c;border-radius:4px;background:#17241e;color:#dbe8d9}.item-pager button:disabled{opacity:.4;cursor:default}.item-pager span{min-width:48px;text-align:center;color:#bac7b8;font-size:calc(11px * var(--site-font-scale, 1))}.theme-light{background:radial-gradient(circle at 33% 28%,#fff,#d8e3ce 46%,#91a588 75%)}body.light-mode .fear-tracker{border-color:#354e36;background:#edf1e5ee;box-shadow:0 4px 18px #0003}body.light-mode .fear-pips::before{background:linear-gradient(180deg,#7c7d77,#f8f7ef 48%,#9b9b95 62%,#fff)}body.light-mode .fear-pip{filter:drop-shadow(0 2px 1px #0005)}body.light-mode .fear-pip:not(.active){color:#fff}body.light-mode .fear-pip.active{color:#8053b0}

/* Enemy cards act as the add control; lift and glow on hover. */
.enemy-card{cursor:pointer;transform:translateZ(0);transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.enemy-card:hover,.enemy-card:focus-visible{position:relative;z-index:2;transform:translateY(-5px) scale(1.018);border-color:#b2e3b6;box-shadow:0 15px 34px #0009,0 0 18px #8bd59c45;outline:none}
.enemy-card .enemy-source{position:relative;z-index:3}
@media(prefers-reduced-motion:reduce){.enemy-card,.fear-pip{transition:none}.fear-pip.rolling{animation:none}}

/* The Fear track separates the purple and ivory groups with a moving gap. */
.fear-pips::before{left:5px;right:5px;height:4px;background:linear-gradient(180deg,#dbd8d0 0%,#777a84 38%,#282a31 58%,#bfc0c4 100%);box-shadow:0 2px 3px #000d,0 0 3px #ffffff88}
.fear-pip{width:25px;height:31px;transition:transform .3s cubic-bezier(.2,.75,.25,1),margin-left .34s cubic-bezier(.2,.75,.25,1),filter .28s ease,color .32s ease}
.fear-pip svg{width:25px;height:28px;filter:drop-shadow(0 1px 0 #fff6)}
.fear-pip:not(.active){color:#f2f1eb;filter:drop-shadow(0 2px 1px #000) drop-shadow(0 0 2px #ffffff55)}
.fear-pip.active{color:#a77bd7;filter:drop-shadow(0 2px 1px #000) drop-shadow(0 0 5px #9d68d888)}
.fear-pip.active .skull-shape{stroke:#4e2e70;stroke-width:1.15}
.fear-pip:not(.active) .skull-shape{stroke:#73727d;stroke-width:1.05}
.fear-pip .skull-brow{stroke:#ffffffbb;stroke-width:1.4}
.fear-pip .skull-eye,.fear-pip .skull-nose{fill:#17181e;stroke:#555862;stroke-width:.75}
.fear-pip .skull-teeth{fill:#f9f8f2;stroke:#555862;stroke-width:.75}
.fear-pip.split-before{margin-left:9px}
.fear-pip.rolling{animation:skull-roll-in .56s cubic-bezier(.18,.75,.22,1)}

/* Center the empty-scene prompt only while the adversary panel is open. */
.scene.empty-adversary .active-panel{display:none}
.scene.empty-adversary .stage-tools{z-index:3}

/* Note cards and the tier picker for a selected catalog item. */
.note-grid{margin-top:12px}
.note-card p{white-space:pre-wrap;overflow-wrap:anywhere}
.item-selection-card{display:flex;align-items:end;justify-content:flex-start;gap:12px;padding:11px;margin:0 0 12px;border:1px solid #8bbb91;border-radius:6px;background:#14231b;box-shadow:0 0 15px #8bd59c22}
.item-selection-card>div{display:grid;gap:3px;margin-right:auto}
.item-selection-card>div small{font-size:calc(9px * var(--site-font-scale, 1));letter-spacing:.1em;color:#a8c9a5}
.item-selection-card>div b{font:600 calc(16px * var(--site-font-scale, 1)) Manrope,sans-serif;color:#f2f2e9}
.item-selection-card label{display:grid;gap:4px;min-width:110px;color:#b9c8b8;font-size:calc(10px * var(--site-font-scale, 1))}
.item-selection-card select{width:100%;padding:7px;border:1px solid #49634d;border-radius:4px;background:#101a15;color:#e7eee3}
.item-selection-card button{padding:8px 11px}
.catalog-card.selected-item{border-color:#97ce9c;box-shadow:0 0 16px #8bd59c35}
@media(max-width:520px){.item-selection-card{align-items:stretch;flex-direction:column}.item-selection-card>div{margin:0}.item-selection-card label{min-width:0}.fear-pip.split-before{margin-left:6px}}

/* Keep encounter tools available and make the card density control visible. */
.topbar{position:sticky;top:0;z-index:30}
.dice-global-button{font-size:calc(20px * var(--site-font-scale, 1))}
.dice-roll-panel{width:min(520px,100%);padding:16px;border:1px solid var(--theme-accent,#8bbf98);border-radius:10px;background:#101a17f2;box-shadow:0 22px 75px #000b;backdrop-filter:blur(12px)}
.dice-quick-rolls{display:flex;gap:6px;margin:10px 0}.dice-quick-rolls button{padding:5px 9px;border:1px solid color-mix(in srgb,var(--theme-accent,#8bbf98) 50%,transparent);border-radius:4px;background:#17241e;color:var(--theme-accent,#b8d4b5)}
.dice-roll-form{display:flex;gap:8px}.dice-roll-form input{flex:1;min-width:0;padding:8px 10px;border:1px solid #4c6753;border-radius:4px;background:#0c1311;color:#f0f2e9}.dice-roll-form button{padding:8px 14px;border:1px solid var(--theme-accent,#8bbf98);border-radius:4px;background:#203d2d;color:#eff5e9}
.member-layer[data-card-size="small"]{grid-template-columns:repeat(auto-fill,minmax(175px,1fr));max-width:none;margin:56px 28px 180px}
.member-layer[data-card-size="medium"]{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));max-width:none;margin:56px 28px 180px}
.member-layer[data-card-size="large"]{grid-template-columns:repeat(auto-fill,minmax(470px,1fr));max-width:none;margin:56px 28px 180px}
.member-resources{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:5px 12px;align-items:center;margin:4px 0 9px;padding:8px 9px;border:1px solid #ffffff21;border-radius:5px;background:#ffffff08}
.member-resources .member-track{min-width:0;margin:0}.member-track>small{display:block;color:#c6d4c4;font-size:calc(9px * var(--site-font-scale, 1));font-weight:700;letter-spacing:.09em}
.health-pips,.stress-pips{display:flex;gap:3px;margin:5px 0 0;flex-wrap:wrap}.health-pips button,.stress-pips button{width:13px;height:13px;padding:0;border-radius:3px}.stress-pips button{border:1px solid #a896c2;background:#211b2a}.stress-pips button.filled{background:#9772c6}
.enemy-thresholds{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;padding-top:6px;border-top:1px solid #ffffff20;color:#f1deb5;font-size:calc(11px * var(--site-font-scale, 1))}.enemy-thresholds small{color:#d0c39e;font-size:calc(9px * var(--site-font-scale, 1));letter-spacing:.08em}.enemy-thresholds b{font-size:calc(12px * var(--site-font-scale, 1))}
.mini-actions button[data-collapse-member]{font-size:calc(18px * var(--site-font-scale, 1));font-weight:600}
.fear-pips{gap:2px}.fear-pip:not(.split-before){margin-left:0}.fear-pip.split-before{margin-left:18px}
.fear-pip.active,.fear-pip:not(.active){filter:drop-shadow(0 1px 1px #0008)}.fear-pip svg{filter:none}
body[data-theme="forest"]{--theme-accent:#8acb94}body[data-theme="amethyst"]{--theme-accent:#c5a8f4}body[data-theme="ice"]{--theme-accent:#a5d8f2}body[data-theme="ember"]{--theme-accent:#e6a16e}body[data-theme="light"]{--theme-accent:#69896e}body[data-theme="dark"]{--theme-accent:#a9b7c8}
body[data-theme="forest"] .scene{background-image:url('/themes/forest.png')}body[data-theme="amethyst"] .scene{background-image:url('/themes/amethyst.png')}body[data-theme="ice"] .scene{background-image:url('/themes/ice.png')}body[data-theme="ember"] .scene{background-image:url('/themes/ember.png')}body[data-theme="light"] .scene{background-image:url('/themes/light.png')}body[data-theme="dark"] .scene{background-image:url('/themes/dark.png')}
body[data-theme="light"] .scene-shade{background:linear-gradient(180deg,#17291c96 0%,#17291c40 32%,#17291c14 58%,#17291c72 100%),linear-gradient(90deg,#17291c70,transparent 38%,transparent 84%,#17291c40)}
body[data-theme="dark"] .scene-shade{background:linear-gradient(180deg,#07101ac9 0%,#10182786 22%,#0b14233a 58%,#070c16c2 100%),linear-gradient(90deg,#070c16c9,transparent 35%,transparent 80%,#070c1688)}
body[data-theme="light"] .topbar,body[data-theme="light"] .tool-nav,body[data-theme="light"] .stage-strip{background-color:#e9eee8dd;color:#1c281e}body[data-theme="light"] .topbar .wordmark,body[data-theme="light"] .top-actions,body[data-theme="light"] .icon-button,body[data-theme="light"] .profile-button{color:#1c281e}
body[data-theme="dark"] .topbar,body[data-theme="dark"] .tool-nav,body[data-theme="dark"] .stage-strip{background-color:#09111cdd}body[data-theme="dark"] .nav-tab.active:after{background:#a9b7c8}
@media(max-width:820px){.member-layer[data-card-size]{grid-template-columns:minmax(0,1fr);margin:48px 16px 160px}.fear-tracker{top:13px}}
@media(max-width:520px){.fear-pips{gap:1px}.fear-pip.split-before{margin-left:13px}.member-resources{gap:5px;padding:7px}.health-pips button,.stress-pips button{width:11px;height:11px}}
.member-layer:not(.members-on-page){display:none}
.nav-badge{display:grid;place-items:center;min-width:17px;height:17px;padding:0 4px;border-radius:10px;background:#315d43;color:#f2f7ef;font-size:calc(9px * var(--site-font-scale, 1));font-weight:700}
.scene.bestiary-view .stage-tools{display:none}
.fear-tracker{z-index:45}
.member-layer[data-card-size="medium"]{grid-template-columns:repeat(auto-fill,minmax(340px,360px))}
.member-card:not(.member-card-mini){display:flex;flex-direction:column;max-height:min(82vh,820px);overflow:hidden}
.member-scroll-content{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:5px;scrollbar-width:thin;scrollbar-color:#718a75 #111a16}
.member-scroll-content::-webkit-scrollbar{width:6px}.member-scroll-content::-webkit-scrollbar-thumb{border-radius:6px;background:#718a75}.member-scroll-content::-webkit-scrollbar-track{background:#111a16}
.member-controls{flex:0 0 auto}
.toast.roll-toast{max-width:min(580px,calc(100% - 94px));padding:16px 22px;border-radius:9px;font-size:calc(18px * var(--site-font-scale, 1));font-weight:700;line-height:1.35;box-shadow:0 8px 28px #0009}
.gm-template-list{display:grid;gap:9px;max-height:62vh;overflow:auto;padding:2px 4px 3px}
.gm-template-card{display:flex;align-items:center;justify-content:space-between;gap:14px}.gm-template-card>div{min-width:0;flex:1}.gm-template-card small{font-size:calc(9px * var(--site-font-scale, 1));letter-spacing:.1em;color:#a9c3a8}.gm-template-card p{margin:5px 0 0;white-space:pre-wrap}.gm-template-card>.confirm{flex:none;border:1px solid #84b092;border-radius:4px;background:#2a5638;color:#f1f7ef;padding:8px 11px;font-size:calc(10px * var(--site-font-scale, 1))}
@media(max-width:820px){.member-layer[data-card-size="medium"]{grid-template-columns:minmax(0,1fr)}.fear-tracker{z-index:45}}
@media(max-width:520px){.toast.roll-toast{left:10px;bottom:10px;max-width:calc(100% - 82px);padding:13px 16px;font-size:calc(16px * var(--site-font-scale, 1))}.gm-template-card{align-items:flex-start}.member-card:not(.member-card-mini){max-height:78vh}}
.dice-global-button{position:fixed;right:20px;bottom:18px;z-index:42;width:48px;height:48px;border:1px solid var(--theme-accent,#8bbf98);border-radius:50%;background:#101a17ed;box-shadow:0 5px 22px #0009;font-size:calc(22px * var(--site-font-scale, 1))}
.dice-roll-overlay{position:fixed;inset:auto 20px 76px auto;z-index:41;display:block;width:min(440px,calc(100vw - 28px));padding:0;background:transparent;backdrop-filter:none;pointer-events:none;animation:none}
.dice-roll-overlay[hidden]{display:none}
.dice-roll-panel{width:100%;pointer-events:auto;box-shadow:0 15px 48px #000c,0 0 22px color-mix(in srgb,var(--theme-accent,#8bbf98) 15%,transparent)}
.dice-canvas-host{height:220px}
.toast.roll-toast{left:20px;bottom:20px;max-width:min(420px,calc(100% - 90px));transform:translate(-12px,0);text-align:left}
.toast.roll-toast.show{transform:translate(0,0)}
.active-panel.gm-panel{max-width:min(1120px,calc(100% - 50px));margin-top:100px}
.gm-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.gm-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:22px 0 12px;padding-top:17px;border-top:1px solid #ffffff20}
.gm-toolbar h3{margin:0;font:600 calc(18px * var(--site-font-scale, 1)) Manrope,sans-serif}.gm-toolbar p{margin:4px 0 0;color:#aebbad;font-size:calc(11px * var(--site-font-scale, 1))}.gm-toolbar .confirm{flex:none;padding:9px 13px;border:1px solid #84b092;border-radius:4px;background:#2a5638;color:#f1f7ef;font-size:calc(11px * var(--site-font-scale, 1))}
.gm-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:11px}
.gm-card{min-width:0}.gm-card>header{display:flex;justify-content:space-between;gap:8px;margin-bottom:7px}.gm-card>header h3{margin:3px 0 0}.gm-card>header small{font-size:calc(9px * var(--site-font-scale, 1));letter-spacing:.11em;color:#a9c3a8}.gm-card-actions{display:flex;gap:4px}.gm-card-actions button{width:28px;height:28px;padding:0;font-size:calc(14px * var(--site-font-scale, 1))}.gm-card p{margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.gm-table-wrap{overflow:auto}.gm-table{width:100%;border-collapse:collapse;font-size:calc(11px * var(--site-font-scale, 1))}.gm-table th,.gm-table td{padding:7px 8px;border:1px solid #ffffff1e;text-align:left;vertical-align:top}.gm-table th{background:#ffffff0a;color:#d8e5d5;font-weight:700}.gm-table td{color:#b9c5b8;white-space:pre-wrap}
.gm-shortcuts{margin-top:18px;padding-top:14px;border-top:1px solid #ffffff1d}
.gm-editor-table{display:grid;gap:9px}.gm-table-head-inputs{display:grid;grid-template-columns:1fr 1fr;gap:8px}.gm-editor-row{display:grid;grid-template-columns:1fr 1fr 32px;gap:7px;margin-bottom:7px}.gm-editor-row button{border:1px solid #ffffff24;border-radius:4px;background:#ffffff0a;color:#e8ece3;font-size:calc(18px * var(--site-font-scale, 1))}
[hidden]{display:none!important}
/* Encounter card controls and scene dice */
.member-stats{grid-template-columns:minmax(86px,120px)}
.member-stats>div{padding:6px 8px}
.track-line{display:flex;align-items:center;gap:10px;min-height:21px}
.health-pips,.stress-pips{margin:5px 0;flex:none}
.track-value{min-width:35px;color:#f0e7d3;font-size:calc(11px * var(--site-font-scale, 1));white-space:nowrap}
.condition-actions{flex-wrap:wrap}
.condition-actions button{border:1px solid #ffffff30;border-radius:4px;background:#18251d;color:#dce7dc;padding:6px 9px;font-size:calc(10px * var(--site-font-scale, 1));transition:background .18s,border-color .18s,color .18s}
.condition-actions button.active{border-color:var(--theme-accent,#8bbf98);background:color-mix(in srgb,var(--theme-accent,#8bbf98) 20%,#142019);color:#fff4d9}
.member-card.status-hidden{opacity:.65}
.member-name{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.name-chain{color:#c7b3e4;font-size:.76em;text-shadow:0 1px 2px #000}
.member-name.is-vulnerable>span:not(.name-chain){text-decoration:underline;text-decoration-style:wavy;text-decoration-color:#e39783;text-decoration-thickness:1px;text-shadow:1px 0 #c35d56,-1px 0 #e6bd88}
.fear-tracker{padding-inline:17px}
.fear-pip.active,.fear-pip:not(.active){filter:drop-shadow(0 1px 1px #0008)}
.fear-pip svg{filter:none}
.active-panel.bestiary-panel.open{position:fixed;inset:141px 0 0;z-index:30;width:100%;max-width:none;height:auto;max-height:none;overflow:auto;margin:0;padding:18px 24px 26px;border-radius:0;border-left:0;border-right:0;backdrop-filter:blur(14px)}
.bestiary-panel .panel-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));align-content:start}
.dice-scene-overlay{position:fixed;inset:140px 0 0;z-index:20;pointer-events:none;overflow:hidden;opacity:0;transition:opacity .15s ease}
.dice-scene-overlay.rolling{opacity:1}
.dice-scene-overlay[hidden]{display:none}
.dice-scene-overlay .dice-canvas-host{position:absolute;inset:0;width:100%;height:100%;overflow:hidden}
.dice-scene-overlay .duality-dice-host{position:absolute;inset:0;grid-template-columns:1fr 1fr;gap:8px;pointer-events:none}
.dice-scene-overlay .duality-dice-host:not([hidden]){display:grid}
.dice-scene-overlay .duality-dice-host .dice-canvas-host{position:relative;inset:auto;min-width:0;height:100%}
.dice-scene-overlay canvas{pointer-events:none}
@media(max-width:820px){.active-panel.bestiary-panel.open{inset:150px 0 0;padding:14px 14px 22px}.dice-scene-overlay{inset:154px 0 0}.fear-tracker{padding-inline:15px}}
@media(max-width:520px){.active-panel.bestiary-panel.open{inset:160px 0 0;padding:12px 10px 20px}.bestiary-panel .panel-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px}.dice-scene-overlay{inset:178px 0 0}.fear-tracker{padding-inline:13px}}
/* Dedicated bestiary workspace */
.active-panel.bestiary-panel.open{display:flex;flex-direction:column;height:calc(100vh - 141px);overflow:hidden;background:color-mix(in srgb,#0b1512 92%,var(--theme-accent,#8acb94) 8%);border-color:color-mix(in srgb,var(--theme-accent,#8acb94) 40%,#ffffff18)}
.bestiary-panel .panel-heading{flex:none;margin-bottom:12px}
.bestiary-panel .bestiary-filters{display:grid;grid-template-columns:minmax(200px,1fr) 140px 170px;gap:12px;align-items:end;flex:none}
.bestiary-panel .bestiary-filters label{display:grid;gap:5px;color:#b8c8b8;font-size:calc(10px * var(--site-font-scale, 1))}
.bestiary-panel .bestiary-filters input,.bestiary-panel .bestiary-filters select{height:37px;padding:0 10px;border:1px solid #ffffff25;border-radius:5px;background:#111c18;color:#edf3e9}
.bestiary-panel .bestiary-count{flex:none;margin:8px 0 10px;color:#a9b9aa;font-size:calc(10px * var(--site-font-scale, 1))}
.bestiary-layout{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(340px,1fr);gap:14px;flex:1;min-height:0}
.bestiary-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(185px,1fr));grid-auto-rows:minmax(66px,auto);align-content:start;gap:8px;min-height:0;overflow:auto;padding:2px 6px 3px 1px;scrollbar-width:thin;scrollbar-color:#718a75 #111a16}
.bestiary-entry{display:flex;align-items:center;gap:9px;min-width:0;padding:9px 10px;border:1px solid #ffffff20;border-radius:6px;background:#16231d;color:#e8eee5;text-align:left;transition:border-color .15s,background .15s,transform .15s}
.bestiary-entry:hover{transform:translateY(-1px);border-color:var(--theme-accent,#8acb94);background:#1b2b22}
.bestiary-entry.selected{border-color:var(--theme-accent,#8acb94);background:color-mix(in srgb,#1b2b22 82%,var(--theme-accent,#8acb94) 18%)}
.bestiary-entry-icon,.bestiary-portrait{display:grid;place-items:center;flex:none;width:35px;height:35px;border:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 62%,#ffffff24);border-radius:6px;background:color-mix(in srgb,#101a16 72%,var(--theme-accent,#8acb94) 28%);color:#f2ebd3;font:700 calc(17px * var(--site-font-scale, 1)) Manrope,sans-serif}
.bestiary-entry-copy{display:grid;gap:3px;min-width:0}
.bestiary-entry-copy b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 calc(12px * var(--site-font-scale, 1)) Manrope,sans-serif}
.bestiary-entry-copy small,.bestiary-entry-tier{color:#aebcae;font-size:calc(9px * var(--site-font-scale, 1))}
.bestiary-entry-tier{margin-left:auto;align-self:flex-start;white-space:nowrap}
.bestiary-detail{min-width:0;min-height:0;overflow:hidden;border:1px solid #ffffff21;border-radius:8px;background:#111c18}
.bestiary-detail-card{display:flex;flex-direction:column;height:100%;min-height:0;padding:14px}
.bestiary-detail-heading{display:flex;align-items:center;gap:11px;flex:none}
.bestiary-portrait{width:49px;height:49px;border-radius:8px;font-size:calc(23px * var(--site-font-scale, 1))}
.bestiary-detail-heading small,.bestiary-motives small,.bestiary-experience small{color:#a9c3a8;font-size:calc(9px * var(--site-font-scale, 1));font-weight:700;letter-spacing:.1em}
.bestiary-detail-heading h3{margin:3px 0;font:700 calc(21px * var(--site-font-scale, 1)) Manrope,sans-serif;color:#f3f2e9}
.bestiary-detail-heading p{margin:0;color:#a8b7a9;font-size:calc(10px * var(--site-font-scale, 1));font-style:italic}
.bestiary-description{flex:none;margin:11px 0;color:#c6d1c4;font-size:calc(11px * var(--site-font-scale, 1));line-height:1.5}
.bestiary-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;flex:none}
.bestiary-stats div{display:grid;gap:4px;padding:8px;border-radius:5px;background:#ffffff08}
.bestiary-stats small{color:#9eae9f;font-size:calc(8px * var(--site-font-scale, 1));letter-spacing:.06em}
.bestiary-stats b{color:#f1f0e6;font-size:calc(15px * var(--site-font-scale, 1))}
.bestiary-attacks{display:grid;gap:5px;flex:none;margin:10px 0;padding:8px 0;border-top:1px solid #ffffff19;border-bottom:1px solid #ffffff19}
.bestiary-attacks>div{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#b9c7b8;font-size:calc(10px * var(--site-font-scale, 1))}
.bestiary-motives,.bestiary-experience{flex:none;margin:0 0 8px;padding:8px 10px;border:1px solid #ffffff18;border-radius:5px;background:#ffffff07}
.bestiary-motives p,.bestiary-experience p{margin:4px 0 0;color:#c6d2c4;font-size:calc(11px * var(--site-font-scale, 1));line-height:1.4}
.bestiary-features-scroll{flex:1;min-height:60px;overflow:auto;padding:0 5px 4px 0;scrollbar-width:thin;scrollbar-color:#718a75 #111a16}
.bestiary-features-scroll h4{position:sticky;top:0;margin:0;padding:7px 0;background:#111c18;color:#e9ede4;font:700 calc(12px * var(--site-font-scale, 1)) Manrope,sans-serif}
.bestiary-features-scroll .enemy-feature{border-color:#ffffff1b}
.bestiary-add-bar{display:flex;align-items:end;gap:10px;flex:none;padding-top:10px}
.bestiary-add-bar label{display:grid;gap:4px;color:#aebdad;font-size:calc(9px * var(--site-font-scale, 1))}
.bestiary-add-bar input{width:82px;height:36px;padding:0 8px;border:1px solid #ffffff27;border-radius:5px;background:#0d1512;color:#f2f1e8}
.bestiary-add-bar .confirm{height:36px;flex:1;border:1px solid var(--theme-accent,#8acb94);border-radius:5px;background:color-mix(in srgb,#1e402c 80%,var(--theme-accent,#8acb94) 20%);color:#f4f6ed;font-size:calc(10px * var(--site-font-scale, 1));font-weight:700}
/* Dice selector and result card */
.dice-picker{position:fixed;right:20px;bottom:76px;z-index:44;width:min(280px,calc(100vw - 24px));padding:12px;border:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 65%,#ffffff22);border-radius:9px;background:#111a18f5;box-shadow:0 12px 36px #000b;backdrop-filter:blur(12px)}
.dice-picker header{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px;color:#edf1e7;font:700 calc(12px * var(--site-font-scale, 1)) Manrope,sans-serif}
.dice-picker header button{width:25px;height:25px;border:1px solid #ffffff25;border-radius:50%;background:#ffffff08;color:#eee}
.dice-picker-dice{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}
.dice-picker-dice button{height:32px;border:1px solid var(--theme-accent,#8acb94);border-radius:4px;background:#19271f;color:#ead8ff;font-weight:700}
.dice-picker form{display:flex;align-items:end;gap:7px;margin-top:9px}
.dice-picker form label{display:grid;flex:1;gap:4px;color:#acbcac;font-size:calc(9px * var(--site-font-scale, 1))}
.dice-picker input{width:100%;height:32px;padding:0 8px;border:1px solid #ffffff27;border-radius:4px;background:#0c1411;color:#eef0e9}
.dice-picker form .confirm{height:32px;padding:0 10px;border:1px solid #83ac8b;border-radius:4px;background:#27452f;color:#eff4e9;font-size:calc(10px * var(--site-font-scale, 1))}
.toast.roll-toast{left:20px;bottom:20px;width:min(360px,calc(100% - 100px));max-width:none;padding:12px 15px;border:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 55%,#ffffff24);border-radius:8px;background:#303b4bf2;transform:translate(-12px,0);text-align:left;color:#f5f5f3}
.toast.roll-toast.show{transform:translate(0,0)}
.roll-toast-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}
.roll-toast-heading>div{display:grid;gap:2px}
.roll-toast-heading b{font-size:calc(10px * var(--site-font-scale, 1));line-height:1.1;letter-spacing:.05em}
.roll-toast-heading strong{color:var(--theme-accent,#c5a8f4);font-size:calc(12px * var(--site-font-scale, 1));line-height:1.1}
.roll-toast-heading small{font-size:calc(9px * var(--site-font-scale, 1));color:#d0d5dc}
.roll-toast-result{font:700 calc(38px * var(--site-font-scale, 1))/1 Manrope,sans-serif;color:#f4f4f1}
.roll-toast-breakdown{margin-top:7px;color:#e5e7e9;font-size:calc(14px * var(--site-font-scale, 1));font-weight:700;letter-spacing:.02em}
.fear-pip.active{filter:none!important;box-shadow:none!important}
.fear-pip.active svg{filter:none!important}
@media(max-width:900px){.active-panel.bestiary-panel.open{height:calc(100vh - 150px)}.bestiary-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(190px,38%) minmax(280px,1fr);gap:9px}.bestiary-list{grid-template-columns:repeat(auto-fill,minmax(145px,1fr));grid-auto-rows:minmax(55px,auto)}.bestiary-entry{padding:7px}.bestiary-entry-icon{width:29px;height:29px}}
@media(max-width:520px){.active-panel.bestiary-panel.open{height:calc(100vh - 160px)}.bestiary-panel .bestiary-filters{grid-template-columns:minmax(0,1fr) 82px 104px;gap:6px}.bestiary-panel .bestiary-filters input,.bestiary-panel .bestiary-filters select{height:34px;padding:0 6px;font-size:calc(10px * var(--site-font-scale, 1))}.bestiary-layout{grid-template-rows:minmax(150px,32%) minmax(300px,1fr)}.bestiary-list{grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:5px}.bestiary-entry-tier{display:none}.bestiary-detail-card{padding:10px}.bestiary-stats div{padding:6px 5px}.bestiary-stats small{font-size:calc(7px * var(--site-font-scale, 1))}.bestiary-add-bar input{width:66px}.dice-picker{right:12px;bottom:70px}.toast.roll-toast{left:10px;bottom:10px;width:calc(100% - 80px);padding:10px 12px}.roll-toast-result{font-size:calc(32px * var(--site-font-scale, 1))}}
.topbar{z-index:40}
.scene.bestiary-view .stage-strip{display:none}
.active-panel.bestiary-panel.open{inset:120px 0 0;height:calc(100vh - 120px)}
@media(max-width:820px){.active-panel.bestiary-panel.open{inset:110px 0 0;height:calc(100vh - 110px)}}
@media(max-width:520px){.active-panel.bestiary-panel.open{inset:110px 0 0;height:calc(100vh - 110px)}}
/* Theme-aware bestiary and full-height stat blocks */
.active-panel.bestiary-panel.open{background:color-mix(in srgb,#0b1512 72%,var(--theme-accent,#8acb94) 28%);border-color:color-mix(in srgb,var(--theme-accent,#8acb94) 58%,#ffffff20)}
.bestiary-list{grid-template-columns:repeat(3,minmax(0,1fr))}
.bestiary-detail{height:100%;overflow:hidden;border-color:color-mix(in srgb,var(--theme-accent,#8acb94) 35%,#ffffff20);background:color-mix(in srgb,#111c18 80%,var(--theme-accent,#8acb94) 20%)}
.bestiary-detail-card{display:block;height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--theme-accent,#8acb94) #111a16}
.bestiary-detail-heading{display:flex;align-items:center;gap:11px;width:100%}
.bestiary-detail-name{flex:1;min-width:0}
.bestiary-detail-heading h3{margin:0;font-size:calc(20px * var(--site-font-scale, 1));overflow-wrap:anywhere}
.bestiary-tags{display:grid;justify-items:end;gap:5px;flex:none;margin-left:auto}
.bestiary-tags span{padding:4px 8px;border:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 48%,#ffffff1a);border-radius:14px;background:color-mix(in srgb,#111a16 70%,var(--theme-accent,#8acb94) 30%);color:#f0eee7;font-size:calc(9px * var(--site-font-scale, 1));white-space:nowrap}
.bestiary-features-scroll{overflow:visible;min-height:0}
.bestiary-features-scroll h4{position:static;background:transparent}
.bestiary-entry-icon,.bestiary-portrait{border-color:color-mix(in srgb,var(--theme-accent,#8acb94) 72%,#ffffff28);background:color-mix(in srgb,#101a16 68%,var(--theme-accent,#8acb94) 32%);color:color-mix(in srgb,#ffffff 80%,var(--theme-accent,#8acb94) 20%)}
.bestiary-entry.selected{border-color:var(--theme-accent,#8acb94);background:color-mix(in srgb,#1b2b22 72%,var(--theme-accent,#8acb94) 28%)}
.bestiary-panel .bestiary-filters input:focus,.bestiary-panel .bestiary-filters select:focus{outline:1px solid var(--theme-accent,#8acb94);border-color:var(--theme-accent,#8acb94)}
body[data-theme] .nav-tab.active:after{background:var(--theme-accent);box-shadow:0 0 11px color-mix(in srgb,var(--theme-accent) 70%,transparent)}
body[data-theme] .nav-tab span,body[data-theme] .nav-action span{color:var(--theme-accent)}
body[data-theme] .difficulty-pill,body[data-theme] .premade-button,body[data-theme] .add-adversary{border-color:color-mix(in srgb,var(--theme-accent) 62%,#ffffff28)}
body[data-theme] .difficulty-dot,body[data-theme] .live-dot{background:var(--theme-accent);box-shadow:0 0 9px color-mix(in srgb,var(--theme-accent) 75%,transparent)}
body[data-theme] .add-adversary{background:color-mix(in srgb,#16301f 55%,var(--theme-accent) 45%)}
body[data-theme] .roll-link,body[data-theme] .inline-roll{border-color:color-mix(in srgb,var(--theme-accent) 55%,#ffffff20);background:color-mix(in srgb,#172019 68%,var(--theme-accent) 32%);color:color-mix(in srgb,#ffffff 78%,var(--theme-accent) 22%)}
body[data-theme] .dice-global-button{border-color:var(--theme-accent);color:color-mix(in srgb,#ffffff 75%,var(--theme-accent) 25%)}
.dice-picker{width:min(420px,calc(100vw - 24px));padding:18px;background:color-mix(in srgb,#111a18 76%,var(--theme-accent,#8acb94) 24%);border-color:color-mix(in srgb,var(--theme-accent,#8acb94) 70%,#ffffff25)}
.dice-picker header{margin-bottom:14px;font-size:calc(15px * var(--site-font-scale, 1))}
.dice-picker-dice{gap:8px}
.dice-picker-dice button{height:46px;border-color:color-mix(in srgb,var(--theme-accent,#8acb94) 72%,#ffffff20);background:color-mix(in srgb,#19271f 65%,var(--theme-accent,#8acb94) 35%);color:#fff;font-size:calc(14px * var(--site-font-scale, 1))}
.dice-picker-dice button.selected{background:var(--theme-accent,#8acb94);border-color:var(--theme-accent,#8acb94);color:#101714}
.dice-picker form{gap:10px;margin-top:13px}
.dice-picker input,.dice-picker form .confirm{height:42px}
.dice-picker form .confirm{padding:0 16px;border-color:var(--theme-accent,#8acb94);background:color-mix(in srgb,#193220 55%,var(--theme-accent,#8acb94) 45%);color:#fff;font-size:calc(11px * var(--site-font-scale, 1))}
body[data-theme] .scene-caption .live-dot{background:var(--theme-accent);box-shadow:0 0 8px var(--theme-accent)}
@media(max-width:900px){.bestiary-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){.bestiary-list{grid-template-columns:repeat(2,minmax(0,1fr))}.dice-picker{right:12px;width:calc(100vw - 24px);padding:14px}.dice-picker-dice{gap:5px}.dice-picker-dice button{height:40px;font-size:calc(12px * var(--site-font-scale, 1))}}
@media(max-width:820px){.active-panel.gm-panel{max-width:none;margin-top:100px}.gm-summary{grid-template-columns:1fr}.dice-global-button{right:14px;bottom:14px}.dice-roll-overlay{right:14px;bottom:70px}}
@media(max-width:520px){.gm-toolbar{align-items:flex-start;flex-direction:column}.gm-card-grid{grid-template-columns:1fr}.gm-table-head-inputs{grid-template-columns:1fr}.dice-roll-overlay{right:10px;bottom:70px;width:calc(100vw - 20px)}.dice-canvas-host{height:190px}.toast.roll-toast{left:10px;bottom:10px}}

/* Последние настройки темы, групп врагов и истории бросков */
body[data-theme] .wordmark,body[data-theme] .wordmark i{color:color-mix(in srgb,#fff 72%,var(--theme-accent) 28%)}
body[data-theme] .mark{border-color:color-mix(in srgb,var(--theme-accent) 68%,#ffffff35);color:var(--theme-accent)}
body[data-theme] .active-panel{background:color-mix(in srgb,#0d1516 86%,var(--theme-accent) 14%);border-color:color-mix(in srgb,var(--theme-accent) 42%,#ffffff20)}
body[data-theme] .active-panel .content-card{background:color-mix(in srgb,#172021 88%,var(--theme-accent) 12%);border-color:color-mix(in srgb,var(--theme-accent) 25%,#ffffff22)}
body[data-theme] .active-panel .confirm,body[data-theme] .active-panel .soft-button,body[data-theme] .active-panel .choice{border-color:color-mix(in srgb,var(--theme-accent) 64%,#ffffff28)}
body[data-theme] .active-panel .confirm{background:color-mix(in srgb,#183025 70%,var(--theme-accent) 30%)}
body[data-theme] .bestiary-entry{background:color-mix(in srgb,#161d20 92%,var(--theme-accent) 8%);border-color:#ffffff22}
body[data-theme] .bestiary-entry:hover{transform:translateY(-1px);border-color:var(--theme-accent);background:color-mix(in srgb,#1a2225 84%,var(--theme-accent) 16%)}
body[data-theme] .bestiary-entry.selected{border-color:var(--theme-accent);background:color-mix(in srgb,#1b2427 78%,var(--theme-accent) 22%)}
body[data-theme] .bestiary-entry-icon,body[data-theme] .bestiary-portrait{background:color-mix(in srgb,#151b20 70%,var(--theme-accent) 30%);border-color:color-mix(in srgb,var(--theme-accent) 74%,#ffffff28);color:color-mix(in srgb,#fff 76%,var(--theme-accent) 24%)}
body[data-theme] .bestiary-detail,body[data-theme] .bestiary-detail-card{background:color-mix(in srgb,#101719 84%,var(--theme-accent) 16%)}
body[data-theme] .bestiary-tags span{background:color-mix(in srgb,#12181b 70%,var(--theme-accent) 30%)}
.member-title{padding-bottom:10px;border-bottom:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 38%,#ffffff24);margin-bottom:4px}
.member-unit-list{display:grid;gap:9px;margin:10px 0}
.member-unit-block{padding:9px 10px;border:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 30%,#ffffff22);border-radius:6px;background:color-mix(in srgb,#111a19 88%,var(--theme-accent,#8acb94) 12%)}
.member-unit-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:6px;border-bottom:1px solid #ffffff18;color:#edf0e8;font-size:calc(12px * var(--site-font-scale, 1))}
.unit-remove{width:24px;height:24px;border:1px solid #ffffff22;border-radius:4px;background:#ffffff08;color:#dce5dd}
.member-unit-block .member-stats{margin:7px 0 4px}
.member-unit-block .member-resources{margin-top:4px}
.member-unit-block .condition-actions{margin-top:8px}
.group-count{display:inline-block;margin-left:6px;padding:2px 6px;border:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 45%,#ffffff24);border-radius:12px;color:var(--theme-accent,#8acb94);font-size:calc(11px * var(--site-font-scale, 1));vertical-align:2px}
.member-card-mini .mini-stats{max-height:96px;overflow:auto}
.member-card.member-card-mini{align-self:start;height:fit-content;min-height:70px}
.member-unit-block{transition:opacity .18s ease}
.member-unit-block.status-hidden{opacity:.62}
.member-title-identity,.mini-identity{display:flex;align-items:center;gap:10px;min-width:0}
.member-title-identity>div,.mini-identity>div{min-width:0}
.member-avatar,.enemy-card-avatar{position:relative;display:grid;place-items:center;flex:none;width:38px;height:38px;overflow:hidden;border:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 64%,#ffffff28);border-radius:7px;background:color-mix(in srgb,#151b20 70%,var(--theme-accent,#8acb94) 30%);color:#f0eee8;font-weight:700}
.enemy-card-avatar{float:right;width:48px;height:48px;margin:-3px 0 8px 8px;border-radius:8px}
.enemy-portrait-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.enemy-portrait-image+span{position:relative;z-index:0}
.portrait-trigger{cursor:zoom-in;isolation:isolate}
.portrait-trigger.has-portrait>.enemy-portrait-image{z-index:2}
.portrait-trigger.has-portrait>span{display:none}
.portrait-viewer{box-sizing:border-box;position:fixed;width:max-content;max-width:94vw;max-height:90vh;margin:auto;padding:10px;border:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 70%,#ffffff30);border-radius:14px;background:color-mix(in srgb,#101719 88%,var(--theme-accent,#8acb94) 12%);box-shadow:0 18px 70px #000b;overflow:hidden}
.portrait-viewer::backdrop{background:#030706d9;backdrop-filter:blur(5px)}
.portrait-viewer-toolbar{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:38px;padding:0 2px 8px;color:var(--text-primary,#f4f2eb);font-size:calc(13px * var(--site-font-scale, 1));font-weight:700}
.portrait-viewer-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.portrait-viewer-close{position:static;flex:none;width:32px;height:32px;border:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 68%,#ffffff30);border-radius:50%;background:#101719;color:#fff;font-size:calc(22px * var(--site-font-scale, 1));line-height:1;cursor:pointer}
.portrait-viewer-stage{display:grid;place-items:center;box-sizing:border-box;max-width:calc(94vw - 22px);max-height:calc(90vh - 62px);min-width:0;overflow:hidden}
.portrait-viewer-image{display:block;max-width:min(calc(94vw - 22px),860px);max-height:calc(90vh - 62px);border-radius:8px;object-fit:contain}
@media(max-width:700px){.portrait-viewer{width:min(94vw,600px)}}
.bestiary-entry-icon,.bestiary-portrait{position:relative;overflow:hidden}
.bestiary-entry-icon .enemy-portrait-image,.bestiary-portrait .enemy-portrait-image{z-index:1}

/* Workspace polish: compact themed overlays and immediate scene controls. */
.stage-tools{top:132px}
.active-panel.bestiary-panel.open{inset:120px 14px 12px;height:calc(100vh - 132px);width:auto;max-width:none;border:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 48%,#ffffff22);border-radius:14px}
body[data-theme] .modal{border-color:color-mix(in srgb,var(--theme-accent) 58%,#ffffff28);background:color-mix(in srgb,#101a17 86%,var(--theme-accent) 14%)}
body[data-theme] .modal input,body[data-theme] .modal textarea,body[data-theme] .modal select{border-color:color-mix(in srgb,var(--theme-accent) 42%,#ffffff25)}
body[data-theme] .modal input:focus,body[data-theme] .modal textarea:focus,body[data-theme] .modal select:focus{outline:1px solid var(--theme-accent);border-color:var(--theme-accent)}
body[data-theme] .modal-actions .confirm,body[data-theme] .modal .choice:hover,body[data-theme] .modal .choice.selected{border-color:color-mix(in srgb,var(--theme-accent) 76%,#ffffff28);background:color-mix(in srgb,#183025 62%,var(--theme-accent) 38%)}
body[data-theme] .active-panel .soft-button,body[data-theme] .active-panel .catalog-actions .soft-button{background:color-mix(in srgb,#183025 68%,var(--theme-accent) 32%);color:#fff}
@media(max-width:820px){.stage-tools{top:150px}.active-panel.bestiary-panel.open{inset:110px 10px 10px;height:calc(100vh - 120px);border-radius:12px}}
@media(max-width:520px){.stage-tools{top:150px}.active-panel.bestiary-panel.open{inset:110px 7px 8px;height:calc(100vh - 118px);padding:12px 10px 16px;border-radius:11px}}

/* Keep the light theme readable on both the pale navigation and dark work surfaces. */
body[data-theme="light"]{--ink:#f4f1e8;color:#f4f1e8}
body[data-theme="light"] .topbar,body[data-theme="light"] .tool-nav,body[data-theme="light"] .stage-strip{color:#1c281e}
body[data-theme="light"] .nav-tab,body[data-theme="light"] .nav-action,body[data-theme="light"] .utility-button,body[data-theme="light"] .stage-chip,body[data-theme="light"] .stage-add,body[data-theme="light"] .stage-rename{color:#243126}
body[data-theme="light"] .nav-tab span,body[data-theme="light"] .nav-action span{color:#58755d}
body[data-theme="light"] .nav-tab.active{color:#111d15}
body[data-theme="light"] .nav-tab.active:after{background:#69896e;box-shadow:none}
body[data-theme="light"] .utility-button,body[data-theme="light"] .stage-chip,body[data-theme="light"] .stage-add,body[data-theme="light"] .stage-rename{border-color:#9aaa98;background:#f0f3ec}
body[data-theme="light"] .stage-chip.active{border-color:#69896e;background:#dce8da;color:#18251b;box-shadow:inset 0 -2px #69896e}
body[data-theme="light"] .active-panel,body[data-theme="light"] .member-card,body[data-theme="light"] .modal,body[data-theme="light"] .dropdown,body[data-theme="light"] .dice-picker,body[data-theme="light"] .fear-tracker{--ink:#f4f1e8;color:#f4f1e8}
body[data-theme="light"] .active-panel h2,body[data-theme="light"] .active-panel h3,body[data-theme="light"] .active-panel h4,body[data-theme="light"] .member-card h3,body[data-theme="light"] .modal h2,body[data-theme="light"] .modal .choice,body[data-theme="light"] .dice-picker header{color:#f4f1e8}
body[data-theme="light"] .active-panel .content-card,body[data-theme="light"] .active-panel .bestiary-detail,body[data-theme="light"] .active-panel .bestiary-detail-card{--ink:#f4f1e8;color:#e2e9e1}
body[data-theme="light"] .active-panel .content-card h3,body[data-theme="light"] .active-panel .content-card b,body[data-theme="light"] .active-panel .gm-table th{color:#f4f1e8}
body[data-theme="light"] .active-panel .content-card p,body[data-theme="light"] .active-panel .content-card small,body[data-theme="light"] .active-panel .bestiary-description,body[data-theme="light"] .active-panel .enemy-feature p{color:#c0cbc0}
body[data-theme="light"] .active-panel .bestiary-entry{color:#f4f1e8}
body[data-theme="light"] .active-panel .bestiary-entry-copy small,body[data-theme="light"] .active-panel .bestiary-entry-tier{color:#c0cbc0}
body[data-theme="light"] .active-panel input,body[data-theme="light"] .active-panel textarea,body[data-theme="light"] .active-panel select,body[data-theme="light"] .modal input,body[data-theme="light"] .modal textarea,body[data-theme="light"] .modal select{color:#f4f1e8;background:#101719}
body[data-theme="light"] .dice-picker form label{color:#d4ddd3}
body[data-theme="light"] .scene-caption{color:#edf2e9}
body[data-theme="light"] .dropdown button{color:#e6ede4}
body[data-theme="light"] .wordmark>span:last-child,body[data-theme="light"] .wordmark>span:last-child i{color:#1c281e}
body[data-theme="light"] .stage-strip .eyebrow{color:#405647}
body[data-theme="light"] #stageList .stage-chip small{color:#526550}
.stage-chip-wrap{display:inline-flex;align-items:center;gap:2px}.stage-chip-wrap .stage-chip{border-top-right-radius:0;border-bottom-right-radius:0}.stage-delete{width:21px;height:30px;padding:0;border:1px solid #ffffff27;border-left:0;border-radius:0 4px 4px 0;background:#14231caa;color:#c9d8ca;font-size:calc(15px * var(--site-font-scale, 1));line-height:1;cursor:pointer}.stage-delete:hover{border-color:#c98578;color:#ffd7ce;background:#4b2925}.stage-chip-wrap:has(.stage-chip.active) .stage-delete{border-color:#91c49e}body[data-theme="light"] .stage-delete{border-color:#9aaa98;background:#f0f3ec;color:#243126}body[data-theme="light"] .stage-chip-wrap:has(.stage-chip.active) .stage-delete{border-color:#69896e}
.member-scroll-content{scroll-behavior:smooth;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
.member-avatar .enemy-portrait-image,.enemy-card-avatar .enemy-portrait-image{transform:translateZ(0);backface-visibility:hidden;will-change:transform}
.active-panel button,.modal button,.stage-strip button{box-shadow:none!important}
.enemy-card:hover,.enemy-card:focus-visible{transform:translateY(-2px) scale(1.005);box-shadow:none}
.item-attribute-filters{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));padding-top:2px}
.bestiary-panel .bestiary-controls{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(340px,1fr);gap:14px;align-items:end;flex:none}
.bestiary-panel .bestiary-search,.bestiary-panel .bestiary-filter-side label{display:grid;gap:5px;color:#b8c8b8;font-size:calc(10px * var(--site-font-scale, 1))}
.bestiary-panel .bestiary-filter-side{display:grid;grid-template-columns:140px minmax(0,1fr);gap:12px;min-width:0}
.bestiary-panel .bestiary-search input,.bestiary-panel .bestiary-filter-side select{width:100%;height:37px;padding:0 10px;border:1px solid #ffffff25;border-radius:5px;background:#111c18;color:#edf3e9}
.bestiary-panel .bestiary-layout{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(340px,1fr);gap:14px;flex:1;min-height:0}
.bestiary-sidebar{display:flex;flex-direction:column;min-width:0;min-height:0}.bestiary-sidebar .bestiary-count{margin:8px 0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bestiary-sidebar .bestiary-list{flex:1;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(66px,auto)}
.bestiary-panel .bestiary-detail{min-height:0;height:100%}
@media(max-width:900px){.bestiary-panel .bestiary-controls{grid-template-columns:minmax(0,1fr);gap:8px}.bestiary-panel .bestiary-filter-side{grid-template-columns:1fr 1fr}.bestiary-panel .bestiary-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(190px,38%) minmax(280px,1fr)}.bestiary-sidebar{overflow:hidden}.bestiary-sidebar .bestiary-count{white-space:normal}.bestiary-sidebar .bestiary-list{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}}
@media(max-width:520px){.bestiary-panel .bestiary-controls{gap:7px}.bestiary-panel .bestiary-filter-side{gap:6px}.bestiary-panel .bestiary-search input,.bestiary-panel .bestiary-filter-side select{height:34px;padding:0 6px;font-size:calc(10px * var(--site-font-scale, 1))}.bestiary-sidebar .bestiary-list{grid-template-columns:repeat(auto-fill,minmax(135px,1fr));grid-auto-rows:minmax(55px,auto)}}
.stage-tools{top:118px;left:24px;right:24px}
.member-card:not(.member-card-mini){max-height:calc(100vh - 255px)}
.member-layer[data-card-size]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:14px;width:auto;max-width:none;margin:56px 24px 180px;padding:0}
.member-column{display:flex;flex-direction:column;gap:14px;min-width:0}
.member-column>.member-card{width:100%;min-width:0;box-sizing:border-box}
@media(max-width:900px){.member-layer[data-card-size]{grid-template-columns:repeat(2,minmax(0,1fr));margin:56px 16px 160px;padding:0}.stage-tools{top:150px;left:16px;right:16px;flex-wrap:wrap}.member-card:not(.member-card-mini){max-height:calc(100vh - 285px)}}
@media(max-width:520px){.member-layer[data-card-size]{grid-template-columns:minmax(0,1fr);margin:48px 10px 150px}.stage-tools{top:150px;left:10px;right:10px}.member-card:not(.member-card-mini){max-height:calc(100vh - 300px)}}
.member-resources{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.member-resources .track-line{flex-wrap:wrap;gap:6px}
.member-resources .health-pips,.member-resources .stress-pips{flex:1 1 auto;min-width:0}
.member-resources .track-value{flex:0 0 auto}
.theme-divider{width:100%;border:0;border-top:1px solid #ffffff24;margin:8px 0 0}
.theme-section-title{margin:0;font:700 calc(14px * var(--site-font-scale, 1)) Manrope,sans-serif;color:var(--ink)}
.theme-art-toggle{display:flex!important;align-items:center;gap:8px!important}
.theme-art-toggle input{width:16px!important;accent-color:var(--theme-accent,#8acb94)}
.roll-history-list{display:grid;gap:9px;max-height:65vh;overflow:auto;padding:2px 4px}
.roll-history-item>header{display:flex;align-items:center;justify-content:space-between;gap:14px}
.roll-history-item>header h3{margin:3px 0 0}
.roll-history-item>header>strong{color:var(--theme-accent,#8acb94);font:700 calc(26px * var(--site-font-scale, 1)) Manrope,sans-serif}
.roll-history-item p{margin:7px 0 3px;color:#e6eae1;font-weight:700}
.roll-history-item time{color:#9eaca1;font-size:calc(10px * var(--site-font-scale, 1))}
body[data-theme] .history-action span{color:var(--theme-accent)}
@media(max-width:820px){.history-action{padding-inline:10px}}

/* Follow-up encounter and GM workspace refinements */
.member-card:not(.member-card-mini),.member-scroll-content{overscroll-behavior-y:contain;touch-action:pan-y}
.member-resources .track-line{justify-content:flex-start;gap:4px;flex-wrap:wrap}
.member-resources .health-pips,.member-resources .stress-pips{flex:0 0 auto;min-width:0}
.member-resources .track-value{min-width:0;margin-left:2px}
.bestiary-panel .bestiary-controls{grid-template-columns:minmax(250px,1.15fr) minmax(380px,1fr);gap:16px}
.bestiary-panel .bestiary-detail{min-height:420px}
.gm-summary-stack{display:grid;gap:12px}
.gm-summary-stack>section{padding-bottom:10px;border-bottom:1px solid #ffffff1b}
.gm-summary-stack>section:last-child{padding-bottom:0;border-bottom:0}
.gm-summary-stack small{color:#a9c3a8;font-size:calc(9px * var(--site-font-scale, 1));letter-spacing:.1em}
.gm-summary-stack h3{margin:3px 0;font-size:calc(15px * var(--site-font-scale, 1))}
.gm-summary-stack p{margin:3px 0 0;color:#b9c5b8;font-size:calc(11px * var(--site-font-scale, 1))}
.gm-shortcuts{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px}
@media(max-width:900px){.bestiary-panel .bestiary-controls{grid-template-columns:minmax(0,1fr);gap:8px}.bestiary-panel .bestiary-detail{min-height:280px}}

.bestiary-panel .bestiary-controls{grid-template-columns:minmax(0,1fr)}
.bestiary-panel .bestiary-detail-column{display:grid;grid-template-rows:auto minmax(0,1fr);gap:10px;min-width:0;min-height:0}
.bestiary-panel .bestiary-detail-column .bestiary-filter-side{grid-template-columns:minmax(120px,.55fr) minmax(160px,1fr);justify-self:end;width:min(100%,440px)}
.bestiary-panel .bestiary-detail-column .bestiary-detail{min-height:0}
@media(max-width:900px){.bestiary-panel .bestiary-detail-column{grid-template-rows:auto minmax(280px,1fr)}.bestiary-panel .bestiary-detail-column .bestiary-filter-side{width:100%}}

/* Keep encounter cards scoped to their tab even when later layout rules use display:grid. */
#memberLayer:not(.members-on-page){display:none!important}

.member-resources .track-zero{flex:none;width:20px;height:20px;padding:0;border:1px solid #ffffff30;border-radius:4px;background:#14221b;color:#aebdad;font-size:calc(10px * var(--site-font-scale, 1));line-height:18px;cursor:pointer}.member-resources .track-zero:hover{border-color:var(--theme-accent,#8acb94);color:#fff}

/* Encounter resources, selected environment column, and critical-roll celebration. */
.member-resources{grid-template-columns:minmax(0,1fr);gap:6px}
.member-resources .track-line{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;justify-content:stretch;gap:4px;flex-wrap:initial}
.member-resources .health-pips,.member-resources .stress-pips{display:grid;grid-template-columns:repeat(6,13px);grid-auto-rows:13px;gap:3px;flex:none;width:max-content;min-width:0;margin:4px 0}
.member-resources .track-value{align-self:center;justify-self:end;min-width:38px;margin:0;text-align:right;white-space:nowrap}
.member-layer.has-environment{grid-template-columns:repeat(3,minmax(0,1fr))}
.scene-environment-column{min-width:0;align-self:start}
.scene-environment-card{position:sticky;top:10px;max-height:calc(100vh - 270px);overflow:auto;padding:15px;background:#0c1713e8;border:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 48%,#ffffff2b);border-radius:7px;backdrop-filter:blur(10px);box-shadow:0 12px 30px #0007}
.scene-environment-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:9px;padding-bottom:10px;border-bottom:1px solid #ffffff24}
.scene-environment-card>header>div{display:grid;gap:4px;min-width:0}.scene-environment-card h3{margin:0;font:700 calc(17px * var(--site-font-scale, 1)) Manrope,sans-serif;color:#f0f2ea}.scene-environment-card header small{color:#aebdad;font-size:calc(10px * var(--site-font-scale, 1))}.scene-environment-card>p,.scene-environment-card section p{font-size:calc(11px * var(--site-font-scale, 1));line-height:1.55;color:#c8d1c5}.scene-environment-card>section{padding:9px 0;border-top:1px solid #ffffff1a}.scene-environment-card>section>b{font-size:calc(11px * var(--site-font-scale, 1));color:#e9ecdf}.scene-environment-card details{padding-top:8px;border-top:1px solid #ffffff1a}.scene-environment-card summary{cursor:pointer;color:#e9ecdf;font-size:calc(11px * var(--site-font-scale, 1));font-weight:700}.scene-environment-card .catalog-feature{padding:8px 0;border-top:1px solid #ffffff18}.scene-environment-card .catalog-feature b{font-size:calc(11px * var(--site-font-scale, 1))}.scene-environment-card .catalog-feature p{margin:4px 0 0}
.critical-confetti{position:fixed;inset:0;z-index:120;overflow:hidden;pointer-events:none;visibility:hidden}.critical-confetti.active{visibility:visible}.critical-confetti i{position:absolute;left:50%;top:34%;width:var(--size);height:calc(var(--size)*1.5);border-radius:2px;background:var(--confetti-color);opacity:0;animation:critical-confetti-burst var(--duration) cubic-bezier(.13,.65,.32,1) var(--delay) forwards}.critical-confetti i.round{border-radius:50%}.critical-confetti.active i{opacity:1}@keyframes critical-confetti-burst{0%{transform:translate(0,0) rotate(0) scale(.5);opacity:1}100%{transform:translate(var(--dx),var(--dy)) rotate(var(--spin)) scale(1);opacity:0}}
@media(max-width:980px){.member-layer.has-environment{grid-template-columns:repeat(2,minmax(0,1fr))}.scene-environment-column{grid-column:1/-1}.scene-environment-card{position:relative;top:auto;max-height:min(48vh,420px)}}
@media(max-width:520px){.member-resources .health-pips,.member-resources .stress-pips{grid-template-columns:repeat(6,11px);grid-auto-rows:11px}.member-layer.has-environment{grid-template-columns:minmax(0,1fr)}.scene-environment-column{grid-column:auto}.scene-environment-card{max-height:45vh}}
@media(prefers-reduced-motion:reduce){.critical-confetti.active i{animation-duration:.01ms}}

.loot-roller{display:grid;gap:14px;padding:16px;margin-bottom:18px;border:1px solid #ffffff26;border-radius:8px;background:linear-gradient(135deg,#1a2c24,#17221e)}.loot-roller h3{margin:4px 0;font-size:calc(18px * var(--site-font-scale, 1))}.loot-roller p{margin:4px 0 0;color:#b9c5b8;font-size:calc(12px * var(--site-font-scale, 1))}.loot-roller-controls{display:flex;flex-wrap:wrap;align-items:end;gap:10px}.loot-roller-controls label{display:grid;gap:5px;min-width:140px;color:#b9c5b8;font-size:calc(11px * var(--site-font-scale, 1))}.loot-roller-controls select{min-height:36px;padding:7px 10px;border:1px solid #ffffff26;border-radius:5px;background:#111a16;color:#edf1e8}.loot-roll-result{display:grid;gap:11px;padding-top:13px;border-top:1px solid #ffffff20}.loot-roll-summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px}.loot-roll-summary b{font-size:calc(17px * var(--site-font-scale, 1));color:#f1f3ea}.loot-roll-summary span{font-size:calc(11px * var(--site-font-scale, 1));color:#b8c6b8}.loot-result-grid{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}.loot-result-card{display:flex;flex-direction:column;gap:7px}.loot-result-card h4{margin:0;font-size:calc(15px * var(--site-font-scale, 1))}.loot-result-card p{flex:1;line-height:1.5}.loot-result-card button{align-self:flex-start;margin-top:4px}
.member-scroll-content{scroll-behavior:auto!important;overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.duality-roll-button{display:flex;align-items:center;gap:11px;width:100%;margin-top:10px;padding:9px 11px;border:1px solid #ffffff29;border-radius:6px;background:#192720;color:#eff2e9;text-align:left;cursor:pointer}.duality-roll-button:hover{border-color:var(--theme-accent,#9bc59b);background:#21352a}.duality-roll-button>span:last-child{display:grid;gap:2px}.duality-roll-button small{color:#aebdad;font-size:calc(10px * var(--site-font-scale, 1))}.duality-die-icon{display:grid;place-items:center;width:38px;height:38px;flex:none;filter:drop-shadow(0 1px 2px #0009)}.duality-die-icon svg{display:block;width:100%;height:100%}.duality-die-icon .die-fear{fill:#9b70d1}.duality-die-icon .die-hope{fill:#e2c050}.duality-die-icon .die-edge{fill:none;stroke:#f2eee6;stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}
.loot-roller-controls{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(150px,1fr) minmax(170px,1.15fr) auto;align-items:end;gap:8px;padding:10px;border:1px solid #ffffff18;border-radius:7px;background:#101a16a8}.loot-roller-controls label{min-width:0;gap:4px;color:#aebbad;font-size:calc(9px * var(--site-font-scale, 1));font-weight:700;letter-spacing:.06em;text-transform:uppercase}.loot-roller-controls select{width:100%;min-height:34px;padding:6px 9px;font-size:calc(11px * var(--site-font-scale, 1));letter-spacing:0;text-transform:none}.loot-roll-actions{display:flex;align-items:center;gap:6px}.loot-roll-actions button{min-height:34px;padding:6px 10px;white-space:nowrap}.loot-roll-actions [data-roll-loot]{min-width:40px;font-size:calc(17px * var(--site-font-scale, 1))}.loot-roll-actions button:disabled{opacity:.45;cursor:not-allowed}.roll-history-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px;color:#aebdad;font-size:calc(11px * var(--site-font-scale, 1))}.roll-history-item [data-restore-loot-roll]{margin-top:0}.roll-history-item time{display:block;margin-top:8px}
@media(max-width:760px){.loot-roller-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.loot-roll-actions{grid-column:1/-1}.loot-roller-controls label:last-of-type{grid-column:1/-1}}
.dice-picker-dice button{display:grid;place-items:center}.dice-picker-dice button svg{display:block;width:29px;height:29px;filter:drop-shadow(0 1px 2px #0009)}.dice-picker-dice button .die-fill{fill:color-mix(in srgb,var(--theme-accent,#9bc59b) 72%,#e8eee4)}.dice-picker-dice button .die-facet{fill:none;stroke:#f2eee6;stroke-width:1.4;stroke-linejoin:round;stroke-linecap:round}
.loot-inventory{display:grid;gap:11px;padding-top:14px;border-top:1px solid #ffffff35}.loot-inventory>header{display:flex;align-items:center}.loot-inventory>header>div{display:grid;gap:3px}.loot-inventory>header b{font-size:calc(14px * var(--site-font-scale, 1))}.loot-owned-grid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.loot-owned-card{display:flex;flex-direction:column;gap:6px}.loot-owned-card h4{margin:0;font-size:calc(15px * var(--site-font-scale, 1))}.loot-owned-card p{flex:1;line-height:1.45}.loot-owned-card button{align-self:flex-start;margin-top:3px}
.loot-roll-actions .icon-button{display:grid;place-items:center;width:38px;padding:5px}.loot-roll-actions .icon-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.custom-loot-form{display:grid;gap:12px}.custom-loot-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.custom-loot-form fieldset{display:grid;gap:9px;margin:0;padding:12px;border:1px solid #ffffff24;border-radius:6px}.custom-loot-form legend{padding:0 6px;color:#c6d6c3;font-size:calc(11px * var(--site-font-scale, 1))}.custom-loot-form fieldset[hidden]{display:none}.custom-loot-form label{display:grid;gap:5px;color:#b9c5b8;font-size:calc(11px * var(--site-font-scale, 1))}.custom-loot-form input,.custom-loot-form select,.custom-loot-form textarea{width:100%;min-height:36px;padding:8px 10px;border:1px solid #ffffff26;border-radius:5px;background:#111a16;color:#edf1e8}.custom-loot-form textarea{resize:vertical}.item-attribute-filters:empty{display:none}
/* Structured bestiary editing and pip-only zero reset */
.member-resources .track-line{grid-template-columns:minmax(0,1fr) auto}
.member-resources .track-zero{display:none}
.bestiary-tags{grid-template-columns:auto;grid-auto-flow:row;justify-items:end;align-content:start}
.enemy-edit-button{display:grid;place-items:center;width:26px;height:26px;padding:0;border:1px solid color-mix(in srgb,var(--theme-accent,#8acb94) 52%,#ffffff20);border-radius:5px;background:#111a16;color:#f0eee7;font-size:calc(15px * var(--site-font-scale, 1));cursor:pointer}
.enemy-edit-button:hover,.enemy-edit-button:focus-visible{border-color:var(--theme-accent,#8acb94);background:#21352a}
.bestiary-name-row{display:flex;align-items:center;gap:8px;min-width:0}
.bestiary-name-row h3{min-width:0;overflow-wrap:anywhere}
.bestiary-name-row .enemy-edit-button{flex:none}
.dice-picker{z-index:80}
.loot-roller{border-color:color-mix(in srgb,var(--theme-accent,#c5a8f4) 42%,#ffffff22);background:linear-gradient(135deg,color-mix(in srgb,#11151e 84%,var(--theme-accent,#c5a8f4) 16%),color-mix(in srgb,#1b1b27 86%,var(--theme-accent,#c5a8f4) 14%))}
.loot-roller-controls{border-color:color-mix(in srgb,var(--theme-accent,#c5a8f4) 28%,#ffffff18);background:color-mix(in srgb,#10131b 82%,var(--theme-accent,#c5a8f4) 18%)}
.loot-roller-controls label{color:#c6c5d0}
.loot-roller-controls select{border-color:color-mix(in srgb,var(--theme-accent,#c5a8f4) 35%,#ffffff22);background:#13151e;color:#f1eff5}
.loot-roll-result,.loot-inventory{border-color:color-mix(in srgb,var(--theme-accent,#c5a8f4) 35%,#ffffff24)}
.loot-roller .content-card{background:color-mix(in srgb,#1b1b27 83%,var(--theme-accent,#c5a8f4) 17%);border-color:color-mix(in srgb,var(--theme-accent,#c5a8f4) 30%,#ffffff22)}
.loot-roller .confirm,.loot-roller .soft-button,.catalog-actions .confirm,.catalog-actions .soft-button{border-color:color-mix(in srgb,var(--theme-accent,#c5a8f4) 60%,#ffffff2a);background:color-mix(in srgb,#20202b 70%,var(--theme-accent,#c5a8f4) 30%);color:#f5f2fa}
.loot-roller .confirm:hover,.loot-roller .soft-button:hover,.catalog-actions .confirm:hover,.catalog-actions .soft-button:hover{background:color-mix(in srgb,#242330 50%,var(--theme-accent,#c5a8f4) 50%)}
.environment-card-actions{display:flex;align-items:center;gap:6px;margin-top:8px}
.environment-card-actions .soft-button{margin:0}
.environment-card-actions .icon-button{display:grid;place-items:center;width:34px;height:32px;padding:5px}
.environment-card-actions .icon-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.environment-card-actions .environment-remove-button{color:#e0c3cb}
.environment-card-actions .environment-remove-button:hover{border-color:#d8879e;background:color-mix(in srgb,#291922 65%,#9f536b 35%)}
.active-panel .soft-button,.active-panel .confirm,.modal .soft-button,.modal .confirm,.catalog-card button{transition:background-color .16s,border-color .16s,color .16s,transform .16s;}
.active-panel .soft-button:focus-visible,.active-panel .confirm:focus-visible,.modal .soft-button:focus-visible,.modal .confirm:focus-visible,.catalog-card button:focus-visible{outline:2px solid var(--theme-accent,#c5a8f4);outline-offset:2px}
body[data-theme] .loot-roller{border-color:color-mix(in srgb,var(--theme-accent) 42%,#ffffff22)}
body[data-theme] .loot-roller-controls{border-color:color-mix(in srgb,var(--theme-accent) 28%,#ffffff18)}
body[data-theme] .loot-roller-controls select{border-color:color-mix(in srgb,var(--theme-accent) 35%,#ffffff22)}
body[data-theme] .loot-roller .content-card{border-color:color-mix(in srgb,var(--theme-accent) 30%,#ffffff22)}
body[data-theme] .loot-roller .confirm,body[data-theme] .loot-roller .soft-button,body[data-theme] .catalog-actions .confirm,body[data-theme] .catalog-actions .soft-button{border-color:color-mix(in srgb,var(--theme-accent) 60%,#ffffff2a);background:color-mix(in srgb,#20202b 70%,var(--theme-accent) 30%);color:#f5f2fa}
body[data-theme] .enemy-edit-button{border-color:color-mix(in srgb,var(--theme-accent) 60%,#ffffff2a);background:color-mix(in srgb,#191923 65%,var(--theme-accent) 35%);color:#f5f2fa}
body[data-theme] .enemy-edit-button:hover,body[data-theme] .enemy-edit-button:focus-visible{background:color-mix(in srgb,#1d1b29 45%,var(--theme-accent) 55%)}
body[data-theme] .active-panel .content-card button,body[data-theme] .modal .soft-button,body[data-theme] .modal .confirm,body[data-theme] .catalog-card button{border-color:color-mix(in srgb,var(--theme-accent) 55%,#ffffff28);background:color-mix(in srgb,#20202b 72%,var(--theme-accent) 28%);color:#f5f2fa}
body[data-theme] .active-panel .content-card button:hover,body[data-theme] .modal .soft-button:hover,body[data-theme] .modal .confirm:hover,body[data-theme] .catalog-card button:hover{background:color-mix(in srgb,#242330 52%,var(--theme-accent) 48%)}
@media(max-width:520px){.environment-card-actions{flex-wrap:wrap}.environment-card-actions>[data-use-env]{flex:1}}
.modal:has(.enemy-editor-grid){width:min(900px,calc(100% - 24px));max-height:92vh}
.enemy-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.enemy-editor-grid fieldset{display:grid;align-content:start;gap:9px;min-width:0;margin:0;padding:12px;border:1px solid #ffffff27;border-radius:6px;background:#ffffff04}
.enemy-editor-grid legend{padding:0 6px;color:#d4e2d0;font-size:calc(11px * var(--site-font-scale, 1));font-weight:700}
.enemy-editor-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.enemy-editor-grid label{min-width:0}
.enemy-editor-grid textarea{min-height:54px}
.enemy-feature-editor{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,.55fr) 32px;gap:7px;align-items:end;padding:8px 0;border-bottom:1px solid #ffffff1c}
.enemy-feature-editor+.enemy-feature-editor{margin-top:5px}
.enemy-feature-editor .enemy-feature-text{grid-column:1/3}
.enemy-feature-remove{width:32px;height:34px;padding:0;font-size:calc(17px * var(--site-font-scale, 1))}
@media(max-width:620px){.enemy-editor-grid{grid-template-columns:1fr}.enemy-editor-fields{grid-template-columns:1fr 1fr}}
@media(max-width:420px){.enemy-editor-fields{grid-template-columns:1fr}.enemy-feature-editor{grid-template-columns:minmax(0,1fr) 32px}.enemy-feature-editor label:nth-child(2){grid-column:1}.enemy-feature-editor .enemy-feature-text{grid-column:1/-1}.enemy-feature-remove{grid-column:2;grid-row:1}}
/* Align bestiary filters, resource counts, and critical effects with their controls. */
.bestiary-panel .bestiary-controls{grid-template-columns:minmax(0,1.15fr) minmax(380px,1fr)}
.bestiary-panel .bestiary-controls .bestiary-filter-side{grid-template-columns:minmax(120px,.55fr) minmax(160px,1fr);width:100%;justify-self:stretch}
.bestiary-panel .bestiary-detail-column{display:block}
.member-resources .track-line{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:7px}
.member-resources .track-value{min-width:0;margin:0;text-align:left;white-space:nowrap}

/* Readable encounter cards and the new campaign/ability counters. */
.member-card:not(.member-card-mini) .member-scroll-content{font-size:calc(14px * var(--site-font-scale, 1))}
.member-card:not(.member-card-mini) .enemy-description{font-size:calc(14px * var(--site-font-scale, 1))!important;line-height:1.55}
.member-card:not(.member-card-mini) .enemy-meta,.member-card:not(.member-card-mini) .enemy-combat span{font-size:calc(13px * var(--site-font-scale, 1))}
.member-card:not(.member-card-mini) .enemy-feature p{font-size:calc(13px * var(--site-font-scale, 1));line-height:1.55}
.member-card:not(.member-card-mini) .enemy-feature header b{font-size:calc(14px * var(--site-font-scale, 1))}
.member-card:not(.member-card-mini) .member-title small,.member-card:not(.member-card-mini) .member-unit-block small{font-size:calc(11px * var(--site-font-scale, 1))}
.counter-section-title{margin:14px 0 8px;font:700 calc(16px * var(--site-font-scale, 1)) Manrope,sans-serif;color:var(--ink,#f0f2ea)}
.counter-divider{border:0;border-top:1px solid #ffffff24;margin:18px 0}
.dynamic-counter-toolbar{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}
.dynamic-counter-toolbar .empty-copy{max-width:520px;margin:4px 0 10px}
.dynamic-counter{padding:12px;margin:10px 0;border:1px solid #ffffff24;border-radius:7px;background:#101b17}
.dynamic-counter>header{display:flex;justify-content:space-between;align-items:center;font-size:calc(15px * var(--site-font-scale, 1))}
.dynamic-dice-list{display:grid;gap:7px;margin:10px 0}
.dynamic-die{display:grid;grid-template-columns:1fr 46px auto;align-items:center;gap:8px;padding:7px 9px;border:1px solid #ffffff1e;border-radius:6px;background:#ffffff08}
.die-owner{font-size:calc(13px * var(--site-font-scale, 1));color:#dce6db}.dynamic-die>strong{font-size:calc(18px * var(--site-font-scale, 1));text-align:center;color:#f4e5c9}
.dynamic-die>div{display:flex;gap:4px}.dynamic-die>div button{min-width:28px;height:28px;border:1px solid #ffffff2b;border-radius:5px;background:#203d2d;color:#f2f5ec;font-size:calc(16px * var(--site-font-scale, 1));cursor:pointer}.dynamic-die>div .die-remove{color:#f1a6a1}
.dynamic-advance{display:grid;grid-template-columns:1fr auto;align-items:end;gap:8px;margin:10px 0}.dynamic-advance label{font-size:calc(11px * var(--site-font-scale, 1))}.dynamic-advance select{width:100%;margin-top:4px}
.dynamic-counter-add-die{display:grid;grid-template-columns:minmax(120px,1fr) 75px 88px auto;gap:8px;align-items:center}.dynamic-counter-add-die input{min-width:0}
.ability-counters{display:grid;gap:6px;margin:7px 0}.ability-counter{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 7px;border:1px solid #ffffff1b;border-radius:5px;background:#ffffff08}.ability-counter>small{font-size:calc(11px * var(--site-font-scale, 1))!important;letter-spacing:0!important}.counter-pips{display:flex;gap:4px;flex-wrap:wrap}.counter-pips button{width:13px;height:13px;padding:0;border:1px solid #bda9e5;border-radius:3px;background:#191522;cursor:pointer}.counter-pips button.on{background:#c5a8f4}
.feature-countdown-config{grid-column:1/-1;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:8px}.feature-countdown-toggle{min-height:32px}.feature-countdown-toggle.active{border-color:var(--theme-accent,#b79ae5);background:color-mix(in srgb,#203d2d 58%,var(--theme-accent,#b79ae5) 42%)}.feature-countdown-settings{display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:8px}.feature-countdown-settings[hidden]{display:none}.feature-countdown-settings label{font-size:calc(11px * var(--site-font-scale, 1))}.enemy-feature-remove{grid-column:3;grid-row:1}@media(max-width:420px){.enemy-feature-remove{grid-column:2;grid-row:1}}
.global-countdown-nav{display:flex;align-items:center;gap:3px;width:fit-content;max-width:48%;min-width:0;margin-left:auto}.global-countdown-nav[hidden]{display:none}.global-countdown-nav>button{width:23px;height:27px;flex:none;padding:0;border:1px solid #ffffff2b;border-radius:5px;background:#101b17d9;color:#e9efe7;font-size:calc(18px * var(--site-font-scale, 1));line-height:1;cursor:pointer}.global-countdown-nav>button:hover{border-color:var(--theme-accent,#9fcca7)}.global-countdowns{display:flex;align-items:center;gap:3px;flex:0 1 auto;min-width:0;max-width:100%;overflow-x:auto;scrollbar-width:none;scroll-behavior:smooth}.global-countdowns::-webkit-scrollbar{display:none}.global-countdown{display:flex;flex:none;align-items:center;gap:5px;padding:3px 5px;border:1px solid #ffffff25;border-radius:6px;background:#101b17cc}.global-countdown-name{display:block;max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e7eee4;font-size:calc(9px * var(--site-font-scale, 1));font-weight:650}.global-countdown-pips{display:flex;gap:2px}.global-countdown-pips button{width:9px;height:9px;flex:none;padding:0;border:1px solid color-mix(in srgb,var(--theme-accent,#9fcca7) 70%,#ffffff30);border-radius:50%;background:#0a1210;cursor:pointer}.global-countdown-pips button.on{background:var(--theme-accent,#9fcca7)}.global-countdown.done{opacity:.68}.global-countdown.done .global-countdown-name{text-decoration:line-through}
.dynamic-counter>header>div{display:grid;gap:3px}.dynamic-advancement-table{width:100%;margin:10px 0;border-collapse:collapse;font-size:calc(12px * var(--site-font-scale, 1))}.dynamic-advancement-table th,.dynamic-advancement-table td{padding:6px 7px;border-bottom:1px solid #ffffff20;text-align:center}.dynamic-advancement-table th:first-child,.dynamic-advancement-table td:first-child{text-align:left}.dynamic-advancement-table th{color:#b8c9b8;font-size:calc(10px * var(--site-font-scale, 1));letter-spacing:.04em}.dynamic-outcome-button{width:100%;padding:5px 7px;border:1px solid #ffffff1e;border-radius:5px;background:#ffffff08;color:#eef2e8;text-align:left;font-size:calc(11px * var(--site-font-scale, 1));cursor:pointer}.dynamic-outcome-button:hover{border-color:var(--theme-accent,#b99ce4);background:color-mix(in srgb,#ffffff08 55%,var(--theme-accent,#b99ce4) 45%)}.dynamic-counter-add-tools{margin-top:9px;color:#c6d5c6;font-size:calc(11px * var(--site-font-scale, 1))}.dynamic-counter-add-tools summary{width:fit-content;cursor:pointer;color:var(--theme-accent,#b99ce4)}.dynamic-counter-add-tools .dynamic-counter-add-die{margin-top:8px}
.dynamic-counter-toolbar>div:last-child{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.linked-countdown-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:8px;min-width:0}.linked-countdown{min-width:0;align-self:start;padding:7px;border:1px solid #ffffff1d;border-radius:6px;background:#ffffff05}.linked-countdown>b{font-size:calc(11px * var(--site-font-scale, 1));color:var(--theme-accent,#d8c083)}.dynamic-counter-pair,.dynamic-counter-pair>*{min-width:0;max-width:100%}.dynamic-counter-pair .dynamic-dice-list{margin:5px 0}.dynamic-counter-pair .dynamic-die{grid-template-columns:minmax(0,1fr) 28px auto;gap:3px;padding:4px}.dynamic-counter-pair .die-owner{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:calc(10px * var(--site-font-scale, 1))}.dynamic-counter-pair .dynamic-die>strong{font-size:calc(14px * var(--site-font-scale, 1))}.dynamic-counter-pair .dynamic-die>div button{min-width:22px;height:23px;font-size:calc(13px * var(--site-font-scale, 1))}.dynamic-counter-pair .dynamic-counter-add-die{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px}.dynamic-counter-pair .dynamic-counter-add-die input:first-child,.dynamic-counter-pair .dynamic-counter-add-die button{grid-column:1/-1}.dynamic-counter-pair .dynamic-counter-add-die input,.dynamic-counter-pair .dynamic-counter-add-die select,.dynamic-counter-pair .dynamic-counter-add-die button{min-width:0;padding:6px;font-size:calc(10px * var(--site-font-scale, 1))}.dynamic-counter-pair .dynamic-advancement-table{table-layout:fixed}.modal-body,.dynamic-counter{min-width:0}.modal-body{overflow-x:hidden}.dynamic-advancement-table th:first-child{width:44%}
@media(max-width:820px){.stage-separator{display:none}.stage-tools{justify-content:flex-start}.global-countdown-nav{order:10;width:100%;max-width:none;margin:2px 0 0}.global-countdown-nav>button{height:27px}}
@media(max-width:520px){.global-countdown-name{max-width:74px}.dynamic-advancement-table th,.dynamic-advancement-table td{padding:5px 4px;font-size:calc(10px * var(--site-font-scale, 1))}.dynamic-outcome-button{font-size:calc(10px * var(--site-font-scale, 1));padding:5px 4px}}
@media(max-width:520px){.dynamic-counter-toolbar{flex-direction:column}.dynamic-counter-add-die{grid-template-columns:1fr 1fr}.dynamic-counter-add-die input:first-child{grid-column:1/-1}.dynamic-counter-add-die button{grid-column:1/-1}.dynamic-die{grid-template-columns:1fr 85px auto}}
@media(max-width:520px){.linked-countdown-list{grid-template-columns:1fr}.dynamic-counter-toolbar>div:last-child{justify-content:flex-start}}
.environment-personal-card{position:relative;padding-top:14px}.environment-personal-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-width:0;margin-bottom:9px}.environment-personal-heading>div{display:grid;gap:5px;min-width:0}.environment-personal-heading small{line-height:1.4}.environment-personal-heading h3{margin:0;font-size:calc(16px * var(--site-font-scale, 1));line-height:1.25}.environment-edit-button{position:static;display:grid;place-items:center;flex:none;width:26px;height:26px;padding:0;font-size:calc(13px * var(--site-font-scale, 1))}.scene-environment-actions{display:flex;align-items:center;gap:5px}.scene-environment-actions .icon-button{width:26px;height:26px;padding:0}.env-feature-countdown{grid-column:1/-1;display:grid;gap:7px;min-width:0}.env-feature-countdown .env-countdown-toggle{display:flex;align-items:center;gap:7px}.env-feature-countdown-settings{display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:8px}.env-feature-countdown-settings[hidden]{display:none}.env-feature-countdown-settings label{min-width:0}.environment-ability-counter{margin-top:7px;padding:5px 7px;border:1px solid #ffffff18;border-radius:5px;background:#ffffff06}.environment-ability-counter>small{font-size:calc(10px * var(--site-font-scale, 1))!important}
.campaign-countdown-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}.campaign-countdown-grid .countdown-item{grid-template-columns:minmax(0,1fr) auto;gap:6px;min-width:0;margin:0;padding:8px}.campaign-countdown-grid .countdown-item label{min-width:0;overflow:hidden}.campaign-countdown-grid .countdown-item label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.campaign-countdown-grid .countdown-item small{font-size:calc(10px * var(--site-font-scale, 1))}.campaign-countdown-grid .pip-row{grid-column:1/-1;justify-content:flex-end;gap:4px;margin-top:2px}.campaign-countdown-grid .pip-row button{width:16px;height:16px}
@media(max-width:520px){.campaign-countdown-grid{grid-template-columns:1fr}.environment-personal-heading h3{font-size:calc(15px * var(--site-font-scale, 1))}}
.toast.roll-toast{left:auto;right:20px;bottom:20px;transform:translate(12px,0)}
.toast.roll-toast.show{transform:translate(0,0)}
.critical-confetti{z-index:31}
.critical-confetti i{left:var(--origin-x,calc(100vw - 190px));top:var(--origin-y,calc(100vh - 42px))}
@media(max-width:900px){.bestiary-panel .bestiary-controls{grid-template-columns:minmax(0,1fr);gap:8px}.bestiary-panel .bestiary-controls .bestiary-filter-side{width:100%}}
@media(max-width:520px){.toast.roll-toast{left:auto;right:10px;bottom:10px;width:calc(100% - 82px);max-width:none;transform:translate(12px,0)}.toast.roll-toast.show{transform:translate(0,0)}}

/* Personal bestiary cards, readable descriptions, and left-side roll feedback. */
.bestiary-description{font-size:calc(13px * var(--site-font-scale, 1));line-height:1.5}
.bestiary-panel .bestiary-controls .bestiary-filter-side{grid-template-columns:minmax(100px,.55fr) minmax(140px,1fr) auto;align-items:end}
.add-personal-enemy{align-self:end;min-height:37px;padding:0 12px;white-space:nowrap}
.json-import-button{display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.json-example{max-width:100%;overflow:auto;padding:12px;border-radius:6px;background:#111a16;color:#dce8d8;font-size:calc(11px * var(--site-font-scale, 1));white-space:pre-wrap}
.toast.roll-toast{left:20px;right:auto;bottom:20px;transform:translate(-12px,0)}
.toast.roll-toast.show{transform:translate(0,0)}
.critical-confetti i{left:var(--origin-x,190px)}
@media(max-width:900px){.bestiary-panel .bestiary-controls .bestiary-filter-side{grid-template-columns:minmax(100px,.55fr) minmax(140px,1fr) auto}}
@media(max-width:620px){.bestiary-panel .bestiary-controls .bestiary-filter-side{grid-template-columns:1fr 1fr}.add-personal-enemy{grid-column:1/-1;width:100%}}
@media(max-width:520px){.toast.roll-toast{left:10px;right:auto;bottom:10px;width:calc(100% - 82px);max-width:none;transform:translate(-12px,0)}.toast.roll-toast.show{transform:translate(0,0)}}

/* Compact adversary descriptions and place personal-card actions in the catalog toolbar. */
.bestiary-description{margin:6px 0;font-size:calc(11px * var(--site-font-scale, 1));line-height:1.35;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.bestiary-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 0 10px}
.bestiary-toolbar .bestiary-count{min-width:0;line-height:1.5}
.bestiary-toolbar .add-personal-enemy{flex:none;min-height:36px;padding:0 13px;white-space:nowrap}
.enemy-editor-actions{flex-wrap:wrap}
.enemy-editor-actions .json-import-button{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:8px 13px;border:1px solid #ffffff2d;border-radius:4px;color:#e5ece2;font-size:calc(11px * var(--site-font-scale, 1));cursor:pointer}
@media(max-width:520px){.bestiary-toolbar{align-items:flex-start;flex-direction:column}.bestiary-toolbar .add-personal-enemy{width:100%}.enemy-editor-actions>*{flex:1 1 100%}.enemy-editor-actions .json-import-button{justify-content:center}}

/* Align the personal adversary action with both bestiary filters. */
.bestiary-panel .bestiary-controls{grid-template-columns:minmax(0,1.15fr) minmax(400px,1fr)}
.bestiary-panel .bestiary-controls .bestiary-filter-side{grid-template-columns:minmax(100px,.55fr) minmax(140px,1fr) auto;align-items:end;gap:8px}
.bestiary-panel .bestiary-controls .add-personal-enemy{height:37px;align-self:end;padding:0 12px;white-space:nowrap}
@media(max-width:900px){.bestiary-panel .bestiary-controls{grid-template-columns:minmax(0,1fr)}.bestiary-panel .bestiary-controls .bestiary-filter-side{grid-template-columns:minmax(100px,.55fr) minmax(140px,1fr) auto}}
@media(max-width:620px){.bestiary-panel .bestiary-controls .bestiary-filter-side{grid-template-columns:1fr 1fr}.bestiary-panel .bestiary-controls .add-personal-enemy{grid-column:1/-1;width:100%}}

/* Encounter workspaces sit directly below the stage action buttons. */
.active-panel.open:not(.bestiary-panel){margin-top:64px}
.active-panel.gm-panel{margin-top:64px}
.environment-editor{display:grid;gap:12px;margin:0;padding:12px;border:1px solid #ffffff24;border-radius:6px;min-width:0}
.environment-editor legend{padding:0 6px;color:#b7c5b7;font-size:calc(10px * var(--site-font-scale, 1));letter-spacing:.08em;text-transform:uppercase}
.environment-editor>label,.environment-editor .modal-row>label,.env-feature-editor label{display:grid;gap:5px;color:#afbdaf;font-size:calc(10px * var(--site-font-scale, 1))}
.environment-features{display:grid;gap:9px}
.environment-features>header,.imported-heroes>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.environment-features>header b,.imported-heroes h3{margin:0;font:600 calc(14px * var(--site-font-scale, 1)) Manrope,sans-serif;color:#edf0e8}
.env-feature-editor{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:9px;padding:10px;border:1px solid #ffffff20;border-radius:5px;background:#ffffff05}
.env-feature-editor label:first-child{grid-column:1/-1}
.env-feature-editor .soft-button{align-self:end}
.imported-heroes{display:grid;gap:10px;margin:16px 0;padding:13px;border:1px solid #ffffff24;border-radius:6px;background:#ffffff04}
.imported-heroes>header small{display:block;margin-top:4px;color:#aebbad;font-size:calc(10px * var(--site-font-scale, 1))}
.imported-hero-list{display:grid;gap:6px}
.imported-hero-list article{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border:1px solid #ffffff1c;border-radius:5px;background:#101a17}
.imported-hero-list article>div{display:grid;gap:3px;min-width:0}
.imported-hero-list article b{color:#edf0e8;font-size:calc(12px * var(--site-font-scale, 1))}
.imported-hero-list article small{color:#aebbad;font-size:calc(10px * var(--site-font-scale, 1))}
.roll-history-tabs{display:flex;gap:6px;margin:14px 0 10px;border-bottom:1px solid #ffffff24}
.roll-history-tabs button{display:flex;align-items:center;gap:7px;padding:8px 12px;border:0;border-bottom:2px solid transparent;background:transparent;color:#b5c3b5;font-size:calc(11px * var(--site-font-scale, 1));cursor:pointer}
.roll-history-tabs button.active{border-bottom-color:var(--theme-accent,#8acb94);color:#f0f2e9}
.roll-history-tabs small{padding:2px 6px;border-radius:10px;background:#ffffff12;color:#c4cfbf;font-size:calc(9px * var(--site-font-scale, 1))}
.roll-history-list>.empty-copy{margin:14px 0;font-size:calc(11px * var(--site-font-scale, 1))}
.active-panel.bestiary-panel.open{inset:132px 14px 12px;height:calc(100vh - 144px)}
@media(max-width:820px){.active-panel.open:not(.bestiary-panel),.active-panel.gm-panel{margin-top:56px}.active-panel.bestiary-panel.open{inset:120px 10px 10px;height:calc(100vh - 130px)}}
@media(max-width:620px){.env-feature-editor{grid-template-columns:1fr}.env-feature-editor label:first-child{grid-column:auto}.environment-features>header,.imported-heroes>header{align-items:flex-start}}
@media(max-width:520px){.active-panel.open:not(.bestiary-panel),.active-panel.gm-panel{margin-top:48px}.active-panel.bestiary-panel.open{inset:120px 7px 8px;height:calc(100vh - 128px)}}

body{font-size:calc(16px * var(--site-font-scale, 1))}

/* Match the global countdown to the encounter toolbar and keep its controls readable. */
.global-countdown-nav>button{width:30px;height:36px}
.global-countdown{height:36px;box-sizing:border-box;gap:8px;padding:0 10px;border-radius:5px}
.global-countdown-name{max-width:96px;font-size:calc(11px * var(--site-font-scale, 1))}
.global-countdown-pips{gap:3px}
.global-countdown-pips button{width:11px;height:11px}
.card-head-actions .card-settings{display:grid;place-items:center;width:27px;height:27px;padding:0;border:1px solid #ffffff24;border-radius:4px;background:#ffffff08;color:#dce7dc;font-size:calc(14px * var(--site-font-scale, 1));cursor:pointer}
.card-head-actions .card-settings:hover{border-color:var(--theme-accent,#9fcca7)}
.scene-environment-card{max-height:calc(100vh - 255px)}
@media(max-width:820px){.global-countdown-nav>button,.global-countdown{height:33px}}

/* Treat lines prefixed with "* " in descriptions as Word-style bullet paragraphs. */
.formatted-bullet{display:block;position:relative;padding-left:1.15em;margin:2px 0}
.formatted-intro{display:block}
.formatted-bullet::before{content:"•";position:absolute;left:0;font-weight:700}
.formatted-bullet strong em{font-weight:700;font-style:italic}

.global-countdown.alarm,.global-countdown.done.alarm{opacity:1;color:#fff0f0;background:#531b20;border-color:#ff5362;box-shadow:0 0 0 1px #ff536288,0 0 16px #ff334f99;animation:global-countdown-shake .12s linear infinite,global-countdown-flash .36s ease-in-out infinite alternate}
.global-countdown.alarm .global-countdown-name{color:#ffe1e4;text-decoration:none}
.global-countdown.alarm .global-countdown-pips button.on{background:#ff5362;border-color:#ff9ba4;box-shadow:0 0 7px #ff415c}
@keyframes global-countdown-shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-2px)}75%{transform:translateX(2px)}}
@keyframes global-countdown-flash{from{background:#3b171b}to{background:#79212b}}
@media(prefers-reduced-motion:reduce){.global-countdown.alarm,.global-countdown.done.alarm{animation:none}}
.dynamic-countdown-launch{order:12;flex:none;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid #ffffff32;border-radius:5px;background:#101b17d9;color:#e9efe7;font-size:calc(18px * var(--site-font-scale, 1));line-height:1;cursor:pointer;backdrop-filter:blur(9px)}
.dynamic-countdown-launch:hover{border-color:var(--theme-accent,#9fcca7);color:var(--theme-accent,#9fcca7)}
.dynamic-countdown-mini{width:min(490px,calc(100% - 24px));max-height:min(78vh,720px);padding:15px}
.dynamic-countdown-mini .modal-head{margin-bottom:10px;padding-bottom:9px}
.dynamic-countdown-mini .modal-head h2{font-size:calc(20px * var(--site-font-scale, 1))}
.dynamic-countdown-mini .modal-body{gap:7px}
.dynamic-countdown-mini .dynamic-counter{padding:9px;margin:0}
.dynamic-countdown-mini .dynamic-advancement-table{font-size:calc(10px * var(--site-font-scale, 1))}
.dynamic-countdown-mini .dynamic-outcome-button{font-size:calc(10px * var(--site-font-scale, 1));padding:4px}
@media(max-width:820px){.dynamic-countdown-launch{order:11;width:33px;height:33px}.dynamic-countdown-mini{width:min(490px,calc(100% - 16px));max-height:82vh;padding:12px}}
.scene-environment-card>header>.scene-environment-actions{display:flex;flex:none;align-items:center;gap:3px}
.scene-environment-actions .card-settings{display:grid;place-items:center;width:27px;height:27px;padding:0;border:1px solid #ffffff24;border-radius:4px;background:#ffffff08;color:#dce7dc;font-size:calc(14px * var(--site-font-scale, 1));cursor:pointer}
.scene-environment-actions .card-settings:hover,.scene-environment-actions .card-settings:focus-visible{border-color:var(--theme-accent,#9fcca7);background:#ffffff10}
.scene-environment-actions .panel-close{display:grid;place-items:center;flex:none;width:27px;height:27px;padding:0;line-height:1}
.dynamic-countdown-launch[hidden]{display:none}
.encounter-picker-screen[hidden],.scene[hidden]{display:none!important}
body.app-loading{visibility:hidden}
.encounter-picker-screen{position:relative;isolation:isolate;min-height:calc(100vh - 62px);overflow:hidden;padding:1px 28px 38px;background:#10120f;color:#eceadf}
.picker-backdrop{position:absolute;z-index:-1;inset:0;background:radial-gradient(ellipse at 73% 6%,color-mix(in srgb,var(--theme-accent,#c5d995) 14%,transparent),transparent 39%),linear-gradient(180deg,#10120fe8,#10120fef 63%,#10120f),var(--picker-theme-background,url('/themes/forest.png')) center 44%/cover;opacity:.96;pointer-events:none}
body[data-theme="forest"] .picker-backdrop{--picker-theme-background:url('/themes/forest.png')}body[data-theme="amethyst"] .picker-backdrop{--picker-theme-background:url('/themes/amethyst.png')}body[data-theme="ice"] .picker-backdrop{--picker-theme-background:url('/themes/ice.png')}body[data-theme="ember"] .picker-backdrop{--picker-theme-background:url('/themes/ember.png')}body[data-theme="light"] .picker-backdrop{--picker-theme-background:url('/themes/light.png')}body[data-theme="dark"] .picker-backdrop{--picker-theme-background:url('/themes/dark.png')}
.picker-hero,.picker-library,.picker-footnote{width:min(1140px,100%);margin-inline:auto}
.picker-hero{padding:72px 0 35px;border-bottom:1px solid color-mix(in srgb,var(--theme-accent,#c5d995) 25%,#ffffff18)}
.picker-eyebrow{display:flex;align-items:center;gap:8px;color:color-mix(in srgb,var(--theme-accent,#c5d995) 70%,#d4ae70);font:500 10px 'DM Mono',monospace;letter-spacing:.14em}
.picker-eyebrow>span{font-size:14px}
.picker-hero h1{margin:0 0 13px;color:#eee5d2;font:500 clamp(32px,5vw,52px)/1.1 Unbounded,Manrope,sans-serif;letter-spacing:-.06em}
.picker-hero>p{max-width:680px;margin:0;color:#b9b09e;font-size:15px;line-height:1.7}
.continue-encounter{display:flex;align-items:center;gap:13px;margin-top:24px;padding:12px 17px;border:1px solid color-mix(in srgb,var(--theme-accent,#c5d995) 60%,#ffffff28);border-radius:5px;background:#1d211add;color:#e9dfc9;text-align:left}
.continue-encounter[hidden]{display:none!important}.continue-icon{display:grid;place-items:center;width:35px;height:35px;border:1px solid color-mix(in srgb,var(--theme-accent,#c5d995) 55%,#ffffff22);border-radius:50%;color:var(--theme-accent,#c5d995);font-size:18px}
.continue-encounter>span:last-child{display:grid;gap:4px}.continue-encounter small{color:#a99a7d;font:9px 'DM Mono',monospace;letter-spacing:.1em}.continue-encounter b{font-size:13px;font-weight:600}
.picker-library{padding-top:27px}.picker-section-head{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:16px}.picker-section-head h2{margin:6px 0 0;color:#e8dcc3;font:500 23px Unbounded,Manrope,sans-serif;letter-spacing:-.04em}.picker-total{color:#9e947f;font:10px 'DM Mono',monospace;letter-spacing:.07em}
.picker-section-actions{display:flex;align-items:center;gap:14px}.create-encounter-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 17px;border:1px solid var(--theme-accent,#c5d995);border-radius:4px;background:color-mix(in srgb,var(--theme-accent,#c5d995) 11%,#151914);color:#eee4ce;font:600 13px Manrope,sans-serif;cursor:pointer;transition:background .16s,border-color .16s,transform .16s}.create-encounter-button:hover,.create-encounter-button:focus-visible{background:color-mix(in srgb,var(--theme-accent,#c5d995) 21%,#151914);transform:translateY(-1px);outline:2px solid color-mix(in srgb,var(--theme-accent,#c5d995) 38%,transparent);outline-offset:2px}.encounter-library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.encounter-library-empty{grid-column:1/-1;display:flex;min-height:260px;flex-direction:column;align-items:center;justify-content:center;padding:32px;text-align:center;border:1px dashed color-mix(in srgb,var(--theme-accent,#c5d995) 45%,#3f4038);border-radius:5px;background:linear-gradient(145deg,#151b18d9,#101512e8)}.empty-emblem{display:grid;width:44px;height:44px;place-items:center;border:1px solid color-mix(in srgb,var(--theme-accent,#c5d995) 65%,transparent);border-radius:50%;color:var(--theme-accent,#c5d995);font-size:20px}.encounter-library-empty h3{margin:15px 0 5px;color:#e8dcc3;font:500 18px Unbounded,Manrope,sans-serif}.encounter-library-empty p{max-width:430px;margin:0 0 20px;color:#aaa18e;font-size:14px;line-height:1.6}.encounter-library-card{display:flex;min-width:0;min-height:185px;flex-direction:column;align-items:stretch;padding:17px 18px;border:1px solid #51422c;border-radius:5px;background:linear-gradient(145deg,#262117f2,#171914f5);color:#e9dfc9;text-align:left;box-shadow:0 8px 23px #0004;cursor:pointer;transition:transform .17s,border-color .17s,background .17s}.encounter-library-card:hover,.encounter-library-card:focus-visible{transform:translateY(-3px);border-color:var(--theme-accent,#c5d995);outline:2px solid color-mix(in srgb,var(--theme-accent,#c5d995) 35%,transparent);outline-offset:2px}.encounter-library-card-top{display:flex;align-items:center;justify-content:space-between;color:#a89b82}.encounter-library-card-top time{font:10px 'DM Mono',monospace}.encounter-library-card-title{margin-top:21px;color:#eee3cf;font:500 19px Unbounded,Manrope,sans-serif;letter-spacing:-.035em;overflow-wrap:anywhere}.encounter-library-card-meta{margin-top:9px;color:#a99e8a;font-size:13px}.encounter-library-card-action{margin-top:auto;padding-top:16px;color:var(--theme-accent,#c5d995);font:10px 'DM Mono',monospace;letter-spacing:.08em;text-transform:uppercase}.new-encounter-name{display:grid;gap:8px;margin:18px 0;color:#c2b69f;font-size:13px}.new-encounter-name input{width:100%;min-height:44px;padding:10px 12px;border:1px solid #5a574e;border-radius:4px;background:#121714;color:#eee3cf;font:inherit}.new-encounter-name input:focus{outline:2px solid var(--theme-accent,#c5d995);outline-offset:1px}
.premade-encounter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.premade-encounter-card{display:flex;min-width:0;min-height:220px;flex-direction:column;align-items:stretch;padding:17px 18px;border:1px solid #51422c;border-radius:5px;background:linear-gradient(145deg,#262117f2,#171914f5);color:#e9dfc9;text-align:left;box-shadow:0 8px 23px #0004;transition:transform .17s,border-color .17s,background .17s;cursor:pointer}
.premade-encounter-card:hover,.premade-encounter-card:focus-visible{transform:translateY(-3px);border-color:var(--theme-accent,#c5d995);background:linear-gradient(145deg,#30281af5,#1b1b16f5);outline:2px solid color-mix(in srgb,var(--theme-accent,#c5d995) 40%,transparent);outline-offset:2px}
.picker-card-top,.picker-card-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px}.picker-card-glyph{display:grid;place-items:center;width:34px;height:34px;border:1px solid color-mix(in srgb,var(--theme-accent,#c5d995) 48%,#ffffff25);border-radius:3px;color:var(--theme-accent,#c5d995);font-size:17px}.picker-card-tier,.picker-card-bottom{color:#a89a7d;font:9px 'DM Mono',monospace;letter-spacing:.09em}.picker-card-title{margin:20px 0 8px;color:#f0e5cf;font:500 19px/1.3 Unbounded,Manrope,sans-serif;letter-spacing:-.045em;overflow-wrap:anywhere}.picker-card-summary{color:#b3aa98;font-size:12px;line-height:1.6}
.picker-card-bottom{margin-top:auto;padding-top:16px;border-top:1px solid #ffffff19}.picker-card-bottom b{color:color-mix(in srgb,var(--theme-accent,#c5d995) 74%,#d4ae70);font-weight:500}
.picker-footnote{margin-top:19px;color:#827b6d;font-size:11px;line-height:1.6}
body[data-page="home"] .dice-global-button{display:none}
body[data-theme="light"] .encounter-picker-screen{color:#302619;background:#e9eee8}
body[data-theme="light"] .picker-hero{border-color:#a2845744}body[data-theme="light"] .picker-hero h1,body[data-theme="light"] .picker-section-head h2{color:#302619}body[data-theme="light"] .picker-hero>p{color:#66553e}body[data-theme="light"] .picker-total,body[data-theme="light"] .picker-footnote{color:#76674f}
body[data-theme="light"] .create-encounter-button{color:#302619;background:#f3e8d4}body[data-theme="light"] .encounter-library-empty{border-color:#a2845780;background:#f7f0e4}body[data-theme="light"] .encounter-library-empty h3{color:#302619}body[data-theme="light"] .encounter-library-empty p{color:#66553e}body[data-theme="light"] .encounter-library-card{border-color:#a28457;background:linear-gradient(145deg,#f8f1e4f2,#e9decaeb);color:#403222}body[data-theme="light"] .encounter-library-card-title{color:#302619}body[data-theme="light"] .encounter-library-card-meta,body[data-theme="light"] .encounter-library-card-top{color:#66553e}body[data-theme="light"] .new-encounter-name{color:#66553e}body[data-theme="light"] .new-encounter-name input{background:#fffaf0;color:#302619}
body[data-theme="light"] .continue-encounter{background:#f1e6d2ed;color:#403222}body[data-theme="light"] .continue-encounter small{color:#755a32}
body[data-theme="light"] .premade-encounter-card{border-color:#a28457;background:linear-gradient(145deg,#f8f1e4f2,#e9decaeb);color:#403222;box-shadow:0 7px 20px #513c2018}body[data-theme="light"] .premade-encounter-card:hover,body[data-theme="light"] .premade-encounter-card:focus-visible{background:linear-gradient(145deg,#fff8ea,#eee2cd)}body[data-theme="light"] .picker-card-title{color:#302619}body[data-theme="light"] .picker-card-summary{color:#66553e}body[data-theme="light"] .picker-card-tier,body[data-theme="light"] .picker-card-bottom{color:#705c3c}body[data-theme="light"] .picker-card-bottom{border-color:#aa916b55}
body[data-theme="amethyst"] .premade-encounter-card{border-color:#705581}body[data-theme="ice"] .premade-encounter-card{border-color:#446a7a}body[data-theme="ember"] .premade-encounter-card{border-color:#76503c}body[data-theme="dark"] .premade-encounter-card{border-color:#405066}
body[data-theme="amethyst"] .encounter-library-card{border-color:#705581}body[data-theme="ice"] .encounter-library-card{border-color:#446a7a}body[data-theme="ember"] .encounter-library-card{border-color:#76503c}body[data-theme="dark"] .encounter-library-card{border-color:#405066}
.encounter-library-card{cursor:default}.encounter-library-card-top{justify-content:initial;gap:10px}.encounter-library-card-top time{margin-left:auto}.encounter-library-delete{display:grid;width:30px;height:30px;flex:none;place-items:center;border:1px solid #685542;border-radius:3px;background:#171914;color:#c7b89d;font-size:19px;line-height:1;cursor:pointer}.encounter-library-delete:hover,.encounter-library-delete:focus-visible{border-color:#dc7765;background:#3b211e;color:#ffe6df;outline:2px solid #dc776566;outline-offset:2px}.encounter-library-open{display:flex;min-width:0;flex:1;flex-direction:column;align-items:stretch;margin:0;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.encounter-library-open:focus-visible{outline:2px solid var(--theme-accent,#c5d995);outline-offset:4px}.encounter-library-card-title{margin-top:14px}.encounter-library-card-action{margin-top:auto}body[data-theme="light"] .encounter-library-delete{border-color:#a28457;background:#f3e8d4;color:#5b4731}body[data-theme="light"] .encounter-library-delete:hover,body[data-theme="light"] .encounter-library-delete:focus-visible{border-color:#a84a3b;background:#f5dfd9;color:#57251e}
body[data-theme="amethyst"] .encounter-library-delete{border-color:#705581}body[data-theme="ice"] .encounter-library-delete{border-color:#446a7a}body[data-theme="ember"] .encounter-library-delete{border-color:#76503c}body[data-theme="dark"] .encounter-library-delete{border-color:#405066}

@media(max-width:900px){.premade-encounter-grid,.encounter-library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.picker-hero{padding-top:55px}}
@media(max-width:580px){.encounter-picker-screen{padding:1px 16px 28px}.picker-hero{padding-top:43px}.picker-hero h1{font-size:33px}.picker-hero>p{font-size:13px}.picker-section-head{align-items:start;flex-direction:column;gap:12px}.picker-section-actions{width:100%;justify-content:space-between}.picker-section-head h2{font-size:20px}.premade-encounter-grid,.encounter-library-grid{grid-template-columns:1fr;gap:10px}.premade-encounter-card{min-height:190px}.encounter-library-empty{min-height:230px;padding:24px 18px}.continue-encounter{width:100%}}
/* Final interface polish: unify control rhythm, focus treatment, and motion across themes. */
:root{--control-radius:5px;--control-motion:160ms ease;--surface-motion:220ms ease}
button,a,input,select,textarea{ -webkit-tap-highlight-color:transparent }
button,.nav-tab,.nav-action,.profile-button,.stage-chip,.stage-add,.stage-rename,.utility-button,.difficulty-pill,.premade-button,.add-adversary,.soft-button,.confirm,.cancel,.choice,.theme-choice,.tabs-gm button,.roll-history-tabs button,.card-settings,.environment-edit-button,.panel-close,.modal-close,.global-countdown-nav>button,.global-countdown-pips button,.pip-row button,.counter-pips button,.encounter-library-delete,.create-encounter-button,.dynamic-countdown-launch,.dynamic-outcome-button{
  transition:background-color var(--control-motion),border-color var(--control-motion),color var(--control-motion),box-shadow var(--control-motion),transform var(--control-motion),opacity var(--control-motion)
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--theme-accent,#8acb94);outline-offset:2px}
button:disabled{cursor:not-allowed;opacity:.56}
.soft-button,.confirm,.cancel,.choice,.tabs-gm button,.gm-toolbar .confirm,.gm-template-card>.confirm{min-height:34px;border-radius:var(--control-radius)}
.soft-button:hover,.confirm:hover,.choice:hover,.tabs-gm button:hover,.gm-toolbar .confirm:hover,.gm-template-card>.confirm:hover{transform:translateY(-1px)}
.soft-button:active,.confirm:active,.choice:active,.tabs-gm button:active,.gm-toolbar .confirm:active,.gm-template-card>.confirm:active{transform:translateY(0)}
.card-head-actions .card-settings,.scene-environment-actions .card-settings,.environment-edit-button,.scene-environment-actions .panel-close{width:28px;height:28px;min-width:28px;border-radius:var(--control-radius)}
.stage-chip-wrap.is-active{gap:0}.stage-chip-wrap.is-active .stage-chip{border-top-right-radius:0;border-bottom-right-radius:0}.stage-chip-wrap.is-active .stage-rename{border-left:0;border-radius:0;padding:0 7px}.stage-chip-wrap.is-active:has(.stage-delete) .stage-rename{border-right:0}.stage-chip-wrap.is-active:not(:has(.stage-delete)) .stage-rename{border-top-right-radius:var(--control-radius);border-bottom-right-radius:var(--control-radius)}
.card-head-actions .card-settings:hover,.scene-environment-actions .card-settings:hover,.environment-edit-button:hover{background:color-mix(in srgb,var(--theme-accent,#8acb94) 16%,transparent);box-shadow:0 0 0 1px color-mix(in srgb,var(--theme-accent,#8acb94) 42%,transparent)}
.active-panel,.member-card,.scene-environment-card,.modal,.content-card,.loot-roller,.dynamic-counter{transition:border-color var(--surface-motion),box-shadow var(--surface-motion),background-color var(--surface-motion)}
.global-countdown-nav>button:hover,.dynamic-countdown-launch:hover{background:color-mix(in srgb,var(--theme-accent,#8acb94) 15%,#101b17);box-shadow:0 0 0 1px color-mix(in srgb,var(--theme-accent,#8acb94) 36%,transparent)}
.global-countdown-pips button:hover,.pip-row button:hover,.counter-pips button:hover{border-color:var(--theme-accent,#8acb94);box-shadow:0 0 0 2px color-mix(in srgb,var(--theme-accent,#8acb94) 20%,transparent)}
.roll-history-tabs button:hover{color:var(--theme-accent,#8acb94);background:color-mix(in srgb,var(--theme-accent,#8acb94) 8%,transparent)}
body[data-theme="light"] .soft-button,body[data-theme="light"] .active-panel .soft-button,body[data-theme="light"] .modal .soft-button{color:#26352b}
body[data-theme="light"] .soft-button:hover,body[data-theme="light"] .active-panel .soft-button:hover,body[data-theme="light"] .modal .soft-button:hover{background:color-mix(in srgb,var(--theme-accent,#69896e) 22%,#fff);color:#1b2b20}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

.player-quick-strip{position:relative;z-index:3;display:flex;align-items:center;gap:7px;min-height:40px;padding:5px 25px;overflow-x:auto;border-bottom:1px solid #ffffff1c;background:#0b1512b8;backdrop-filter:blur(10px);scrollbar-width:thin}.player-quick-strip[hidden]{display:none}.player-quick-chip{display:inline-flex;align-items:center;gap:9px;flex:none;min-height:28px;padding:4px 10px;border:1px solid #ffffff25;border-radius:5px;background:#14231caa;color:#e2e9df;font-size:calc(11px * var(--site-font-scale,1))}.player-quick-chip small{color:var(--theme-accent,#a6d2ad);font-size:calc(10px * var(--site-font-scale,1));white-space:nowrap}.bestiary-library-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}.bestiary-library-actions .soft-button{min-height:32px;padding:0 10px;white-space:nowrap}.bestiary-library-actions .compact-library-button{min-height:27px;padding:0 8px;font-size:calc(10px * var(--site-font-scale,1))}.bestiary-entry.bulk-selected{border-color:var(--theme-accent,#a6d2ad);box-shadow:inset 0 0 0 1px var(--theme-accent,#a6d2ad)}.bestiary-select-check{display:grid;place-items:center;position:absolute;z-index:2;left:6px;top:6px;width:19px;height:19px;border:1px solid var(--theme-accent,#a6d2ad);border-radius:4px;background:#101a17;color:#fff;font-weight:800}.hero-evasion-field{display:inline-flex!important;align-items:center;gap:7px;margin-top:6px;color:#aebbad;font-size:calc(10px * var(--site-font-scale,1))}.hero-evasion-field input{width:64px;height:27px;padding:3px 6px;border:1px solid #ffffff2c;border-radius:4px;background:#0b1512;color:#f1f3ea;font-size:calc(11px * var(--site-font-scale,1))}
@media(max-width:820px){.player-quick-strip{padding-inline:10px;min-height:36px}.bestiary-toolbar{align-items:flex-start;flex-direction:column}.bestiary-library-actions{justify-content:flex-start;width:100%}.bestiary-library-actions .soft-button{flex:1 1 auto}}
.bestiary-entry{position:relative}
body[data-theme] .player-quick-strip{background:color-mix(in srgb,var(--theme-accent,#a6d2ad) 5%,#0b1512e8);border-color:color-mix(in srgb,var(--theme-accent,#a6d2ad) 18%,#ffffff1c)}body[data-theme="light"] .player-quick-chip{background:#f7faf5;color:#233329;border-color:#8ba891}body[data-theme="light"] .hero-evasion-field input{background:#f7faf5;color:#233329;border-color:#9aab9d}
nav.tool-nav .player-quick-strip{flex:0 1 240px;min-width:0;max-width:24vw;min-height:0;padding:0 6px;overflow-x:auto;border:0;background:transparent;backdrop-filter:none;scrollbar-width:none}nav.tool-nav .player-quick-chip{min-height:27px;padding:3px 8px;gap:7px;font-size:calc(10px * var(--site-font-scale,1))}nav.tool-nav .player-quick-chip small{font-size:calc(9px * var(--site-font-scale,1))}.bestiary-library-actions{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(112px,1fr);flex:0 1 520px;min-width:0}.bestiary-library-actions .soft-button,.bestiary-library-actions .compact-library-button{width:100%;min-width:0;height:32px;min-height:32px;padding:0 7px;font-size:calc(10px * var(--site-font-scale,1));white-space:nowrap}
.bestiary-library-actions:not(.is-selecting){flex-basis:320px}.bestiary-library-actions.is-selecting{flex-basis:520px}@media(max-width:820px){.bestiary-library-actions:not(.is-selecting),.bestiary-library-actions.is-selecting{flex-basis:auto}}
.evasion-icon{display:inline-block;font-size:calc(12px * var(--site-font-scale,1));line-height:1;vertical-align:-1px}
nav.tool-nav .player-quick-strip::before{content:"";height:24px;flex:none;border-left:1px solid color-mix(in srgb,var(--theme-accent,#a6d2ad) 45%,#ffffff22);margin-right:2px}.player-quick-track{display:flex;align-items:center;gap:7px;min-width:0;max-width:100%;overflow-x:auto;scrollbar-width:none;scroll-behavior:smooth}.player-quick-track::-webkit-scrollbar{display:none}.player-strip-arrow{flex:none;display:grid;place-items:center;width:23px;height:27px;padding:0;border:1px solid #ffffff2b;border-radius:4px;background:#14231caa;color:#dbe7d9;font-size:calc(16px * var(--site-font-scale,1));line-height:1;cursor:pointer}.player-strip-arrow:hover{border-color:var(--theme-accent,#a6d2ad);background:color-mix(in srgb,var(--theme-accent,#a6d2ad) 18%,#14231c)}
nav.tool-nav .player-quick-chip{min-height:31px;padding:4px 9px;gap:8px;font-size:calc(12px * var(--site-font-scale,1))}nav.tool-nav .player-quick-chip b{font-size:inherit}nav.tool-nav .player-quick-chip small{font-size:calc(11px * var(--site-font-scale,1));font-weight:700}nav.tool-nav .player-quick-strip{flex-basis:260px;max-width:27vw}
.imported-hero-list article{position:relative;align-items:flex-start;padding-right:8px}.hero-card-actions{display:flex;align-items:flex-start;gap:5px;flex:none}.hero-card-actions .icon-button{width:28px;height:28px;min-height:28px;padding:0;display:grid;place-items:center}.hero-card-actions .panel-close{position:static;width:28px;height:28px;min-height:28px}.hero-edit-form{display:grid;gap:12px}.hero-edit-form>label,.hero-edit-form .modal-row>label{display:grid;gap:5px}.hero-edit-form input{min-width:0}
/* Bestiary source filters, balanced source chips, and clear action spacing. */
.bestiary-panel .bestiary-controls .bestiary-filter-side{grid-template-columns:minmax(88px,.5fr) minmax(120px,.8fr) minmax(145px,1fr) auto;align-items:end;gap:8px}
.bestiary-panel .bestiary-controls .bestiary-filter-side label{min-width:0}
.bestiary-panel .bestiary-controls .bestiary-filter-side select{width:100%;min-width:0}
.bestiary-library-actions{margin-top:9px}
.bestiary-detail-card .bestiary-tags{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:6px;max-width:205px}
.bestiary-detail-card .bestiary-tags span{display:inline-flex;align-items:center;justify-content:center;min-height:25px;padding:3px 8px}
.bestiary-detail-card .bestiary-tags .enemy-source-label{border-color:color-mix(in srgb,var(--theme-accent,#a6d2ad) 72%,#ffffff28);background:color-mix(in srgb,#15251d 58%,var(--theme-accent,#a6d2ad) 42%);font-weight:700}
.enemy-card .enemy-source-label{display:inline-flex;width:max-content;max-width:100%;margin:2px 0 5px;padding:2px 7px;border:1px solid color-mix(in srgb,var(--theme-accent,#a6d2ad) 45%,#ffffff22);border-radius:999px;background:color-mix(in srgb,#15251d 78%,var(--theme-accent,#a6d2ad) 22%);color:#e8f1e6;font-size:calc(9px * var(--site-font-scale,1));line-height:1.35}
.dice-scene-overlay{z-index:41}
#toast.roll-toast{z-index:50}
@media(max-width:900px){.bestiary-panel .bestiary-controls .bestiary-filter-side{grid-template-columns:minmax(88px,.5fr) minmax(120px,.8fr) minmax(145px,1fr) auto}}
@media(max-width:620px){.bestiary-panel .bestiary-controls .bestiary-filter-side{grid-template-columns:repeat(2,minmax(0,1fr))}.bestiary-panel .bestiary-controls .add-personal-enemy{grid-column:1/-1}}
@media(max-width:820px){.bestiary-library-actions{margin-top:8px}}
@media(max-width:520px){.bestiary-detail-card .bestiary-tags{max-width:150px;gap:4px}.bestiary-detail-card .bestiary-tags span{padding:3px 6px}}
/* Keep the adversary name readable and place its source/type chips on a second row. */
.bestiary-detail-heading{display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto auto;align-items:start;gap:8px 11px}
.bestiary-detail-heading>.bestiary-portrait{grid-column:1;grid-row:1 / span 2}
.bestiary-detail-heading>.bestiary-detail-name{grid-column:2;grid-row:1;width:100%;min-width:0}
.bestiary-detail-heading>.bestiary-tags{grid-column:2;grid-row:2;justify-content:flex-start;max-width:none;margin:0}
@media(max-width:520px){.bestiary-detail-heading>.bestiary-tags{max-width:none}}
