/* Play page: you vs. the models. Builds on style.css tokens; nothing here overrides shared classes globally. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.play { padding-top: 48px; padding-bottom: 8px; }
.play [hidden] { display: none !important; }
.play.in-round { padding-top: 16px; }
.play-h1 { margin-top: 14px; }
.play-h1:focus { outline: none; }
kbd { display: inline-block; font: 11px/1 var(--mono); color: var(--ink); background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 2px 5px 1px; vertical-align: 1px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.sm { padding: 6px 14px; font-size: 13px; }

/* Start */
.start-grid { display: grid; grid-template-columns: minmax(0, 1fr) 172px; gap: 48px; align-items: start; }
.field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 28px; }
.field-label { font: 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); min-width: 40px; }
.seg button .count { opacity: .62; margin-left: 6px; font-variant-numeric: tabular-nums; }
.seg button[disabled] { opacity: .4; cursor: default; }
.mode-desc { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 26px; }
.rule { display: flex; gap: 14px; align-items: baseline; margin: 30px 0 0; padding-top: 14px; border-top: 1px solid var(--hair); max-width: 680px; color: var(--ink); }
.rule-label { flex: none; font: 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); min-width: 40px; }
.best { margin: 12px 0 0; }
.best b { color: var(--ink); font-weight: 600; }
.load-error { margin: 12px 0 0; color: var(--bad); }
.ref { margin: 6px 0 0; }
.ref img { width: 100%; height: auto; border: 1px solid var(--hair); border-radius: 6px; }
.ref figcaption { margin-top: 10px; font: 11px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.ref figcaption span { display: block; margin-top: 4px; font: 12.5px/1.45 var(--sans); letter-spacing: 0; text-transform: none; color: var(--muted); }
.keys { margin: 36px 0 0; }

/* Round bar */
.round-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; min-height: 52px; padding: 0 0 12px; }
.round-bar .spacer { flex: 1; }
.prog { display: flex; align-items: center; gap: 10px; font: 13px var(--mono); color: var(--ink-2); }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 6px; height: 12px; border-radius: 1px; background: var(--hair); }
.pips i.cur { background: repeating-linear-gradient(180deg, var(--red) 0 2px, #fff 2px 4px); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.pips i.found { background: var(--ink); }
.pips i.miss { background: #b9b9b9; }
.timer { font: 600 18px var(--mono); letter-spacing: -0.01em; min-width: 11ch; }
.timer .cap { font-size: 12px; font-weight: 400; color: var(--muted); }
.timer.late { color: var(--bad); }
.verdict { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.verdict .mark { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.verdict .mark svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.verdict.found .mark { background: var(--good-mark); }
.verdict.miss .mark { background: var(--bad-mark); }
.zoom { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.zoom button { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--ink); }
.zoom button:hover { background: var(--wash); }
.zoom button[aria-disabled="true"] { color: var(--line); cursor: default; background: transparent; }
.zoom button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.zoom .fit { padding: 0 11px; font-size: 13px; color: var(--ink-2); }
.zoom .zl { min-width: 5ch; text-align: center; font: 12px var(--mono); color: var(--ink-2); }

/* Stage: clips its own content, so zoom never widens the page */
.pstage { position: relative; height: 420px; overflow: hidden; border-radius: 6px; background: var(--wash); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: crosshair; }
.pstage.reveal { cursor: grab; }
.pstage.dragging { cursor: grabbing; }
.pstage img.scene { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; -webkit-user-drag: none; visibility: hidden; }
.pstage img.scene.ready { visibility: visible; }
.pstage svg.marks { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.pstage .labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.stage-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; font: 12px var(--mono); color: var(--muted); pointer-events: none; }
.stage-msg[hidden] { display: none; }
.pstage.round:focus-visible::after { content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none;
  background: linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat, linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); }

/* Marks drawn over the scene, in screen pixels */
.marks rect { fill: none; }
.marks .m-halo { stroke: #fff; stroke-width: 3; opacity: .85; }
.marks .m-model { stroke: var(--ink); stroke-width: 1; }
.marks .m-you-halo { stroke: #fff; stroke-width: 5; opacity: .9; }
.marks .m-you { stroke: var(--ink); stroke-width: 2.5; }
.marks .m-dot { fill: var(--ink); stroke: #fff; stroke-width: 1.5; }
.marks .m-w-ink { stroke: #fff; stroke-width: 3.5; }
.marks .m-w-red { stroke: var(--red); stroke-width: 2; }
.marks .m-w-white { stroke: #fff; stroke-width: 2; stroke-dasharray: 4 4; }
.plabel { position: absolute; left: 0; top: 0; padding: 2px 5px; font: 10.5px/1.3 var(--mono); white-space: pre; color: var(--ink); background: rgba(255, 255, 255, .94); border: 1px solid rgba(0, 0, 0, .2); border-radius: 3px; }
.plabel.you { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.plabel.waldo { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }

/* Reveal details */
#keys-round { margin: 12px 0 0; }
.details { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 18px; }
.details[hidden] { display: none; }
.crop { margin: 0; }
.crop img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 6px; background: var(--wash); }
.crop figcaption { margin-top: 6px; font: 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.mline { margin: 0 0 10px; font-size: 16px; font-weight: 650; }
.details .tags { gap: 5px; }
.details .tag .g { font-weight: 700; }
.details .note { margin: 10px 0 0; }
.mark-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; color: var(--ink-2); }
.mark-key span { display: inline-flex; align-items: center; gap: 7px; }
.sw { display: inline-block; flex: none; width: 16px; height: 12px; }
.sw-waldo { border: 3px solid transparent; background: linear-gradient(#fff, #fff) padding-box, repeating-linear-gradient(45deg, var(--red) 0 2px, #fff 2px 4px) border-box; box-shadow: 0 0 0 1px var(--ink); }
.sw-you { border: 2.5px solid var(--ink); }
.sw-model { border: 1px solid var(--ink); }

/* Summary */
.table-wrap { margin-top: 30px; overflow-x: auto; }
.you-table { font-size: 14px; margin-top: 0; }
.you-table th { padding: 0 10px 10px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.you-table td { padding: 11px 10px; vertical-align: middle; }
.you-table th.l, .you-table td.l { text-align: left; }
.you-table td.rk { width: 36px; color: var(--muted); }
.you-table .who { font-weight: 600; }
.you-table .maker { margin-left: 2px; font-size: 13px; color: var(--muted); }
.you-table .fc { white-space: nowrap; }
.you-table .fc b { font-size: 15px; font-weight: 650; }
.you-table .fc .of { color: var(--muted); font-size: 13px; }
.you-table .meter { margin-left: 10px; vertical-align: -1px; }
.you-table .meter i { width: 4px; }
.you-table td.all { color: var(--muted); }
.you-table tr.you td { color: var(--ink); }
.you-table tr.you td:first-child { background: var(--stripes-h) left top / 3px 100% no-repeat; padding-left: 13px; color: var(--ink); font-weight: 650; }
.you-table tr.you .who { font-weight: 700; }
.you-table tr.you .meter i.on { background: var(--red); }
.sum-note { margin: 14px 0 0; max-width: 760px; }
#summary .actions { margin-top: 28px; }
#summary .subhead { margin-top: 48px; }
.sum-tile { margin: 0; cursor: default; }
.sum-tile .cap { gap: 8px; }
.sum-tile .sub { margin-top: 3px; font-size: 12px; color: var(--muted); }

@media (max-width: 860px) {
  .start-grid { grid-template-columns: minmax(0, 1fr) 140px; gap: 32px; }
}
@media (max-width: 640px) {
  .play { padding-top: 32px; }
  .start-grid { grid-template-columns: 1fr; gap: 26px; }
  .ref { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; margin: 0; }
  .ref figcaption { margin-top: 0; }
  .round-bar { gap: 8px 12px; }
  .hide-xs { display: none; }
  .timer { min-width: 0; }
  .details { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
  .you-table .hide-sm { display: none; }
  .you-table .maker, .you-table .meter { display: none; }
  .you-table th, .you-table td { padding-left: 6px; padding-right: 6px; }
  .you-table tr.you td:first-child { padding-left: 10px; }
}
