/* DOT MATGO — screens.css (screens-A)
   splash · title (+ 출석) · newgame · synopsis · credits · cutscene · result
   Prefixes: fk- (screen kit), scr- (screen roots), sp- ttl- dly- ng- syn- cr- cs- rs- */

/* ======================================================================= kit */
html.dg-noanim *, html.dg-noanim *::before, html.dg-noanim *::after { animation: none !important; transition: none !important; }
.fk-head { flex: none; height: 44px; padding: 4px 8px 7px; background: var(--hwaRedD);   /* 7 px below = 4 + the 3 px gold line: content sits in the middle of the red */
  box-shadow: 0 2px 0 0 var(--ink), inset 0 -3px 0 0 var(--goldD); }
.fk-head-title { flex: 1; min-width: 0; font-family: var(--font-title); font-size: 16px; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 1px 0 var(--ink), 0 -1px 0 var(--ink), 0 2px 0 var(--ink); }
.fk-back { min-width: 38px; min-height: 34px; padding: 4px 8px 6px; }
.fk-icon { flex: none; }
@keyframes fk-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes fk-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes fk-glow { 0%, 100% { box-shadow: var(--px-border), 0 0 0 3px rgba(255,213,65,0); } 50% { box-shadow: var(--px-border), 0 0 0 4px rgba(255,213,65,.9); } }
/* 단청 band (red / jade / blue / yellow) used as a trim on title plates and title cards */
.scr-title, .scr-result, .scr-newgame, .scr-synopsis { --dan: linear-gradient(to bottom, var(--hwaRed) 0 2px, var(--jade) 2px 4px, var(--hwaBlue) 4px 6px, var(--yellow) 6px 8px); }

/* ======================================================================= splash */
.scr-splash { background: var(--cream); align-items: center; justify-content: center; cursor: pointer;
  background-image: radial-gradient(rgba(115,62,57,.07) 1px, transparent 1px); background-size: 6px 6px; }
.sp-center { display: flex; flex-direction: column; align-items: center; margin-top: -40px; }
.sp-duck-box { position: relative; display: flex; flex-direction: column; align-items: center; }
.sp-shadow { width: 90px; height: 8px; background: rgba(24,20,37,.14); margin-top: -12px; }
.sp-brand { display: flex; font-family: var(--font-title); font-size: 32px; letter-spacing: 4px; color: var(--ink); margin-top: 18px; line-height: 1;
  text-shadow: 1px 0 0 var(--ink), 2px 2px 0 rgba(247,118,34,.4); }
.sp-letter { display: inline-block; }
.sp-space { width: 10px; }
.scr-splash.play .sp-letter { animation: sp-in .32s steps(4) both; }
.sp-letter:nth-child(1) { animation-delay: .55s !important; } .sp-letter:nth-child(2) { animation-delay: .62s !important; }
.sp-letter:nth-child(3) { animation-delay: .69s !important; } .sp-letter:nth-child(4) { animation-delay: .76s !important; }
.sp-letter:nth-child(5) { animation-delay: .83s !important; } .sp-letter:nth-child(6) { animation-delay: .90s !important; }
.sp-letter:nth-child(7) { animation-delay: .97s !important; } .sp-letter:nth-child(8) { animation-delay: 1.04s !important; }
@keyframes sp-in { 0% { opacity: 0; transform: translateY(-16px); } 60% { opacity: 1; transform: translateY(3px); } 100% { opacity: 1; transform: translateY(0); } }
.sp-pres { font-size: 12px; color: var(--brownL); letter-spacing: 6px; margin-top: 10px; }
.scr-splash.play .sp-pres { animation: px-fade-in .4s steps(4) 1.25s both; }
.sp-touch { position: absolute; left: 0; right: 0; bottom: 22%; text-align: center; color: var(--brown); font-size: 13px; visibility: hidden; }
.sp-touch.on { visibility: visible; animation: px-blink 1.1s steps(1) infinite; }
.sp-foot { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-family: var(--font-small); font-size: 10px; color: var(--tan); }

/* ======================================================================= title */
.scr-title { background: var(--night); }
.ttl-bg, .syn-bg, .cr-bg, .rs-bg { position: absolute; inset: 0; overflow: hidden; }
.ttl-col { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 50px 14px 8px; gap: 8px; }
/* top-left corner: ⚙ 설정 + ? 도움말 */
.ttl-top { position: absolute; z-index: 3; top: 8px; left: 8px; display: flex; gap: 6px; }
.ttl-top .ttl-ico { min-width: 44px; min-height: 42px; padding: 4px 8px 6px; margin: 0; justify-content: center;
  background: rgba(16,22,46,.88); box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 1px rgba(108,242,255,.35), inset 0 -3px 0 rgba(0,0,0,.35); }
.ttl-top .ttl-ico .px-btn-icon { margin: 0; }
.ttl-logo { display: flex; justify-content: center; filter: drop-shadow(0 4px 0 rgba(16,22,46,.75)); }
.ttl-logo-art { animation: fk-bob 2.4s steps(4) infinite; }
.ttl-sub-row { display: flex; justify-content: center; margin-top: -2px; }
.ttl-sub { display: flex; align-items: center; gap: 10px; padding: 4px 18px 6px; position: relative; white-space: nowrap;
  background: var(--hwaRed); color: var(--white); font-family: var(--font-title); font-size: 17px; letter-spacing: 3px; line-height: 1.4;
  box-shadow: var(--px-border), inset 0 -3px 0 var(--hwaRedD), inset 0 2px 0 rgba(255,255,255,.3), 0 6px 0 rgba(16,22,46,.55);
  text-shadow: 0 2px 0 var(--hwaRedD); }
.ttl-sub::before, .ttl-sub::after { content: ''; position: absolute; left: 6px; right: 6px; height: 2px; background: var(--gold); }
.ttl-sub::before { top: 3px; } .ttl-sub::after { bottom: 4px; background: var(--jade); }
.ttl-sub-dot { width: 6px; height: 6px; background: var(--gold); box-shadow: 0 0 0 2px var(--ink); flex: none; }
.ttl-menu { width: 100%; max-width: 300px; margin-top: 14px; display: flex; flex-direction: column; align-items: center; }
.ttl-main.big { min-height: 58px; justify-content: flex-start; padding-left: 10px; box-shadow: var(--px-border), inset 0 -4px 0 rgba(0,0,0,.25), inset 0 2px 0 rgba(255,255,255,.45), 0 6px 0 rgba(16,22,46,.6); }
.ttl-new.big { justify-content: center; font-family: var(--font-title); font-size: 20px; letter-spacing: 2px; }
.ttl-cont-face { box-shadow: var(--px-border); background: var(--sand); margin-right: 2px; }
.ttl-cont-label { font-family: var(--font-title); font-size: 18px; }
.ttl-cont-sub { margin-left: auto; font-family: var(--font-small); font-size: 10px; color: var(--brownD); max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.ttl-second { margin-top: 12px !important; min-height: 30px; padding: 3px 14px 5px; font-size: 11px; color: var(--grayL);
  background: rgba(16,22,46,.82); box-shadow: 0 0 0 2px var(--ink), inset 0 -2px 0 rgba(0,0,0,.35); }
.ttl-chip { display: flex; align-items: center; gap: 6px; padding: 3px 10px 4px; cursor: pointer; font-family: var(--font-small); font-size: 10px; color: var(--dokFire);
  background: rgba(16,22,46,.75); box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 1px rgba(108,242,255,.35); margin-top: 10px; }
.ttl-foot { position: relative; z-index: 1; flex: none; margin-bottom: 8px; padding: 3px 0 4px; text-align: center;
  font-family: var(--font-small); font-size: 10px; color: var(--grayL); background: rgba(16,22,46,.7); white-space: nowrap; }
/* bottom nav: the hub tab bar look (.hub-tabs / .hub-tab in meta.css) — 이야기 · 자유 대전 · 친구 대전 · 시놉시스 */
.hub-tabs.ttl-nav { height: 64px; padding: 7px 8px 5px; gap: 6px; }
.ttl-nav .hub-tab-label { font-size: 11px; }

/* 출석 체크 */
.dly-modal { width: 318px; }
.dly-body { white-space: normal; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dly-lead { font-size: 12px; color: var(--brownD); }
/* seven tiles of one size (4 + 3, second row centred). The 2px ink outline is a box-shadow outside each tile; the row's 2px side
   padding puts the outer tiles' outlines on the 고마워요 button's edge line (the modal body's own 2px padding keeps them unclipped).
   'today' glows INSIDE its outline. */
.dly-days { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 6px; width: 100%; box-sizing: border-box; padding: 6px 2px 4px; }
.dly-day { position: relative; flex: 0 0 calc((100% - 18px) / 4); box-sizing: border-box; height: 64px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px; padding: 3px 2px; background: var(--white); box-shadow: var(--px-border); }
.dly-day.big { background: var(--yellowL); }
.dly-day.on { background: var(--sand); }
.dly-day.today { background: var(--gold); animation: dly-glow 1s steps(2) infinite; }
@keyframes dly-glow { 0%, 100% { box-shadow: var(--px-border), inset 0 0 0 3px rgba(255,248,200,0); } 50% { box-shadow: var(--px-border), inset 0 0 0 3px rgba(255,248,200,.95); } }
.dly-day-n { font-family: var(--font-small); font-size: 10px; line-height: 14px; color: var(--brown); }
.dly-day-v { font-size: 11px; line-height: 15px; font-weight: 700; }
.dly-stamp { position: absolute; right: -2px; top: -6px; padding: 0 3px; font-family: var(--font-small); font-size: 9px; color: var(--white); background: var(--hwaRed);
  box-shadow: 0 0 0 1px var(--ink); transform: rotate(12deg); }
.dly-get { display: flex; align-items: center; gap: 6px; font-family: var(--font-title); font-size: 20px; color: var(--hwaRedD); margin-top: 2px; }
.dly-streak { font-family: var(--font-small); font-size: 10px; color: var(--grayD); }

/* ======================================================================= newgame */
.scr-newgame { background: var(--hanji);
  background-image: radial-gradient(rgba(115,62,57,.08) 1px, transparent 1px); background-size: 6px 6px; }
.ng-body { padding: 4px 8px 10px; }
.ng-lead { text-align: center; padding: 10px 6px 2px; }
.ng-lead-t { font-family: var(--font-title); font-size: 16px; color: var(--ink); }
.ng-lead-s { font-size: 11px; color: var(--brown); margin-top: 3px; word-break: keep-all; line-height: 1.5; white-space: pre-line; }
.ng-picks { display: flex; gap: 12px; justify-content: center; padding: 10px 6px 6px; }   /* the two cards fill the row: same edge line as the name panel and the feature tiles */
.ng-card { position: relative; flex: 1 1 0; min-width: 0; font: inherit; color: var(--ink); border: 0; border-radius: 0; margin: 0; padding: 8px 6px; cursor: pointer;
  background: var(--white); display: flex; flex-direction: column; align-items: center; -webkit-appearance: none; appearance: none;
  box-shadow: var(--px-border), inset 0 -4px 0 rgba(0,0,0,.12); }
.ng-card.on { background: var(--yellowL); box-shadow: var(--px-border), inset 0 0 0 3px var(--hwaRed), inset 0 -7px 0 rgba(0,0,0,.12); }   /* ring inside: both cards keep one size */
.ng-frame { width: 112px; height: 132px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; box-shadow: var(--px-border);
  background-color: #2a3466; background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(to bottom, transparent 72%, var(--blanket) 72%);
  background-size: 9px 9px, 100% 100%; }
.ng-card:nth-child(2) .ng-frame { background-color: #4a2e52; }
.ng-card-name { font-family: var(--font-title); font-size: 17px; margin-top: 6px; }
.ng-card-tag { font-family: var(--font-small); font-size: 10px; color: var(--brown); }
.ng-check { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; display: none; align-items: center; justify-content: center;
  background: var(--jade); color: var(--white); font-weight: 700; box-shadow: var(--px-border); }
.ng-card.on .ng-check { display: flex; }
.ng-name { margin: 12px 6px 6px; }
.ng-label { display: block; font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.ng-name-row { display: flex; align-items: center; gap: 6px; }
.ng-name-row .ng-input { flex: 1 1 auto; width: auto; min-width: 0; height: 40px; font-size: 16px; }
.ng-dice { flex: none; width: 40px; height: 40px; min-height: 40px; padding: 0 0 2px; font-family: var(--font-title); font-size: 18px; }
.ng-dice.rolling { animation: fk-spin .4s steps(8) infinite; }
.ng-err { color: var(--hwaRed); font-size: 11px; min-height: 17px; margin-top: 2px; }
.ng-hint { font-family: var(--font-small); font-size: 10px; color: var(--brown); }
.ng-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 6px 4px; }
.ng-feat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 8px 4px 7px; background: var(--night); color: var(--white); box-shadow: var(--px-border); }
.ng-feat-t { font-size: 11px; font-weight: 700; color: var(--yellowL); margin-top: 2px; }
.ng-feat-s { font-family: var(--font-small); font-size: 10px; color: var(--grayL); line-height: 1.35; word-break: keep-all; }
.ng-foot { flex: none; padding: 8px 12px 10px;   /* + the button's 2px margin = the panels' edge line above */
  background: var(--hanjiD); box-shadow: 0 -2px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.4); position: relative; z-index: 2; }
.ng-start.big { min-height: 46px; }

/* ======================================================================= synopsis */
.scr-synopsis { background: var(--night); }
.syn-scroll { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin: 18px 16px 0; }
.syn-roller { position: relative; flex: none; height: 14px; background: var(--hwaRedD); box-shadow: var(--px-border), inset 0 3px 0 var(--hwaRed), inset 0 -3px 0 #5a0c16; }
.syn-roller::before, .syn-roller::after { content: ''; position: absolute; top: -3px; width: 10px; height: 20px; background: var(--goldD); box-shadow: var(--px-border), inset 0 3px 0 var(--gold); }
.syn-roller::before { left: -8px; } .syn-roller::after { right: -8px; }
.syn-paper { flex: 1 1 auto; min-height: 0; margin: 0 8px; padding: 14px 16px 18px; background: var(--hanji); color: var(--ink);
  background-image: radial-gradient(rgba(140,18,32,.08) 1px, transparent 1px); background-size: 6px 6px;
  box-shadow: 2px 0 0 var(--ink), -2px 0 0 var(--ink), inset 0 6px 0 rgba(115,62,57,.12), inset 0 -6px 0 rgba(115,62,57,.12); cursor: pointer; }
.syn-ribbon { width: max-content; margin: 0 auto 6px; padding: 2px 12px 3px; background: var(--hwaRed); color: var(--white); font-size: 11px; font-weight: 700; letter-spacing: 2px; box-shadow: var(--px-border); }
.syn-title { text-align: center; font-family: var(--font-title); font-size: 17px; margin-bottom: 8px; word-break: keep-all; }
.syn-logline { font-size: 11px; line-height: 1.6; background: var(--hanjiD); padding: 6px 8px; box-shadow: inset 4px 0 0 var(--hwaBlue); color: var(--brownD); word-break: keep-all; }
.syn-divider { display: flex; justify-content: center; gap: 6px; margin: 12px 0 2px; }
.syn-dv { width: 8px; height: 8px; box-shadow: 0 0 0 1px var(--ink); }
.syn-dv.r { background: var(--hwaRed); } .syn-dv.b { background: var(--hwaBlue); } .syn-dv.y { background: var(--yellow); } .syn-dv.g { background: var(--jade); }
.syn-p { font-size: 12px; line-height: 1.75; margin: 10px 0; word-break: keep-all; min-height: 0; display: none; }
.syn-p.on, .syn-quote.on { display: block; }
.syn-quote { white-space: pre-wrap; text-align: center; font-weight: 700; color: var(--hwaRedD); font-size: 12px; line-height: 1.7; margin: 16px 0 4px; display: none; }
.syn-foot { position: relative; z-index: 1; flex: none; padding: 6px 16px 12px; }
.syn-hint { text-align: center; font-family: var(--font-small); font-size: 10px; color: var(--grayL); margin-bottom: 4px; }
.syn-btn { min-height: 40px; }
.syn-btn.big { min-height: 46px; }

/* ======================================================================= credits */
.scr-credits { background: var(--night); color: var(--white); cursor: pointer; }
.cr-view { position: absolute; left: 0; right: 0; top: 0; bottom: 34px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 52px, #000 calc(100% - 36px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 52px, #000 calc(100% - 36px), transparent 100%); }
.cr-roll { text-align: center; will-change: transform; padding: 0 20px; }
.cr-spacer { height: var(--stage-h); }
.cr-spacer.top { height: calc(var(--stage-h) * 0.55); }
.cr-logo { display: flex; justify-content: center; margin-bottom: 12px; filter: drop-shadow(0 3px 0 rgba(16,22,46,.8)); }
.cr-h { font-family: var(--font-title); font-size: 16px; color: var(--yellowL); margin: 18px 0 6px; text-shadow: 0 2px 0 var(--ink); }
.cr-t { font-size: 12px; line-height: 1.9; color: var(--white); text-shadow: 0 1px 0 var(--ink); word-break: keep-all; }
.cr-gap { height: 30px; }
.cr-duck-row { display: flex; flex-direction: column; align-items: center; margin: 12px 0; }
.cr-duck-name { font-family: var(--font-title); font-size: 18px; letter-spacing: 3px; color: var(--white); margin-top: 4px; }
.cr-end { font-family: var(--font-title); font-size: 34px; color: var(--gold); letter-spacing: 6px; margin: 22px 0 10px;
  text-shadow: 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 1px 0 var(--ink), 0 -1px 0 var(--ink), 0 3px 0 var(--hwaRedD); }
.cr-hint { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; z-index: 1; display: flex; align-items: center; justify-content: center; white-space: nowrap;
  font-family: var(--font-small); font-size: 10px; color: var(--grayL); background: var(--night); box-shadow: 0 -2px 0 var(--slate); }
.cr-skip { position: absolute !important; top: 8px; right: 8px; z-index: 2; }

/* ======================================================================= cutscene */
.scr-cutscene { background: var(--ink); }
.cs-overlay-host { position: absolute; inset: 0; z-index: 5; }
.cs-root { position: absolute; inset: 0; overflow: hidden; background: var(--ink); cursor: pointer; }
.cs-scene { position: absolute; inset: 0; z-index: 0; }
.cs-bg { position: absolute; left: 0; top: 0; }
.cs-chars { position: absolute; left: 0; right: 0; top: 0; bottom: var(--cs-band, 136px); overflow: hidden; pointer-events: none; }
.cs-chars.f-sepia { filter: sepia(.9) saturate(.75) brightness(.96); }
.cs-chars.f-night { filter: brightness(.72) saturate(.8) hue-rotate(-14deg); }
.cs-char { position: absolute; bottom: -6px; width: 144px; height: 198px; z-index: 1; }
.cs-char.talk { z-index: 2; }
.cs-char-in { position: absolute; left: 0; bottom: 0; }
.cs-char-shadow { position: absolute; left: 30px; right: 30px; bottom: 2px; height: 8px; background: rgba(16,22,46,.45); }
.cs-char-art { transition: filter .15s steps(2); }
.cs-char.dim .cs-char-art { filter: brightness(.78) saturate(.85); }
.cs-char.dim[data-char="kkwak"] .cs-char-art { filter: none; }
.cs-char-art.flip { transform: scaleX(-1); }
.cs-emote { position: absolute; left: 92px; top: 0; z-index: 3; filter: drop-shadow(0 2px 0 rgba(16,22,46,.5)); }
.cs-emote.flipped { left: 20px; }
.cs-emote.free { left: 50%; margin-left: -16px; top: auto; bottom: calc(var(--cs-band, 136px) + 8px); }

.cs-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cs-band { position: absolute; left: 0; right: 0; bottom: 0; height: var(--cs-band, 136px); z-index: 2;
  background-color: #10162e; background-image: radial-gradient(rgba(108,242,255,.06) 1px, transparent 1px); background-size: 4px 4px;
  box-shadow: 0 -2px 0 var(--ink), 0 -4px 0 var(--hwaRedD), 0 -6px 0 var(--ink); }
.cs-box { position: absolute; left: 8px; right: 8px; top: 16px; bottom: 9px; background: var(--hanji); color: var(--ink);
  box-shadow: var(--px-border), inset 0 -3px 0 rgba(115,62,57,.18), inset 0 2px 0 #fff; }
.cs-face { position: absolute; left: 7px; top: 16px; width: 68px; height: 68px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--cs-face-col, var(--hanjiD)); box-shadow: var(--px-border), inset 0 -3px 0 rgba(0,0,0,.2), inset 0 0 0 3px rgba(255,255,255,.35); }
.cs-plate { position: absolute; left: 6px; top: -13px; min-height: 22px; padding: 2px 10px; display: flex; align-items: center; gap: 6px; z-index: 1;
  font-weight: 700; font-size: 12px; line-height: 1.3; background: var(--slate); color: var(--white); box-shadow: var(--px-border), inset 0 -2px 0 rgba(0,0,0,.25), inset 0 2px 0 rgba(255,255,255,.25); }
.cs-plate-sub { font-family: var(--font-small); font-size: 10px; font-weight: 400; opacity: .85; }
.cs-text { position: absolute; left: 86px; right: 12px; top: 14px; bottom: 12px; font-size: 12px; line-height: 1.62; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; overflow: hidden; }
.cs-narrate { background: var(--night); color: var(--white); box-shadow: var(--px-border), inset 0 0 0 2px rgba(108,242,255,.18); }
.cs-narrate .cs-face, .cs-narrate .cs-plate { display: none; }
.cs-narrate .cs-text { left: 16px; right: 16px; top: 10px; bottom: 12px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--hanji); }
.cs-think { background: #dfe6f4; color: var(--slate); }
.cs-think .cs-plate { background: var(--grayD); color: var(--white); }
.cs-think .cs-face { background: #c4cfe6; }
.cs-think .cs-text { font-style: normal; }
.cs-face.f-sepia { filter: sepia(.9) saturate(.75) brightness(.96); }
.cs-face.f-night { filter: brightness(.86) saturate(.85) hue-rotate(-14deg); }
.cs-next { position: absolute; right: 8px; bottom: 3px; font-size: 10px; color: var(--hwaRed); opacity: 0; }
.cs-next.on { opacity: 1; animation: fk-bob .7s steps(2) infinite; }
.cs-narrate .cs-next { color: var(--dokFire); }
.cs-think .cs-next { color: var(--grayD); }
.cs-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--grayL); opacity: 0; pointer-events: none; }
.cs-hint.on { opacity: 1; animation: px-blink 1.1s steps(1) infinite; }
.cs-box:not(.hidden) ~ .cs-hint { display: none; }

.cs-top { position: absolute; top: 8px; right: 8px; z-index: 6; display: flex; gap: 5px; }
.cs-topbtn { height: 34px; min-width: 48px; padding: 0 9px; display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  font: 700 11px var(--font); color: var(--white); background: rgba(16,22,46,.7); border: 0; border-radius: 0; -webkit-appearance: none; appearance: none;
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 1px rgba(255,255,255,.22); }
.cs-topbtn:active { transform: translateY(1px); }
.cs-skip-arrows { font-size: 8px; letter-spacing: -2px; }
.cs-auto.on { background: var(--yellow); color: var(--ink); }

.cs-fade { position: absolute; inset: 0; background: var(--ink); opacity: 0; pointer-events: none; z-index: 7; }
.cs-flash { position: absolute; inset: 0; background: var(--white); opacity: 0; pointer-events: none; z-index: 8; }

.cs-dim { position: absolute; left: 0; right: 0; top: 0; bottom: var(--cs-band, 136px); background: rgba(16,22,46,.66);
  display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cs-caption { position: absolute; left: 0; right: 0; top: 0; bottom: var(--cs-band, 136px); display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.cs-caption-text { font-family: var(--font-title); font-size: 22px; line-height: 1.45; color: var(--white); text-align: center; white-space: pre-wrap; word-break: keep-all;
  padding: 10px 20px 12px; background: rgba(16,22,46,.55); box-shadow: 0 -2px 0 rgba(255,213,65,.35), 0 2px 0 rgba(255,213,65,.35);
  text-shadow: 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 1px 0 var(--ink), 0 -1px 0 var(--ink), 0 2px 0 var(--ink); }

.cs-titlecard { position: absolute; inset: 0; z-index: 4; background: rgba(16,22,46,.86); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cs-tc-band { width: 100%; padding: 0 12px; text-align: center; background: var(--hwaRedD); display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 -2px 0 var(--ink), 0 2px 0 var(--ink); }
.cs-tc-dan { align-self: stretch; height: 8px; margin: 0 -12px; background: linear-gradient(to bottom, var(--yellow) 0 2px, var(--jade) 2px 4px, var(--hwaBlue) 4px 6px, var(--ink) 6px 8px); }
.cs-tc-dan.top { margin-bottom: 14px; }
.cs-tc-dan.bottom { margin-top: 14px; transform: scaleY(-1); }
.cs-tc-title { font-family: var(--font-title); font-size: 30px; line-height: 1.3; color: var(--gold); letter-spacing: 3px;
  text-shadow: 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 1px 0 var(--ink), 0 -1px 0 var(--ink), 0 3px 0 var(--ink); }
.cs-tc-logo { display: flex; justify-content: center; margin: 2px 0; filter: drop-shadow(0 3px 0 rgba(16,22,46,.7)); }
.cs-tc-sub { font-family: var(--font-title); font-size: 17px; color: var(--white); margin-top: 4px; text-shadow: 0 2px 0 var(--ink); word-break: keep-all; }
.cs-tc-hint { margin-top: 26px; font-size: 11px; color: var(--grayL); animation: px-blink 1.1s steps(1) infinite; }

.cs-item-spot { position: relative; width: 236px; height: 236px; display: flex; align-items: center; justify-content: center; perspective: 400px; }
.cs-item-rays { position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,213,65,.30) 0deg 9deg, transparent 9deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%);
  animation: fk-spin 9s steps(36) infinite; }
.cs-item-art, .cs-card-art { position: relative; filter: drop-shadow(3px 4px 0 rgba(16,22,46,.7)); }
.cs-item-cap { margin-top: 4px; max-width: 310px; padding: 4px 12px 5px; background: var(--hanji); color: var(--ink); font-size: 12px; font-weight: 700; text-align: center;
  box-shadow: var(--px-border), inset 0 -3px 0 rgba(0,0,0,.1); word-break: keep-all; }
.cs-cardshot .cs-item-rays { background: repeating-conic-gradient(from 0deg, rgba(210,35,42,.35) 0deg 9deg, transparent 9deg 22.5deg); }

.cs-letter { width: 296px; max-height: calc(100% - 28px); overflow: hidden; padding: 18px 20px 16px; color: var(--brownD); font-size: 12px; line-height: 24px;
  background-color: var(--hanji); background-image: repeating-linear-gradient(to right, transparent 0, transparent 23px, rgba(140,18,32,.16) 23px, rgba(140,18,32,.16) 24px);
  box-shadow: var(--px-border), 5px 6px 0 rgba(0,0,0,.35), inset 0 0 0 4px rgba(217,196,155,.6); transform: rotate(-1deg); }
.cs-letter-line { min-height: 24px; white-space: pre-wrap; word-break: keep-all; }
.cs-letter-line.sign { text-align: right; font-weight: 700; margin-top: 4px; color: var(--hwaRedD); }

.cs-log-modal { width: 320px; }
.cs-loglist { display: flex; flex-direction: column; gap: 6px; white-space: normal; }
.cs-log-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.cs-log-name { font-size: 10px; font-weight: 700; padding: 0 6px; background: var(--slate); color: var(--white); box-shadow: 0 0 0 1px var(--ink); }
.cs-log-text { font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: keep-all; }
.cs-log-row.narrate .cs-log-text { color: var(--grayD); }
.cs-log-row.think .cs-log-text { color: var(--slate); }
.cs-log-empty { color: var(--grayD); font-size: 11px; }

/* ======================================================================= result */
.scr-result { background: var(--night); }
.rs-top { position: relative; z-index: 1; flex: none; display: flex; flex-direction: column; align-items: center; padding-top: 8px; }
.rs-banner-wrap { filter: drop-shadow(0 3px 0 rgba(16,22,46,.75)); }
.rs-headline { margin-top: 4px; padding: 0 12px; text-align: center; font-family: var(--font-title); font-size: 16px; color: var(--white); word-break: keep-all;
  text-shadow: 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 1px 0 var(--ink), 0 -1px 0 var(--ink), 0 2px 0 var(--ink); }
.scr-result.win .rs-headline { color: var(--yellowL); }
.rs-subline { margin-top: 2px; padding: 1px 8px 2px; font-family: var(--font-small); font-size: 10px; color: var(--hanji); background: rgba(16,22,46,.72); box-shadow: 0 0 0 1px rgba(16,22,46,.9); text-shadow: 0 1px 0 var(--ink); }
.rs-cast { position: relative; z-index: 1; flex: none; height: 148px; display: flex; align-items: flex-end; justify-content: center; gap: 6px; padding: 0 8px 4px; }
.rs-fighter { position: relative; flex: 0 0 122px; display: flex; flex-direction: column; align-items: center; min-width: 0; }
/* bodies at 2× cropped at the waist (head + torso) so both fighters and their HP fit on short stages */
.rs-body-wrap { height: 98px; overflow: hidden; display: flex; align-items: flex-start; justify-content: center; }
.rs-fighter.right .rs-body { transform: scaleX(-1); }
.rs-fighter.loser .rs-body { filter: brightness(.8) saturate(.8); }
.rs-name { position: relative; z-index: 1; margin-top: -2px; padding: 0 6px; font-size: 11px; font-weight: 700; color: var(--white); background: rgba(16,22,46,.85); box-shadow: 0 0 0 2px var(--ink);
  white-space: nowrap; max-width: 118px; overflow: hidden; text-overflow: ellipsis; }
.rs-fighter.winner .rs-name { background: var(--hwaRed); }
.rs-crown { position: absolute; top: -6px; left: 50%; margin-left: -9px; width: 18px; text-align: center; font-size: 16px; color: var(--gold); text-shadow: 0 2px 0 var(--ink); animation: fk-bob 1s steps(2) infinite; }
.rs-hp { width: 116px; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.rs-hp .px-hp { flex: 1 1 auto; min-width: 0; }
.rs-hp-t { flex: none; font-size: 10px; color: var(--white); text-shadow: 0 1px 0 var(--ink); white-space: nowrap; }
.rs-vs { align-self: center; flex: none; margin-bottom: 18px; filter: drop-shadow(0 2px 0 rgba(16,22,46,.6)); }
.rs-vs-t { font-family: var(--font-title); font-size: 20px; color: var(--gold); text-shadow: 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 1px 0 var(--ink), 0 -1px 0 var(--ink), 0 2px 0 var(--hwaRedD); }
.rs-mid { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; padding: 2px 6px 0; }
.rs-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 0 2px 4px; }
.rs-chip { display: inline-flex; align-items: baseline; gap: 3px; padding: 1px 7px 2px; background: var(--hanji); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); font-size: 11px; }
.rs-chip-k { font-family: var(--font-small); font-size: 10px; color: var(--brown); }
.rs-chip b { font-size: 13px; }
.rs-chip.w b { color: var(--greenD); } .rs-chip.l b { color: var(--hwaRed); } .rs-chip.best { background: var(--yellowL); }
.rs-chip.up b { color: var(--greenD); } .rs-chip.down b { color: var(--hwaRed); }
.rs-sec-t { font-weight: 700; font-size: 12px; color: var(--hwaRedD); margin-bottom: 3px; }
.rs-best { padding: 6px 10px 8px; }
.rs-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 10px; }
.rs-line { display: flex; justify-content: space-between; font-size: 11px; border-bottom: 1px dotted var(--hanjiD); }
.rs-line.go .rs-line-k { color: var(--hwaRed); font-weight: 700; }
.rs-line-v { font-weight: 700; }
.rs-mults { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 5px; }
.rs-mult { font-size: 10px; font-weight: 700; padding: 0 5px 1px; color: var(--white); background: var(--hwaBlue); box-shadow: 0 0 0 1px var(--ink); }
.rs-mult.pibak, .rs-mult.gwangbak, .rs-mult.gobak { background: var(--hwaRed); }
.rs-mult.shake, .rs-mult.bomb { background: var(--plum); }
.rs-mult.go { background: var(--orange); }
.rs-total { margin-left: auto; font-size: 12px; }
.rs-total b { font-family: var(--font-title); font-size: 18px; color: var(--hwaRed); }
.rs-rw { padding: 6px 10px 8px; background: var(--sand); }
.rs-rw-row { display: flex; align-items: center; gap: 6px; font-size: 13px; min-height: 22px; }
.rs-rw-k { flex: 1; }
.rs-rw-v { font-size: 16px; font-weight: 700; color: var(--hwaRedD); }
.rs-lv { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.rs-lv-t { flex: none; font-size: 12px; font-weight: 700; display: inline-block; }
.rs-exp { flex: 1; height: 9px; }
.rs-exp > .fill { background: var(--jade); transition: width .5s steps(8); }
.rs-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 1px; }
.rs-tag { font-family: var(--font-small); font-size: 10px; padding: 1px 5px; background: var(--slate); color: var(--white); box-shadow: 0 0 0 1px var(--ink); }
.rs-tag.gold { background: var(--goldD); }
.rs-tag.fire { background: var(--night); color: var(--dokFire); }
.rs-tag.jade { background: var(--jade); color: var(--ink); }
.rs-new { margin-top: 6px; }
.rs-new-t { font-family: var(--font-small); font-size: 10px; color: var(--brown); margin-bottom: 2px; }
.rs-new-cards { display: flex; flex-wrap: wrap; gap: 3px; }
.rs-newcard { opacity: 0; filter: drop-shadow(1px 2px 0 rgba(16,22,46,.4)); }
.rs-newcard.shown, .rs-new.noanim .rs-newcard { opacity: 1; }
.rs-ach { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; opacity: 0; }
.rs-ach.shown { opacity: 1; }
.rs-ach-row { display: flex; align-items: center; gap: 6px; padding: 2px 6px; background: var(--night); color: var(--yellowL); box-shadow: 0 0 0 2px var(--ink); font-size: 11px; font-weight: 700; }
.rs-ach-n { flex: 1; }
.rs-ach-c { color: var(--gold); }
.rs-tip { margin: 4px 10px; text-align: center; font-family: var(--font-small); font-size: 10px; line-height: 1.5; color: var(--grayL); text-shadow: 0 1px 0 var(--ink); word-break: keep-all; }
.rs-btns { position: relative; z-index: 1; flex: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px 10px; }   /* buttons end on the reward panels' edge line */
.rs-btns .px-btn.big { min-height: 46px; }
.rs-half { flex: 1 1 40%; }
.rs-lvup { display: flex; flex-direction: column; align-items: center; gap: 4px; white-space: normal; text-align: center; }
.rs-lvup-hero { animation: fk-bob .8s steps(2) infinite; }
.rs-lvup-lv { font-size: 18px; font-weight: 700; color: var(--hwaRed); }
.rs-lvup-k { font-family: var(--font-small); font-size: 10px; color: var(--brown); }
.rs-lvup-v { font-family: var(--font-title); font-size: 16px; color: var(--plum); }
.rs-lvup-note { font-family: var(--font-small); font-size: 10px; color: var(--grayD); }
.rs-lvup-modal .px-modal-title { color: var(--goldD); }
