:root {
  color-scheme: light;
  --page: #e9ece8;
  --paper: #fbfaf6;
  --paper-muted: #f2f1eb;
  --ink: #17201f;
  --ink-soft: #59635f;
  --ink-faint: #7b8580;
  --header: #102e36;
  --header-deep: #0b2229;
  --header-soft: #1b4548;
  --teal: #4ca397;
  --teal-bright: #78c9bb;
  --coral: #ef7457;
  --coral-dark: #d95b40;
  --gold: #d8ad64;
  --danger: #c94532;
  --line: rgba(23, 32, 31, 0.12);
  --line-dark: rgba(255, 255, 255, 0.14);
  --shadow-lg: 0 28px 80px rgba(28, 44, 41, 0.16);
  --shadow-md: 0 14px 36px rgba(28, 44, 41, 0.1);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Bahnschrift", "Aptos", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    radial-gradient(circle at 8% 4%, rgba(216, 173, 100, 0.24), transparent 27%),
    radial-gradient(circle at 94% 22%, rgba(76, 163, 151, 0.22), transparent 30%),
    var(--page);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(4px);
  pointer-events: none;
}

body::before {
  width: 420px;
  height: 420px;
  left: -220px;
  top: 38%;
  background: rgba(239, 116, 87, 0.08);
}

body::after {
  width: 520px;
  height: 520px;
  right: -260px;
  bottom: -180px;
  background: rgba(76, 163, 151, 0.12);
}

button {
  font: inherit;
}

a {
  color: inherit;
}

code {
  padding: 0.08em 0.32em;
  border-radius: 5px;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.9em;
  background: rgba(23, 32, 31, 0.06);
}

[hidden] {
  display: none !important;
}

.noscript-note {
  margin: 18px auto 0;
  width: min(1480px, calc(100% - 48px));
  padding: 14px 18px;
  border: 1px solid rgba(201, 69, 50, 0.28);
  border-radius: 14px;
  color: #681e10;
  background: rgba(255, 236, 232, 0.92);
  box-shadow: var(--shadow-md);
}

.app-shell {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 56px;
  animation: shell-enter 480ms ease both;
}

.game-header {
  position: relative;
  overflow: hidden;
  padding: 26px 30px 24px;
  color: #f8fbf8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.07), transparent 34%),
    radial-gradient(circle at 78% 8%, rgba(120, 201, 187, 0.22), transparent 32%),
    linear-gradient(135deg, var(--header-deep), var(--header) 58%, var(--header-soft));
  box-shadow: var(--shadow-lg);
}

.game-header::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.23;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to right, transparent, black 55%, black);
  pointer-events: none;
}

.game-header::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  right: -90px;
  bottom: -180px;
  border: 54px solid rgba(239, 116, 87, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.brand-row,
.hero-grid,
.progress-block {
  position: relative;
  z-index: 1;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--coral), var(--coral-dark));
  box-shadow: 0 10px 24px rgba(7, 20, 24, 0.28);
}

.eyebrow,
.brand-subtitle,
.section-kicker,
.hero-copy,
.command-label,
.status-message,
.progress-meta,
.board-kicker,
.board-header h2,
.board-header p,
.picture-label,
.image-card-header h3 {
  margin: 0;
}

.eyebrow {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.brand-subtitle {
  margin-top: 3px;
  color: rgba(238, 248, 245, 0.62);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: rgba(244, 251, 249, 0.78);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  background: rgba(7, 22, 27, 0.34);
  cursor: pointer;
}

.mode-chip input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--teal-bright);
}

.mode-chip:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.58;
}

.mode-dot,
.live-dot,
.status-dot {
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
}

.mode-dot {
  width: 7px;
  height: 7px;
  background: var(--teal-bright);
  box-shadow: 0 0 0 5px rgba(120, 201, 187, 0.1);
  animation: status-pulse 1.8s ease-in-out infinite;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: end;
  margin-top: 34px;
}

.section-kicker {
  color: var(--teal-bright);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy-block h1 {
  margin: 7px 0 0;
  max-width: 12ch;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(2.8rem, 5vw, 5.1rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 57ch;
  margin-top: 15px;
  color: rgba(239, 247, 244, 0.7);
  font-size: 0.96rem;
  line-height: 1.55;
}

.command-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(5, 20, 24, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

.command-label {
  display: block;
  color: rgba(240, 248, 246, 0.55);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.mode-note {
  margin: 11px 0 0;
  color: rgba(240, 248, 246, 0.58);
  font-size: 0.74rem;
  line-height: 1.45;
}

.primary-button,
.secondary-button {
  appearance: none;
  min-height: 44px;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.primary-button {
  border: 1px solid transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--coral), var(--coral-dark));
  box-shadow: 0 10px 24px rgba(7, 20, 24, 0.24);
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #eef8f5;
  background: rgba(255, 255, 255, 0.07);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  background: linear-gradient(135deg, #f68164, var(--coral-dark));
}

.secondary-button:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.11);
}

.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: 3px solid rgba(120, 201, 187, 0.48);
  outline-offset: 3px;
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  transform: none;
}

.status-bar {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 42px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(4, 16, 20, 0.34);
}

.status-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  background: var(--teal-bright);
  box-shadow: 0 0 0 4px rgba(120, 201, 187, 0.1);
}

.status-message {
  color: rgba(244, 250, 248, 0.76);
  font-size: 0.82rem;
  line-height: 1.45;
}

.status-message[data-tone="error"] {
  color: #ffad9b;
}

.status-message[data-tone="success"] {
  color: #a9eadf;
}

.progress-block {
  margin-top: 24px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(239, 247, 244, 0.58);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.progress-meta strong {
  color: rgba(249, 252, 251, 0.86);
  font-weight: 750;
}

.progress-track {
  overflow: hidden;
  height: 5px;
  margin-top: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-bright), var(--gold));
  box-shadow: 0 0 18px rgba(120, 201, 187, 0.46);
  transition: width 320ms ease;
}

.hud-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.hud-card {
  position: relative;
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  padding: 17px 19px 17px 21px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(251, 250, 246, 0.9);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}

.hud-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--teal);
}

.hud-card[data-stat="found"]::before {
  background: var(--coral);
}

.hud-card[data-stat="remaining"]::before {
  background: var(--gold);
}

.hud-card[data-stat="chances"]::before {
  background: #7f8b87;
}

.hud-copy {
  display: grid;
  gap: 5px;
}

.hud-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hud-caption {
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.hud-value {
  flex: 0 0 auto;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(1.65rem, 2.3vw, 2.3rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.hud-value[data-tone="danger"] {
  color: var(--danger);
}

.empty-state {
  margin-top: 16px;
  padding: 36px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.empty-state h2 {
  margin: 0 0 9px;
  font-family: "Georgia", "Times New Roman", serif;
}

.empty-state p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.board-panel {
  margin-top: 16px;
  padding: 19px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-xl);
  background: rgba(251, 250, 246, 0.92);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.board-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 3px 5px 17px;
}

.board-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(239, 116, 87, 0.1);
}

.board-header h2 {
  margin-top: 7px;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.board-header > p {
  max-width: 55ch;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.5;
  text-align: right;
}

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

.image-card {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-muted);
  animation: card-enter 420ms ease both;
}

.image-card:nth-child(2) {
  animation-delay: 70ms;
}

.image-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 55px;
  padding: 2px 4px 10px;
}

.picture-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.picture-index {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.1rem;
  background: var(--header);
}

.picture-index--compare {
  background: var(--coral-dark);
}

.picture-label {
  color: var(--ink-faint);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.image-card-header h3 {
  margin-top: 2px;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.picture-note {
  color: var(--ink-faint);
  font-size: 0.7rem;
  white-space: nowrap;
}

.image-surface {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(16, 46, 54, 0.16);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(16, 46, 54, 0.06), rgba(76, 163, 151, 0.08)),
    #dfe4df;
  box-shadow: 0 10px 28px rgba(27, 42, 39, 0.12);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.image-surface img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.image-surface:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(27, 42, 39, 0.18);
}

.image-surface:focus-within {
  outline: 3px solid rgba(76, 163, 151, 0.35);
  outline-offset: 3px;
}

.image-surface[data-interactive="true"] {
  cursor: crosshair;
}

.image-surface.surface--miss {
  animation: miss-flash 260ms ease;
}

.marker-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.diff-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 4px solid var(--coral);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.82),
    0 14px 28px rgba(22, 26, 25, 0.28);
  animation: marker-pop 220ms ease;
}

.diff-marker--hint {
  border-color: var(--teal-bright);
  border-style: dashed;
  background: rgba(76, 163, 151, 0.17);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.82),
    0 14px 28px rgba(13, 61, 58, 0.24);
  animation: hint-pulse 900ms ease-in-out infinite alternate;
}

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

.content-card,
.faq-panel {
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(251, 250, 246, 0.92);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.content-card {
  min-width: 0;
  padding: 24px 24px 22px;
  border-radius: var(--radius-lg);
}

.content-card--wide {
  grid-column: 1 / -1;
}

.content-kicker {
  margin: 0;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.content-card h2,
.faq-header h2 {
  margin: 8px 0 0;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.content-body,
.faq-item p,
.site-footer p {
  margin: 12px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.instruction-list,
.feature-list {
  margin: 14px 0 0;
  padding-left: 1.3rem;
  color: var(--ink-soft);
}

.instruction-list li,
.feature-list li {
  margin-top: 10px;
  line-height: 1.55;
}

.faq-panel {
  margin-top: 16px;
  padding: 24px;
  border-radius: var(--radius-xl);
}

.faq-header {
  display: grid;
  gap: 4px;
}

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

.faq-item {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-muted);
}

.faq-item h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.faq-item p {
  margin-top: 10px;
}

.site-footer {
  margin-top: 16px;
  padding: 0 6px;
}

.site-footer a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

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

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

@keyframes status-pulse {
  0%, 100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

@keyframes marker-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes miss-flash {
  0% {
    box-shadow: inset 0 0 0 0 rgba(201, 69, 50, 0.3);
  }

  45% {
    box-shadow: inset 0 0 0 10px rgba(201, 69, 50, 0.22);
  }

  100% {
    box-shadow: inset 0 0 0 0 rgba(201, 69, 50, 0);
  }
}

@keyframes hint-pulse {
  from {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-copy-block h1 {
    max-width: none;
  }

  .command-panel {
    max-width: none;
  }

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

  .content-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 28px, 1480px);
    padding-top: 14px;
  }

  .board-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .board-header > p {
    text-align: left;
  }

  .board-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .noscript-note {
    width: min(100% - 16px, 1480px);
    margin-top: 8px;
  }

  .app-shell {
    width: min(100% - 16px, 1480px);
    padding: 8px 0 26px;
  }

  .game-header {
    padding: 20px 18px 18px;
    border-radius: 22px;
  }

  .brand-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand-subtitle {
    display: none;
  }

  .mode-chip {
    padding: 7px 9px;
    font-size: 0.68rem;
  }

  .hero-grid {
    margin-top: 28px;
  }

  .hero-copy-block h1 {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }

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

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .hud-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .hud-card {
    min-height: 78px;
  }

  .board-panel {
    margin-top: 10px;
    padding: 11px;
    border-radius: 22px;
  }

  .content-card,
  .faq-panel {
    border-radius: 22px;
  }

  .content-card,
  .faq-panel,
  .faq-item {
    padding-left: 16px;
    padding-right: 16px;
  }

  .board-header {
    padding: 5px 5px 15px;
  }

  .image-card {
    padding: 8px;
    border-radius: 18px;
  }

  .picture-note {
    display: none;
  }

  .image-surface {
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
