/* One compact table per side. Act glyphs belong to the role cell, never a fourth column. */
body.is-compact-night .compact-team-mafia{--group-color:#ba4152;--group-header:#892f3e;--group-rule:#e5c3c8}
body.is-compact-night .compact-team-town{--group-color:#407fb7;--group-header:#285c88;--group-rule:#c3d6e7}
body.is-compact-night .compact-team-neutral{--group-color:#b38a43;--group-header:#775d2d;--group-rule:#e1d4bc}
body.is-compact-night .compact-team-group{padding:0;margin:8px 0;background:#fff;border:2px solid var(--group-color);border-radius:10px;overflow:hidden;box-shadow:0 4px 14px #00000012}
body.is-compact-night .compact-team-group>h3{display:flex;align-items:center;gap:5px;margin:0;padding:2px 9px;font-size:11px;font-weight:700;line-height:18px;color:#fff;background:var(--group-header)}
body.is-compact-night .compact-team-group>h3 small{font-size:11px;font-weight:400;color:inherit}
body.is-compact-night .game-layout .person.compact-roster-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:44px auto;gap:0;min-height:44px;padding:0;margin:0;background:#fff;color:#111a25;border:0;border-bottom:1px solid var(--group-rule);box-shadow:none;border-radius:0;opacity:1;filter:none}
body.is-compact-night .game-layout .person.compact-roster-row:last-child{border-bottom:0}
body.is-compact-night .compact-roster-row>.person-name{grid-row:1;grid-column:1;display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:0;align-items:center;align-self:stretch;min-width:0;margin:0;color:#111a25}
body.is-compact-night .compact-roster-row .compact-roster-role{display:flex;align-items:center;gap:5px;min-height:44px;height:44px;min-width:0;width:100%;padding:2px 8px;background:transparent;border:0;border-radius:0;text-align:start;color:#111a25;font-size:14px;line-height:20px;font-weight:800;white-space:nowrap;overflow:hidden;touch-action:manipulation}
body.is-compact-night .compact-roster-role-label{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.is-compact-night .compact-roster-row .compact-name-actions{display:block;min-width:0;width:100%;height:44px;min-height:44px;margin:0;padding:4px 7px;background:transparent;border:0;border-inline:1px solid var(--group-rule);border-radius:0;color:#111a25;font-size:14px;font-weight:700;line-height:20px;text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color-scheme:light;touch-action:manipulation}
body.is-compact-night .compact-roster-row .compact-name-actions option{background:#fff;color:#111a25}
body.is-compact-night .game-layout .compact-roster-row .person-name>.player-action-name,body.is-compact-night .game-layout .compact-roster-row .person-name>.inline-target{display:flex;align-items:center;gap:3px;width:100%;min-width:0;min-height:44px;height:44px;padding:2px 5px;margin:0;background:transparent;border:0;border-inline:1px solid var(--group-rule);border-radius:0;color:#111a25;font-size:14px;font-weight:700;line-height:20px;text-align:start;white-space:nowrap;overflow:hidden;outline-offset:-2px}
body.is-compact-night .compact-roster-row .compact-person-name,body.is-compact-night .compact-roster-row .inline-target>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
body.is-compact-night .compact-roster-row .compact-seat{min-width:13px;margin:0;font-size:10px;font-weight:400;color:#4b5563;flex:none}
body.is-compact-night .compact-roster-row .compact-row-chevron{font-size:14px;width:10px;flex:none;color:#4b5563;text-align:center}
body.is-compact-night .game-layout .compact-roster-row .person-name>.inline-target:not(:disabled){border-color:#277854;background:#e4f4e9;color:#111a25;outline:0}
body.is-compact-night .game-layout .compact-roster-row .person-name>.inline-target:disabled{background:#f1f3f5;color:#616a72;border-color:#d0d6dc;opacity:1}
body.is-compact-night .compact-roster-row .person-name>.inline-target svg{flex:none;width:15px;height:15px;margin:0}
/* Legacy .life-toggle uses !important; override only this compact control. */
body.is-compact-night .game-layout .person.compact-roster-row>.player-life-action{display:grid;place-items:center;grid-column:2;grid-row:1;align-self:stretch;min-width:44px;width:44px;height:44px;min-height:44px;padding:10px!important;border:0!important;border-radius:0;background:transparent!important;color:#d54b64!important;opacity:1}
body.is-compact-night .game-layout .person.compact-roster-row>.player-life-action.dead{color:#267050!important;background:transparent!important}
body.is-compact-night .compact-roster-row>.player-life-action svg{width:23px;height:23px;pointer-events:none}
body.is-compact-night .compact-roster-row>.player-life-action.alive svg{fill:#e45a73;stroke:#c73f58;stroke-width:1.6}
/* Marks share the role's white surface. Additional marks scroll inside that cell. */
body.is-compact-night .compact-roster-role>.compact-roster-status{display:flex;align-items:center;justify-content:flex-start;gap:3px;flex:0 1 auto;min-width:0;max-width:43%;overflow:auto;scrollbar-width:none;white-space:nowrap}
body.is-compact-night .compact-roster-status::-webkit-scrollbar{display:none}
body.is-compact-night .compact-roster-row .compact-roster-status .compact-effect,body.is-compact-night .compact-roster-row .compact-roster-status .compact-resource,body.is-compact-night .compact-roster-row .compact-roster-status .source-state-glyph{display:inline-flex;align-items:center;gap:1px;min-height:22px;flex:none;padding:0;border:0;border-radius:0;background:transparent;color:#35677a;font-size:10px;line-height:16px}
body.is-compact-night .compact-roster-row .compact-roster-status .nostra-pick-glyph{justify-content:center;width:22px;height:22px;min-height:22px;border:1px solid #176d43;border-radius:50%;background:#258653;color:#fff;font-size:12px;font-weight:800;line-height:1;direction:ltr}
body.is-compact-night .compact-roster-row .compact-roster-status .inline-effect.status-pending{background:transparent;border:0;color:#aa741b}
body.is-compact-night .compact-roster-row .compact-roster-status .inline-effect.status-applied{background:transparent;border:0;color:#26704b}
body.is-compact-night .compact-roster-row .compact-roster-status .inline-effect.status-blocked,body.is-compact-night .compact-roster-row .compact-roster-status .inline-effect.status-discarded{background:transparent;border:0;color:#6b7280}
body.is-compact-night .compact-roster-status svg{width:15px;height:15px;flex:none}
body.is-compact-night .compact-roster-status small,body.is-compact-night .compact-roster-status bdi{font-size:9px;line-height:14px}
body.is-compact-night .compact-roster-row>.compact-player-panel{display:block;grid-column:1/-1;grid-row:2;margin:0;padding:8px;border-top:1px solid var(--group-rule);background:#f4f7fa;color:#111a25;min-width:0}
body.is-compact-night .compact-roster-row>.compact-player-panel[hidden],body.is-compact-night .compact-roster-row .compact-player-panel .compact-action-compat[hidden]{display:none!important}
body.is-compact-night .compact-roster-row.is-expanded .compact-roster-role{background:#edf3f8}
body.is-compact-night .compact-roster-row .compact-player-panel .inline-abilities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:0;padding:0}
body.is-compact-night .compact-roster-row .compact-player-panel .quick-target-action{min-height:44px;padding:5px;gap:4px;border:1px solid #b7c2cb;background:#fff;color:#15202b;font-size:12px;line-height:1.4}
body.is-compact-night .compact-roster-row .compact-player-panel .quick-target-action.recorded{border-color:#4f9772;background:#dff2e7;color:#15472d}
body.is-compact-night .compact-roster-row .compact-player-panel .quick-target-action:disabled{opacity:.55}
body.is-compact-night .compact-player-panel>.player-more{display:block;margin-top:0;padding:0;color:#15202b}
body.is-compact-night .compact-player-panel>.player-more>summary{min-height:44px;padding:8px 5px;border-radius:5px;background:#e8eef4;color:#253844;font-size:12px}
body.is-compact-night .compact-player-panel>.player-more>div{padding:6px 2px;display:flex;flex-wrap:wrap;gap:6px}
body.is-compact-night .compact-player-panel>.player-more button{min-height:44px;padding:7px 9px;background:#fff;border:1px solid #b8c4cd;border-radius:6px;color:#15202b}
body.is-compact-night .compact-player-panel .compact-resource-detail{flex-basis:100%;font-size:11px;color:#394a55}
body.is-compact-night .compact-player-panel input{background:#fff;color:#111;border-color:#aabac5}
body.is-compact-night .compact-roster-row button:focus-visible,body.is-compact-night .compact-roster-row summary:focus-visible,body.is-compact-night .compact-roster-row .compact-name-actions:focus-visible{outline:2px solid #286fa7;outline-offset:-3px}
body.is-compact-night .game-layout .person.compact-roster-row>.player-life-action:active{background:#fbe9ed!important}
body.is-compact-night .compact-roster-row button.compact-roster-role:active,body.is-compact-night .compact-roster-row .compact-name-actions:active{background:#edf3f8}
body.is-compact-night .game-layout .person.compact-roster-row.out{background:#e4e8ed;color:#667182}
body.is-compact-night .compact-roster-row.out .compact-name-actions,body.is-compact-night .compact-roster-row.out .compact-roster-role{background:transparent;color:#667182}
body.is-compact-night .compact-roster-row.out .compact-name-actions{text-decoration:line-through;text-decoration-thickness:1px}
body.is-compact-night .compact-roster-row.out .compact-player-panel{background:#f3f5f6}
@media(min-width:600px){body.is-compact-night .compact-roster-row .compact-roster-role,body.is-compact-night .compact-roster-row .compact-name-actions{font-size:16px}body.is-compact-night .compact-roster-row .compact-player-panel .inline-abilities{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:350px){body.is-compact-night .compact-roster-row .compact-roster-role{font-size:12px;padding-inline:5px;gap:3px}body.is-compact-night .compact-roster-row .compact-name-actions{font-size:13px;padding-inline:4px}body.is-compact-night .compact-roster-status svg{width:13px;height:13px}body.is-compact-night .compact-roster-role>.compact-roster-status{gap:1px}}
/* A resource control shares the role cell without nesting controls or adding a column. */
body.is-compact-night .compact-role-cell{display:flex;align-items:center;min-width:0;height:44px}
body.is-compact-night .compact-role-cell>.compact-roster-role{flex:1;min-width:0;width:auto}
body.is-compact-night .compact-role-cell>.compact-shield-toggle{display:inline-flex;align-items:center;justify-content:center;gap:1px;flex:0 0 44px;min-width:44px;min-height:44px;height:44px;padding:7px 4px;margin:0;border:0;border-radius:0;background:transparent;color:#aa741b;line-height:1;opacity:1}
body.is-compact-night .compact-shield-toggle svg{width:22px;height:22px;flex:none}
body.is-compact-night .compact-shield-toggle span{font-size:10px}
body.is-compact-night .compact-shield-toggle[data-shield-state="depleted"]{color:#788493}
body.is-compact-night .compact-shield-toggle[data-shield-state="pending"]{color:#b1771e}
body.is-compact-night .compact-shield-toggle[data-shield-state="unknown"]{color:#788493}
body.is-compact-night .compact-shield-toggle:enabled:active{background:#fff1d8}
body.is-compact-night .compact-roster-legend{display:flex;flex-wrap:wrap;align-items:center;gap:5px 14px;margin:9px 2px 12px;color:#b8c4d2;font-size:11px;line-height:1.7}
body.is-compact-night .compact-legend-item{display:inline-flex;align-items:center;gap:5px;min-width:0}
body.is-compact-night .compact-legend-item svg{width:16px;height:16px;flex:none}
body.is-compact-night .compact-roster-status .compact-role-trait{display:inline-flex;align-items:center;justify-content:center;flex:none;font-size:15px;line-height:22px}
@media(max-width:350px){body.is-compact-night .compact-shield-toggle svg{width:19px;height:19px}}
/* Day-only, moderator-owned challenge checklist. Small glyph, full touch target. */
.day-challenge-cell{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:36px;min-height:44px;padding:2px;color:var(--muted);font-size:10px;line-height:13px;cursor:pointer}
.day-challenge-cell input[type=checkbox]{appearance:auto;-webkit-appearance:checkbox;width:16px;height:16px;min-width:16px;margin:0;padding:0;accent-color:#29735d;cursor:pointer}
body.is-compact-night .compact-roster-row>.person-name:has(.day-challenge-cell){grid-template-columns:minmax(0,1fr) minmax(84px,.55fr) 36px}
body.is-compact-night .compact-roster-row .day-challenge-cell{color:#425364;border-inline-start:1px solid var(--group-rule);height:44px}
.day-challenge-cell:has(input:disabled){cursor:default;opacity:.5}
body.is-compact-night .day-challenge-cell{color-scheme:light}
