:root {
  color-scheme: dark;
  --bg: #0d0f12;
  --panel: #171b1f;
  --panel-2: #20262b;
  --line: #353d43;
  --text: #f0f4f1;
  --muted: #9da9a5;
  --blue: #54b6df;
  --cyan: #6fe2d3;
  --green: #79d66f;
  --amber: #e0b34a;
  --magenta: #d27df0;
  --bad: #4f575a;
  --red: #ee6d66;
  --rail: #101417;
  --grid: rgba(255, 255, 255, 0.04);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.2, 0.9, 0.2, 1.16);
  --motion-fast: 160ms;
  --motion-medium: 260ms;
}

body.light-theme {
  color-scheme: light;
  --bg: #f3f6fa;
  --panel: #ffffff;
  --panel-2: #e8eef5;
  --line: #cbd6e2;
  --text: #162231;
  --muted: #596878;
  --blue: #1769aa;
  --cyan: #087f97;
  --green: #167849;
  --amber: #946713;
  --magenta: #8d47aa;
  --bad: #d7dee8;
  --red: #b83b37;
  --rail: #e5ebef;
  --grid: rgba(22, 34, 49, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(111, 226, 211, 0.08), transparent 32%),
    linear-gradient(135deg, #0b0d10 0%, #111614 42%, #15110f 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.22));
  background-size:
    44px 44px,
    44px 44px,
    auto;
  mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
}

body.light-theme {
  background:
    linear-gradient(90deg, rgba(8, 127, 151, 0.12), transparent 34%),
    linear-gradient(135deg, #f8fbfd 0%, #edf3f8 48%, #f7f4ee 100%);
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes item-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes soft-pop {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.topbar-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.brand-lockup {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: clamp(52px, 7vw, 82px);
  flex: 0 0 auto;
  filter:
    drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35))
    drop-shadow(0 0 18px rgba(111, 226, 211, 0.12));
  transform: translateY(-2px);
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.92;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 44px rgba(0, 0, 0, 0.42);
}

h2 {
  margin-bottom: 8px;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.streak-panel,
.menu-panel,
.game-panel,
.answer-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 120px),
    rgba(23, 27, 31, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.streak-panel {
  display: flex;
  gap: 16px;
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  white-space: nowrap;
  box-shadow:
    inset 0 -2px 0 rgba(111, 226, 211, 0.12),
    0 18px 42px rgba(0, 0, 0, 0.22);
}

.streak-panel strong {
  color: var(--text);
}

.settings-menu {
  position: relative;
  z-index: 20;
}

.settings-menu summary {
  width: 52px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.settings-menu summary [data-icon] svg {
  width: 24px;
  height: 24px;
}

.settings-menu summary::-webkit-details-marker {
  display: none;
}

.settings-menu[open] summary,
.settings-menu summary:hover,
.settings-menu summary:focus-visible {
  border-color: rgba(102, 192, 244, 0.72);
  color: var(--cyan);
  outline: none;
}

.settings-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(390px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 96px));
  display: grid;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  padding: 12px;
  scrollbar-color: var(--line) transparent;
}

.settings-popover::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.toggle-row,
.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.toggle-row strong,
.toggle-row small,
.option-row strong,
.option-row small {
  display: block;
}

.toggle-row small,
.option-row small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.option-segment {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
  padding: 4px;
  flex: 0 0 auto;
}

.option-segment button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.option-segment button:hover,
.option-segment button:focus-visible {
  color: var(--text);
  outline: none;
}

.option-segment button.active {
  border-color: rgba(111, 226, 211, 0.46);
  background:
    linear-gradient(180deg, rgba(111, 226, 211, 0.16), rgba(102, 192, 244, 0.06)),
    rgba(255, 255, 255, 0.04);
  color: var(--cyan);
}

.toggle-row input {
  width: 46px;
  height: 26px;
  min-height: 26px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bad);
  padding: 0;
  flex: 0 0 auto;
  cursor: pointer;
  position: relative;
  transition:
    background var(--motion-fast) ease,
    border-color var(--motion-fast) ease;
}

.toggle-row input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  transition: transform var(--motion-medium) var(--ease-spring);
}

.toggle-row input:checked {
  border-color: var(--blue);
  background: var(--blue);
}

.toggle-row input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 192, 244, 0.18);
}

.toggle-row input:checked::before {
  transform: translateX(20px);
}

.mature-toggle {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin-top: 4px;
  border-color: rgba(238, 109, 102, 0.34);
  background:
    linear-gradient(180deg, rgba(238, 109, 102, 0.12), rgba(238, 109, 102, 0.04)),
    var(--panel);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.2);
}

.cache-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(111, 226, 211, 0.08), transparent),
    rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.cache-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.cache-panel-header [data-icon] svg {
  width: 18px;
  height: 18px;
  color: var(--cyan);
}

.cache-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.cache-stats div {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
  padding: 9px;
}

.cache-stats dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cache-stats dd {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-panel {
  background:
    linear-gradient(180deg, rgba(224, 179, 74, 0.08), transparent),
    rgba(255, 255, 255, 0.035);
}

.global-stats-panel {
  background:
    linear-gradient(180deg, rgba(81, 208, 232, 0.08), transparent),
    rgba(255, 255, 255, 0.035);
}

.mode-stat-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.mode-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
  padding: 8px 9px;
}

.mode-stat-row span,
.mode-stat-row strong,
.mode-stat-row small {
  min-width: 0;
}

.mode-stat-row span {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 850;
}

.mode-stat-row strong {
  color: var(--cyan);
  font-size: 0.84rem;
}

.mode-stat-row small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-stat-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.menu-panel,
.game-panel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: 24px;
  animation: page-enter var(--motion-medium) var(--ease-out) both;
}

.menu-panel {
  display: grid;
  gap: 20px;
}

.menu-panel::before,
.game-panel::before,
.answer-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--amber), var(--red));
  opacity: 0.72;
  pointer-events: none;
}

.menu-panel[hidden],
.game-panel[hidden] {
  display: none;
}

.menu-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.menu-copy p {
  max-width: 720px;
  margin-bottom: 0;
}

.menu-copy h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1;
}

.menu-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(108px, 1fr));
  gap: 8px;
  min-width: min(270px, 100%);
}

.menu-summary span {
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  padding: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.menu-summary strong {
  color: var(--text);
  font-size: 1.25rem;
  text-transform: none;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(168px, auto);
  gap: 14px;
  margin-top: 2px;
}

.run-type-switch {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--panel-2);
  padding: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.menu-difficulty-note {
  max-width: 780px;
  margin: -6px 0 -2px;
  border-left: 3px solid rgba(224, 179, 74, 0.58);
  border-radius: 0 8px 8px 0;
  background: rgba(224, 179, 74, 0.055);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.run-type-switch button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  font-weight: 900;
  transition:
    background var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    color var(--motion-fast) ease,
    transform var(--motion-medium) var(--ease-spring);
}

.run-type-switch button:hover,
.run-type-switch button:focus-visible {
  color: var(--text);
  outline: none;
}

.run-type-switch button.active {
  border-color: rgba(111, 226, 211, 0.46);
  background:
    linear-gradient(180deg, rgba(111, 226, 211, 0.16), rgba(102, 192, 244, 0.06)),
    rgba(255, 255, 255, 0.04);
  color: var(--cyan);
  box-shadow: 0 8px 22px rgba(84, 182, 223, 0.1);
}

.run-type-switch button:active {
  transform: translateY(1px);
}

.mode-card {
  --mode-accent: var(--cyan);
  position: relative;
  overflow: hidden;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--mode-accent) 10%, transparent), transparent 70%),
    var(--panel-2);
  color: var(--text);
  padding: 16px;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 4px 0 0 color-mix(in srgb, var(--mode-accent) 48%, transparent);
  transition:
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    transform var(--motion-medium) var(--ease-spring);
  animation: item-enter 360ms var(--ease-out) both;
}

.mode-card:nth-child(2) {
  animation-delay: 35ms;
}

.mode-card:nth-child(3) {
  animation-delay: 70ms;
}

.mode-card:nth-child(4) {
  animation-delay: 105ms;
}

.mode-card:nth-child(5) {
  animation-delay: 140ms;
}

.mode-card:nth-child(6) {
  animation-delay: 175ms;
}

.mode-card::after {
  content: "";
  position: absolute;
  inset: auto 14px 14px 14px;
  height: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mode-accent) 62%, transparent);
  opacity: 0;
  transition: opacity 160ms ease;
}

.mode-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 42%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--mode-accent) 14%, transparent);
  color: var(--mode-accent);
  margin-bottom: 14px;
}

.mode-card-featured .mode-icon {
  width: 52px;
  height: 52px;
}

.mode-icon svg {
  width: 22px;
  height: 22px;
}

.mode-card-featured .mode-icon svg {
  width: 28px;
  height: 28px;
}

.mode-card .mode-kicker,
.mode-card small {
  display: block;
}

.mode-card .mode-kicker {
  margin-bottom: 12px;
  color: var(--mode-accent);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mode-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.15;
}

.mode-card small {
  color: var(--muted);
  line-height: 1.45;
}

.mode-card small:last-child {
  margin-top: auto;
}

.mode-card-featured {
  grid-column: span 2;
  min-height: 198px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--mode-accent) 18%, transparent), rgba(87, 214, 141, 0.08)),
    var(--panel-2);
  padding: 20px;
}

.mode-screenshot {
  grid-column: span 2;
}

.mode-card-featured .mode-kicker {
  color: var(--cyan);
}

.mode-card-featured strong {
  max-width: 540px;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
}

.mode-card-featured small {
  max-width: 560px;
  font-size: 0.98rem;
}

.mode-card:disabled {
  opacity: 0.55;
}

.mode-card:not(:disabled):hover,
.mode-card:not(:disabled):focus-visible {
  border-color: color-mix(in srgb, var(--mode-accent) 72%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--mode-accent) 16%, transparent), transparent 74%),
    #252b2d;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 4px 0 0 color-mix(in srgb, var(--mode-accent) 58%, transparent),
    0 18px 38px color-mix(in srgb, var(--mode-accent) 16%, transparent);
  transform: translateY(-4px);
}

.mode-card:not(:disabled):hover .mode-kicker,
.mode-card:not(:disabled):focus-visible .mode-kicker {
  color: var(--mode-accent);
}

.mode-card:not(:disabled):hover::after,
.mode-card:not(:disabled):focus-visible::after,
.mode-card-featured::after {
  opacity: 1;
}

.active-mode {
  border-color: color-mix(in srgb, var(--mode-accent) 72%, var(--line));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--mode-accent) 24%, transparent),
    inset 4px 0 0 color-mix(in srgb, var(--mode-accent) 62%, transparent);
}

.mode-classic {
  --mode-accent: var(--cyan);
}

.mode-screenshot {
  --mode-accent: var(--green);
}

.mode-timeline {
  --mode-accent: var(--amber);
}

.mode-tags {
  --mode-accent: var(--magenta);
}

.mode-blurb {
  --mode-accent: #ff8a5b;
}

.mode-duel {
  --mode-accent: var(--red);
}

.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
}

.stats-dashboard .cache-panel {
  animation: item-enter var(--motion-medium) var(--ease-out) both;
}

.stats-dashboard .global-stats-panel {
  animation-delay: 70ms;
}

.intro-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 22px;
}

.intro-row p {
  max-width: 760px;
  margin-bottom: 0;
}

.icon-button {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--cyan);
  font-weight: 900;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: color-mix(in srgb, var(--cyan) 14%, var(--panel-2));
  outline: none;
  transform: translateY(-1px);
}

.text-button {
  min-height: 40px;
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(102, 192, 244, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(102, 192, 244, 0.12), rgba(102, 192, 244, 0.04)),
    rgba(255, 255, 255, 0.035);
  color: var(--cyan);
  font-weight: 900;
  padding: 0 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    color var(--motion-fast) ease,
    transform var(--motion-medium) var(--ease-spring);
}

.text-button:hover,
.text-button:focus-visible {
  border-color: rgba(111, 226, 211, 0.74);
  background:
    linear-gradient(180deg, rgba(111, 226, 211, 0.16), rgba(102, 192, 244, 0.06)),
    rgba(255, 255, 255, 0.052);
  color: var(--text);
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 26px rgba(84, 182, 223, 0.12);
  transform: translateY(-2px);
}

.text-button:active {
  transform: translateY(0);
}

.text-button [data-icon] svg {
  width: 18px;
  height: 18px;
}

.guess-form {
  margin: 22px 0 18px;
}

.guess-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10131a;
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(102, 192, 244, 0.18);
}

.input-row button,
.action-row button,
.action-row .steam-link {
  min-height: 48px;
  min-width: 132px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #07110f;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.ghost-button {
  border: 1px solid var(--line);
  background: transparent !important;
  color: var(--text) !important;
}

.action-row .steam-link[hidden],
.steam-link[hidden] {
  display: none !important;
}

.steam-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--green) 54%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--green) 14%, transparent);
  color: var(--green);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.steam-link:hover,
.steam-link:focus-visible {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 22%, transparent);
  outline: none;
}

.muted-cell {
  color: var(--muted);
}

.message {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--cyan);
}

.message.error {
  color: var(--red);
}

.game-capsule {
  width: 100%;
  aspect-ratio: 460 / 215;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(102, 192, 244, 0.26);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(111, 226, 211, 0.2), rgba(224, 179, 74, 0.08)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 10px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--panel-2);
  color: var(--cyan);
  position: relative;
  box-shadow: inset 0 -18px 42px rgba(0, 0, 0, 0.22);
  contain: paint;
}

.game-capsule::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent),
    linear-gradient(135deg, rgba(84, 182, 223, 0.14), rgba(121, 214, 111, 0.06));
  opacity: 0;
  transform: translateX(-100%);
  pointer-events: none;
}

.game-capsule.is-loading::before {
  opacity: 1;
  animation: capsule-sheen 1.4s ease-in-out infinite;
}

.game-capsule::after {
  content: "Capsule art";
  position: absolute;
  right: 8px;
  bottom: 7px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.game-capsule span {
  color: var(--text);
  font-size: clamp(1.15rem, 4vw, 2rem);
  font-weight: 950;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.game-capsule img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transform: scale(1.035);
  filter: saturate(0.92) contrast(0.96);
  transition:
    filter var(--motion-fast) ease,
    opacity 180ms ease,
    transform 220ms ease;
}

.game-capsule.is-loaded img {
  opacity: 1;
  transform: scale(1);
  filter: saturate(1) contrast(1);
}

.game-capsule.load-failed,
.game-capsule.no-art {
  border-color: rgba(102, 192, 244, 0.2);
}

.game-capsule.has-art span {
  opacity: 0;
  transition: opacity 120ms ease;
}

.game-capsule.has-art.is-loading span,
.game-capsule.has-art.no-art span {
  opacity: 1;
}

.game-capsule.has-art::after,
.game-capsule.is-loaded::after {
  display: none;
}

.game-capsule-small span {
  font-size: 1rem;
}

.game-capsule-small::after {
  font-size: 0.54rem;
}

.game-capsule-hero {
  aspect-ratio: 460 / 215;
  min-height: 170px;
  border-color: rgba(102, 192, 244, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 58%),
    #07090e;
}

.game-capsule-hero img {
  object-fit: cover;
  filter: saturate(1.04) contrast(1.02);
}

.game-capsule-tiny span {
  font-size: 0.78rem;
}

.game-capsule-tiny::after {
  display: none;
}

.game-capsule.is-mystery {
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(111, 226, 211, 0.12), rgba(224, 179, 74, 0.1)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 12px),
    var(--panel-2);
}

.game-capsule.is-mystery::after {
  content: "Reserved art";
}

@keyframes capsule-sheen {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.mode-status,
.timeline-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.mode-status span,
.timeline-status span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  padding: 9px 11px;
  font-size: 0.9rem;
  font-weight: 800;
}

.mode-status strong,
.timeline-status strong {
  color: var(--text);
}

.status-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #07110f;
  padding: 0 14px;
  font-weight: 900;
  margin-left: auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 10px 24px rgba(0, 0, 0, 0.18);
  transition:
    box-shadow var(--motion-fast) ease,
    filter var(--motion-fast) ease,
    transform var(--motion-medium) var(--ease-spring);
}

.status-action:not(:disabled):hover,
.status-action:not(:disabled):focus-visible {
  outline: none;
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 16px 30px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.status-action[hidden] {
  display: none;
}

.hint-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.hint-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(111, 226, 211, 0.08), transparent 80%),
    var(--panel-2);
  color: var(--text);
  padding: 12px;
  text-align: left;
  transition:
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    transform var(--motion-medium) var(--ease-spring);
}

.hint-card:not(:disabled):hover,
.hint-card:not(:disabled):focus-visible {
  border-color: rgba(111, 226, 211, 0.55);
  background:
    linear-gradient(180deg, rgba(111, 226, 211, 0.12), transparent 80%),
    var(--panel-2);
  outline: none;
  transform: translateY(-2px);
}

.hint-card:disabled {
  opacity: 0.62;
}

.hint-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hint-card strong {
  display: block;
  overflow-wrap: anywhere;
}

.screenshot-stage {
  margin: 0 0 18px;
}

.screenshot-frame {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 22% 28%, rgba(84, 182, 223, 0.16), transparent 28%),
    radial-gradient(circle at 78% 64%, rgba(121, 214, 111, 0.11), transparent 28%),
    #07090e;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 18px 38px rgba(0, 0, 0, 0.18);
}

.screenshot-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent),
    linear-gradient(135deg, rgba(84, 182, 223, 0.16), rgba(121, 214, 111, 0.08));
  opacity: 0;
  transform: translateX(-100%);
  pointer-events: none;
}

.screenshot-frame.is-loading::before {
  opacity: 1;
  animation: capsule-sheen 1.45s ease-in-out infinite;
}

.screenshot-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transform: scale(var(--screenshot-zoom, 3));
  transform-origin: 50% 50%;
  filter: saturate(1.08) contrast(1.03);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.screenshot-frame.image-ready img {
  opacity: 1;
}

.screenshot-frame.revealed img {
  transform: scale(1.2);
}

.screenshot-frame.all-revealed img {
  object-fit: contain;
  transform: scale(1);
}

.screenshot-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(7, 9, 14, 0.72), rgba(7, 9, 14, 0.54));
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  backdrop-filter: blur(2px);
}

.screenshot-loading[hidden] {
  display: none;
}

.screenshot-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 12px;
  color: var(--muted);
}

.screenshot-meta strong {
  color: var(--blue);
}

.screenshot-hints {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.screenshot-thumb {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(102, 192, 244, 0.18), rgba(87, 214, 141, 0.08)),
    var(--panel-2);
  color: var(--text);
  padding: 10px;
  font-weight: 900;
  text-align: left;
  transition:
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    transform var(--motion-medium) var(--ease-spring);
}

.screenshot-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--thumb-image);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.22);
  filter: saturate(1.05);
  transition:
    opacity 160ms ease,
    transform 180ms ease;
}

.screenshot-thumb.all-revealed::before {
  background-color: #07090e;
  background-repeat: no-repeat;
  background-size: contain;
  transform: scale(1);
}

.screenshot-thumb.all-revealed {
  min-height: 82px;
  display: grid;
  align-content: end;
}

.screenshot-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 10, 13, 0.28), rgba(8, 10, 13, 0.78));
  opacity: 0;
}

.screenshot-thumb.all-revealed::after {
  background: linear-gradient(180deg, rgba(8, 10, 13, 0.04), rgba(8, 10, 13, 0.62));
}

.screenshot-thumb:not(:disabled)::before,
.screenshot-thumb:not(:disabled)::after {
  opacity: 1;
}

.screenshot-thumb span,
.screenshot-thumb strong {
  display: block;
}

.screenshot-thumb span {
  color: rgba(240, 244, 241, 0.74);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.screenshot-thumb strong {
  font-size: 1.25rem;
}

.screenshot-thumb.active {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(84, 182, 223, 0.42);
}

.screenshot-thumb:not(:disabled):hover,
.screenshot-thumb:not(:disabled):focus-visible {
  border-color: rgba(102, 192, 244, 0.62);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  outline: none;
  transform: translateY(-2px);
}

.screenshot-thumb:disabled {
  opacity: 0.58;
}

.guess-stack {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.guess-stack p {
  margin: 0;
  color: var(--muted);
}

.guess-pill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px 10px 18px;
  animation: item-enter var(--motion-medium) var(--ease-out) both;
  transition:
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    transform var(--motion-medium) var(--ease-spring);
}

.guess-pill:hover {
  border-color: rgba(102, 192, 244, 0.32);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
}

.guess-main {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.guess-main strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.guess-meta {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  padding: 4px 9px;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.guess-pill .steam-link {
  justify-self: end;
}

.guess-pill.correct {
  border-color: rgba(87, 214, 141, 0.75);
  background: rgba(87, 214, 141, 0.18);
}

.guess-pill.correct .guess-meta {
  border-color: rgba(87, 214, 141, 0.32);
  background: rgba(87, 214, 141, 0.16);
  color: var(--green);
}

.tag-board {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 10px;
  min-height: 54px;
}

.tag-chip {
  border: 1px solid rgba(102, 192, 244, 0.38);
  border-radius: 999px;
  background: rgba(102, 192, 244, 0.12);
  color: var(--cyan);
  padding: 10px 14px;
  font-weight: 900;
}

.tag-chip.locked {
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--muted);
}

.tag-clues {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 10px;
}

.tag-clues span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  padding: 9px 11px;
  font-size: 0.9rem;
  font-weight: 800;
}

.tag-candidates {
  min-height: 24px;
  margin: 0 0 14px;
  color: var(--muted);
}

.blurb-card {
  border: 1px solid rgba(102, 192, 244, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 18px;
  line-height: 1.75;
  min-height: 148px;
}

.blurb-word {
  display: inline-block;
  margin: 0 3px 6px 0;
}

.blurb-word.masked {
  min-width: 48px;
  border-radius: 6px;
  background: var(--panel-2);
  color: transparent;
  user-select: none;
}

.duel-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.duel-card {
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  padding: 18px;
  text-align: left;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 14px;
  cursor: pointer;
  transition:
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    transform var(--motion-medium) var(--ease-spring);
  animation: item-enter var(--motion-medium) var(--ease-out) both;
}

.duel-card-copy {
  min-width: 0;
}

.duel-card:hover:not(.is-disabled),
.duel-card:focus-visible:not(.is-disabled) {
  border-color: var(--blue);
  background: rgba(102, 192, 244, 0.1);
  box-shadow: 0 18px 38px rgba(84, 182, 223, 0.13);
  outline: none;
  transform: translateY(-4px);
}

.duel-card.is-disabled {
  cursor: default;
}

.duel-card.correct {
  border-color: rgba(87, 214, 141, 0.8);
  background: rgba(87, 214, 141, 0.16);
}

.duel-card.wrong {
  border-color: rgba(238, 109, 102, 0.75);
  background: rgba(238, 109, 102, 0.12);
}

.duel-card-copy span,
.duel-card strong,
.duel-card small {
  display: block;
}

.duel-card-copy span {
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.duel-card strong {
  margin: 10px 0 12px;
  font-size: 1.45rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.duel-card small {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.duel-card .steam-link,
.timeline-card .steam-link {
  margin-top: 12px;
}

.duel-score {
  margin-top: 18px;
  color: var(--green);
  font-size: 2rem;
  font-weight: 900;
}

.timeline-current {
  width: 206px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(102, 192, 244, 0.45);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(102, 192, 244, 0.2), rgba(87, 214, 141, 0.08)),
    var(--panel-2);
  padding: 12px;
  margin-bottom: 18px;
  cursor: grab;
  user-select: none;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  transition:
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    transform var(--motion-medium) var(--ease-spring);
  animation: soft-pop var(--motion-medium) var(--ease-out) both;
}

.timeline-current:active {
  cursor: grabbing;
}

.timeline-current.is-dragging {
  border-color: var(--cyan);
  box-shadow: 0 18px 48px rgba(102, 192, 244, 0.18);
  transform: scale(0.985);
}

.timeline-current.is-disabled {
  cursor: default;
  opacity: 0.72;
}

.timeline-current h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.2;
}

.timeline-current .game-capsule {
  margin-bottom: 12px;
}

.timeline-current p:last-child {
  margin-bottom: 0;
}

.timeline-board {
  position: relative;
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(102, 192, 244, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(102, 192, 244, 0.055), transparent 90px),
    rgba(255, 255, 255, 0.018);
  padding: 14px 12px 18px;
  cursor: grab;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 192, 244, 0.34) transparent;
  touch-action: pan-y;
  user-select: none;
}

.timeline-board::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 22px;
  right: 22px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(102, 192, 244, 0.24), rgba(111, 226, 211, 0.24), transparent);
  pointer-events: none;
}

.timeline-board.is-panning {
  cursor: grabbing;
}

.timeline-board.is-panning .timeline-card,
.timeline-board.is-panning .timeline-slot {
  pointer-events: none;
}

.timeline-slot {
  position: relative;
  z-index: 2;
  flex: 0 0 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  transition:
    flex-basis var(--motion-fast) ease,
    background var(--motion-fast) ease;
}

.timeline-insert-line {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: rgba(102, 192, 244, 0.26);
  transform: translateX(-50%);
  transition:
    width var(--motion-fast) ease,
    background var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

.timeline-slot:hover,
.timeline-slot:focus-visible,
.timeline-slot.drag-over {
  flex-basis: 92px;
  background: rgba(102, 192, 244, 0.12);
  outline: none;
}

.timeline-slot:hover .timeline-insert-line,
.timeline-slot:focus-visible .timeline-insert-line,
.timeline-slot.drag-over .timeline-insert-line {
  width: 8px;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(139, 233, 253, 0.7);
}

.timeline-slot:disabled {
  cursor: default;
  opacity: 0.45;
}

.timeline-card {
  position: relative;
  z-index: 1;
  flex: 0 0 176px;
  min-width: 176px;
  max-width: 176px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 72%),
    #1d2327;
  padding: 12px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
  animation: item-enter var(--motion-medium) var(--ease-out) both;
  transition:
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    transform var(--motion-medium) var(--ease-spring);
}

.timeline-card:hover {
  border-color: rgba(102, 192, 244, 0.36);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.timeline-board.is-panning .timeline-card {
  scroll-snap-align: none;
  transform: none;
}

.timeline-card.missed {
  border-color: rgba(238, 109, 102, 0.88);
  background:
    linear-gradient(180deg, rgba(238, 109, 102, 0.16), rgba(238, 109, 102, 0.06)),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 0 0 1px rgba(238, 109, 102, 0.22),
    0 14px 28px rgba(0, 0, 0, 0.16);
}

.timeline-card .game-capsule {
  margin-bottom: 10px;
}

.timeline-card-copy strong,
.timeline-card-copy span,
.timeline-card-copy small {
  display: block;
}

.timeline-card-copy strong {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.timeline-card-copy span {
  color: var(--green);
  font-size: 1.05rem;
  font-weight: 900;
}

.timeline-card-copy small {
  margin-top: 8px;
  color: var(--muted);
}

.timeline-miss-label {
  color: var(--red) !important;
  font-weight: 900;
  text-transform: uppercase;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  scrollbar-color: var(--line) transparent;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #121720;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

td {
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.92rem;
}

tbody tr {
  animation: item-enter var(--motion-medium) var(--ease-out) both;
}

tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.055);
}

tr:last-child td {
  border-bottom: 0;
}

.empty-row td {
  color: var(--muted);
  text-align: center;
}

.cell {
  border-radius: 6px;
  color: white;
  font-weight: 800;
}

.game-cell {
  min-width: 210px;
}

.game-cell > div,
.game-cell > strong {
  vertical-align: middle;
}

.game-cell .game-capsule-tiny {
  display: inline-grid;
  width: 72px;
  min-width: 72px;
  height: 34px;
  min-height: 34px;
  margin-right: 10px;
}

.game-cell strong {
  display: inline;
  overflow-wrap: anywhere;
}

.match {
  background: rgba(87, 214, 141, 0.35);
}

.partial {
  background: rgba(217, 164, 65, 0.36);
}

.miss {
  background: rgba(85, 93, 109, 0.5);
}

body.light-theme .streak-panel,
body.light-theme .menu-panel,
body.light-theme .game-panel,
body.light-theme .answer-card {
  border-color: rgba(22, 34, 49, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(39, 58, 82, 0.14);
}

body.light-theme .settings-popover {
  box-shadow: 0 24px 60px rgba(39, 58, 82, 0.2);
}

body.light-theme .cache-stats div {
  border-color: rgba(22, 34, 49, 0.08);
  background: rgba(255, 255, 255, 0.58);
}

body.light-theme .mode-card:not(:disabled):hover,
body.light-theme .mode-card:not(:disabled):focus-visible {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--mode-accent) 14%, transparent), transparent 74%),
    #eef3f5;
}

body.light-theme input {
  background: #ffffff;
}

body.light-theme .screenshot-frame {
  background: #dfe7ef;
}

body.light-theme .screenshot-loading {
  background: rgba(255, 255, 255, 0.86);
}

body.light-theme .share-preview {
  background:
    linear-gradient(180deg, rgba(8, 127, 151, 0.08), transparent),
    rgba(255, 255, 255, 0.68);
}

body.light-theme .game-capsule {
  background:
    linear-gradient(135deg, rgba(23, 105, 170, 0.18), rgba(22, 120, 73, 0.08)),
    repeating-linear-gradient(135deg, rgba(22, 34, 49, 0.055) 0 1px, transparent 1px 9px),
    #e8eef5;
}

body.light-theme th {
  background: #e8eef5;
}

body.light-theme td,
body.light-theme .duel-card,
body.light-theme .timeline-card,
body.light-theme .blurb-card,
body.light-theme .guess-pill,
body.light-theme .mode-status span,
body.light-theme .timeline-status span,
body.light-theme .tag-clues span,
body.light-theme .menu-summary span,
body.light-theme .toggle-row,
body.light-theme .option-row,
body.light-theme .option-segment,
body.light-theme .stats-dialog-grid div,
body.light-theme .stats-dialog-section {
  background: rgba(22, 34, 49, 0.035);
}

body.light-theme .timeline-card.missed {
  border-color: rgba(184, 59, 55, 0.78);
  background:
    linear-gradient(180deg, rgba(184, 59, 55, 0.14), rgba(184, 59, 55, 0.05)),
    rgba(22, 34, 49, 0.035);
}

body.compact-cards .mode-card {
  min-height: 148px;
  padding: 14px;
}

body.compact-cards .mode-card-featured {
  min-height: 184px;
}

body.compact-cards .duel-card {
  min-height: 210px;
  padding: 14px;
}

body.compact-cards .timeline-current,
body.compact-cards .timeline-card {
  width: 154px;
  min-width: 154px;
  max-width: 154px;
  padding: 10px;
}

body.compact-cards .timeline-slot {
  flex-basis: 30px;
}

body.compact-cards .timeline-slot:hover,
body.compact-cards .timeline-slot:focus-visible,
body.compact-cards .timeline-slot.drag-over {
  flex-basis: 78px;
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  scroll-behavior: auto !important;
  transition-duration: 0.01ms !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
}

body.reduce-motion .mode-card:not(:disabled):hover,
body.reduce-motion .mode-card:not(:disabled):focus-visible,
body.reduce-motion .icon-button:hover,
body.reduce-motion .icon-button:focus-visible,
body.reduce-motion .duel-card:hover:not(.is-disabled),
body.reduce-motion .duel-card:focus-visible:not(.is-disabled),
body.reduce-motion .timeline-current.is-dragging,
body.reduce-motion .answer-gallery figure:hover img {
  transform: none;
}

.answer-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  border-radius: 8px;
  padding: 18px;
  animation: soft-pop var(--motion-medium) var(--ease-out) both;
}

.answer-card.is-multi-result {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.answer-card.is-multi-result .answer-capsule {
  display: none;
}

.answer-card > div:nth-child(2) {
  min-width: 0;
}

.answer-card.is-multi-result > div:nth-child(2),
.answer-card.is-multi-result > .action-row,
.answer-card.is-multi-result > .answer-game-list {
  grid-column: 1 / -1;
}

.answer-card.is-multi-result > .action-row {
  justify-content: flex-start;
  margin-top: 2px;
}

.answer-capsule {
  min-width: 150px;
}

.answer-card[hidden] {
  display: none;
}

.answer-card h2,
.answer-card p {
  margin-bottom: 0;
}

.answer-details {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.answer-detail,
.answer-tags span {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.answer-detail {
  min-width: 96px;
  padding: 8px 10px;
}

.answer-detail small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.answer-detail strong {
  display: block;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.25;
}

.answer-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.answer-tags span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  color: var(--cyan);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.share-preview {
  overflow-x: auto;
  max-width: 100%;
  margin: 12px 0 0;
  border: 1px solid rgba(111, 226, 211, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(111, 226, 211, 0.07), transparent),
    rgba(7, 9, 14, 0.42);
  color: var(--text);
  padding: 12px;
  font-family:
    "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.answer-game-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.answer-game-list[hidden] {
  display: none;
}

.answer-game-list-header,
.answer-game-row {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.answer-game-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
}

.answer-game-list-header strong {
  color: var(--text);
}

.answer-game-list-header span {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
}

.answer-game-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.answer-game-row .game-capsule-tiny {
  width: 72px;
  height: 34px;
}

.answer-game-row span,
.answer-game-row small {
  display: block;
  color: var(--muted);
}

.answer-game-row span {
  margin-bottom: 2px;
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.answer-game-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.answer-game-row small {
  margin-top: 2px;
  font-size: 0.76rem;
}

.answer-game-row em {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.answer-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.answer-gallery figure {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.answer-gallery figure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent),
    linear-gradient(135deg, rgba(102, 192, 244, 0.14), rgba(121, 214, 111, 0.07));
  opacity: 0;
  transform: translateX(-100%);
  pointer-events: none;
}

.answer-gallery figure.is-loading::before {
  opacity: 1;
  animation: capsule-sheen 1.45s ease-in-out infinite;
}

.answer-gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.025);
  transition:
    filter var(--motion-fast) ease,
    opacity 220ms ease,
    transform var(--motion-medium) var(--ease-spring);
}

.answer-gallery figure.is-loaded img {
  opacity: 1;
  transform: scale(1);
}

.answer-gallery figure.load-failed::after {
  content: "Image unavailable";
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.answer-gallery figcaption {
  position: absolute;
  z-index: 2;
  left: 8px;
  bottom: 7px;
  border-radius: 6px;
  background: rgba(7, 9, 14, 0.78);
  color: var(--text);
  padding: 3px 7px;
  font-size: 0.68rem;
  font-weight: 900;
}

.answer-gallery figure:hover img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.035);
}

.answer-gallery figure.is-loading:hover img,
.answer-gallery figure.load-failed:hover img {
  transform: scale(1.025);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.game-panel > .action-row {
  margin: 16px 0 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer button {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--cyan);
  padding: 6px 8px;
  font-size: 0.82rem;
  font-weight: 850;
}

.site-footer button:hover,
.site-footer button:focus-visible {
  border-color: rgba(111, 226, 211, 0.35);
  background: rgba(111, 226, 211, 0.08);
  outline: none;
}

dialog {
  width: min(520px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 22px;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.dialog-close {
  float: right;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--text);
}

.age-dialog p {
  margin-bottom: 14px;
}

.info-dialog p {
  margin-bottom: 14px;
}

.stats-dialog {
  width: min(780px, calc(100% - 32px));
}

.stats-dialog h3 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.stats-dialog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.stats-dialog-grid div,
.stats-dialog-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.stats-dialog-grid div {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
}

.stats-dialog-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-dialog-grid strong {
  color: var(--text);
  font-size: 1.28rem;
  line-height: 1.1;
}

.stats-dialog-section {
  margin-top: 12px;
  padding: 14px;
}

#rules-body p {
  margin-bottom: 12px;
}

#rules-body p:last-child {
  margin-bottom: 0;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

[data-icon] svg {
  width: 1.05em;
  height: 1.05em;
  display: block;
  stroke-width: 2.25;
}

.icon-button svg,
.dialog-close svg {
  width: 20px;
  height: 20px;
}

.mode-card .mode-icon svg {
  width: 22px;
  height: 22px;
}

.mode-card-featured .mode-icon svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 920px) {
  .menu-header {
    grid-template-columns: 1fr;
  }

  .menu-summary {
    width: 100%;
  }

  .mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-screenshot {
    grid-column: auto;
  }

  .stats-dashboard {
    grid-template-columns: 1fr;
  }

  .answer-card {
    grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  }

  .answer-card > .action-row {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .answer-card.is-multi-result > .action-row {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .topbar,
  .answer-card,
  .intro-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .settings-popover {
    position: static;
    width: 100%;
    max-height: min(640px, calc(100vh - 132px));
    margin-top: 10px;
  }

  .option-row {
    align-items: stretch;
    flex-direction: column;
  }

  .option-segment {
    width: 100%;
  }

  .menu-panel,
  .game-panel {
    padding: 16px;
  }

  .menu-panel {
    gap: 16px;
  }

  .menu-header,
  .intro-row {
    gap: 16px;
    padding-bottom: 16px;
  }

  .intro-row {
    margin-bottom: 18px;
  }

  .menu-summary {
    grid-template-columns: 1fr;
  }

  .stats-dialog-grid {
    grid-template-columns: 1fr 1fr;
  }

  .menu-summary span {
    min-height: 52px;
  }

  .streak-panel,
  .mode-grid,
  .run-type-switch,
  .hint-strip,
  .screenshot-hints,
  .duel-board,
  .input-row {
    grid-template-columns: 1fr;
  }

  .run-type-switch {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mode-card,
  .mode-card-featured {
    grid-column: auto;
    min-height: 136px;
  }

  .mode-card small:last-child {
    margin-top: 8px;
  }

  .status-action {
    width: 100%;
    margin-left: 0;
  }

  .answer-card {
    grid-template-columns: 1fr;
  }

  .answer-card.is-multi-result {
    grid-template-columns: 1fr;
  }

  .answer-gallery {
    grid-template-columns: 1fr;
  }

  .answer-game-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .answer-game-row em,
  .answer-game-row .steam-link {
    grid-column: 2;
    justify-self: start;
  }

  .answer-card .action-row,
  .game-panel > .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .action-row button,
  .action-row .steam-link {
    width: 100%;
  }

  .guess-pill {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 12px;
  }

  .guess-main {
    flex-direction: column;
    gap: 6px;
  }

  .guess-pill .steam-link {
    justify-self: center;
  }

  .answer-capsule {
    min-width: 0;
    max-width: 260px;
  }

  .timeline-current {
    width: min(100%, 230px);
  }

  .screenshot-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .streak-panel {
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: calc(100% - 16px);
    padding: 14px 0 32px;
  }

  h1 {
    font-size: clamp(2.35rem, 17vw, 3.9rem);
  }

  .topbar {
    gap: 14px;
    margin-bottom: 16px;
  }

  .brand-lockup {
    align-items: center;
    gap: 10px;
  }

  .brand-mark {
    width: clamp(42px, 15vw, 56px);
    transform: none;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
  }

  .streak-panel {
    grid-column: 1 / -1;
    min-width: 0;
    white-space: normal;
  }

  .topbar-actions > .icon-button {
    justify-self: end;
  }

  .settings-menu {
    width: auto;
    justify-self: end;
  }

  .settings-menu summary {
    width: 46px;
    min-height: 46px;
    border-radius: 8px;
  }

  .settings-menu[open] {
    width: 100%;
    grid-column: 1 / -1;
  }

  .settings-menu[open] summary {
    margin-left: auto;
  }

  .settings-popover {
    width: 100%;
    max-height: min(680px, calc(100vh - 190px));
    padding: 10px;
  }

  .menu-panel,
  .game-panel,
  .answer-card {
    padding: 14px;
  }

  .menu-copy h2 {
    font-size: clamp(1.75rem, 10vw, 2.45rem);
  }

  .menu-summary {
    gap: 6px;
  }

  .mode-grid {
    gap: 8px;
    grid-auto-rows: minmax(92px, auto);
    margin-top: 0;
  }

  .mode-card,
  .mode-card-featured {
    grid-column: 1 / -1;
    min-height: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-areas:
      "icon kicker"
      "icon title"
      "icon desc";
    align-items: center;
    column-gap: 12px;
    row-gap: 2px;
    padding: 12px;
  }

  .mode-card:nth-child(n) {
    animation-delay: 0ms;
  }

  .mode-icon,
  .mode-card-featured .mode-icon {
    grid-area: icon;
    width: 40px;
    height: 40px;
    margin-bottom: 0;
  }

  .mode-card strong,
  .mode-card-featured strong {
    grid-area: title;
    max-width: none;
    margin-bottom: 0;
    font-size: 1.08rem;
  }

  .mode-card small,
  .mode-card-featured small {
    grid-area: desc;
    max-width: none;
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .mode-card .mode-kicker {
    grid-area: kicker;
    margin-bottom: 8px;
    font-size: 0.72rem;
  }

  .stats-dashboard,
  .stats-dialog-grid,
  .cache-stats {
    grid-template-columns: 1fr;
  }

  dialog {
    width: calc(100% - 16px);
    max-height: calc(100vh - 24px);
    padding: 16px;
    overflow-y: auto;
  }

  .dialog-close {
    width: 36px;
    height: 36px;
  }

  .input-row button {
    width: 100%;
  }

  input {
    min-height: 46px;
  }

  .hint-strip {
    gap: 8px;
  }

  .hint-card {
    min-height: 76px;
  }

  .screenshot-frame {
    aspect-ratio: 4 / 3;
  }

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

  .screenshot-thumb {
    min-height: 58px;
  }

  .guess-main {
    width: 100%;
  }

  .guess-meta {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .duel-card {
    min-height: 260px;
    padding: 14px;
  }

  .duel-score {
    font-size: 1.55rem;
  }

  .timeline-status,
  .mode-status,
  .tag-clues {
    gap: 8px;
  }

  .timeline-status span,
  .mode-status span,
  .tag-clues span {
    width: 100%;
  }

  .timeline-current {
    width: min(100%, 210px);
    min-height: 196px;
    margin-inline: auto;
  }

  .timeline-board {
    margin-inline: -6px;
    padding: 12px 8px 16px;
  }

  .timeline-card {
    flex-basis: 156px;
    min-width: 156px;
    max-width: 156px;
    padding: 10px;
  }

  .timeline-slot {
    flex-basis: 28px;
  }

  .timeline-slot:hover,
  .timeline-slot:focus-visible,
  .timeline-slot.drag-over {
    flex-basis: 64px;
  }

  .table-wrap {
    margin-inline: -6px;
    border-radius: 8px;
  }

  th,
  td {
    padding: 10px;
  }

  .answer-details {
    gap: 6px;
  }

  .answer-detail {
    min-width: calc(50% - 3px);
  }

  .share-preview {
    font-size: 0.74rem;
  }

  .site-footer {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .screenshot-hints {
    grid-template-columns: 1fr;
  }

  .answer-detail {
    min-width: 100%;
  }

  .mode-card,
  .mode-card-featured {
    min-height: 124px;
  }
}
