:root {
  color-scheme: light;
  --ink: #18221f;
  --muted: #5a6762;
  --line: #dce5df;
  --surface: #ffffff;
  --soft: #f4f8f5;
  --mint: #dff3e7;
  --teal: #176b67;
  --blue: #245a9a;
  --rose: #9b375d;
  --gold: #8a6616;
  --color-primary: #165c5b;
  --color-primary-hover: #104544;
  --color-accent: #1aa898;
  --color-bg-start: #f2f6f8;
  --color-dot: #5bbfba;
  --header-bg: #1c3a52;
  --header-text: #f2f8fa;
  --header-muted: #6a9bb0;
  --card-border-color: #c8d8e4;
  --card-title-color: #1c3a52;
  --clue-bg: #eef6fb;
  --clue-text: #1c3a52;
  --clue-border: #c8deec;
  --input-bg: #fbfdff;
  --input-border: #c3d8e7;
  --input-placeholder: #8db1c2;
  --btn-bg: #1aa898;
  --btn-bg-hover: #148b7e;
  --btn-text: #ffffff;
  --correct-bg: #d9f3dd;
  --correct-text: #155d26;
  --correct-border: #94d6a4;
  --wrong-bg: #fff0f0;
  --wrong-text: #982324;
  --wrong-border: #ffb9b9;
  --skip-bg: #f4f8fb;
  --skip-text: #7b8d99;
  --skip-border: #d7e1e8;
}

[data-theme="teal"] {
  --color-primary: #1a5c5c;
  --color-primary-hover: #124040;
  --color-accent: #1aa898;
  --color-bg-start: #f2f6f8;
  --color-dot: #5bbfba;
  --header-bg: #1c3a52;
  --header-text: #f2f8fa;
  --header-muted: #6a9bb0;
  --card-border-color: #c8d8e4;
  --card-title-color: #1c3a52;
  --clue-bg: #eef6fb;
  --clue-text: #1c3a52;
  --clue-border: #c8deec;
  --input-bg: #fbfdff;
  --input-border: #c3d8e7;
  --input-placeholder: #8db1c2;
  --btn-bg: #1aa898;
  --btn-bg-hover: #148b7e;
  --btn-text: #ffffff;
  --teal: var(--color-accent);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(to top right, var(--color-bg-start) 0%, #ffffff 90%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
}

body::before {
  background-image: radial-gradient(var(--color-dot) 1.4px, transparent 1.4px);
  background-size: 38px 38px;
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 100%);
}

body::after {
  background-image: radial-gradient(var(--color-dot) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.2;
  mask-image: linear-gradient(to right, #000 0%, transparent 18%, transparent 82%, #000 100%);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 251, 0.92);
  backdrop-filter: blur(12px);
}

.home-page .site-header {
  display: none;
}

.brand {
  color: var(--teal);
  font-size: 1.3rem;
  font-weight: 800;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

nav a,
.site-footer a {
  text-decoration: none;
}

nav a:hover,
.site-footer a:hover {
  color: var(--teal);
}

main {
  min-height: 76vh;
}

.hero,
.content-section,
.game-shell,
.archive-page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 32px;
  align-items: center;
  padding: 48px 0 12px;
}

.hero h1,
.game-copy h1,
.page-title {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p,
.game-copy p,
.lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 720px;
}

.practice-filter-bar {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

.practice-filter-bar > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.practice-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.practice-filter {
  min-height: 38px;
  border-color: var(--input-border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: rgba(255, 255, 255, 0.86);
  color: var(--card-title-color);
  box-shadow: none;
  font-size: 0.92rem;
}

.practice-filter:hover,
.practice-filter.is-active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #ffffff;
}

.unlimited-seo-section,
.unlimited-faq-section {
  padding: 1rem 0 2rem;
}

.eyebrow,
.label {
  margin: 0 0 8px;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-links,
.cta-row,
.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-links a,
.cta-row a,
button {
  min-height: 44px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  padding: 10px 15px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.hero-links a:nth-child(2),
.cta-row a:nth-child(2),
.game-actions button {
  background: #fff;
  color: var(--teal);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.hero-card,
.game-panel,
.side-panel,
.archive-card,
.seo-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(24, 34, 31, 0.08);
}

.hero-card {
  padding: 24px;
}

.mini-stat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.mini-stat div,
.stats-list div {
  border-radius: 8px;
  padding: 12px;
  background: var(--soft);
}

.mini-stat strong,
.stats-list dd {
  display: block;
  margin: 0;
  font-size: 1.4rem;
  font-weight: 850;
}

.mini-stat span,
.stats-list dt {
  color: var(--muted);
  font-size: 0.85rem;
}

.game-shell {
  padding: 34px 0 46px;
}

.game-shell--featured {
  display: flex;
  min-height: calc(100svh - 74px);
  flex-direction: column;
  justify-content: center;
  padding: 6px 0 10px;
}

.game-copy {
  margin-bottom: 22px;
}

.game-shell--featured .game-copy {
  margin: 0 auto -70px;
  position: relative;
  z-index: 2;
  pointer-events: none;
  text-align: center;
}

.game-shell--featured .card-title {
  margin: 0;
  color: #18364b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.game-layout--solo {
  display: block;
}

.game-panel,
.side-panel {
  padding: clamp(18px, 3vw, 28px);
}

.game-shell--featured .game-panel {
  display: flex;
  width: min(900px, 100%);
  min-height: min(820px, calc(100svh - 28px));
  flex-direction: column;
  margin: 0 auto;
  border-color: #bed8ea;
  border-radius: 22px;
  padding: clamp(64px, 9vh, 92px) clamp(18px, 5vw, 48px) 28px;
  box-shadow: 0 18px 60px rgba(33, 77, 94, 0.08);
}

.game-shell--unlimited {
  display: grid;
  width: min(1760px, calc(100% - 96px));
  min-height: calc(100svh - 78px);
  grid-template-columns: minmax(360px, 0.95fr) minmax(560px, 720px);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 5.2rem) 0 3.25rem;
}

.game-shell--unlimited .game-copy {
  max-width: 840px;
  margin: 0;
  padding-left: clamp(0rem, 2vw, 2rem);
}

.game-shell--unlimited .game-copy .eyebrow {
  color: var(--muted);
  font-size: clamp(0.95rem, 1.5vw, 1.2rem);
}

.game-shell--unlimited .game-copy h1 {
  max-width: 820px;
  font-size: clamp(4rem, 6.3vw, 7rem);
  letter-spacing: 0;
}

.game-shell--unlimited .game-copy p:not(.eyebrow) {
  max-width: 780px;
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.35;
}

.game-shell--unlimited .practice-filter-bar {
  margin-top: 2rem;
}

.game-shell--unlimited .practice-filter-tabs {
  gap: 0.8rem;
}

.game-shell--unlimited .practice-filter {
  min-height: 44px;
  padding: 0.52rem 1.05rem;
  font-size: 1rem;
}

.game-shell--unlimited .game-layout,
.game-shell--unlimited .game-layout--solo {
  display: block;
  min-width: 0;
}

.game-shell--unlimited .game-panel {
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  border-color: #c5dbe8;
  border-radius: 18px;
  padding: clamp(26px, 3vw, 38px) clamp(22px, 3vw, 38px) 28px;
  box-shadow: 0 24px 70px rgba(28, 58, 82, 0.12);
}

.official-practice-header {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  text-align: center;
}

.official-practice-header p {
  margin: 0;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.official-practice-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  font-weight: 800;
}

.official-practice-meta span:not(:last-child)::after {
  margin-left: 0.55rem;
  color: #9badb4;
  content: "/";
}

.official-practice-badge {
  border: 1px solid #b8ded9;
  border-radius: 999px;
  padding: 0.08rem 0.65rem;
  background: #eaf8f5;
  color: #14766e;
}

.official-practice-meta .official-practice-badge::after {
  content: none;
}

.game-shell--unlimited .card-title {
  margin-bottom: 1.7rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.game-shell--unlimited .clue-slot {
  text-align: center;
}

.game-shell--unlimited .game-actions {
  margin-top: 1.25rem;
}

.game-shell--unlimited .game-actions [data-next-case] {
  order: -1;
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
}

.game-shell--unlimited .game-actions [data-next-case]:hover {
  background: #0b8f83;
}

.game-shell--unlimited .card-flip-zone {
  width: 100%;
}

.game-shell--unlimited .symptom-list {
  margin-bottom: 1.75rem;
}

.game-shell--unlimited .game-panel.card .symptom {
  min-height: 64px;
  margin: 0.62rem 0;
  padding: 0.82rem 1rem;
  font-size: clamp(1.02rem, 1.35vw, 1.25rem);
  font-weight: 800;
  line-height: 1.16;
}

.game-shell--unlimited .game-panel.card .symptom:not(.is-revealed) {
  min-height: 64px;
}

.game-shell--unlimited .guess-row {
  align-items: stretch;
}

.game-shell--unlimited .game-panel.card [data-guess-input],
.game-shell--unlimited .game-panel.card .btn_color {
  min-height: 54px;
  font-size: 1rem;
}

.case-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
}

.game-shell--featured .case-meta {
  display: none;
}

.title-rule {
  width: 58px;
  height: 5px;
  margin: 8px auto 28px;
  border-radius: 999px;
  background: #1da99e;
}

.game-shell:not(.game-shell--featured) .title-rule {
  display: none;
}

.clue-stack {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.game-shell--featured .clue-stack {
  flex: 1;
  align-content: start;
  gap: 13px;
  margin: 0 0 28px;
}

.clue-slot {
  min-height: 72px;
  border: 1px solid #bfdbef;
  border-radius: 16px;
  padding: 17px 22px;
  background: #eef8ff;
  color: #1c3a51;
  font-size: clamp(1.05rem, 2vw, 1.55rem);
  font-weight: 800;
  text-align: center;
}

.game-shell:not(.game-shell--featured) .clue-slot {
  text-align: left;
}

.clue-slot:not(.is-revealed)::after {
  content: "";
}

.clue-slot.is-current {
  border-color: #9ccbe7;
  box-shadow: 0 0 0 3px rgba(43, 157, 195, 0.08);
}

.clue-text {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 760;
}

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

.game-shell--featured .guess-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.game-shell--featured .guess-row {
  gap: 24px;
}

.game-shell--featured .guess-form {
  margin-top: auto;
}

.guess-input-wrap {
  position: relative;
  min-width: 0;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
}

.game-shell--featured input {
  min-height: 66px;
  border-color: #c3d8e7;
  border-radius: 12px;
  background: #fbfdff;
  color: #1c3a51;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
}

.game-shell--featured input::placeholder {
  color: #8db1c2;
}

.game-shell--featured .guess-row button {
  min-width: 148px;
  min-height: 66px;
  border-color: #1da99e;
  border-radius: 12px;
  background: #1da99e;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
}

.game-shell--featured .guess-row .summary-toggle {
  min-width: 260px;
  border-color: #1599e8;
  background: #209ce5;
  box-shadow: 0 12px 22px rgba(32, 156, 229, 0.22);
}

input:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(23, 107, 103, 0.14);
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 6;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #c3d8e7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(24, 34, 31, 0.14);
}

.suggestion-item {
  padding: 11px 14px;
  color: #1c3a51;
  font-weight: 700;
  cursor: pointer;
}

.suggestion-item + .suggestion-item {
  border-top: 1px solid #edf3f7;
}

.suggestion-item:hover {
  background: #eef8ff;
}

.suggestion-item.is-disabled {
  color: #999;
  cursor: not-allowed;
}

.suggestion-item.is-disabled:hover {
  background: #fff;
}

.feedback {
  min-height: 28px;
  color: var(--blue);
  font-weight: 750;
}

.game-shell--featured .feedback {
  text-align: center;
}

.game-shell--featured .game-actions {
  display: none;
}

.played-banner {
  margin: 20px 0 18px;
  border: 1px solid #94d6a4;
  border-radius: 14px;
  padding: 18px;
  background: #d9f3dd;
  color: #155d26;
  box-shadow: 0 0 14px rgba(43, 169, 77, 0.42);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 850;
  text-align: center;
}

.guess-history {
  display: grid;
  gap: 9px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.guess-history-item {
  display: grid;
  min-height: 42px;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 5px 10px 5px 14px;
  font-weight: 760;
}

.guess-history-item.is-wrong,
.guess-history-item.wrong {
  border: 1px solid #ffb9b9;
  background: #fff0f0;
  color: #982324;
}

.guess-history-item.is-correct,
.guess-history-item.correct {
  border: 1px solid #9ad9a6;
  background: #e9f8ec;
  color: #17602c;
}

.guess-history-item.is-skip,
.guess-history-item.skip {
  border: 1px solid #d7e1e8;
  background: #f4f8fb;
  color: #7b8d99;
}

.guess-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: rgba(119, 47, 47, 0.13);
  font-size: 0.85rem;
  font-weight: 850;
}

.guess-history-item.is-skip .guess-index,
.guess-history-item.skip .guess-index {
  background: #d9e4eb;
}

.guess-name {
  overflow-wrap: anywhere;
  text-align: center;
}

.guess-mark {
  font-size: 1.35rem;
  line-height: 1;
  text-align: center;
}

.game-summary-view {
  display: flex;
  min-height: 570px;
  flex-direction: column;
  align-items: center;
  padding: 14px 18px 0;
  color: #333;
  text-align: center;
}

.game-summary-view h2,
.summary-title {
  margin: 4px 0 16px;
  color: #18364b;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 850;
}

.game-summary-view p {
  max-width: 760px;
  margin: 0 auto;
}

.game-summary-view [data-summary-text],
.summary-text {
  color: #3d3d3d;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.58;
  text-align: left;
}

.summary-note {
  margin-top: auto !important;
  padding-top: 70px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-style: italic;
}

.anki-row,
.anki-btn-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 34px;
}

.anki-row button,
.anki-btn {
  min-height: 44px;
  border-color: #1da99e;
  border-radius: 8px;
  background: #1da99e;
}

.anki-help {
  position: relative;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #247a82;
  border-radius: 999px;
  color: #247a82;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: help;
}

.anki-tooltip,
.faq-content {
  position: absolute;
  right: 50%;
  bottom: calc(100% + 12px);
  z-index: 4;
  width: min(280px, 70vw);
  transform: translateX(50%);
  border: 1px solid #dadada;
  border-radius: 8px;
  padding: 14px 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
  color: #666;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  visibility: hidden;
  opacity: 0;
  transition: opacity 120ms ease, visibility 120ms ease;
}

.anki-help:hover .anki-tooltip,
.anki-help:focus-visible .anki-tooltip,
.faq-tooltip:hover .faq-content,
.faq-tooltip:focus-visible .faq-content {
  visibility: visible;
  opacity: 1;
}

.game-disclaimer {
  max-width: 820px;
  margin: 14px auto 0;
  color: #888;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-style: italic;
  text-align: center;
}

.result-panel {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.result-panel h2 {
  margin: 0 0 8px;
}

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

.learning {
  border-left: 4px solid var(--gold);
  padding-left: 14px;
  color: var(--muted);
}

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

.related-list {
  display: grid;
  gap: 10px;
}

.related-list a,
.archive-card {
  display: block;
  padding: 14px;
  text-decoration: none;
}

.related-list a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  font-weight: 800;
}

.related-list span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.archive-page {
  padding: 42px 0;
}

.archive-grid,
.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.archive-card h2,
.seo-card h2 {
  margin-top: 0;
}

.archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.archive-actions a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--teal);
  font-weight: 750;
  text-decoration: none;
}

.archive-list-page {
  display: flex;
  justify-content: center;
  padding: 2.1rem 1rem;
}

.archive-list-card {
  width: min(100%, 820px);
  border: 1px solid var(--card-border-color);
  border-radius: 16px;
  padding: clamp(3rem, 6vw, 4.6rem) clamp(1.5rem, 5vw, 4.1rem);
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(28, 58, 82, 0.08);
}

.archive-list-card .page-title {
  margin: 0 0 2.6rem;
  color: var(--card-title-color);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 2.55rem);
  line-height: 1.1;
  text-align: center;
}

.archive-list-card .page-title::after {
  display: block;
  width: 54px;
  height: 4px;
  margin: 1.15rem auto 0;
  border-radius: 999px;
  background: var(--color-accent);
  content: "";
}

.archive-list-card .archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 1.35rem;
  margin-top: 0;
}

.archive-tile {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  border: 2px solid #8ccdf0;
  border-radius: 13px;
  padding: 1rem 1.1rem;
  background: #eaf6ff;
  color: #172d4d;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.archive-tile:hover {
  border-color: var(--color-accent);
  box-shadow: 0 12px 24px rgba(30, 144, 255, 0.14);
  transform: translateY(-1px);
}

.tile-number,
.tile-date {
  display: block;
}

.tile-number {
  font-size: 1.35rem;
  line-height: 1.1;
}

.tile-date {
  margin-top: 0.45rem;
  color: #61799c;
  font-size: 1rem;
}

.tile-status {
  display: none;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.archive-tile.is-solved .tile-status,
.archive-tile.is-failed .tile-status {
  display: flex;
}

.archive-tile.is-solved .tile-status {
  color: #15975a;
}

.archive-tile.is-failed .tile-status {
  color: #db2f2f;
}

.archive-play-page {
  padding: 1rem 1rem 2.5rem;
}

.archive-back-link {
  display: flex;
  width: max-content;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border: 2px solid var(--color-accent);
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  color: #d8fff8;
  background: rgba(29, 169, 158, 0.68);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.archive-play-page .card-container.game-shell {
  min-height: auto;
  justify-content: flex-start;
  padding: 0;
}

.archive-play-page .game-layout--solo {
  width: min(100%, 820px);
}

.archive-play-page .game-panel.card {
  max-width: 820px;
  padding: clamp(2.1rem, 4vw, 2.6rem) clamp(1.5rem, 4vw, 2.65rem) 2.35rem;
}

.archive-play-page .case-meta {
  display: block;
  margin-bottom: 1.75rem;
  color: #6d6d6d;
  font-size: 1.35rem;
  font-weight: 500;
  text-align: center;
}

.archive-play-page .game-shell--featured .case-meta {
  display: block;
}

.archive-card-row {
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2.45rem;
}

.archive-card-row .card-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.45rem);
  white-space: nowrap;
}

.archive-arrow {
  position: relative;
  display: flex;
  width: 46px;
  height: 32px;
  align-items: center;
  justify-content: center;
  margin-top: 0.35rem;
  background: #145d61;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.archive-arrow::before,
.archive-arrow::after {
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
  content: "";
  transform: translateY(-50%);
}

.archive-arrow--prev::before {
  right: 100%;
  border-right: 24px solid #145d61;
}

.archive-card-row .archive-arrow--prev {
  justify-self: start;
  margin-left: 24px;
}

.archive-arrow--next::after {
  left: 100%;
  border-left: 24px solid #145d61;
}

.archive-card-row .archive-arrow--next {
  justify-self: end;
  margin-right: 24px;
}

.archive-arrow--empty {
  visibility: hidden;
}

.content-section {
  padding: 38px 0;
}

.home-entry-section {
  padding-top: 54px;
}

.seo-card {
  padding: 18px;
}

.seo-card-link {
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.seo-card-link:hover,
.seo-card-link:focus-visible {
  border-color: #8fc6c2;
  box-shadow: 0 22px 52px rgba(24, 34, 31, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.seo-card h3 {
  margin: 0 0 10px;
  color: #18364b;
  font-size: 1.25rem;
}

.seo-card a,
.seo-card-link span {
  display: inline-block;
  margin-top: 10px;
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.seo-card a:hover,
.seo-card-link:hover span {
  text-decoration: underline;
}

.seo-copy-section {
  max-width: 900px;
}

.seo-copy-section p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.steps-list {
  display: grid;
  gap: 12px;
  max-width: 880px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.steps-list li {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  color: var(--muted);
}

.steps-list li::before {
  content: counter(steps);
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-weight: 850;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 900px;
  margin-top: 22px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(24, 34, 31, 0.05);
}

.faq-list summary {
  cursor: pointer;
  padding: 16px 18px;
  color: #18364b;
  font-weight: 850;
}

.faq-list p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
}

.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding: 28px clamp(18px, 4vw, 56px);
  color: var(--muted);
  background: var(--soft);
  text-align: center;
}

/* Official-style Doctordle game shell */
.card-container.game-shell {
  display: flex;
  width: 100%;
  max-width: none;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 2rem 1rem;
}

.card-container.game-shell.game-shell--unlimited {
  display: grid;
  width: min(1760px, calc(100% - 96px));
  max-width: none;
  justify-content: normal;
  align-items: center;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5.2rem) 0 3.25rem;
}

.game-shell--featured {
  min-height: calc(100svh - 74px);
}

.game-layout {
  width: min(100%, 960px);
}

.game-layout--solo {
  width: min(100%, 720px);
}

.game-panel.card {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid var(--card-border-color);
  border-radius: 16px;
  padding: 2rem;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(28, 58, 82, 0.08);
  text-align: center;
}

.game-shell--featured .game-panel.card {
  width: 100%;
  min-height: 0;
  padding: clamp(48px, 7vw, 72px) clamp(20px, 5vw, 40px) 28px;
}

.card-title {
  margin: 0 0 1.5rem;
  color: var(--card-title-color);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 2.95rem);
  font-weight: 800;
  line-height: 1.08;
  text-align: center;
}

.card-title::after {
  display: block;
  width: 48px;
  height: 4px;
  margin: 1rem auto 0;
  border-radius: 999px;
  background: var(--color-accent);
  content: "";
}

.card-flip-zone {
  position: relative;
  perspective: 1200px;
}

.card-flip-inner {
  position: relative;
  transition: transform 0.6s ease, min-height 0.25s ease;
  transform-style: preserve-3d;
}

.card-flip-inner.flipped {
  min-height: 510px;
  transform: rotateY(180deg);
}

.card-face-front,
.card-face-back {
  backface-visibility: hidden;
}

.card-face-front {
  transform: translateZ(0);
}

.card-face-back {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-y: auto;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  transform: rotateY(180deg) translateZ(0);
}

.symptom-list {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 clamp(2.5rem, 10vw, 7rem);
}

.symptom {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--clue-border);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  background: var(--clue-bg);
  color: var(--clue-text);
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  font-weight: 800;
  line-height: 1.18;
  text-align: center;
}

.symptom:not(.is-revealed) {
  color: transparent;
}

.symptom.is-current {
  border-color: var(--clue-border);
  box-shadow: none;
}

.guess-section {
  position: relative;
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0;
}

.guess-section label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.guess-row {
  display: flex;
  width: 100%;
  gap: 1rem;
}

.guess-input-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 0;
}

#guess,
[data-guess-input] {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  background: var(--input-bg);
  color: var(--clue-text);
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  font-weight: 650;
}

#guess::placeholder,
[data-guess-input]::placeholder {
  color: var(--input-placeholder);
}

#guess:focus,
[data-guess-input]:focus {
  border-color: var(--color-primary);
  outline: 2px solid rgba(26, 92, 92, 0.22);
}

.btn_color,
.summary-btn,
.anki-btn {
  min-height: 52px;
  border: 1px solid var(--btn-bg);
  border-radius: 10px;
  padding: 0.8rem 1.4rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.btn_color:hover,
.summary-btn:hover,
.anki-btn:hover {
  background: var(--btn-bg-hover);
}

.summary-btn {
  flex: 1 1 220px;
  border-color: #1599e8;
  background: #209ce5;
  box-shadow: 0 10px 20px rgba(32, 156, 229, 0.2);
}

.summary-btn:hover {
  background: #158ad1;
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 20;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(28, 58, 82, 0.16);
  text-align: left;
}

.suggestion-item {
  padding: 0.7rem 0.9rem;
  color: var(--clue-text);
  font-weight: 700;
  cursor: pointer;
}

.suggestion-item + .suggestion-item {
  border-top: 1px solid #edf3f7;
}

.suggestion-item:hover {
  background: var(--clue-bg);
}

.suggestion-item.is-disabled {
  color: #999999;
  cursor: not-allowed;
}

#guess-history-list {
  display: grid;
  gap: 0.5rem;
  margin: 0.6rem 0 1rem;
}

.guess-history-item {
  display: grid;
  min-height: 38px;
  grid-template-columns: 28px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 0.6rem;
  border-radius: 999px;
  padding: 0.3rem 0.7rem 0.3rem 0.8rem;
  font-weight: 760;
}

.guess-history-item.correct,
.guess-history-item.is-correct {
  border: 1px solid var(--correct-border);
  background: var(--correct-bg);
  color: var(--correct-text);
}

.guess-history-item.wrong,
.guess-history-item.is-wrong {
  border: 1px solid var(--wrong-border);
  background: var(--wrong-bg);
  color: var(--wrong-text);
}

.guess-history-item.skip,
.guess-history-item.is-skip {
  border: 1px solid var(--skip-border);
  background: var(--skip-bg);
  color: var(--skip-text);
}

.guess-history-badge {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(119, 47, 47, 0.13);
  font-size: 0.82rem;
  font-weight: 850;
}

.guess-history-item.skip .guess-history-badge,
.guess-history-item.is-skip .guess-history-badge {
  background: #d9e4eb;
}

.guess-history-name {
  overflow-wrap: anywhere;
  text-align: center;
}

.guess-history-icon {
  font-size: 1.2rem;
  line-height: 1;
  text-align: center;
}

.feedback {
  min-height: 0;
}

#result_class {
  margin: 0.55rem 0 0;
  font-weight: 800;
  text-align: center;
}

#result_class.result {
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.feedback .result.correct {
  border: 1px solid var(--correct-border);
  background: var(--correct-bg);
  color: var(--correct-text);
  box-shadow: 0 0 14px rgba(43, 169, 77, 0.26);
}

.feedback .result.incorrect,
.feedback .result.completed {
  border: 1px solid var(--wrong-border);
  background: var(--wrong-bg);
  color: var(--wrong-text);
}

.played-banner {
  margin: 1.1rem 0;
  border: 1px solid var(--correct-border);
  border-radius: 12px;
  padding: 1rem;
  background: var(--correct-bg);
  color: var(--correct-text);
  box-shadow: 0 0 14px rgba(43, 169, 77, 0.3);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 850;
}

.game-summary-view {
  min-height: 0;
  padding: 0 0.75rem;
  color: #333333;
}

.game-panel.card .summary-inline {
  display: flex;
  min-height: 510px;
  flex-direction: column;
  align-items: center;
  padding: 0;
  text-align: center;
}

.summary-title {
  margin: 0.25rem 0 1rem;
  color: var(--card-title-color);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 850;
}

.summary-text {
  max-width: 520px;
  margin: 0 auto;
  color: #3d3d3d;
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.58;
  text-align: left;
}

.game-panel.card .summary-inline .summary-text {
  width: 100%;
  max-width: none;
  font-size: 1.05rem;
  line-height: 1.65;
}

.summary-disclaimer {
  margin-top: auto !important;
  padding-top: 3rem;
  font-style: italic;
}

.game-panel.card .summary-inline .summary-disclaimer {
  max-width: 520px;
  color: #444444;
  font-size: 1rem;
  line-height: 1.25;
}

.anki-btn-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: 1.6rem;
}

.game-panel.card .summary-toggle.is-summary-open {
  border-color: #1599e8;
  background: #209ce5;
  box-shadow: 0 10px 20px rgba(32, 156, 229, 0.2);
}

.game-panel.card .summary-toggle.is-summary-open:hover {
  background: #158ad1;
}

/* Match the official game component sizing after legacy MVP overrides. */
.game-shell--featured .game-panel.card {
  display: block;
  max-width: 600px;
  min-height: 0;
  border-radius: 16px;
  padding: 2rem;
}

.game-shell--featured .card-title,
.game-panel.card .card-title {
  margin: 0 0 0.5rem;
  color: var(--card-title-color);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
}

.game-shell--featured .card-title::after,
.game-panel.card .card-title::after {
  width: 2.5rem;
  height: 3px;
  margin: 0.6rem auto 1.25rem;
}

.game-panel.card .symptom-list {
  display: block;
  margin: 0;
}

.game-shell--featured .symptom,
.game-panel.card .symptom {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0;
  border-radius: 12px;
  padding: 0.75rem;
  color: var(--clue-text);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.25;
}

.game-shell--featured .symptom:not(.is-revealed),
.game-panel.card .symptom:not(.is-revealed) {
  min-height: 3.3rem;
}

.game-panel.card .guess-section {
  margin-top: 1.5rem;
  gap: 1rem;
}

.game-panel.card .guess-row {
  display: flex;
  width: 100%;
  gap: 1rem;
}

.game-shell--featured #guess,
.game-shell--featured [data-guess-input],
.game-panel.card [data-guess-input] {
  min-height: 0;
  margin-bottom: 0;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 400;
}

.game-shell--featured .guess-row .btn_color,
.game-panel.card .btn_color {
  min-width: 0;
  min-height: 0;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.game-shell--featured .guess-row .summary-btn,
.game-panel.card .summary-btn {
  min-width: 0;
  min-height: 0;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.game-panel.card #guess-history-list {
  margin-top: 0.5rem;
}

.game-panel.card .guess-history-item {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: space-between;
  margin: 0.25rem 0;
  border-radius: 50px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.game-panel.card .guess-history-badge {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  font-size: 0.75rem;
}

.game-panel.card .guess-history-icon {
  font-size: 0.9rem;
  font-weight: 700;
}

.game-panel.card #result_class {
  margin: 0 !important;
  border-radius: 12px;
  padding: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.game-panel.card #result_class.result {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 4.1rem;
  margin: 0.5rem 0 1.5rem !important;
  padding: 0.75rem !important;
}

.game-panel.card #result_class.result.incorrect {
  border: 1px solid #f2a8b4;
  background-color: #f8d7da;
  color: #721c24 !important;
  box-shadow: 0 0 12px 3px rgba(220, 53, 69, 0.38);
}

.game-panel.card .game-disclaimer {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.35;
}

.has-result-modal {
  overflow: hidden;
}

.result-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.result-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 35, 48, 0.24);
  backdrop-filter: blur(1px);
}

.result-modal__content {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 2rem));
  max-height: min(94vh, 760px);
  overflow-y: auto;
  border-radius: 16px;
  background: #ffffff;
  padding: 2.25rem 1.35rem 1.35rem;
  color: #343434;
  box-shadow: 0 24px 70px rgba(15, 59, 77, 0.18);
}

.result-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 0;
  background: transparent;
  color: #111111;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.result-modal__outcome {
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: center;
  border: 2px solid;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
}

.result-modal__outcome.is-win {
  border-color: #1e90ff;
  background: #e4f3ff;
}

.result-modal__outcome.is-loss {
  border-color: #ff9900;
  background: #fff3dc;
}

.result-modal__stats {
  margin-top: 1rem;
  border: 1px solid #dbe7ff;
  border-radius: 14px;
  background: #f8f9ff;
  padding: 1.1rem;
}

.result-modal__stats h2 {
  margin: 0 0 0.85rem;
  color: #5a3d2f;
  text-align: center;
  font-size: 1.45rem;
  line-height: 1.2;
}

.result-modal__stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.result-modal__stat {
  display: flex;
  min-height: 5.35rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid #cfe9ff;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(30, 144, 255, 0.1);
  text-align: center;
}

.result-modal__stat strong {
  color: #0f6868;
  font-size: 1.55rem;
  line-height: 1;
}

.result-modal__stat span {
  margin-top: 0.6rem;
  color: #6d6d6d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: uppercase;
}

.result-modal__distribution {
  margin-top: 0.95rem;
  border: 1px solid #dbe7ff;
  border-radius: 10px;
  padding: 0.8rem 1.1rem 0.75rem;
}

.result-modal__distribution h3 {
  margin: 0 0 0.65rem;
  color: #5a3d2f;
  text-align: center;
  font-size: 1.05rem;
}

.result-modal__dist-row {
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  gap: 0.65rem;
  align-items: center;
  margin: 0.38rem 0;
}

.result-modal__dist-label {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border-radius: 6px;
  color: #0f6868;
  font-size: 0.95rem;
  font-weight: 800;
}

.result-modal__dist-row.is-current .result-modal__dist-label {
  border: 2px solid #1e90ff;
  color: #0f6868;
}

.result-modal__dist-track {
  position: relative;
  min-height: 1.55rem;
  overflow: hidden;
  border-radius: 5px;
  background: #e5e9ee;
}

.result-modal__dist-fill {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 0;
  border-radius: 5px;
  background: #21aa9b;
}

.result-modal__dist-track strong {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  color: #ffffff;
  font-size: 1rem;
  line-height: 1;
}

.result-modal__rank {
  display: flex;
  min-height: 4.1rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.95rem;
  border: 2px solid;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
}

.result-modal__rank.is-win {
  border-color: #1e90ff;
  background: #e4f3ff;
}

.result-modal__rank.is-loss {
  border-color: #ff9900;
  background: #fff3dc;
}

.result-modal__share {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(330px, 100%);
  min-height: 3.1rem;
  margin: 1rem auto 0;
  border: 0;
  border-radius: 8px;
  background: #1f9ee8;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(31, 158, 232, 0.28);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

.result-modal__share::before {
  content: "";
  margin-right: 0.75rem;
  font-size: 1.1rem;
}

.result-modal__share:hover {
  background: #138cd2;
}

.result-modal.is-archive-result .result-modal__content {
  width: min(680px, calc(100vw - 2rem));
  padding: 4.25rem 2.7rem 3.2rem;
}

.result-modal.is-archive-result .result-modal__stats,
.result-modal.is-archive-result .result-modal__share {
  display: none;
}

.result-modal.is-archive-result .result-modal__outcome,
.result-modal.is-archive-result .result-modal__rank {
  min-height: 6.5rem;
  font-size: 1.55rem;
}

.result-modal.is-archive-result .result-modal__rank {
  margin-top: 1.45rem;
}

.game-shell--unlimited .official-practice-header {
  margin-bottom: 1.1rem;
}

.game-shell--unlimited .card-title,
.game-shell--unlimited .game-panel.card .card-title {
  margin-bottom: 1.7rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.game-shell--unlimited .symptom,
.game-shell--unlimited .clue-slot {
  text-align: center;
}

@media screen and (max-width: 1180px) {
  .card-container.game-shell.game-shell--unlimited,
  .game-shell--unlimited {
    width: min(960px, calc(100% - 32px));
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    padding: 2.25rem 0 2.5rem;
  }

  .game-shell--unlimited .game-copy {
    max-width: 760px;
    padding-left: 0;
  }

  .game-shell--unlimited .game-copy h1 {
    font-size: clamp(3.2rem, 9vw, 5.4rem);
  }

  .game-shell--unlimited .game-copy p:not(.eyebrow) {
    max-width: 680px;
  }

  .game-shell--unlimited .game-panel {
    max-width: 760px;
    margin: 0;
  }
}

@media screen and (max-width: 768px) {
  .archive-list-card .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-play-page {
    padding: 0.75rem 0.75rem 1.5rem;
  }

  .archive-back-link {
    margin-bottom: 0.85rem;
    padding: 0.5rem 1rem;
    font-size: 0.98rem;
  }

  .archive-play-page .game-layout--solo {
    width: 100%;
  }

  .archive-play-page .game-panel.card {
    max-width: 100%;
    padding: 1.35rem 1rem 1.25rem;
  }

  .archive-play-page .case-meta {
    margin-bottom: 1rem;
    font-size: 0.98rem;
    line-height: 1.25;
  }

  .archive-card-row {
    grid-template-columns: 70px minmax(0, 1fr) 70px;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 1.15rem;
  }

  .archive-card-row .card-title {
    grid-column: 2;
    grid-row: 1;
    font-size: clamp(1.55rem, 7vw, 2.15rem);
    white-space: normal;
  }

  .archive-card-row .archive-arrow--prev {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin-left: 22px;
  }

  .archive-card-row .archive-arrow--next {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    margin-right: 22px;
  }

  .archive-arrow {
    width: 48px;
    height: 34px;
    margin-top: 0;
    font-size: 0.78rem;
  }

  .archive-arrow::before,
  .archive-arrow::after {
    border-top-width: 21px;
    border-bottom-width: 21px;
  }

  .archive-arrow--prev::before {
    border-right-width: 22px;
  }

  .archive-arrow--next::after {
    border-left-width: 22px;
  }

  .game-shell--featured .game-panel.card {
    padding: 1.5rem;
  }

  .archive-play-page .game-shell--featured .game-panel.card {
    padding: 1.35rem 1rem 1.25rem;
  }

  .game-shell--featured .card-title,
  .game-panel.card .card-title {
    font-size: 1.25rem;
  }

  .game-shell--featured .symptom,
  .game-panel.card .symptom {
    padding: 0.5rem;
    font-size: 1rem;
  }

  .game-shell--featured #guess,
  .game-shell--featured [data-guess-input],
  .game-panel.card [data-guess-input],
  .game-shell--featured .guess-row .btn_color,
  .game-panel.card .btn_color {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .game-shell--unlimited {
    width: min(100% - 24px, 720px);
    gap: 1.35rem;
    padding: 1.5rem 0 2rem;
  }

  .game-shell--unlimited .game-copy h1 {
    font-size: clamp(2.6rem, 13vw, 4.2rem);
  }

  .game-shell--unlimited .game-copy p:not(.eyebrow) {
    margin-top: 1rem;
    font-size: 1rem;
  }

  .game-shell--unlimited .practice-filter-bar {
    margin-top: 1.25rem;
  }

  .game-shell--unlimited .practice-filter-tabs {
    gap: 0.55rem;
  }

  .game-shell--unlimited .practice-filter {
    min-height: 38px;
    padding: 0.42rem 0.75rem;
    font-size: 0.9rem;
  }

  .game-shell--unlimited .game-panel.card {
    border-radius: 16px;
    padding: 1.25rem 1rem 1.35rem;
  }

  .game-shell--unlimited .official-practice-header {
    gap: 0.55rem;
    margin-bottom: 0.85rem;
  }

  .game-shell--unlimited .official-practice-meta {
    gap: 0.35rem;
    font-size: 0.9rem;
  }

  .game-shell--unlimited .official-practice-meta span:not(:last-child)::after {
    margin-left: 0.35rem;
  }

  .game-shell--unlimited .card-title,
  .game-shell--unlimited .game-panel.card .card-title {
    margin-bottom: 1rem;
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .game-shell--unlimited .card-title::after {
    margin-top: 0.55rem;
    margin-bottom: 0.9rem;
  }

  .game-shell--unlimited .game-panel.card .symptom,
  .game-shell--unlimited .game-panel.card .symptom:not(.is-revealed) {
    min-height: 58px;
    margin: 0.5rem 0;
    padding: 0.68rem 0.75rem;
    font-size: 1rem;
  }

  .game-shell--unlimited .game-panel.card [data-guess-input],
  .game-shell--unlimited .game-panel.card .btn_color {
    min-height: 48px;
    padding: 0.62rem 0.85rem;
    font-size: 0.95rem;
  }
}

@media screen and (max-width: 480px) {
  .card-container.game-shell {
    padding: 1rem 0.5rem;
  }

  .archive-play-page {
    padding: 0.5rem 0.5rem 1rem;
  }

  .archive-play-page .card-container.game-shell {
    padding: 0;
  }

  .archive-play-page .game-panel.card,
  .archive-play-page .game-shell--featured .game-panel.card {
    border-radius: 12px;
    padding: 1rem 0.75rem;
  }

  .archive-play-page .case-meta {
    margin-bottom: 0.8rem;
    font-size: 0.86rem;
  }

  .archive-card-row {
    grid-template-columns: 62px minmax(0, 1fr) 62px;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
  }

  .archive-card-row .card-title {
    font-size: clamp(1.12rem, 6vw, 1.45rem);
    line-height: 1.1;
  }

  .archive-card-row .card-title::after {
    width: 42px;
    height: 3px;
    margin-top: 0.65rem;
  }

  .archive-card-row .archive-arrow--prev {
    margin-left: 20px;
  }

  .archive-card-row .archive-arrow--next {
    margin-right: 20px;
  }

  .archive-arrow {
    width: 42px;
    height: 30px;
    font-size: 0.68rem;
  }

  .archive-arrow::before,
  .archive-arrow::after {
    border-top-width: 19px;
    border-bottom-width: 19px;
  }

  .archive-arrow--prev::before {
    border-right-width: 20px;
  }

  .archive-arrow--next::after {
    border-left-width: 20px;
  }

  .archive-list-card {
    padding-inline: 0.75rem;
  }

  .archive-list-card .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .archive-tile {
    min-height: 74px;
    padding: 0.75rem;
  }

  .tile-number {
    font-size: 1.05rem;
  }

  .tile-date {
    font-size: 0.82rem;
  }

  .tile-status {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.95rem;
  }

  .game-shell--featured .game-panel.card {
    max-width: 100%;
    border-radius: 12px;
    padding: 1rem;
  }

  .game-shell--featured .symptom,
  .game-panel.card .symptom {
    min-height: 2.5rem;
    font-size: 0.95rem;
  }

  .game-panel.card .guess-row {
    gap: 0.5rem;
    align-items: center;
  }

  .game-shell--featured #guess,
  .game-shell--featured [data-guess-input],
  .game-panel.card [data-guess-input],
  .game-shell--featured .guess-row .btn_color,
  .game-panel.card .btn_color {
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .game-shell--featured .guess-row .btn_color,
  .game-panel.card .btn_color {
    white-space: nowrap;
  }

  .game-panel.card #result_class,
  .game-panel.card #result_class.result {
    min-height: 2.5rem;
    padding: 0.5rem;
    font-size: 0.95rem;
  }

  .game-panel.card .feedback {
    height: auto !important;
    min-height: auto !important;
  }

  .game-shell--unlimited.card-container.game-shell,
  .card-container.game-shell.game-shell--unlimited,
  .game-shell--unlimited {
    width: min(100% - 16px, 460px);
    padding: 1rem 0 1.5rem;
  }

  .game-shell--unlimited .game-copy {
    text-align: left;
  }

  .game-shell--unlimited .game-copy h1 {
    font-size: clamp(2.35rem, 14vw, 3.45rem);
    line-height: 0.98;
  }

  .game-shell--unlimited .practice-filter-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-shell--unlimited .practice-filter {
    width: 100%;
    padding-inline: 0.55rem;
    font-size: 0.82rem;
  }

  .game-shell--unlimited .game-panel.card {
    border-radius: 14px;
    padding: 1rem 0.75rem 1rem;
  }

  .game-shell--unlimited .official-practice-header p {
    font-size: 0.68rem;
  }

  .game-shell--unlimited .official-practice-meta {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .game-shell--unlimited .official-practice-badge {
    padding-inline: 0.45rem;
  }

  .game-shell--unlimited .card-title,
  .game-shell--unlimited .game-panel.card .card-title {
    font-size: clamp(1.55rem, 9vw, 2rem);
  }

  .game-shell--unlimited .game-panel.card .symptom,
  .game-shell--unlimited .game-panel.card .symptom:not(.is-revealed) {
    min-height: 50px;
    padding: 0.58rem 0.65rem;
    font-size: 0.9rem;
  }

  .game-shell--unlimited .game-panel.card .guess-row {
    gap: 0.5rem;
  }

  .game-shell--unlimited .guess-input-wrap {
    flex-basis: 0;
  }

  .game-shell--unlimited .game-panel.card [data-guess-input],
  .game-shell--unlimited .game-panel.card .btn_color {
    min-height: 46px;
    font-size: 0.88rem;
  }

  .game-shell--unlimited .game-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .game-shell--unlimited .game-actions button {
    width: 100%;
    min-height: 44px;
  }

  .result-modal {
    padding: 0.5rem;
  }

  .result-modal__content {
    max-height: 96vh;
    padding: 2.5rem 0.75rem 1rem;
  }

  .result-modal__outcome,
  .result-modal__rank {
    min-height: 3.9rem;
    font-size: 1rem;
  }

  .result-modal__stats {
    padding: 0.8rem;
  }

  .result-modal__stats h2 {
    margin-bottom: 0.7rem;
    font-size: 1.2rem;
  }

  .result-modal__stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
  }

  .result-modal__stat {
    min-height: 4.7rem;
  }

  .result-modal__stat strong {
    font-size: 1.35rem;
  }

  .result-modal__stat span {
    margin-top: 0.45rem;
    font-size: 0.7rem;
  }

  .result-modal__distribution {
    margin-top: 0.75rem;
    padding: 0.7rem;
  }

  .result-modal__dist-row {
    margin: 0.3rem 0;
  }

  .result-modal__share {
    min-height: 2.85rem;
    margin-top: 0.8rem;
    font-size: 0.95rem;
  }

  .result-modal.is-archive-result .result-modal__content {
    padding: 3.5rem 1.2rem 2rem;
  }

  .result-modal.is-archive-result .result-modal__outcome,
  .result-modal.is-archive-result .result-modal__rank {
    min-height: 4.8rem;
    font-size: 1.05rem;
  }

  .game-panel.card .summary-inline {
    min-height: 440px;
  }

  .game-panel.card .summary-inline .summary-text {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .game-panel.card .summary-inline .anki-btn-row {
    grid-template-columns: 1fr;
  }
}

.is-hidden {
  display: none !important;
}

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

@media (max-width: 860px) {
  .site-header,
  .hero,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .archive-grid,
  .seo-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }


  .guess-row {
    grid-template-columns: 1fr;
  }

  .game-shell--featured {
    min-height: auto;
    padding-top: 18px;
  }

  .game-shell--featured .game-copy {
    margin-bottom: -48px;
  }

  .game-shell--featured .game-panel {
    min-height: auto;
    padding-top: 78px;
  }

  .game-shell--featured .clue-slot {
    min-height: 58px;
    padding: 13px 14px;
  }

  .game-shell--featured .guess-row {
    gap: 12px;
  }

  .game-shell--featured .guess-row .summary-toggle {
    min-width: 0;
  }

  .game-summary-view {
    min-height: 460px;
    padding-inline: 0;
  }

  .anki-row {
    grid-template-columns: 1fr;
  }

  .anki-help {
    justify-self: center;
  }

  .mini-stat {
    grid-template-columns: 1fr;
  }
}

