/**
 * Ophthordle — page background #ffb932 → #e80046; solid pink header; white game card.
 */

:root {
  --sunset-top: #ffb932;
  --sunset-bottom: #e80046;
  --sunset-deep: #b80038;
  --sunset-ink: #2c1418;
  --sunset-muted: #6b454c;

  --header-solid: #c9003a;
  --bg: #fff8f2;
  --bg-deep: #fff0e8;
  --surface: #ffffff;
  --clue-tint: #fff7f2;
  --clue-tint-mid: #ffefe6;
  --ink: var(--sunset-ink);
  --muted: var(--sunset-muted);
  --primary: #e80046;
  --primary-dark: #b80038;
  --accent: #ffb932;
  --accent-soft: #ffeed6;
  --border: #e4a89a;
  --outline: #c96b5e;
  --success-bg: #e8f5ec;
  --success-border: #2e8b57;
  --success-text: #14532d;
  --error-bg: #fce8ee;
  --error-border: #d63d5c;
  --error-text: #6b1528;
  --radius-lg: 14px;
  --radius-sm: 10px;
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 2px 16px rgba(232, 0, 70, 0.1);
  --shadow-hover: 0 6px 24px rgba(232, 0, 70, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: linear-gradient(180deg, var(--sunset-top) 0%, var(--sunset-bottom) 100%);
  background-color: var(--sunset-bottom);
  background-attachment: fixed;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Header --- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-solid);
  color: #fff;
  padding: 1rem 1.25rem;
  text-align: center;
  border-bottom: 2px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.app-header-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  padding: 0 5.25rem 0 1rem;
}

.brand {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.brand-sub {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.92;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin-top: 0.85rem;
}

.header-nav a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background 0.2s, transform 0.15s;
}

.header-nav a:hover {
  background: rgba(255, 255, 255, 0.18);
}

.header-nav a.is-external {
  background: rgba(255, 255, 255, 0.95);
  color: #8f0028;
  border-color: transparent;
}

.header-nav a.is-external:hover {
  background: #fff;
}

.stats-trigger {
  position: absolute;
  right: 0;
  top: 0.15rem;
  background: rgba(255, 255, 255, 0.95);
  color: #8f0028;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.stats-trigger:hover {
  box-shadow: var(--shadow-hover);
}

.stats-trigger:active {
  transform: scale(0.98);
}

/* --- Sponsor banner (IAB mobile banner + desktop leaderboard) --- */
.sponsor-banner {
  padding: 0.65rem 1rem 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.sponsor-banner-inner {
  max-width: 320px;
  margin: 0 auto;
}

.sponsor-banner-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  text-shadow: 0 1px 2px rgba(44, 20, 24, 0.35);
}

.sponsor-banner-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 10px rgba(44, 20, 24, 0.12);
  text-align: center;
  box-sizing: border-box;
}

.sponsor-banner-link {
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s;
}

.sponsor-banner-link:hover {
  box-shadow:
    0 12px 36px rgba(232, 0, 70, 0.2),
    0 6px 18px rgba(44, 20, 24, 0.22);
  transform: translateY(-2px);
}

.sponsor-banner-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.sponsor-banner-link:active {
  transform: scale(0.995);
}

.sponsor-banner-img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 320 / 100;
  border-radius: 6px;
  vertical-align: middle;
}

@media (min-width: 768px) {
  .sponsor-banner-slot {
    padding: 0.25rem;
  }
}

/* --- Main --- */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

.game-shell {
  width: 100%;
  max-width: 720px;
}

.archive-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0 0.15rem;
}

.archive-nav[hidden] {
  display: none !important;
}

.archive-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  color: var(--primary-dark);
  background: var(--surface);
  border: 2px solid var(--outline);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.archive-nav-btn:hover:not(.is-disabled) {
  background: var(--accent-soft);
  border-color: var(--primary);
}

.archive-nav-btn:active:not(.is-disabled) {
  transform: scale(0.98);
}

.archive-nav-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.clinical-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 4px 24px rgba(44, 20, 24, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 1.75rem 1.5rem 2rem;
}

.case-heading {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: left;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(201, 107, 94, 0.35);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--clue-tint) 0%, var(--clue-tint-mid) 100%);
}

.clue-block {
  margin-bottom: 1.25rem;
}

.clue-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
}

.clue {
  margin: 0;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, var(--clue-tint) 0%, var(--clue-tint-mid) 100%);
  border: 1px solid rgba(201, 107, 94, 0.3);
  border-radius: var(--radius-sm);
  min-height: 2.75rem;
  color: var(--ink);
}

.clue.is-empty {
  min-height: 2.75rem;
  background: rgba(255, 248, 244, 0.85);
  border: 1px dashed rgba(201, 107, 94, 0.45);
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
}

.clue.reveal-pop {
  animation: clueIn 0.45s ease-out;
}

@keyframes clueIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Feedback & result */
.feedback-row {
  margin: 1rem 0 0.5rem;
  min-height: 3rem;
}

.result-text {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: background 0.3s, color 0.3s;
}

.result-text.is-correct {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.result-text.is-wrong {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.result-text.is-neutral {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
}

.result-text.pop {
  animation: popIn 0.4s ease;
}

@keyframes popIn {
  0% {
    transform: scale(0.92);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Guess history */
.history {
  margin-top: 0.75rem;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

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

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

.history-item.skip {
  background: #f0f4f7;
  color: var(--muted);
  border: 1px solid #cfdce6;
}

/* Input row */
.entry {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  position: relative;
}

#guess {
  flex: 1;
  min-width: 160px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--outline);
  font-family: inherit;
  background: #fffaf7;
}

#guess:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 185, 50, 0.45);
}

#guess:disabled {
  background: #eef3f6;
  color: var(--muted);
  cursor: not-allowed;
}

.btn-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.35rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
}

.btn-submit:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.suggest-panel {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 2px;
  background: var(--surface);
  border: 2px solid var(--outline);
  border-radius: var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: var(--shadow-hover);
}

.suggest-panel.is-open {
  display: block;
}

.suggest-row {
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  text-align: left;
  border-bottom: 1px solid var(--bg-deep);
}

.suggest-row:last-child {
  border-bottom: none;
}

.suggest-row:hover {
  background: var(--accent-soft);
}

.suggest-row.is-disabled {
  color: #94a8b5;
  cursor: not-allowed;
}

.suggest-row.is-disabled:hover {
  background: transparent;
}

.disclaimer {
  text-align: center;
  font-size: 0.8rem;
  color: #fff;
  margin: 2rem 1rem 1rem;
  font-style: italic;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.4);
  text-shadow: 0 1px 2px rgba(44, 20, 24, 0.35);
}

.site-footer {
  text-align: center;
  padding: 1rem 1rem 1.25rem;
  background: linear-gradient(180deg, #c9003a 0%, #7a0025 100%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  margin-top: auto;
  line-height: 1.5;
  border-top: 2px solid rgba(255, 185, 50, 0.35);
}

.site-footer .footer-tagline {
  opacity: 0.85;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.site-footer .footer-legal {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 20, 24, 0.52);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(3px);
}

.modal.is-open {
  display: flex;
}

.modal-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 2px solid var(--outline);
  box-shadow: 0 16px 48px rgba(232, 0, 70, 0.28);
  animation: sheetUp 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes sheetUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.modal-close:hover {
  color: var(--ink);
}

.modal-body {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.modal-promo {
  text-align: center;
  padding: 0.85rem 0.75rem 1.1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--accent-soft) 0%, #ffe8dc 100%);
  border: 2px solid var(--outline);
}

.modal-promo-text {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.modal-promo-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.modal-promo-btn {
  display: inline-block;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff !important;
  border: 2px solid var(--primary-dark);
  box-shadow: 0 2px 8px rgba(232, 0, 70, 0.35);
  transition: filter 0.15s, transform 0.1s;
}

.modal-promo-btn:hover {
  filter: brightness(1.08);
}

.modal-promo-btn--alt {
  background: #c26a00;
  border-color: #8f4a00;
}

.modal-instagram {
  text-align: center;
  margin: 1rem 0;
  padding: 1rem 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, #fdf6ff 0%, #ffe8f4 45%, #fff5f0 100%);
  border: 2px solid rgba(201, 0, 58, 0.2);
}

.modal-instagram-lead {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.modal-instagram-hint {
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  color: var(--sunset-muted);
  line-height: 1.4;
}

.modal-instagram-btn {
  display: inline-block;
  padding: 0.5rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  color: #fff !important;
  border: 2px solid rgba(120, 0, 48, 0.35);
  box-shadow: 0 3px 12px rgba(131, 58, 180, 0.35);
  transition: filter 0.15s, transform 0.12s;
}

.modal-instagram-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* Buttondown embed — modal, footer, archive */
.modal-subscribe {
  text-align: center;
  margin: 1rem 0;
  padding: 0.85rem 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 229, 216, 0.55) 0%, rgba(255, 255, 255, 0.7) 100%);
  border: 2px dashed var(--outline);
}

.modal-subscribe-lead {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sunset-muted);
}

.bd-subscribe-form {
  margin: 0;
  text-align: left;
}

.bd-subscribe-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.bd-subscribe-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.bd-subscribe-form input[type="email"] {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 2px solid var(--outline);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  box-sizing: border-box;
}

.bd-subscribe-form input[type="submit"] {
  flex: 0 0 auto;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 2px solid var(--primary-dark);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232, 0, 70, 0.28);
}

.bd-subscribe-form input[type="submit"]:hover {
  filter: brightness(1.06);
}

.bd-subscribe-powered {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  text-align: center;
}

.bd-subscribe-powered a {
  color: var(--muted);
}

.bd-subscribe-form--footer label {
  color: rgba(255, 255, 255, 0.88);
}

.bd-subscribe-form--footer input[type="email"] {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.95);
}

.bd-subscribe-form--footer input[type="submit"] {
  border-color: rgba(255, 185, 50, 0.85);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.bd-subscribe-form--footer .bd-subscribe-powered a {
  color: rgba(255, 255, 255, 0.75);
}

.footer-subscribe {
  max-width: 420px;
  margin: 0 auto 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.footer-subscribe-lead {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.archive-subscribe {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem 1.1rem;
  text-align: left;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid var(--outline);
  box-shadow: 0 4px 18px rgba(44, 20, 24, 0.08);
}

.archive-subscribe-lead {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
}

.bd-subscribe-form--archive .bd-subscribe-powered a {
  color: var(--sunset-muted);
}

.modal-result {
  text-align: center;
  padding: 0.35rem 0;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.modal-copied {
  display: none;
  font-size: 0.9rem;
  color: var(--primary-dark);
}

.modal-copied.is-visible {
  display: block;
}

/* Stats in modal */
.stats-block {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.stats-block h3 {
  margin: 0 0 1rem;
  color: var(--primary-dark);
  font-size: 1.05rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.stat-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  text-align: center;
}

.stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.stat-lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 0.25rem;
}

.dist-chart {
  margin-top: 1rem;
}

.dist-chart h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--primary-dark);
  text-align: center;
}

.dist-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}

.dist-num {
  width: 1.5rem;
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--primary-dark);
}

.dist-num.is-hi {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dist-bar-wrap {
  flex: 1;
  height: 22px;
  background: var(--bg-deep);
  border-radius: 6px;
  overflow: hidden;
}

.dist-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sunset-bottom), var(--sunset-top));
  border-radius: 6px;
  transition: width 0.6s ease;
  min-width: 0;
}

.dist-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  width: 2rem;
  text-align: right;
}

/* Cookie bar */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #e80046 0%, #a80032 100%);
  color: #fff;
  padding: 1rem 1.25rem;
  z-index: 9999;
  transform: translateY(110%);
  transition: transform 0.35s ease;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.15);
}

.cookie-bar.is-visible {
  transform: translateY(0);
}

.cookie-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.cookie-inner p {
  margin: 0;
  flex: 1;
  min-width: 220px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cookie-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cookie-btns button {
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

#cookie-accept {
  background: #fff;
  color: #8f0028;
}

#cookie-decline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5) !important;
}

.overlay-block {
  position: fixed;
  inset: 0;
  background: rgba(44, 20, 24, 0.92);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.overlay-block[hidden] {
  display: none !important;
}

.overlay-card {
  background: var(--surface);
  max-width: 400px;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
}

/* First Eye promo cards (not third-party ads) */
.fe-promos {
  margin-top: 2.25rem;
  padding: 1.25rem 1rem 1.35rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(44, 20, 24, 0.08);
}

.fe-promos-heading {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 3px rgba(44, 20, 24, 0.45);
}

.fe-promos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.fe-promo-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.2rem 1.25rem 1.15rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  border: 2px solid var(--outline);
  background: linear-gradient(165deg, #ffffff 0%, var(--accent-soft) 50%, #ffe8dc 100%);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}

.fe-promo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 45%, rgba(255, 185, 50, 0.14) 100%);
  pointer-events: none;
}

.fe-promo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.fe-promo-card:focus-visible {
  outline: 2px solid var(--sunset-bottom);
  outline-offset: 2px;
}

.fe-promo-card--amsler {
  border: 2px solid #b84a00;
}

.fe-promo-card--drops {
  border: 2px solid #b84a00;
}

.fe-promo-card--hub {
  border: 2px solid var(--sunset-bottom);
}

.fe-promo-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.fe-promo-title {
  margin: 0.4rem 0 0.35rem;
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.fe-promo-desc {
  margin: 0 0 0.9rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  flex: 1;
  position: relative;
  z-index: 1;
}

.fe-promo-cta {
  font-size: 0.84rem;
  font-weight: 800;
  color: #b84a00;
  position: relative;
  z-index: 1;
}

.fe-promo-card--drops .fe-promo-cta {
  color: #a05600;
}

.fe-promo-card--hub .fe-promo-cta {
  color: var(--sunset-bottom);
}

/* Archive index */
.archive-hero {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.archive-hero h1 {
  margin: 0 0 0.5rem;
  color: var(--primary-dark);
  font-size: 1.75rem;
}

.archive-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.archive-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 1rem;
  background: var(--surface);
  border: 2px solid var(--outline);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.archive-tile:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.archive-tile span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  display: block;
  margin-top: 0.25rem;
}

.archive-tile-wrap {
  text-align: center;
  line-height: 1.2;
}

@media (max-width: 560px) {
  .app-header-inner {
    padding: 0 0.25rem;
  }

  .stats-trigger {
    position: static;
    transform: none;
    margin-top: 0.75rem;
  }

  .clinical-card {
    padding: 1.35rem 1rem 1.5rem;
  }

  .entry {
    flex-direction: column;
  }

  #guess,
  .btn-submit {
    width: 100%;
  }
}
