/* All new dashboard rules are scoped to the DM. Player presentation is untouched. */
.dm-layout:has(#tracker.live){background:#0d131c;color:#dce5f0;font:13px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.dm-layout:has(#tracker.live) .app{height:100dvh;min-height:0;max-width:1920px;margin:auto;padding:0 24px 20px;display:grid;grid-template-rows:auto minmax(0,1fr);gap:16px}
.dm-layout:has(#tracker.live) header{min-height:66px;padding:12px 0;border-bottom:1px solid #273244;flex-wrap:nowrap}
.dm-layout:has(#tracker.live) .sigil{width:29px;height:33px}
.dm-layout:has(#tracker.live) .brand-copy strong{font-size:18px}
.dm-layout:has(#tracker.live) .brand-copy span{font-size:8px;letter-spacing:1.6px}
.dm-layout .head-actions{align-items:center;gap:8px}
.dm-layout:has(#tracker.live) .head-actions .btn{min-height:34px;padding:7px 12px;border-radius:6px;font-size:11px;background:#192332;border-color:#364359;color:#c5d2e3}
.dm-layout:has(#tracker.live) #addTop{background:#233a4e;border-color:#446581;color:#d2e8fa}
.dm-layout:has(#tracker.live) #newCombat{color:#a5b5c9}
.dm-layout main:has(#tracker.live){min-height:0}
.dm-layout .tracker.live{display:grid;grid-template-columns:clamp(290px,25%,390px) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:16px;height:100%;min-height:0;align-items:stretch}
.dm-layout .combat-strip{grid-column:1/-1;display:grid;grid-template-columns:94px minmax(0,1fr) minmax(140px,.4fr) auto;align-items:center;gap:20px;padding:16px 20px;border:1px solid #3a4557;border-radius:9px;background:#1c2635;box-shadow:inset 3px 0 #d6ae70;min-height:102px}
.dm-layout .strip-round{border-right:1px solid #3b4657;align-self:stretch;display:flex;align-items:center;padding-right:16px}
.dm-layout #round{font:650 12px/1.5 system-ui;color:#e4bb7d;letter-spacing:.4px;text-transform:none}
.dm-layout .strip-current{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;align-items:center}
.dm-layout .turn-label{grid-column:1;font:600 9px/1.5 system-ui;letter-spacing:1.4px;color:#b5c1d2;margin:0}
.dm-layout #current{grid-column:1;grid-row:2;font:650 clamp(20px,1.8vw,28px)/1.25 system-ui;letter-spacing:-.6px;color:#f0f3f8;text-shadow:none;overflow-wrap:anywhere;margin:0}
.dm-layout #position{grid-column:1;grid-row:3;font:400 10px/1.5 system-ui;color:#92a4bc}
.dm-layout .strip-status{grid-column:2;grid-row:1/4;display:flex;align-items:flex-start;flex-direction:column;gap:5px}
.dm-layout #bloodiedStatus{position:static;border:0;border-radius:4px;background:#66383b;color:#ffd3cd;font:650 9px system-ui;letter-spacing:.4px;padding:4px 7px;margin:0}
.dm-layout #currentStatuses{display:flex;gap:4px;flex-wrap:wrap;max-width:190px}
.dm-layout .strip-effect{font:500 9px/1.4 system-ui;color:#b8ccdf;background:#29394d;border-radius:4px;padding:3px 6px}
.dm-layout #bloodiedBtn{padding:3px 0;min-height:20px;border:0;background:none;color:#a7b7cc;font:500 9px system-ui;text-align:left}
.dm-layout #bloodiedBtn.on{color:#e7b1a9}
.dm-layout .next-up{margin:0;border-left:1px solid #3b4657;padding:8px 0 8px 20px;min-width:0}
.dm-layout .next-up span{font:600 9px system-ui;letter-spacing:1.4px;color:#91a5bf;margin-bottom:5px}
.dm-layout .next-up strong{font:550 15px/1.4 system-ui;color:#cbd7e7;overflow-wrap:anywhere}
.dm-layout .controls{display:flex;gap:8px;margin:0;padding:0;border:0;position:static;z-index:auto;background:none}
.dm-layout .back,.dm-layout .next{min-height:42px;padding:10px 16px;border-radius:6px;font:650 12px system-ui;white-space:nowrap}
.dm-layout .back{color:#b9c8db;background:#182333;border:1px solid #43516a}
.dm-layout .next{color:#302515;background:#e5b875;border:1px solid #e5b875}
.dm-layout .next:hover{background:#f0c88f}.dm-layout .arrow{font-size:16px;margin-left:12px}
.dm-layout .tracker aside{grid-column:1;grid-row:2;display:flex;flex-direction:column;height:100%;min-height:0;max-height:none;overflow:hidden;padding:16px 10px 12px;border:1px solid #2d3a4e;border-radius:9px;background:#131d2a;box-shadow:none}
.dm-layout .side-head{padding:0 6px 12px;margin:0;border:0;align-items:center}
.dm-layout .side-head h2{font:650 13px system-ui;color:#d6e1ef}
.dm-layout .side-head span{font:500 10px system-ui;color:#8396af}
.dm-layout .roster-tools{display:flex;gap:7px;margin:0 6px 14px}
.dm-layout .roster-tools .btn{min-height:32px;font-size:10px;padding:6px 10px;background:#1c2b3f;border-color:#354a64;color:#b7cce3}
.dm-layout .roster-tools #addCombatant{flex:1;background:#263f55;border-color:#456885;color:#cce7fa}
.dm-layout .order{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;gap:6px;padding:1px 5px 4px;scrollbar-width:thin;scrollbar-color:#3c4e67 transparent}
.dm-layout .order li.combat-row{display:grid;grid-template-columns:21px minmax(0,1fr) 25px;align-items:start;gap:7px;padding:10px 9px;border:1px solid #2e3d52;border-radius:6px;background:#192535;box-shadow:none;flex-shrink:0;color:#c7d5e6}
.dm-layout .order li.active{border-color:#90764e;background:linear-gradient(100deg,#5e482831,#192535);box-shadow:inset 3px 0 #dcb276}
.dm-layout .order li.selected{outline:1px solid #73a1cd;outline-offset:-1px;background-color:#1c3047}
.dm-layout .order li.active.selected{border-color:#73a1cd;box-shadow:inset 3px 0 #dcb276}
.dm-layout .order li.secret{border-style:dashed}
.dm-layout .order li.bloodied .name{color:#ecaaa3}
.dm-layout .num{font:550 10px/1.5 ui-monospace,monospace;color:#8fa3bd;padding-top:2px}
.dm-layout .row-main{min-width:0}
.dm-layout .row-select{display:block;width:100%;background:none;border:0;padding:0;text-align:left;color:#dce8f7}
.dm-layout .row-select .name{font:600 12px/1.5 system-ui;white-space:normal;overflow-wrap:anywhere}
.dm-layout .entry-meta{display:block;margin-top:3px;font:400 9px/1.5 system-ui;color:#8fa7c3}
.dm-layout .order li.active .entry-meta{color:#d2b98e}
.dm-layout .effect-marks{margin:4px 0 0;gap:3px;flex-wrap:wrap}
.dm-layout .effect-mark{font-size:11px;line-height:16px}
.dm-layout .effect-marker{min-height:18px;font-size:11px;padding:0 2px}
.dm-layout .row-hp{font:500 9px system-ui;margin-top:7px;color:#8ea8bf}
.dm-layout .hp-bar{height:4px;border-radius:4px;background:#30425b;margin:6px 0 0;overflow:hidden}
.dm-layout .hp-bar>span{display:block;height:100%;border-radius:4px;transition:width .18s}
.dm-layout .row-secondary{display:flex;justify-content:space-between;align-items:center;gap:7px;margin-top:6px}
.dm-layout .row-visibility{border:0;background:transparent;color:#9eb6cf;padding:2px 0;font:500 9px system-ui}
.dm-layout .row-expand{display:flex;justify-content:flex-end;gap:6px;width:auto;padding:2px 0;font:500 9px system-ui;color:#a9c1dd;background:none;border:0}
.dm-layout .expand-chevron{font-size:12px}
.dm-layout .quick-actions{display:grid;gap:4px}
.dm-layout .quick-actions .mini{min-width:25px;width:25px;height:25px;background:#172638;border:1px solid #3d516a;border-radius:4px;color:#aac1da}
.dm-layout .entry-panel{grid-column:1/-1;border-top:1px solid #34485f;margin-top:4px;padding-top:10px}
.dm-layout .entry-panel h3{font:600 9px system-ui;letter-spacing:1px;text-transform:uppercase;color:#8aa4c0;margin:14px 0 7px}
.dm-layout .entry-panel h3:first-child{margin-top:0}
.dm-layout .row-actions{gap:6px;display:flex;flex-wrap:wrap}
.dm-layout .row-actions .mini{width:auto;min-height:30px;padding:6px 8px;font-size:10px;background:#22364c;border-color:#3c5673;color:#bdd3eb}
.dm-layout .row-actions .remove{color:#ecaaa3;margin-left:0}
.dm-layout .entry-panel .hp-tracker{border:0;padding:0;margin:0}
.dm-layout .roster-legend{display:flex;gap:15px;margin:12px 6px 0;font:500 9px system-ui}
.dm-layout .legend-active{color:#d6b078}.dm-layout .legend-selected{color:#8ab5df}
.dm-layout .shortcuts{margin:10px 6px 0;padding-top:10px;font-size:9px;border-color:#2a3a50;color:#8ca3be;display:block}
.dm-layout .arena,.dm-layout .arena.bloodied{grid-column:2;grid-row:2;min-height:0;height:100%;padding:0;display:block;background:transparent;border:0;box-shadow:none;overflow:hidden;border-radius:9px}
.dm-layout .arena:before,.dm-layout .arena:after{display:none}
.dm-layout .dm-inspector{height:100%;overflow:auto;overscroll-behavior:contain;padding:22px 26px;border:1px solid #314057;border-radius:9px;background:#172130;scrollbar-width:thin;scrollbar-color:#3c4e67 transparent}
.dm-layout #inspectorHeading{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:0 0 18px;border-bottom:1px solid #304057}
.dm-layout .selected-identity{min-width:0}
.dm-layout .workspace-kicker{font:600 9px/1.5 system-ui;letter-spacing:1.4px;color:#83abd2}
.dm-layout #inspectorHeading h2{margin:5px 0 7px;font:650 26px/1.25 system-ui;letter-spacing:-.6px;color:#e8f0fa;overflow-wrap:anywhere}
.dm-layout .identity-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;font:400 10px/1.5 system-ui;color:#96abc3}
.dm-layout .turn-pill,.dm-layout .blood-pill{font:600 9px/1.5 system-ui;padding:2px 7px;border-radius:4px;background:#4b3c27;color:#edc58d}
.dm-layout .blood-pill{background:#553139;color:#f2b6ae}
.dm-layout .inspector-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.dm-layout .inspector-actions .btn{min-height:32px;padding:7px 10px;font-size:10px;background:#1d3045;border-color:#415a77;color:#b9cee5}
.dm-layout .inspector-actions .btn[aria-pressed=true]{background:#543038;border-color:#945d62;color:#efbbb5}
.dm-layout .inspector-health{padding:18px 0;border:0;border-bottom:1px solid #304057;margin:0 0 20px;background:none}
.dm-layout .inspector-health h3{display:flex;align-items:center;gap:10px;margin:0 0 12px;font:600 13px system-ui;color:#d9e3ef}
.dm-layout .inspector-health h3>span{font:400 9px system-ui;color:#8d9fb7}
.dm-layout .inspector-health .hp-tracker{border:0;padding:0;margin:0}
.dm-layout .hp-enable{font:500 11px system-ui;color:#9eb4ce;gap:7px}
.dm-layout .hp-enable input{width:14px;height:14px}
.dm-layout .inspector-health .hp-enable{justify-content:flex-end;margin-top:-28px;margin-bottom:14px}
.dm-layout .inspector-health .hp-enable>span{display:none}
.dm-layout .inspector-health .hp-panel{display:grid;grid-template-columns:minmax(115px,.7fr) minmax(150px,1fr) minmax(200px,1.5fr);grid-template-rows:auto auto;gap:9px 22px;align-items:center;padding:0;background:none}
.dm-layout .inspector-health .hp-total{grid-column:1;grid-row:1;display:block;margin:0;padding:0;border:0}
.dm-layout .hp-total>span{font:400 10px system-ui;color:#9bb0c9}
.dm-layout .inspector-health .hp-total strong{display:block;font:650 30px/1.4 system-ui;font-variant-numeric:tabular-nums;color:#dae8f6}
.dm-layout .hp-total small{font:400 16px system-ui;color:#829ab6}
.dm-layout .inspector-health .hp-bar{grid-column:1;grid-row:2;align-self:start;margin:0;max-width:170px}
.dm-layout .inspector-health .hp-max{grid-column:2;grid-row:1/3;align-self:start}
.dm-layout .inspector-health .hp-adjust{grid-column:3;grid-row:1/3;align-self:start;margin:0}
.dm-layout .inspector-health .hp-note{grid-column:1/-1;grid-row:3;margin:3px 0 0;font:400 9px/1.5 system-ui;color:#8097b2}
.dm-layout .hp-panel input{min-height:36px;padding:7px 10px;font:400 14px system-ui;background:#101b29;border-color:#3e526c}
.dm-layout .hp-panel label{font:500 10px system-ui;color:#9db2cc}
.dm-layout .hp-panel .btn{min-height:36px;padding:7px 10px;font-size:10px}
.dm-layout .hp-adjust>div{gap:7px;margin-top:7px}
.dm-layout .hp-damage{background:#372832;border-color:#784d56;color:#efb3b0}
.dm-layout .hp-heal{background:#1d3936;border-color:#416b5d;color:#abd9c7}
.dm-layout .management-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 22px;align-items:start}
.dm-layout .management-card{min-width:0;position:relative;padding:0 0 18px;border-bottom:1px solid #304057}
.dm-layout .management-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:11px}
.dm-layout .management-heading h3{margin:0;font:600 13px system-ui;color:#d2deed}
.dm-layout .conditions-card h3{color:#e7b57b}.dm-layout .spells-card h3{color:#94cde9}
.dm-layout .management-heading .btn{min-height:29px;padding:5px 9px;font:550 10px system-ui;background:#203249;border-color:#3d5673;color:#bcd6ee;border-radius:5px}
.dm-layout .management-heading .btn[aria-expanded=true]{background:#355372;border-color:#789fc2;color:#fff}
.dm-layout .selected-effects{display:flex;gap:7px;flex-wrap:wrap;align-items:center;min-height:30px}
.dm-layout .empty-label{font:400 11px/1.6 system-ui;color:#8198b4;margin:5px 0}
.dm-layout .selected-effect{display:inline-flex;align-items:stretch;max-width:100%;border:1px solid #43536a;border-radius:5px;background:#253449;color:#c8d6e8;font:500 11px/1.5 system-ui}
.dm-layout .selected-effect.conditions{background:#3a3027;border-color:#765a3e;color:#ebc28f}
.dm-layout .selected-effect.spells{background:#223b4e;border-color:#446d87;color:#a3d7f0}
.dm-layout .selected-effect.reminder{border-color:color-mix(in srgb,var(--effect) 45%,#354259);color:color-mix(in srgb,var(--effect) 50%,#fff);background:color-mix(in srgb,var(--effect) 12%,#172333)}
.dm-layout .selected-effect>button,.dm-layout .selected-effect>span{background:none;border:0;color:inherit;padding:6px 8px;font:inherit;text-align:left;overflow-wrap:anywhere}
.dm-layout .selected-effect>button:first-child{min-width:0}
.dm-layout .selected-effect .remove-effect{flex-shrink:0;border-left:1px solid #a8bdd322;min-width:27px;text-align:center;font-size:14px;padding:3px 7px}
.dm-layout .selected-effect button:hover{background:#ffffff0d}
.dm-layout .management-card .reminder-menu{position:static;left:auto;right:auto;top:auto;width:100%;max-height:320px;overflow:auto;margin-top:12px;padding:10px;background:#111e2f;border:1px solid #3f5673;border-radius:7px;box-shadow:none;z-index:auto;scrollbar-width:thin}
.dm-layout .reminder-option{padding:9px 8px;font-size:11px}.dm-layout .reminder-option span:first-child{font-size:11px}.dm-layout .reminder-option:hover{background:#223a55}
.dm-layout .effect-option .mini{min-width:26px;height:28px}
.dm-layout .management-card .hint{font:400 9px/1.5 system-ui;margin:0 0 9px;color:#8fa8c5}
.dm-layout .management-card .field{font-size:11px}.dm-layout .management-card .field select{padding:8px}.dm-layout .custom-spell input{padding:8px;font-size:12px}
.dm-layout #activeReminders{display:none}
.dm-layout .shared-rule{margin:20px 0 0;padding:18px;background:#20394b;border-color:#52778f;border-radius:7px}.dm-layout .shared-rule h2{font-size:21px}.dm-layout .shared-rule p{font-size:13px}
.dm-layout .player-help{position:relative;color:#a6b9d0;font:500 12px system-ui}
.dm-layout .player-help>summary{display:grid;place-items:center;list-style:none;width:30px;height:30px;padding:0;border:1px solid #3b4e67;border-radius:50%;cursor:pointer;font:600 12px system-ui}
.dm-layout .player-help>summary::-webkit-details-marker{display:none}
.dm-layout .help-content{position:absolute;right:0;top:40px;width:min(340px,calc(100vw - 32px));background:#1c2a3d;border:1px solid #516780;border-radius:8px;padding:18px;z-index:60;box-shadow:0 14px 35px #0009;font:400 12px/1.7 system-ui}
.dm-layout .help-content p{margin:8px 0 0}.dm-layout .help-content a{color:#f1c98f}
.dm-layout #windowNotice{position:static;font:400 12px/1.7 system-ui;color:#d3bf9d}
.dm-layout button:focus-visible,.dm-layout summary:focus-visible{outline:2px solid #8ab9df;outline-offset:3px}
@media(min-width:1600px){.dm-layout .dm-inspector{padding:26px 32px}.dm-layout .management-grid{gap:22px 30px}.dm-layout .row-select .name{font-size:13px}}
@media(max-width:1100px){.dm-layout:has(#tracker.live) .app{padding:0 16px 16px;gap:12px}.dm-layout .tracker.live{grid-template-columns:290px minmax(0,1fr);gap:12px}.dm-layout .combat-strip{grid-template-columns:70px minmax(0,1fr) 130px auto;gap:12px;padding:14px}.dm-layout .strip-status{grid-column:1;grid-row:4;flex-direction:row;align-items:center}.dm-layout #currentStatuses{display:none}.dm-layout .controls{gap:6px}.dm-layout .back,.dm-layout .next{padding:9px 11px;font-size:11px}.dm-layout .dm-inspector{padding:18px}.dm-layout .inspector-health .hp-panel{grid-template-columns:1fr 1fr;gap:12px 16px}.dm-layout .inspector-health .hp-total{grid-column:1;grid-row:1}.dm-layout .inspector-health .hp-bar{grid-column:1;grid-row:2}.dm-layout .inspector-health .hp-max{grid-column:2;grid-row:1/3}.dm-layout .inspector-health .hp-adjust{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:end}.dm-layout .inspector-health .hp-note{grid-row:4}.dm-layout .management-grid{gap:16px} .dm-layout #inspectorHeading{flex-wrap:wrap}.dm-layout .inspector-actions{justify-content:flex-start}}
@media(max-width:760px){.dm-layout:has(#tracker.live) .app{height:auto;min-height:100dvh;padding:0 12px 16px}.dm-layout:has(#tracker.live) header{flex-wrap:wrap;gap:10px}.dm-layout .head-actions{flex-wrap:wrap}.dm-layout .tracker.live{height:auto;grid-template-columns:1fr;grid-template-rows:auto auto auto}.dm-layout .combat-strip{position:sticky;top:0;z-index:30;grid-template-columns:62px minmax(0,1fr) auto;gap:10px;padding:12px;min-height:92px;box-shadow:0 5px 18px #0006,inset 3px 0 #d6ae70}.dm-layout .strip-round{grid-row:1;padding-right:8px}.dm-layout .strip-current{grid-column:2;grid-row:1}.dm-layout #current{font-size:20px}.dm-layout .combat-strip .next-up{grid-column:2;grid-row:2;border:0;padding:0;display:flex;gap:8px;align-items:center}.dm-layout .next-up span{font-size:8px;margin:0;flex-shrink:0}.dm-layout .next-up strong{font-size:12px}.dm-layout .controls{grid-column:3;grid-row:1/3;flex-direction:column}.dm-layout .back,.dm-layout .next{min-height:34px;padding:7px 9px}.dm-layout .strip-status{display:flex;flex-direction:row}.dm-layout .strip-status #bloodiedBtn{display:none}.dm-layout .tracker aside{grid-column:1;grid-row:2;max-height:42vh;min-height:220px;height:auto}.dm-layout .arena,.dm-layout .arena.bloodied{grid-column:1;grid-row:3;height:auto;min-height:0;overflow:visible}.dm-layout .dm-inspector{height:auto;overflow:visible;padding:18px}.dm-layout .order{overflow:auto}.dm-layout .shortcuts{display:none}.dm-layout .management-grid{grid-template-columns:1fr 1fr}.dm-layout .player-help .help-content{right:0}}
@media(max-width:480px){.dm-layout .management-grid{grid-template-columns:1fr}.dm-layout .combat-strip{grid-template-columns:48px minmax(0,1fr) auto;gap:8px}.dm-layout .strip-round{padding-right:6px}.dm-layout #round{font-size:10px}.dm-layout #position{font-size:9px}.dm-layout #current{font-size:18px}.dm-layout .next .arrow{margin-left:4px;font-size:13px}.dm-layout .inspector-health .hp-adjust{display:block}.dm-layout #inspectorHeading h2{font-size:23px}.dm-layout .head-actions .btn{font-size:10px!important;padding:7px 9px!important}.dm-layout .inspector-health .hp-panel{grid-template-columns:1fr 1.3fr}}
@media(prefers-reduced-motion:reduce){.dm-layout *{transition:none!important;animation:none!important}}

/* Settings is a DM-only extension point; it never changes encounter state. */
.dm-layout #settingsDialog{width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 40px);background:#151e2b;color:#dce5f0;border:1px solid #364359;border-radius:12px}
.dm-layout #settingsDialog .modal-head{border-bottom:1px solid #293547}
.dm-layout .settings-description{margin:0 0 20px;color:#a5b4c8}
.dm-layout .settings-empty{padding:22px 0 28px}
.dm-layout .settings-empty h3{margin:0 0 8px;font-size:16px;font-weight:600}
.dm-layout .settings-empty p{margin:0;color:#93a4bb;line-height:1.6}
.dm-layout #openSettings:focus-visible{outline:2px solid #82b6f5;outline-offset:3px}
.dm-layout:has(#settingsDialog[open]) #openSettings{border-color:#82b6f5;color:#dcecff;background:#213149}
@media(max-width:760px){.dm-layout header{flex-wrap:wrap}.dm-layout .head-actions{flex-wrap:wrap}}
