/* Deep Cut, in the Bankasi Media look: warm off-white sky, charcoal and graphite
   ground, Geist throughout, the blue-silver halo for focus and the rarest finds,
   and no lift on hover. The page is a cross-section of the earth you dig through. */
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-v1.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@property --silver-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes silver-spin { to { --silver-angle: 360deg; } }

:root {
  --paper: #f2f2ef;
  --ink: #151515;
  --graphite: #6b675f;
  --glass: rgba(21, 21, 21, .84);
  --glass-line: rgba(255, 255, 255, .12);
  --muted: #a39f96;
  --opp: #9fb4c9;
  --dig: 2.4s;
  --ease: cubic-bezier(.45, 0, .2, 1);
  --halo: conic-gradient(from var(--silver-angle),
    rgba(140,152,168,.25) 0deg, rgba(175,190,208,.6) 60deg, rgba(225,238,255,.95) 115deg,
    #fff 145deg, rgba(240,248,255,1) 165deg, rgba(180,195,215,.8) 205deg,
    rgba(125,138,155,.35) 260deg, rgba(140,152,168,.25) 360deg);
  /* rarity tiers */
  --t-none: #77746d; --t-late: #77746d;
  --t-d: #a8977a; --t-f: #d6b65f; --t-o: #bcb6aa; --t-r: #eef3f8; --t-x: #8fb3dc;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
body {
  font-family: "Geist", "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #151515;
  color: var(--paper);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
}
button, input, select { font: inherit; color: inherit; }

/* ---------- the world ---------- */
.world { position: fixed; inset: 0; overflow: hidden; }
.column {
  position: absolute; left: 0; right: 0; top: 0;
  transition: transform var(--dig) var(--ease);
  will-change: transform;
}
.sky { position: absolute; left: 0; right: 0; top: 0; background: linear-gradient(180deg, #f7f7f4, var(--paper)); }
.ground { position: absolute; left: 0; right: 0; background: #4a3a2c; overflow: visible; }
.ground svg { position: absolute; left: 0; top: 0; }
.ground::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: #151515; z-index: 1; }
.rig { position: absolute; left: 50%; transform: translate(-50%, -100%); width: 120px; height: 120px; }
.cable { position: absolute; left: 50%; width: 2px; margin-left: -1px; background: linear-gradient(180deg, #151515, rgba(255,255,255,.35)); transition: height var(--dig) var(--ease); }

.labels { position: absolute; inset: 0; pointer-events: none; transition: opacity .6s; }
body.at-home .labels { opacity: 0; }
.fact { position: absolute; font-size: 12px; letter-spacing: .04em; white-space: nowrap; transform: translateY(-50%); color: rgba(242,242,239,.72); text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 0 10px rgba(0,0,0,.6); }
.fact.light { color: rgba(21,21,21,.5); }
.fact.left { right: calc(50% + 70px); }
.fact.right { left: calc(50% + 70px); }
.fact.left::after { content: " \2500\2500"; } .fact.right::before { content: "\2500\2500 "; }
.zone { position: absolute; left: 0; right: 0; text-align: center; font-size: 13px; letter-spacing: .38em; color: rgba(242,242,239,.8); text-shadow: 0 1px 4px rgba(0,0,0,.9); transform: translateY(-50%); }
.zone::before, .zone::after { content: ""; display: inline-block; width: min(18vw, 160px); height: 1px; background: rgba(242,242,239,.18); vertical-align: middle; margin: 0 18px; }
.depth-scale { position: absolute; right: 14px; font-size: 10px; color: rgba(242,242,239,.5); text-shadow: 0 1px 3px rgba(0,0,0,.8); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.depth-scale.light { color: rgba(21,21,21,.35); }

/* Rarity ticks that appear while an answer sinks */
.ticks { position: absolute; inset: 0; pointer-events: none; }
.tick { text-shadow: 0 1px 3px rgba(0,0,0,.9); position: absolute; left: calc(50% + 34px); right: 0; transform: translateY(-50%); display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: 0; animation: tickin .4s ease forwards; }
.tick::before { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .7; }
.tick.passed { opacity: .35 !important; animation: none; }
.tick.hit { font-weight: 600; opacity: 1 !important; animation: none; }
@keyframes tickin { to { opacity: .85; } }

/* The drill bits */
/* The drill: its cutting tip sits exactly on the depth line. */
.bit { position: absolute; left: 50%; width: 40px; height: 96px; margin: -96px 0 0 -20px; transition: top var(--dig) var(--ease); z-index: 2; color: #151515; }
.bit .drill { position: absolute; inset: 0; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0,0,0,.55)); }
.bit.me::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: -14px; height: 44px; border-radius: 50%; background: var(--halo); filter: blur(10px); opacity: .8; z-index: -1; animation: silver-spin 3.6s linear infinite; }
.bit.opp { margin-left: 22px; color: var(--opp); transform: scale(.8); transform-origin: 50% 100%; }
.bit .tag {
  position: absolute; right: 50px; top: calc(100% - 16px); transform: translateY(-50%); white-space: nowrap;
  padding: 7px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); color: var(--paper);
  font-size: 14px; font-weight: 500; letter-spacing: .02em; opacity: 0; transition: opacity .3s;
}
.bit.opp .tag { right: auto; left: 46px; color: var(--opp); font-size: 17px; }
.bit .tag.show { opacity: 1; }
.flutes { animation: auger .9s linear infinite; animation-play-state: paused; }
.bit.drilling .flutes { animation-duration: .16s; animation-play-state: running; }
.bit.drilling .drill { animation: drill .09s linear infinite; }
@keyframes auger { to { transform: translateY(10px); } }
@keyframes drill { 50% { transform: translateX(1px); } }

/* ---------- chrome ---------- */
.lockup { position: fixed; left: clamp(16px, 3vw, 36px); top: 18px; z-index: 5; color: var(--ink); text-decoration: none; transition: color .6s; }
body:not(.at-home) .lockup { color: var(--paper); opacity: .8; }
.wordmark { font-size: 14px; letter-spacing: .42em; }
.wordmark sup { font-size: 7px; letter-spacing: .08em; margin-left: -.2em; vertical-align: 1.1em; }
.howto { position: fixed; right: clamp(16px, 3vw, 36px); top: 14px; z-index: 5; background: none; border: 0; padding: 6px 0; cursor: pointer; font-size: 13px; color: var(--graphite); border-bottom: 1px solid transparent; }
.howto:hover, .howto:focus-visible { outline: none; border-bottom-color: currentColor; }
body:not(.at-home) .howto { display: none; }

.hud { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 4; display: none; align-items: center; gap: 14px; }
body.in-dig .hud { display: flex; }
.hud-box { min-width: 108px; padding: 7px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-line); }
.hud-box small { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hud-box b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hud-box.right { text-align: right; }
.pips { display: flex; gap: 5px; }
.pip { width: 12px; height: 12px; border-radius: 3px; background: rgba(255,255,255,.14); border: 1px solid var(--glass-line); }
.pip.now { background: var(--paper); }
.pip[data-t] { border: 0; }
.pip[data-t="none"], .pip[data-t="late"] { background: #3a3936; }
.pip[data-t="d"] { background: var(--t-d); } .pip[data-t="f"] { background: var(--t-f); } .pip[data-t="o"] { background: var(--t-o); }
.pip[data-t="r"] { background: var(--t-r); } .pip[data-t="x"] { background: var(--t-x); }
.pip[data-t="g"] { background: var(--halo); animation: silver-spin 3.6s linear infinite; }

main { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.screen { display: none; position: absolute; inset: 0; }
.screen[data-active] { display: block; animation: fade .4s ease; }
.screen > * { pointer-events: auto; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.glass { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 16px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--paper); }
.panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100% - 32px)); max-height: calc(100% - 100px); overflow: auto; overscroll-behavior: contain; padding: clamp(22px, 4vw, 32px); }
.panel h2 { margin: 0 0 8px; font-size: 26px; font-weight: 500; letter-spacing: -.035em; }
.sub { margin: 0 0 18px; color: var(--muted); line-height: 1.5; font-size: 14.5px; }

/* Home */
.home-top { position: absolute; left: 0; right: 0; top: 10vh; text-align: center; color: var(--ink); pointer-events: none; }
.title { margin: 0; font-size: clamp(60px, 13vw, 132px); font-weight: 500; letter-spacing: -.06em; line-height: .9; }
.subtitle { margin: 12px 0 0; font-size: 13px; letter-spacing: .42em; text-transform: uppercase; color: var(--graphite); }
.tagline { margin: 10px 0 0; font-size: 14px; color: var(--graphite); }
.home-below { position: absolute; left: 50%; top: calc(55% + 34px); transform: translateX(-50%); width: min(460px, calc(100% - 32px)); text-align: center; }
.daily-note { min-height: 1.2em; margin: 10px 0 0; font-size: 13px; color: rgba(242,242,239,.8); }
.home-row { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.home-row .btn { flex: 1; }

/* Buttons: halo ribbon on hover and focus, never a lift */
.btn {
  position: relative; isolation: isolate; height: 46px; padding: 0 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--glass-line); background: rgba(255,255,255,.06); color: var(--paper); font-size: 15px; font-weight: 500;
  transition: box-shadow .3s ease, background .2s, border-color .2s;
}
.btn::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; pointer-events: none;
  background: var(--halo); opacity: 0; transition: opacity .3s ease;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.btn:hover:not(:disabled), .btn:focus-visible { outline: none; transform: none; box-shadow: 0 0 22px 1px rgba(175,202,238,.55), 0 0 8px 1px rgba(255,255,255,.6); }
.btn:hover:not(:disabled)::after, .btn:focus-visible::after { opacity: 1; animation: silver-spin 3.6s linear infinite; }
.btn.primary { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn.ghost { background: var(--glass); }
.btn.quiet { background: none; border-color: transparent; color: var(--muted); margin-top: 8px; }
.btn.big { height: 58px; width: 100%; font-size: 17px; letter-spacing: .06em; }
.btn.wide { width: 100%; margin-top: 14px; }
.btn:disabled { opacity: .45; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.row.center { justify-content: center; }
.msg { min-height: 1.3em; margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.msg.err { color: #e7a39b; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.field.grow { flex: 1; }
.field input, .field select { height: 46px; border-radius: 10px; border: 1px solid var(--glass-line); background: rgba(255,255,255,.95); color: var(--ink); padding: 0 13px; font-size: 16px; }
.field input:focus, .field select:focus, .answer-bar input:focus { outline: none; box-shadow: 0 0 0 4px rgba(175,202,238,.4); }
#codeInput { text-transform: uppercase; letter-spacing: .3em; font-weight: 500; }
.join-row { display: flex; gap: 10px; align-items: flex-end; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--glass-line); }

.code-box { display: flex; flex-direction: column; align-items: center; padding: 18px; border-radius: 12px; background: var(--paper); color: var(--ink); margin-top: 8px; }
.code-box span { font-size: 12px; color: var(--graphite); }
.code-box b { font-size: clamp(38px, 9vw, 52px); font-weight: 500; letter-spacing: .28em; margin-right: -.28em; }
.roster { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.roster li { display: flex; align-items: center; gap: 12px; padding: 9px 13px 9px 9px; border: 1px solid var(--glass-line); border-radius: 999px; }
.roster li b { font-weight: 600; }
.roster li small { margin-left: auto; color: var(--muted); }
.roster li.waiting { color: var(--muted); border-style: dashed; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--paper); flex: none; }
.dot.opp { background: var(--opp); }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* Prompt */
.prompt-card { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); padding: 18px 22px 16px; text-align: center; animation: drop .6s cubic-bezier(.2,.8,.2,1); }
@keyframes drop { from { transform: translate(-50%, -24px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.prompt-card small { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.prompt-card h2 { margin: 8px 0 6px; font-size: clamp(26px, 5vw, 40px); font-weight: 500; letter-spacing: -.04em; line-height: 1.08; }
.hint { margin: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.timer { height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 14px; }
.timer-fill { height: 100%; background: var(--paper); transform-origin: left; }
.timer-fill.low { background: #e7a39b; }
.lock-status { min-height: 0; margin: 8px 0 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lock-status:empty { display: none; }

.answer-bar { position: absolute; z-index: 4; left: 50%; bottom: var(--bar-gap); transform: translateX(-50%); width: min(560px, calc(100% - 24px)); display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); }
.answer-bar input { flex: 1; min-width: 0; height: 50px; border: 0; border-radius: 999px; padding: 0 18px; font-size: 18px; background: var(--paper); color: var(--ink); }
.answer-bar input:disabled { opacity: .7; }
.answer-bar .btn { height: 50px; padding: 0 24px; }
.answer-bar.locked { box-shadow: 0 0 0 1px rgba(175,202,238,.5), 0 0 24px rgba(175,202,238,.35); }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(calc(-50% - 6px)); } 75% { transform: translateX(calc(-50% + 6px)); } }

/* Result */
.result-card { position: absolute; left: 50%; bottom: calc(var(--bar-gap) + 84px); max-height: calc(100% - var(--bar-gap) - 84px - 70px); overflow-y: auto; overscroll-behavior: contain; transform: translateX(-50%); width: min(680px, calc(100% - 24px)); padding: 18px 20px 20px; text-align: center; animation: rise .5s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { transform: translate(-50%, 24px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.result-head { margin: 0 0 14px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.result-cols { display: grid; gap: 12px; margin-bottom: 16px; }
.result-cols.duo { grid-template-columns: 1fr 1fr; }
.res { position: relative; padding: 16px 14px 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--glass-line); }
.res.won { border-color: rgba(175,202,238,.55); box-shadow: 0 0 26px rgba(175,202,238,.18) inset; }
.res .who { display: flex; align-items: center; gap: 10px; text-align: left; margin-bottom: 12px; }
.res .who .nm { display: flex; flex-direction: column; min-width: 0; }
.res .who b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res .deeper { margin-left: auto; padding: 4px 9px; border-radius: 999px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: var(--paper); white-space: nowrap; }
.res .ans { font-size: clamp(20px, 3.6vw, 26px); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; word-break: break-word; }
.res .ans.none { color: var(--muted); }
.res .typed { margin-top: 3px; font-size: 12px; color: var(--muted); font-style: italic; }
.res .tier { margin: 8px 0 2px; font-size: clamp(22px, 4.4vw, 32px); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; line-height: 1; }
.res .pts { margin-top: 6px; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.res .pts b { color: var(--paper); }
.res .total { margin-top: 2px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.res .line { margin-top: 8px; font-size: 13.5px; color: var(--muted); }

/* Player icons */
.av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--paper); color: var(--ink); font-size: 17px; font-weight: 600; line-height: 1; position: relative; }
.av.icon { font-size: 20px; background: #2a2926; box-shadow: inset 0 0 0 2px var(--paper); }
.av.opp { background: var(--opp); color: var(--ink); }
.av.opp.icon { background: #2a2926; box-shadow: inset 0 0 0 2px var(--opp); }
.av.sm { width: 22px; height: 22px; font-size: 11px; margin-right: 7px; vertical-align: -6px; }
.av.sm.icon { font-size: 12px; }
.av.lg { width: 64px; height: 64px; font-size: 28px; margin: 4px auto 8px; display: grid; }
.av.lg.icon { font-size: 32px; }
.av.ghost { background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--glass-line); }
.avatar-pick { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 560px) { .avatar-pick { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.pick { aspect-ratio: 1; height: auto; max-height: 40px; border-radius: 50%; border: 1px solid var(--glass-line); background: rgba(255,255,255,.06); color: var(--paper); font-size: 18px; font-weight: 600; cursor: pointer; padding: 0; }
.pick:first-child { background: var(--paper); color: var(--ink); font-size: 16px; }
.pick.on { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--paper); }
.pick:hover, .pick:focus-visible { outline: none; border-color: rgba(175,202,238,.8); }

/* Versus strip */
.players { position: fixed; z-index: 3; left: 50%; bottom: calc(var(--bar-gap) + 78px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: min(560px, calc(100% - 24px)); pointer-events: none; }
.players[hidden], body:not(.in-dig) .players, body[data-screen="result"] .players, body[data-screen="final"] .players { display: none; }

.vs-mark { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.pchip { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 7px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color .3s, box-shadow .3s; }
.pchip.opp { flex-direction: row-reverse; padding: 7px 7px 7px 12px; text-align: right; }
.pmeta { display: flex; flex-direction: column; min-width: 0; }
.pmeta b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--paper); }
.pst { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pchip.opp .pst { direction: ltr; }
.pdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: 1px; }
.dots { display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; animation: dots 1.2s steps(4) infinite; text-align: left; }
@keyframes dots { 0% { width: 0; } 100% { width: 1.2em; } }
.st-typing .pdot { background: var(--opp); animation: pulse 1s ease-in-out infinite; }
.st-guessing .pdot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.pchip.st-locked, .pchip.st-ready, .pchip.st-rematch { border-color: rgba(175,202,238,.6); box-shadow: 0 0 20px rgba(175,202,238,.25); }
.st-locked .pdot, .st-ready .pdot, .st-rematch .pdot { background: #9fd6a8; }
.st-locked .pst, .st-ready .pst, .st-rematch .pst { color: var(--paper); }
.st-late .pdot { background: #e7a39b; }
.pchip.st-locked .av::after, .pchip.st-ready .av::after { content: "\2713"; position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: #9fd6a8; color: var(--ink); font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #151515; }
.rstatus { font-size: 12px; color: var(--muted); }
.rstatus.st-ready, .rstatus.st-rematch { color: #9fd6a8; }
.rstatus.st-ready::before, .rstatus.st-rematch::before { content: "\2713  "; }

.tc-none, .tc-late { color: var(--t-none); }
.tc-d { color: var(--t-d); } .tc-f { color: var(--t-f); } .tc-o { color: var(--t-o); }
.tc-r { color: var(--t-r); text-shadow: 0 0 18px rgba(238,243,248,.35); }
.tc-x { color: var(--t-x); text-shadow: 0 0 18px rgba(143,179,220,.45); }
.tc-g { background: linear-gradient(90deg, #8c9aac, #fff, #b8c8dc, #fff, #8c9aac); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.2s linear infinite; filter: drop-shadow(0 0 12px rgba(175,202,238,.8)); }
@keyframes shimmer { to { background-position: -200% 0; } }
.flash { position: fixed; inset: 0; z-index: 6; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(225,242,255,.9), rgba(175,202,238,.35) 40%, transparent 70%); animation: flash 1.2s ease-out forwards; }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.rock { position: fixed; z-index: 6; pointer-events: none; width: var(--s); height: var(--s); background: var(--c); border-radius: 2px 5px 3px 4px; animation: rock var(--t) cubic-bezier(.15,.6,.4,1) forwards; }
@keyframes rock { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* Final */
.final { text-align: center; }
.final small { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.final h2 { margin: 6px 0 2px; font-size: clamp(34px, 7vw, 52px); line-height: 1.05; font-variant-numeric: tabular-nums; }
.final-grid { display: grid; gap: 6px; text-align: left; margin-top: 6px; }
.frow { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.05); font-size: 14px; }
.frow .p { display: block; color: var(--muted); font-size: 12px; }
.frow .a { font-weight: 500; }
.frow .t { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.frow .n { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 32px; text-align: right; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 10px; }
.vs > div { position: relative; padding: 14px 12px 12px; border-radius: 14px; background: rgba(255,255,255,.06); }
.vs .crown { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.vs .rstatus { display: block; min-height: 1.2em; margin-top: 4px; }
.vs > div.win { box-shadow: 0 0 0 1px rgba(175,202,238,.6), 0 0 22px rgba(175,202,238,.3); }
.vs small { display: block; }
.vs b { font-size: 26px; font-variant-numeric: tabular-nums; }
.frow.two { grid-template-columns: 1.1fr 1fr 1fr; }
.frow.two .opp .a { color: var(--opp); }

/* Dialogs */
dialog { border: 0; border-radius: 16px; padding: 26px; width: min(460px, calc(100% - 32px)); background: #fff; color: var(--ink); }
dialog::backdrop { background: rgba(21,21,21,.5); }
dialog h2 { margin: 0 0 10px; font-weight: 500; letter-spacing: -.03em; }
.rules { padding-left: 18px; line-height: 1.6; color: #34332f; margin: 0 0 14px; }
.tier-list { list-style: none; padding: 12px 14px; margin: 0 0 16px; background: #151515; border-radius: 12px; display: grid; gap: 5px; }
.tier-list li { display: flex; justify-content: space-between; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.overlay { position: fixed; inset: 0; z-index: 9; background: rgba(0,0,0,.5); }
.overlay[hidden] { display: none; }

.foot { position: fixed; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 11px; color: rgba(242,242,239,.45); z-index: 2; pointer-events: none; }
.foot a { color: inherit; pointer-events: auto; }
body.in-dig .foot { display: none; }

@media (max-width: 560px) {
  .hud { gap: 8px; top: 54px; }
  .hud-box { min-width: 84px; padding: 6px 10px; }
  .hud-box b { font-size: 16px; }
  .pip { width: 9px; height: 9px; }
  .prompt-card { top: 112px; }
  .fact { font-size: 10.5px; }
  .fact.left { right: calc(50% + 40px); max-width: 42vw; white-space: normal; text-align: right; }
  .fact.right { left: calc(50% + 40px); max-width: 42vw; white-space: normal; }
  .settings { grid-template-columns: 1fr; }
  .tick { left: calc(50% + 22px); font-size: 10px; }
  .bit .tag { font-size: 12px; }
  .players { gap: 6px; }
  .vs-mark { display: none; }
  .pchip { padding: 5px 9px 5px 5px; gap: 7px; }
  .pchip .av { width: 30px; height: 30px; font-size: 14px; }
  .pmeta b { font-size: 12.5px; }
  .pst { font-size: 11px; }
  .result-cols.duo { gap: 8px; }
  .res { padding: 12px 10px; }
  .res .who { flex-wrap: wrap; gap: 8px; }
  .res .deeper { margin-left: 0; }
}
#screen-final .panel { top: calc(50% + 34px); max-height: calc(100% - 150px); }
@media (max-width: 560px) { #screen-final .panel { top: calc(50% + 50px); max-height: calc(100% - 190px); } }

/* "Answer not found" note above the answer bar */
.not-found { position: absolute; left: 50%; bottom: calc(var(--bar-gap) + 80px); transform: translate(-50%, 8px); width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 9px 16px; border-radius: 999px; background: #f2f2ef; color: #151515; font-size: 14px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.not-found.show { opacity: 1; transform: translate(-50%, 0); }
.not-found.fixed { background: #151515; color: #f2f2ef; border: 1px solid rgba(242,242,239,.25); }
.res .typed { margin-top: 2px; font-size: 12.5px; color: var(--muted); font-style: italic; }

/* Messages above the versus strip in a 1v1, so nothing hides behind it */
body.multi .not-found { bottom: calc(var(--bar-gap) + 140px); }
.not-found { z-index: 2; }
.not-found.check { background: #2a2926; color: var(--paper); border: 1px solid var(--glass-line); }
.not-found.fixed { max-width: min(520px, calc(100% - 32px)); width: auto; }

/* Chat */
body.has-chat .howto { display: none; }
.chat-btn { position: fixed; z-index: 7; top: 12px; right: clamp(12px, 3vw, 28px); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--glass); color: var(--paper); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chat-btn[hidden] { display: none; }
.chat-btn:hover, .chat-btn:focus-visible { outline: none; box-shadow: 0 0 18px rgba(175,202,238,.5); }
.badge { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #151515; }
.badge[hidden] { display: none; }
.chat { position: fixed; z-index: 8; top: 64px; right: clamp(12px, 3vw, 28px); width: min(340px, calc(100% - 24px)); height: min(440px, calc(100% - 84px)); display: flex; flex-direction: column; padding: 0; overflow: hidden; animation: chatIn .22s ease; }
@keyframes chatIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.chat[hidden] { display: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--glass-line); }
.chat-head b { font-weight: 600; }
.chat-x { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.chat-x:hover, .chat-x:focus-visible { color: var(--paper); outline: none; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.cempty { margin: auto; color: var(--muted); font-size: 13px; }
.cmsg { display: flex; align-items: flex-end; gap: 6px; max-width: 88%; }
.cmsg.me { align-self: flex-end; flex-direction: row-reverse; }
.cmsg .av.sm { margin: 0; }
.cbub { padding: 7px 11px; border-radius: 14px 14px 14px 4px; background: rgba(255,255,255,.08); font-size: 14px; line-height: 1.35; word-break: break-word; }
.cmsg.me .cbub { border-radius: 14px 14px 4px 14px; background: var(--paper); color: var(--ink); }
.cbub b { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 1px; }
.cmsg.me .cbub b { color: var(--graphite); }
.chat-quick { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
.quick { flex: none; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--glass-line); background: rgba(255,255,255,.06); color: var(--paper); font-size: 13px; cursor: pointer; }
.quick:hover, .quick:focus-visible { outline: none; border-color: rgba(175,202,238,.8); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--glass-line); }
.chat-form input { flex: 1; min-width: 0; height: 40px; border-radius: 999px; border: 0; padding: 0 14px; font-size: 16px; background: var(--paper); color: var(--ink); }
.chat-form input:focus { outline: none; box-shadow: 0 0 0 3px rgba(175,202,238,.45); }
.chat-form .btn { height: 40px; padding: 0 16px; font-size: 14px; }
.chat-toast { position: fixed; z-index: 7; top: 64px; right: clamp(12px, 3vw, 28px); max-width: min(300px, calc(100% - 24px)); padding: 8px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; color: var(--paper); }
.chat-toast[hidden] { display: none; }
.chat-toast .cmsg { max-width: none; }
.chat-toast.pop { animation: chatIn .25s ease; }
@media (max-width: 560px) {
  body.multi .not-found { bottom: calc(var(--bar-gap) + 132px); font-size: 13px; }
  .chat-btn { top: 10px; width: 40px; height: 40px; }
  .chat { top: 58px; height: min(420px, calc(100% - 70px)); }
  .chat-toast { top: 58px; }
}

/* ---------- the answer bar: always there during a dig, so the keyboard stays up ---------- */
:root { --bar-gap: max(28px, env(safe-area-inset-bottom)); }
.answer-bar { opacity: 0; pointer-events: none; transition: opacity .25s; }
body.in-dig:not([data-screen="final"]) .answer-bar { opacity: 1; pointer-events: auto; }
.answer-bar input { font-size: 18px; }
.answer-bar input[readonly] { color: var(--graphite); }
#nextBtn { display: none; white-space: nowrap; }
body[data-screen="result"] #nextBtn { display: inline-flex; align-items: center; }
body[data-screen="result"] #digBtn, body[data-screen="result"] .dial { display: none; }
body[data-screen="result"] .answer-bar input { flex: 1 1 0; font-size: 15px; }
#screen-result .result-card { padding-bottom: 14px; }
#screen-result .result-cols { margin-bottom: 4px; }
#resultMsg:empty { display: none; }

/* the dial: a clock face that empties as time runs out */
.dial { position: relative; flex: none; width: 50px; height: 50px; display: grid; place-items: center; }
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dial-track { fill: rgba(255,255,255,.06); stroke: rgba(255,255,255,.14); stroke-width: 4; }
.dial-arc { fill: none; stroke: var(--paper); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 0; transform: rotate(-90deg); transform-origin: 26px 26px; transition: stroke-dashoffset .1s linear, stroke .3s; }
.dial-hand { stroke: rgba(242,242,239,.35); stroke-width: 1.5; stroke-linecap: round; transform-origin: 26px 26px; transition: transform .1s linear; }
.dial-ticks line { stroke: rgba(242,242,239,.28); stroke-width: 1.2; stroke-linecap: round; }
.dial b { position: relative; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.dial.low .dial-arc { stroke: #e7a39b; }
.dial.low b { color: #e7a39b; }
.dial.low .dial-hand { stroke: rgba(231,163,155,.5); }
.dial.beat b { animation: dialTick .5s ease-out; }
@keyframes dialTick { 0% { transform: scale(1.3); } 100% { transform: scale(1); } }
.dial.done .dial-arc { stroke: #9fd6a8; stroke-dashoffset: 0 !important; }
.dial.done b { color: #9fd6a8; }
.dial.done .dial-hand { opacity: 0; }


/* ---------- Bankasi Media type and surfaces (matches bankasimedia.com and the [play] hub) ---------- */
:root { --glass: rgba(24, 26, 29, .88); --glass-line: rgba(255, 255, 255, .2); --bracket: #9b978f; --label: #c9d1d8;
  --glow: 0 0 6px rgba(255,255,255,.7), 0 0 22px rgba(227,237,255,.7), 0 0 48px rgba(201,220,246,.45); }
.br { font-weight: 300; color: var(--bracket); }
.lockup { display: flex; align-items: baseline; gap: 12px; }
.wordmark { font-size: 15px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.wordmark sup { font-size: 6.6px; font-weight: 800; letter-spacing: .22em; margin-left: .1em; vertical-align: 1.3em; }
.play-mark { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
body:not(.at-home) .lockup .br { color: rgba(242,242,239,.55); }
.glass, .answer-bar, .pchip, .hud-box, .chat-btn, .chat-toast { backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
.glass { box-shadow: 0 10px 30px rgba(0,0,0,.28); }
.howto { font-weight: 700; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); padding: 7px 14px; border: 1px solid rgba(21,21,21,.35); border-radius: 8px; }
.howto:hover, .howto:focus-visible { border-color: var(--ink); border-bottom-color: var(--ink); }

/* home */
.title { font-weight: 600; letter-spacing: -.05em; line-height: .92; }
.subtitle { font-size: 12px; font-weight: 700; letter-spacing: .32em; color: var(--ink); }
.tagline { font-size: 15px; color: var(--graphite); }
.daily-note { font-weight: 500; }

/* buttons: sentence case, 600, like the bankasimedia.com hero cards */
.btn { font-weight: 600; letter-spacing: -.005em; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn.big { font-size: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border-radius: 14px; }
.btn.primary { background: #f4f3ef; border-color: #f4f3ef; }

/* headings and labels */
.panel h2, dialog h2 { font-weight: 600; letter-spacing: -.035em; }
.prompt-card h2 { font-weight: 600; letter-spacing: -.04em; }
.final h2 { font-weight: 600; letter-spacing: -.04em; text-shadow: var(--glow); }
.prompt-card small, .hud-box small, .result-head, .final small, .field > span, .code-box span, .vs-mark, .hint, .lock-status { font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.field > span { font-size: 11px; color: var(--label); }
.hud-box b, .res .ans, .vs b, .code-box b { font-weight: 600; }
.res .tier { font-weight: 700; }
.wordmark, .play-mark { white-space: nowrap; }
.foot { font-size: 12px; }
.foot a { text-decoration: none; font-weight: 600; color: rgba(242,242,239,.75); }
.foot .br { color: rgba(242,242,239,.45); }
body:not(.at-home) .lockup { color: #fff; opacity: 1; mix-blend-mode: difference; }
body:not(.at-home) .lockup .br { color: rgba(255,255,255,.6); }
.join-row .field.grow { min-width: 0; } .join-row input { width: 100%; min-width: 0; } .join-row .btn { flex: none; }
