:root {
  color-scheme: dark;
  --bg: #091019;
  --bg-top: #111927;
  --panel: #151d28;
  --panel-soft: #101722;
  --panel-elevated: #1a2230;
  --panel-border: #334255;
  --panel-border-strong: rgba(214, 190, 146, 0.2);
  --text: #f6f2e9;
  --text-soft: #e8ecf2;
  --muted: #99a6b8;
  --muted-soft: #7f8b9b;
  --accent: #ddc48d;
  --accent-strong: #fff6df;
  --mode-tint: rgba(184, 149, 92, 0.12);
  --danger: #f28b82;
  --success: #8fbf9d;
  --radius-card: 24px;
  --radius-panel: 20px;
  --radius-soft: 16px;
  --space-section: 22px;
  --space-panel: 20px;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 18px 36px rgba(0, 0, 0, 0.24);
  --mobile-keyboard-offset: 0px;
}

body[data-mythology="daily"] {
  --mode-tint: rgba(186, 149, 88, 0.12);
}

body[data-mythology="greek"] {
  --mode-tint: rgba(176, 142, 88, 0.1);
}

body[data-mythology="detective"] {
  --mode-tint: rgba(101, 124, 160, 0.11);
  --detective-no-match: #a87343;
  --detective-no-match-deep: #663c23;
  --detective-no-match-strong: #efd8bf;
}

body[data-mythology="connections"] {
  --mode-tint: rgba(170, 133, 88, 0.1);
}

body[data-mythology="oddoneout"] {
  --mode-tint: rgba(136, 92, 61, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, var(--mode-tint), transparent 34%),
    radial-gradient(circle at 15% 15%, rgba(221, 196, 141, 0.04), transparent 26%),
    radial-gradient(circle at 85% 0%, rgba(127, 153, 201, 0.07), transparent 30%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: none;
  opacity: 0;
}

body[data-mythology="greek"]::before {
  background:
    linear-gradient(180deg, rgba(8, 10, 14, 0.74), rgba(8, 10, 14, 0.9)),
    radial-gradient(circle at 50% 36%, rgba(26, 25, 19, 0.06), rgba(12, 14, 20, 0.5) 56%, rgba(6, 8, 12, 0.8) 100%),
    url("/images/greek_bck.png") center 20% / cover no-repeat;
  opacity: 0.22;
  filter: blur(2px) saturate(0.32) brightness(0.4) contrast(0.9) sepia(0.16);
  transform: scale(1.03);
}

body > * {
  position: relative;
  z-index: 1;
}

.bootstrap-error-panel {
  width: min(100%, 1040px);
  margin: 40px auto 0;
  padding: 0 20px;
}

.bootstrap-error-card {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(221, 196, 141, 0.2);
  background:
    radial-gradient(circle at top left, rgba(221, 196, 141, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(24, 31, 43, 0.96), rgba(12, 18, 28, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.bootstrap-error-card h1,
.bootstrap-error-card p {
  margin-top: 0;
}

.bootstrap-error-card h1 {
  margin-bottom: 10px;
}

.bootstrap-error-card p:last-child {
  margin-bottom: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

body.has-cookie-banner {
  padding-bottom: 172px;
}

body.has-victory-modal {
  overflow: hidden;
}

.site-shell {
  width: min(100%, 1040px);
  margin: 0 auto;
  min-width: 0;
}

.site-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 1600px;
  margin: 0 auto;
  align-items: start;
}

.site-main-content {
  min-width: 0;
}

.ad-sidebar[hidden] {
  display: none;
}

.ad-sidebar {
  min-height: 600px;
}

.ad-sidebar-inner {
  position: sticky;
  top: 120px;
}

.ad-slot {
  width: 300px;
  min-height: 600px;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.ad-slot.is-empty {
  display: none;
}

.ad-preview-card {
  width: 100%;
  min-height: 600px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(22, 25, 34, 0.94);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: hidden;
}

.ad-preview-card::before {
  content: "";
  display: block;
  min-height: 250px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
}

.ad-preview-card-bronze {
  background:
    radial-gradient(circle at top, rgba(189, 134, 75, 0.2), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(28, 23, 19, 0.96);
}

.ad-preview-card-bronze::before {
  background:
    radial-gradient(circle at 30% 18%, rgba(251, 222, 168, 0.2), transparent 22%),
    linear-gradient(180deg, rgba(160, 112, 60, 0.72), rgba(71, 44, 21, 0.92));
}

.ad-preview-card-parchment {
  background:
    radial-gradient(circle at top, rgba(201, 170, 119, 0.17), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(35, 31, 24, 0.96);
}

.ad-preview-card-parchment::before {
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 247, 223, 0.22), transparent 24%),
    linear-gradient(180deg, rgba(182, 154, 112, 0.86), rgba(107, 82, 49, 0.94));
}

.ad-preview-card-obsidian {
  background:
    radial-gradient(circle at top, rgba(87, 115, 143, 0.2), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(18, 22, 31, 0.97);
}

.ad-preview-card-obsidian::before {
  background:
    radial-gradient(circle at 42% 30%, rgba(213, 230, 255, 0.16), transparent 20%),
    linear-gradient(180deg, rgba(63, 78, 99, 0.86), rgba(18, 25, 37, 0.96));
}

.ad-preview-card-emerald {
  background:
    radial-gradient(circle at top, rgba(71, 143, 111, 0.2), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(15, 27, 25, 0.97);
}

.ad-preview-card-emerald::before {
  background:
    radial-gradient(circle at 36% 24%, rgba(217, 255, 242, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(50, 107, 87, 0.88), rgba(17, 45, 39, 0.96));
}

.ad-preview-sponsor,
.ad-preview-brand,
.ad-preview-body,
.ad-preview-cta {
  margin: 0;
  font-family: Arial, sans-serif;
}

.ad-preview-sponsor {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ad-preview-brand {
  color: #f3e7cf;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-preview-title {
  margin: 0;
  color: #f8f2e6;
  font-family: Arial, sans-serif;
  font-size: 1.7rem;
  line-height: 1.05;
}

.ad-preview-body {
  color: color-mix(in srgb, var(--muted) 88%, white 12%);
  font-size: 0.98rem;
  line-height: 1.6;
}

.cookie-consent-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 40;
  width: min(calc(100% - 24px), 1040px);
  border: 1px solid rgba(221, 196, 141, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, rgba(24, 31, 43, 0.98), rgba(12, 18, 28, 0.98));
  box-shadow:
    0 24px 55px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
}

.cookie-consent-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
}

.cookie-consent-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.cookie-consent-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cookie-consent-text {
  margin: 0;
  color: color-mix(in srgb, var(--text-soft) 92%, white 8%);
  font-size: 0.95rem;
  line-height: 1.55;
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-consent-link {
  color: var(--accent-strong);
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(221, 196, 141, 0.45);
  transition: color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.cookie-consent-link:hover,
.cookie-consent-link:focus-visible {
  color: white;
  border-color: rgba(255, 255, 255, 0.55);
}

.cookie-consent-button {
  white-space: nowrap;
}

.ad-preview-cta {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #f3e7cf;
  font-size: 0.84rem;
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(9, 12, 18, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px 22px;
  flex-wrap: wrap;
  padding: 16px 26px 14px;
}

.brand-block {
  display: grid;
  gap: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.site-title {
  color: var(--text);
  text-decoration: none;
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.02em;
}

.myth-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-nav-toggle {
  display: none;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(28, 36, 49, 0.84), rgba(18, 24, 35, 0.82));
  color: color-mix(in srgb, var(--text-soft) 22%, var(--muted) 78%);
  border: 1px solid rgba(116, 132, 155, 0.18);
  padding: 10px 16px;
  border-radius: 999px;
  min-height: 42px;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.nav-button.is-active {
  background:
    radial-gradient(circle at top, rgba(221, 196, 141, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(45, 54, 69, 0.96), rgba(24, 31, 42, 0.96));
  color: #f7f2e7;
  border-color: color-mix(in srgb, var(--accent) 38%, rgba(116, 132, 155, 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(220, 200, 155, 0.05),
    0 10px 24px rgba(0, 0, 0, 0.16);
}

.nav-tool-button {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(116, 132, 155, 0.16);
  background: linear-gradient(180deg, rgba(20, 27, 38, 0.9), rgba(14, 20, 30, 0.88));
  color: color-mix(in srgb, var(--text-soft) 34%, var(--muted) 66%);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 20px rgba(0, 0, 0, 0.14);
}

.nav-tool-button:hover:not(:disabled),
.nav-tool-button:focus-visible {
  border-color: rgba(221, 196, 141, 0.26);
  color: var(--text);
}

.nav-tool-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.page {
  position: relative;
  padding: 28px 24px 56px;
}

.page.is-info-page {
  padding-bottom: 34px;
}

.page > .site-layout {
  position: relative;
  z-index: 1;
}

body[data-mythology="greek"] .page::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 28px;
  width: min(1040px, calc(100% - 48px));
  height: min(760px, 100%);
  transform: translateX(-50%);
  border-radius: 36px;
  background:
    radial-gradient(circle at 50% 18%, rgba(182, 149, 92, 0.12), rgba(182, 149, 92, 0.04) 28%, transparent 62%);
  filter: blur(36px);
  opacity: 0.56;
  pointer-events: none;
  z-index: 0;
}

.hero {
  margin-bottom: 18px;
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(8, 12, 18, 0.58);
  backdrop-filter: blur(10px);
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  flex-wrap: wrap;
  padding: 18px 26px 24px;
}

.footer-copy {
  margin: 0;
  color: color-mix(in srgb, var(--muted) 82%, white 18%);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.footer-link {
  color: color-mix(in srgb, var(--text-soft) 26%, var(--muted) 74%);
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: color-mix(in srgb, var(--accent) 62%, #f5ebd5 38%);
}

.info-page-main {
  display: grid;
  gap: 24px;
}

.info-page-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 30px 32px;
}

.info-page-header {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.info-page-header h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.35rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--accent-strong);
}

.info-page-meta {
  margin: 0;
  color: color-mix(in srgb, var(--muted) 82%, white 18%);
  font-size: 0.96rem;
  line-height: 1.7;
}

.info-page-intro {
  margin: 0;
  max-width: 64ch;
  color: color-mix(in srgb, var(--text-soft) 86%, var(--muted) 14%);
  font-size: 1rem;
  line-height: 1.8;
}

.info-page-content {
  display: grid;
  gap: 24px;
}

.info-section {
  display: grid;
  gap: 10px;
}

.info-section h2 {
  margin: 0;
  color: color-mix(in srgb, var(--text-soft) 92%, white 8%);
  font-family: Arial, sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-section p {
  margin: 0;
  color: color-mix(in srgb, var(--text-soft) 84%, var(--muted) 16%);
  font-size: 1rem;
  line-height: 1.82;
}

.info-list {
  margin: 0;
  padding-left: 1.2rem;
  color: color-mix(in srgb, var(--text-soft) 84%, var(--muted) 16%);
  display: grid;
  gap: 8px;
}

.info-link {
  color: color-mix(in srgb, var(--accent) 64%, #f6e9c9 36%);
  text-decoration: none;
  border-bottom: 1px solid rgba(221, 196, 141, 0.28);
}

.info-link:hover,
.info-link:focus-visible {
  color: var(--accent-strong);
  border-bottom-color: rgba(255, 246, 223, 0.46);
}

.hero h1,
.game-header h2,
.panel h3,
.status-pill,
button,
input,
.site-title,
.nav-button {
  font-family: Arial, sans-serif;
}

.hero h1 {
  margin: 6px 0 6px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  max-width: 8ch;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero .subtitle {
  max-width: 24ch;
}

.game-card {
  width: 100%;
  min-width: 0;
  background:
    radial-gradient(circle at top, rgba(221, 196, 141, 0.06), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 20%),
    rgba(16, 21, 31, 0.94);
  border: 1px solid rgba(92, 108, 130, 0.26);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 32px;
}

body[data-mythology="greek"] .game-card {
  background:
    radial-gradient(circle at top, rgba(182, 149, 92, 0.06), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%),
    rgba(22, 27, 38, 0.94);
  border-color: rgba(184, 149, 92, 0.18);
  box-shadow:
    0 28px 72px rgba(0, 0, 0, 0.44),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.game-card.is-classic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
}

.game-card.is-classic-layout > * {
  margin-top: 0;
}

.game-card.is-classic-layout .game-header,
.game-card.is-classic-layout .status-row,
.game-card.is-classic-layout #guess-panel,
.game-card.is-classic-layout .result-panel {
  grid-column: 1 / -1;
}

.game-card.is-classic-layout #classic-hint-panel {
  grid-column: 1 / -1;
  justify-self: start;
  width: min(100%, 540px);
}

.game-card.is-classic-layout #classic-history-panel,
.game-card.is-classic-layout #classic-clues-panel {
  height: 100%;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 4px;
}

.game-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.game-header-side {
  display: grid;
  justify-items: stretch;
  gap: 10px;
  flex: 0 0 auto;
  max-width: 388px;
  min-width: 300px;
  align-content: start;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    radial-gradient(circle at top left, rgba(221, 196, 141, 0.07), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.008)),
    rgba(10, 15, 24, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.game-header h2 {
  margin: 8px 0 10px;
  font-size: clamp(2.05rem, 3vw, 2.8rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--accent-strong);
}

.eyebrow {
  margin: 0;
  color: color-mix(in srgb, #eef2f9 14%, var(--muted) 86%);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
}

.section-kicker {
  margin: 0;
  color: color-mix(in srgb, var(--accent) 62%, #f4ead1 38%);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
  font-weight: 700;
}

.subtitle,
.hint-text {
  margin: 0;
  color: color-mix(in srgb, var(--muted) 82%, white 18%);
  line-height: 1.65;
}

.subtitle {
  max-width: 62ch;
  font-size: 1rem;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 24px 0;
}

.game-header .status-row {
  margin: 0;
  justify-content: flex-start;
  align-self: start;
  align-items: center;
  gap: 8px 10px;
  transform: none;
}

.status-pill {
  margin: 0;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(126, 142, 165, 0.14);
  color: color-mix(in srgb, #f1ecde 72%, var(--muted) 28%);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.1;
  box-shadow: none;
}

.game-header .status-pill {
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 999px;
  padding: 7px 10px;
  color: color-mix(in srgb, #edf2fb 36%, var(--muted) 64%);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.attempts-flame-meter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
    rgba(255, 255, 255, 0.018);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 18px rgba(0, 0, 0, 0.12);
}

.attempt-flame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 24px;
  transform-origin: center bottom;
}

.attempt-flame-glyph {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 20px;
  font-size: 0;
  line-height: 0;
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    filter 220ms ease,
    text-shadow 220ms ease;
}

.attempt-flame-glyph::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 48% 22%, rgba(255, 250, 238, 0.96) 0 12%, transparent 13%),
    linear-gradient(180deg, #fff3d6 0%, #ffd26d 26%, #ee9135 58%, #743413 100%);
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 80'%3E%3Cpath fill='black' d='M32 3C25 14 20 21 22 33C15 28 8 34 8 45C8 61 19 74 32 74C45 74 56 61 56 45C56 33 48 24 41 17C40 24 35 30 29 34C29 24 28 15 32 3Z'/%3E%3C/svg%3E")
      center / contain no-repeat;
  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 80'%3E%3Cpath fill='black' d='M32 3C25 14 20 21 22 33C15 28 8 34 8 45C8 61 19 74 32 74C45 74 56 61 56 45C56 33 48 24 41 17C40 24 35 30 29 34C29 24 28 15 32 3Z'/%3E%3C/svg%3E")
      center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(237, 152, 62, 0.18));
}

.attempt-flame-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 10px;
  height: 7px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 210, 123, 0.74), rgba(255, 210, 123, 0) 72%);
  opacity: 0.92;
  pointer-events: none;
}

.attempt-flame.is-active .attempt-flame-glyph {
  opacity: 1;
  filter: saturate(1.06) brightness(1.04);
  text-shadow:
    0 0 12px rgba(232, 180, 93, 0.24),
    0 0 24px rgba(194, 120, 42, 0.12);
  animation: flameFlicker 3.2s ease-in-out infinite;
  animation-delay: var(--flame-delay, 0ms);
}

.attempt-flame.is-used .attempt-flame-glyph {
  opacity: 0.28;
  filter: grayscale(1) saturate(0.08) brightness(0.46);
  text-shadow: none;
  transform: scale(0.92);
}

.attempt-flame.is-critical .attempt-flame-glyph {
  text-shadow:
    0 0 12px rgba(244, 192, 102, 0.44),
    0 0 24px rgba(211, 128, 48, 0.26);
  animation:
    flameFlicker 2.7s ease-in-out infinite,
    lastFlamePulse 1.35s ease-in-out infinite;
}

.attempt-flame.is-losing .attempt-flame-glyph {
  animation: flameExtinguish 260ms ease-out forwards;
}

.game-header .status-pill + .status-pill {
  margin-left: 0;
}

.panel {
  background:
    radial-gradient(circle at top left, rgba(221, 196, 141, 0.05), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--panel);
  border: 1px solid rgba(92, 108, 130, 0.22);
  border-radius: var(--radius-panel);
  padding: 22px;
  margin-top: 18px;
  min-width: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    var(--shadow-soft);
}

#guess-panel {
  position: relative;
  padding: 18px;
}

.header-hint-panel {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  background: transparent;
}

.header-hint-toolbar {
  display: grid;
  justify-items: start;
  gap: 6px;
}

.difficulty-meta {
  margin: 0;
  color: color-mix(in srgb, #edf2fb 30%, var(--muted) 70%);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
}

.classic-hint-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  justify-items: stretch;
  gap: 6px;
  margin-top: 0;
}

.classic-hint-list li {
  display: grid;
  justify-items: start;
  align-items: start;
  gap: 7px;
  width: 100%;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.014);
  color: var(--text);
  text-align: left;
}

.classic-hint-item-mythology {
  gap: 7px;
}

.classic-hint-list li + li {
  margin-top: 0;
}

.classic-hint-label {
  display: inline-block;
  margin-bottom: 0;
  color: color-mix(in srgb, var(--accent) 52%, #efe3ca 48%);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

.classic-hint-value {
  display: block;
  max-width: none;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #edf2fb;
}

.classic-hint-item-mythology .classic-hint-label {
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--accent) 58%, #f4e6c8 42%);
}

.classic-hint-item-mythology .classic-hint-value {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.15;
  color: #f5f0e4;
  letter-spacing: 0.01em;
}

.classic-hint-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.classic-hint-actions {
  margin-top: 0;
}

#classic-hint-panel .secondary-button {
  min-height: 0;
  padding: 7px 10px;
  font-size: 0.82rem;
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

.vault-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.vault-header h3 {
  margin-bottom: 6px;
}

.vault-day-list {
  list-style: none;
  padding-left: 0;
}

.vault-day-entry {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.02);
}

.vault-day-entry + .vault-day-entry {
  margin-top: 12px;
}

.vault-day-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(14, 19, 29, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.vault-day-toggle:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(17, 23, 34, 0.76);
}

.vault-day-entry.is-expanded .vault-day-toggle {
  border-color: color-mix(in srgb, var(--accent) 26%, rgba(255, 255, 255, 0.09));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 10px 22px rgba(0, 0, 0, 0.14);
}

.vault-day-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.vault-day-meta {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--muted) 88%, white 12%);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vault-record-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 6px 2px 2px;
}

.vault-record-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.vault-record-button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.vault-record-label,
.vault-record-meta {
  display: block;
}

.vault-record-text {
  min-width: 0;
}

.vault-record-label {
  font-weight: 700;
}

.vault-record-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.vault-record-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 11px;
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vault-record-status.is-solved {
  background: rgba(78, 181, 108, 0.16);
  border: 1px solid rgba(145, 232, 172, 0.2);
  color: #e9fbee;
}

.vault-record-status.is-progress {
  background: rgba(205, 170, 102, 0.14);
  border: 1px solid rgba(205, 170, 102, 0.2);
  color: #f6e8ca;
}

.vault-record-status.is-idle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.vault-actions {
  margin-top: 14px;
}

body[data-mythology="greek"] .panel {
  background:
    radial-gradient(circle at top, rgba(184, 149, 92, 0.04), transparent 48%),
    rgba(24, 29, 40, 0.92);
  border-color: rgba(184, 149, 92, 0.14);
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 1.04rem;
  letter-spacing: 0.01em;
}

.stack-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.stack-list li + li {
  margin-top: 8px;
}

.clue-card-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 12px;
}

.clue-card-list li + li {
  margin-top: 0;
}

.clue-card {
  position: relative;
  padding: 18px 18px 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(118, 134, 157, 0.18);
  background:
    radial-gradient(circle at top right, rgba(255, 244, 216, 0.05), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 52%),
    linear-gradient(180deg, rgba(25, 31, 43, 0.98), rgba(18, 25, 36, 0.96));
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.clue-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 18px 0 0 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, white 12%), color-mix(in srgb, var(--accent) 54%, transparent));
}

.clue-card-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, rgba(126, 142, 165, 0.16));
  background: color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, 0.02));
  color: color-mix(in srgb, #edf2fb 26%, var(--muted) 74%);
  font-family: Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.clue-card-text {
  margin: 0;
  color: #f7f5ef;
  font-size: 1.06rem;
  line-height: 1.74;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.clue-card.reveal-in {
  animation: clueReveal 260ms ease-out;
}

.classic-guesses-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 10px;
}

.classic-guesses-list li + li {
  margin-top: 0;
}

.guess-history-item {
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.guess-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.comparison-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

body[data-mythology="detective"] .comparison-legend {
  gap: 8px;
  margin-bottom: 10px;
}

body[data-mythology="detective"] #detective-legend-panel .hint-text {
  font-size: 0.93rem;
  color: color-mix(in srgb, var(--muted) 90%, white 10%);
}

.connections-workspace {
  margin-top: 16px;
}

.connections-workspace > .panel {
  margin-top: 0;
}

.connections-panel-shell,
.oddoneout-panel {
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--accent) 10%, transparent), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(17, 20, 28, 0.96);
  border-color: color-mix(in srgb, var(--accent) 20%, rgba(255, 255, 255, 0.08));
}

.connections-panel-shell {
  display: grid;
  gap: 18px;
}

.connections-discovered[hidden] {
  display: none;
}

.connections-discovered,
.connections-board-shell {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at top, rgba(221, 196, 141, 0.045), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 28%),
    rgba(13, 17, 26, 0.58);
  padding: 20px;
}

.mode-section-heading {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.mode-section-heading h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--text-soft);
}

.mode-info-copy {
  margin: 2px 0 0;
  max-width: 62ch;
  color: color-mix(in srgb, var(--muted) 78%, white 22%);
  line-height: 1.7;
}

.connections-groups {
  display: grid;
  gap: 12px;
}

.connections-group-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--bond-accent, var(--accent)) 32%, rgba(255, 255, 255, 0.12));
  padding: 18px 20px;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--bond-accent, var(--accent)) 18%, transparent), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--bond-accent, var(--accent)) 18%, rgba(74, 58, 34, 0.22)),
      rgba(28, 24, 20, 0.64)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 24px rgba(0, 0, 0, 0.22),
    0 0 0 1px color-mix(in srgb, var(--bond-shadow, rgba(0, 0, 0, 0.12)) 38%, transparent);
}

.connections-group-card.is-solved.is-revealing {
  animation: solvedRowReveal 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
}

.connections-group-eyebrow {
  margin: 0 0 8px;
  color: color-mix(in srgb, var(--accent-strong) 72%, white 28%);
  font-family: Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.connections-group-title {
  margin: 0 0 8px;
  color: #faf1df;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.connections-group-members-line {
  margin: 0;
  color: #f1e7d3;
  font-family: Arial, sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.55;
}

.connections-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}

.connections-grid.is-revealed-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: none;
  gap: 14px;
}

.oddoneout-card-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
  align-items: stretch;
  width: 100%;
}

.connections-card,
.oddoneout-card {
  position: relative;
  width: 100%;
  aspect-ratio: 2172 / 1362;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 17px;
  background: transparent;
  color: #f7efdf;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.oddoneout-card {
  display: block;
  background:
    linear-gradient(180deg, rgba(22, 29, 40, 0.92), rgba(16, 22, 31, 0.96));
}

.connections-card::before,
.oddoneout-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.connections-card::before {
  background:
    linear-gradient(180deg, rgba(9, 10, 15, 0.12), rgba(9, 10, 15, 0.18)),
    url("/images/card_not_selected.png") center / 100% 100% no-repeat;
}

.connections-card.is-selected::before {
  background:
    linear-gradient(180deg, rgba(9, 10, 15, 0.12), rgba(9, 10, 15, 0.18)),
    url("/images/card.png") center / 100% 100% no-repeat;
}

.oddoneout-card::before {
  background:
    linear-gradient(180deg, rgba(9, 10, 15, 0.12), rgba(9, 10, 15, 0.18)),
    url("/images/card_not_selected.png") center / 100% 100% no-repeat;
}

.oddoneout-card.is-selected::before {
  background:
    linear-gradient(180deg, rgba(9, 10, 15, 0.12), rgba(9, 10, 15, 0.18)),
    url("/images/card.png") center / 100% 100% no-repeat;
}

.connections-card::after,
.oddoneout-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(214, 191, 147, 0.08),
    inset 0 0 26px rgba(0, 0, 0, 0.16);
  z-index: 1;
  pointer-events: none;
}

.myth-card-label {
  position: absolute;
  inset: 24% 15%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: clamp(0.84rem, 1.15vw, 0.98rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 0.015em;
  color: #f8f1e3;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.78),
    0 0 1px rgba(0, 0, 0, 0.95);
}

.connections-card:not(.is-selected) .myth-card-label,
.oddoneout-card:not(.is-selected) .myth-card-label {
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #f2e6c9;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 8px rgba(0, 0, 0, 0.5);
}

.connections-card:not(.is-selected) .myth-card-label::before,
.oddoneout-card:not(.is-selected) .myth-card-label::before {
  content: "";
  position: absolute;
  inset: -24% -16%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.18) 40%,
    rgba(0, 0, 0, 0) 70%
  );
}

.connections-card.is-selected .myth-card-label::before,
.oddoneout-card.is-selected .myth-card-label::before {
  content: "";
  position: absolute;
  inset: -24% -16%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.25) 40%,
    rgba(0, 0, 0, 0) 75%
  );
}

.connections-card:hover,
.oddoneout-card:hover {
  background: transparent;
  transform: translateY(-2px);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.connections-card.is-selected,
.oddoneout-card.is-selected {
  background: transparent;
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 48%, rgba(255, 255, 255, 0.14)),
    0 0 26px color-mix(in srgb, var(--accent) 36%, transparent),
    0 18px 34px rgba(0, 0, 0, 0.34);
}

.connections-card.is-selected::after,
.oddoneout-card.is-selected::after {
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--accent) 52%, rgba(255, 255, 255, 0.16)),
    inset 0 0 40px color-mix(in srgb, var(--accent) 16%, transparent);
}

.connections-card:disabled,
.oddoneout-card:disabled {
  opacity: 1;
  cursor: default;
}

.connections-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  justify-content: center;
}

.connections-actions button {
  width: auto;
  min-width: 150px;
  border-radius: 14px;
  font-family: Arial, sans-serif;
  letter-spacing: 0.03em;
}

.mode-info-panel,
.oddoneout-panel {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.oddoneout-heading {
  margin-bottom: 10px;
}

.oddoneout-card.is-correct {
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(214, 182, 110, 0.46),
    0 0 28px rgba(214, 182, 110, 0.24),
    0 18px 34px rgba(0, 0, 0, 0.34);
}

.oddoneout-card.is-correct::after {
  box-shadow:
    inset 0 0 0 2px rgba(214, 182, 110, 0.46),
    inset 0 0 40px rgba(214, 182, 110, 0.12);
}

.oddoneout-card.is-incorrect {
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(242, 139, 130, 0.34),
    0 0 22px rgba(242, 139, 130, 0.18),
    0 18px 34px rgba(0, 0, 0, 0.34);
}

.oddoneout-card.is-incorrect::after {
  box-shadow:
    inset 0 0 0 2px rgba(242, 139, 130, 0.34),
    inset 0 0 36px rgba(242, 139, 130, 0.09);
}

.oddoneout-explanation {
  margin-top: 14px;
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, rgba(255, 255, 255, 0.08));
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 12%, transparent), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    rgba(14, 17, 24, 0.74);
  color: #f1ecde;
  line-height: 1.8;
  box-shadow: var(--shadow-soft);
}

.oddoneout-empty-state {
  width: 100%;
  margin: 0;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 13px;
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--panel-border);
}

.legend-pill.exact {
  background: rgba(149, 213, 162, 0.14);
  border-color: rgba(149, 213, 162, 0.35);
  color: #c7efd0;
}

.legend-pill.none {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

input {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 50px;
  padding: 15px 16px;
  border-radius: 15px;
  border: 1px solid rgba(111, 126, 147, 0.2);
  background:
    linear-gradient(180deg, rgba(12, 18, 28, 0.92), rgba(10, 15, 23, 0.98));
  color: var(--text);
  font-size: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 20px rgba(0, 0, 0, 0.1);
}

input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-color: color-mix(in srgb, var(--accent) 24%, rgba(111, 126, 147, 0.2));
}

button {
  border: 0;
  border-radius: 14px;
  min-height: 50px;
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(38, 46, 61, 0.96), rgba(27, 34, 47, 0.96));
  color: var(--text);
  border: 1px solid rgba(108, 124, 146, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 22px rgba(0, 0, 0, 0.18);
  letter-spacing: 0.04em;
}

button:hover {
  background: linear-gradient(180deg, rgba(44, 53, 68, 0.98), rgba(31, 39, 53, 0.98));
}

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

.secondary-button {
  background: linear-gradient(180deg, rgba(24, 31, 42, 0.94), rgba(16, 22, 31, 0.94));
  color: var(--text-soft);
  border: 1px solid rgba(108, 124, 146, 0.16);
}

.secondary-button:hover {
  background: linear-gradient(180deg, rgba(30, 38, 50, 0.96), rgba(19, 25, 35, 0.96));
}

#guess-button,
#confirm-guess-button,
#connections-submit-button {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-strong) 88%, white 12%), var(--accent));
  color: #111722;
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(108, 124, 146, 0.2));
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.24),
    0 10px 22px rgba(0, 0, 0, 0.2);
}

#guess-button:hover,
#confirm-guess-button:hover,
#connections-submit-button:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-strong) 86%, white 14%), var(--accent-strong));
}

.result-panel {
  padding: 16px 18px;
}

.result-message {
  min-height: 0;
  line-height: 1.65;
  color: var(--text-soft);
}

#guess-panel .hint-text,
#connections-feedback {
  color: color-mix(in srgb, var(--muted) 84%, white 16%);
  font-size: 0.94rem;
}

#guess-panel .hint-text.is-inline-answer-reveal {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 12px 24px rgba(0, 0, 0, 0.12);
}

#guess-panel .hint-text.is-inline-answer-reveal.is-error {
  border: 1px solid rgba(242, 139, 130, 0.22);
  background:
    linear-gradient(180deg, rgba(242, 139, 130, 0.08), rgba(242, 139, 130, 0.04)),
    rgba(25, 16, 18, 0.86);
  color: #ffd0cb;
}

#guess-panel .hint-text.is-inline-answer-reveal.is-success {
  border: 1px solid rgba(111, 191, 150, 0.24);
  background:
    linear-gradient(180deg, rgba(111, 191, 150, 0.08), rgba(111, 191, 150, 0.035)),
    rgba(15, 24, 19, 0.84);
  color: #dcf6e4;
}

.connections-feedback {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
    rgba(13, 17, 25, 0.82);
  line-height: 1.55;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 28px rgba(0, 0, 0, 0.18);
}

.connections-feedback.is-neutral {
  color: color-mix(in srgb, var(--muted) 84%, white 16%);
}

.connections-feedback.is-success {
  border-color: rgba(111, 191, 150, 0.26);
  background:
    radial-gradient(circle at top left, rgba(111, 191, 150, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(111, 191, 150, 0.08), rgba(18, 33, 30, 0.08)),
    rgba(14, 22, 22, 0.88);
  color: #eafbf0;
}

.connections-feedback.is-error {
  border-color: rgba(200, 144, 92, 0.34);
  background:
    radial-gradient(circle at top left, rgba(168, 115, 67, 0.18), transparent 44%),
    linear-gradient(180deg, rgba(121, 73, 41, 0.14), rgba(56, 34, 24, 0.12)),
    rgba(26, 18, 16, 0.9);
  color: #f1ddca;
  animation: boardAlertPulse 220ms ease-out;
}

.guess-confirmation-text {
  margin: 0;
  line-height: 1.5;
}

.guess-confirmation-meta {
  margin: -4px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.guess-confirmation-status {
  margin: 0;
  line-height: 1.5;
}

.guess-confirmation-status.success {
  color: var(--success);
}

.guess-confirmation-status.error {
  color: var(--danger);
}

.guess-confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guess-confirmation-popover {
  position: absolute;
  z-index: 20;
  width: min(420px, calc(100% - 24px));
  pointer-events: auto;
  padding: 10px;
  border-radius: 28px;
  background: rgba(9, 11, 18, 0.2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.guess-confirmation-popover.is-success {
  width: min(460px, calc(100% - 20px));
  background: rgba(9, 25, 16, 0.24);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
}

.guess-confirmation-card {
  position: relative;
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--panel-border));
  background: linear-gradient(180deg, rgba(31, 34, 47, 0.88), rgba(23, 26, 37, 0.9));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.guess-confirmation-popover.is-success .guess-confirmation-card {
  overflow: hidden;
  gap: 16px;
  border-color: rgba(108, 211, 139, 0.34);
  background:
    radial-gradient(circle at top left, rgba(110, 234, 156, 0.18), transparent 42%),
    radial-gradient(circle at 85% 20%, rgba(166, 255, 196, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(23, 43, 30, 0.96), rgba(17, 29, 23, 0.94));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(110, 234, 156, 0.08),
    0 0 44px rgba(78, 181, 108, 0.16);
}

.guess-confirmation-popover.is-success .guess-confirmation-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 38%),
    radial-gradient(circle at 18% 18%, rgba(190, 255, 208, 0.14), transparent 18%),
    radial-gradient(circle at 82% 24%, rgba(143, 235, 170, 0.12), transparent 20%);
  pointer-events: none;
}

.guess-confirmation-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
}

.guess-confirmation-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.guess-confirmation-popover.is-success .guess-confirmation-close {
  border-color: rgba(122, 224, 152, 0.22);
  background: rgba(111, 214, 143, 0.08);
  color: #effff2;
}

.guess-confirmation-popover.is-success .guess-confirmation-close:hover {
  background: rgba(126, 236, 158, 0.16);
}

.guess-confirmation-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 18px;
  height: 18px;
  border-right: 1px solid color-mix(in srgb, var(--accent) 26%, var(--panel-border));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 26%, var(--panel-border));
  background: rgba(23, 26, 37, 0.9);
  transform: translateX(-50%) rotate(45deg);
}

.guess-confirmation-popover.is-success .guess-confirmation-card::after {
  border-right-color: rgba(108, 211, 139, 0.34);
  border-bottom-color: rgba(108, 211, 139, 0.34);
  background: rgba(20, 40, 27, 0.95);
}

.guess-confirmation-popover.is-below .guess-confirmation-card::after {
  top: -9px;
  bottom: auto;
  border-right: none;
  border-bottom: none;
  border-left: 1px solid color-mix(in srgb, var(--accent) 26%, var(--panel-border));
  border-top: 1px solid color-mix(in srgb, var(--accent) 26%, var(--panel-border));
}

.guess-confirmation-popover.is-below.is-success .guess-confirmation-card::after {
  border-left-color: rgba(108, 211, 139, 0.34);
  border-top-color: rgba(108, 211, 139, 0.34);
}

.guess-confirmation-card h3 {
  margin: 0;
}

.guess-confirmation-popover.is-success .guess-confirmation-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #effff2;
  letter-spacing: -0.02em;
}

.guess-confirmation-popover.is-success .guess-confirmation-card h3::before {
  content: "Solved";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(130, 231, 160, 0.26);
  background: rgba(116, 219, 146, 0.12);
  color: #8fe0a6;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.guess-confirmation-popover.is-success .guess-confirmation-text {
  color: #f1fff4;
  font-size: 1.08rem;
  line-height: 1.55;
}

.guess-confirmation-popover.is-success .guess-confirmation-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(119, 220, 149, 0.18);
  background: rgba(125, 227, 155, 0.08);
  color: #ccefd5;
}

.guess-confirmation-popover.is-success .guess-confirmation-actions {
  gap: 12px;
}

.guess-confirmation-popover.is-success #share-button {
  border-color: rgba(115, 223, 147, 0.22);
  background: linear-gradient(180deg, rgba(132, 243, 166, 0.94), rgba(87, 194, 119, 0.92));
  color: #112417;
  box-shadow: 0 12px 30px rgba(70, 176, 101, 0.26);
}

.guess-confirmation-popover.is-success #share-button:hover {
  background: linear-gradient(180deg, rgba(152, 247, 182, 0.98), rgba(98, 205, 131, 0.96));
  transform: translateY(-1px);
}

.guess-confirmation-popover.is-success #share-button:active {
  transform: translateY(0);
}

.guess-confirmation-popover.is-success .guess-confirmation-status.success {
  color: #aaf0bd;
}

body[data-mythology="detective"] .result-panel {
  display: grid;
  gap: 12px;
}

body[data-mythology="detective"] .result-message {
  min-height: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.02);
}

.result-message.info {
  color: var(--muted);
}

.result-message.success {
  color: var(--success);
}

body[data-mythology="detective"] .result-message.success {
  border-color: rgba(149, 213, 162, 0.28);
  background: rgba(149, 213, 162, 0.1);
  color: #dbf3e1;
}

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

body[data-mythology="detective"] .result-message.error {
  border-color: rgba(242, 139, 130, 0.2);
  background: rgba(242, 139, 130, 0.08);
}

.guesses-list:empty::before {
  content: "No guesses yet.";
  color: var(--muted);
}

.share-fallback {
  margin-top: 14px;
}

.share-fallback-text {
  width: 100%;
  min-height: 96px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: #10131c;
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.victory-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(145, 203, 159, 0.1), transparent 30%),
    rgba(7, 11, 18, 0.68);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.victory-modal-card {
  position: relative;
  width: min(100%, 560px);
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(126, 226, 156, 0.18);
  background:
    radial-gradient(circle at top left, rgba(110, 234, 156, 0.12), transparent 42%),
    radial-gradient(circle at 82% 20%, rgba(255, 222, 161, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(24, 39, 30, 0.96), rgba(16, 24, 20, 0.95));
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(118, 218, 147, 0.05),
    0 0 48px rgba(83, 176, 111, 0.14);
  overflow: hidden;
}

.victory-modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 36%),
    radial-gradient(circle at 20% 16%, rgba(190, 255, 208, 0.14), transparent 18%);
  pointer-events: none;
}

.victory-modal-kicker,
.victory-modal-title,
.victory-modal-subtitle,
.victory-modal-meta,
.victory-modal-status,
.victory-modal-share-preview,
.victory-modal-grid {
  position: relative;
  z-index: 1;
}

.victory-modal-kicker {
  margin: 0;
  color: #9ce0af;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.victory-modal-title {
  margin: 0;
  color: #effff2;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.victory-modal-subtitle {
  margin: 0;
  color: #f4fff6;
  font-size: 1.02rem;
  line-height: 1.55;
}

.victory-modal-meta {
  margin: 0;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(119, 220, 149, 0.18);
  background: rgba(125, 227, 155, 0.08);
  color: #ccefd5;
  font-size: 0.92rem;
}

.victory-modal-grid {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 13, 17, 0.3);
  color: #f4fff6;
  font: 700 1.2rem/1.4 "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  letter-spacing: 0.14em;
  text-align: center;
  white-space: pre-wrap;
}

.victory-modal-actions,
.victory-modal-social {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.victory-modal-button {
  width: 100%;
}

.victory-modal-status {
  margin: 0;
  min-height: 1.5em;
  color: #ccefd5;
}

.victory-modal-status.success {
  color: #aaf0bd;
}

.victory-modal-status.error {
  color: #f2c5bc;
}

.victory-modal-share-preview {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  color: var(--muted);
}

.victory-modal-share-preview summary {
  cursor: pointer;
  color: #f1fff4;
}

.victory-modal-share-preview pre {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(7, 13, 17, 0.34);
  color: #d9efe0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
}

.victory-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(122, 224, 152, 0.22);
  background: rgba(111, 214, 143, 0.08);
  color: #effff2;
  font-size: 1.45rem;
  line-height: 1;
}

.victory-modal-close:hover {
  background: rgba(126, 236, 158, 0.16);
}

.comparison-table-wrap {
  overflow: visible;
  padding-bottom: 0;
}

body[data-mythology="detective"] .comparison-table-wrap {
  padding-bottom: 0;
}

.comparison-board {
  min-width: 0;
  display: grid;
  gap: 12px;
  font-family: Arial, sans-serif;
}

.comparison-header,
.comparison-row {
  display: grid;
  grid-template-columns: minmax(136px, 1.12fr) repeat(8, minmax(72px, 0.88fr));
  gap: 8px;
  align-items: stretch;
}

.comparison-header {
  padding: 0 2px;
}

.comparison-header-label {
  color: color-mix(in srgb, var(--muted) 88%, #efe4c3 12%);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
}

.comparison-body {
  display: grid;
  gap: 12px;
}

.comparison-row {
  position: relative;
  padding: 12px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(14, 18, 26, 0.9);
  border: 1px solid rgba(216, 190, 125, 0.12);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.comparison-row::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(214, 182, 110, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 45%);
  pointer-events: none;
}

.comparison-row.is-solved {
  border-color: rgba(120, 190, 148, 0.3);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(109, 187, 143, 0.1),
    inset 0 1px 0 rgba(228, 255, 236, 0.06);
  animation: solvedRowReveal 280ms ease-out;
}

.comparison-row.is-solved::before {
  background:
    radial-gradient(circle at top left, rgba(111, 226, 144, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 45%);
}

.comparison-guess-cell,
.comparison-cell-slot {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.comparison-guess-tile,
.comparison-chip {
  min-height: 100%;
  padding: 12px 10px;
  border-radius: 16px;
}

.comparison-guess-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at top left, rgba(214, 182, 110, 0.1), transparent 38%),
    linear-gradient(180deg, rgba(26, 31, 43, 0.96), rgba(18, 22, 31, 0.96));
  border: 1px solid rgba(214, 182, 110, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(0, 0, 0, 0.22);
}

.guess-name {
  display: block;
  color: #f6efdd;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.2;
  text-align: center;
}

.comparison-row.is-solved .guess-name {
  color: #f3fff7;
  text-shadow: 0 0 16px rgba(126, 220, 159, 0.12);
}

.comparison-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(20, 24, 34, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 18px rgba(0, 0, 0, 0.18);
}

.comparison-chip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  opacity: 0.95;
}

.comparison-mobile-label {
  display: none;
}

body[data-mythology="detective"] .legend-pill.none {
  background:
    linear-gradient(180deg, rgba(168, 115, 67, 0.18), rgba(102, 60, 35, 0.12)),
    rgba(34, 24, 19, 0.82);
  border-color: rgba(200, 144, 92, 0.3);
  color: var(--detective-no-match-strong);
}

.comparison-chip.status-exact {
  background:
    radial-gradient(circle at top left, rgba(92, 168, 136, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(95, 173, 141, 0.16), rgba(45, 72, 60, 0.14)),
    rgba(18, 33, 30, 0.9);
  border-color: rgba(111, 191, 150, 0.24);
  color: #eefcf4;
  box-shadow:
    inset 0 0 0 1px rgba(111, 191, 150, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.18),
    0 0 18px rgba(87, 163, 127, 0.08);
}

.comparison-chip.status-exact::before {
  background: linear-gradient(180deg, rgba(138, 224, 178, 0.88), rgba(66, 133, 103, 0.8));
}

.comparison-chip.status-none {
  background:
    radial-gradient(circle at top left, rgba(168, 115, 67, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(121, 73, 41, 0.18), rgba(61, 37, 24, 0.16)),
    rgba(32, 22, 18, 0.92);
  border-color: rgba(200, 144, 92, 0.28);
  color: var(--detective-no-match-strong);
  box-shadow:
    inset 0 0 0 1px rgba(200, 144, 92, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.18),
    0 0 18px rgba(130, 78, 47, 0.08);
}

.comparison-chip.status-none::before {
  background: linear-gradient(180deg, rgba(226, 164, 103, 0.92), rgba(121, 73, 41, 0.82));
}

.comparison-chip.is-solved::before {
  background: linear-gradient(180deg, rgba(162, 245, 195, 0.95), rgba(82, 160, 121, 0.88));
}

.comparison-value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 5px;
  min-width: 0;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.comparison-value-text {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: none;
}

.comparison-value-hint {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.76em;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body[data-mythology="detective"] .comparison-chip.status-exact .comparison-value-hint {
  background: rgba(111, 226, 144, 0.2);
  color: #bbf8ca;
}

body[data-mythology="detective"] .comparison-chip.status-none .comparison-value-hint {
  background: rgba(200, 144, 92, 0.18);
  color: #f4d8bc;
}

.comparison-empty {
  position: relative;
  padding: 26px 24px 26px 58px;
  border-radius: 22px;
  border: 1px solid rgba(216, 190, 125, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(16, 20, 29, 0.88);
  color: var(--muted);
  text-align: center;
}

.comparison-empty::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 50% 50%, rgba(221, 196, 141, 0.22), rgba(221, 196, 141, 0.03) 68%, transparent 70%);
  box-shadow:
    inset 0 0 0 1px rgba(221, 196, 141, 0.16),
    0 0 18px rgba(221, 196, 141, 0.06);
}

.empty-state-item {
  position: relative;
  list-style: none;
  padding: 18px 18px 18px 54px;
  border-radius: 16px;
  border: 1px dashed rgba(118, 134, 157, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    rgba(12, 17, 25, 0.46);
  color: color-mix(in srgb, var(--muted) 90%, white 10%);
  font-style: italic;
}

.empty-state-item::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 50% 50%, rgba(221, 196, 141, 0.22), rgba(221, 196, 141, 0.03) 68%, transparent 70%);
  box-shadow:
    inset 0 0 0 1px rgba(221, 196, 141, 0.16),
    0 0 18px rgba(221, 196, 141, 0.06);
}

@keyframes clueReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

@keyframes solvedRowReveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

@keyframes flameFlicker {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: saturate(1.02) brightness(1);
  }

  30% {
    transform: translateY(-0.4px) scale(1.02);
    filter: saturate(1.08) brightness(1.06);
  }

  60% {
    transform: translateY(0.3px) scale(0.99);
    filter: saturate(0.98) brightness(0.98);
  }
}

@keyframes lastFlamePulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

@keyframes flameExtinguish {
  0% {
    opacity: 1;
    filter: saturate(1.08) brightness(1.08);
    transform: scale(1);
    text-shadow:
      0 0 12px rgba(244, 192, 102, 0.34),
      0 0 20px rgba(206, 128, 44, 0.18);
  }

  45% {
    opacity: 0.84;
    filter: saturate(1.2) brightness(1.12);
    transform: scale(1.06);
  }

  100% {
    opacity: 0.36;
    filter: grayscale(1) saturate(0.2) brightness(0.72);
    transform: scale(0.92);
    text-shadow: none;
  }
}

@keyframes boardAlertPulse {
  0% {
    transform: translateY(0);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.03),
      0 14px 28px rgba(0, 0, 0, 0.18);
  }

  45% {
    transform: translateY(-1px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.03),
      0 18px 30px rgba(0, 0, 0, 0.22),
      0 0 0 1px rgba(200, 144, 92, 0.06);
  }

  100% {
    transform: translateY(0);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.03),
      0 14px 28px rgba(0, 0, 0, 0.18);
  }
}

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

@media (max-width: 1100px) {
  body.has-cookie-banner {
    padding-bottom: 216px;
  }

  .site-layout {
    grid-template-columns: 1fr;
    max-width: 1040px;
  }

  .ad-sidebar {
    display: none;
  }

  .page {
    padding: 30px 18px 40px;
  }

  .game-card {
    padding: 24px;
  }

  .game-header {
    flex-direction: column;
    align-items: stretch;
  }

  .game-header-side {
    justify-items: start;
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .game-header .status-row {
    justify-content: flex-start;
    transform: none;
  }

  .cookie-consent-content {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .site-header-inner {
    padding: 16px 18px;
    gap: 14px;
  }

  .site-footer-inner {
    padding: 16px 18px 22px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .myth-nav {
    width: 100%;
  }

  .nav-button {
    min-height: 44px;
  }

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

  body.has-cookie-banner {
    padding-bottom: 244px;
  }

  .cookie-consent-banner {
    width: calc(100% - 18px);
    bottom: 10px;
  }

  .cookie-consent-content {
    padding: 16px;
  }

  .cookie-consent-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-consent-actions .cookie-consent-link,
  .cookie-consent-actions .cookie-consent-button {
    width: 100%;
    text-align: center;
  }

  .cookie-consent-actions .cookie-consent-link {
    padding: 10px 12px;
    border: 1px solid rgba(221, 196, 141, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
  }

  .victory-modal-backdrop {
    padding: 14px;
  }

  .victory-modal-card {
    padding: 22px 18px 18px;
  }

  .victory-modal-actions,
  .victory-modal-social {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header-inner,
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page {
    padding-top: 22px;
    padding-bottom: 32px;
  }

  .game-card {
    padding: 18px;
  }

  .info-page-panel {
    padding: 22px 20px 24px;
  }

  .game-card.is-classic-layout {
    grid-template-columns: 1fr;
  }

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

  .vault-header,
  .vault-record-button {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-header .status-row {
    max-width: none;
    justify-content: flex-start;
    align-self: stretch;
    margin-top: 8px;
    transform: none;
  }

  .myth-nav {
    width: 100%;
    gap: 8px;
  }

  .header-actions,
  .nav-tools,
  .footer-links {
    width: 100%;
  }

  .nav-tools,
  .footer-links {
    justify-content: stretch;
  }

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

  button {
    width: 100%;
  }

  .nav-button {
    width: calc(33.333% - 6px);
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .nav-tool-button {
    width: 100%;
  }

  .footer-copy {
    width: 100%;
  }

  .connections-grid,
  .oddoneout-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .connections-actions {
    flex-direction: column;
  }

  .connections-actions button {
    width: 100%;
  }

  .myth-card-label {
    inset: 23% 14%;
    font-size: clamp(0.76rem, 3vw, 0.9rem);
    line-height: 1.15;
  }

  .panel,
  .connections-discovered,
  .connections-board-shell,
  .oddoneout-explanation {
    padding: 16px;
  }

  .vault-day-entry {
    padding: 14px;
  }

  .vault-record-status {
    width: 100%;
    text-align: center;
  }

  .game-header .status-pill + .status-pill {
    margin-left: 0;
  }

  .attempts-flame-meter {
    gap: 6px;
    padding-inline: 8px;
  }

  .attempt-flame {
    width: 13px;
    height: 20px;
  }

}

@media (max-width: 768px) {
  .site-header-inner {
    padding: 12px 14px 10px;
    gap: 10px 12px;
  }

  .brand-block {
    gap: 2px;
  }

  .header-actions {
    gap: 8px 10px;
  }

  .site-title {
    font-size: 1.14rem;
  }

  .eyebrow {
    font-size: 0.63rem;
    letter-spacing: 0.14em;
  }

  .page {
    padding-top: 18px;
    padding-bottom: 28px;
  }

  .game-card {
    padding: 16px;
  }

  .game-header {
    gap: 16px;
    margin-bottom: 0;
  }

  .game-header h2 {
    margin: 6px 0 8px;
    font-size: clamp(1.8rem, 7vw, 2.3rem);
  }

  .subtitle {
    font-size: 0.97rem;
    line-height: 1.55;
  }

  .game-header-side {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 10px 12px;
    gap: 8px;
    border-radius: 16px;
  }

  .game-header .status-row {
    gap: 6px 8px;
  }

  .game-header .status-pill {
    padding: 6px 9px;
    font-size: 0.82rem;
  }

  .myth-nav {
    width: 100%;
    gap: 6px;
  }

  .nav-button {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.74rem;
    letter-spacing: 0.045em;
    line-height: 1.15;
    white-space: normal;
  }

  .panel,
  .connections-discovered,
  .connections-board-shell,
  .oddoneout-explanation {
    padding: 15px;
  }

  .panel h3,
  .mode-section-heading h3 {
    margin-bottom: 10px;
  }

  .mode-section-heading {
    gap: 5px;
    margin-bottom: 12px;
  }

  .connections-panel-shell,
  .mode-info-panel,
  .oddoneout-panel {
    gap: 12px;
  }

  .vault-day-entry {
    padding: 12px;
  }

  .vault-day-toggle {
    gap: 8px;
  }

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

  .vault-record-button {
    min-width: 0;
    padding: 12px;
    gap: 8px;
  }

  .vault-record-text,
  .vault-record-label,
  .vault-record-meta {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .comparison-table-wrap {
    overflow: hidden;
  }

  .comparison-board,
  .comparison-body {
    gap: 8px;
  }

  .comparison-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border-radius: 20px;
  }

  .comparison-row::before {
    border-radius: 18px;
  }

  .comparison-guess-cell {
    grid-column: 1 / -1;
  }

  .comparison-cell-slot {
    min-width: 0;
  }

  .comparison-cell-slot::before {
    display: none;
    content: none;
  }

  .comparison-guess-tile,
  .comparison-chip {
    min-width: 0;
    min-height: 88px;
    padding: 10px 12px 11px 14px;
    border-radius: 14px;
  }

  .comparison-guess-tile {
    min-height: auto;
    padding: 12px 14px;
    justify-content: flex-start;
    text-align: left;
  }

  .guess-name {
    text-align: left;
    font-size: 0.84rem;
    line-height: 1.22;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .comparison-chip {
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    gap: 8px;
  }

  .comparison-chip::before {
    top: 8px;
    bottom: 8px;
  }

  .comparison-mobile-label {
    display: block;
    min-width: 0;
    margin: 0;
    padding-right: 8px;
    color: color-mix(in srgb, var(--muted) 84%, #efe4c3 16%);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .comparison-value,
  .comparison-value-text,
  .comparison-value-hint {
    min-width: 0;
    max-width: 100%;
  }

  .comparison-value {
    justify-content: flex-start;
    gap: 4px 5px;
    width: 100%;
    font-size: 0.77rem;
    line-height: 1.32;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .comparison-value-text {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .comparison-value-hint {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .connections-grid,
  .oddoneout-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .connections-actions {
    gap: 10px;
    margin-top: 12px;
  }
}

@media (max-width: 480px) {
  .site-header-inner,
  .page {
    padding-left: 12px;
    padding-right: 12px;
  }

  .page {
    padding-top: 18px;
    padding-bottom: 28px;
  }

  .game-card {
    padding: 14px;
    border-radius: 18px;
  }

  .info-page-panel {
    padding: 18px 16px 20px;
    border-radius: 18px;
  }

  .info-page-header h1 {
    font-size: clamp(2rem, 10vw, 2.55rem);
  }

  .panel,
  .connections-discovered,
  .connections-board-shell,
  .oddoneout-explanation {
    padding: 14px;
    border-radius: 14px;
  }

  .site-title {
    font-size: 1.1rem;
  }

  .subtitle,
  .hint-text,
  .vault-record-meta,
  .oddoneout-explanation,
  .result-message {
    font-size: 0.95rem;
  }

  .clue-card-text {
    font-size: 1rem;
    line-height: 1.58;
  }

  .connections-group-title {
    font-size: 0.92rem;
  }

  .connections-group-members-line {
    font-size: 0.9rem;
  }

  .myth-card-label {
    inset: 22% 14%;
    font-size: clamp(0.72rem, 3.5vw, 0.84rem);
  }

  .vault-record-list {
    grid-template-columns: 1fr;
  }

  .attempt-flame {
    width: 12px;
    height: 18px;
  }

}

@media (max-width: 980px) and (min-width: 769px) {
  .comparison-header {
    display: none;
  }

  .comparison-board {
    gap: 10px;
  }

  .comparison-body {
    gap: 10px;
  }

  .comparison-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .comparison-guess-cell {
    grid-column: 1 / -1;
  }

  .comparison-cell-slot::before {
    content: attr(data-label);
    display: block;
    margin: 0 0 6px;
    color: color-mix(in srgb, var(--muted) 86%, #efe4c3 14%);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .comparison-guess-tile {
    padding: 13px 12px;
    justify-content: flex-start;
  }

  .guess-name {
    text-align: left;
  }

  .comparison-chip {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .comparison-value {
    justify-content: flex-start;
    text-align: left;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .comparison-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body {
    --mobile-sticky-stack-space: calc(128px + env(safe-area-inset-bottom) + var(--mobile-keyboard-offset));
  }

  body[data-mythology="detective"] {
    --mobile-sticky-stack-space: calc(196px + env(safe-area-inset-bottom) + var(--mobile-keyboard-offset));
  }

  .site-header {
    top: 0;
  }

  .site-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
  }

  .brand-block {
    min-width: 0;
    gap: 1px;
  }

  .eyebrow {
    font-size: 0.6rem;
    letter-spacing: 0.13em;
  }

  .site-title {
    font-size: 1.08rem;
  }

  .header-actions {
    position: relative;
    width: auto;
    justify-self: end;
    justify-content: flex-end;
    gap: 0;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(116, 132, 155, 0.18);
    background: linear-gradient(180deg, rgba(28, 36, 49, 0.92), rgba(18, 24, 35, 0.9));
    color: #f3ebda;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  }

  .mobile-nav-toggle-icon {
    display: inline-flex;
    font-size: 0.82rem;
    transition: transform 160ms ease;
  }

  body.mobile-nav-open .mobile-nav-toggle-icon {
    transform: rotate(180deg);
  }

  .myth-nav {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    display: none;
    width: min(280px, calc(100vw - 24px));
    padding: 8px;
    border-radius: 18px;
    border: 1px solid rgba(92, 108, 130, 0.24);
    background:
      radial-gradient(circle at top, rgba(221, 196, 141, 0.08), transparent 52%),
      linear-gradient(180deg, rgba(21, 27, 38, 0.98), rgba(12, 17, 26, 0.98));
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.mobile-nav-open .myth-nav {
    display: grid;
  }

  .nav-button {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 8px 11px;
    justify-content: flex-start;
    text-align: left;
    font-size: 0.76rem;
    letter-spacing: 0.05em;
    white-space: normal;
  }

  .page {
    padding: 12px 12px 24px;
  }

  body.has-mobile-sticky-guess .page {
    padding-bottom: calc(var(--mobile-sticky-stack-space) + 24px);
  }

  body.has-mobile-sticky-guess .site-footer {
    position: relative;
    z-index: 0;
    padding-bottom: calc(var(--mobile-sticky-stack-space) + 12px);
  }

  body.has-mobile-sticky-guess .site-footer-inner {
    padding-bottom: calc(16px + var(--mobile-keyboard-offset));
  }

  .game-card {
    padding: 12px;
    border-radius: 18px;
  }

  .game-header {
    gap: 10px;
    margin-bottom: 0;
  }

  .game-header h2 {
    margin: 2px 0 4px;
    font-size: clamp(1.62rem, 6.5vw, 2rem);
    line-height: 0.98;
  }

  .section-kicker {
    font-size: 0.64rem;
    letter-spacing: 0.18em;
  }

  .subtitle,
  .hint-text {
    font-size: 0.9rem;
    line-height: 1.46;
  }

  .game-header-side {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 8px 10px;
    gap: 6px;
    border-radius: 14px;
  }

  .game-header .status-row {
    gap: 5px;
    margin-top: 2px;
  }

  .game-header .status-pill {
    min-width: 0;
    padding: 5px 8px;
    font-size: 0.74rem;
  }

  .panel {
    margin-top: 10px;
    padding: 13px;
    border-radius: 16px;
  }

  .panel h3,
  .mode-section-heading h3 {
    margin-bottom: 6px;
    font-size: 0.98rem;
  }

  .mode-section-heading {
    gap: 3px;
    margin-bottom: 8px;
  }

  #guess-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom) + var(--mobile-keyboard-offset));
    z-index: 60;
    margin-top: 0;
    padding: 8px;
    border-radius: 14px;
    border-color: rgba(92, 108, 130, 0.32);
    background:
      linear-gradient(180deg, rgba(21, 27, 38, 0.98), rgba(12, 17, 26, 0.98)),
      rgba(12, 17, 26, 0.98);
    box-shadow:
      0 -1px 0 rgba(255, 255, 255, 0.04),
      0 18px 40px rgba(0, 0, 0, 0.34);
  }

  #guess-panel .hint-text {
    display: none;
  }

  .detective-known-traits {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom) + var(--mobile-keyboard-offset));
    z-index: 59;
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid rgba(92, 108, 130, 0.24);
    background:
      radial-gradient(circle at top left, rgba(126, 236, 158, 0.08), transparent 48%),
      linear-gradient(180deg, rgba(20, 28, 38, 0.98), rgba(10, 16, 24, 0.98));
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  }

  .detective-known-traits-label {
    margin: 0;
    color: color-mix(in srgb, #baf5ca 72%, var(--muted) 28%);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .detective-known-traits-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
  }

  .detective-known-trait-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    padding: 4px 7px;
    border-radius: 999px;
    border: 1px solid rgba(111, 191, 150, 0.22);
    background:
      linear-gradient(180deg, rgba(95, 173, 141, 0.12), rgba(45, 72, 60, 0.1)),
      rgba(18, 33, 30, 0.92);
    color: #eefcf4;
    font-size: 0.68rem;
    line-height: 1.1;
  }

  .detective-known-trait-key,
  .detective-known-trait-value {
    min-width: 0;
    overflow-wrap: break-word;
  }

  .detective-known-trait-key {
    color: #bdf3cb;
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .detective-known-trait-value {
    color: #f3fff7;
    font-weight: 700;
  }

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

  #guess-input {
    min-width: 0;
    min-height: 38px;
  }

  #guess-button {
    width: auto;
    min-width: 78px;
    min-height: 38px;
    padding-inline: 10px;
    touch-action: manipulation;
  }

  .result-panel {
    margin-top: 8px;
  }

  #detective-legend-panel .hint-text {
    font-size: 0.88rem;
  }

  .comparison-table-wrap {
    overflow: visible;
  }

  .comparison-board {
    gap: 8px;
  }

  .comparison-body {
    gap: 4px;
  }

  .comparison-row {
    display: block;
    padding: 6px;
    border-radius: 14px;
  }

  .comparison-row::before {
    border-radius: 12px;
  }

  .comparison-guess-cell {
    display: block;
    margin-bottom: 4px;
    min-width: 0;
  }

  .comparison-guess-tile {
    min-height: auto;
    padding: 7px 8px;
    border-radius: 10px;
    justify-content: flex-start;
    text-align: left;
  }

  .guess-name {
    text-align: left;
    font-size: 0.76rem;
    line-height: 1.1;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .comparison-cell-slot {
    display: block;
    min-width: 0;
  }

  .comparison-cell-slot + .comparison-cell-slot {
    margin-top: 3px;
  }

  .comparison-cell-slot::before {
    display: none;
    content: none;
  }

  .comparison-chip {
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    padding: 5px 7px 5px 9px;
    border-radius: 9px;
    text-align: left;
  }

  .comparison-chip::before {
    top: 6px;
    bottom: 6px;
  }

  .comparison-mobile-label {
    display: block;
    flex: 0 0 64px;
    min-width: 0;
    margin: 0;
    color: color-mix(in srgb, var(--muted) 84%, #efe4c3 16%);
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }

  .comparison-value {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 2px 3px;
    font-size: 0.69rem;
    line-height: 1.14;
    text-align: right;
  }

  .comparison-value-text {
    min-width: 0;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .comparison-value-hint {
    max-width: 100%;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .connections-panel-shell,
  .mode-info-panel,
  .oddoneout-panel {
    gap: 10px;
  }

  body[data-mythology="daily"] .mode-info-panel,
  body[data-mythology="detective"] .mode-info-panel,
  body[data-mythology="detective"] #detective-legend-panel {
    display: none !important;
  }

  .vault-day-entry {
    padding: 10px;
  }

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

  .vault-record-button {
    min-width: 0;
    gap: 6px;
    padding: 10px;
  }

  .vault-record-label,
  .vault-record-meta {
    min-width: 0;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .connections-grid,
  .oddoneout-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .mobile-nav-toggle {
    padding-inline: 10px;
  }

  .myth-nav {
    width: calc(100vw - 24px);
  }

  .comparison-chip {
    flex-direction: column;
    align-items: flex-start;
  }

  .comparison-mobile-label {
    flex-basis: auto;
    white-space: normal;
  }

  .comparison-value {
    justify-content: flex-start;
    text-align: left;
  }

  .detective-known-traits {
    bottom: calc(86px + env(safe-area-inset-bottom) + var(--mobile-keyboard-offset));
  }

  .detective-known-trait-chip {
    width: 100%;
    justify-content: space-between;
  }

  .vault-record-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-header,
  .site-header-inner,
  .header-actions,
  .page,
  .site-layout,
  .site-main-content,
  .site-shell,
  .game-card,
  .panel,
  #guess-panel,
  .comparison-table-wrap,
  .comparison-board,
  .comparison-body,
  .comparison-row,
  .comparison-guess-cell,
  .comparison-cell-slot,
  .comparison-chip {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #guess-panel {
    max-width: calc(100vw - 24px);
  }

  .myth-nav {
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
  }

  body[data-mythology="detective"] .comparison-header {
    display: none !important;
  }

  body[data-mythology="detective"] .comparison-table-wrap {
    overflow: hidden;
  }

  body[data-mythology="detective"] .comparison-board {
    display: block;
    min-width: 0;
  }

  body[data-mythology="detective"] .comparison-body {
    display: grid;
    gap: 8px;
    min-width: 0;
  }

  body[data-mythology="detective"] .comparison-row {
    display: block;
    min-width: 0;
    padding: 10px;
  }

  body[data-mythology="detective"] .comparison-guess-cell {
    margin-bottom: 8px;
  }

  body[data-mythology="detective"] .comparison-cell-slot + .comparison-cell-slot {
    margin-top: 6px;
  }

  body[data-mythology="detective"] .comparison-chip {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  body[data-mythology="detective"] .comparison-mobile-label {
    flex: 0 0 84px;
    min-width: 0;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }

  body[data-mythology="detective"] .comparison-value {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
    text-align: right;
  }

  body[data-mythology="detective"] .comparison-value-text,
  body[data-mythology="detective"] .comparison-value-hint {
    max-width: 100%;
    min-width: 0;
    word-break: normal;
    overflow-wrap: break-word;
  }

  body:not([data-mythology="detective"]) .detective-known-traits {
    display: none !important;
  }
}

@media (max-width: 768px) {
  body[data-mythology="detective"] .comparison-body {
    gap: 5px;
  }

  body[data-mythology="detective"] .comparison-row {
    padding: 6px 0 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-mythology="detective"] .comparison-row::before {
    display: none;
  }

  body[data-mythology="detective"] .comparison-guess-cell {
    margin-bottom: 5px;
  }

  body[data-mythology="detective"] .comparison-guess-tile {
    padding: 8px 10px;
    border-radius: 10px;
  }

  body[data-mythology="detective"] .comparison-cell-slot + .comparison-cell-slot {
    margin-top: 3px;
  }

  body[data-mythology="detective"] .comparison-chip {
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 5px 8px 5px 10px;
    border-radius: 8px;
    border-width: 1px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.02),
      0 1px 2px rgba(0, 0, 0, 0.1);
  }

  body[data-mythology="detective"] .comparison-chip::before {
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 2px;
  }

  body[data-mythology="detective"] .comparison-chip.status-exact {
    background:
      linear-gradient(180deg, rgba(95, 173, 141, 0.11), rgba(45, 72, 60, 0.08)),
      rgba(18, 33, 30, 0.88);
    border-color: rgba(111, 191, 150, 0.2);
    box-shadow:
      inset 0 0 0 1px rgba(111, 191, 150, 0.04),
      0 1px 2px rgba(0, 0, 0, 0.1);
  }

  body[data-mythology="detective"] .comparison-chip.status-none {
    background:
      linear-gradient(180deg, rgba(121, 73, 41, 0.11), rgba(61, 37, 24, 0.08)),
      rgba(32, 22, 18, 0.88);
    border-color: rgba(200, 144, 92, 0.22);
    box-shadow:
      inset 0 0 0 1px rgba(200, 144, 92, 0.04),
      0 1px 2px rgba(0, 0, 0, 0.1);
  }

  body[data-mythology="detective"] .comparison-mobile-label {
    flex: 0 0 68px;
    font-size: 0.48rem;
    letter-spacing: 0.08em;
    line-height: 1;
    color: color-mix(in srgb, var(--muted) 88%, #efe4c3 12%);
    white-space: nowrap;
  }

  body[data-mythology="detective"] .comparison-value {
    justify-content: flex-end;
    align-items: center;
    gap: 2px 4px;
    font-size: 0.68rem;
    line-height: 1.08;
  }

  body[data-mythology="detective"] .comparison-value-text {
    font-weight: 700;
  }

  body[data-mythology="detective"] .comparison-value-hint {
    padding: 1px 5px;
    font-size: 0.7em;
    line-height: 1.05;
  }
}

@media (max-width: 480px) {
  body[data-mythology="detective"] .comparison-chip {
    min-height: 32px;
    padding: 5px 7px 5px 9px;
  }

  body[data-mythology="detective"] .comparison-mobile-label {
    flex-basis: 62px;
    font-size: 0.46rem;
  }

  body[data-mythology="detective"] .comparison-value {
    font-size: 0.66rem;
  }
}

@media (max-width: 768px) {
  body[data-mythology="detective"] .comparison-header,
  body[data-mythology="detective"] .comparison-row,
  body[data-mythology="detective"] .comparison-chip,
  body[data-mythology="detective"] .comparison-cell-slot,
  body[data-mythology="detective"] .comparison-guess-cell,
  body[data-mythology="detective"] .comparison-mobile-label {
    display: none !important;
  }

  body[data-mythology="detective"] .comparison-body {
    display: grid;
    gap: 6px;
  }

  body[data-mythology="detective"] .comparison-mobile-guess {
    display: grid;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-mythology="detective"] .comparison-mobile-guess-header {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(214, 182, 110, 0.14);
    background:
      radial-gradient(circle at top left, rgba(214, 182, 110, 0.08), transparent 42%),
      linear-gradient(180deg, rgba(26, 31, 43, 0.94), rgba(18, 22, 31, 0.94));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.03),
      0 2px 6px rgba(0, 0, 0, 0.12);
  }

  body[data-mythology="detective"] .comparison-mobile-guess-name {
    display: block;
    min-width: 0;
    color: #f6efdd;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.1;
    overflow-wrap: break-word;
    word-break: normal;
  }

  body[data-mythology="detective"] .comparison-mobile-attributes {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  body[data-mythology="detective"] .comparison-mobile-attribute-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 4px 8px 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
      rgba(20, 24, 34, 0.82);
    box-sizing: border-box;
  }

  body[data-mythology="detective"] .comparison-mobile-attribute-row.status-exact {
    background:
      linear-gradient(180deg, rgba(95, 173, 141, 0.1), rgba(45, 72, 60, 0.07)),
      rgba(18, 33, 30, 0.86);
    border-color: rgba(111, 191, 150, 0.18);
  }

  body[data-mythology="detective"] .comparison-mobile-attribute-row.status-none {
    background:
      linear-gradient(180deg, rgba(121, 73, 41, 0.1), rgba(61, 37, 24, 0.07)),
      rgba(32, 22, 18, 0.86);
    border-color: rgba(200, 144, 92, 0.18);
  }

  body[data-mythology="detective"] .comparison-mobile-attribute-label {
    flex: 0 0 auto;
    min-width: 0;
    color: color-mix(in srgb, var(--muted) 88%, #efe4c3 12%);
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body[data-mythology="detective"] .comparison-mobile-attribute-value {
    flex: 1 1 auto;
    min-width: 0;
    color: #f3fff7;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.08;
    text-align: right;
    overflow-wrap: break-word;
    word-break: normal;
  }
}

@media (max-width: 480px) {
  body[data-mythology="detective"] .comparison-mobile-attribute-row {
    min-height: 30px;
    padding: 4px 7px 4px 9px;
    gap: 6px;
  }

  body[data-mythology="detective"] .comparison-mobile-attribute-label {
    font-size: 0.47rem;
  }

  body[data-mythology="detective"] .comparison-mobile-attribute-value {
    font-size: 0.65rem;
  }
}
