:root {
  color-scheme: dark;
  --ink: #f4f4ef;
  --paper: #0c0c0c;
  --surface: #181818;
  --muted: #9a9a94;
  --faint: #363636;
  --line: #363636;
  --orange: #ff7064;
  --green: #6ee787;
  --focus: #6ee787;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 12% -10%, rgba(110, 231, 135, .08), transparent 30rem),
    var(--paper);
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent); outline-offset: 3px; }

.shell {
  width: min(100% - 32px, 720px);
  min-height: calc(100vh - 70px);
  margin: 0 auto;
}

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 25px 0 17px;
  border-bottom: 1px solid var(--line, #363636);
}

.wordmark {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.055em;
  text-decoration: none;
  text-transform: uppercase;
}

.edition-label, .eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.screen { padding: 56px 0 72px; }
.loading-screen { min-height: 55vh; }

h1, h2, p { margin-top: 0; }
h1, .share-card h2, .reveal-section h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.045em;
}

h1 {
  max-width: 660px;
  margin: 10px 0 15px;
  font-size: clamp(42px, 10vw, 72px);
  line-height: .99;
}

.lede {
  max-width: 580px;
  margin-bottom: 29px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.opening-line {
  display: block;
  margin: 0 0 21px;
}

.opening-premise {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 5vw, 31px);
  font-weight: 400;
  letter-spacing: -.025em;
}

.today-content {
  margin: 0 0 30px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(23px, 4.7vw, 29px);
  line-height: 1.3;
  letter-spacing: -.025em;
}

.today-content strong {
  display: inline;
  margin: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  letter-spacing: inherit;
}

#introScreen h1 {
  max-width: 680px;
  margin: 0 0 21px;
  font-size: clamp(29px, 6vw, 37px);
  line-height: 1.16;
}

#introScreen .run-button {
  min-width: 148px;
  color: #07110a;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 2px 2px 0 #2a713a;
}

.run-button span {
  display: inline-block;
  margin-left: 11px;
  font-size: 20px;
  line-height: 0;
  transition: transform .15s ease;
}

.run-button:hover span { transform: translateX(4px); }

.waiting-panel {
  max-width: 570px;
  margin: 30px 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid #686868;
  border-radius: 18px;
}

.waiting-panel > div { display: flex; align-items: center; gap: 10px; }
.waiting-panel p { margin: 10px 0 0 21px; color: var(--muted); line-height: 1.55; }
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--orange); }

.primary-button, .secondary-button {
  min-height: 50px;
  padding: 13px 21px;
  border-radius: 999px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}

.primary-button { color: #07110a; background: var(--green); border: 1px solid var(--green); box-shadow: 2px 2px 0 #2a713a; }
.secondary-button { color: var(--ink); background: #101010; border: 1px solid #686868; }
.primary-button:hover:not(:disabled), .secondary-button:hover:not(:disabled) { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .4; }

.rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 660px;
  margin-bottom: 30px;
}

.rules > div {
  min-height: 135px;
  padding: 17px;
  background: var(--surface);
  border: 1px solid #686868;
  border-radius: 16px;
}

.rules span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #686868; border-radius: 50%; font-size: 12px; font-weight: 800; }
.rules p { margin: 25px 0 0; line-height: 1.4; }

.seen-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  max-width: 660px;
  margin: 0 0 30px;
  padding: 17px 0 0;
  border: 0;
  border-top: 1px solid var(--faint);
}

.seen-fieldset legend { float: left; width: 100%; margin-bottom: 13px; padding: 0; font-weight: 750; }
.seen-fieldset label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); cursor: pointer; }
.seen-fieldset input { accent-color: var(--ink); }

.game-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.game-heading h1 { font-size: clamp(38px, 8vw, 58px); }
.rank-count { padding-top: 4px; color: var(--muted); font-size: 17px; }
.rank-count strong { color: var(--ink); font-size: 31px; }

.confidence-axis {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  margin-top: 22px;
  padding-bottom: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.confidence-axis::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--orange), #555 50%, var(--green));
  opacity: .7;
}
.confidence-axis span:nth-child(2) { align-self: end; color: #85857f; text-align: center; }
.confidence-axis span:last-child { text-align: right; }
.confidence-axis strong { color: var(--ink); font-size: 12px; }
.confidence-axis span:first-child strong { color: var(--orange); }
.confidence-axis span:last-child strong { color: var(--green); }

.ranking-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  margin-top: 14px;
}

.rank-half { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.rank-divider { position: relative; }
.rank-divider::after { content: ""; position: absolute; inset: -2px auto -2px 50%; width: 2px; border-radius: 2px; background: #686868; transform: translateX(-50%); }
.rank-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 1.18 / 1;
  min-width: 0;
  padding: 0;
  background: #151515;
  border: 1px dashed #555;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  touch-action: pan-y;
  user-select: none;
}
.rank-slot.filled { background: #242424; border-color: #e8e8e2; border-style: solid; color: var(--ink); }
.rank-slot.filled { cursor: grab; }
.rank-slot.filled.dragging { cursor: grabbing; color: #07110a; background: var(--green); transform: scale(1.06); }
.ranking-help { margin: 11px 0 25px; color: var(--muted); font-size: 13px; }

.quote-list { display: grid; gap: 10px; }
.quote-button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 38px;
  gap: 12px;
  width: 100%;
  padding: 17px 18px;
  text-align: left;
  background: var(--surface);
  border: 1px solid #686868;
  border-radius: 15px;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
  transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease;
}
.quote-button:hover { border-color: #e8e8e2; }
.quote-button.selected { opacity: 1; border-color: color-mix(in srgb, var(--green) 55%, transparent); }
.quote-button.dragging { opacity: .9; transform: scale(1.015); box-shadow: 0 12px 28px rgba(0, 0, 0, .5); z-index: 2; }
.quote-rank { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #686868; border-radius: 50%; color: var(--muted); font-size: 12px; font-weight: 800; }
.quote-button.selected .quote-rank { color: #07110a; background: var(--green); border-color: var(--green); }
.quote-text { align-self: center; font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.35; }
.quote-drag-handle {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-width: 38px;
  min-height: 44px;
  margin: -8px -9px -8px 0;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 19px;
  letter-spacing: -3px;
  cursor: grab;
  touch-action: none;
}
.quote-button.dragging .quote-drag-handle { color: var(--green); cursor: grabbing; }

.game-actions, .share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.share-card {
  width: min(100%, 410px);
  margin: 34px auto 0;
  padding: 28px 28px 24px;
  background: #151515;
  border: 2px solid #e9e9e3;
  border-radius: 18px;
  box-shadow: 5px 5px 0 #303030;
}
.share-masthead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.share-brand { font-size: 19px; font-weight: 800; line-height: 1; letter-spacing: -.045em; text-transform: uppercase; }
.share-edition { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.share-card h2 { margin: 20px 0 4px; font-size: 30px; line-height: 1.05; }
.share-result { color: var(--muted); font-size: 11px; font-weight: 750; line-height: 1.4; letter-spacing: .065em; text-transform: uppercase; }
.share-ranking { margin-top: 26px; }
.share-group-labels, .share-block-row { display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); }
.share-group-labels { align-items: end; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.share-group-labels span:last-child { text-align: right; }
.share-half { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.share-divider { position: relative; }
.share-divider::after { content: ""; position: absolute; inset: -2px auto -2px 50%; width: 2px; border-radius: 2px; background: #686868; transform: translateX(-50%); }
.share-block { aspect-ratio: 1; min-width: 0; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07); }
.share-block.lie { background: var(--orange); }
.share-block.truth { background: var(--green); }
.share-legend { display: flex; justify-content: center; gap: 20px; margin-top: 18px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.share-legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; }
.lie-swatch { background: var(--orange); }
.truth-swatch { background: var(--green); }
.share-brag { margin: 22px 0 0; padding-top: 17px; border-top: 1px solid var(--line); text-align: center; font-family: Georgia, "Times New Roman", serif; font-size: 16px; }
.share-url { margin-top: 7px; color: var(--muted); text-align: center; font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.share-actions { justify-content: center; }
.action-status { min-height: 20px; margin-top: 10px; color: var(--muted); text-align: center; font-size: 13px; }

.reveal-section { margin-top: 60px; padding-top: 34px; border-top: 1px solid var(--line); }
.reveal-section h2 { margin: 7px 0 23px; font-size: 36px; }
.reveal-list { display: grid; gap: 11px; }
.reveal-card { padding: 19px; background: var(--surface); border: 1px solid #686868; border-radius: 16px; }
.reveal-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reveal-kind { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.reveal-kind::before { content: ""; width: 11px; height: 11px; border-radius: 3px; }
.reveal-kind.lie::before { background: var(--orange); }
.reveal-kind.truth::before { background: var(--green); }
.reveal-rate { color: var(--muted); font-size: 12px; }
.reveal-quote { margin: 14px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.35; }
.reveal-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.footer { display: flex; justify-content: space-between; gap: 16px; width: min(100% - 32px, 720px); margin: 0 auto; padding: 19px 0 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }

[hidden] { display: none !important; }

@media (max-width: 620px) {
  .screen { padding-top: 42px; }
  .masthead { padding-top: 19px; padding-bottom: 14px; }
  #gameScreen { padding-top: 24px; }
  .game-heading .eyebrow { font-size: 13px; letter-spacing: .11em; }
  .confidence-axis { margin-top: 16px; }
  .ranking-strip { margin-top: 10px; }
  .ranking-help { margin-bottom: 18px; }
  .quote-list { position: relative; gap: 8px; }
  .quote-list::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: -8px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--orange), #555 50%, var(--green));
    opacity: .8;
    pointer-events: none;
  }
  .quote-button { gap: 10px; padding: 14px; }
  .rules { grid-template-columns: 1fr; }
  .rules > div { display: grid; grid-template-columns: 32px 1fr; align-items: center; min-height: auto; }
  .rules p { margin: 0 0 0 10px; }
  .quote-text { font-size: 16px; }
}

@media (max-width: 390px) {
  .shell, .footer { width: min(100% - 24px, 720px); }
  .share-card { padding-inline: 21px; }
  .rank-half, .share-half { gap: 5px; }
  .share-legend { gap: 13px; }
  .footer { flex-direction: column; }
}

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