:root {
  color-scheme: dark;
  --page: #111a1e;
  --surface: #18262c;
  --strong: #21343b;
  --line: #39515a;
  --ink: #f7f5ec;
  --muted: #9eafb4;
  --mint: #64d5c4;
  --gold: #f3c969;
  --coral: #f47c68;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
}
button,
input {
  font: inherit;
  letter-spacing: 0;
}
.shell {
  min-height: 100svh;
}
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  padding: 8px clamp(12px, 3vw, 34px);
  background: #152126;
}
.back-link,
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 850;
}
.back-link {
  color: var(--muted);
  text-decoration: none;
}
.brand {
  justify-self: center;
}
.brand-mark {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: #122126;
  font-weight: 950;
}
.language-button {
  justify-self: end;
  width: 42px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--strong);
  color: var(--gold);
  font-size: 11px;
  font-weight: 950;
}
.setup-screen,
.final-screen {
  width: min(920px, calc(100% - 36px));
  margin: auto;
  padding: clamp(42px, 7vw, 76px) 0;
}
.screen-heading {
  margin-bottom: 30px;
}
.screen-heading p,
.question-band p,
.guess-stage > p,
.reveal-stage header p {
  margin: 0;
  color: var(--mint);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.screen-heading h1 {
  margin: 5px 0 8px;
  font-size: clamp(39px, 6vw, 64px);
  line-height: 1;
}
.screen-heading > span {
  color: var(--muted);
}
.setup-tool {
  border-top: 1px solid var(--line);
}
.add-form {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.add-form label,
.setting > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.add-form > div {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
}
.add-form input {
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 13px;
  background: var(--surface);
  color: var(--ink);
}
.add-button {
  border: 0;
  border-radius: 6px;
  background: var(--mint);
  color: #10201d;
  font-size: 24px;
  font-weight: 900;
}
.roster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  min-height: 85px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.roster-item {
  display: grid;
  grid-template-columns: 40px 1fr 32px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px;
  background: var(--surface);
}
.avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: #132025;
  font-weight: 950;
}
.roster-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
}
.remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 19px;
}
.settings-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
}
.setting {
  display: grid;
  gap: 8px;
}
.segments {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.segments button {
  min-width: 58px;
  height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
}
.segments button:last-child {
  border: 0;
}
.segments button.is-active {
  background: var(--mint);
  color: #10201d;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 17px;
  font-size: 13px;
  font-weight: 900;
}
.primary {
  background: var(--gold);
  color: #211c10;
}
.secondary {
  border-color: var(--line);
  background: var(--strong);
  color: var(--ink);
}
.button:disabled {
  opacity: 0.4;
}
.round-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  padding: 8px clamp(14px, 4vw, 48px);
  background: var(--surface);
}
.round-bar > div {
  display: flex;
  flex-direction: column;
}
.round-bar span {
  color: var(--mint);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.round-bar strong {
  color: var(--muted);
  font-size: 12px;
}
.question-band {
  display: grid;
  grid-template-columns: auto minmax(0, 800px);
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 190px;
  border-bottom: 1px solid var(--line);
  padding: 28px;
}
.category-icon {
  font-size: 68px;
}
.question-band h1 {
  margin: 5px 0 9px;
  font-size: clamp(27px, 4vw, 43px);
  line-height: 1.05;
}
.question-band div > span {
  color: var(--muted);
  font-size: 11px;
}
.guess-stage {
  display: grid;
  width: min(680px, calc(100% - 30px));
  margin: clamp(32px, 6vh, 65px) auto;
  justify-items: center;
}
.guess-stage h2 {
  margin: 4px 0 25px;
  font-size: clamp(31px, 5vw, 48px);
}
.guess-control {
  display: grid;
  grid-template-columns: 82px minmax(150px, 230px) 82px;
  align-items: center;
  gap: 16px;
}
.step-button {
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--strong);
  color: var(--ink);
  font-size: 23px;
  font-weight: 950;
}
.step-button:hover,
.step-button:focus-visible {
  border-color: var(--mint);
  background: #29434a;
}
.guess-control output {
  font-size: clamp(72px, 11vw, 112px);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.guess-control output span {
  color: var(--mint);
  font-size: 0.45em;
}
#guess-range {
  width: 100%;
  height: 46px;
  margin-top: 20px;
  accent-color: var(--mint);
  cursor: pointer;
}
.range-labels {
  display: flex;
  width: 100%;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.submit-button {
  width: min(330px, 100%);
  margin-top: 22px;
}
.privacy-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.reveal-stage {
  width: min(950px, calc(100% - 30px));
  margin: 32px auto 60px;
}
.reveal-stage header {
  text-align: center;
}
.reveal-stage header > div {
  margin: 3px 0;
  color: var(--gold);
  font-size: clamp(75px, 12vw, 125px);
  font-weight: 950;
  line-height: 1;
}
.reveal-stage header > div span {
  font-size: 0.45em;
}
.reveal-stage header > strong {
  color: var(--muted);
}
.scale {
  margin: 42px 30px 52px;
}
.scale-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--mint), var(--gold), var(--coral));
}
.tick {
  position: absolute;
  top: 17px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}
.tick-0 {
  left: 0;
}
.tick-50 {
  left: 50%;
  transform: translateX(-50%);
}
.tick-100 {
  right: 0;
}
.answer-marker {
  position: absolute;
  bottom: -10px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  transform: translateX(-50%);
  border: 3px solid var(--page);
  border-radius: 50%;
  background: var(--gold);
  color: #211c10;
  font-size: 11px;
  font-weight: 950;
  z-index: 2;
}
.guess-marker {
  position: absolute;
  top: -35px;
  display: grid;
  width: 38px;
  height: 28px;
  place-items: center;
  transform: translateX(-50%);
  border-radius: 4px;
  background: var(--strong);
  color: var(--ink);
  font-size: 10px;
  font-weight: 950;
}
.guess-marker:after {
  position: absolute;
  top: 100%;
  border: 5px solid transparent;
  border-top-color: var(--strong);
  content: "";
}
.round-results {
  display: grid;
  gap: 7px;
}
.result-row {
  display: grid;
  grid-template-columns: 42px 1fr auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 9px;
}
.result-row strong {
  font-size: 14px;
}
.result-row span {
  color: var(--muted);
  font-size: 12px;
}
.result-row b {
  min-width: 52px;
  color: var(--gold);
  text-align: right;
}
.result-row em {
  min-width: 52px;
  color: var(--mint);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}
.next-button {
  display: flex;
  width: min(330px, 100%);
  margin: 24px auto 0;
}
.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 8px;
  margin: 35px 0;
}
.podium-item {
  display: grid;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 7px 7px 0 0;
  padding: 16px 10px;
  background: var(--surface);
  text-align: center;
}
.podium-item:first-child {
  min-height: 190px;
  border-color: var(--gold);
  order: 2;
}
.podium-item:nth-child(2) {
  min-height: 155px;
  order: 1;
}
.podium-item:nth-child(3) {
  min-height: 125px;
  order: 3;
}
.podium-item > span:first-child {
  font-size: 34px;
}
.podium-item .avatar {
  margin: 8px;
}
.podium-item b {
  color: var(--gold);
}
.final-results {
  display: grid;
  gap: 7px;
}
.final-row {
  display: grid;
  grid-template-columns: 34px 42px 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 9px;
}
.final-row > span:first-child {
  color: var(--muted);
  font-weight: 950;
}
.final-row b {
  color: var(--gold);
}
.final-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}
@media (max-width: 620px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }
  .brand {
    font-size: 10px;
  }
  .setup-screen,
  .final-screen {
    width: calc(100% - 28px);
  }
  .add-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .roster {
    grid-template-columns: 1fr;
  }
  .settings-row {
    align-items: stretch;
    flex-direction: column;
  }
  .settings-row .button {
    width: 100%;
  }
  .question-band {
    grid-template-columns: 1fr;
    gap: 5px;
    min-height: 210px;
    padding: 20px 15px;
    text-align: center;
  }
  .category-icon {
    font-size: 47px;
  }
  .question-band h1 {
    font-size: 27px;
  }
  .guess-stage {
    margin-block: 28px;
  }
  .guess-control {
    grid-template-columns: 62px 1fr 62px;
    width: 100%;
    gap: 7px;
  }
  .step-button {
    height: 61px;
  }
  .guess-control output {
    font-size: 72px;
  }
  .scale {
    margin-inline: 17px;
  }
  .result-row {
    grid-template-columns: 38px 1fr auto;
  }
  .result-row em {
    grid-column: 2;
  }
  .podium {
    gap: 4px;
  }
  .podium-item {
    padding-inline: 4px;
  }
  .podium-item strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .final-actions {
    flex-direction: column-reverse;
  }
  .round-bar .secondary {
    width: 44px;
    padding: 0;
  }
  .round-bar .secondary span:last-child {
    display: none;
  }
}
