:root {
  --bg: #22150f;
  --parchment: #ead8b2;
  --wood: #6f4b33;
  --wood-dark: #462a1f;
  --gold: #d1a34f;
  --gold-bright: #f3d38a;
  --moon: #8b98be;
  --moon-deep: #5e6685;
  --ink: #2b190f;
  --cream: #f8edd2;
  --danger: #7c332a;
  --shadow: 0 18px 40px rgba(20, 11, 7, 0.35);
  --title-font: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --body-font: "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(243, 211, 138, 0.12), transparent 38%),
    linear-gradient(180deg, #5d3926 0%, #2b190f 55%, #1b100c 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body-font);
  background:
    radial-gradient(circle at 12% 20%, rgba(233, 216, 178, 0.08), transparent 15%),
    radial-gradient(circle at 88% 10%, rgba(139, 152, 190, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(248, 237, 210, 0.06), transparent 35%);
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  padding: 1.2rem;
}

.topbar {
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(244, 221, 174, 0.24);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(60, 38, 26, 0.92), rgba(34, 21, 15, 0.95)),
    linear-gradient(90deg, rgba(209, 163, 79, 0.08), transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.brand-crest {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border: 1px solid rgba(243, 211, 138, 0.55);
  border-radius: 50%;
  color: var(--gold-bright);
  background: radial-gradient(circle, rgba(243, 211, 138, 0.22), rgba(209, 163, 79, 0.02));
  box-shadow: 0 0 18px rgba(209, 163, 79, 0.3);
}

.eyebrow,
.section-kicker,
.narrative-label,
.ritual-label {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.eyebrow,
.section-kicker,
.narrative-label {
  color: rgba(248, 237, 210, 0.8);
}

.opening-card .section-kicker,
.log-card .section-kicker,
.drawer-card .section-kicker,
.help-card .section-kicker,
.narrative-label {
  color: rgba(70, 42, 27, 0.72);
}

.panel-heading .section-kicker {
  color: rgba(248, 237, 210, 0.8);
}

.brand-title {
  margin: 0.2rem 0 0;
  max-width: 44rem;
  color: var(--cream);
  font-size: clamp(1.05rem, 2vw, 1.55rem);
  line-height: 1.15;
  font-family: var(--title-font);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem;
}

.scene {
  display: none;
}

.scene.active {
  display: block;
}

.scene-opening {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 8rem);
  border-radius: 30px;
  border: 1px solid rgba(244, 221, 174, 0.22);
  background:
    linear-gradient(130deg, rgba(39, 24, 17, 0.92), rgba(65, 43, 28, 0.88)),
    radial-gradient(circle at top, rgba(243, 211, 138, 0.18), transparent 35%);
  box-shadow: var(--shadow);
}

.mist-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(244, 231, 203, 0.22), transparent 20%),
    radial-gradient(circle at 70% 20%, rgba(139, 152, 190, 0.16), transparent 18%),
    radial-gradient(circle at 45% 75%, rgba(244, 231, 203, 0.12), transparent 26%);
  opacity: 0.8;
  animation: drift 14s ease-in-out infinite alternate;
}

.opening-card,
.log-card,
.drawer-card,
.help-card {
  border: 1px solid rgba(87, 52, 28, 0.4);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(242, 226, 188, 0.96), rgba(221, 194, 142, 0.96)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 231, 0.65),
    inset 0 -8px 18px rgba(103, 74, 44, 0.12),
    var(--shadow);
}

.opening-card {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 2rem));
  margin: clamp(2rem, 5vw, 4.2rem) auto;
  padding: clamp(1.6rem, 4vw, 2.7rem);
}

.opening-card h2,
.panel-heading h2,
.drawer-card h2,
.help-card h2 {
  margin: 0.35rem 0 0.8rem;
  line-height: 1.08;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-family: var(--title-font);
  color: #3c2416;
}

.opening-lead,
.drawer-description,
.help-card li {
  margin: 0;
  line-height: 1.65;
  font-size: 1.03rem;
}

.opening-actions,
.intro-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.ornate-button {
  border: 1px solid rgba(67, 37, 23, 0.5);
  border-radius: 999px;
  padding: 0.9rem 1.35rem;
  color: #fff8ea;
  background:
    linear-gradient(180deg, #8f5b32, #6e4328),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent);
  box-shadow: inset 0 1px 0 rgba(255, 245, 222, 0.3), 0 10px 18px rgba(48, 27, 17, 0.18);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.ornate-button:hover,
.ornate-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 222, 0.3),
    0 0 0 3px rgba(243, 211, 138, 0.15),
    0 14px 24px rgba(48, 27, 17, 0.22);
}

.ornate-button:active {
  transform: translateY(1px);
}

.ornate-button.primary {
  background: linear-gradient(180deg, #d5a85d, #a87131), linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent);
}

.ornate-button.secondary {
  background: linear-gradient(180deg, #64714a, #485233), linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent);
}

.ornate-button.subtle {
  padding-inline: 1rem;
  background: linear-gradient(180deg, #62402e, #472d22), linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
}

.ornate-button.danger {
  background: linear-gradient(180deg, #8b4637, #662a23), linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
}

.ornate-button.full-width {
  width: 100%;
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--wood-dark);
  font-weight: 700;
  background: transparent;
  cursor: pointer;
}

.narrative-scroll {
  margin-top: 1.8rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(102, 71, 45, 0.22);
  border-radius: 18px;
  background: rgba(255, 248, 231, 0.38);
  min-height: 9rem;
}

.narrative-text {
  margin-top: 0.75rem;
  line-height: 1.7;
  white-space: pre-line;
  min-height: 6rem;
}

.scene-map {
  padding-bottom: 2rem;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1.25rem;
  align-items: start;
}

.map-panel {
  min-width: 0;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.panel-heading h2 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--cream);
}

.map-frame {
  position: relative;
  overflow: hidden;
  border: 16px solid #69472d;
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: #d9c69f;
}

.farm-map {
  display: block;
  width: 100%;
  height: auto;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
}

.map-hotspot {
  position: absolute;
  width: clamp(2.2rem, 4.4vw, 3rem);
  height: clamp(2.2rem, 4.4vw, 3rem);
  padding: 0;
  border: 1px solid rgba(91, 55, 31, 0.42);
  border-radius: 50%;
  color: #fff8ea;
  background: radial-gradient(circle, rgba(255, 250, 237, 0.35), rgba(102, 67, 39, 0.8));
  box-shadow: 0 0 0 5px rgba(255, 250, 237, 0.12), 0 0 24px rgba(84, 54, 32, 0.34);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.map-hotspot::before,
.map-hotspot::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.map-hotspot::before {
  content: "";
  border: 1px dashed rgba(255, 248, 231, 0.35);
  transform: scale(1.12);
}

.map-hotspot::after {
  content: attr(data-symbol);
  font-size: 0.9rem;
}

.map-hotspot:hover,
.map-hotspot:focus-visible {
  transform: translate(-50%, -50%) scale(1.06);
}

.map-hotspot[data-astral="sun"] {
  box-shadow: 0 0 0 5px rgba(255, 218, 143, 0.15), 0 0 26px rgba(209, 163, 79, 0.45);
}

.map-hotspot[data-astral="moon"] {
  box-shadow: 0 0 0 5px rgba(170, 181, 214, 0.14), 0 0 26px rgba(94, 102, 133, 0.42);
}

.map-hotspot.is-solved {
  border-color: rgba(255, 248, 231, 0.88);
}

.map-hotspot.is-solved[data-astral="sun"] {
  background: radial-gradient(circle, rgba(243, 211, 138, 0.92), rgba(145, 91, 35, 0.96));
}

.map-hotspot.is-solved[data-astral="moon"] {
  background: radial-gradient(circle, rgba(198, 206, 231, 0.9), rgba(89, 96, 128, 0.96));
}

.log-card {
  padding: 1.5rem;
}

.quest-progress {
  display: flex;
  align-items: baseline;
  gap: 0.28rem;
  margin-top: 0.4rem;
  color: var(--wood-dark);
  font-family: var(--title-font);
  font-size: 2rem;
}

.quest-progress-label {
  margin-left: 0.45rem;
  font-size: 0.95rem;
  font-family: var(--body-font);
}

.status-banner,
.ritual-panel {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: rgba(255, 248, 231, 0.46);
  border: 1px solid rgba(90, 60, 39, 0.16);
}

.fragments-title-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.3rem;
}

.fragments-title-row h3,
.victory-panel h3 {
  margin: 0;
  font-family: var(--title-font);
  font-size: 1.45rem;
}

.mode-pill,
.drawer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mode-pill {
  background: rgba(71, 45, 34, 0.1);
  color: var(--wood-dark);
}

.fragments-list {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.fragment-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 249, 236, 0.58);
  border: 1px solid rgba(98, 66, 41, 0.16);
}

.fragment-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  font-weight: 700;
}

.fragment-astral {
  font-size: 0.9rem;
}

.fragment-copy {
  color: rgba(43, 25, 15, 0.8);
  font-size: 0.95rem;
}

.ritual-label {
  color: rgba(43, 25, 15, 0.62);
}

.ritual-copy {
  margin: 0.45rem 0 0;
  line-height: 1.6;
}

.puzzle-drawer,
.help-sheet {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(20, 11, 7, 0.58);
  backdrop-filter: blur(7px);
}

.drawer-card,
.help-card {
  position: relative;
  width: min(560px, 100%);
  padding: 1.5rem;
}

.drawer-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  color: var(--wood-dark);
  background: rgba(67, 37, 23, 0.1);
  cursor: pointer;
}

.drawer-badge {
  margin-top: 0.8rem;
  background: rgba(255, 248, 231, 0.56);
}

.drawer-badge[data-astral="sun"] {
  color: #875006;
  box-shadow: inset 0 0 0 1px rgba(209, 163, 79, 0.28);
}

.drawer-badge[data-astral="moon"] {
  color: #495172;
  box-shadow: inset 0 0 0 1px rgba(94, 102, 133, 0.22);
}

.drawer-media {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(85, 58, 36, 0.18);
  background: rgba(255, 248, 231, 0.42);
}

.media-figure {
  margin: 0;
}

.media-figure img {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.field-label {
  display: block;
  margin-top: 1.2rem;
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.answer-field {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(92, 62, 39, 0.25);
  border-radius: 18px;
  background: rgba(255, 248, 231, 0.7);
  color: var(--wood-dark);
}

.drawer-feedback {
  min-height: 1.5rem;
  margin: 0.9rem 0 0;
  font-weight: 700;
}

.help-card ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.help-card li + li {
  margin-top: 0.65rem;
}

@keyframes drift {
  from {
    transform: translate3d(-1.5%, 0, 0) scale(1.02);
  }
  to {
    transform: translate3d(1.5%, -1.5%, 0) scale(1.05);
  }
}

@media (max-width: 980px) {
  .topbar,
  .panel-heading {
    align-items: start;
    flex-direction: column;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 720px) {
  .page-shell {
    padding: 0.75rem;
  }

  .topbar {
    border-radius: 20px;
    padding: 0.9rem;
  }

  .opening-card,
  .log-card,
  .drawer-card,
  .help-card {
    border-radius: 22px;
  }

  .opening-card h2,
  .panel-heading h2,
  .drawer-card h2,
  .help-card h2 {
    font-size: clamp(1.7rem, 9vw, 2.55rem);
  }

  .map-frame {
    border-width: 10px;
    border-radius: 24px;
  }

  .map-hotspot {
    width: 2rem;
    height: 2rem;
  }

  .map-hotspot::after {
    font-size: 0.8rem;
  }

}

.quest-page {
  max-width: 980px;
  margin: 0 auto;
}

.quest-hero {
  display: grid;
  gap: 1.2rem;
  padding: clamp(1.4rem, 4vw, 2.3rem);
}

.quest-placeholder {
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: rgba(255, 248, 231, 0.52);
  border: 1px solid rgba(90, 60, 39, 0.16);
}

.quest-placeholder p {
  margin: 0;
  line-height: 1.65;
}

.quest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

@keyframes mysticalFlash {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
    background: radial-gradient(circle, rgba(243, 211, 138, 0.42), transparent 62%);
  }
  100% {
    opacity: 0;
  }
}

@keyframes goldenPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(209, 163, 79, 0.8), inset 0 1px 0 rgba(255, 245, 222, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(209, 163, 79, 0), inset 0 1px 0 rgba(255, 245, 222, 0.3);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(209, 163, 79, 0), inset 0 1px 0 rgba(255, 245, 222, 0.3);
    transform: scale(1);
  }
}

body.unlock-flash-active::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  animation: mysticalFlash 2.5s ease-out forwards;
}

body.all-quests-unlocked #statusBanner {
  background: rgba(209, 163, 79, 0.15);
  border-color: rgba(209, 163, 79, 0.5);
  font-weight: 700;
  color: #875006;
}

/* Quest Page Extensions */
.quest-page {
  max-width: 800px;
  margin: 0 auto;
  color: var(--cream);
}

.quest-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  border: 1px solid rgba(209, 163, 79, 0.2);
}

.quest-header h1 {
  margin: 0.5rem 0;
  font-family: var(--title-font);
  color: var(--gold-bright);
  font-size: 2.5rem;
}

.quest-header .subtitle {
  font-style: italic;
  opacity: 0.9;
}

.quest-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(60, 38, 26, 0.6);
  border-radius: 15px;
  border-left: 4px solid var(--gold);
  box-shadow: var(--shadow);
}

.quest-section h2 {
  margin-top: 0;
  font-family: var(--title-font);
  color: var(--gold);
  border-bottom: 1px solid rgba(209, 163, 79, 0.3);
  padding-bottom: 0.5rem;
}

.hint-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--gold);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 10px;
  text-align: center;
}

.hint-box h3 {
  margin-top: 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
}

.audio-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.help-text {
  font-size: 0.9rem;
  opacity: 0.8;
  font-style: italic;
}

.answer-box {
  margin-top: 1.5rem;
}

.quest-footer {
  text-align: center;
  margin-top: 4rem;
  padding-bottom: 4rem;
}

/* --- Quête 10 : La Grille des Gardiens --- */
.grid-wrapper {
  display: flex;
  justify-content: center;
  margin: 28px 0;
}

.guardian-grid {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  grid-template-rows: repeat(6, 60px);
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 204, 102, 0.08);
  border: 1px solid rgba(255, 196, 94, 0.25);
}

.cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #2f3a10 0%, #1d2508 100%);
  border: 1px solid rgba(255, 196, 94, 0.35);
  color: #fdf4dc;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: all 0.3s ease;
}

.cell.filled {
  background: linear-gradient(180deg, #3d4d13 0%, #26310b 100%);
  color: #fff7df;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 0 10px rgba(255, 196, 94, 0.15);
}

.cell.question {
  background: linear-gradient(180deg, #4b2c18 0%, #2e180d 100%);
  color: #ffd27a;
  font-size: 1.8rem;
  animation: pulseQuestion 1.8s ease-in-out infinite;
}

@keyframes pulseQuestion {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 210, 122, 0.15); }
  50% { box-shadow: 0 0 18px rgba(255, 210, 122, 0.35); }
}

/* Quête 11 — Le Gâteau des Niveaux */
.cake-quest {
  max-width: 920px;
  margin: 40px auto;
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(180deg, #3a1f12 0%, #24110a 100%);
  border: 1px solid rgba(255, 196, 94, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  color: #fff8e8;
  font-family: "Segoe UI", sans-serif;
}

.cake-quest h1 {
  margin: 0 0 8px;
  color: #f6c15d;
  font-size: 2rem;
}

.cake-quest .subtitle {
  margin-bottom: 24px;
  color: #f2dfbf;
  line-height: 1.5;
}

.cake-quest .quest-section {
  margin-top: 22px;
  padding: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 196, 94, 0.18);
}

.cake-quest .quest-section h2 {
  margin-top: 0;
  color: #f6c15d;
}

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

.question {
  margin-top: 14px;
  font-size: 1.05rem;
  color: #fff1cf;
}

.cake-wrapper {
  display: flex;
  justify-content: center;
  padding: 20px 0 10px;
}

.cake {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.candles {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}

.candles span {
  width: 6px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb7b7 0%, #ff7d7d 100%);
  position: relative;
}

.candles span::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #ffd36b;
  box-shadow: 0 0 10px rgba(255, 211, 107, 0.8);
}

.tier {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  border-radius: 18px;
  color: #2a140a;
  font-weight: 700;
  background: linear-gradient(180deg, #c7f0ff 0%, #77d6ff 100%);
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.4);
}

.tier-1 {
  width: 120px;
  height: 46px;
}

.tier-2 {
  width: 170px;
  height: 54px;
}

.tier-3 {
  width: 230px;
  height: 62px;
}

.tier-4 {
  width: 290px;
  height: 70px;
  background: linear-gradient(180deg, #ffe3a8 0%, #f6c15d 100%);
}

@media (max-width: 640px) {
  .cake-quest {
    padding: 20px;
  }

  .tier-1 { width: 90px; }
  .tier-2 { width: 130px; }
  .tier-3 { width: 180px; }
  .tier-4 { width: 230px; }

  .tier {
    font-size: 0.9rem;
  }
}

@media (max-width: 640px) {
  .guardian-grid {
    grid-template-columns: repeat(4, 64px);
    grid-template-rows: repeat(6, 54px);
  }
  .cell {
    font-size: 1rem;
  }
}
