:root {
  color-scheme: light;
  --paper: #f8f5ee;
  --ink: #22231f;
  --muted: #777970;
  --line: #e4e0d6;
  --card: #fffefa;
  --blue: #3858d6;
  --blue-dark: #2846bd;
  --blue-pale: #e9edff;
  --orange: #fa7954;
  --orange-pale: #fff0e9;
  --lime: #ddff6f;
  --shadow: 0 16px 42px rgb(52 49 37 / 7%);
  font-family: "DM Sans", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(ellipse at 93% 10%, rgb(250 121 84 / 7%), transparent 24rem),
    radial-gradient(ellipse at 1% 43%, rgb(56 88 214 / 5%), transparent 28rem),
    var(--paper);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #89a0ff;
  outline-offset: 3px;
}

.site-shell {
  width: min(1120px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .07em;
  text-decoration: none;
}

.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--lime);
  font-size: 19px;
  line-height: 1;
}

.topbar-note {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #79ae4b;
  box-shadow: 0 0 0 3px rgb(121 174 75 / 13%);
}

#app {
  flex: 1;
  padding: 48px 0 64px;
}

.site-footer {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  color: #92928a;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: .1em;
}

.hero {
  position: relative;
  max-width: 850px;
  margin: 0 auto 48px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--blue);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
  width: 15px;
  height: 1px;
  content: "";
  background: currentColor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  max-width: 810px;
  margin: 0 auto 15px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(46px, 7.2vw, 79px);
  font-weight: 700;
  letter-spacing: -.075em;
  line-height: .99;
}

.hero h1 em {
  color: var(--blue);
  font-style: normal;
}

.hero-copy {
  max-width: 500px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.hero-sticker {
  position: absolute;
  top: 8px;
  right: -4px;
  width: 75px;
  height: 75px;
  display: grid;
  place-items: center;
  border: 1px solid #efc8ba;
  border-radius: 50%;
  background: var(--orange-pale);
  color: #c85c3e;
  font-size: 31px;
  transform: rotate(12deg);
}

.setup-grid {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mode-card {
  position: relative;
  min-height: 244px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 6px 18px rgb(52 49 37 / 3%);
}

.mode-card.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.mode-card h2 {
  max-width: 230px;
  margin: 18px 0 9px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 23px;
  letter-spacing: -.04em;
}

.mode-card p {
  max-width: 260px;
  margin-bottom: 19px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.mode-card.primary p {
  color: rgb(255 255 255 / 76%);
}

.mode-icon {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-pale);
  color: var(--blue);
  font-size: 21px;
}

.primary .mode-icon {
  background: var(--lime);
  color: var(--ink);
}

.mode-card .button {
  position: absolute;
  bottom: 23px;
  left: 26px;
  min-width: 150px;
}

.join-panel {
  width: min(760px, 100%);
  margin: 14px auto 0;
  padding: 17px 20px;
  display: grid;
  grid-template-columns: 1fr 140px 130px auto;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgb(255 254 250 / 80%);
}

.join-copy strong,
.join-copy span {
  display: block;
}

.join-copy strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.join-copy span {
  color: var(--muted);
  font-size: 11px;
}

.field,
.text-input {
  width: 100%;
}

.text-input {
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  color: var(--ink);
  font-size: 14px;
}

.text-input::placeholder {
  color: #a09f97;
}

.button {
  min-height: 45px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgb(32 34 30 / 13%);
}

.button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.button-blue {
  background: var(--blue);
}

.button-blue:hover:not(:disabled) {
  background: var(--blue-dark);
}

.button-white {
  background: white;
  color: var(--blue);
}

.button-outline {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.button-quiet {
  min-height: 38px;
  padding: 0 11px;
  border-color: var(--line);
  background: white;
  color: var(--ink);
  font-size: 11px;
}

.button-small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 11px;
}

.setup-notes {
  width: min(760px, 100%);
  margin: 20px auto 0;
  display: flex;
  justify-content: center;
  gap: 25px;
  color: var(--muted);
  font-size: 11px;
}

.setup-notes span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.form-card {
  width: min(500px, 100%);
  margin: 20px auto;
  padding: 31px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.form-card h1 {
  margin-bottom: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 31px;
  letter-spacing: -.05em;
}

.form-card > p {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.field-label {
  display: block;
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 700;
}

.form-row {
  margin-bottom: 17px;
}

.form-actions {
  margin-top: 22px;
  display: flex;
  gap: 9px;
}

.form-actions .button:first-child {
  flex: 1;
}

.error-message {
  margin: 13px 0 0;
  color: #b34431;
  font-size: 12px;
  line-height: 1.45;
}

.screen-heading {
  width: min(850px, 100%);
  margin: 0 auto 27px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
}

.screen-heading h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -.065em;
  line-height: 1.05;
}

.screen-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.room-code {
  padding: 11px 14px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 1px dashed #bfc7f5;
  border-radius: 12px;
  background: var(--blue-pale);
}

.room-code strong {
  color: var(--blue);
  font-family: "DM Mono", monospace;
  font-size: 19px;
  letter-spacing: .12em;
}

.lobby-layout {
  width: min(850px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 16px;
}

.panel {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--card);
}

.panel-heading {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

.count-badge {
  min-width: 27px;
  min-height: 25px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 20px;
  background: #f0eee7;
  color: #66675e;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.player-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.player-row {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid #f0eee7;
}

.player-row:last-child {
  border-bottom: 0;
}

.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff0e9;
  font-size: 18px;
}

.avatar.blue { background: #e9edff; }
.avatar.lime { background: #f0f9d8; }
.avatar.lavender { background: #f2eaff; }
.avatar.mint { background: #e1f6eb; }

.player-name {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.you-tag {
  margin-left: 4px;
  color: var(--blue);
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.player-presence {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.player-presence::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: #8ab36a;
}

.player-presence.offline::before {
  background: #ce7865;
}

.room-howto {
  margin: 0 0 17px;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.room-howto li {
  position: relative;
  min-height: 38px;
  padding: 3px 0 9px 29px;
  color: #62645d;
  font-size: 11px;
  line-height: 1.45;
  counter-increment: steps;
}

.room-howto li::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--blue-pale);
  color: var(--blue);
  content: counter(steps);
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.lobby-action {
  width: 100%;
  margin-top: 12px;
}

.link-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.alert {
  width: min(850px, 100%);
  margin: 0 auto 17px;
  padding: 12px 15px;
  border: 1px solid #f0c8bd;
  border-radius: 12px;
  background: var(--orange-pale);
  color: #9b442f;
  font-size: 12px;
  line-height: 1.45;
}

.alert.info {
  border-color: #cfd5fb;
  background: var(--blue-pale);
  color: #364caa;
}

.progress-track {
  width: min(850px, 100%);
  height: 5px;
  margin: 0 auto 23px;
  overflow: hidden;
  border-radius: 9px;
  background: #e9e6de;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width .35s ease;
}

.question-layout {
  width: min(850px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 16px;
}

.question-card {
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.question-card h2 {
  max-width: 520px;
  margin: 0 0 22px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(23px, 4vw, 32px);
  letter-spacing: -.055em;
  line-height: 1.15;
}

.target-header {
  margin: 0 0 22px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 12px;
  background: #f4f2ec;
}

.target-header .avatar {
  width: 41px;
  height: 41px;
  flex-basis: 41px;
}

.target-caption {
  color: var(--muted);
  font-size: 10px;
}

.target-caption strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 14px;
}

.range-block {
  margin-bottom: 25px;
}

.range-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.range-title {
  margin-bottom: 13px;
  color: #55574f;
  font-size: 11px;
  font-weight: 700;
}

.range-value {
  min-width: 31px;
  color: var(--blue);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  text-align: right;
}

.range-ends {
  margin-top: 3px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.range-ends span:last-child {
  text-align: right;
}

input[type="range"] {
  width: 100%;
  height: 28px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, #cbd3ff, var(--blue));
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, #cbd3ff, var(--blue));
}

input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -7px;
  appearance: none;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 1px 5px rgb(20 30 80 / 24%);
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 1px 5px rgb(20 30 80 / 24%);
}

.target-navigation {
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #eeeae1;
}

.target-count {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.side-stack {
  display: grid;
  gap: 14px;
}

.side-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.side-card.lime {
  border-color: #cfeba0;
  background: #f2fadf;
}

.side-card h3 {
  margin: 0 0 9px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  letter-spacing: -.03em;
}

.side-card p {
  margin: 0;
  color: #73746d;
  font-size: 11px;
  line-height: 1.55;
}

.privacy-icon {
  margin-bottom: 10px;
  font-size: 23px;
}

.waiting-card {
  width: min(600px, 100%);
  margin: 45px auto;
  padding: 42px 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  text-align: center;
  box-shadow: var(--shadow);
}

.waiting-emoji {
  width: 75px;
  height: 75px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: var(--lime);
  font-size: 36px;
  transform: rotate(-5deg);
}

.waiting-card h1 {
  margin-bottom: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 35px;
  letter-spacing: -.06em;
}

.waiting-card p {
  margin: 0 auto 23px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.waiting-progress {
  width: min(320px, 100%);
  margin: 0 auto;
  color: var(--blue);
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.reveal-hero {
  width: min(850px, 100%);
  margin: 0 auto 24px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #cdd4ff;
  border-radius: 18px;
  background: linear-gradient(112deg, #edf0ff, #f8f6ff);
}

.reveal-hero h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  letter-spacing: -.05em;
}

.reveal-hero p {
  margin: 6px 0 0;
  color: #696d84;
  font-size: 11px;
  line-height: 1.5;
}

.reveal-spark {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--lime);
  font-size: 25px;
  transform: rotate(8deg);
}

.results-grid {
  width: min(850px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.result-card {
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.result-card-header {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-card-header .avatar {
  width: 39px;
  height: 39px;
  flex-basis: 39px;
}

.result-person {
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
}

.result-person small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.gap-pill {
  margin-left: auto;
  padding: 5px 8px;
  border-radius: 20px;
  background: #f4f2ec;
  color: #77786e;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  white-space: nowrap;
}

.gap-pill.big {
  background: #fff0e9;
  color: #c35d3e;
}

.plot {
  position: relative;
  width: 100%;
  aspect-ratio: 1.5 / 1;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #e6e4dd;
  border-radius: 10px;
  background:
    linear-gradient(to right, transparent calc(50% - .5px), #dcdbd4 50%, transparent calc(50% + .5px)),
    linear-gradient(to bottom, transparent calc(50% - .5px), #dcdbd4 50%, transparent calc(50% + .5px)),
    #fbfaf6;
}

.plot::before,
.plot::after {
  display: none;
}

.plot-label {
  margin: 0 0 7px;
  color: #aaa99f;
  font-size: 8px;
  line-height: 1.3;
  text-align: center;
}

.plot-label span {
  color: var(--blue);
  font-weight: 700;
}

.plot-x-labels {
  margin: -6px 1px 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #aaa99f;
  font-size: 8px;
  line-height: 1.3;
}

.plot-x-labels span:last-child {
  text-align: right;
}

.plot-dot {
  position: absolute;
  z-index: 2;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 1px 5px rgb(33 36 45 / 22%);
  font-size: 12px;
  transform: translate(-50%, -50%);
}

.plot-dot.self {
  background: var(--orange);
}

.plot-dot.others {
  background: var(--blue);
}

.plot-legend {
  margin-bottom: 15px;
  display: flex;
  gap: 13px;
  color: #67685f;
  font-size: 9px;
}

.plot-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-size: 9px;
}

.legend-dot.others {
  background: var(--blue);
}

.axis-summary {
  padding: 11px 12px;
  border-radius: 10px;
  background: #f6f4ef;
  color: #686960;
  font-size: 10px;
  line-height: 1.5;
}

.axis-summary strong {
  color: var(--ink);
}

.axis-values {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.axis-value {
  padding: 8px;
  border-radius: 8px;
  background: white;
  color: #6d6f68;
  font-size: 9px;
  line-height: 1.35;
}

.axis-value strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.results-actions {
  width: min(850px, 100%);
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.results-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.final-hero {
  position: relative;
  width: min(850px, 100%);
  margin: 0 auto 20px;
  padding: 31px;
  overflow: hidden;
  border-radius: 21px;
  background: var(--blue);
  color: white;
}

.final-hero::after {
  position: absolute;
  top: -54px;
  right: 38px;
  width: 175px;
  height: 175px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
  box-shadow: 0 0 0 20px rgb(255 255 255 / 5%), 0 0 0 40px rgb(255 255 255 / 4%);
  content: "";
}

.final-hero .kicker {
  color: var(--lime);
}

.final-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin: 0 0 9px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(33px, 5vw, 50px);
  letter-spacing: -.065em;
}

.final-hero p {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 0;
  color: rgb(255 255 255 / 76%);
  font-size: 12px;
  line-height: 1.55;
}

.final-callout {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin-top: 19px;
  padding: 10px 13px;
  border-radius: 11px;
  background: var(--lime);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.final-list {
  width: min(850px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 11px;
}

.final-player {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(130px, .8fr) 1.8fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.final-player.featured {
  border-color: #f0c8bd;
  background: #fffaf7;
}

.final-player-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

.final-player-name .avatar {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.final-insight {
  color: #6a6c64;
  font-size: 10px;
  line-height: 1.5;
}

.final-insight strong {
  color: var(--ink);
}

.final-gap {
  min-width: 78px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f3f1e9;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-align: center;
}

.final-gap strong {
  display: block;
  margin-bottom: 2px;
  color: var(--blue);
  font-size: 17px;
}

.connection-bar {
  width: min(850px, 100%);
  margin: 0 auto 16px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #f0c8bd;
  border-radius: 10px;
  background: var(--orange-pale);
  color: #9b442f;
  font-size: 11px;
}

.connection-bar button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-decoration: underline;
  white-space: nowrap;
}

.local-player-entry {
  display: flex;
  align-items: center;
  gap: 9px;
}

.local-player-entry .text-input {
  flex: 1;
}

.local-players {
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.local-player-entry .remove-player {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: #f5eee8;
  color: #9a6252;
  cursor: pointer;
}

@media (max-width: 740px) {
  #app {
    padding-top: 35px;
  }

  .hero-sticker {
    top: -16px;
    right: 2px;
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .hero {
    margin-bottom: 34px;
    padding: 0 7px;
  }

  .hero h1 {
    max-width: 600px;
    padding: 0 24px;
    font-size: clamp(43px, 11vw, 65px);
  }

  .hero-copy {
    max-width: 430px;
    font-size: 14px;
  }

  .mode-card {
    min-height: 225px;
    padding: 19px;
  }

  .mode-card .button {
    left: 19px;
    bottom: 18px;
  }

  .join-panel {
    grid-template-columns: 1fr 1fr;
  }

  .join-copy {
    grid-column: 1 / -1;
  }

  .join-panel .text-input {
    min-width: 0;
  }

  .join-panel .button {
    grid-column: 1 / -1;
  }

  .setup-notes {
    flex-wrap: wrap;
    gap: 9px 16px;
  }

  .lobby-layout {
    grid-template-columns: 1fr;
  }

  .question-layout {
    grid-template-columns: 1fr;
  }

  .side-stack {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .site-shell {
    width: calc(100% - 30px);
  }

  .topbar {
    height: 65px;
  }

  .topbar-note {
    max-width: 150px;
    font-size: 9px;
    line-height: 1.3;
  }

  .topbar-note .status-dot {
    flex: 0 0 7px;
  }

  .site-footer {
    min-height: 53px;
    font-size: 7px;
    letter-spacing: .06em;
  }

  .site-footer span:last-child {
    text-align: right;
  }

  #app {
    padding: 31px 0 45px;
  }

  .hero-sticker {
    top: -22px;
    right: -1px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .hero h1 {
    padding: 0 16px;
    font-size: clamp(43px, 13vw, 58px);
  }

  .hero-copy {
    max-width: 330px;
    font-size: 13px;
  }

  .setup-grid {
    gap: 10px;
  }

  .mode-card {
    min-height: 227px;
    padding: 15px 13px;
    border-radius: 16px;
  }

  .mode-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .mode-card h2 {
    margin: 14px 0 7px;
    font-size: 19px;
  }

  .mode-card p {
    font-size: 11px;
    line-height: 1.45;
  }

  .mode-card .button {
    right: 12px;
    bottom: 13px;
    left: 12px;
    min-width: 0;
    padding: 0 8px;
    font-size: 11px;
  }

  .join-panel {
    padding: 14px;
    gap: 9px;
  }

  .join-panel .button {
    padding: 0 12px;
  }

  .setup-notes {
    justify-content: center;
    font-size: 9px;
  }

  .form-card {
    padding: 23px;
  }

  .screen-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .room-code {
    align-self: stretch;
    justify-content: space-between;
  }

  .panel {
    padding: 18px;
  }

  .question-card {
    padding: 19px 16px;
  }

  .question-card h2 {
    font-size: 25px;
  }

  .side-stack {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .side-card {
    padding: 15px;
  }

  .side-card h3 {
    font-size: 13px;
  }

  .side-card p {
    font-size: 10px;
  }

  .waiting-card {
    margin: 18px auto;
    padding: 32px 21px;
  }

  .waiting-card h1 {
    font-size: 29px;
  }

  .reveal-hero {
    padding: 17px;
  }

  .reveal-hero h2 {
    font-size: 18px;
  }

  .reveal-spark {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
    font-size: 20px;
  }

  .results-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .result-card {
    padding: 16px;
  }

  .plot {
    aspect-ratio: 1.7 / 1;
  }

  .results-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .final-hero {
    padding: 24px 20px;
  }

  .final-player {
    grid-template-columns: 1fr auto;
    gap: 9px;
    padding: 14px;
  }

  .final-player-name {
    grid-column: 1 / -1;
  }

  .final-insight {
    max-width: 210px;
  }

  .final-gap {
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

.final-chart-section {
  width: min(1000px, 100%);
  margin: 24px auto;
}

.final-chart-section h2 {
  margin-bottom: 0;
  font-size: 32px;
}

.final-chart-section > p {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
}

.group-chart {
  width: 100%;
  padding: 19px;
  border: 3px solid var(--ink);
  border-radius: 22px 17px 24px 18px;
  background: #fffdf4;
  box-shadow: 6px 6px 0 var(--ink);
}

.chart-point-key {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 17px;
  font-weight: 900;
}

.chart-point-key > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.key-self,
.key-friends {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: #ff9b77;
  font-size: 12px;
  font-style: normal;
  line-height: 1;
}

.key-self {
  border-radius: 50%;
}

.key-friends {
  border-radius: 6px;
  background: #a9b0ff;
}

.shared-plot {
  position: relative;
  width: 100%;
  aspect-ratio: 1.5 / 1;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 17px 13px 16px 14px;
  background:
    linear-gradient(to right, transparent calc(50% - 1px), #8d897e 50%, transparent calc(50% + 1px)),
    linear-gradient(to bottom, transparent calc(50% - 1px), #8d897e 50%, transparent calc(50% + 1px)),
    radial-gradient(#ddd6bb 1px, transparent 1.2px),
    #fff8d9;
  background-size: auto, auto, 16px 16px, auto;
}

.shared-plot.one-dimensional {
  aspect-ratio: 2.4 / 1;
  background:
    linear-gradient(to bottom, transparent calc(50% - 1px), #8d897e 50%, transparent calc(50% + 1px)),
    radial-gradient(#ddd6bb 1px, transparent 1.2px),
    #fff8d9;
  background-size: auto, 16px 16px, auto;
}

.plot-axis-y,
.plot-axis-x {
  position: absolute;
  z-index: 4;
  left: 8px;
  right: 8px;
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
}

.plot-axis-y {
  top: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plot-axis-x {
  bottom: 6px;
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}

.plot-axis-y span,
.plot-axis-x span,
.plot-axis-x b {
  min-width: 0;
  padding: 6px 8px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: #fffdf4;
  overflow-wrap: anywhere;
}

.plot-axis-y span:first-child {
  background: #dfe4ff;
}

.plot-axis-y span:last-child {
  background: #ffdae4;
  text-align: right;
}

.plot-axis-y b {
  margin-right: 3px;
  white-space: nowrap;
}

.plot-axis-x span:last-child {
  background: #dff5cb;
  text-align: right;
}

.plot-axis-x b {
  background: #ffda65;
  white-space: nowrap;
}

.chart-plane {
  position: absolute;
  inset: 65px 23px 63px;
}

.one-dimensional .chart-plane {
  inset: 20px 23px 63px;
}

.chart-lines {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.combined-point {
  position: absolute;
  z-index: 2;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  background: var(--player-color);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 24px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.point-kind {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #ffda65;
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.self-point {
  border-radius: 50%;
  font-size: 17px;
}

.friends-point {
  border-radius: 13px 9px 13px 9px;
}

.friends-point .point-kind {
  background: #a9b0ff;
}

.chart-player-key {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.chart-player-key > .chart-player-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 900;
}

.chart-player-item i {
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 11px 8px 12px 8px;
  background: var(--player-color);
  font-size: 19px;
  font-style: normal;
}

.range-slider-wrap {
  position: relative;
  height: 38px;
}

.range-slider-wrap input[type="range"] {
  position: relative;
  z-index: 2;
  display: block;
}

.range-slider-wrap input[type="range"]::-webkit-slider-thumb {
  width: 37px;
  height: 37px;
  margin-top: -14px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.range-slider-wrap input[type="range"]::-moz-range-thumb {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.range-thumb-emoji {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #ffcf5c;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 22px;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left .06s linear;
}

@media (max-width: 760px) {
  .group-chart {
    padding: 13px;
  }

  .chart-point-key {
    gap: 10px 14px;
    font-size: 15px;
  }

  .shared-plot {
    aspect-ratio: 1.1 / 1;
  }

  .shared-plot.one-dimensional {
    aspect-ratio: 1.8 / 1;
  }

  .plot-axis-y,
  .plot-axis-x {
    left: 6px;
    right: 6px;
    gap: 5px;
    font-size: 13px;
  }

  .chart-plane {
    inset: 74px 19px;
  }

  .one-dimensional .chart-plane {
    inset: 18px 19px 60px;
  }

  .combined-point {
    width: 36px;
    height: 36px;
    border-width: 2px;
    font-size: 20px;
  }

  .self-point {
    font-size: 14px;
  }

  .chart-player-key {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .chart-player-key > .chart-player-item {
    font-size: 14px;
  }

  .chart-player-item i {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 17px;
  }

  .range-thumb-emoji {
    width: 36px;
    height: 36px;
    font-size: 21px;
  }

  .final-chart-section h2 {
    font-size: 27px;
  }
}

@media (max-width: 400px) {
  .plot-axis-y,
  .plot-axis-x {
    font-size: 12px;
  }

  .plot-axis-y span,
  .plot-axis-x span,
  .plot-axis-x b {
    padding: 5px;
  }

  .chart-player-key {
    gap: 7px;
  }
}

@media (min-width: 900px) {
  .group-chart {
    width: min(840px, 100%);
    margin-right: auto;
    margin-left: auto;
    padding: 14px;
  }

  .shared-plot {
    aspect-ratio: 1.65 / 1;
  }
}

.results-actions.round-actions {
  justify-content: center;
}

@media (max-width: 760px) {
  .results-actions.round-actions {
    align-items: center;
  }

  .results-actions.round-actions > .button {
    min-width: min(260px, 100%);
  }
}

:root {
  --paper: #fff4bd;
  --ink: #24221f;
  --muted: #49463f;
  --line: #24221f;
  --card: #fffdf4;
  --blue: #5662ed;
  --blue-dark: #3f49ca;
  --blue-pale: #dfe4ff;
  --orange: #ff7656;
  --orange-pale: #ffe0d4;
  --lime: #ddff6f;
  --shadow: 6px 6px 0 var(--ink);
  font-family: "Nunito", "Arial Rounded MT Bold", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

body {
  background-color: var(--paper);
  background-image: radial-gradient(#e9cf70 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  font-size: 19px;
}

.site-shell {
  width: min(1200px, calc(100% - 40px));
}

.topbar {
  height: 82px;
  border-bottom: 0;
}

.topbar-note,
.site-footer {
  display: none;
}

.brand {
  gap: 12px;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 25px;
  letter-spacing: .015em;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border: 3px solid var(--ink);
  border-radius: 16px 12px 17px 13px;
  background: var(--lime);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 29px;
}

#app {
  padding: 27px 0 50px;
}

h1,
h2,
h3,
.button,
.kicker,
.eyebrow,
.brand {
  font-family: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
}

.hero {
  max-width: 950px;
  margin-bottom: 27px;
  padding: 10px 60px 0;
}

.hero .eyebrow,
.eyebrow::before,
.eyebrow::after {
  display: none;
}

.hero h1 {
  margin-bottom: 4px;
  font-size: clamp(58px, 9vw, 104px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .98;
  text-shadow: 3px 3px 0 white;
}

.hero h1 em {
  color: var(--blue);
  -webkit-text-stroke: 1px var(--ink);
}

.hero-copy {
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 800;
}

.hero-sticker {
  top: 3px;
  right: 5px;
  width: 80px;
  height: 80px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #ffcf5c;
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 40px;
  transform: rotate(11deg);
}

.setup-grid {
  width: min(880px, 100%);
  gap: 20px;
}

.mode-card {
  min-height: 270px;
  padding: 25px 27px;
  border: 3px solid var(--ink);
  border-radius: 25px 19px 24px 18px;
  background: #fffdf4;
  box-shadow: 7px 7px 0 var(--ink);
}

.mode-card:nth-child(2) {
  background: #d8f5d4;
  transform: rotate(.7deg);
}

.mode-card.primary {
  border-color: var(--ink);
  background: #ffb9ce;
  color: var(--ink);
  transform: rotate(-.7deg);
}

.mode-icon {
  width: 58px;
  height: 58px;
  border: 2px solid var(--ink);
  border-radius: 19px 14px 18px 14px;
  background: #ffda65;
  color: var(--ink);
  font-size: 31px;
}

.primary .mode-icon {
  background: #fffdf4;
  color: var(--ink);
}

.mode-card h2 {
  margin: 13px 0 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.04;
}

.mode-card p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.mode-card .button {
  bottom: 20px;
  left: 27px;
}

.join-panel {
  width: min(880px, 100%);
  min-height: 85px;
  margin-top: 23px;
  padding: 15px 18px;
  grid-template-columns: 1fr 180px 175px auto;
  gap: 12px;
  border: 3px solid var(--ink);
  border-radius: 19px 15px 22px 16px;
  background: #fffdf4;
  box-shadow: 5px 5px 0 var(--ink);
}

.join-copy strong {
  font-size: 22px;
}

.text-input {
  min-height: 56px;
  padding: 0 15px;
  border: 3px solid var(--ink);
  border-radius: 13px;
  background: white;
  font-size: 18px;
  font-weight: 800;
}

.text-input::placeholder {
  color: #69645b;
  opacity: .78;
}

.button {
  min-height: 58px;
  padding: 0 22px;
  border: 3px solid var(--ink);
  border-radius: 16px 13px 17px 14px;
  background: #ffcf5c;
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .015em;
}

.button:hover:not(:disabled) {
  transform: translate(2px, 2px) rotate(-.5deg);
  box-shadow: 2px 2px 0 var(--ink);
}

.button:active:not(:disabled) {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.button:disabled {
  opacity: .48;
  box-shadow: 2px 2px 0 var(--ink);
}

.button-blue {
  background: #a9b0ff;
  color: var(--ink);
}

.button-blue:hover:not(:disabled) {
  background: #8994ff;
}

.button-white {
  background: #fffdf4;
  color: var(--ink);
}

.button-outline,
.button-quiet {
  border-color: var(--ink);
  background: white;
  color: var(--ink);
}

.button-small {
  min-height: 48px;
  padding: 0 16px;
  font-size: 16px;
}

.error-message,
.alert {
  width: min(880px, 100%);
  padding: 14px 17px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #ffb9ce;
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.alert.info {
  background: var(--lime);
  color: var(--ink);
}

.form-card,
.panel,
.question-card,
.side-card,
.waiting-card,
.result-card,
.final-player {
  border: 3px solid var(--ink);
  border-radius: 22px 17px 24px 18px;
  background: #fffdf4;
  box-shadow: 6px 6px 0 var(--ink);
}

.form-card {
  width: min(600px, 100%);
  padding: 31px;
}

.form-card h1 {
  margin-bottom: 5px;
  font-size: 48px;
}

.form-card > p {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
}

.field-label {
  margin-bottom: 7px;
  font-size: 17px;
  font-weight: 900;
}

.screen-heading {
  width: min(1000px, 100%);
  margin-bottom: 22px;
  align-items: center;
}

.screen-heading h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.02;
}

.screen-heading p {
  display: none;
}

.kicker {
  margin-bottom: 3px;
  color: #4048bd;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .06em;
}

.room-code {
  padding: 9px 15px;
  border: 3px dashed var(--ink);
  border-radius: 16px;
  background: #ffda65;
}

.room-code .kicker {
  display: none;
}

.room-code strong {
  color: var(--ink);
  font-family: "Baloo 2", sans-serif;
  font-size: 27px;
  letter-spacing: .08em;
}

.lobby-layout {
  width: min(1000px, 100%);
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
}

.panel {
  padding: 24px;
}

.panel-heading {
  margin-bottom: 12px;
  font-size: 25px;
}

.count-badge {
  min-width: 38px;
  min-height: 35px;
  border: 2px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  font-size: 17px;
}

.player-row {
  min-height: 66px;
  gap: 13px;
  border-bottom: 2px dashed #d5cba8;
}

.avatar {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border: 2px solid var(--ink);
  border-radius: 17px 12px 16px 13px;
  background: #ffb9ce;
  font-size: 26px;
}

.avatar.blue { background: #b9c2ff; }
.avatar.lime { background: #ddff6f; }
.avatar.lavender { background: #d9c5ff; }
.avatar.mint { background: #b8edcf; }

.player-name {
  font-size: 19px;
  font-weight: 900;
}

.you-tag {
  padding: 2px 8px;
  border: 2px solid currentColor;
  border-radius: 10px;
  font-size: 12px;
}

.player-presence {
  font-size: 15px;
  font-weight: 800;
}

.player-presence::before {
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink);
}

.room-instruction,
.link-note {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.lobby-action {
  margin-top: 13px;
}

.progress-track {
  width: min(1000px, 100%);
  height: 11px;
  margin-bottom: 19px;
  border: 2px solid var(--ink);
  background: white;
}

.progress-fill {
  background: var(--orange);
}

.rating-grid {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.rate-player-card {
  min-width: 0;
  padding: 17px;
  border: 3px solid var(--ink);
  border-radius: 23px 16px 21px 17px;
  background: #fffdf4;
  box-shadow: 5px 5px 0 var(--ink);
}

.rate-card-1 { background: #ffd5e0; }
.rate-card-2 { background: #d9edff; }
.rate-card-3 { background: #dff5cb; }

.rate-player-heading {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rate-player-heading .avatar {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
  font-size: 30px;
}

.rate-player-heading h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.rate-player-heading .you-tag {
  margin-left: auto;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: #ffda65;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.player-ratings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.player-ratings.single-rating {
  grid-template-columns: 1fr;
}

.range-block {
  min-width: 0;
  margin: 0;
  padding: 10px 11px;
  border: 2px dashed var(--ink);
  border-radius: 14px 11px 14px 10px;
  background: rgb(255 255 255 / 78%);
}

.range-topline {
  margin-bottom: 3px;
}

.range-title {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.range-value {
  min-width: 37px;
  color: var(--blue-dark);
  font-family: "Baloo 2", sans-serif;
  font-size: 20px;
  font-weight: 900;
}

input[type="range"] {
  height: 38px;
  touch-action: pan-y;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 9px;
  border: 1px solid var(--ink);
  background: linear-gradient(90deg, #dce2ff, #7583ff);
}

input[type="range"]::-moz-range-track {
  height: 9px;
  border: 1px solid var(--ink);
  background: linear-gradient(90deg, #dce2ff, #7583ff);
}

input[type="range"]::-webkit-slider-thumb {
  width: 27px;
  height: 27px;
  margin-top: -10px;
  border: 3px solid var(--ink);
  background: #ff7656;
  box-shadow: 2px 2px 0 var(--ink);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid var(--ink);
  background: #ff7656;
  box-shadow: 2px 2px 0 var(--ink);
}

.range-ends {
  min-height: 40px;
  margin-top: 1px;
  align-items: flex-start;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.12;
}

.range-ends span {
  max-width: 49%;
  overflow-wrap: anywhere;
}

.submit-bar {
  position: sticky;
  z-index: 5;
  bottom: 12px;
  width: min(1100px, 100%);
  margin: 20px auto 0;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #fff4bd;
  box-shadow: 5px 5px 0 var(--ink);
}

.submit-bar > span {
  font-size: 17px;
  font-weight: 900;
}

.waiting-card {
  width: min(650px, 100%);
  margin: 20px auto;
  padding: 35px;
}

.waiting-emoji {
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.waiting-card h1 {
  margin-bottom: 17px;
  font-size: 44px;
}

.waiting-progress {
  margin: 16px auto 5px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
}

.reveal-hero,
.final-hero {
  width: min(1000px, 100%);
  border: 3px solid var(--ink);
  border-radius: 24px 17px 23px 18px;
  box-shadow: 6px 6px 0 var(--ink);
}

.reveal-hero {
  background: #dfe4ff;
}

.reveal-hero h2 {
  font-size: 30px;
}

.reveal-hero p {
  color: var(--ink);
  font-size: 17px;
}

.reveal-spark {
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.results-grid {
  width: min(1000px, 100%);
  gap: 17px;
}

.result-card {
  padding: 19px;
}

.result-card-header .avatar {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

.result-person {
  font-size: 20px;
  font-weight: 900;
}

.result-person small {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.gap-pill {
  border: 2px solid var(--ink);
  background: #ffda65;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.gap-pill.big {
  background: #ffb9ce;
  color: var(--ink);
}

.plot {
  border: 2px solid var(--ink);
  background:
    linear-gradient(to right, transparent calc(50% - 1px), #b8b5aa 50%, transparent calc(50% + 1px)),
    linear-gradient(to bottom, transparent calc(50% - 1px), #b8b5aa 50%, transparent calc(50% + 1px)),
    #fff9df;
}

.plot-label,
.plot-x-labels {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.plot-dot {
  width: 36px;
  height: 36px;
  border: 3px solid var(--ink);
  font-size: 17px;
  box-shadow: 2px 2px 0 var(--ink);
}

.plot-dot.self {
  background: #ff9b77;
}

.plot-dot.others {
  background: #a9b0ff;
}

.plot-legend {
  gap: 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.legend-dot {
  width: 23px;
  height: 23px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 13px;
}

.axis-values {
  gap: 9px;
}

.axis-value {
  border: 2px solid var(--ink);
  border-radius: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.axis-value strong {
  font-size: 15px;
}

.results-actions {
  width: min(1000px, 100%);
}

.results-actions p {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.final-hero {
  background: #5662ed;
  color: white;
}

.final-hero::after {
  border-color: rgb(255 255 255 / 40%);
}

.final-hero .kicker {
  color: var(--lime);
}

.final-hero h1 {
  font-size: clamp(40px, 6vw, 65px);
}

.final-hero p {
  color: white;
  font-size: 19px;
}

.final-callout {
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 17px;
}

.final-list {
  width: min(1000px, 100%);
}

.final-player {
  grid-template-columns: minmax(150px, .8fr) 1.8fr auto;
  background: #fffdf4;
}

.final-player.featured {
  background: #ffcfdb;
}

.final-player-name {
  font-size: 20px;
}

.final-insight {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.final-gap {
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #dfe4ff;
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.final-gap strong {
  color: var(--ink);
  font-size: 25px;
}

.connection-bar {
  border: 3px solid var(--ink);
  border-radius: 13px;
  background: #ffb9ce;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.connection-bar button {
  font-size: 15px;
  font-weight: 900;
}

.room-exit {
  width: min(1000px, 100%);
  margin: -8px auto 10px;
  display: flex;
  justify-content: flex-end;
}

.room-exit .button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

@media (max-width: 760px) {
  body {
    font-size: 18px;
  }

  .site-shell {
    width: calc(100% - 28px);
  }

  #app {
    padding-top: 15px;
  }

  .topbar {
    height: 69px;
  }

  .hero {
    margin-bottom: 22px;
    padding: 14px 22px 0;
  }

  .hero h1 {
    padding: 0 8px;
    font-size: clamp(51px, 13vw, 78px);
  }

  .hero-copy {
    font-size: 19px;
  }

  .hero-sticker {
    top: -2px;
    right: 0;
    width: 53px;
    height: 53px;
    font-size: 28px;
  }

  .setup-grid {
    gap: 13px;
  }

  .mode-card {
    min-height: 247px;
    padding: 17px;
  }

  .mode-card h2 {
    font-size: 28px;
  }

  .mode-card p {
    font-size: 16px;
  }

  .mode-card .button {
    right: 13px;
    bottom: 15px;
    left: 13px;
    padding: 0 8px;
    font-size: 16px;
  }

  .join-panel {
    grid-template-columns: 1fr 1fr;
    padding: 14px;
  }

  .join-copy,
  .join-panel .button {
    grid-column: 1 / -1;
  }

  .join-copy strong {
    font-size: 20px;
  }

  .text-input {
    min-width: 0;
    font-size: 16px;
  }

  .form-card {
    padding: 25px 19px;
  }

  .screen-heading {
    align-items: flex-start;
    flex-direction: row;
    gap: 10px;
  }

  .screen-heading h1 {
    font-size: clamp(34px, 8vw, 46px);
  }

  .room-code {
    padding: 6px 10px;
  }

  .room-code strong {
    font-size: 21px;
  }

  .lobby-layout {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .panel {
    padding: 18px;
  }

  .rating-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .rate-player-card {
    padding: 15px;
  }

  .rate-player-heading h2 {
    font-size: 26px;
  }

  .player-ratings {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .range-block {
    padding: 9px;
  }

  .range-title {
    font-size: 14px;
  }

  .range-ends {
    min-height: 42px;
    font-size: 12px;
  }

  .submit-bar {
    bottom: 7px;
    padding: 9px;
    flex-direction: column;
    gap: 6px;
  }

  .submit-bar > span {
    font-size: 14px;
    text-align: center;
  }

  .submit-bar .button {
    width: 100%;
    min-height: 55px;
  }

  .reveal-hero {
    padding: 16px;
  }

  .reveal-hero h2 {
    font-size: 23px;
  }

  .reveal-hero p {
    font-size: 15px;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .result-card {
    padding: 16px;
  }

  .final-hero {
    padding: 25px 18px;
  }

  .final-player {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .final-player-name {
    grid-column: 1 / -1;
  }

  .final-insight {
    font-size: 14px;
  }

  .waiting-card {
    padding: 29px 20px;
  }

  .waiting-card h1 {
    font-size: 35px;
  }
}

@media (max-width: 400px) {
  .site-shell {
    width: calc(100% - 22px);
  }

  .setup-grid {
    grid-template-columns: 1fr;
  }

  .mode-card {
    min-height: 225px;
  }

  .player-ratings {
    grid-template-columns: 1fr;
  }

  .range-ends {
    min-height: 0;
  }

  .range-ends span {
    max-width: 47%;
  }

  .screen-heading {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .setup-grid {
    grid-template-columns: 1fr;
  }

  .mode-card {
    min-height: 225px;
  }

  .mode-card h2 {
    font-size: 32px;
  }

  .mode-card p {
    max-width: none;
    font-size: 18px;
  }

  .mode-card .button {
    right: 15px;
    bottom: 14px;
    left: 15px;
    width: calc(100% - 30px);
  }

  .hero {
    padding-right: 8px;
    padding-left: 8px;
  }

  .hero-sticker {
    top: -5px;
    right: 0;
    width: 47px;
    height: 47px;
    font-size: 24px;
  }

  .screen-heading {
    flex-direction: column;
  }

  .player-ratings {
    grid-template-columns: 1fr;
  }

  .range-ends {
    min-height: 0;
    font-size: 15px;
  }

  .rate-player-heading h2 {
    font-size: 30px;
  }

  .plot-label,
  .plot-x-labels {
    font-size: 14px;
  }

  .axis-values {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
