/* ladderlab.css — LAB CHROME ONLY + clearly-marked lab overrides. Loaded AFTER style.css by ladderlab.html.
 * Everything is prefixed lab- so it can't collide with the game's classes. style.css stays frozen. */

html.lab, body.lab { height: 100%; }
body.lab { background: #0a0a0d; color: #d9d6cf; overflow: hidden;
  font: 12px/1.4 ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", Menlo, monospace; }

.lab-app { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 348px; }

/* ---- stage ---- */
.lab-stagewrap { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.lab-stage { flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; padding: 28px 28px 8px;
  background: var(--lab-bg, radial-gradient(ellipse 80% 70% at 50% 40%, var(--felt-2) 0%, var(--felt) 55%, var(--bg) 100%)); }
.lab-stage[data-bg="black"] { --lab-bg: #000; }
.lab-stage[data-bg="mid"]   { --lab-bg: #5c5c63; }
.lab-stage[data-bg="light"] { --lab-bg: #bdbdc2; }
/* host = the game's .card, with the deal animation / zoom cursor switched off so re-renders don't flash */
.lab-stage .card.lab-card { width: var(--lab-w, 400px); flex: none; animation: none; cursor: default; }
.lab-note { padding: 20px; max-width: 460px; color: #e6c46a; border: 1px dashed #5a4a1a; border-radius: 6px; background: rgba(40, 30, 5, .5); }
.lab-note.is-err { color: #ff9b9b; border-color: #6a2a2a; background: rgba(50, 10, 10, .5); }

.lab-read { margin: 0; padding: 8px 18px 10px; border-top: 1px solid #1f1f27; background: #0c0c10; color: #9a978f;
  font: 11px/1.45 ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.lab-read b { color: #e3a850; font-weight: 600; }
.lab-read i { color: #6f6c66; font-style: normal; }

/* ---- control deck ---- */
.lab-deck { border-left: 1px solid #23232b; background: #101015; overflow-y: auto; padding: 10px 12px 28px; }
.lab-deck h1 { margin: 0 0 2px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #e3a850; font-weight: 600; }
.lab-status { color: #6f6c66; margin-bottom: 8px; font-size: 10.5px; }
.lab-status .ok { color: #7fc79a; } .lab-status .no { color: #ff9b9b; }
.lab-sec { margin: 12px 0 0; padding-top: 8px; border-top: 1px solid #1d1d25; }
.lab-sec > h2 { margin: 0 0 6px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #77746d; font-weight: 600; display: flex; justify-content: space-between; }
.lab-sec > h2 em { font-style: normal; color: #b8b4aa; letter-spacing: 0; text-transform: none; }
.lab-sec.is-override > h2 { color: #e3a850; }

.lab-seg { display: flex; flex-wrap: wrap; gap: 3px; }
.lab-seg button, .lab-btn, .lab-chip { background: #1a1a21; color: #cfccc4; border: 1px solid #2c2c36; border-radius: 4px; padding: 3px 7px; font: inherit; cursor: pointer; }
.lab-seg button:hover, .lab-btn:hover, .lab-chip:hover { border-color: #55556a; }
.lab-seg button[aria-pressed="true"], .lab-chip[aria-pressed="true"] { background: #3a2f12; border-color: #e3a850; color: #ffe3a6; }
.lab-seg button:focus-visible, .lab-btn:focus-visible, .lab-chip:focus-visible, .lab-deck input:focus-visible { outline: 2px solid #8fb7ff; outline-offset: 1px; }
.lab-seg.is-chain button:first-child { color: #9fc4ff; }

.lab-pins { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 6px; }
.lab-chip { display: flex; flex-direction: column; align-items: center; padding: 5px 2px; line-height: 1.25; }
.lab-chip b { font-size: 13px; } .lab-chip small { font-size: 9px; color: #8a877f; letter-spacing: .04em; } .lab-chip[aria-pressed="true"] small { color: #d9b86c; }
.lab-idrow { display: flex; gap: 4px; align-items: center; }
.lab-idrow input[type="number"] { width: 64px; background: #0b0b0f; color: #ffe3a6; border: 1px solid #2c2c36; border-radius: 4px; padding: 3px 6px; font: inherit; }

.lab-row { display: grid; grid-template-columns: 74px 1fr 40px; gap: 6px; align-items: center; margin: 3px 0; }
.lab-row label { color: #8a877f; }
.lab-row output { text-align: right; color: #cfccc4; font-variant-numeric: tabular-nums; }
.lab-deck input[type="range"] { width: 100%; accent-color: #e3a850; margin: 0; }
.lab-check { display: flex; gap: 6px; align-items: center; margin: 4px 0; color: #b8b4aa; cursor: pointer; }
.lab-check input { accent-color: #e3a850; margin: 0; }
.lab-hint { color: #5f5c56; font-size: 10.5px; margin-top: 4px; }
.lab-keys { margin-top: 14px; color: #5f5c56; font-size: 10.5px; line-height: 1.6; }
.lab-keys kbd { background: #1a1a21; border: 1px solid #2c2c36; border-radius: 3px; padding: 0 4px; color: #a9a59c; font: inherit; }

/* seed / preset text inputs + preset list (lab chrome only) */
.lab-idrow input[type="text"] { flex: 1; min-width: 0; background: #0b0b0f; color: #ffe3a6; border: 1px solid #2c2c36; border-radius: 4px; padding: 3px 6px; font: inherit; }
.lab-deck textarea { width: 100%; box-sizing: border-box; margin-top: 6px; resize: vertical; background: #0b0b0f; color: #cfccc4;
  border: 1px solid #2c2c36; border-radius: 4px; padding: 4px 6px; font: inherit; white-space: pre; overflow: auto; }
.lab-preset { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.lab-preset .lab-preset-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cfccc4; }
.lab-preset .lab-btn { padding: 2px 6px; }

/* =========================================================================================================
   LAB-ONLY DIALS (the game reads the same vars with the shipped defaults, so these are plain var writes on .lab-stage):
     --vig      0..1   R4 LOST SOCK vignette strength (style.css: var(--vig, 1)).
     --feather  0..8   R5 BARE HAND corner vignette strength (style.css: var(--feather, 4) * .075 alpha at the corners). 0 = none.
   ========================================================================================================= */
.lab-stage { --vig: 1; --feather: 4; }

/* ---- effective-value sliders: amber marker on fields the user pinned (seeded ones stay plain) ---- */
.lab-row.has-reset { grid-template-columns: 74px 1fr 40px 16px; box-shadow: inset 2px 0 0 transparent; padding-left: 4px; margin-left: -4px; }
.lab-row.has-reset.is-ov { box-shadow: inset 2px 0 0 #e3a850; }
.lab-row.is-ov > label, .lab-idrow.is-ov > label { color: #e3a850 !important; }
.lab-row.is-ov output { color: #ffe3a6; }
.lab-ovx { background: none; border: 1px solid #5a4a22; color: #e3a850; border-radius: 50%; width: 15px; height: 15px; padding: 0; line-height: 11px; font-size: 11px; cursor: pointer; visibility: hidden; }
.lab-row.is-ov .lab-ovx, .lab-idrow.is-ov .lab-ovx { visibility: visible; }
.lab-ovx:hover { background: #3a2f12; }


/* =========================================================================================================
   LAB v2 (2026-10-16): rung groups, mounted-layer tags, mute switches (view only), readouts.
   ========================================================================================================= */
.lab-sec.lab-first { border-top: 0; margin-top: 0; padding-top: 0; }
[hidden] { display: none !important; }
.lab-sl { color: #8a877f; min-width: 74px; }
.lab-sub { margin: 8px 0 3px; color: #77746d; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.lab-natural { margin-top: 5px; color: #77746d; font-size: 10.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.lab-natural b { color: #cfccc4; font-weight: 600; }
.lab-mounted { display: flex; flex-wrap: wrap; gap: 3px; margin: 0 0 6px; min-height: 18px; }
.lab-tag { padding: 0 6px; border: 1px solid #3a2f12; background: #1d1809; color: #e3c57f; border-radius: 9px; font-size: 10px; line-height: 16px; }

.lab-rg { margin: 4px 0; border: 1px solid #1f1f27; border-radius: 5px; background: #0d0d12; padding: 0 8px 6px; }
.lab-rg > summary { cursor: pointer; padding: 5px 0; list-style: none; display: flex; align-items: center; gap: 6px; color: #cfccc4; }
.lab-rg > summary::-webkit-details-marker { display: none; }
.lab-rg > summary::before { content: "▸"; color: #77746d; font-size: 9px; width: 8px; }
.lab-rg[open] > summary::before { content: "▾"; }
.lab-rg > summary b { color: #e3a850; letter-spacing: .06em; }
.lab-rg > summary:focus-visible { outline: 2px solid #8fb7ff; outline-offset: 1px; }
.lab-badge { margin-left: auto; font-size: 9.5px; color: #77746d; border: 1px solid #2c2c36; border-radius: 9px; padding: 0 7px; line-height: 15px; }
.lab-rg.is-here { border-color: #5a4a22; }
.lab-rg.is-here .lab-badge { color: #ffe3a6; border-color: #e3a850; background: #3a2f12; }
.lab-rg.is-away { opacity: .62; }
.lab-rg.is-away .lab-badge { cursor: pointer; color: #9fc4ff; border-color: #35507a; }
.lab-rg.is-away .lab-badge:hover { background: #162338; }
.lab-rg input:disabled { opacity: .4; }
.lab-check input:disabled + * , .lab-check:has(input:disabled) { opacity: .5; cursor: default; }

/* mute switches: view only, nothing in the card changes */
.lab-stage[data-mute~="groove"] .pcard > .pc-groove,
.lab-stage[data-mute~="motif"]  .pcard > .pc-motif,
.lab-stage[data-mute~="band"]   .pcard > .pc-chainband { display: none !important; }
.lab-stage[data-mute~="all"] .pcard > :is(.pc-foil, .pc-groove, .pc-flinque, .pc-fringe, .pc-digi, .pc-plate, .pc-chain, .pc-motif, .pc-pat, .pc-glare, .pc-sweep) { display: none !important; }
/* dormancy measuring: no 200ms fades in the way */
.lab-stage.lab-notrans .pcard, .lab-stage.lab-notrans .pcard * { transition: none !important; }

.lab-table { margin: 6px 0 0; padding: 6px 8px; background: #0b0b0f; border: 1px solid #23232b; border-radius: 4px; color: #9a978f;
  font: 10.5px/1.5 ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", monospace; white-space: pre; overflow-x: auto; }
.lab-table b { color: #e3a850; font-weight: 600; }
.lab-note-rm { margin-top: 8px; color: #5f5c56; font-size: 10.5px; line-height: 1.5; }
.lab-note-rm b { color: #a9a59c; font-weight: 600; } .lab-note-rm code { color: #a9a59c; }
.lab-idrow.is-ov > .lab-sl { color: #e3a850; }
