/* Bible Charades: shared tokens + components (Cloudstudio-inspired: sky, ink, butter) */
:root {
  --sky: #cde9f7;
  --sky-deep: #a8d7ef;
  --mist: #eef7fc;
  --paper: #f6fbfe;
  --ink: #111214;
  --ink-2: #1d1f23;
  --ink-3: #2c2f35;
  --muted: #4c5561;
  --muted-on-ink: #9aa3ad;
  --sky-on-ink: #9fd9f6;
  --butter: #fff38f;
  --butter-deep: #f5e35a;
  --red: #ff5a4e;
  --line: rgba(17, 18, 20, 0.12);
  --line-on-ink: rgba(255, 255, 255, 0.12);
  --radius: 22px;
  --display: "Schibsted Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --ease: cubic-bezier(0.2, 0.9, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* type */
.display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.92;
  margin: 0;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.eyebrow.live::before { background: var(--red); animation: pulse 1.1s ease-in-out infinite; }
.eyebrow.plain::before { display: none; }

.mono { font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; }

/* logo */
.logo {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}
.logo sup { font-size: 0.9em; top: -0.15em; position: relative; }

/* pills */
.pill {
  --pill-bg: var(--ink);
  --pill-fg: var(--sky-on-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--pill-bg);
  background: var(--pill-bg);
  color: var(--pill-fg);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.18s var(--spring), background 0.2s, color 0.2s, opacity 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.pill:hover { transform: translateY(-1px); }
.pill:active { transform: scale(0.96); }
.pill:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.pill i { font-size: 1.15em; line-height: 0; }
.pill .arrow { transition: transform 0.2s var(--ease); }
.pill:hover .arrow { transform: translateX(3px); }
.pill.butter { --pill-bg: var(--butter); --pill-fg: var(--ink); }
.pill.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.pill.ghost-ink { background: transparent; color: var(--butter); border-color: rgba(255, 243, 143, 0.4); }
.pill.white { --pill-bg: #fff; --pill-fg: var(--ink); }
.pill.danger { --pill-bg: var(--red); --pill-fg: #fff; }
.pill.sm { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.pill.xs { min-height: 30px; padding: 4px 12px; font-size: 12px; font-family: var(--mono); font-weight: 600; letter-spacing: 0.04em; }
.pill.lg { min-height: 56px; padding: 14px 28px; font-size: 18px; }

.chip {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--sky-on-ink);
  white-space: nowrap;
}
.chip.soft { background: rgba(17, 18, 20, 0.07); color: var(--ink); }
.chip.butter { background: var(--butter); color: var(--ink); }

kbd {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  border: 1px solid currentColor;
  border-radius: 6px;
  padding: 1px 6px;
  opacity: 0.8;
}

/* marquee band */
.marquee {
  background: var(--ink);
  color: var(--sky-on-ink);
  overflow: hidden;
  white-space: nowrap;
  border-block: 1px solid var(--ink);
  user-select: none;
}
.marquee-track {
  display: inline-flex;
  gap: 0;
  padding: 10px 0;
  animation: marquee 28s linear infinite;
  will-change: transform;
}
.marquee-track span {
  font-weight: 700;
  font-size: clamp(22px, 4.6vw, 40px);
  letter-spacing: -0.035em;
  padding-inline: 0.45em;
}
.marquee-track { align-items: center; }
.marquee-track .star { color: var(--sky-on-ink); font-size: clamp(16px, 3vw, 28px); }

/* the not-yet-typed part of a typewriter line: holds the final layout, invisible */
.type-ghost { color: transparent; }

/* countdown digits: equal-width slots so the clock never shifts as it ticks */
.clk-d { display: inline-block; font-variant-numeric: tabular-nums; text-align: center; width: 0.6em; }
.clk-colon { display: inline-block; padding: 0 0.03em; transform: translateY(-0.06em); }

/* typewriter caret */
.caret::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.82em;
  background: currentColor;
  margin-left: 0.04em;
  margin-right: -0.12em; /* takes no room, so it never wraps onto its own line */
  vertical-align: -0.04em;
  animation: blink 0.9s steps(1) infinite;
}

/* toast */
.toasts {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  font-weight: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  gap: 10px;
  align-items: center;
  animation: toast-in 0.4s var(--spring);
  pointer-events: auto;
}
.toast .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--butter); flex: none; }
.toast.error .dot { background: var(--red); }
.toast.leaving { animation: toast-out 0.25s var(--ease) forwards; }

/* confetti canvas */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* keyframes */
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { transform: scale(0.6); opacity: 0.5; } }
@keyframes toast-in { from { transform: translateY(-16px) scale(0.96); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(-10px); opacity: 0; } }
@keyframes pop-in { from { transform: scale(0.85); opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes shake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  15% { transform: translate(-6px, 2px) rotate(-6deg); }
  30% { transform: translate(6px, -2px) rotate(6deg); }
  45% { transform: translate(-5px, 1px) rotate(-4deg); }
  60% { transform: translate(4px, -1px) rotate(3deg); }
  75% { transform: translate(-2px, 0) rotate(-1deg); }
}
@keyframes flash { from { opacity: 0.9; } to { opacity: 0; } }
@keyframes bump { 40% { transform: scale(1.25); } }
@keyframes ring { to { transform: scale(1.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
