/* Play and test yourself: extra styles for play.html. Builds on site.css (tokens, .tool, .readout, .seg, .quiz). */
.pl-mono { font-family: var(--mono); letter-spacing: .08em; }

/* ---------- game cards ---------- */
.pl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .pl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .pl-cards { grid-template-columns: minmax(0, 1fr); } }
.pl-gc { position: relative; display: flex; flex-direction: column; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg2); overflow: hidden; transition: transform .45s var(--ease), border-color .3s; }
.pl-gc:hover { transform: translateY(-4px); border-color: var(--line2); }
.pl-gc .im { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg3); }
.pl-gc .im img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.82); transition: transform 1.2s var(--ease); }
.pl-gc:hover .im img { transform: scale(1.05); }
.pl-gc .im::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,19,0) 45%, var(--bg2) 100%); }
.pl-gc .no { position: absolute; z-index: 1; top: 14px; left: 16px; font: 600 13px var(--mono); letter-spacing: .1em; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.pl-gc .tm { position: absolute; z-index: 1; top: 11px; right: 12px; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(5,7,9,.62); border: 1px solid var(--line2); color: var(--ink); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pl-gc .bd { position: relative; display: flex; flex-direction: column; flex: 1; padding: 0 22px 22px; }
.pl-gc .k { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.pl-gc h3 { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; margin-top: 6px; }
.pl-gc p { color: var(--ink2); font-size: 15px; line-height: 1.5; margin: 8px 0 0; }
.pl-gc .go { margin-top: auto; padding-top: 16px; color: var(--cyan); font-weight: 600; font-size: 15px; }
.pl-gc .go::after { content: " ›"; }

/* ---------- shared ---------- */
[data-game] { scroll-margin-top: calc(var(--nav) + 16px); }
[data-game] [hidden] { display: none !important; }

/* ---------- shared result + share ---------- */
.pl-big { font-size: clamp(56px, 8vw, 96px); font-weight: 600; letter-spacing: -.05em; line-height: .95; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pl-big small { font-size: .32em; font-weight: 600; letter-spacing: 0; margin-left: 10px; color: var(--ink2); }
.pl-res .lead { max-width: 60ch; }
.pl-ro3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; }
@media (max-width: 640px) { .pl-ro3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pl-share { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.pl-share .eyebrow { margin-bottom: 14px; }
.pl-post { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px dashed var(--line2); color: var(--ink2); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; max-width: 760px; }
.pl-prev { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 22px; align-items: center; margin-top: 20px; }
.pl-prev[hidden] { display: none; }
.pl-prev img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line2); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
@media (max-width: 600px) { .pl-prev { grid-template-columns: minmax(0, 1fr); } .pl-prev img { max-width: 260px; } }

/* ---------- A. operator ---------- */
.pl-op { position: relative; }
.pl-hud { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.pl-hud > div { min-width: 0; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: border-color .3s, background .3s; }
.pl-hud b { display: block; font: 600 clamp(19px, 2.1vw, 26px)/1.1 var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-hud span { display: block; margin-top: 3px; font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-hud > div.warn { border-color: rgba(245,165,36,.6); background: rgba(245,165,36,.08); }
.pl-hud > div.bad { border-color: rgba(239,68,68,.6); background: rgba(239,68,68,.08); }
@media (max-width: 760px) { .pl-hud { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .pl-hud > div { padding: 10px; } .pl-hud span { white-space: normal; line-height: 1.3; } }
.pl-board { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .pl-board { grid-template-columns: minmax(0, 1fr); } }
.pl-chart { background: #070a0e; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pl-chart svg { width: 100%; height: auto; }
.pl-leg { margin-top: 10px; gap: 6px 14px; font-size: 12px; }
.pl-leg i { height: 4px; }
.pl-dash { background: repeating-linear-gradient(90deg, var(--amber) 0 5px, transparent 5px 9px); }
.pl-gauges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 520px) { .pl-gauges { grid-template-columns: minmax(0, 1fr); } }
.pl-g { min-width: 0; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.pl-sh { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; font-size: 13px; color: var(--ink2); }
.pl-sh span { min-width: 0; }
.pl-sh b { font: 600 15px var(--mono); color: var(--ink); white-space: nowrap; }
.pl-track { position: relative; height: 12px; border-radius: 6px; background: rgba(255,255,255,.08); }
.pl-track .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px; background: var(--green); transition: width .15s linear, background .3s; }
.pl-track .fill.low { background: var(--amber); }
.pl-track .m20 { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: rgba(255,255,255,.55); }
.pl-track .sw { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: rgba(139,198,81,.25); box-shadow: inset 0 0 0 1px rgba(139,198,81,.6); }
.pl-track .mk { position: absolute; top: -5px; left: 0; width: 4px; height: 22px; margin-left: -2px; border-radius: 2px; background: #fff; transition: left .15s linear, background .3s; }
.pl-track .mk.off { background: var(--amber); }
.pl-gs { margin-top: 9px; font-size: 12px; color: var(--mute); }
.pl-side { min-width: 0; }
.pl-eng { display: grid; grid-template-columns: 30px repeat(4, minmax(0, 1fr)); gap: 7px; align-items: center; }
.pl-eng .ecl { font: 600 11px var(--mono); letter-spacing: .04em; color: var(--mute); }
.pl-e { position: relative; min-width: 0; height: 56px; padding: 0; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255,255,255,.03); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; overflow: hidden; font-variant-numeric: tabular-nums; transition: background .2s, border-color .2s, transform .12s; touch-action: manipulation; }
.pl-e b { font-size: 16px; line-height: 1; font-weight: 700; }
.pl-e span { font-size: 11px; line-height: 1; color: var(--mute); white-space: nowrap; }
.pl-e i { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--green); }
.pl-e:hover { border-color: var(--ink2); }
.pl-e:active { transform: scale(.95); }
.pl-e.on { border-color: rgba(245,165,36,.85); background: rgba(245,165,36,.17); }
.pl-e.on span { color: #fcd38a; }
.pl-e.start { border-color: rgba(139,198,81,.85); background: rgba(139,198,81,.1); animation: plsync 1s ease-in-out infinite; }
.pl-e.start span { color: var(--green); }
.pl-e.trip { border-color: rgba(239,68,68,.85); background: rgba(239,68,68,.15); }
.pl-e.trip span { color: #fda4a4; }
.pl-e.trip i { background: var(--red); }
@keyframes plsync { 50% { background: rgba(139,198,81,.24); } }
.pl-quick { display: flex; gap: 8px; margin-top: 12px; }
.pl-quick .btn { flex: 1; justify-content: center; }
.pl-ren { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13px; color: var(--mute); }
.pl-ren b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-log { margin-top: 14px; padding: 12px 14px; min-height: 92px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.pl-log .lh { margin: 0 0 6px; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.pl-msg { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink2); }
.pl-msg.bad { color: #fda4a4; }
.pl-msg.ok { color: var(--green); }
.pl-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 18px; }
.pl-ov { position: absolute; inset: -1px; z-index: 5; display: grid; justify-items: center; align-items: start; padding: clamp(24px, 6vw, 80px) 14px 24px; border-radius: 16px; background: rgba(5,7,9,.74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pl-ov[hidden] { display: none; }
.pl-ovc { max-width: 540px; padding: clamp(22px, 3vw, 32px); border-radius: var(--r); background: rgba(10,14,19,.94); border: 1px solid var(--line2); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.pl-ovc > p:not(.eyebrow):not(.tiny) { margin: 12px 0 0; color: var(--ink2); }
.pl-tback { position: absolute; inset: -1px; z-index: 4; border-radius: 16px; background: rgba(5,7,9,.7); }
.pl-hi { position: relative; z-index: 6; border-radius: 16px; background: var(--bg2); box-shadow: 0 0 0 3px var(--cyan), 0 0 0 10px rgba(56,189,248,.18); }
.pl-tip { position: absolute; z-index: 7; padding: 16px 18px; border-radius: 16px; background: #f4f6f8; color: #050709; box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.pl-tip h4 { font-size: 19px; letter-spacing: -.02em; }
.pl-tip p { margin: 6px 0 0; font-size: 15px; line-height: 1.45; color: #2f353c; }
.pl-tip .pl-step { margin: 0 0 6px; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #6e6e73; }
.pl-tip .row { margin-top: 14px; }
.pl-tip .btn.solid { background: #050709; color: #fff; }
.pl-skip { padding: 8px 6px; font-size: 14px; font-weight: 600; color: #424245; text-decoration: underline; text-underline-offset: 3px; }
.pl-result { margin-top: 24px; }
.pl-end { padding-top: 24px; border-top: 1px solid var(--line); }
.pl-endhd { display: flex; gap: 22px; align-items: center; }
.pl-grade { flex: none; display: grid; place-items: center; width: clamp(84px, 11vw, 116px); aspect-ratio: 1; border-radius: 28px; font-size: clamp(38px, 5.4vw, 56px); font-weight: 700; letter-spacing: -.04em; color: #fff; background: radial-gradient(circle at 30% 20%, rgba(245,165,36,.4), rgba(245,165,36,.08)); border: 1px solid rgba(245,165,36,.55); }
@media (max-width: 640px) { .pl-endhd { align-items: flex-start; gap: 16px; } }

/* ---------- B. spot ---------- */
.pl-spot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.pl-ask { margin-top: 6px; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.03em; line-height: 1.1; }
.pl-stats { display: flex; gap: 10px; }
.pl-stats div { min-width: 92px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.pl-stats b { display: block; font: 600 20px/1.1 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-stats span { font-size: 12px; color: var(--mute); }
.pl-spot-top { scroll-margin-top: calc(var(--nav) + 16px); }
.pl-plan { max-width: min(100%, calc((100vh - 170px) * 1.387)); margin-inline: auto; cursor: crosshair; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
html.static .pl-plan { max-width: 100%; }
.pl-pill { position: absolute; top: 12px; right: 12px; max-width: 46%; padding: 8px 14px; border-radius: 999px; background: rgba(5,7,9,.82); border: 1px solid var(--line2); font-size: 15px; font-weight: 600; line-height: 1.25; pointer-events: none; }
.pl-pill[hidden] { display: none; }
@media (max-width: 700px) { .pl-pill { display: none; } }
.pl-plan.idle { cursor: default; }
.pl-plan svg { width: 100%; height: auto; display: block; }
.pl-pulse { transform-box: fill-box; transform-origin: center; animation: plpulse 1.2s var(--ease) infinite; }
@keyframes plpulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
.pl-fb { min-height: 3em; margin: 14px 0 16px; color: var(--ink2); max-width: 80ch; }
.pl-fb b.ok { color: var(--green); }
.pl-fb b.no { color: #fda4a4; }

/* ---------- C. guess ---------- */
.pl-gg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 800px) { .pl-gg { grid-template-columns: minmax(0, 1fr); } }
.pl-gq { min-width: 0; padding: 18px 18px 14px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid var(--line); transition: border-color .3s; }
.pl-gq.set { border-color: var(--line2); }
.pl-gq .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pl-gq .lb { min-width: 0; font-size: 15px; color: var(--ink2); }
.pl-gq .lb b { margin-right: 8px; font: 600 12px var(--mono); color: var(--mute); }
.pl-gq .val { font: 600 17px var(--mono); color: var(--ink); white-space: nowrap; }
.pl-sl { position: relative; margin-top: 6px; }
.pl-sl input:disabled { opacity: .75; }
.pl-real { position: absolute; top: 0; bottom: 0; width: 4px; border-radius: 2px; background: var(--green); left: calc(11px + (100% - 22px) * var(--x, 0)); transform: translateX(-50%); box-shadow: 0 0 0 3px rgba(139,198,81,.28); pointer-events: none; }
.pl-real[hidden] { display: none; }
.pl-scale { display: flex; justify-content: space-between; gap: 8px; font: 12px var(--mono); color: var(--mute); }
.pl-out { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink2); }
.pl-out[hidden] { display: none; }
.pl-out .v { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.pl-out .v b { color: var(--green); font-size: 16px; }
.pl-out p { margin: 8px 0 0; }
.pl-pts { margin-left: auto; font: 600 14px var(--mono); color: var(--ink); }
.pl-chip { padding: 3px 9px; border-radius: 999px; border: 1px solid; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pl-chip.s4 { color: var(--green); } .pl-chip.s3 { color: var(--cyan); } .pl-chip.s2 { color: var(--amber); } .pl-chip.s1 { color: #fda4a4; }
.pl-gfoot { margin-top: 20px; }
.pl-gfoot .btn:disabled { opacity: .5; cursor: default; transform: none; }

/* ---------- D. myth ---------- */
.pl-myth { max-width: 660px; margin-inline: auto; }
.pl-mtop { display: flex; justify-content: space-between; gap: 12px; }
.pl-mtop p { margin: 0; }
.pl-mstage { position: relative; margin: 16px 0 26px; }
.pl-mc { position: relative; min-height: 300px; padding: clamp(22px, 4vw, 34px); border-radius: 24px; border: 1px solid var(--line2); background: radial-gradient(420px 260px at 85% 0%, rgba(167,139,250,.16), transparent 70%), linear-gradient(170deg, #121a24, #0b1017); display: flex; flex-direction: column; justify-content: space-between; gap: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.45); touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; transition: transform .35s var(--ease), border-color .3s; }
.pl-mc.drag { transition: none; cursor: grabbing; }
.pl-mc.done { cursor: default; }
.pl-mc.ghost { position: absolute; inset: 0; min-height: 0; box-shadow: none; pointer-events: none; }
.pl-mc.g1 { transform: translateY(16px) scale(.95); opacity: .55; }
.pl-mc.g2 { transform: translateY(31px) scale(.9); opacity: .28; }
.pl-mc .n { margin: 0; font: 600 12px var(--mono); letter-spacing: .12em; color: var(--mute); }
.pl-mc .s { margin: 0; font-size: clamp(24px, 3.2vw, 34px); font-weight: 600; letter-spacing: -.025em; line-height: 1.16; }
.pl-mc .hint { margin: 0; display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--mute); }
.pl-mc .stamp { position: absolute; top: 20px; padding: 6px 12px; border-radius: 8px; border: 2px solid; font: 700 15px var(--font); letter-spacing: .16em; pointer-events: none; }
.pl-mc .stamp.m { right: 22px; color: var(--red); opacity: var(--m, 0); transform: rotate(8deg); }
.pl-mc .stamp.f { left: 22px; color: var(--green); opacity: var(--f, 0); transform: rotate(-8deg); }
.pl-mc.ok { border-color: rgba(139,198,81,.7); }
.pl-mc.bad { border-color: rgba(239,68,68,.7); }
.pl-mc.ok .n { color: var(--green); }
.pl-mc.bad .n { color: #fda4a4; }
.pl-mc .vd { margin: 0; font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.pl-mc .vd.m { color: #fda4a4; }
.pl-mc .vd.f { color: var(--green); }
.pl-mc .s2 { margin: 12px 0 0; font-size: 17px; font-weight: 600; color: var(--ink); }
.pl-mc .why { margin: 10px 0 0; color: var(--ink2); font-size: 16px; line-height: 1.5; }
.pl-mctl { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.pl-mb { min-width: 132px; justify-content: center; }
.pl-mb.m:hover { border-color: var(--red); }
.pl-mb.f:hover { border-color: var(--green); }

/* ---------- E. persona ---------- */
.pl-dots { display: flex; gap: 6px; }
.pl-dots i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); }
.pl-dots i.on { background: var(--green); }
.pl-dots i.cur { background: rgba(139,198,81,.5); }
.pl-q { margin-top: 6px; font-size: clamp(24px, 2.8vw, 32px); letter-spacing: -.025em; line-height: 1.15; }
.pl-popts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
@media (max-width: 640px) { .pl-popts { grid-template-columns: minmax(0, 1fr); } }
.pl-opt { text-align: left; padding: 15px 16px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: 16px; line-height: 1.35; transition: background .2s, border-color .2s; }
.pl-opt:hover { background: rgba(255,255,255,.07); border-color: var(--line2); }
.pl-opt.on { border-color: var(--green); background: rgba(139,198,81,.14); }
.pl-opt:disabled { cursor: default; }
.pl-pres { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
@media (max-width: 860px) { .pl-pres { grid-template-columns: minmax(0, 1fr); } .pl-pres .pl-pimg { aspect-ratio: 16 / 9; } }
.pl-pres .d2 { overflow-wrap: anywhere; }
.pl-stat { margin: 16px 0 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pl-stat b { font-size: clamp(40px, 4.4vw, 56px); font-weight: 600; letter-spacing: -.045em; line-height: 1; }
.pl-stat small { font-size: 16px; font-weight: 600; color: var(--ink2); }
.pl-stat span { flex-basis: 100%; font-size: 14px; color: var(--mute); }

/* ---------- F. expert ---------- */
.pl-xh { display: flex; justify-content: space-between; gap: 12px; }
.pl-xh p { margin: 0; }
.pl-prog, .pl-tbar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; margin: 12px 0 0; }
.pl-prog i, .pl-tbar i { display: block; height: 100%; background: var(--green); transition: width .3s var(--ease); }
.pl-tbar { margin: 6px 0 0; }
.pl-tbar i { width: 100%; background: var(--cyan); transition: none; }
.pl-tbar i.low { background: var(--amber); }
.pl-x .q { margin-top: 22px; }
.pl-x .opts button:disabled { cursor: default; color: var(--ink); }
.pl-name { display: grid; gap: 8px; margin-top: 22px; max-width: 420px; font-size: 14px; color: var(--ink2); }
.pl-name input { height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--ink); font: inherit; }
.pl-name input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- static mode (QA screenshots) and reduced motion ---------- */
html.static .pl-pulse, html.static .pl-e.start { animation: none; }
html.static .pl-track .fill, html.static .pl-track .mk { transition: none; }
@media (prefers-reduced-motion: reduce) { .pl-pulse { animation: none; } .pl-e.start { animation: none; } }
