/* =========================== World Thumb Games =========================== */

:root {
  --bg:        #070a12;
  --bg-2:      #0d1220;
  --panel:     #121a2b;
  --panel-2:   #18223a;
  --line:      #24304d;
  --line-soft: #1b2438;
  --ink:       #eef2fb;
  --ink-2:     #9dabc7;
  --ink-3:     #64749a;
  --gold:      #f2c14e;
  --silver:    #c6d0e0;
  --bronze:    #cd8b53;
  --flame:     #ff5a3c;
  --aqua:      #29d3c2;
  --violet:    #a06bff;
  --blue:      #4a8dff;
  --green:     #3ddc84;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 10px 30px rgba(0,0,0,.45);
  --safe-b:    env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
               "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior-y: none;
}
body {
  min-height: 100dvh;
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(74,141,255,.16), transparent 60%),
    radial-gradient(760px 480px at 108% 4%, rgba(160,107,255,.13), transparent 62%),
    radial-gradient(700px 420px at -8% 16%, rgba(255,90,60,.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--blue); }

.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ------------------------------------------------------------------ layout */

.app { max-width: 720px; margin: 0 auto; padding: 0 14px calc(96px + var(--safe-b)); }

.site-footer { display: flex; justify-content: center; gap: 8px; margin: 26px 0 2px; color: var(--ink-3); font-size: 10.5px; }
.site-footer a { color: var(--ink-3); text-decoration: none; }
.seo-intro p { max-width: 62ch; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px 10px;
  margin: 0 -14px 4px;
  background: linear-gradient(180deg, rgba(7,10,18,.96) 62%, rgba(7,10,18,0));
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 9px; margin-right: auto; min-width: 0; }
.mark {
  width: 30px; height: 30px; flex: 0 0 auto;
  filter: drop-shadow(0 0 10px rgba(242,193,78,.55));
}
.brand-txt { min-width: 0; }
.brand-txt b {
  display: block; font-size: 13px; letter-spacing: .1em; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(92deg, #fff 8%, var(--gold) 55%, var(--flame) 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-txt span {
  display: block; font-size: 9px; letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.me-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 11px 6px 8px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  max-width: 45vw;
}
.me-chip .nick { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-chip:active { background: var(--panel-2); }

/* ------------------------------------------------------------------- flags */

.flag { font-size: 1.05em; line-height: 1; letter-spacing: 0; }
.flag.code {
  font-size: .64em; font-weight: 800; letter-spacing: .05em;
  padding: 2px 5px; border-radius: 4px;
  background: linear-gradient(160deg, #2b3450, #1c2439);
  border: 1px solid var(--line); color: var(--ink-2);
}

/* ------------------------------------------------------------------- cards */

.card {
  background: linear-gradient(168deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-title {
  display: flex; align-items: baseline; gap: 9px;
  margin: 22px 2px 11px;
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); font-weight: 700;
}
.section-title .rule { flex: 1; height: 1px; background: var(--line-soft); }

/* --------------------------------------------------------------- hero/stats */

.hero { padding: 18px 16px 16px; margin-top: 6px; position: relative; overflow: hidden; }
.hero::after {
  content: ''; position: absolute; inset: -40% -20% auto auto; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(242,193,78,.13), transparent 68%); pointer-events: none;
}
.hero h1 { margin: 0 0 6px; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; }
.hero p  { margin: 0; color: var(--ink-2); font-size: 13.5px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat {
  background: rgba(255,255,255,.035); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 9px 10px; text-align: center;
}
.stat b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 9.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); }

/* ------------------------------------------------------------------ ticker */

.ticker {
  margin-top: 10px; height: 30px; overflow: hidden; position: relative;
  border-top: 1px solid var(--line-soft); padding-top: 8px;
}
.ticker-item {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2);
  animation: tickIn .45s ease; white-space: nowrap; overflow: hidden;
}
.ticker-item > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.ticker-item b { color: var(--ink); font-weight: 600; }
@keyframes tickIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.badge {
  font-size: 9px; font-weight: 800; letter-spacing: .1em; padding: 2px 6px; border-radius: 5px;
  text-transform: uppercase; flex: 0 0 auto;
}
.badge.wr { background: rgba(242,193,78,.16); color: var(--gold);  border: 1px solid rgba(242,193,78,.4); }
.badge.nr { background: rgba(61,220,132,.14); color: var(--green); border: 1px solid rgba(61,220,132,.35); }
.badge.pb { background: rgba(74,141,255,.14); color: var(--blue);  border: 1px solid rgba(74,141,255,.35); }
.badge.play { background: rgba(255,255,255,.06); color: var(--ink-3); border: 1px solid var(--line-soft); }

/* ------------------------------------------------------------- event grid */

.events { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 380px) { .events { grid-template-columns: 1fr; } }

.event {
  position: relative; overflow: hidden;
  padding: 13px 13px 12px; text-align: left; width: 100%;
  border-radius: var(--radius);
  background: linear-gradient(168deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-soft);
  transition: transform .12s ease, border-color .18s ease;
}
.event:active { transform: scale(.975); border-color: var(--line); }
.event .glow {
  position: absolute; inset: auto auto -46px -34px; width: 132px; height: 132px;
  border-radius: 50%; opacity: .2; filter: blur(26px); pointer-events: none;
}
.event .ico { font-size: 24px; line-height: 1; display: block; margin-bottom: 8px; }
.event h3 { margin: 0; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.event .desc { margin: 3px 0 9px; font-size: 11.5px; color: var(--ink-3); min-height: 32px; }
.event .wr {
  display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-2);
  border-top: 1px solid var(--line-soft); padding-top: 8px;
}
.event .wr .v { color: var(--gold); font-weight: 800; }
.event .sensor {
  position: absolute; top: 11px; right: 11px; font-size: 8.5px; letter-spacing: .1em;
  padding: 2px 5px; border-radius: 4px; background: rgba(160,107,255,.14);
  color: var(--violet); border: 1px solid rgba(160,107,255,.3); text-transform: uppercase;
}

/* ------------------------------------------------------------ record table */

.rec-list { display: flex; flex-direction: column; }
.rec {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center;
  padding: 11px 13px; border-bottom: 1px solid var(--line-soft); width: 100%; text-align: left;
}
.rec:last-child { border-bottom: 0; }
.rec:active { background: rgba(255,255,255,.035); }
.rec .ico { font-size: 20px; text-align: center; }
.rec .nm { font-size: 13.5px; font-weight: 650; }
.rec .sub { font-size: 11px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.rec .vals { text-align: right; }
.rec .v-wr { font-size: 15px; font-weight: 800; color: var(--gold); }
.rec .v-nr { font-size: 11px; color: var(--ink-3); }
.rec .v-nr b { color: var(--green); font-weight: 700; }

/* ------------------------------------------------------------------ tables */

.lb { width: 100%; }
.lb-row {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 13px; border-bottom: 1px solid var(--line-soft);
}
.lb-row:last-child { border-bottom: 0; }
.lb-row.me { background: rgba(74,141,255,.10); box-shadow: inset 3px 0 0 var(--blue); }
.lb-rank { font-weight: 800; font-size: 14px; color: var(--ink-3); text-align: center; }
.lb-row:nth-child(1) .lb-rank { color: var(--gold);   font-size: 17px; }
.lb-row:nth-child(2) .lb-rank { color: var(--silver); font-size: 16px; }
.lb-row:nth-child(3) .lb-rank { color: var(--bronze); font-size: 16px; }
.lb-name { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 14px; }
.lb-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-val { font-weight: 800; font-size: 14.5px; }
.lb-val small { font-weight: 500; color: var(--ink-3); font-size: 10.5px; margin-left: 3px; }

.medal-row {
  display: grid; grid-template-columns: 34px 1fr repeat(4, 34px); gap: 6px; align-items: center;
  padding: 10px 13px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
.medal-row:last-child { border-bottom: 0; }
.medal-row.head { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.medal-row.me { background: rgba(74,141,255,.10); box-shadow: inset 3px 0 0 var(--blue); }
.medal-row:nth-child(2) .lb-rank { color: var(--gold); }
.medal-row:nth-child(3) .lb-rank { color: var(--silver); }
.medal-row:nth-child(4) .lb-rank { color: var(--bronze); }
.medal-row .n { display: flex; align-items: center; gap: 7px; min-width: 0; }
.medal-row .n span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.medal-row .m { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.medal-row .m.g { color: var(--gold); } .medal-row .m.s { color: var(--silver); } .medal-row .m.b { color: var(--bronze); }

/* -------------------------------------------------------------- tab bar */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + var(--safe-b));
  background: rgba(10,14,24,.9); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-soft);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px; border-radius: 11px; color: var(--ink-3); font-size: 10px; font-weight: 600;
  letter-spacing: .04em;
}
.tabbar button .ti { font-size: 18px; line-height: 1; }
.tabbar button.on { color: var(--gold); background: rgba(242,193,78,.09); }

/* ------------------------------------------------------------ game screen */

.screen {
  position: fixed; inset: 0; z-index: 100; display: none;
  flex-direction: column; background: var(--bg);
  background-image: radial-gradient(900px 520px at 50% -10%, rgba(74,141,255,.14), transparent 62%);
}
.screen.open { display: flex; }
.screen-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line-soft); flex: 0 0 auto;
}
.screen-head .t { font-size: 15px; font-weight: 700; margin-right: auto; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); font-size: 15px; flex: 0 0 auto;
}
.icon-btn:active { background: var(--panel-2); }

.stage { flex: 1; display: flex; flex-direction: column; padding: 14px; overflow: auto; -webkit-overflow-scrolling: touch; }
.stage.locked { overflow: hidden; }

.hud {
  display: flex; gap: 8px; margin-bottom: 12px; flex: 0 0 auto;
}
.hud .cell {
  flex: 1; background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 7px 10px; text-align: center;
}
.hud .cell b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hud .cell span { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.hud .cell.hot b { color: var(--flame); }

.play-area {
  flex: 1; min-height: 260px; position: relative; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line-soft);
  background: linear-gradient(168deg, var(--panel), var(--bg-2));
  display: flex; align-items: center; justify-content: center;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.play-area canvas { display: block; touch-action: none; }

.hint { text-align: center; color: var(--ink-2); font-size: 13px; padding: 0 18px; }
.hint b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 6px; }

.btn {
  display: block; width: 100%; padding: 15px 18px; border-radius: 13px;
  font-size: 15.5px; font-weight: 750; letter-spacing: .01em; text-align: center;
  background: linear-gradient(180deg, #ffd166, var(--gold)); color: #241a02;
  box-shadow: 0 8px 22px rgba(242,193,78,.22);
}
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.slim { padding: 11px 16px; font-size: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 9px; margin-top: 12px; flex: 0 0 auto; }
.btn-row .btn { margin: 0; }

/* --------------------------------------------------------------- results */

.result { text-align: center; padding: 8px 4px 4px; }
.result .big {
  font-size: 52px; font-weight: 900; letter-spacing: -.035em; line-height: 1.05;
  background: linear-gradient(180deg, #fff, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.result .unit { font-size: 13px; color: var(--ink-3); letter-spacing: .16em; text-transform: uppercase; }
.result .ranks { display: flex; gap: 9px; margin-top: 16px; }
.result .ranks div {
  flex: 1; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px;
}
.result .ranks b { display: block; font-size: 22px; font-weight: 800; }
.result .ranks span { font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }
.record-banner {
  margin-top: 14px; padding: 12px; border-radius: var(--radius-sm); font-weight: 800;
  font-size: 14px; letter-spacing: .05em; animation: pop .5s cubic-bezier(.2,1.3,.4,1);
}
.record-banner.wr { background: linear-gradient(96deg, rgba(242,193,78,.24), rgba(255,90,60,.18)); color: var(--gold); border: 1px solid rgba(242,193,78,.45); }
.record-banner.nr { background: rgba(61,220,132,.14); color: var(--green); border: 1px solid rgba(61,220,132,.35); }
.record-banner.pb { background: rgba(74,141,255,.14); color: var(--blue); border: 1px solid rgba(74,141,255,.35); }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- sheet */

.sheet-wrap {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(2,4,10,.66); backdrop-filter: blur(3px);
  align-items: flex-end; justify-content: center;
}
.sheet-wrap.open { display: flex; }
.sheet {
  width: 100%; max-width: 720px; max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 20px 20px 0 0; padding: 8px 0 calc(14px + var(--safe-b));
  animation: slideUp .24s cubic-bezier(.2,.9,.3,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 6px auto 10px; flex: 0 0 auto; }
.sheet h2 { margin: 0 16px 12px; font-size: 16px; }
.sheet .body { overflow: auto; padding: 0 16px; -webkit-overflow-scrolling: touch; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; font-weight: 700; }
.input {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); outline: none; font-size: 16px;
}
.input:focus { border-color: var(--blue); }

.country-list { max-height: 46dvh; overflow: auto; margin: 0 -16px; }
.country-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 16px; font-size: 14.5px; border-bottom: 1px solid var(--line-soft);
}
.country-item.on { background: rgba(242,193,78,.10); color: var(--gold); }
.country-item:active { background: rgba(255,255,255,.05); }

.seg { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; }
.seg button { flex: 1; padding: 9px 8px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.seg button.on { background: var(--panel-2); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.3); }

.empty { text-align: center; padding: 30px 20px; color: var(--ink-3); font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%);
  z-index: 300; background: var(--panel-2); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

.offline-note {
  margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 11.5px;
  background: rgba(255,90,60,.10); border: 1px solid rgba(255,90,60,.28); color: #ffb3a3;
}

/* --------------------------------------------------------- accounts / auth */

.account-callout {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 11px 12px;
  border: 1px solid rgba(74,141,255,.28); border-radius: var(--radius-sm);
  background: rgba(74,141,255,.08);
}
.account-callout > span { flex: 1; min-width: 0; }
.account-callout b { display: block; font-size: 12.5px; }
.account-callout small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 10.5px; line-height: 1.35; }
.account-callout .btn { width: auto; flex: 0 0 auto; padding: 9px 14px; font-size: 12px; }

.account-hero { text-align: center; padding-top: 24px; }
.account-hero .account-mark { font-size: 36px; margin-bottom: 8px; }
.account-hero p { max-width: 46ch; margin: 0 auto; }
.legal-links { margin-top: 12px; padding: 13px; text-align: center; color: var(--ink-3); font-size: 12px; }
.legal-links a { color: var(--ink-2); text-decoration: none; }

.account-actions { display: flex; flex-direction: column; }
.account-actions button { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.account-actions button:active { background: rgba(255,255,255,.035); }
.account-actions button.danger { color: #ff9b86; }
.account-actions span { padding: 11px 15px; color: var(--ink-3); font-size: 11.5px; }
.account-actions a { color: var(--ink-2); }

.auth-tabs { margin-bottom: 16px; }
.auth-form { padding-top: 2px; }
.field small { display: block; margin-top: 5px; color: var(--ink-3); font-size: 10.5px; }
select.input { appearance: auto; }
.form-note { margin: -2px 0 14px; color: var(--ink-3); font-size: 10.5px; line-height: 1.45; }
.form-note a { color: var(--ink-2); }
.recovery-intro { margin: 0 0 14px; font-size: 12px; }
.form-error { min-height: 20px; margin: -2px 0 8px; color: #ffb3a3; font-size: 12px; }
.text-button { display: block; margin: -5px 0 13px auto; color: var(--blue); font-size: 12px; }

.recovery-note { padding: 14px; border: 1px solid rgba(242,193,78,.35); border-radius: var(--radius-sm); background: rgba(242,193,78,.08); }
.recovery-note b { color: var(--gold); }
.recovery-note p { margin: 5px 0 14px; color: var(--ink-2); font-size: 12px; }
.recovery-note code { display: block; padding: 13px 8px; text-align: center; border-radius: 9px; background: rgba(0,0,0,.28); color: #fff; font-size: clamp(15px, 5vw, 20px); letter-spacing: .08em; user-select: all; }

.record-banner.auth-result { background: rgba(74,141,255,.10); border: 1px solid rgba(74,141,255,.3); color: var(--ink); }
.record-banner.auth-result b, .record-banner.auth-result span { display: block; }
.record-banner.auth-result span { margin: 3px 0 10px; color: var(--ink-2); font-size: 11.5px; font-weight: 500; }
.record-banner.auth-result .btn { width: auto; margin: 0 auto; padding: 9px 14px; font-size: 12px; }
.danger-note { margin-bottom: 16px; padding: 13px; border: 1px solid rgba(255,90,60,.32); border-radius: var(--radius-sm); background: rgba(255,90,60,.09); }
.danger-note b { color: #ff9b86; }
.danger-note p { margin: 4px 0 0; color: var(--ink-2); font-size: 12px; }
.btn.danger-button { background: linear-gradient(180deg, #ff7a5f, var(--flame)); color: #fff; box-shadow: 0 8px 22px rgba(255,90,60,.18); }

/* typing */
.type-words {
  font-size: 19px; line-height: 1.9; letter-spacing: .01em; word-spacing: .3em;
  padding: 16px; text-align: center; color: var(--ink-3);
}
.type-words .w { padding: 1px 3px; border-radius: 4px; }
.type-words .w.cur { background: rgba(74,141,255,.2); color: #fff; }
.type-words .w.ok { color: var(--green); }
.type-words .w.no { color: var(--flame); text-decoration: line-through; }
#typeInput { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.type-live {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line); background: var(--panel);
  font-size: 18px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; min-height: 52px;
}
.type-live.bad { color: var(--flame); }

/* memory pads */
.pad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(84%, 330px); }
.pad {
  aspect-ratio: 1; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line);
  transition: background .1s, transform .1s, box-shadow .1s;
}
.pad.lit { background: var(--gold); box-shadow: 0 0 26px rgba(242,193,78,.55); transform: scale(1.04); }
.pad.bad { background: var(--flame); box-shadow: 0 0 26px rgba(255,90,60,.55); }

/* aim */
.target {
  position: absolute; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 30%, #fff 4%, var(--flame) 42%, #8c1f0d 100%);
  box-shadow: 0 0 22px rgba(255,90,60,.5); animation: pop .16s ease;
}

/* reaction pad */
.rt-pad { position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; font-weight: 800; }
.rt-pad.wait  { background: #7a2a1c; color: #ffd6cd; }
.rt-pad.go    { background: #16a34a; color: #eafff2; }
.rt-pad.ready { background: var(--panel-2); color: var(--ink-2); font-size: 15px; font-weight: 600; }
.rt-dots { position: absolute; bottom: 12px; display: flex; gap: 7px; }
.rt-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.22); }
.rt-dots i.done { background: var(--gold); }

/* click pad */
.click-pad {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 68px; font-weight: 900; font-variant-numeric: tabular-nums;
  background: radial-gradient(circle at 50% 45%, rgba(74,141,255,.18), transparent 65%);
}
.click-pad.hit { background: radial-gradient(circle at 50% 45%, rgba(242,193,78,.3), transparent 65%); }

/* result share card preview */
#rCardWrap { display: flex; justify-content: center; margin-top: 16px; }
.card-preview {
  display: block; width: min(58%, 260px); aspect-ratio: 1; border-radius: 16px;
  border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer;
}
.card-preview:active { transform: scale(.98); }

/* --------------------------------------------------------------- legal pages */

.legal-page { overflow: auto; overscroll-behavior-y: auto; }
.legal-shell { width: min(100% - 28px, 760px); margin: 0 auto; padding: 28px 0 48px; }
.legal-brand { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px 4px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: .04em; }
.legal-brand img { filter: drop-shadow(0 0 10px rgba(242,193,78,.4)); }
.legal-card { padding: clamp(20px, 5vw, 38px); }
.legal-card h1 { margin: 0 0 4px; font-size: clamp(28px, 7vw, 42px); }
.legal-card h2 { margin: 28px 0 7px; font-size: 17px; }
.legal-card p { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; line-height: 1.72; }
.legal-card .legal-date { color: var(--ink-3); font-size: 12px; }
.legal-nav { display: flex; gap: 18px; justify-content: center; margin-top: 20px; }
.legal-nav a { color: var(--ink-2); font-size: 13px; }
