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

:root {
  --bg: #f6f1e7;
  --paper: #fffaf0;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #d8cdbb;
  --teal: #0f766e;
  --teal-light: #14b8a6;
  --coral: #e85d4f;
  --gold: #c98a16;
  --shadow: rgba(31, 41, 51, 0.12);
}

body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 250, 240, 0.72) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 250, 240, 0.72) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.back-bar {
  background: #18212d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.65rem 1.5rem;
}

.back-link {
  color: #cbd5e1;
  display: inline-flex;
  font-size: 0.8rem;
  gap: 0.35rem;
  text-decoration: none;
}

.back-link:hover {
  color: #fff;
}

.game-header {
  background: linear-gradient(135deg, #fff7df 0%, #d9f3ee 100%);
  border-bottom: 1px solid var(--line);
  padding: 2rem 1.5rem;
}

.header-inner {
  align-items: center;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr 280px;
  margin: 0 auto;
  max-width: 980px;
}

.eyebrow {
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

h1 {
  color: var(--ink);
  font-size: clamp(2.25rem, 8vw, 4.8rem);
  letter-spacing: 0;
  line-height: 0.95;
}

.subtitle {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  margin-top: 0.85rem;
}

.score-card {
  background: rgba(255, 250, 240, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px var(--shadow);
  padding: 1.1rem;
}

.score-number {
  color: var(--teal);
  font-size: 2.4rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
}

.score-label {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 0.45rem;
}

.progress-track {
  background: #e8dcc9;
  border-radius: 999px;
  height: 9px;
  margin-top: 0.85rem;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--teal), var(--coral), var(--gold));
  border-radius: inherit;
  height: 100%;
  transition: width 0.25s ease;
  width: 0%;
}

.game-main {
  margin: 0 auto;
  max-width: 980px;
  padding: 1.25rem 1.5rem 3rem;
}

.toolbar {
  align-items: center;
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.filter-btn,
.reset-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.filter-btn:hover,
.reset-btn:hover {
  border-color: var(--teal);
}

.filter-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.reset-btn {
  margin-left: auto;
}

.checklist {
  display: grid;
  gap: 0.6rem;
}

.section-title {
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 1.15rem 0 0.1rem;
  text-transform: uppercase;
}

.section-title:first-child {
  margin-top: 0;
}

.section-title.hidden {
  display: none;
}

.check-item {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(31, 41, 51, 0.06);
  cursor: pointer;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 42px 1fr 24px;
  min-height: 64px;
  padding: 0.75rem 0.9rem;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  user-select: none;
}

.check-item:hover {
  border-color: var(--teal-light);
  transform: translateY(-1px);
}

.check-item.done {
  background: #e7f5ef;
  border-color: rgba(15, 118, 110, 0.35);
}

.check-item.hidden {
  display: none;
}

.item-emoji {
  font-size: 1.65rem;
  line-height: 1;
  text-align: center;
}

.item-text {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.35;
}

.check-item.done .item-text {
  color: #3f625c;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(15, 118, 110, 0.45);
}

.check-mark {
  align-items: center;
  border: 2px solid #b9ab96;
  border-radius: 6px;
  color: transparent;
  display: flex;
  font-size: 0.9rem;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.check-item.done .check-mark {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.finish-panel {
  background: #18212d;
  border-radius: 8px;
  color: #f8fafc;
  margin-top: 1.2rem;
  padding: 1.5rem;
  text-align: center;
}

.finish-icon {
  align-items: center;
  background: var(--teal-light);
  border-radius: 50%;
  color: #082f2a;
  display: inline-flex;
  font-size: 1.4rem;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  margin-bottom: 0.7rem;
  width: 44px;
}

.finish-panel h2 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.finish-panel p {
  color: #cbd5e1;
  line-height: 1.55;
}

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

  .game-header {
    padding: 1.5rem 1rem;
  }

  .game-main {
    padding: 1rem 1rem 2rem;
  }

  .reset-btn {
    margin-left: 0;
  }
}
