/* Screen furniture (js/screens/chrome.js): paper, titles, frames, labels and line art.
   Everything is drawn with CSS/SVG; there are no painted background images. */

/* ---------------------------------------------------------------- paper */
.stage {
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(32, 35, 43, 0.075) 1.2px, transparent 1.6px);
  background-size: 28px 28px;
}
.stage .ch { pointer-events: none; }
.stage .ch.frame, .stage .ch.step { pointer-events: none; }

/* Halftone corner accents: a small, quiet manga texture. */
.stage > .tone { width: 360px; height: 300px; z-index: 0;
  background-image: radial-gradient(circle, currentColor 2.4px, transparent 2.8px); background-size: 13px 13px;
  -webkit-mask-image: radial-gradient(circle at var(--mx) var(--my), #000 0, rgba(0,0,0,.55) 90px, transparent 260px);
  mask-image: radial-gradient(circle at var(--mx) var(--my), #000 0, rgba(0,0,0,.55) 90px, transparent 260px); opacity: 0.55; }
.tone.coral { color: var(--coral); }
.tone.cobalt { color: var(--cobalt); }
.tone.tl { left: 0; top: 0; --mx: 0; --my: 0; }
.tone.tr { right: 0; top: 0; --mx: 100%; --my: 0; }
.tone.bl { left: 0; bottom: 0; --mx: 0; --my: 100%; }
.tone.br { right: 0; bottom: 0; --mx: 100%; --my: 100%; }

/* ---------------------------------------------------------------- type */
.wm { display: flex; align-items: baseline; gap: 0.18em; white-space: nowrap; line-height: 1; }
.wm-a { font: 800 italic 1em var(--f-ui); letter-spacing: 0.005em; color: var(--graphite); }
.wm-b { font: 400 0.92em var(--f-brush); color: var(--coral); transform: rotate(-3deg) translateY(-0.02em); display: inline-block; }
.wm.stack { flex-direction: column; align-items: flex-start; gap: 0; }
.wm.stack .wm-b { margin-left: 0.8em; color: var(--cobalt); }
.wm.flat .wm-b { font: 800 italic 1em var(--f-ui); transform: none; color: var(--graphite); }
.wm.flat .wm-a { color: var(--graphite); }

.hd { font: 800 italic 1em var(--f-ui); letter-spacing: -0.005em; line-height: 0.95; color: var(--graphite); text-transform: uppercase; white-space: nowrap; }
.hd .coral { color: var(--coral); }
.hd .cobalt { color: var(--cobalt); }
.swash { display: block; }
.sw-coral { color: var(--coral); }
.sw-cobalt { color: var(--cobalt); }
.sw-grey { color: #8f9199; }
.ch .swash.ul, .m-card-head .swash.ul { position: absolute; height: 14px; }

.lbl { display: flex; align-items: center; font: 700 20px var(--f-ui); letter-spacing: 0.08em; color: var(--graphite); white-space: nowrap; }
.ticks { position: relative; width: 44px; height: 60px; flex: none; }
.ticks i { position: absolute; height: 5px; border-radius: 3px; background: var(--coral); width: 26px; }
.ticks.l i:nth-child(1) { right: 4px; top: 10px; transform: rotate(30deg); }
.ticks.l i:nth-child(2) { right: 0; top: 28px; }
.ticks.l i:nth-child(3) { right: 4px; top: 46px; transform: rotate(-30deg); }
.ticks.r i:nth-child(1) { left: 4px; top: 10px; transform: rotate(-30deg); }
.ticks.r i:nth-child(2) { left: 0; top: 28px; }
.ticks.r i:nth-child(3) { left: 4px; top: 46px; transform: rotate(30deg); }
.ticks.r i:nth-child(2), .ticks.l i:nth-child(2) { background: var(--cobalt); }

.hr { background: var(--graphite); opacity: 0.8; }
.hr.thin { opacity: 0.35; }
.hr.dark { background: #5a5f69; opacity: 1; }
.rule-title { display: flex; align-items: center; gap: 22px; font: 700 34px var(--f-ui); letter-spacing: 0.08em; color: #2b2d33; }
.rule-title i { flex: 1; height: 2px; background: currentColor; opacity: 0.6; }
.rule-title.dark { font-size: 22px; color: #c9ccd3; font-weight: 500; gap: 14px; }

.frame { border: 2px solid var(--graphite); border-radius: 12px; background: #fffdf8; }
.card-head { display: flex; align-items: center; gap: 16px; padding-left: 22px; border-radius: 12px 12px 0 0; color: #fff; font: 700 26px var(--f-ui); letter-spacing: 0.06em; }
.card-head.coral { background: var(--coral); }
.card-head .ico { font-size: 28px; }

/* ---------------------------------------------------------------- S01 */
.s01-wm { font-size: 60px; }
.s01-wm .wm { position: absolute; left: 0; top: 4px; }
.s01-wm .ul { left: 316px; top: 70px; width: 200px; }
.s01-kicker { font: 700 19px var(--f-ui); letter-spacing: 0.14em; color: var(--ink-2); }
.s01-head .hd { position: absolute; left: 0; font-size: 90px; letter-spacing: -0.01em; }
.s01-head .l1 { top: 4px; }
.s01-head .l2 { top: 100px; left: 40px; }
.s01-head .ul { left: 130px; top: 186px; width: 420px; height: 16px; }
.s01-page { background: #fffdf8; border-radius: 6px; transform: rotate(2deg); box-shadow: 0 2px 0 rgba(32, 35, 43, 0.08), 0 18px 40px rgba(32, 35, 43, 0.12); border: 1.5px solid #e6ded0; }
.s01-page::before { content: ''; position: absolute; inset: 0; border-radius: 6px; background: repeating-linear-gradient(transparent 0 39px, rgba(47, 92, 246, 0.08) 39px 41px); }
.s01-page .tape { position: absolute; left: 50%; top: -16px; width: 150px; height: 38px; margin-left: -75px; background: rgba(247, 194, 62, 0.55); transform: rotate(-3deg); z-index: 2; }
.rm-top { position: absolute; left: 34px; right: 34px; top: 34px; display: flex; justify-content: space-between; align-items: center; }
.rm-role { display: flex; align-items: center; gap: 12px; font: 700 26px var(--f-ui); letter-spacing: 0.06em; color: var(--graphite); }
.rm-role .ico { font-size: 32px; color: var(--cobalt); }
.rm-timer { display: flex; align-items: center; gap: 10px; padding: 8px 18px; border: 3px solid var(--graphite); border-radius: 12px; background: var(--coral); color: var(--graphite); font: 700 40px var(--f-ui); font-variant-numeric: tabular-nums; }
.rm-timer .ico { font-size: 34px; }
.rm-canvas { position: absolute; left: 34px; right: 34px; top: 110px; bottom: 110px; background: #fff; border: 2px solid var(--graphite); border-radius: 10px; overflow: hidden; }
.rm-draw { position: absolute; inset: 20px; }
.rm-pal { position: absolute; left: 34px; bottom: 34px; display: flex; align-items: center; gap: 16px; }
.rm-pal i { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.12); }
.rm-pal i.k { background: var(--graphite); outline: 3px solid var(--cobalt); outline-offset: 3px; }
.rm-pal i.r { background: var(--coral); }
.rm-pal i.b { background: var(--cobalt); }
.rm-pal i.y { background: var(--y, #f7c23e); }
.rm-pal i.g { background: #3fae49; }
.rm-pal .ico { font-size: 38px; margin-left: 8px; color: var(--ink-2); }
.bubble { display: flex; align-items: center; justify-content: center; gap: 14px; background: #fff; border: 3px solid var(--graphite); border-radius: 18px; font: 400 34px var(--f-hand); box-shadow: 0 8px 20px rgba(32, 35, 43, 0.14); z-index: 3; }
.bubble b { font-weight: 700; }
.bubble .ico { font-size: 32px; color: var(--danger); }
.bubble.ok { background: #e2f8e6; border-color: #0f7a45; }
.bubble.ok .ico { color: #0f7a45; }
.bubble.b1 { transform: rotate(-4deg); }
.bubble.b2 { transform: rotate(3deg); }
.bubble::after { content: ''; position: absolute; bottom: -14px; left: 40px; width: 22px; height: 22px; background: inherit; border-right: 3px solid; border-bottom: 3px solid; border-color: inherit; transform: rotate(45deg); }
.draw-loop svg { width: 100%; height: 100%; display: block; }
.s01-star { transform: rotate(-12deg); }
.s01-star svg, .s01-crown svg, .s04-cat svg, .s12-trophy svg, .s12-star svg { width: 100%; height: 100%; display: block; }
.s01-crown { transform: rotate(14deg); }

/* ---------------------------------------------------------------- S02 */
.s02-title { display: flex; align-items: center; justify-content: center; gap: 22px; font-size: 92px; }

/* ---------------------------------------------------------------- S03 */
.s03-wm { font-size: 52px; }
.s03-title { display: flex; align-items: center; justify-content: center; gap: 22px; font-size: 104px; }
.s03-sub { justify-content: center; font: 400 26px var(--f-hand); letter-spacing: 0.02em; color: var(--ink-2); }
.s03-card { border-width: 3px; border-radius: 14px; box-shadow: 0 10px 30px rgba(32, 35, 43, 0.08); }
.s03-card.coral { border-color: var(--coral); }
.s03-card.cobalt { border-color: var(--cobalt); }
.s03-head { display: grid; place-items: center; font-size: 76px; }
.s03-head .ul { left: 70px; right: 70px; bottom: 2px; width: auto; }
.stage .s03-label { color: var(--graphite); letter-spacing: 0.06em; }
.s03-hint { display: flex; align-items: center; gap: 16px; font: 400 22px/1.3 var(--f-hand); color: var(--ink-2); }
.s03-hint svg:not(.ico) { width: 58px; height: 50px; flex: none; }
.s03-hint .ico { font-size: 40px; color: var(--cobalt); }
.s03-star svg { width: 100%; height: 100%; display: block; transform: rotate(-10deg); }

/* ---------------------------------------------------------------- S04 */
.s04-wm { font-size: 50px; }
.s04-title { display: flex; align-items: center; gap: 18px; font-size: 64px; }
.s04-title .hd { font-style: normal; }
.s04-title .slashes { font: 800 italic 54px var(--f-ui); color: var(--coral); letter-spacing: -0.08em; }
.s04-title .line { flex: 1; height: 2px; background: var(--hair); margin-left: 18px; }
.s04-codebox { border-width: 1.5px; border-radius: 10px; }
.s04-codelbl { font: 600 18px var(--f-ui); letter-spacing: 0.1em; color: var(--ink-2); }
.s04-cat { transform: rotate(-8deg); }

/* ---------------------------------------------------------------- S05 */
.s05-card { background: #f8f4ec; }
.s05-only { justify-content: center; font: 700 22px var(--f-ui); color: var(--ink-2); letter-spacing: 0.06em; }
.s05-canvas { border: 2.5px solid #7c7f87; border-radius: 14px; background: #fffdf9; }
.s05-soon { display: grid; justify-items: center; align-content: center; gap: 14px; color: #9a9ca3; font: 400 28px var(--f-hand); }
.s05-soon .ico { font-size: 60px; }
.s05-starts { justify-content: center; font: 700 28px var(--f-ui); letter-spacing: 0.04em; }
.s05-ready { display: grid; justify-items: center; gap: 8px; font: 700 28px var(--f-hand); color: var(--ink-2); transform: rotate(-6deg); }
.s05-ready svg { width: 96px; height: 84px; }
.s05-cat { display: block; }

/* ---------------------------------------------------------------- S06 / practice */
.s06-wm { font-size: 58px; }
.s06-deco { border-left: 83px solid rgba(32, 35, 43, 0.5); border-right: 83px solid rgba(32, 35, 43, 0.5); height: 2px !important; }
.s06-rail { border: 1.5px solid #b9bcc3; border-radius: 10px; background: #f8f5ee; }
.s06-canvasf { border: 1.5px solid #4a5a8a; border-radius: 8px; background: #faf7f0; }
.s06-refcard { border: 1.5px solid var(--coral); border-radius: 12px; }

/* ---------------------------------------------------------------- S07 */
.s07-title { display: grid; place-items: center; font-size: 80px; }
.s07-title .ul { left: 30px; right: 30px; bottom: 0; width: auto; }
.s07-canvasf { border: 2.5px solid var(--graphite); border-radius: 10px; background: #fff; }
.s07-side { border: 1.5px solid #9a9ca3; border-radius: 12px; background: #fffcf4; }
.s07-sidetop { background: #e3eafd; border-radius: 11px 11px 0 0; }
.s07-hr { opacity: 0.4; }
.s07-by { font: 700 22px var(--f-ui); letter-spacing: 0.08em; color: #4a4c52; }
.s07-yg { font: 700 30px var(--f-ui); letter-spacing: 0.02em; }

/* ---------------------------------------------------------------- S08 */
.s08-title { display: grid; place-items: center; font-size: 92px; }
.s08-title .hd { font: 400 1em var(--f-brush); transform: rotate(-2deg); }
.s08-title .ul { left: 120px; right: 120px; bottom: -14px; width: auto; }

/* ---------------------------------------------------------------- S09 */
.s09-title { display: flex; align-items: center; justify-content: center; gap: 24px; font-size: 78px; }
.s09-title .hd { font-style: normal; }
.s09-title .sl { font: 800 italic 44px var(--f-ui); color: var(--coral); letter-spacing: -0.1em; }
.s09-panel { background: #1d2024; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
.s09-vr { background: #3a3e46; }

/* ---------------------------------------------------------------- S10 */
.s10-qlbl { justify-content: center; font: 800 40px var(--f-ui); letter-spacing: 0.02em; }
.s10-cardf { border: 0; border-radius: 4px; background: #fcfaf7; box-shadow: 0 2px 0 rgba(32, 35, 43, 0.06), 0 10px 26px rgba(32, 35, 43, 0.12); }
.s10-lab { justify-content: center; font: 700 26px var(--f-ui); letter-spacing: 0.06em; }

/* ---------------------------------------------------------------- S11 */
.s11-wm { display: flex; align-items: center; gap: 18px; font-size: 44px; color: var(--coral); }
.s11-wm > .ico { font-size: 54px; transform: rotate(-10deg); }
.s11-reflbl { font: 500 16px var(--f-ui); letter-spacing: 0.3em; color: #6a6c73; }
.s11-vr { background: #9a9ca3; }
.s11-panel { border: 1.5px solid #cfc9bd; border-radius: 12px; background: transparent; }
.s11-hr { opacity: 0.25; }
.s11-foot { justify-content: flex-end; font: 500 15px var(--f-ui); letter-spacing: 0.3em; color: #6a6c73; }

/* ---------------------------------------------------------------- S11-2P */
.s112-title { display: grid; justify-items: center; align-content: start; font-size: 96px; transform: rotate(-4deg); }
.s112-title .ul { left: 60px; right: 60px; top: 196px; width: auto; }
.s112-banner .swash { position: absolute; inset: 0; width: 100%; height: 100%; }
.s112-banner span { position: absolute; inset: 0; display: grid; place-items: center; font: 400 58px var(--f-brush); color: #fff; letter-spacing: 0.02em; transform: rotate(-1deg); }
.s112-sub { justify-content: center; font: 400 26px var(--f-hand); color: #2b2d33; letter-spacing: 0.06em; }

/* ---------------------------------------------------------------- S12 */
.s12-title { display: flex; align-items: center; justify-content: center; gap: 22px; font-size: 108px; }
.s12-title .hd { font: 400 1em var(--f-brush); transform: rotate(-2deg); }
.s12-trophy { transform: rotate(-5deg); }

/* ---------------------------------------------------------------- S13 */
.s13-title { display: flex; align-items: center; justify-content: center; gap: 22px; font-size: 104px; }
.s13-title .hd { font: 400 1em var(--f-brush); transform: rotate(-2deg); }
.s13-title .ul { left: 150px; right: 150px; bottom: -12px; width: auto; }
.step { border: 2px solid var(--graphite); border-radius: 14px; background: #fffdf8; display: grid; grid-template-rows: 80px 1fr; overflow: hidden; }
.step-head { display: flex; align-items: center; gap: 16px; padding: 0 18px; font: 700 32px var(--f-ui); font-stretch: 85%; letter-spacing: 0.01em; white-space: nowrap; }
.step-head .num { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 38px var(--f-ui); flex: none; }
.num.coral { background: var(--coral); }
.num.cobalt { background: var(--cobalt); }
.step-body { position: relative; }
.sp-prompt .ref-card { position: absolute; left: 30px; top: 8px; width: 240px; height: 330px; background: #fff; border: 2px solid var(--graphite); border-radius: 12px; overflow: hidden; transform: rotate(-3deg); box-shadow: 0 6px 14px rgba(32, 35, 43, 0.14); }
.rc-head { display: flex; align-items: center; gap: 10px; height: 46px; padding-left: 14px; background: var(--coral); color: #fff; font: 700 20px var(--f-ui); letter-spacing: 0.06em; }
.rc-pic { margin: 14px; height: 200px; border-radius: 8px; background: repeating-linear-gradient(135deg, #f6f1e7 0 14px, #efe8da 14px 28px); display: grid; place-items: center; font: 400 110px var(--f-brush); color: var(--coral); }
.rc-name { display: grid; gap: 8px; justify-items: center; }
.rc-name i { height: 12px; width: 150px; border-radius: 6px; background: var(--graphite); }
.rc-name i + i { width: 90px; background: #cfc9bd; }
.sp-note { position: absolute; right: 18px; bottom: 40px; max-width: 150px; text-align: center; display: grid; justify-items: center; transform: rotate(-8deg); }
.sp-note b { font: 400 34px var(--f-brush); color: var(--graphite); }
.sp-note span { font: 400 20px var(--f-hand); color: var(--coral); }
.sp-draw .sheet { position: absolute; left: 22px; top: 6px; width: 320px; height: 330px; background: #fff; border: 1.5px solid #ddd6c8; transform: rotate(2deg); box-shadow: 0 6px 14px rgba(32, 35, 43, 0.12); overflow: hidden; }
.sp-draw .sheet svg { position: absolute; left: 6%; top: 10%; width: 88%; height: 80%; }
.sp-draw .swatches { position: absolute; right: 22px; top: 110px; width: 56px; padding: 10px 0; border: 1.5px solid #cfc9bd; border-radius: 10px; display: grid; justify-items: center; gap: 12px; background: #fff; }
.swatches i { width: 30px; height: 30px; border-radius: 50%; }
.swatches i.k { background: var(--graphite); }
.swatches i.r { background: var(--coral); }
.swatches i.b { background: var(--cobalt); }
.swatches .ico { font-size: 30px; }
.sp-guess { position: absolute; inset: 0 14px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sp-guess .mini { position: relative; border: 1.5px solid #9fb2f0; border-radius: 10px; padding: 34px 10px 10px; display: grid; gap: 10px; align-content: start; }
.sp-guess .mini.vote { border-color: #f5a89f; }
.sp-guess .tag { position: absolute; left: 50%; top: -14px; transform: translateX(-50%) rotate(-3deg); padding: 4px 18px; font: 400 26px var(--f-brush); color: #fff; }
.tag.cobalt { background: var(--cobalt); }
.tag.coral { background: var(--coral); }
.sp-guess .thumb { position: relative; height: 200px; background: #fff; border: 1.5px solid #ddd6c8; overflow: hidden; }
.sp-guess .thumb svg { position: absolute; left: 6%; top: 8%; width: 88%; height: 84%; }
.sp-guess .field-mock { height: 44px; border: 2.5px solid #0f7a45; border-radius: 8px; background: #e2f8e6; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; font: 600 20px var(--f-body); }
.sp-guess .field-mock .ico { color: #0f7a45; font-size: 22px; }
.sp-guess .vote-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin-top: 6px; }
.vote-bar .a { flex: 5; background: var(--cobalt); }
.vote-bar .b { flex: 3; background: var(--coral); }
.sp-guess .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-guess .pair .thumb { height: 200px; }
.sp-guess .pair i { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 6px; background: var(--graphite); color: #fff; font: 700 18px var(--f-ui); font-style: normal; display: grid; place-items: center; }

/* Line art drawn by art.js */
svg.doodle { overflow: visible; }

/* ---------------------------------------------------------------- avatars, badges, ranks */
.avatar.monogram { display: grid; place-items: center; overflow: hidden; container-type: size; }
.avatar.monogram .av-shape { position: absolute; width: 62%; height: 62%; left: 19%; top: 19%; }
.av-shape.blob-a { border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%; transform: rotate(-8deg); }
.av-shape.blob-b { border-radius: 50%; }
.av-shape.blob-c { border-radius: 28%; transform: rotate(10deg); }
.avatar.monogram span { position: relative; font: 400 44cqmin var(--f-brush) !important; color: #fff !important; line-height: 1; transform: rotate(-4deg); }
.winner-badge { display: flex; align-items: center; gap: 14px; padding-left: 20px; background: var(--coral); color: #fff; font: 800 32px var(--f-ui); letter-spacing: 0.14em; clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%); }
.winner-badge .ico { font-size: 30px; }
.s12-rank .blot { position: absolute; top: 0; background: #9a9ca3; border-radius: 55% 45% 52% 48% / 48% 55% 45% 52%; transform: rotate(-10deg); }
.s12-rank .blot.top { background: var(--coral); }
.s12-crown { overflow: visible; }

/* ---------------------------------------------------------------- phone headings */
.m-wordmark, .m-wm { font-size: 34px; justify-content: center; }
.m-wm { font-size: 24px; }
.m-headline { display: grid; gap: 2px; text-align: left; }
.m-headline .hd { font-size: 44px; white-space: normal; }
.m-tagline { margin: 0; text-align: center; font: 700 15px var(--f-ui); letter-spacing: 0.1em; color: var(--ink-2); text-transform: uppercase; }
h1.m-title, h2.m-card-head, h1.m-lobby-title, h1.s15-title { margin: 0; font-size: 40px; text-align: center; }
h1.m-title .hd, h1.m-lobby-title .hd { display: inline; white-space: normal; }
h2.m-card-head { position: relative; font-size: 38px; padding-bottom: 8px; }
h2.m-card-head .ul { left: 20%; right: 20%; bottom: 0; width: auto; height: 10px; }
h1.m-lobby-title { text-align: left; font-size: 36px; display: flex; align-items: center; gap: 10px; }
h1.m-lobby-title .slashes { font: 800 italic 30px var(--f-ui); color: var(--coral); }
h1.s15-title { font-size: 30px; text-align: left; }
ol.m-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.m-steps li { display: flex; gap: 12px; align-items: center; border: 1.5px solid var(--graphite); border-radius: 12px; padding: 10px 12px; background: #fffdf8; }
.m-steps .num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 24px var(--f-ui); flex: none; }
.m-steps strong { display: block; font: 700 20px var(--f-ui); }
.m-steps small { display: block; font: 400 14px var(--f-body); color: var(--ink-2); }
.m-hero { position: relative; width: 100%; max-width: 420px; margin: 4px auto 0; aspect-ratio: 4 / 3; background: #fff; border: 2px solid var(--graphite); border-radius: 12px; box-shadow: 0 8px 20px rgba(32, 35, 43, 0.1); transform: rotate(-1.5deg); }
.m-hero .draw-loop { position: absolute; inset: 14px; }
