/* =========================================================
   시간 감각 테스트 — design system (series v3, teal)
   ========================================================= */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  --ink: #10201f;
  --ink-2: #3c4c4a;
  --muted: #7d8d8a;
  --line: rgba(16, 32, 31, 0.08);

  --teal: #0d9488;
  --teal-2: #14b8a6;
  --teal-ink: #0f766e;
  --teal-deep: #115e59;
  --soft: #e7fbf7;
  --soft-2: #f2fbf9;
  --gold: #f59e0b;

  --card: rgba(255, 255, 255, 0.82);
  --card-solid: #ffffff;
  --shadow-lg: 0 26px 60px -34px rgba(6, 78, 72, 0.45);
  --shadow-sm: 0 10px 24px -18px rgba(6, 78, 72, 0.55);

  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;

  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --mono: "SF Mono", "Roboto Mono", ui-monospace, "Menlo", monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1000px 600px at 4% -10%, #d9f7f0 0%, rgba(217, 247, 240, 0) 60%),
    radial-gradient(900px 560px at 104% 2%, #e6f6ff 0%, rgba(230, 246, 255, 0) 58%),
    radial-gradient(900px 640px at 50% 112%, #e3faf4 0%, rgba(227, 250, 244, 0) 62%),
    #fbfdfd;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* subtle grain of light */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(1200px 500px at 50% -20%, rgba(255, 255, 255, 0.9), transparent 70%);
}

.app {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
  padding: 18px 18px calc(30px + env(safe-area-inset-bottom));
}

/* ---------- brand ---------- */
.brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 4px 22px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--teal-deep);
}
.brand-mark .dot {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px -4px rgba(13, 148, 136, 0.5);
  font-size: 13px;
}
.brand-sub {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ---------- screens ---------- */
.hidden { display: none !important; }

.screen { animation: screenIn 0.32s cubic-bezier(0.22, 1, 0.36, 1); }
.screen.hidden { display: none !important; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.pill {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(13, 148, 136, 0.16);
  color: var(--teal-ink);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 16px -14px rgba(13, 148, 136, 0.6);
}

h1 {
  margin: 15px 0 10px;
  font-size: clamp(27px, 8vw, 32px);
  line-height: 1.26;
  letter-spacing: -0.045em;
  font-weight: 800;
}
h1 em {
  font-style: normal;
  color: var(--teal-ink);
  white-space: nowrap;
  font-weight: 800;
}
.lead {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.62;
  letter-spacing: -0.012em;
}

/* ---------- duel banner ---------- */
.duel-banner {
  position: relative;
  margin: 0 0 16px;
  padding: 15px 16px 14px;
  border-radius: var(--r-md);
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.94));
  border: 1px solid rgba(249, 115, 22, 0.28);
  box-shadow: 0 18px 34px -30px rgba(194, 65, 12, 0.65);
  overflow: hidden;
}
.duel-banner::after {
  content: "";
  position: absolute;
  right: -30px; top: -46px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.22), transparent 68%);
}
.duel-head {
  margin: 0 0 7px;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.duel-head .flame { margin-right: 3px; }
.duel-line {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}
.duel-line b { color: #c2410c; font-variant-numeric: tabular-nums; }
.duel-note {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: #9a6a4b;
}

/* ---------- hero ---------- */
.hero-card {
  position: relative;
  padding: 24px 18px 20px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 120% at 50% -20%, rgba(20, 184, 166, 0.14), transparent 62%),
    var(--card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-lg);
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.hero-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--teal-ink);
  opacity: 0.72;
}
.hero-target {
  margin: 8px 0 6px;
  font-size: clamp(52px, 16vw, 66px);
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.hero-target span {
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  margin-left: 5px;
  letter-spacing: -0.01em;
}
.hero-sub { margin: 0; font-size: 12px; color: var(--muted); }
.hero-orbit { position: absolute; inset: 0; pointer-events: none; }
.orbit-tick {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.28);
}
.orbit-tick.t1 { top: 18px; left: 22px; }
.orbit-tick.t2 { top: 26px; right: 30px; width: 4px; height: 4px; }
.orbit-tick.t3 { bottom: 20px; left: 40px; width: 3px; height: 3px; }
.orbit-tick.t4 { bottom: 30px; right: 24px; }

/* ---------- difficulty ---------- */
.diff-title {
  margin: 22px 4px 9px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.diff-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 13px 14px 12px;
  border-radius: var(--r-md);
  border: 1.5px solid rgba(16, 32, 31, 0.07);
  background: rgba(255, 255, 255, 0.72);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s, box-shadow 0.18s;
  color: var(--ink);
}
.diff-card:active { transform: scale(0.985); }
.diff-card .diff-emoji { font-size: 17px; }
.diff-card b { font-size: 14px; letter-spacing: -0.02em; }
.diff-card .diff-desc { font-size: 10.5px; color: var(--muted); line-height: 1.35; }
.diff-card.selected {
  border-color: rgba(13, 148, 136, 0.55);
  background: linear-gradient(180deg, #effcf9, #ffffff);
  box-shadow: 0 12px 24px -20px rgba(13, 148, 136, 0.9);
}
.diff-card.selected b { color: var(--teal-ink); }

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 16px;
}
.stat {
  padding: 13px 14px 11px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px -22px rgba(6, 78, 72, 0.8);
}
.stat b {
  display: block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat b small { font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.stat span { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); letter-spacing: -0.01em; }

/* ---------- buttons ---------- */
.btn {
  width: 100%;
  touch-action: manipulation;
  border: 0;
  border-radius: 18px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.025em;
  padding: 16px 18px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:active { transform: scale(0.975); }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #14b8a6, #0d9488 55%, #0f766e);
  box-shadow: 0 16px 30px -16px rgba(13, 148, 136, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-outline {
  margin-top: 9px;
  color: var(--teal-ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(13, 148, 136, 0.28);
  box-shadow: 0 10px 20px -20px rgba(13, 148, 136, 0.8);
}
.btn-ghost {
  margin-top: 12px;
  color: var(--ink-2);
  background: transparent;
  font-size: 13.5px;
  font-weight: 700;
  padding: 12px;
}
.btn-soft {
  color: var(--teal-ink);
  background: var(--soft);
}
.link-btn {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 10px;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(16, 32, 31, 0.16);
  cursor: pointer;
}
.link-btn.hidden { display: none; }

/* ---------- rules strip ---------- */
.rules {
  display: grid;
  gap: 7px;
  margin: 18px 2px 0;
}
.rule {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-2);
}
.rule-n {
  flex: 0 0 auto;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.1);
  color: var(--teal-ink);
  font-size: 10.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.rule p { margin: 0; font-size: 12.5px; letter-spacing: -0.012em; }

.grade-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 16px 2px 0;
}
.g {
  width: 25px; height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.g-sp { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.g-s { background: #0d9488; }
.g-a { background: #14b8a6; }
.g-b { background: #5eead4; color: #115e59; }
.g-c { background: #cdeee8; color: #115e59; }
.grade-strip-txt { margin-left: 4px; font-size: 10.5px; color: var(--muted); }
.grade-strip-txt b { color: var(--teal-ink); }

/* ---------- footer ---------- */
.foot {
  margin-top: 22px;
  padding: 0 6px;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- READY ---------- */
#screen-ready {
  padding-top: 34px;
  text-align: center;
}
.ready-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--teal-ink);
  opacity: 0.75;
}
.ready-target {
  font-size: clamp(70px, 22vw, 92px);
  font-weight: 800;
  letter-spacing: -0.07em;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.ready-target span {
  font-size: 22px;
  color: var(--muted);
  margin-left: 4px;
  letter-spacing: -0.02em;
}
.ready-hint { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }

.countdown {
  margin: 26px auto 4px;
  width: 128px; height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 52px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #14b8a6, #0d9488 60%, #0f766e);
  box-shadow: 0 26px 50px -24px rgba(13, 148, 136, 0.9), inset 0 2px 0 rgba(255, 255, 255, 0.3);
  animation: beat 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes beat {
  0% { transform: scale(0.72); opacity: 0.35; }
  60% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); }
}
.countdown.go { font-size: 34px; letter-spacing: -0.03em; }

/* ---------- PLAY ---------- */
#screen-play {
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 120px);
}
.play-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 2px 0;
}
.target-chip {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(13, 148, 136, 0.18);
  font-size: 12.5px;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.target-chip b { color: var(--teal-deep); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.diff-chip {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px dashed rgba(16, 32, 31, 0.14);
}

.reveal-bar {
  height: 4px;
  margin: 16px 4px 0;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.1);
  overflow: hidden;
}
.reveal-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #5eead4, #0d9488);
}
.reveal-bar.run i { animation: grow 1.5s linear forwards; }
.reveal-bar.run.hard { visibility: hidden; }
@keyframes grow { from { width: 0; } to { width: 100%; } }

.clock-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 26px 0 6px;
}
.clock-wrap::before {
  content: "";
  position: absolute;
  width: min(76vw, 330px);
  height: min(76vw, 330px);
  border-radius: 50%;
  border: 1px dashed rgba(13, 148, 136, 0.16);
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.25) 72%, transparent);
  z-index: -1;
}
.clock {
  font-family: var(--mono);
  font-size: clamp(62px, 21vw, 88px);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: color 0.2s;
}
.clock.blind {
  color: #b6cbc8;
  letter-spacing: 0.02em;
  animation: blindPulse 1.1s ease-in-out infinite;
}
@keyframes blindPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.025); }
}
.clock-unit {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.blind-note {
  margin-top: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  font-size: 11.5px;
  font-weight: 700;
  animation: screenIn 0.28s ease-out;
}
.blind-note.hidden { display: none; }

.play-hint {
  margin: 0 0 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.btn-stop {
  position: relative;
  padding: 22px 18px;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(180deg, #fb7185, #e11d48 58%, #be123c);
  box-shadow: 0 22px 40px -18px rgba(225, 29, 72, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-radius: 22px;
}
.stop-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22);
}
.btn-stop::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 26px;
  border: 2px solid rgba(225, 29, 72, 0.22);
  animation: stopRing 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes stopRing {
  0% { transform: scale(0.99); opacity: 0.7; }
  70% { transform: scale(1.045); opacity: 0; }
  100% { opacity: 0; }
}
.key-hint {
  margin: 10px 0 6px;
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
}

/* ---------- RESULT ---------- */
#screen-result { padding-top: 2px; }

.result-shell { position: relative; }

/* duel verdict */
.verdict {
  text-align: center;
  padding: 8px 0 14px;
}
.verdict.hidden { display: none; }
.verdict-badge {
  font-size: 45px;
  line-height: 1;
  display: inline-block;
}
.verdict-title {
  margin: 8px 0 4px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.verdict-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  letter-spacing: -0.015em;
}
.is-win .verdict-title { color: var(--teal-deep); }
.is-win .verdict-badge { animation: trophyBounce 1.1s cubic-bezier(0.22, 1, 0.36, 1); }
.is-draw .verdict-title { color: #b45309; }
.is-draw .verdict-badge { animation: tense 1.2s ease-in-out infinite; }
.is-lose .verdict-title { color: #9f1239; }

@keyframes trophyBounce {
  0% { transform: scale(0.3) rotate(-12deg); opacity: 0; }
  45% { transform: scale(1.28) rotate(6deg); opacity: 1; }
  68% { transform: scale(0.94) rotate(-3deg); }
  85% { transform: scale(1.06) rotate(1deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes tense {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.12) rotate(2deg); }
}

/* result card */
.result-card {
  position: relative;
  padding: 22px 18px 18px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(140% 100% at 50% -30%, rgba(20, 184, 166, 0.16), transparent 58%),
    var(--card-solid);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-lg);
  text-align: center;
  overflow: hidden;
}
.result-card.shake { animation: shake 0.62s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px) rotate(-0.4deg); }
  20%, 80% { transform: translateX(4px) rotate(0.5deg); }
  30%, 50%, 70% { transform: translateX(-7px) rotate(-0.7deg); }
  40%, 60% { transform: translateX(7px) rotate(0.7deg); }
}

.big-emoji {
  font-size: 58px;
  line-height: 1;
  margin: 2px 0 8px;
  display: block;
}
.big-emoji.hidden { display: none; }
.big-emoji.pop { animation: emojiPop 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes emojiPop {
  0% { transform: scale(0.2) rotate(-18deg); opacity: 0; }
  55% { transform: scale(1.3) rotate(8deg); opacity: 1; }
  75% { transform: scale(0.94) rotate(-4deg); }
  100% { transform: scale(1) rotate(0); }
}
.big-emoji.wobble { animation: wobble 2.2s ease-in-out infinite; }
@keyframes wobble {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-3px); }
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px 8px 9px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid rgba(13, 148, 136, 0.14);
}
.grade {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 30px;
  padding: 0 6px;
  border-radius: 9px;
  background: linear-gradient(180deg, #14b8a6, #0d9488);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.grade-badge[data-grade="S+"] .grade { background: linear-gradient(180deg, #fbbf24, #f59e0b); box-shadow: 0 8px 18px -10px rgba(245, 158, 11, 0.9); }
.grade-badge[data-grade="A"] .grade { background: linear-gradient(180deg, #2dd4bf, #14b8a6); }
.grade-badge[data-grade="B"] .grade { background: linear-gradient(180deg, #7fe3d6, #2dd4bf); color: #0f766e; }
.grade-badge[data-grade="C"] .grade { background: linear-gradient(180deg, #d9f2ee, #bde7e1); color: #0f766e; }
.grade-badge[data-grade="D"] .grade { background: #e5e7eb; color: #6b7280; }
.grade-name { font-size: 13px; font-weight: 800; color: var(--teal-ink); letter-spacing: -0.02em; }

.oneliner {
  margin: 12px 4px 16px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ink);
  word-break: keep-all;
}

.num-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 12px 8px;
  border-radius: var(--r-md);
  background: #f6fbfa;
  border: 1px solid rgba(16, 32, 31, 0.045);
}
.num span { display: block; font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.num b {
  display: block;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.num.accent b { color: var(--teal); }
.result-card.bad .num.accent b { color: #e11d48; }

.err-detail {
  margin: 11px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.duel-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed rgba(16, 32, 31, 0.1);
}
.duel-compare.hidden { display: none; }
.cmp { flex: 1; }
.cmp span { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 3px; max-width: 110px; margin-left: auto; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp b { font-size: 17px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.cmp-vs { font-size: 10px; font-weight: 800; color: var(--muted); letter-spacing: 0.08em; }

/* challenge box */
.challenge-box {
  margin-top: 4px;
  padding: 16px 14px 14px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px -28px rgba(6, 78, 72, 0.7);
}
.field-label {
  display: block;
  margin: 0 2px 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
}
.field-label span { color: var(--muted); font-weight: 600; }
.nick-input {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 10px;
  border-radius: 13px;
  border: 1.5px solid rgba(16, 32, 31, 0.1);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.nick-input::placeholder { color: #b3c1bf; }
.nick-input:focus {
  border-color: rgba(13, 148, 136, 0.55);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}
.link-wrap {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}
.link-wrap.hidden { display: none; }
.link-input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid rgba(16, 32, 31, 0.1);
  background: #f7fbfa;
  font-size: 11.5px;
  color: var(--ink-2);
  font-family: var(--mono);
  outline: none;
}
.link-copy {
  flex: 0 0 auto;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid rgba(13, 148, 136, 0.25);
  background: #fff;
  color: var(--teal-ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  max-width: min(90vw, 380px);
  padding: 11px 17px;
  border-radius: 999px;
  background: rgba(16, 32, 31, 0.92);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s, transform 0.24s;
  z-index: 60;
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.6);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* confetti canvas */
#confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
}

@media (prefers-reduced-motion: reduce) {
  .screen, .countdown, .verdict-badge, .big-emoji, .result-card, .clock.blind, .btn-stop::after { animation: none !important; }
}
