:root{--bg:#0d1319;--panel:#151e27;--panel2:#19242e;--panel3:#202e39;--line:#2a3a46;--text:#ecf1f3;--muted:#a5b4bf;--soft:#788b97;--accent:#d8ad68;--accent2:#f2ca83;--green:#67c8a8;--red:#ee827d;--blue:#85b6dd;--font:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}html,body{padding:0;margin:0;height:100%;background:var(--bg);color:var(--text);font-family:var(--font);font-size:14px}body{overflow:hidden}button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.4;cursor:not-allowed}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}a{color:var(--accent2);text-decoration:none}.shell{height:100vh;display:flex;flex-direction:column;min-height:0}.topbar{height:66px;flex:none;display:flex;gap:20px;align-items:center;padding:0 20px;background:#111922;border-bottom:1px solid var(--line);z-index:4}.brand{display:flex;align-items:center;gap:12px;flex:none}.brand .logo{display:flex;align-items:center;justify-content:center;width:39px;height:39px;border:1px solid #b78e52;border-radius:10px;color:#e4bb73;font-family:Georgia,serif;font-size:22px;font-weight:bold;background:linear-gradient(145deg,#313032,#15191e);text-decoration:none}.brand .logo span{color:white}.brand b{display:block;font-size:12px;letter-spacing:.19em}.brand small{color:var(--muted);letter-spacing:.11em;font-size:10px;display:block;margin-top:3px}.version{color:var(--accent);font-weight:700;letter-spacing:.04em}.campaign-title{display:flex;align-items:center;gap:12px;min-width:150px;flex:1;justify-content:center}.campaign-title .eyebrow{color:var(--soft);font-size:10px;letter-spacing:.1em;white-space:nowrap}.campaign-title button{border:0;background:none;color:var(--text);font-size:18px;font-weight:700;max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.campaign-title button:hover{color:var(--accent2)}.local-label{color:#d9ab62;background:#3a2e22;border:1px solid #6f5434;border-radius:40px;padding:4px 7px;font-size:10px;white-space:nowrap}.header-actions{display:flex;align-items:center;gap:8px}.save-status{font-size:11px;color:var(--green);white-space:nowrap;margin-right:8px}.btn{border:1px solid #3c4d58;background:#22303a;color:#dde9ee;border-radius:8px;padding:9px 12px;font-weight:600;transition:background .15s,border .15s;white-space:nowrap}.btn:hover{background:#2c3e4b;border-color:#5c7788}.btn.primary{background:#a37942;border-color:#d3a969;color:#131922}.btn.primary:hover{background:#d9b574}.btn.tiny{font-size:11px;padding:7px 10px}.btn.subtle{background:transparent;border-color:#34434f}.btn.danger{background:#663037;border-color:#c86c72}.btn.full{width:100%}.btn.ghost{background:transparent;border-color:transparent;color:var(--muted)}.workspace{min-height:0;flex:1;display:grid;grid-template-columns:252px minmax(360px,1fr) 354px}.left-panel,.right-panel{background:var(--panel);min-height:0;display:flex;flex-direction:column}.left-panel{border-right:1px solid var(--line)}.right-panel{border-left:1px solid var(--line)}.pane-block{padding:15px 13px;border-bottom:1px solid var(--line);min-height:0}.pane-block.grow{display:flex;flex-direction:column;flex:1;border-bottom:0}.pane-title{display:flex;align-items:center;justify-content:space-between;font-size:10px;letter-spacing:.12em;font-weight:800;color:#afbdc6;margin-bottom:13px}.icon-btn{height:27px;min-width:27px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #344856;background:#22313e;border-radius:7px;font-size:18px;color:#dfe8ed}.icon-btn:hover{background:#304656}.scene-list,.roster-list{display:flex;flex-direction:column;gap:7px}.scene-row,.roster-row{border:1px solid #2b3b49;padding:10px;border-radius:9px;background:#1b2731;display:flex;align-items:center;gap:9px;min-width:0}.scene-row{cursor:pointer}.scene-row.active{border-color:#a78352;background:#302c2a}.scene-row:hover,.roster-row:hover{background:#24343f}.scene-ico{width:34px;height:34px;border-radius:7px;background:linear-gradient(145deg,#4f5b58,#2d4246);display:grid;place-items:center;font-size:18px;color:#e5d7b0}.scene-row.active .scene-ico{color:#f5d18b}.scene-meta,.roster-meta{flex:1;min-width:0}.scene-meta strong,.roster-meta strong{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scene-meta small,.roster-meta small{color:var(--soft);display:block;font-size:10px;margin-top:3px}.scene-actions{display:flex;gap:7px;margin-top:10px}.scene-actions .btn{flex:1}.helper{font-size:11px;color:var(--soft);line-height:1.5;margin:-4px 0 13px}.scroll-content{overflow-y:auto;scrollbar-color:#40525d transparent;scrollbar-width:thin}.roster-list{overflow-y:auto;flex:1;padding-right:3px}.roster-ico{width:34px;height:34px;border:2px solid #536979;border-radius:10px;flex:none;display:grid;place-items:center;font-weight:800;font-size:12px;color:#fff}.roster-row{padding:8px}.roster-add{border:1px solid #465767;border-radius:8px;background:#2b3c49;color:#fff;font-size:16px;width:29px;height:29px;flex:none}.roster-add:hover{border-color:var(--accent)}.sidebar-footer{padding:13px;color:#8fa3b1;font-size:10px;border-top:1px solid var(--line);line-height:1.4}.dot{width:7px;height:7px;border-radius:50%;background:var(--green);display:inline-block;margin-right:4px}.map-column{min-width:0;min-height:0;display:flex;flex-direction:column;background:#0b141a}.map-toolbar{min-height:54px;flex:none;display:flex;justify-content:space-between;align-items:center;padding:8px 12px;gap:10px;border-bottom:1px solid #273844;background:#19232c}.tool-strip{display:flex;gap:4px;overflow-x:auto}.tool{display:flex;gap:6px;align-items:center;border:1px solid transparent;border-radius:7px;padding:8px 10px;white-space:nowrap;background:transparent;color:#b8c6ce;font-size:17px;min-height:35px}.tool span{font-size:11px;font-weight:600}.tool:hover{background:#293945}.tool.is-active{border-color:#ab884f;background:#3a332c;color:#ffda8b}.map-options{display:flex;align-items:center;gap:12px;flex:none}.compact{font-size:11px;color:#aabac4;white-space:nowrap;display:flex;align-items:center;gap:4px}.compact input{accent-color:#d8ad68}.zoom-group{display:flex;align-items:center;gap:7px;font-size:11px;color:#afc2cc}.zoom-group span{min-width:36px;text-align:center}.map-stage{position:relative;flex:1;min-height:200px;overflow:hidden;background:#0a1015;isolation:isolate}#mapCanvas{display:block;width:100%;height:100%;touch-action:none;cursor:crosshair}.map-overlay{position:absolute;display:flex;gap:7px;pointer-events:none}.map-overlay.top-left{top:14px;left:15px}.map-overlay.top-right{top:14px;right:15px}.map-overlay.bottom-left{bottom:14px;left:15px}.map-overlay.bottom-right{bottom:12px;right:13px;pointer-events:auto}.map-overlay span{border:1px solid #3b4e56;background:#101a22e8;backdrop-filter:blur(6px);padding:7px 9px;color:#d6e0e6;border-radius:7px;font-size:11px}.map-overlay #modeBadge{color:#ffce89}.mini-icon{background:#16212ae8;color:#e7eef1;border:1px solid #4d616d;border-radius:7px;width:32px;height:32px;font-size:18px}.map-statusbar{height:40px;flex:none;background:#15212a;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 13px;gap:8px;font-size:11px;color:#a6bac5}.map-statusbar div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.separator{padding:0 8px;color:#5d7683}.map-view-switch{display:flex;align-items:center;gap:8px}.map-view-switch span{font-size:9px;letter-spacing:.08em;color:#8c9eaa}.map-view-switch select{border:1px solid #3b4c58;background:#263640;border-radius:6px;padding:5px 6px;font-size:11px}.map-notice{position:absolute;top:60px;left:50%;transform:translateX(-50%);padding:8px 15px;background:#3a2f25;border:1px solid #a17d49;border-radius:8px;color:#ffe1a9;z-index:2;font-size:12px;max-width:80%;text-align:center}.tabs{height:53px;display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--line);flex:none;gap:0}.tab{border:0;background:transparent;color:#a4b2bd;font-size:12px;font-weight:600;position:relative}.tab:hover{background:#263541}.tab.active{color:#ffcd7f;background:#242d33}.tab.active:after{content:"";height:2px;background:#dfad61;position:absolute;bottom:0;left:14px;right:14px}.tab-content{flex:1;padding:16px;min-height:0}.right-footer{border-top:1px solid var(--line);padding:10px 13px;display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--soft)}.section-heading{color:#d3dfeb;font-size:11px;letter-spacing:.10em;font-weight:800;margin:18px 0 10px}.section-heading:first-child{margin-top:0}.selected-heading{display:flex;align-items:center;gap:11px;padding-bottom:13px;border-bottom:1px solid var(--line)}.selected-heading .avatar{width:48px;height:48px;border-radius:12px;display:grid;place-items:center;font-size:18px;font-weight:800;border:2px solid #637b83}.selected-heading h2{font-size:18px;letter-spacing:.01em;margin:0 0 4px}.selected-heading p{font-size:11px;color:var(--muted);margin:0}.muted{color:var(--muted)}.small{font-size:11px}.mini{font-size:10px}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:13px 0}.stat{border:1px solid #304451;border-radius:9px;padding:11px 6px;text-align:center;background:#192934}.stat small{font-size:10px;color:#9eafb9;display:block;margin-bottom:5px}.stat strong{font-size:17px}.card{border:1px solid #30414d;background:#192731;border-radius:10px;padding:13px;margin:10px 0}.card.no-gap{margin:4px 0}.row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.row.between{justify-content:space-between}.stack{display:flex;flex-direction:column;gap:9px}.field{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#a9bac5;margin:9px 0}.field input,.field select,.field textarea,.text-input{border:1px solid #40515d;background:#101b23;padding:9px 10px;border-radius:7px;color:#f2f6f8;min-width:0;width:100%;font-size:13px}.field textarea{min-height:62px;resize:vertical}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.label-value{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;margin:7px 0}.label-value label{color:#abc0cb}.hp-track{height:9px;border-radius:30px;background:#293b44;overflow:hidden;border:1px solid #43515b}.hp-track > span{display:block;height:100%;background:#66bd8e;border-radius:30px;transition:width .2s}.action-chip{padding:8px 10px;background:#20323e;border:1px solid #3f5462;border-radius:7px;font-size:11px;font-weight:600;cursor:pointer}.action-chip:hover{border-color:var(--accent)}.condition-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.condition{border-radius:7px;border:1px solid #30434f;background:#1c2933;font-size:10px;color:#afc0ca;padding:7px 3px;display:flex;align-items:center;flex-direction:column;gap:3px;text-overflow:ellipsis;overflow:hidden}.condition b{font-size:15px}.condition.on{border-color:#d8a76b;background:#40372f;color:#fff0d8}.pill{border:1px solid #405363;color:#bdd0dc;border-radius:30px;padding:4px 7px;background:#21303a;font-size:10px;white-space:nowrap}.pill.gold{background:#433322;border-color:#ab8654;color:#ffe0a1}.pill.danger{background:#422e35;border-color:#a15e67;color:#ffb9c0}.pill.success{background:#234038;border-color:#427e6d;color:#b2efcd}.right-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.right-actions button{flex:1}.empty-state{text-align:center;padding:35px 18px;color:#9eacb6;line-height:1.65}.empty-state strong{font-size:16px;display:block;color:#dfe8ee;margin-bottom:6px}.chat-roll{border:1px solid #42525d;background:#22323d;border-radius:9px;padding:11px;margin:9px 0}.chat-meta{font-size:10px;color:#a9bac5;display:flex;justify-content:space-between;gap:6px}.chat-outcome{font-weight:800;font-size:28px;margin:7px 0 3px;color:#ffe0a1}.chat-detail{border-top:1px solid #435361;margin-top:8px;padding-top:9px;font-size:12px;color:#d2e0e8;display:none;word-break:break-word}.chat-roll.open .chat-detail{display:block}.chat-roll button.detail-toggle{background:none;border:0;color:#f3cc91;padding:0;font-size:11px;text-decoration:underline}.chat-form{display:flex;gap:7px;position:sticky;bottom:-16px;padding:13px 0;background:linear-gradient(transparent,var(--panel) 20%)}.chat-form input{flex:1;min-width:0}.quick-dice{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.quick-dice .btn{font-size:11px}.log-row{padding:11px 0;border-bottom:1px solid #293b48;font-size:12px}.log-row small{display:block;color:#7f96a5;font-size:10px;margin-bottom:3px}.initiative-row{display:flex;align-items:center;gap:9px;background:#1e2d37;border:1px solid #304552;border-radius:8px;padding:8px;margin:7px 0;font-size:12px}.initiative-row.active{background:#3c332d;border-color:#a98550}.initiative-row .score{font-weight:800;font-size:19px;width:30px;text-align:center;color:#dfeaf1}.initiative-row .name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.initiative-row .small-action{border:none;background:transparent;color:#b5c7d2;font-size:16px;padding:1px 4px}.modal-root{position:fixed;inset:0;background:#040709bb;backdrop-filter:blur(4px);display:grid;place-items:center;z-index:30;padding:20px}.modal-root[hidden]{display:none}.modal{max-width:600px;width:100%;max-height:90vh;overflow-y:auto;background:#192630;border:1px solid #536473;border-radius:15px;box-shadow:0 30px 110px #0009;padding:20px}.modal h2{margin:0 0 7px;font-size:20px}.modal p{color:#b0c1ca;font-size:12px;line-height:1.6}.modal-footer{display:flex;gap:9px;margin-top:22px;justify-content:flex-end}.modal-footer button{min-width:120px}.modal .field{font-size:11px}.modal label.check{display:flex;gap:9px;align-items:center;margin:14px 0;color:#d8e3e9}.modal .check input{width:16px;height:16px}.toast{position:fixed;left:50%;bottom:62px;transform:translateX(-50%);z-index:40;color:#e6fff5;background:#1d493d;border:1px solid #5bab90;box-shadow:0 12px 35px #0009;padding:12px 20px;border-radius:9px;font-size:12px;max-width:min(80vw,550px);text-align:center}.toast[hidden]{display:none}.warning{color:#f1b379}.error{color:#f08d89}.no-print{display:none}@media(max-width:1450px){.workspace{grid-template-columns:220px minmax(330px,1fr) 326px}.tool span{display:none}.tool{font-size:20px;min-width:37px;justify-content:center}.topbar{gap:12px;padding:0 12px}.local-label{display:none}}@media(max-width:1150px){.workspace{grid-template-columns:190px minmax(330px,1fr) 310px}.left-panel .pane-block{padding:11px 9px}.right-panel .tab-content{padding:11px}.compact{display:none}.campaign-title .eyebrow{display:none}}@media(max-width:900px){body{overflow:auto}.shell{min-height:100vh;height:auto}.workspace{display:grid;grid-template-columns:200px minmax(400px,1fr);grid-template-rows:minmax(470px,65vh) 450px}.right-panel{grid-column:1/3;grid-row:2}.left-panel{grid-column:1;grid-row:1}.map-column{grid-column:2;grid-row:1}.hide-mobile{display:none}.campaign-title{justify-content:flex-start}.map-options{display:none}}@media(max-width:620px){.topbar{height:56px}.brand b{font-size:10px}.brand small{font-size:8px}.campaign-title{display:none}.header-actions{margin-left:auto}.workspace{display:flex;flex-direction:column}.left-panel{order:2;min-height:230px;max-height:340px}.left-panel .sidebar-footer{display:none}.map-column{order:1;min-height:400px;height:60vh}.right-panel{order:3;min-height:470px}.map-toolbar{overflow-x:auto}.map-statusbar #toolHelp{display:none}}@media print{body{background:white;color:black}.topbar,.left-panel,.right-panel,.map-toolbar,.map-statusbar,.map-overlay{display:none!important}.workspace{display:block}.map-column,.map-stage{width:100%;height:90vh;background:white}#mapCanvas{width:100%;height:100%}}

/* Alpha 4.2: GM preview separation, monster libraries and readable attack rolls */
body[data-mode="player"] .gm-only,body[data-mode="ghost"] .gm-only,[hidden]{display:none!important}
body[data-mode="player"] .pane-block.grow,body[data-mode="ghost"] .pane-block.grow{flex:1}
body[data-mode="ghost"] .left-panel .pane-block.grow{display:none}
.monster-browser{border-top:1px solid var(--line);padding-top:4px;margin-top:12px;min-height:0;display:flex;flex-direction:column;gap:8px}
.monster-browser .pane-title{margin-bottom:2px}
.library-pills{display:flex;gap:5px;flex-wrap:wrap}.library-pills .btn{flex:1;font-size:10px;min-width:78px}
.library-pills .btn.on{background:#45372b;border-color:#c99c5c;color:#ffdda4}
.library-status,.library-license{font-size:10px;line-height:1.5;color:#93a7b3}
.library-license a{color:#f0c58a;text-decoration:underline}
.monster-library-list{min-height:56px;max-height:28vh;overflow-y:auto;scrollbar-width:thin;display:flex;flex-direction:column;gap:5px}
.library-monster{display:flex;align-items:center;gap:7px;background:#1e2c35;border:1px solid #344653;border-radius:8px;padding:7px}
.library-monster-info{min-width:0;flex:1}.library-monster-info strong{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.library-monster-info small{display:block;color:#99aebb;font-size:10px;margin-top:3px}
.library-monster button{flex:none}
.roster-list{max-height:22vh;min-height:48px;flex:none}
.pane-block.grow{overflow-y:auto}
.chat-attack{border-color:#705c43;background:linear-gradient(145deg,#29333c,#1c2a34)}
.attack-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:9px 0}
.attack-total{background:#14222c;border:1px solid #3d5361;border-radius:8px;padding:9px 10px}
.attack-total small{display:block;font-size:10px;color:#a8beca}
.attack-total strong{display:block;font-size:25px;color:#f9d88e;line-height:1.2;margin-top:4px}
.attack-total.damage strong{color:#f6c49a}.attack-total.miss strong{color:#aebbc3;font-size:16px;padding:5px 0}
.roll-state{font-size:11px;color:#cee3dc;margin:4px 0 8px}
.roll-state.miss{color:#ffadad}.attack-reason{font-size:10px;color:#a1b7c7;margin:6px 0 0}
.detail-text{display:block;line-height:1.55;white-space:pre-wrap;font-variant-numeric:tabular-nums}
body[data-mode="player"] .sidebar-footer,body[data-mode="ghost"] .sidebar-footer{font-size:10px}
@media(max-width:900px){.monster-library-list{max-height:190px}.roster-list{max-height:190px}}
body[data-mode="player"] [data-gm-tool],body[data-mode="ghost"] [data-gm-tool]{display:none!important}

/* Alpha 4.3 shared-table launcher and access-controlled room states */
.live-bar{display:flex;gap:14px;justify-content:space-between;align-items:center;padding:8px 17px;background:#17242c;border-bottom:1px solid #324755;min-height:48px;flex:none}
.live-bar-name{display:flex;align-items:center;gap:8px;min-width:0}.live-bar-name strong{color:#f1d3a2;font-size:12px;white-space:nowrap}.live-bar-name small{color:#93a5b1;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-dot{color:#6fd3ac;font-size:17px}.live-controls{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}.live-indicator{color:#8ce0bf;font-size:11px;white-space:nowrap}
.live-room{display:block;width:100%;text-align:left;margin:8px 0;white-space:normal}
.live-member{padding:12px 0;border-bottom:1px solid #31424f}.live-member b{display:block;margin-bottom:8px}.live-member .row{margin-top:9px}.live-member select{flex:1;min-width:180px}.live-assignments{display:flex;gap:6px;flex-wrap:wrap}.live-assignments .pill{display:flex;align-items:center;gap:5px}.live-remove{background:none;border:0;color:#f9bdba;font-size:15px;padding:0 3px;cursor:pointer}
body[data-mode="player"] [data-action="next-turn"],body[data-mode="player"] [data-action="add-duration"],body[data-mode="player"] [data-action="remove-duration"],body[data-mode="player"] [data-action="toggle-hp-hidden"],body[data-mode="player"] [data-action="toggle-hidden"],body[data-mode="player"] [data-action="remove-token"]{display:none!important}
body[data-mode="player"] .map-view-switch{display:none!important}
@media(max-width:850px){.live-bar{flex-wrap:wrap;gap:6px;padding:7px 10px}.live-bar-name small{display:none}.live-controls{justify-content:flex-start;gap:5px}.live-controls .btn{font-size:10px;padding:6px 7px}}

/* Alpha 4.4 – connected players, private messages and lightweight party settings */
.party-bar{height:68px;min-height:68px;flex:none;display:flex;align-items:center;gap:12px;padding:8px 16px;background:#111d26;border-top:1px solid #40515a;z-index:4}
.party-caption{font-size:10px;font-weight:800;color:#95aeba;letter-spacing:.1em;white-space:nowrap}
.party-members{display:flex;align-items:center;gap:8px;min-width:0;flex:1;overflow-x:auto;overflow-y:hidden;padding:2px 0;scrollbar-width:thin}
.party-tile{display:flex;align-items:center;gap:10px;flex:none;max-width:230px;min-width:145px;border:1px solid #344956;border-radius:10px;background:#1a2a34;padding:6px 10px;text-align:left;cursor:pointer}
.party-tile:hover{background:#253b49;border-color:#a98551}
.party-tile.me{border-color:#806845}
.party-monogram{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:50%;background:#354a54;color:#fff0d1;font-size:12px;font-weight:bold}
.party-tile .party-text{display:flex;flex-direction:column;min-width:0;gap:2px}
.party-tile .party-text strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.party-tile .party-text small{font-size:10px;color:#a5becd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.party-status{width:8px;height:8px;flex:none;border-radius:50%;background:#60727d}
.party-status.online{background:#59c99d;box-shadow:0 0 0 2px #173c33}
.party-unread{background:#bc8755;border-radius:10px;font-size:10px;font-weight:bold;color:#10171b;padding:2px 6px}
.dm-panel{position:fixed;right:24px;bottom:78px;width:min(370px,calc(100vw - 28px));height:420px;max-height:calc(100vh - 145px);display:flex;flex-direction:column;background:#1b2b35;border:1px solid #647482;border-radius:12px;box-shadow:0 15px 50px #000b;overflow:hidden;z-index:21}
.dm-header{padding:12px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #3b4e59;background:#24343e}
.dm-header strong{display:block;font-size:13px}.dm-header small{display:block;font-size:10px;color:#a5beca;margin-top:4px}
.dm-messages{min-height:0;flex:1;overflow-y:auto;padding:13px 12px;display:flex;flex-direction:column;gap:10px}
.dm-bubble{font-size:12px;line-height:1.45;max-width:89%;padding:9px 11px;border:1px solid #455665;border-radius:11px;white-space:pre-wrap;overflow-wrap:anywhere;background:#263743;align-self:flex-start}
.dm-bubble.mine{align-self:flex-end;background:#40392c;border-color:#806b4e}
.dm-bubble small{font-size:10px;color:#a7b7bf;display:block;margin-top:5px;text-align:right}
.dm-actions{padding:0 12px}.dm-form{padding:10px 12px;display:flex;gap:8px;border-top:1px solid #354b58}.dm-form input{min-width:0;flex:1}
.live-member-settings{margin:10px 0;padding:10px;border-radius:9px;background:#182831;border:1px solid #3d5360}
.live-perm{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid #304652;font-size:12px}
.live-perm:last-child{border-bottom:0}.live-perm .btn{min-width:80px}
@media(max-width:620px){.party-bar{height:74px;min-height:74px;padding:5px 9px;gap:7px}.party-caption{display:none}.party-tile{min-width:115px;padding:5px 7px}.party-bar>.btn{font-size:10px;padding:6px}.dm-panel{right:7px;bottom:78px}}

/* Alpha 4.5: original Monster Forge full 2024-style stat blocks */
.sheet-launch{margin:13px 0 10px}
.mf-statblock{color:#ebeff1;background:linear-gradient(150deg,#192b32 0%,#14212a 58%,#182730 100%);border:1px solid #65715f;border-radius:12px;padding:16px;margin:12px 0 16px;box-shadow:0 2px 18px rgba(0,0,0,.15);font-variant-numeric:tabular-nums}
.mf-statblock .sb-title{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:2px solid #a78356;padding-bottom:13px;margin-bottom:13px}
.mf-statblock .sb-title h2{font-family:Georgia,Georgia Pro,serif;font-size:clamp(19px,2vw,29px);font-weight:700;line-height:1.14;letter-spacing:.01em;color:#f6dcaa;margin:0 0 6px}
.mf-statblock .sb-title p{font-size:12px;line-height:1.4;color:#a9b8be;margin:0}
.sb-cr{font-size:11px;font-weight:800;letter-spacing:.04em;border:1px solid #927146;border-radius:999px;padding:5px 8px;color:#f6ce8d;background:#392e24;white-space:nowrap}
.sb-vitals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:14px}
.sb-vitals>div{border-left:2px solid #9b8052;padding:3px 7px;min-width:0}
.sb-vitals small{display:block;font-size:10px;font-weight:700;color:#a9b9bd;text-transform:uppercase;letter-spacing:.1em}
.sb-vitals strong{display:block;font-size:16px;color:#faf0d9;line-height:1.35;margin-top:3px;overflow-wrap:anywhere}
.sb-vitals span{font-size:10px;color:#98adb7}
.sb-vitals .sb-speed{font-size:12px;font-weight:650;line-height:1.5}
.sb-abilities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:14px 0;padding:12px 0;border-top:1px solid #63634e;border-bottom:1px solid #63634e}
.sb-ability{text-align:center;background:#24343a;border:1px solid #435457;border-radius:8px;padding:7px 3px 5px;min-width:0}
.sb-ability small{font-size:10px;color:#dfc795;font-weight:800;display:block;letter-spacing:.1em}
.sb-ability strong{font-size:20px;display:block;margin:2px 0;color:#f4f2ee;line-height:1.3}
.sb-ability div{display:flex;gap:4px;justify-content:center;align-items:center}
.sb-ability button{background:#31454a;color:#ffdf9b;border:1px solid #51645e;border-radius:6px;min-width:31px;min-height:24px;padding:2px;font-size:11px;font-weight:700}
.sb-ability button:hover{background:#56634f}
.sb-ability span{display:block;color:#92a4aa;font-size:9px;margin-top:4px}
.sb-infos{display:grid;gap:7px;margin:12px 0 14px}
.sb-info{display:grid;grid-template-columns:100px minmax(0,1fr);gap:7px;border-bottom:1px solid #3c4e50;padding:3px 0 8px;align-items:start}
.sb-info b{font-size:10px;color:#f1cd8f;letter-spacing:.01em}
.sb-info span{font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.sb-footnotes{font-size:11px;font-weight:700;color:#e9d09e;margin:10px 0 14px}
.sb-section{margin:15px 0 0;padding:0}
.sb-section h3{font-family:Georgia,serif;font-size:19px;color:#f3d5a3;border-bottom:1px solid #ab8456;padding:0 0 7px;margin:0 0 10px;font-weight:700}
.sb-feature{margin:0 0 13px;font-size:12px;line-height:1.6}
.sb-feature-head{display:flex;align-items:center;gap:12px;justify-content:space-between}
.sb-feature strong{color:#fbf1d6;font-weight:750}
.sb-feature .sb-use{font-size:10px;color:#c4b28a;font-style:italic}
.sb-desc{line-height:1.65;color:#d6e2e5;overflow-wrap:anywhere;font-size:12px}
.sb-desc p{margin:4px 0 8px}
.sb-desc em{color:#cbdbe0}
.sb-roll{background:#3c3427;color:#f6d49e;border:1px solid #ac844d;border-radius:7px;padding:4px 9px;font-size:11px;font-weight:700;white-space:nowrap;flex:none}
.sb-roll:hover{background:#66543a}
.sb-attribution{font-size:10px;color:#9cafb5;border-top:1px solid #47585b;padding-top:12px;margin-top:16px}
.sb-compact{padding:11px 10px}
.sb-compact .sb-title h2{font-size:21px}
.sb-compact .sb-info{grid-template-columns:80px minmax(0,1fr)}
.sb-compact .sb-abilities{padding:9px 0}
.sb-compact .sb-ability strong{font-size:17px}
.sb-compact .sb-feature .sb-desc{font-size:11px}
.sb-compact .sb-section h3{font-size:18px}
.controls-heading{color:#e9bb78;font-size:11px;margin-top:22px!important;padding-top:9px;border-top:1px solid #58605a}
.modal.stat-modal{width:min(960px,95vw);max-width:960px;max-height:92vh;overflow-y:auto;padding:23px}
.modal.stat-modal>h2{font-size:13px;text-transform:uppercase;letter-spacing:.09em;color:#afc0c7}
.modal.stat-modal .mf-statblock{margin:10px auto;max-width:850px;padding:25px}
.modal.stat-modal .sb-abilities{grid-template-columns:repeat(6,minmax(0,1fr))}
.modal.stat-modal .sb-vitals{grid-template-columns:repeat(4,minmax(0,1fr))}
.modal.stat-modal .sb-infos{grid-template-columns:1fr 1fr;column-gap:22px}
.modal.stat-modal .sb-info{grid-template-columns:116px minmax(0,1fr)}
.modal.stat-modal .sb-feature,.modal.stat-modal .sb-desc{font-size:14px}
.modal.stat-modal .sb-feature{margin-bottom:17px}
#mapCanvas{cursor:crosshair}
#mapCanvas.move-available{cursor:grab}
@media(max-width:650px){.modal.stat-modal{padding:12px;width:98vw}.modal.stat-modal .mf-statblock{padding:13px}.modal.stat-modal .sb-abilities{grid-template-columns:repeat(3,minmax(0,1fr))}.modal.stat-modal .sb-vitals{grid-template-columns:repeat(2,minmax(0,1fr))}.modal.stat-modal .sb-infos{grid-template-columns:1fr}.modal.stat-modal .sb-info{grid-template-columns:92px minmax(0,1fr)} }

/* Alpha 4.6: persistent, minimizable full statblock as a lightweight floating window */
.sheet-tray{position:fixed;left:0;right:0;bottom:0;height:42px;z-index:18;display:flex;align-items:stretch;padding:3px 15px 0;background:#14212bd9;border-top:1px solid #4b5b65;pointer-events:none}
.sheet-tray-tab{pointer-events:auto;max-width:320px;min-width:145px;display:flex;align-items:center;gap:9px;padding:5px 13px;border:1px solid #9c7950;border-bottom:0;border-radius:9px 9px 0 0;background:#3a3227;color:#f7dda9;box-shadow:0 -3px 14px #0008;white-space:nowrap;cursor:pointer}
.sheet-tray-tab:hover{background:#4e402e}.sheet-tray-tab .tray-name{font-size:12px;overflow:hidden;text-overflow:ellipsis;font-weight:750}.sheet-tray-tab small{font-size:10px;color:#d9c3a0}
.sheet-dock{position:fixed;left:max(18px,calc((100vw - 970px)/2));width:min(970px,calc(100vw - 36px));max-height:min(75vh,850px);display:flex;flex-direction:column;background:#162530;border:1px solid #a17f57;border-radius:13px 13px 5px 5px;box-shadow:0 22px 90px #000e;z-index:20;overflow:hidden;transform-origin:bottom center}
.sheet-dock-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 14px;background:#23333d;border-bottom:1px solid #59676c;min-height:57px}
.sheet-dock-heading{display:flex;flex-direction:column;gap:4px;min-width:0}.sheet-dock-heading small{font-size:9px;letter-spacing:.09em;color:#c3af8a}.sheet-dock-heading strong{font-family:Georgia,serif;font-size:18px;line-height:1.1;color:#f5dfb8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sheet-dock-actions{display:flex;align-items:center;gap:8px;flex:none}.sheet-dock-content{min-height:0;overflow:auto;padding:8px 19px 24px;scrollbar-color:#657b82 #1b2931}
.sheet-dock-content .mf-statblock{max-width:880px;margin:8px auto;padding:24px}.sheet-dock-content .sb-abilities{grid-template-columns:repeat(6,minmax(0,1fr))}.sheet-dock-content .sb-vitals{grid-template-columns:repeat(4,minmax(0,1fr))}.sheet-dock-content .sb-infos{grid-template-columns:1fr 1fr;column-gap:22px}.sheet-dock-content .sb-info{grid-template-columns:116px minmax(0,1fr)}.sheet-dock-content .sb-feature,.sheet-dock-content .sb-desc{font-size:14px}
.sheet-dock.is-folding{animation:mf-sheet-fold .22s ease-in both;pointer-events:none}
@keyframes mf-sheet-fold{0%{opacity:1;transform:translateY(0) scale(1)}65%{opacity:.65;transform:translateY(22%) scale(.85)}100%{opacity:0;transform:translateY(86%) scale(.26)}}
@media(prefers-reduced-motion:reduce){.sheet-dock.is-folding{animation:none}}
@media(max-width:650px){.sheet-dock{left:5px;width:calc(100vw - 10px);max-height:77vh}.sheet-dock-content{padding:5px}.sheet-dock-content .mf-statblock{padding:11px}.sheet-dock-content .sb-abilities{grid-template-columns:repeat(3,minmax(0,1fr))}.sheet-dock-content .sb-vitals,.sheet-dock-content .sb-infos{grid-template-columns:repeat(2,minmax(0,1fr))}.sheet-dock-content .sb-info{grid-template-columns:1fr}.sheet-dock-heading strong{font-size:15px}.sheet-tray{padding-left:5px}}
/* Clear interaction hints without introducing an expensive continuous canvas draw loop */
#mapCanvas{touch-action:none;cursor:crosshair}
#mapCanvas.move-available{cursor:grab}

/* Alpha 4.7: same lower party row for characters and docked sheets. */
.party-bar{height:auto;min-height:63px;max-height:180px;flex-wrap:wrap;align-items:center;align-content:center;gap:7px 12px;padding:7px 13px;overflow-y:auto}
.party-members{flex:0 1 auto;max-width:100%;overflow:visible;display:flex;flex-wrap:wrap;gap:7px 8px}
.party-card{display:flex;align-items:stretch;max-width:260px;min-width:155px}
.party-card .party-tile{min-width:125px;max-width:210px;border-radius:8px 0 0 8px;flex:1;min-height:42px}
.party-sheet-open{color:#f1d4a0;background:#302b25;border:1px solid #67553f;border-left:0;border-radius:0 8px 8px 0;cursor:pointer;padding:5px 8px;font-size:11px;white-space:nowrap}
.party-sheet-open:hover{background:#51412e}.party-sheet-open span{font-size:10px}
.party-bar .sheet-tray{position:static;flex:none;height:auto;min-height:39px;display:flex;align-items:center;pointer-events:auto;background:transparent;border:0;padding:0;z-index:auto}
.party-bar .sheet-tray[hidden]{display:none}.party-bar .sheet-tray-tab{height:39px;min-width:155px;max-width:270px;border:1px solid #9c7950;border-radius:8px;box-shadow:none;padding:5px 10px}
.sheet-dock{max-height:min(77vh,850px)}.sheet-dock-content .pc-sheet{max-width:930px;margin:0 auto}
@media(max-width:650px){.party-bar{max-height:190px;min-height:48px;padding:6px}.party-caption{display:none}.party-card{min-width:130px}.party-card .party-tile{padding:5px;min-width:92px}.party-sheet-open span{display:none}.party-bar .sheet-tray-tab{min-width:120px}.dm-panel{bottom:85px}}
/* Alpha 4.7 player character sheet – responsive, compact, no extra canvas rendering. */
.pc-sheet{background:linear-gradient(150deg,#182b35,#14222d);border:1px solid #586974;border-radius:12px;padding:18px;margin:8px 0;color:#edf2f5;font-variant-numeric:tabular-nums}
.pc-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:4px 0 13px;border-bottom:2px solid #a18253}.pc-header h2{font-family:Georgia,serif;color:#f9d8a6;font-size:clamp(21px,2.5vw,29px);margin:5px 0}.pc-header small{font-size:10px;color:#c5b28d;letter-spacing:.12em}.pc-header p{font-size:12px;color:#afc3cd;margin:0;line-height:1.5}.pc-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;padding:11px 0}
.pc-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;padding:12px 0}.pc-summary>div{border:1px solid #405666;border-radius:8px;background:#21333e;padding:9px 4px;text-align:center}.pc-summary small{display:block;font-size:9px;color:#abbfc9;line-height:1.4}.pc-summary strong{font-size:18px;color:#f5dcad}
.pc-scores{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;padding:10px 0 16px}.pc-score{border:1px solid #536574;border-radius:9px;background:#1c303a;display:flex;flex-direction:column;align-items:center;padding:9px 5px;gap:6px}.pc-score small{font-weight:bold;color:#abc0cc}.pc-score strong{font-size:22px;color:#f7dda9}.pc-score button{font-size:10px;border:1px solid #476271;background:#243b48;color:#ecf4f9;border-radius:6px;padding:6px 4px;width:100%;cursor:pointer}.pc-score button:hover,.pc-skill:hover{background:#38505c;border-color:#c0a06b}
.pc-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.pc-sections>section{background:#182a34;border:1px solid #3e5563;border-radius:11px;padding:12px;min-width:0}.pc-sections h3{font-size:14px;color:#edcb98;margin:0 0 10px;border-bottom:1px solid #39505d;padding-bottom:9px}.pc-sections h4{margin:12px 0 7px;color:#c4d8df;font-size:12px}.pc-skill-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.pc-skill{display:flex;align-items:center;gap:6px;min-width:0;background:#1f333e;border:1px solid #344c5a;border-radius:7px;padding:7px 8px;color:#e6f0f3;text-align:left;cursor:pointer}.pc-skill span{font-size:11px;flex:1}.pc-skill small{color:#8fabb8;font-size:9px}.pc-skill b{font-size:14px;color:#f4d096}.pc-passive{font-size:11px;color:#b4c5cc;margin-top:10px}.pc-resources{display:flex;gap:9px;flex-wrap:wrap}.pc-resources>div{flex:1;padding:9px;border:1px solid #425662;border-radius:8px}.pc-resources small{display:block;color:#9cb2bf}.pc-resources strong{font-size:16px}.pc-resources button,.pc-slot button{background:#2a404b;border:1px solid #57727e;color:#e4f1f8;border-radius:6px;cursor:pointer;padding:5px 8px}.pc-death{margin:11px 0;display:flex;align-items:center;flex-wrap:wrap;gap:9px}.pc-death span{color:#c9d4da;font-size:11px}.pc-death>div{font-size:11px;white-space:nowrap}.pc-pip{background:transparent;border:0;font-size:18px;color:#7596a8;cursor:pointer;padding:1px}.pc-pip.filled{color:#e8b277}.pc-line{display:flex;align-items:baseline;justify-content:space-between;gap:6px;flex-wrap:wrap;padding:6px 0;border-bottom:1px solid #304652;font-size:11px}.pc-line span{color:#aebec7}.pc-coins{display:flex;gap:9px;flex-wrap:wrap;font-size:11px;color:#c8d6dd;margin-bottom:10px}.pc-note{white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.6;color:#bccbd4;margin:9px 0}.pc-slot{display:flex;align-items:center;gap:6px;font-size:11px;padding:5px 0;border-bottom:1px solid #344754}.pc-slot span{flex:1;color:#aabbc5}.pc-slots{margin:10px 0}.pc-spell-info{color:#c3d4df;font-size:11px}.pc-sheet.compact{padding:9px;background:transparent;border:0}.pc-sheet.compact .pc-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.pc-sheet.compact .pc-summary strong{font-size:15px}.pc-sheet.compact .pc-scores{grid-template-columns:repeat(3,minmax(0,1fr))}.pc-sheet.compact .pc-score strong{font-size:17px}.pc-sheet.compact .pc-header h2{font-size:18px}.pc-sheet.compact .pc-score button{font-size:9px}
.modal:has(.pc-skill-edit-grid){max-width:850px}.modal details{margin:12px 0;border:1px solid #385263;border-radius:10px;padding:11px}.modal details>summary{cursor:pointer;font-weight:700;color:#f0d19c;font-size:14px}.pc-skill-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:10px}.pc-skill-edit{display:flex;align-items:center;gap:5px;justify-content:space-between;font-size:11px;padding:5px;border-bottom:1px solid #314652}.pc-skill-edit select{background:#172934;color:#e5eff3;border:1px solid #456073;border-radius:6px;font-size:11px;max-width:145px}.pc-slots-form{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.pc-request{border:1px solid #566b74;background:#20313c;padding:11px;border-radius:9px;margin:7px 0}
@media(max-width:920px){.pc-summary,.pc-scores{grid-template-columns:repeat(3,minmax(0,1fr))}.pc-sections{grid-template-columns:1fr}}
@media(max-width:600px){.pc-sheet{padding:8px}.pc-skill-grid{grid-template-columns:1fr}.pc-skill-edit-grid{grid-template-columns:1fr}.pc-scores{grid-template-columns:repeat(3,minmax(0,1fr))}.pc-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Personal user-owned character library */
.personal-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 4px;border-bottom:1px solid #405260;flex-wrap:wrap}
.personal-row strong{font-size:14px;color:#f0d29f}.personal-row small{display:block;color:#b0c6d1;margin-top:5px;font-size:11px}.personal-row>.row{gap:5px}.personal-row .pill{margin-left:6px}.pc-audit-row{padding:10px;border-bottom:1px solid #43535d}.pc-audit-row small{display:block;color:#aebac2}.pc-audit-row pre{font-size:10px;white-space:pre-wrap;word-wrap:break-word}

/* Explicit hidden states and stable save button on large PC forms. */
.party-bar[hidden],.sheet-dock[hidden],.sheet-tray[hidden],.dm-panel[hidden]{display:none!important}
.modal:has(.pc-skill-edit-grid) .modal-footer{position:sticky;bottom:-20px;z-index:3;background:#192630;box-shadow:0 -10px 25px #192630;border-top:1px solid #415966;padding-top:12px}

/* Alpha 4.8 · combat cockpit / tactical maps / bilingual controls */
.lang-switch{display:flex;gap:5px;align-items:center;font-size:10px;color:#b7c7d0;white-space:nowrap}.lang-switch select{background:#23323e;border:1px solid #496070;color:#f3e9d6;border-radius:7px;padding:6px;font-weight:700;cursor:pointer}
.cc-panel{display:flex;flex-direction:column;gap:11px;line-height:1.25;padding-bottom:14px}.cc-panel h3{font-size:10px;letter-spacing:.12em;color:#bfcdd6;text-transform:uppercase;margin:8px 0 0;border-bottom:1px solid #344651;padding-bottom:7px}.cc-head{display:flex;align-items:center;gap:8px;min-width:0}.cc-head .btn{flex:none;padding:7px 8px;white-space:normal;max-width:115px}.cc-avatar{width:34px;height:34px;display:grid;place-items:center;flex:none;background:#314553;border:1px solid #69899a;border-radius:50%;color:#f5f0e9;font-weight:800}.cc-name{flex:1;min-width:0}.cc-name strong{display:block;font-size:15px;overflow:hidden;text-overflow:ellipsis}.cc-name small{display:block;font-size:10px;color:#9fbbc7;margin-top:3px}.cc-vitals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.cc-vitals>div{background:#21323c;border:1px solid #384b57;border-radius:8px;text-align:center;padding:9px 4px;min-width:0}.cc-vitals small{display:block;font-size:9px;color:#9eb4c2;white-space:nowrap}.cc-vitals b{display:block;margin-top:3px;font-size:14px;overflow:hidden;text-overflow:ellipsis}.cc-hp{width:100%;height:7px;background:#13232a;border-radius:9px;overflow:hidden}.cc-hp span{display:block;height:100%;transition:width .16s}.cc-hp-input{display:flex;gap:5px;flex-wrap:wrap}.cc-hp-input input{width:59px;flex:none;padding:7px}.cc-hp-input button{flex:1;font-size:10px}.cc-target{display:grid;grid-template-columns:1fr 1fr;gap:6px}.cc-target label{display:flex;flex-direction:column;gap:4px;color:#a8becb;font-size:10px;min-width:0}.cc-target select{width:100%;font-size:11px;border:1px solid #405463;border-radius:6px;background:#192b37;color:#dfebf1;padding:6px}.cc-attacks{display:grid;gap:5px}.cc-attack{display:flex;align-items:center;justify-content:space-between;gap:6px;text-align:left;padding:8px 10px;background:#283b48;border:1px solid #47616e;border-radius:8px;color:#f3eadf;min-width:0}.cc-attack strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cc-attack small{font-size:10px;color:#f2c987;white-space:nowrap}.cc-attack:hover,.cc-skill:hover,.cc-ability button:hover,.cc-feature:hover,.cc-spell:hover{border-color:#e0b76e;background:#3c4a4a}.cc-abilities{display:grid;gap:4px}.cc-ability{display:grid;grid-template-columns:50px 1fr 1fr;gap:6px;align-items:center}.cc-ability>span{color:#bdcdd6;font-size:12px;font-weight:700}.cc-ability button{min-height:29px;border:1px solid #445967;background:#263943;border-radius:6px;font-weight:700;color:#e3edf3;font-size:12px}.cc-titles small{font-size:9px;text-align:center;color:#7894a6}.cc-skills{display:grid;grid-template-columns:1fr 1fr;gap:5px}.cc-skill{font-size:11px;min-width:0;display:flex;justify-content:space-between;align-items:center;gap:5px;text-align:left;background:#1d2b36;border:1px solid #384f5d;border-radius:6px;padding:8px 7px;color:#dbe7ec}.cc-skill b{color:#f2cd90;flex:none}.cc-features,.cc-spells,.cc-active{display:flex;flex-wrap:wrap;gap:6px}.cc-feature,.cc-spell{display:flex;justify-content:space-between;gap:8px;align-items:center;min-width:0;border:1px solid #455967;border-radius:7px;background:#233440;color:#d7e6ed;padding:8px 9px;font-size:11px}.cc-feature span{color:#e2b979}.cc-spell small{color:#eac07a}.cc-condition,.cc-timer{font-size:10px;border:1px solid #a07853;border-radius:6px;padding:6px;background:#3a332b;color:#f3dbc2}.cc-condition{cursor:pointer}.cc-footer{display:flex;gap:7px;border-top:1px solid #3a4d57;padding-top:10px;flex-wrap:wrap}
.map-overlay.top-right{pointer-events:auto}.layer-badge{border:1px solid #987844;background:#1d2832eb;backdrop-filter:blur(7px);padding:7px 10px;color:#f4d394;border-radius:8px;font-size:11px;font-weight:700;pointer-events:auto}.layer-badge:hover{background:#353633}
.map-context{position:absolute;z-index:20;min-width:206px;max-width:244px;display:flex;flex-direction:column;gap:3px;padding:8px;background:#17252f;border:1px solid #658092;box-shadow:0 14px 35px #000b;border-radius:12px}.map-context[hidden]{display:none}.map-context strong{font-size:12px;padding:7px 8px;color:#f6d99b;border-bottom:1px solid #3a4a58;overflow-wrap:anywhere}.map-context button{display:block;text-align:left;border:0;background:transparent;color:#dceaf0;border-radius:6px;font-size:12px;padding:9px 8px}.map-context button:hover{background:#304553;color:#fff}
.map-layer-list{display:grid;gap:8px;margin:13px 0}.map-layer-list>div{display:flex;justify-content:space-between;padding:10px 12px;border:1px solid #3a5060;border-radius:9px;background:#20313d;gap:8px}.map-layer-list span{color:#98bdcd;font-size:11px}.map-layer-list strong{font-size:12px}.modal input[type=color]{min-height:42px;padding:3px}.modal input[type=checkbox]{accent-color:#c69b59}
@media(max-width:1200px){.cc-vitals{gap:3px}.cc-target{grid-template-columns:1fr}.cc-skills{grid-template-columns:1fr 1fr}.lang-switch span{display:none}}
@media(max-width:620px){.cc-vitals>div{padding:7px 3px}.cc-attack{padding:9px 8px}.cc-hp-input input{width:48px}.cc-head .btn{max-width:100px}}
.pc-starter-scores{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}.pc-starter-scores .field{min-width:0}.pc-starter-scores input{text-align:center;padding:7px 4px}.pc-starter-skills{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.cc-skill-picker{font-size:11px;display:flex;gap:5px;align-items:center;border:1px solid #3a505e;padding:7px;border-radius:6px;min-width:0}.cc-skill-picker input{flex:none}.cc-skill-picker small{color:#a9b8c1;font-size:9px;margin-left:auto}.modal:has(.pc-starter-skills){max-width:760px}
@media(max-width:620px){.pc-starter-scores{grid-template-columns:repeat(3,1fr)}.pc-starter-skills{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Alpha 4.8.1 - fixed initiative panel and newest-first, independently scrolling rolls. */
#tabContent.combat-content{flex:1;min-height:0;padding:0;display:flex;flex-direction:column;overflow:hidden}
.combat-desk{display:flex;flex-direction:column;flex:1;min-height:0;width:100%}
.combat-pinned{flex:0 1 auto;max-height:46%;min-height:86px;overflow-y:auto;padding:11px 13px 8px;background:#1b2a35;border-bottom:2px solid #795f3c;scrollbar-width:thin}
.combat-pinned .section-heading{margin:0 0 6px}
.combat-pinned p.small{font-size:10px;margin:3px 0 8px}
.combat-pinned .initiative-row{padding:5px 7px}
.combat-pinned .card{padding:8px;margin:6px 0}
.combat-pinned .card .label-value{margin:2px 0}
.combat-pinned .row{gap:5px;flex-wrap:wrap}
.combat-pinned .btn{padding:6px 8px;font-size:10px}
.combat-stream{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
.dice-controls{flex:none;padding:11px 13px 8px;border-bottom:1px solid #344856;background:#17232d}
.dice-controls .section-heading{margin:0 0 8px}
.dice-controls .quick-dice{margin:4px 0 7px;display:flex;flex-wrap:wrap;gap:4px}
.dice-controls .quick-dice .btn{padding:6px 8px;font-size:10px}
.dice-controls .chat-form{margin-top:6px}
.dice-history{overflow-y:auto;flex:1;min-height:0;padding:12px 13px 20px;scrollbar-width:thin;overscroll-behavior:contain}
.dice-history .chat-roll{margin-bottom:9px}
/* Each full sheet has its own identity, open/toggle action and close button. */
.party-bar .sheet-tray{display:flex;flex-wrap:wrap;align-items:center;gap:5px 7px;max-width:100%;height:auto;min-height:38px}
.sheet-tray-item{display:inline-flex;align-items:stretch;height:39px;max-width:min(270px,90vw);border:1px solid #987345;border-radius:8px;background:#302b25;overflow:hidden}
.sheet-tray-item.active{border-color:#e2b478;background:#52412a}
.party-bar .sheet-tray-item .sheet-tray-tab{height:auto;box-shadow:none;border:0;border-radius:0;max-width:220px;min-width:92px;padding:5px 8px;gap:6px;background:transparent}
.sheet-tray-item .tray-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.sheet-tray-remove{background:#34271e;color:#d9b991;border:0;border-left:1px solid #8b6845;width:30px;min-width:30px;font-size:18px;line-height:1}
.sheet-tray-remove:hover{background:#8b3435;color:#fff}
.dock-location{background:#393124;border:1px solid #92734a;padding:11px;margin:10px 2px;border-radius:8px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:#e9d5b2;font-size:12px}
@media(max-height:680px){.combat-pinned{max-height:38%}.dice-controls{padding-top:7px;padding-bottom:6px}}

/* Alpha 4.9 - Encounter Studio and battle effects */
.encounter-pane{flex-shrink:0;background:#17232c;border-top:1px solid #354550;border-bottom:1px solid #354550}
.encounter-pane .pane-title{margin-bottom:5px}
.encounter-pane-body{display:grid;gap:6px;font-size:11px;padding-bottom:6px}
.enc-current{display:flex;flex-direction:column;gap:3px;color:#e6e1d7;min-width:0}
.enc-current strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.enc-current small{font-size:10px;color:#a2bcb9}
.enc-pane-actions{display:flex;flex-wrap:wrap;gap:6px}
.enc-combat-summary{border-top:1px solid #41545b;margin-top:13px;padding:11px 1px 3px;display:grid;gap:9px}
.enc-combat-title,.enc-builder-head{display:flex;gap:8px;justify-content:space-between;align-items:center}
.enc-combat-title strong{font-size:11px;letter-spacing:.08em;color:#e4bf7f}
.enc-combat-status{font-size:12px;color:#e2e6e6}
.enc-combat-buttons{display:flex;flex-wrap:wrap;gap:5px}
.enc-effects-head{font-size:11px;font-weight:700;color:#d3e5e0}
.enc-effect{display:flex;align-items:center;gap:7px;background:#22333a;border-radius:7px;padding:5px 7px;font-size:10px}
.enc-effect span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.enc-effect b{color:#e4bb7c;white-space:nowrap}
.enc-effect button{font-size:17px;border:0;color:#f4aaaa;background:transparent;cursor:pointer}
.enc-effect-add{display:grid;grid-template-columns:minmax(70px,1fr) 54px auto;gap:4px;align-items:center}
.enc-effect-add .text-input{min-width:0;max-width:100%;padding:6px 5px;font-size:11px}
.enc-combat-summary .btn.tiny{padding:5px 7px;font-size:10px}
.enc-template{border:1px solid #42565b;border-radius:10px;background:#1b2b32;margin:8px 0;padding:12px;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:start;gap:10px}
.enc-template-main{flex:1 1 200px;min-width:0}
.enc-template-main strong{display:block;font-size:13px;color:#eee2cd}
.enc-template-main small{font-size:10px;color:#99b2b6}
.enc-template-main p{font-size:11px;margin:8px 0 0;line-height:1.7}
.enc-template-buttons{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.enc-template-buttons .btn{font-size:10px}
.enc-studio-footer{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px;padding-top:12px;border-top:1px solid #3b505c}
.enc-builder-head{margin:13px 0 9px}
.enc-builder-row{display:grid;grid-template-columns:minmax(120px,2fr) minmax(60px,.7fr) minmax(60px,.7fr) 28px;align-items:end;gap:7px;padding:9px 0;border-bottom:1px solid #2e414a}
.enc-builder-row .field{min-width:0}
.enc-builder-row input,.enc-builder-row select{max-width:100%;min-width:0}
.enc-row-delete{height:33px;width:28px;border:1px solid #77505a;border-radius:6px;color:#f6b2b0;background:#45292b;cursor:pointer}
@media(max-width:680px){.enc-builder-row{grid-template-columns:minmax(105px,2fr) 55px 55px 28px;gap:4px}}

/* Alpha 5.0 – Spellbook: spacious, readable casting workflow. */
.modal:has(.spellbook-content){width:min(950px,96vw);max-width:950px;max-height:94vh;overflow:auto;padding:23px 25px 18px}
.modal:has(.spellbook-content)>h2{font-size:23px;color:#f5e1bd;margin-bottom:17px;padding-bottom:13px;border-bottom:1px solid #435664}
.modal:has(.spellbook-content) .modal-footer{position:sticky;bottom:-18px;background:#192630;padding:14px 0 0;z-index:3;border-top:1px solid #435664;margin-top:24px}
.spellbook-content{display:flex;flex-direction:column;gap:12px;min-width:0}
.spellbook-content h3{font-size:15px;font-weight:750;letter-spacing:.02em;color:#f0c889;margin:13px 0 0;border-top:1px solid #40535f;padding-top:15px}
.spell-header{display:flex;align-items:center;justify-content:space-between;border:1px solid #385667;background:#21333f;border-radius:10px;padding:12px 14px}
.spell-header strong{font-size:16px;color:#f0ede7}.spell-header .muted{font-size:12px;margin-top:3px}
.spell-slots{display:flex;flex-wrap:wrap;gap:6px;min-height:30px;align-items:center}
.spell-slot-meter{display:inline-flex;align-items:center;gap:5px;border:1px solid #6a765d;border-radius:7px;background:#283b38;color:#cfe9db;font-size:12px;padding:8px 11px}
.spell-slot-meter b{font-size:15px;color:#f6db93}
.spell-book-tools{display:flex;gap:9px;flex-wrap:wrap;margin:0}
.spell-book-tools .btn{padding:9px 12px}
.spellbook-content .field{font-size:12px;margin:4px 0}
.spellbook-content .field select{min-height:40px}
.spell-known,.spell-results{display:grid;gap:9px;min-width:0}
.spell-known{max-height:390px;overflow-y:auto;scrollbar-width:thin;padding-right:5px}
.spell-row{background:#1e313c;border:1px solid #3f5667;border-radius:10px;padding:13px 14px;min-width:0;display:grid;gap:8px}
.spell-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.spell-row-head strong{font-size:14px;color:#f3e3c7}.spell-row-head .muted{font-size:11px;white-space:nowrap}
.spell-row-desc{font-size:11px;color:#acc1cc;line-height:1.5;overflow-wrap:anywhere}
.spell-row-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.spell-row-actions .btn{min-height:32px;white-space:normal;line-height:1.25}
.spell-row-actions .btn.is-selected{border-color:#6b9e7c;background:#294638;color:#cbf1cd}
.spell-slot-choice{width:auto!important;max-width:155px;min-height:33px;padding:5px 7px!important;font-size:11px!important}
.spell-row details{border-top:1px solid #344b59;margin-top:5px;padding-top:10px}
.spell-row summary{color:#e6bd79;font-size:11px;cursor:pointer;font-weight:650}
.spell-desc{white-space:pre-wrap;overflow-wrap:anywhere;color:#d4e3e8;font-size:12px;line-height:1.6;padding:10px 2px 4px;max-height:200px;overflow:auto}
.spell-search{display:flex;gap:10px;align-items:center;min-width:0}
.spell-search .text-input{flex:1;min-width:0;width:auto;min-height:40px}
.spell-search .btn{min-height:40px}
.spell-search-status{font-size:11px;color:#a9c2c8;min-height:16px}
.spell-results{max-height:290px;overflow-y:auto;scrollbar-width:thin;border-radius:8px;padding-right:4px}
.spell-found{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:10px 13px;border:1px solid #334f5d;border-radius:9px;background:#23343d}
.spell-found>div{min-width:0;flex:1;display:grid;gap:4px}
.spell-found b{color:#e8eced;font-size:13px}
.spell-found small{color:#a5bdc6;line-height:1.45;font-size:11px;overflow-wrap:anywhere}
.spell-found>.btn{flex:none}
.spellbook-content>p.mini{font-size:11px;line-height:1.6;margin:0;color:#a4b4bc}
@media(max-width:680px){.modal:has(.spellbook-content){padding:16px 13px;max-height:94vh}.spell-row{padding:11px}.spell-search{gap:5px}.spell-search .btn{padding:8px}.spell-book-tools{gap:5px}.spell-found{padding:8px;gap:7px}}

/* Alpha 5.1 - permanently visible casting and class-resource controls */
.spell-slot-strip{padding:10px 12px;margin:8px 0;border:1px solid #45655d;border-radius:10px;background:#20352f}
.spell-slot-label{color:#bfcfd0;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;margin-bottom:8px}
.spell-slot-strip .spell-slots{gap:5px;min-height:unset}
.spell-slot-strip .spell-slot-meter{min-width:57px;padding:5px 8px;gap:4px;justify-content:center}
.spell-slot-meter.is-empty{opacity:.55}
.class-resources{display:grid;gap:5px;border:1px solid #40565a;border-radius:9px;padding:10px 12px;margin:9px 0;background:#213038}
.class-resource{display:flex;align-items:center;gap:6px;font-size:11px}
.class-resource span{flex:1;min-width:0;color:#e3d6c2}
.class-resource b{min-width:42px;text-align:center;font-variant-numeric:tabular-nums;color:#efc88d}
.class-resource button{height:26px;min-width:25px;border-radius:6px;border:1px solid #516772;background:#2b3c45;color:#e2ebec;cursor:pointer}
.class-resource button:hover{background:#3f5560}
.spell-sticky-summary{position:sticky;z-index:2;top:-24px;background:#192630;padding:9px 0 11px;box-shadow:0 8px 14px #192630df;border-bottom:1px solid #405c64;display:grid;gap:9px}
.spell-sticky-summary .spell-slot-strip{margin:0}
.spell-capacity-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:7px}
.spell-capacity-grid>div{display:flex;justify-content:space-between;align-items:center;gap:9px;padding:11px 12px;background:#243740;border:1px solid #456273;border-radius:8px;font-size:11px}
.spell-capacity-grid span{color:#c9d6d9}.spell-capacity-grid strong{font-size:17px;white-space:nowrap;color:#f1c980;font-variant-numeric:tabular-nums}
.spell-char-level{font-size:11px;color:#f3d6aa;background:#334652;padding:5px 9px;border-radius:8px}
.spell-known{max-height:none;overflow:visible;padding-right:0}
.spell-level-group{border:1px solid #324c58;border-radius:10px;padding:12px;background:#1b2a33}
.spell-level-group h4{margin:0 0 10px;color:#f2cea1;font-size:14px}
.spell-level-group h4 small{font-size:11px;color:#9bb5b7;margin-left:7px}
.spell-level-items{display:grid;gap:9px}
.spell-found-info{flex:1;min-width:0}.spell-found-info strong{display:block;color:#ead9bf}
.spell-found-info small{display:block;font-size:11px;color:#b6c5c8;margin:4px 0;overflow-wrap:anywhere}
.spell-found-info details{margin:7px 0 0}
.spell-row details summary,.spell-found details summary{cursor:pointer;color:#dcb87d;font-size:12px;padding:6px 0}
.spell-desc{white-space:pre-line;line-height:1.65;color:#dee8e8;max-height:340px;overflow-y:auto;padding:12px 10px;overflow-wrap:anywhere;border-left:2px solid #8c754d;background:#1c3038}
.spell-search{display:flex;gap:8px;flex-wrap:wrap}.spell-search>input{flex:2 1 180px}.spell-search>select{flex:1 1 150px;min-width:145px}.spell-search>button{flex:0 0 auto}
.cc-build-scores{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}
.cc-build-score{display:grid;gap:6px;text-align:center;padding:9px 5px;border:1px solid #4c666a;border-radius:9px;background:#20363b;color:#efcfa1;font-size:12px;font-weight:700}
.cc-build-score input{max-width:100%;min-width:0;text-align:center;font-size:18px;background:#132833;border:1px solid #5c7380;color:#fff;border-radius:6px;padding:7px 2px}
.cc-form-hint{font-size:12px;color:#bed0d1;line-height:1.6;border-left:2px solid #748d8d;padding:9px 11px;margin:9px 0;background:#23343c}
.cc-form-hint.error{color:#f7c0b9;border-color:#bf6c67}
.cc-build-skills{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:8px}
.cc-build-skills label{font-size:12px;padding:9px 10px;border:1px solid #3e5860;border-radius:7px;background:#1c3039;cursor:pointer;display:flex;align-items:center;gap:6px}
.cc-build-features{display:grid;gap:5px;max-height:215px;overflow:auto;padding:8px;background:#1b2b34;border-radius:8px}
.cc-build-features>div{font-size:12px;border-bottom:1px solid #304753;padding:5px 7px;display:flex;gap:8px}
.cc-build-features small{min-width:55px;color:#c4a879}
@media(max-width:700px){.cc-build-scores{grid-template-columns:repeat(3,minmax(0,1fr))}.spell-sticky-summary{top:-16px}.spell-capacity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.spell-search>input{min-width:120px}}

/* Alpha 5.1.2 - stable-height spell management: separate browsing, library and prepared tabs */
.modal:has(.spellbook-content){height:min(850px,94vh);max-height:94vh;display:flex;flex-direction:column;overflow:hidden;padding:17px 22px 12px}
.modal:has(.spellbook-content)>h2{font-size:20px;margin:0 0 8px;padding:0 0 9px;flex:none}
.modal:has(.spellbook-content)>form{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
.modal:has(.spellbook-content) .modal-footer{position:static;flex:none;margin:8px 0 0;padding:8px 0 0;box-shadow:none;background:#192630}
.modal:has(.spellbook-content) .modal-footer button{min-height:34px;padding:7px 15px}
.spellbook-content{flex:1;min-height:0;overflow:hidden;gap:8px;display:flex;flex-direction:column}
.spellbook-content .spell-sticky-summary{position:static;z-index:auto;flex:none;box-shadow:none;padding:0 0 7px;gap:6px}
.spellbook-content .spell-header{padding:8px 12px}
.spellbook-content .spell-capacity-grid>div{padding:7px 10px}
.spellbook-content .spell-capacity-grid strong{font-size:14px}
.spellbook-content .spell-slot-strip{padding:7px 9px}
.spellbook-content .spell-book-tools{flex:none;gap:5px}
.spellbook-content .spell-book-tools .btn{font-size:11px;padding:6px 10px}
.spell-nav{display:flex;flex:none;gap:5px;padding-bottom:5px;border-bottom:1px solid #415361}
.spell-nav-tab{background:#20303b;border:1px solid #344c5a;color:#b8cad2;border-radius:7px 7px 0 0;padding:9px 13px;font-weight:700;font-size:12px;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:0}
.spell-nav-tab:hover{background:#2b4150}
.spell-nav-tab.active{border-color:#a98b56;color:#ffe0a5;background:#3b352e}
.spell-nav-count{font-variant-numeric:tabular-nums;color:#d4e0e2;background:#304453;padding:1px 6px;border-radius:7px;font-size:10px}
.spell-panel{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;gap:8px}
.spell-view-title{font-size:12px;font-weight:750;color:#d8c195;flex:none}
.spell-view-body{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#61798b transparent;padding:2px 6px 14px 1px;overscroll-behavior:contain}
.spell-panel .spell-known,.spell-panel .spell-results{max-height:none;overflow:visible;padding:0;display:grid;gap:7px}
.spell-panel .spell-search,.spell-panel .spell-search-status,.spell-panel .spell-target{flex:none;margin:0}
.spell-panel .spell-search{gap:6px}
.spell-panel .spell-search .text-input{min-height:36px}
.spell-panel .spell-search .btn{min-height:36px}
.spell-level-group{padding:0;border:1px solid #354e60;overflow:hidden;background:#1a2b35}
.spell-level-accordion>summary{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 14px;cursor:pointer;list-style:none;font-weight:750;color:#f3d7ac;font-size:13px;background:#223540}
.spell-level-accordion>summary::-webkit-details-marker{display:none}
.spell-level-accordion>summary:hover{background:#2b4150}
.spell-group-count{color:#b7c8d1;font-size:11px;font-weight:600}
.spell-level-accordion[open]>.spell-level-items{padding:8px}
.spell-level-group:not(.spell-level-accordion){padding:9px}
.spell-row-compact{padding:8px 10px;gap:4px}
.spell-row-main{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap}
.spell-row-compact .spell-row-head{display:flex;flex-direction:column;align-items:flex-start;gap:3px;flex:1 1 160px}
.spell-row-compact .spell-row-head strong{font-size:12px}
.spell-row-compact .spell-row-head small{font-size:10px;color:#a6bbc5}
.spell-row-compact .spell-row-actions{justify-content:flex-end;flex:0 1 auto}
.spell-row-compact .spell-row-actions .btn{min-height:29px;padding:5px 9px}
.spell-row-compact .spell-inline-description{border:0;padding:0;margin:0}
.spell-inline-description>summary{color:#bfcbc9!important;font-weight:500!important;font-size:10px!important;padding:0!important}
.spell-inline-description[open]>summary{color:#f3cb86!important}
.spell-row-compact .spell-desc,.spell-found .spell-desc{margin-top:7px}
.spell-found{padding:9px 11px;align-items:flex-start}
.spell-found-info{gap:2px}
.spell-found-info strong{font-size:12px}
.spell-found-info details{margin:2px 0 0}
.spell-found-info details summary{font-size:11px;padding:3px 0}
.spell-found .spell-added{color:#a9dab9;border-color:#476452}
.spell-panel .spell-level-group h4{font-size:12px;margin-bottom:6px}
@media(max-width:680px){
 .modal:has(.spellbook-content){padding:12px 11px 8px;height:94vh}
 .modal:has(.spellbook-content)>h2{font-size:16px}
 .spell-nav-tab{padding:8px 7px;font-size:10px;flex:1}
 .spell-nav-count{padding:1px 4px}
 .spellbook-content .spell-header{padding:6px}
 .spellbook-content .spell-header strong{font-size:13px}
 .spellbook-content .spell-capacity-grid>div{padding:5px 6px;font-size:10px}
 .spellbook-content .spell-capacity-grid strong{font-size:12px}
 .spell-row-main{align-items:flex-start}
 .spell-row-compact .spell-row-actions{justify-content:flex-start}
 .spell-panel .spell-search .btn{padding:6px 8px}
}

/* A spellbook needs one clear close action, not two duplicate footer buttons. */
.modal:has(.spellbook-content) .modal-footer>.btn:first-child{display:none}
@media(max-height:650px){.modal:has(.spellbook-content){padding-top:9px;padding-bottom:6px}.modal:has(.spellbook-content)>h2{font-size:16px;margin-bottom:5px;padding-bottom:6px}.spellbook-content{gap:5px}.spellbook-content .spell-sticky-summary{gap:3px}.spellbook-content .spell-header{padding:5px 8px}.spellbook-content .spell-capacity-grid>div{padding:4px 7px}.spellbook-content .spell-slot-strip{padding:4px 8px}.spell-book-tools .btn{padding:4px 8px}}
