.coop-shell{position:absolute;inset:0;z-index:65;overflow:auto;padding:clamp(18px,3cqh,36px) 5%;background:radial-gradient(ellipse at 75% 25%,#284546,#102329 70%);color:#e4e8d8;display:flex;flex-direction:column;gap:16px}
.coop-shell[hidden],.coop-shell [hidden],.coop-hud[hidden],.coop-hud [hidden],.coop-connection[hidden]{display:none!important}
.coop-heading{flex:0 0 auto;border-bottom:1px solid #90b8ae44;padding-bottom:12px}.coop-heading h2{font-size:clamp(22px,4cqh,40px);margin:0 0 10px;color:#edb3bf}.coop-heading .eyebrow{margin-bottom:8px}.coop-heading p{min-height:1.5em;max-width:80ch;font-size:13px;margin:0;line-height:1.6;color:#bdd5cb}
.coop-menu{width:min(420px,100%);margin:auto;display:grid;gap:12px}.coop-menu>p{line-height:1.8}.coop-menu .primary-button,.coop-menu .subtle-button{width:100%;justify-content:center;min-height:46px}
.coop-shell button{cursor:pointer}.coop-shell button:disabled{cursor:default;opacity:.45}.coop-shell button:focus-visible,.coop-shell input:focus-visible,.coop-hud button:focus-visible{outline:3px solid #f6cf8e;outline-offset:3px}.coop-shell input{border:1px solid #a6c1b766;background:#0b1c22;color:#f3ecdc;padding:10px 12px;border-radius:4px;font:inherit;min-width:0;max-width:100%}.coop-menu form{display:grid;gap:14px}#coop-code{text-transform:uppercase;letter-spacing:.2em;font-size:24px}
/* v19.2: dark co-op surfaces need light labels in every interactive state. */
.coop-shell .subtle-button{color:#e9e3d7}
.coop-shell .subtle-button:hover{background:#35564e;border-color:#aebe9d}
.coop-shell .subtle-button:active:not(:disabled){background:#102329}
.coop-shell .subtle-button:disabled{background:transparent;border-color:#a5ada0}
#coop-lobby{display:flex;flex-direction:column;gap:16px;flex:1;min-height:0}.coop-lobby-bar{display:flex;align-items:center;flex-wrap:wrap;gap:16px;font-size:12px}.coop-lobby-bar label{display:grid;gap:5px}.coop-lobby-bar input{width:220px}#coop-invite{margin-left:auto}#coop-room{font:700 23px var(--mono);color:#f3d897;letter-spacing:.08em}#coop-copy{min-height:36px;padding:8px 10px;font-size:12px}#coop-count{font:18px var(--mono)}
.coop-seats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;flex:1;min-height:190px}.coop-seat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-width:0;padding:14px 8px;background:#0e2027;border:1px solid #607c754d;color:#a8bdb4;border-radius:8px;font:inherit}.coop-seat:disabled{opacity:1!important}.coop-seat.own{border-color:var(--seat-accent,#abd9bc);box-shadow:inset 0 0 30px #a7d6b50a;background:#1b3438}.coop-seat strong{max-width:100%;overflow-wrap:anywhere;font-size:clamp(12px,1.7cqw,18px);color:#e2e8d9}.coop-seat-number{font:12px var(--mono);color:var(--seat-accent,#98b1a6);align-self:flex-start}.coop-seat canvas{max-width:100%;width:auto;height:clamp(76px,20cqh,180px);image-rendering:pixelated}.coop-seat small{font-size:10px;color:#a2b7ab}.coop-ready-state{color:#e8c48d;font-size:12px}
.coop-lobby-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:14px}.coop-lobby-actions button{min-height:44px;padding:12px 22px}#coop-picker{text-align:center}#coop-picker h3{margin:0}.coop-heroes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:16px auto;max-width:720px}.coop-hero{background:#172f34;border:1px solid #73968c;border-radius:7px;padding:12px;color:#d9e7da;display:flex;flex-direction:column;gap:8px;align-items:center}.coop-hero[aria-pressed=true]{border-color:#f3c98d;background:#31433e}.coop-hero canvas{max-width:100%;height:clamp(80px,22cqh,160px);width:auto;image-rendering:pixelated}.coop-hero small{font-size:11px}.coop-hero span{color:#adc6bb;font-size:12px}#coop-picker-done{min-width:180px;justify-content:center}#coop-result{margin:auto;max-width:750px;width:100%;text-align:center}#coop-results{padding:0;list-style:none;display:grid;gap:14px;margin:24px 0;font-size:14px;line-height:1.6}
.coop-hud{position:absolute;z-index:12;right:14px;top:132px;width:200px;pointer-events:none;font-size:11px;color:#e1e9dc}.coop-teammate{display:grid;grid-template-columns:30px minmax(0,1fr);gap:3px 7px;padding:5px 8px;background:#102329e8;border-left:2px solid #afd7c5;margin-bottom:4px}.coop-teammate canvas{grid-row:1/4;width:30px;height:35px;image-rendering:pixelated}.coop-teammate span{overflow-wrap:anywhere;font-size:11px}.coop-teammate progress{width:100%;height:5px;accent-color:#b6dfad}.coop-teammate small{font-size:9px;color:#c7d3bc}.coop-hud>p{background:#102329ed;padding:8px;font-size:12px;color:#f1d295}.coop-hud button{pointer-events:auto;float:right;background:#102329dc;color:#d2d9c6;border:1px solid #7a9c8c;padding:5px 12px;border-radius:3px;cursor:pointer}
.coop-connection{position:absolute;z-index:58;top:38px;left:50%;transform:translateX(-50%);max-width:80%;background:#3c3022ee;border:1px solid #e0bd84;color:#f3deaf;border-radius:5px;padding:10px 15px;font-size:12px;line-height:1.6}.coop-connection button{margin-left:10px;color:#f3deaf;background:#183039;border:1px solid #839688;padding:6px;cursor:pointer}
.coop-live-note{color:#efd29a!important;font-size:12px!important;line-height:1.7!important;margin:8px 0!important}.coop-menu-open #console-actions,.coop-menu-open #arena-message,.coop-menu-open .run-meta{visibility:hidden}body.coop-playing #death-content,body.coop-playing #win-content,body.coop-playing #restart-pause{display:none!important}body.coop-playing #pause-title{font-size:32px}body.coop-playing #pause-content h2 span{font-size:16px}
@media(max-width:720px){.coop-shell{padding:15px 4%;gap:10px}.coop-heading h2{font-size:22px}.coop-heading p{font-size:11px}.coop-seats{gap:6px}.coop-seat{padding:8px 4px;gap:6px}.coop-seat strong{font-size:11px}.coop-seat small{font-size:8px}.coop-lobby-bar{gap:7px}.coop-lobby-bar input{width:160px}.coop-lobby-actions{gap:7px}.coop-lobby-actions button{padding:9px 12px;font-size:12px}.coop-hud{width:160px;right:8px;top:118px}.coop-hero{padding:8px 3px}.coop-heroes{gap:7px}.coop-hero small{font-size:9px}}
.title-subactions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.title-subactions>.subtle-button{width:100%;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;margin:0;padding:4px 6px;height:37px;min-height:37px;font-size:12px;line-height:1.1}.title-subactions>.subtle-button span{font-size:8px}

/* v19.1 integration: source-derived fit rules; browser layout QA is pending. */
.title-actions>#multiplayer{min-height:44px;font-size:15px;line-height:1.4;white-space:normal}
.title-actions>#multiplayer span{font-size:11px}
.coop-shell{overscroll-behavior:contain;font-size:15px}
.coop-heading p,.coop-live-note{font-size:14px!important}
.coop-seat small,.coop-ready-state{font-size:12px}
.coop-connection{max-width:min(80%,680px);top:64px;font-size:14px}
.coop-hud{top:150px;max-height:calc(100% - 260px);overflow:auto}
.coop-hud[data-scrollable="true"]{pointer-events:auto;overscroll-behavior:contain}
.coop-hud:focus-visible{outline:3px solid #f6cf8e;outline-offset:-3px}
.coop-door-seat{display:inline-block;margin:4px 0 0 5px;padding:0 4px;border:1px solid var(--seat-color);border-radius:3px;color:var(--seat-color);font-weight:700}
.help-content .coop-roster-entry{margin:12px 0 0;white-space:normal}
@media(max-height:620px){.coop-shell{padding:12px 4%;gap:8px}.coop-heading{padding-bottom:6px}.coop-seats{flex:none;min-height:150px}.coop-seat canvas{height:70px}.coop-hud{top:110px;max-height:calc(100% - 210px)}}
@media(max-width:720px){.coop-seats{grid-template-columns:repeat(2,minmax(0,1fr))}.coop-hud{width:150px}.coop-connection{max-width:90%}}

/* Accessible screen candidate: shared edge motion, readable labels, optional detail.
   Keep outgoing pages stacked and inert, without changing gameplay/session clocks. */
.coop-shell{font-size:16px;overflow-x:hidden}
.coop-pages{display:grid;grid-template-columns:minmax(0,1fr);flex:1;min-width:0;min-height:0}
.coop-pages>div{grid-area:1/1;min-width:0;max-width:100%;align-self:start}
.coop-pages>.coop-menu,.coop-pages>#coop-result{align-self:center}
.coop-pages>#coop-lobby{align-self:stretch}
.coop-shell[aria-hidden="true"],.coop-pages>[aria-hidden="true"]{pointer-events:none}
.coop-shell :is(.primary-button,.subtle-button){font-size:18px;line-height:1.5;min-height:48px;white-space:normal;overflow-wrap:anywhere}
.coop-heading p,.coop-live-note{font-size:16px!important;line-height:1.65!important}
.coop-lobby-bar{font-size:16px}
.coop-seat strong{font-size:18px;line-height:1.45}
.coop-seat-number,.coop-seat small,.coop-ready-state,.coop-hero span,.coop-hero small{font-size:16px;line-height:1.5}
.coop-seat,.coop-hero{overflow-wrap:anywhere}
.coop-hero strong{font-size:18px;line-height:1.5}
#coop-count{font-size:20px}
#coop-copy{font-size:16px}
#coop-picker h3,#coop-result-title{font-size:24px;line-height:1.5;overflow-wrap:anywhere}
#coop-result-score{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:8px 18px;margin:20px 0}
#coop-score-value{font-size:40px;line-height:1.2;overflow-wrap:anywhere;min-width:0}
#coop-result-floor{font-size:24px}
#coop-result-details{margin:16px 0 24px;text-align:left}
#coop-result-details summary{font-size:18px;line-height:1.5;min-height:48px;padding:10px 12px;cursor:pointer}
#coop-result-details summary:focus-visible{outline:3px solid #f6cf8e;outline-offset:3px}
#coop-results{font-size:16px;line-height:1.7;overflow-wrap:anywhere;margin:12px 0}
/* The inventory is dark; pause/help are paper. Never reuse pale warning ink there. */
#pause-content .coop-live-note,#help-panel .coop-live-note{color:#334d43!important}
#run-amulets{max-height:180px;max-height:min(180px,28cqh);overscroll-behavior:contain}
#run-amulets p{font-size:16px;line-height:1.55;overflow-wrap:anywhere}
#run-amulets strong{font-size:18px;color:#242824;line-height:1.5}
#run-amulets span{color:#4e5d50;font-size:16px}
@media(max-width:440px){.coop-heroes{grid-template-columns:1fr}.coop-hero{display:grid;grid-template-columns:80px minmax(0,1fr);text-align:left;justify-items:start}.coop-hero canvas{grid-row:1/4;height:90px}.coop-lobby-bar input{width:100%}.coop-lobby-bar label{width:100%}.coop-lobby-actions button{flex:1 1 150px}}

/* Result body scrolls above its actions, so four long records never cover replay. */
.coop-shell[data-page="result"] { overflow:hidden; background:#1d332f; }
.coop-shell[data-page="result"] .coop-pages { grid-template-rows:minmax(0,1fr); overflow:hidden; }
.coop-shell[data-page="result"] .coop-pages > #coop-result { align-self:stretch; display:flex; flex-direction:column; min-height:0; overflow:hidden; }
.coop-result-body { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:8px 8px 12px; }
#coop-result .result-actions { position:static; flex:0 0 auto; padding:12px 0 4px; }

/* T-088: the waiting room. Seat cards carry the seat number and colour, the heroine portrait, name, role,
   starting weapon, ready state and link; the room code / search time, a heroine strip, the start rule and
   the buttons keep their own fixed rows, so nobody joining or leaving moves anything. */
#coop-lobby{gap:12px}
.coop-lobby-bar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px 20px;min-height:56px}
.coop-lobby-info{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;min-height:48px;min-width:0}
.coop-chip{display:inline-block;padding:4px 12px;border-radius:3px;background:#f3d897;color:#1a2a28;font:700 15px var(--mono);letter-spacing:.06em}
.coop-invite{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px 12px;margin-left:0!important}
.coop-lobby-bar #coop-room{font-size:28px;line-height:1.1;user-select:all}
.coop-search{display:inline-flex;align-items:center;gap:10px;font-size:17px;color:#cfe3d9}
.coop-search strong{font:700 22px var(--mono);color:#f3d897;min-width:3.4ch}
.coop-search i{width:12px;height:12px;border-radius:50%;background:#f3d897;opacity:.3;transition:opacity 420ms}
.coop-search[data-beat="1"] i,body[data-fx="off"] .coop-search i{opacity:1}
.coop-lobby-bar label{display:grid;gap:4px;font-size:14px}
.coop-lobby-bar #coop-count{font:700 24px var(--mono);color:#e8eee0;padding:6px 14px;border:1px solid #90b8ae66;border-radius:4px;background:#0b1c22}

.coop-seats{gap:12px;min-height:0;grid-auto-rows:minmax(0,1fr)}
.coop-seats .coop-seat{position:relative;justify-content:flex-start;align-items:stretch;gap:6px;padding:14px 10px 10px;min-height:0;overflow:hidden;text-align:center;border:2px solid #607c754d;background:#0e2027;transition:border-color 160ms,background 160ms}
.coop-seats .coop-seat::before{content:"";position:absolute;left:0;right:0;top:0;height:5px;background:var(--seat-color,#607c75)}
.coop-seats .coop-seat.empty{border-style:dashed;background:#0b1a20;color:#8fa79d;justify-content:center;align-items:center}
.coop-seats .coop-seat.empty::before{opacity:.45}
.coop-seats .coop-seat.own{border-color:var(--seat-color);background:#1b3438;box-shadow:inset 0 0 36px #a7d6b512}
.coop-seats .coop-seat.ready{border-color:#9ed9c3}
.coop-seats .coop-seat.ready.own{border-color:#9ed9c3}
.coop-seats .coop-seat.empty .coop-seat-top{position:absolute;left:10px;right:10px;top:14px}
.coop-seat-top{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:28px}
.coop-seats .coop-seat-number{align-self:auto;display:inline-block;padding:1px 10px;border-radius:3px;background:var(--seat-color);color:#14211f;font:700 17px var(--mono);line-height:1.5}
.coop-seat-tags{display:inline-flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.coop-tag{padding:1px 7px;border-radius:3px;border:1px solid #90b8ae88;color:#cfe3d9;font-size:13px;line-height:1.5}
.coop-tag.you{background:#f3d897;border-color:#f3d897;color:#1a2a28;font-weight:700}
.coop-seats .coop-seat .coop-seat-name{font-size:clamp(16px,1.6cqw,20px);line-height:1.3;color:#f1ecdc;min-height:1.3em}
.coop-seats .coop-seat canvas{flex:1 1 0;min-height:48px;max-height:190px;width:100%;height:auto;object-fit:contain;image-rendering:pixelated}
.coop-seats .coop-seat .coop-seat-hero{font-size:15px;line-height:1.35;color:var(--seat-accent,#b9d1c6)}
.coop-seats .coop-seat .coop-seat-weapon{font-size:14px;color:#c9d8cc}
.coop-seats .coop-seat .coop-seat-link{font-size:13px;color:#93aba0}
.coop-seats .coop-seat.own .coop-seat-link{color:#f3d897}
.coop-seats .coop-seat .coop-ready-state{font-size:16px;font-weight:700;color:#e8c48d}
.coop-seats .coop-seat.ready .coop-ready-state{color:#a7e6c4}
.coop-seats .coop-seat:not(.empty):not(.ready) .coop-ready-state{font-weight:400}
.coop-seats .coop-seat.empty strong{font-size:20px;color:#a8bdb4}

.coop-pickbar{display:flex;align-items:center;gap:14px;flex:0 0 auto;min-height:56px}
.coop-pickbar-label{font-size:15px;color:#bdd5cb;flex:0 0 auto}
.coop-quick-heroes{display:flex;gap:10px;flex-wrap:wrap;min-width:0}
.coop-pick{display:flex;align-items:center;gap:8px;padding:4px 12px 4px 6px;background:#172f34;border:2px solid #4f6e69;border-radius:6px;color:#d9e7da;font-size:15px;min-height:56px}
.coop-pick canvas{width:36px;height:42px;image-rendering:pixelated}
.coop-pick[aria-pressed=true]{border-color:#f3c98d;background:#31433e;color:#fff0cb}
.coop-pick:hover:not(:disabled){border-color:#9ed9c3}
.coop-rule{margin:0;min-height:1.6em;font-size:15px;line-height:1.6;color:#bdd5cb}
.coop-lobby-actions{align-items:stretch;justify-content:center;flex-wrap:nowrap;gap:12px;padding-top:2px}
.coop-lobby-actions>button{flex:1 1 0;width:auto;max-width:340px;min-width:0;justify-content:center}
.coop-lobby-actions>.subtle-button{border:2px solid #7a9c8c;border-radius:6px}
.coop-lobby-actions>#coop-leave{flex:0 0 auto;max-width:none;padding-inline:26px}
.coop-lobby-actions #coop-ready{min-height:56px;font-size:20px;border-width:2px}
.coop-lobby-actions #coop-ready[aria-pressed=true]{background:#2d5a4a;border-color:#9ed9c3;color:#f4fff8}
.coop-lobby-actions #coop-deploy{min-height:56px;font-size:20px}
.coop-lobby-actions #coop-leave{min-height:56px}
/* T-088: the deploy button is the same shape as ready / leave (the global .primary-button is a cut-corner plate); only its fill says "primary". */
.coop-lobby-actions>#coop-deploy{border:2px solid #d4e3c0;border-radius:6px;clip-path:none;box-shadow:none;padding:12px 22px;background:#aebe9d;color:#1c2420}
.coop-lobby-actions>#coop-deploy:hover:not(:disabled){background:#c4d3b0;box-shadow:none}
.coop-lobby-actions>#coop-deploy:active:not(:disabled){background:#8fa27d;box-shadow:none}
.coop-lobby-actions>#coop-deploy:disabled{background:transparent;border-color:#a5ada0;color:#e9e3d7;opacity:.6}
@media(max-height:760px){
  .coop-shell{gap:8px}
  .coop-heading{padding-bottom:6px}.coop-heading h2{margin-bottom:4px}
  #coop-lobby{gap:8px}
  .coop-lobby-bar,.coop-lobby-info{min-height:44px}
  .coop-lobby-bar #coop-room{font-size:24px}
  .coop-seats .coop-seat{padding:12px 8px 8px;gap:4px}
  .coop-pickbar,.coop-pick{min-height:46px}.coop-pick canvas{width:30px;height:35px}
  .coop-lobby-actions #coop-ready,.coop-lobby-actions #coop-deploy,.coop-lobby-actions #coop-leave{min-height:48px}
}
@media (max-width:720px){.coop-lobby-bar{grid-template-columns:1fr}.coop-pick span{display:none}.coop-seats{grid-auto-rows:auto}.coop-seats .coop-seat{min-height:200px}}
/* T-087: notices under the lobby bar (other page version, matching server unreachable, "faster with a friend") and the stale-tab notice in the menu. Hidden = no layout cost. */
.coop-qm-note{display:flex;align-items:center;gap:6px 16px;flex-wrap:wrap;box-sizing:border-box;min-height:64px;padding:8px 14px;border:1px solid #f3d89766;border-left:4px solid #f3d897;border-radius:4px;background:#1b2a26;color:#f1e6c8;font-size:15px;line-height:1.5}
/* The lobby note keeps its two-line slot while a quick match searches (visibility only), so nothing below it moves when a notice appears. */
#coop-qm-note[data-idle="true"]{visibility:hidden}
.coop-qm-note[hidden]{display:none}
.coop-qm-note>div{flex:1 1 280px;min-width:0}
.coop-qm-note p{margin:0;font-size:15px!important;line-height:1.5!important;color:inherit}
.coop-qm-note button{flex:0 0 auto;min-height:36px;padding:6px 14px;font-size:14px;border:2px solid #7a9c8c;border-radius:6px}
.coop-menu>.coop-qm-note{display:grid;gap:8px;min-height:0}
.coop-menu>.coop-qm-note[hidden]{display:none}
/* The shared button rule makes buttons 48px tall; inside the reserved slot the reload button must not be taller than the slot. */
#coop-qm-reload{min-height:36px;height:36px;margin:0;padding:0 14px}
@media(max-height:760px){#coop-qm-note{min-height:56px;padding:4px 12px}#coop-qm-reload{min-height:32px;height:32px;padding:0 12px}}
