:root {
  --text: #f5f7fc;
  --text-2: rgb(236 240 250 / .74);
  --text-3: rgb(236 240 250 / .5);
  --line: rgb(255 255 255 / .12);
  --glass: 28 30 36;               /* dark gray tint, as r g b */
  --ink: #14161c;
  --easy: #5fd38d;
  --medium: #f2c14e;
  --hard: #f2766b;
  --outline: #2a2f4a;              /* the dice art's text outline */
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: #9fc3ee;
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; }
p { margin: 0; }

/* ---------------------------------------------------------------- scene */
.scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  image-rendering: pixelated;
}
@media (max-aspect-ratio: 1/1) {
  .scene { object-position: 24% 50%; }   /* portrait: keep the goat on its cliff in view */
}

.scrim {
  position: fixed;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 50%, rgb(12 16 30 / .18), rgb(12 16 30 / .5));
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}
body:is(.open, .reading) .scrim { opacity: 1; }
/* the gold goat, drawn again above the scrim so a question doesn't dim it (scene.js) */
.scene-lit { pointer-events: none; }

/* ---------------------------------------------------------------- glass */
.glass {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgb(255 255 255 / .09), rgb(255 255 255 / 0) 45%),
    rgb(var(--glass) / var(--glass-alpha, .56));
  -webkit-backdrop-filter: blur(var(--blur, 22px)) saturate(1.7) brightness(.92);
  backdrop-filter: blur(var(--blur, 22px)) saturate(1.7) brightness(.92);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .2),
    inset 0 0 22px rgb(255 255 255 / .05),
    0 1px 2px rgb(0 0 0 / .18),
    0 22px 60px -12px rgb(8 12 30 / .55);
}
/* rim light: catches the light top-left, glints again bottom-right */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1.25px;
  border-radius: inherit;
  background: linear-gradient(140deg,
    rgb(255 255 255 / .6), rgb(255 255 255 / .12) 28%,
    rgb(255 255 255 / .04) 62%, rgb(255 255 255 / .32));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
/* soft specular sheen across the top */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(90% 55% at 18% 0%, rgb(255 255 255 / .11), transparent 70%);
  pointer-events: none;
}

/* ---------------------------------------------------------------- looks
   Three looks to compare (the dev switcher sets <html data-skin>); "glass" is the rules above. */

/* matte: a plain solid card */
[data-skin="matte"] .glass {
  background: #1f2336;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 22px 60px -12px rgb(8 12 30 / .6);
}
[data-skin="matte"] .glass::before,
[data-skin="matte"] .glass::after { display: none; }

/* pixel: stone frames with snow on top (Peakish/brand/ui_frames.lua), drawn by frames.js
   on one canvas per element at 3 CSS px per art pixel, with a hard pixel drop shadow.
   Padding keeps content inside the frame: 4 art px (12 CSS px) small, 8 (24) for the panel,
   plus room on top for the snow cap (play.js: base + amp + 1 art px = 12 / 15 CSS px). */
.pixel-frame {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
}
html:not([data-skin="pixel"]) .pixel-frame { display: none; }
[data-skin="pixel"] .glass {
  background: none;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none;
  border-radius: 0;
  filter: drop-shadow(0 6px 0 rgb(14 18 38 / .35));
}
[data-skin="pixel"] .glass::before,
[data-skin="pixel"] .glass::after { display: none; }
[data-skin="pixel"] .panel {
  padding: 39px 24px 24px;
  filter: drop-shadow(0 9px 0 rgb(14 18 38 / .4));
}
[data-skin="pixel"] .panel-bar { padding: 0 0 4px 2px; }
[data-skin="pixel"] .panel-body { padding: 2px 2px 0; }
[data-skin="pixel"] .play { padding: 30px 38px 18px 28px; }
[data-skin="pixel"] .date { padding: 24px 16px 12px; }
/* blockier shapes inside, to match the stepped frame corners */
[data-skin="pixel"] :is(.btn, .switch, .earned, .icon-btn, .answer-input, .tries li, .slot .bar) { border-radius: 6px; }

@media (prefers-reduced-transparency: reduce) {
  .glass {
    background: rgb(var(--glass) / .96) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}
@media (prefers-contrast: more) {
  .glass { --glass-alpha: .9; }
  .glass::before { background: rgb(255 255 255 / .7); }
}

/* ---------------------------------------------------------------- home */
.home {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  padding: 24px 16px;
  text-align: center;
  transition: opacity .3s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
body:is(.open, .reading) .home {
  opacity: 0;
  transform: scale(.97);
  pointer-events: none;
}

.home-top {
  align-self: end;
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

/* pixel-art logo (Peakish/brand/goatle_logo.lua), scaled by whole pixels to stay crisp */
.wordmark { margin: 0; line-height: 0; }
.wordmark img {
  width: calc(81px * 4);
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 18px rgb(16 24 56 / .35));
}
@media (min-width: 1600px) { .wordmark img { width: calc(81px * 5); } }
@media (max-width: 400px) { .wordmark img { width: calc(81px * 3); } }

.date {
  --blur: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text);
}

.play {
  --blur: 16px;
  --glass-alpha: .5;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 38px 16px 28px;
  border: 0;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform .16s cubic-bezier(.2, .8, .2, 1);
}
.play svg { width: 24px; height: 24px; fill: currentColor; }
.play:hover { --glass-alpha: .62; }
.play:active { transform: scale(.95); transition-duration: .08s; }
.play:focus-visible { outline: 3px solid rgb(255 255 255 / .8); outline-offset: 4px; }
.play:disabled { cursor: progress; transform: none; }   /* waiting for today's lists */

/* under Play: the day's number, Privacy and How to play, and the day's scores once done */
.home-foot {
  align-self: start;
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 18px;
}
.home-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
}

/* white with the logo's navy outline and drop, plus a soft glow: readable on bright sky */
.home-sub {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  text-shadow:
    2px 0 var(--outline), -2px 0 var(--outline), 0 2px var(--outline), 0 -2px var(--outline),
    2px 2px var(--outline), -2px -2px var(--outline), 2px -2px var(--outline), -2px 2px var(--outline),
    0 4px 0 var(--outline), 0 0 18px rgb(16 24 60 / .6);
}
.home-link {
  padding: 2px 0;
  border: 0;
  background: none;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  cursor: pointer;
}
.home-link:hover { color: #ffe9a8; }
.home-link:focus-visible { outline: 3px solid rgb(255 255 255 / .8); outline-offset: 4px; border-radius: 4px; }
.home-note { font-size: 14px; }
#playSub { font-variant-numeric: tabular-nums; }

/* top right: Settings (a menu under the gear) and the account */
.corner {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.corner-btn {
  --blur: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 13px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .16s cubic-bezier(.2, .8, .2, 1);
}
.corner-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.corner-btn:hover { --glass-alpha: .66; }
.corner-btn:active { transform: scale(.94); transition-duration: .08s; }
.corner-btn:focus-visible { outline: 3px solid rgb(255 255 255 / .8); outline-offset: 3px; }
#settings { width: 44px; padding: 0; }
[data-skin="pixel"] .corner-btn { height: auto; padding: 24px 15px 12px 13px; }
[data-skin="pixel"] #settings { width: auto; padding: 24px 12px 12px; }

.menu-wrap { position: relative; }
.menu {
  --blur: 18px;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  padding: 8px;
  border-radius: 18px;
  text-align: left;
  transform-origin: 90% 0;
}
[data-skin="pixel"] .menu { padding: 24px 12px 12px; }
.menu-title {
  padding: 4px 10px 6px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.menu-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: none;
  font-size: 15px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.menu-row:hover { background: rgb(255 255 255 / .08); }
.menu-row:focus-visible { outline: 3px solid rgb(255 255 255 / .7); outline-offset: -3px; }
.menu-row svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-label { flex: 1; }
.menu-row[aria-checked="true"] .cross,
.menu-row[aria-checked="false"] .wave { display: none; }
[data-skin="pixel"] .menu-row { border-radius: 6px; }

/* on/off switch */
.toggle {
  position: relative;
  flex: none;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: rgb(255 255 255 / .18);
  transition: background .2s;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / .35);
  transition: transform .28s cubic-bezier(.3, 1.4, .5, 1);
}
[aria-checked="true"] .toggle { background: var(--easy); }
[aria-checked="true"] .toggle::after { transform: translateX(16px); }
[data-skin="pixel"] .toggle,
[data-skin="pixel"] .toggle::after { border-radius: 4px; }

.dev-reset {
  position: fixed;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: rgb(0 0 0 / .28);
  color: rgb(255 255 255 / .75);
  font-size: 12px;
  cursor: pointer;
}

/* dev: switch between the looks to compare them */
.dev-looks {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgb(0 0 0 / .35);
  font-size: 12px;
}
.dev-looks span { align-self: center; padding: 0 6px; color: rgb(255 255 255 / .6); }
.dev-looks button {
  padding: 4px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: rgb(255 255 255 / .8);
  cursor: pointer;
}
.dev-looks button[aria-pressed="true"] { background: rgb(255 255 255 / .9); color: var(--ink); font-weight: 700; }

/* ---------------------------------------------------------------- panel */
.panel {
  --blur: 26px;
  position: fixed;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: flex;
  flex-direction: column;
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  border-radius: 28px;
  overflow: hidden;
  outline: none;
}

.panel-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 4px 22px;
}
.round-info {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.round-label {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .01em;
  color: var(--text-2);
  white-space: nowrap;
}
/* once both games are over: flip between their results */
.switch {
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / .12);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s;
}
.switch:hover { background: rgb(255 255 255 / .2); }
.switch:focus-visible { outline: 3px solid rgb(255 255 255 / .7); outline-offset: 2px; }

.score {
  font-size: 18px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  transform-origin: 80% 50%;   /* bumps in place when points land */
}
.score small { font-size: 13px; font-weight: 600; color: var(--text-2); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / .1);
  cursor: pointer;
  transition: background .15s, transform .12s;
}
.icon-btn:hover { background: rgb(255 255 255 / .18); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.icon-btn[disabled] { visibility: hidden; }

.panel-body {
  min-height: 0;
  overflow-y: auto;
  padding: 4px 22px 22px;
  scrollbar-width: thin;
  scrollbar-color: rgb(255 255 255 / .25) transparent;
}
.panel.resizing .panel-body { overflow-y: hidden; }

/* ---------------------------------------------------------------- controls */
.btn {
  flex: none;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform .12s cubic-bezier(.2, .8, .2, 1), opacity .2s, filter .15s;
}
.btn.primary {
  background: linear-gradient(180deg, #fff, #dfe5f3);
  color: var(--ink);
  box-shadow: inset 0 1px 0 #fff, 0 8px 20px -8px rgb(0 0 0 / .6);
}
.btn:not(.primary) {
  background: rgb(255 255 255 / .12);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16);
}
.btn:hover:not(:disabled) { filter: brightness(1.04); }
.btn:active:not(:disabled) { transform: scale(.95); transition-duration: .06s; }
.btn:disabled { opacity: .32; cursor: default; }
.btn:focus-visible, .icon-btn:focus-visible { outline: 3px solid rgb(255 255 255 / .7); outline-offset: 3px; }

.hint { font-size: 14px; color: var(--text-2); }

/* the hints the dice earn: a bulb and "3 hints", white once the dice settle (and, while
   answering, while there are hints left) */
.earned {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px 0 11px;
  border-radius: 999px;
  background: rgb(255 255 255 / .12);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: background .25s, color .25s;
}
.earned[data-hints], .hints-left:not([data-empty="true"]) { background: rgb(255 255 255 / .92); color: var(--ink); }
.earned svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.hints-left { border: 0; cursor: pointer; touch-action: manipulation; }
.hints-left .hint-count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: 4px;
  background: rgb(0 0 0 / .1);
  font-size: 12px;
}
.hints-left[aria-pressed="true"] {
  background: var(--medium);
  color: var(--ink);
  box-shadow: 0 0 0 2px rgb(242 193 78 / .3), 0 0 20px rgb(242 193 78 / .15);
}
.hints-left:focus-visible { outline: 2px solid var(--medium); outline-offset: 3px; }
.hints-left:disabled { cursor: default; opacity: .55; }

/* ---------------------------------------------------------------- dice */
.board {
  display: block;
  width: 100%;
  height: auto;
  touch-action: manipulation;
}
.dice-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}
.dice-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
}

/* ---------------------------------------------------------------- question */
.q-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 6px;
}
.q-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mini-dice { display: inline-flex; gap: 3px; margin-left: 2px; }
.mini-dice img { width: 21px; height: 24px; }
.round-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.round-timer svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.round-timer[data-urgent="true"] { color: var(--hard); }

/* hints left and Finish, where the clock used to be */
.q-tools { flex: none; display: flex; align-items: center; gap: 8px; }
.btn.finish { padding: 0 16px; height: 36px; font-size: 14px; }
.btn.finish[data-armed="true"] { background: var(--hard); color: #fff; }

.question {
  margin: 14px 0 6px;
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.answer-goal {
  max-width: 60ch;
  font-size: 14px;
  color: var(--text-3);
  text-wrap: pretty;
}

/* the ten ranked slots, in two columns (#1-5, #6-10) so the board stays short above a
   phone keyboard */
.slots {
  display: grid;
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.play-slots { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.play-slots .bar { height: 42px; }
.play-slots .name { font-size: 16px; }
.play-slots .slot { position: relative; }
.play-slots .slot[data-revealing="true"] { z-index: 1; }
.slot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.slot .rank {
  flex: none;
  width: 1.4em;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.slot .bar {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 10px;
  background: rgb(0 0 0 / .22);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08);
}
.slot .name {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.slot[data-state="found"] .rank { color: var(--easy); }
.slot[data-state="found"] .bar {
  background: rgb(95 211 141 / .2);
  box-shadow: inset 0 0 0 1.5px rgb(95 211 141 / .62);
}
.slot[data-state="missed"] .bar { background: rgb(255 255 255 / .05); }
.slot[data-state="missed"] .name { color: var(--text-3); font-weight: 600; }

/* A restrained glint accompanies both a found answer and the final countdown reveal. */
.slot[data-revealing="true"] .bar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 20%, rgb(var(--reveal-tint) / .28) 50%, transparent 80%);
  animation: answer-sheen 460ms ease-out both;
}
@keyframes answer-sheen {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* a hinted answer: its letters so far and an underscore for each one still hidden, "J______",
   wrapping rather than cut off so its length always shows */
.slot[data-state="hint"] .bar {
  height: auto;
  min-height: 32px;
  padding-block: 4px;
  background: rgb(242 193 78 / .12);
  box-shadow: inset 0 0 0 1px rgb(242 193 78 / .45);
}
.slot[data-state="hint"] .name {
  color: var(--medium);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: .14em;
  white-space: normal;
  overflow-wrap: anywhere;
  display: block;
}
/* a slot that can be tapped for a hint: a "?" (or "+" for another letter), and it lights up */
.slot[data-hintable="true"] .bar {
  cursor: pointer;
  background: rgb(242 193 78 / .1);
  box-shadow: inset 0 0 0 1.5px rgb(242 193 78 / .65);
  transition: background .15s, box-shadow .15s;
}
.slot[data-hintable="true"] .bar::after {
  content: "?";
  margin-left: auto;
  padding-left: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--medium);
}
.slot[data-hintable="true"][data-state="hint"] .bar::after { content: "+"; color: var(--medium); }
.slot[data-hintable="true"] .bar:hover { background: rgb(242 193 78 / .22); }
.slot[data-hintable="true"] .bar:focus-visible { outline: 2px solid rgb(255 255 255 / .7); outline-offset: 2px; }
.slot-tip { margin-top: 8px; font-size: 13px; color: var(--text-3); }
.slot-tip:empty { display: none; }
.slots[data-choosing-hint="true"] + .slot-tip { color: var(--medium); }

.answer {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.answer-input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgb(0 0 0 / .3);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14), inset 0 2px 6px rgb(0 0 0 / .25);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  outline: none;
  transition: box-shadow .15s;
}
.answer-input::placeholder { color: var(--text-3); font-weight: 500; }
.answer-input:focus { box-shadow: inset 0 0 0 2px rgb(255 255 255 / .55), inset 0 2px 6px rgb(0 0 0 / .25); }
.answer .btn { height: 50px; }

.suggest {
  min-height: 1.45em;
  margin-top: 10px;
  padding-left: 18px;
  font-size: 14px;
  color: var(--medium);
}
.suggest[data-tone="reject"] { color: var(--hard); font-weight: 600; }
.suggest[data-tone="close"] { color: var(--medium); font-weight: 600; }
.suggest[data-tone="info"] { color: var(--text-2); }

/* answers already tried that aren't on the list */
.tries {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0 0 0 12px;
  list-style: none;
}
.tries:empty { display: none; }
.tries li {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgb(242 118 107 / .14);
  color: rgb(255 200 194 / .85);
  font-size: 13px;
  text-decoration: line-through;
  text-decoration-color: rgb(242 118 107 / .8);
}

/* ---------------------------------------------------------------- score board */
.view-result { display: grid; justify-items: center; text-align: center; padding-top: 4px; }
.result-hero { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 4vw, 28px); }
.golden-goat { margin: 8px 0 0; flex: none; }
.golden-goat canvas {
  display: block;
  width: 112px;
  max-width: 28vw;
  height: auto;
  border: 2px solid var(--medium);
  border-radius: 6px;
  image-rendering: pixelated;
  box-shadow: 0 0 22px rgb(242 193 78 / .2);
}
.golden-goat figcaption { margin-top: 4px; color: var(--medium); font-size: 11px; font-weight: 750; }
.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.result-points {
  margin: 6px 0 10px;
  font-size: 64px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.result-points small { margin-left: 4px; font-size: 22px; font-weight: 650; letter-spacing: 0; color: var(--text-3); }
#pointsNum { display: inline-block; min-width: 1.9ch; text-align: right; }   /* no jump while it rolls up */
.result-points[data-band="high"] { color: var(--easy); }
.result-points[data-band="mid"] { color: var(--medium); }
.result-points[data-band="low"] { color: var(--hard); }
.result-points[data-band="none"] { color: var(--text-3); }

/* Daily score comparison, shown after all three rounds. */
.score-comparison { width: 100%; margin: 18px 0 6px; padding: 14px 12px 12px; border: 1px solid rgb(119 223 240 / .2); border-radius: 10px; background: rgb(16 29 48 / .3); }
.score-comparison figcaption { text-align: left; color: var(--text-2); font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.score-comparison svg { display: block; width: 100%; height: auto; overflow: visible; }
.score-comparison svg[hidden] { display: none; }
.density-axis { stroke: rgb(255 255 255 / .2); }
.density-fill { fill: rgb(95 218 239 / .1); }
.density-curve { fill: none; stroke: #6ee4ee; stroke-width: 2; }
.density-marker { stroke: #fb789f; stroke-width: 2; }
.density-dot { fill: #fb789f; }
.density-you { fill: #ff95b5; font-size: 12px; font-weight: 800; }
.density-ticks { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.comparison-rank { margin: 2px 0 0; color: #6ee4ee; font-size: 13px; font-weight: 750; }
.comparison-note { margin: 5px 0 0; color: var(--text-3); font-size: 11px; }
.comparison-retry { margin-top: 8px; font-size: 12px; }

/* the game's points flying up into the header score */
.fly {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  pointer-events: none;
  text-shadow:
    2px 0 var(--outline), -2px 0 var(--outline), 0 2px var(--outline), 0 -2px var(--outline),
    2px 2px var(--outline), -2px -2px var(--outline), 2px -2px var(--outline), -2px 2px var(--outline);
}
.fly[data-band="high"] { color: var(--easy); }
.fly[data-band="mid"] { color: var(--medium); }
.fly[data-band="low"] { color: var(--hard); }

/* pixel confetti (fx.js) */
.fx {
  position: fixed;
  inset: 0;
  z-index: 55;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.result-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-2);
}
.result-prompt {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}
.view-result .slots { width: 100%; margin-top: 12px; text-align: left; }
.result-foot {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 18px;
}

/* ---------------------------------------------------------------- how to play, privacy */
.sheet { width: min(480px, calc(100vw - 32px)); }
.sheet-title {
  flex: 1;
  margin: 0;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.sheet-body { display: grid; grid-auto-rows: max-content; gap: 12px; color: var(--text-2); font-size: 15px; }
.sheet-body b { color: var(--text); }
.steps { display: grid; gap: 10px; margin: 4px 0 0; padding-left: 22px; }
.steps li::marker { color: var(--text); font-weight: 750; }
.hands {
  display: grid;
  gap: 1px;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}
[data-skin="pixel"] .hands { border-radius: 6px; }
.hands div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  background: rgb(255 255 255 / .07);
}
.hands dd { margin: 0; color: var(--text); font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet-note { font-size: 13px; color: var(--text-3); }

/* account: Google sign-in */
.auth { display: grid; gap: 10px; margin-top: 2px; }
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  padding: 0 18px;
}
.auth-btn svg { flex: none; width: 20px; height: 20px; }
.btn.auth-google {
  background: #fff;
  color: #1f1f1f;
  box-shadow: 0 8px 20px -8px rgb(0 0 0 / .6);
}
.auth[hidden], .account-profile[hidden] { display: none; }
.account-profile { display: grid; gap: 16px; }
#accountEmail { overflow-wrap: anywhere; }
.account-delete { padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.account-delete .text-btn { margin: 12px 16px 0 0; }
.auth-note { min-height: 1.45em; font-size: 14px; color: var(--medium); }
.text-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-btn:focus-visible { outline: 3px solid rgb(255 255 255 / .7); outline-offset: 2px; border-radius: 3px; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 560px) {
  .density-you { font-size: 18px; }
  .density-ticks { font-size: 17px; }
  /* near the top, so the list and the input stay above the on-screen keyboard */
  .panel {
    top: max(12px, env(safe-area-inset-top));
    translate: -50% 0;
    max-height: calc(100dvh - 24px);
    border-radius: 26px;
  }
  .panel-bar { padding: 12px 12px 4px 18px; }
  .panel-body { padding: 4px 16px 18px; }
  .dice-foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .dice-state { justify-content: center; }
  .dice-foot .hint { display: none; }
  .question { margin-top: 8px; font-size: 19px; }
  .q-head { gap: 8px; }
  .q-tools { margin-left: auto; }
  .hints-left, .btn.finish { height: 40px; }
  .slots { gap: 5px 8px; margin-top: 10px; }
  .slot { gap: 5px; }
  .slot .bar { height: 30px; padding: 0 8px; }
  .play-slots .bar { height: 40px; padding: 0 12px; }
  /* long names wrap onto a second line rather than being cut off */
  .slot .name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
    line-height: 1.1;
    white-space: normal;
  }
  .play-slots .name { font-size: 15px; }
  .answer { margin-top: 12px; }
  .answer .btn { padding: 0 18px; }
  .result-points { font-size: 56px; }
  .result-foot .btn { flex: 1; padding: 14px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .home, .scrim, .play, .btn { transition: none; }
  .slot[data-revealing="true"] .bar::before { animation: none; }
}
