:root {
  --glass-bg: rgba(255, 252, 246, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 24px 60px rgba(24, 34, 38, 0.14), 0 4px 16px rgba(24, 34, 38, 0.06);
  --text-primary: #1f2d2e;
  --text-secondary: #526668;
  --accent-warm: #d97736;
  --accent-warm-hover: #c56628;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  background-color: #d7e6de;
  font-family: var(--font-sans);
  color: var(--text-primary);
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  touch-action: none;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: none;
}

#atmosphere-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 35%, transparent 55%, rgba(16, 26, 28, 0.18) 100%);
  z-index: 2;
}

/* Top HUD */
#hud-top {
  position: absolute;
  top: max(20px, env(safe-area-inset-top, 20px));
  left: max(24px, env(safe-area-inset-left, 24px));
  right: max(24px, env(safe-area-inset-right, 24px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hud-hidden {
  opacity: 0 !important;
  transform: translateY(-10px);
  pointer-events: none !important;
}

.hud-stats {
  display: flex;
  gap: 12px;
  pointer-events: auto;
}

.stat-pill {
  background: rgba(255, 253, 249, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 8px 18px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.stat-pill.low-altitude {
  background: rgba(255, 236, 214, 0.92);
  border-color: rgba(217, 119, 54, 0.65);
}

.stat-pill.low-altitude .stat-value,
.stat-pill.low-altitude .stat-label {
  color: #b85318;
}

.stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.hud-controls {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 253, 249, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  padding: 8px 15px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

.icon-btn.active-mode {
  background: rgba(217, 119, 54, 0.16);
  border-color: rgba(217, 119, 54, 0.45);
  color: #9e4710;
}

.hidden {
  display: none !important;
}

/* Interactive Breeze Hints */
#breeze-hints {
  position: absolute;
  bottom: max(36px, calc(env(safe-area-inset-bottom, 0px) + 18px));
  left: max(36px, env(safe-area-inset-left, 36px));
  right: max(36px, env(safe-area-inset-right, 36px));
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 6;
  transition: opacity 1s ease;
}

.breeze-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  transition: transform 0.25s ease, background 0.25s ease, opacity 0.6s ease;
}

.breeze-zone small {
  font-weight: 400;
  font-size: 11px;
  color: var(--text-secondary);
}

.breeze-zone.right-zone {
  flex-direction: row-reverse;
  text-align: right;
}

.breeze-zone.active-gust {
  background: rgba(255, 255, 255, 0.82);
  transform: scale(1.05);
}

/* Overlay Screens */
.overlay-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.overlay-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.title-card {
  max-width: 510px;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 44px 40px 36px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  transform: translateY(12px);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.overlay-screen.active .title-card {
  transform: translateY(0);
}

.subtitle-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent-warm);
  margin-bottom: 10px;
}

.main-title {
  font-family: var(--font-serif);
  font-size: 56px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.secondary-title {
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.title-description {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 26px;
}

.biome-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.biome-chip {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(31, 45, 46, 0.12);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.biome-chip:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-primary);
}

.biome-chip.active {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--accent-warm);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 16px 34px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(217, 119, 54, 0.32);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.primary-btn:hover {
  background: var(--accent-warm-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(217, 119, 54, 0.42);
}

.primary-btn:active {
  transform: translateY(0);
}

.whisper {
  position: absolute;
  top: 17%;
  left: 50%;
  transform: translate(-50%, -6px);
  z-index: 8;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 24px rgba(24, 34, 38, 0.12);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--text-primary);
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.whisper.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bloom-panel {
  margin: 0 auto 24px;
  max-width: 360px;
  text-align: left;
}

.bloom-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.bloom-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 45, 46, 0.1);
  overflow: hidden;
}

.bloom-bar.small {
  width: 150px;
  height: 5px;
}

.bloom-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #8fbf8a, #f0a6b8);
  transition: width 1.4s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.bloom-foot {
  margin-top: 7px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
}

.bloom-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: -12px 0 22px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
}

.action-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text-secondary);
  border: 1px solid rgba(31, 45, 46, 0.14);
  border-radius: 999px;
  padding: 11px 22px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.secondary-btn strong {
  font-weight: 600;
  color: var(--text-primary);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.controls-footnote {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.controls-footnote .dot {
  opacity: 0.5;
}

/* Summary Grid on Landing Screen */
.new-record-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(217, 119, 54, 0.18), rgba(244, 184, 96, 0.28));
  border: 1px solid rgba(217, 119, 54, 0.45);
  color: #a64b12;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 16px;
  border-radius: 999px;
  margin-top: -10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(217, 119, 54, 0.15);
  animation: gentlePulse 2.4s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.summary-item {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.summary-item.record-highlight {
  background: rgba(255, 244, 224, 0.88);
  border-color: rgba(217, 119, 54, 0.55);
}

.summary-item.record-highlight .summary-num {
  color: var(--accent-warm);
}

.summary-num {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
}

.summary-lbl {
  font-size: 11px;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  #hud-top {
    top: max(10px, env(safe-area-inset-top, 10px));
    left: max(10px, env(safe-area-inset-left, 10px));
    right: max(10px, env(safe-area-inset-right, 10px));
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .hud-stats, .hud-controls {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }
  .stat-pill {
    padding: 5px 11px;
    gap: 5px;
  }
  .stat-label {
    font-size: 9px;
    letter-spacing: 0.1em;
  }
  .stat-value {
    font-size: 13px;
  }
  .icon-btn {
    padding: 6px 11px;
    font-size: 11px;
    gap: 5px;
  }
  .icon-btn svg {
    width: 15px;
    height: 15px;
  }
  .overlay-screen {
    padding: 16px;
  }
  .main-title {
    font-size: 40px;
    margin-bottom: 10px;
  }
  .secondary-title {
    font-size: 32px;
    margin-bottom: 16px;
  }
  .title-description {
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 18px;
  }
  .biome-selector {
    gap: 6px;
    margin-bottom: 20px;
  }
  .biome-chip {
    padding: 6px 11px;
    font-size: 11px;
  }
  .primary-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 14px;
  }
  .title-card {
    padding: 26px 20px 22px;
    border-radius: 26px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
  }
  .summary-grid {
    gap: 8px;
    margin-bottom: 20px;
  }
  .summary-item {
    padding: 12px 6px;
    border-radius: 14px;
  }
  .summary-num {
    font-size: 22px;
  }
  .summary-lbl {
    font-size: 10px;
  }
  #breeze-hints {
    bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 12px));
    left: max(12px, env(safe-area-inset-left, 12px));
    right: max(12px, env(safe-area-inset-right, 12px));
    gap: 8px;
  }
  .breeze-zone {
    padding: 8px 12px;
    font-size: 11.5px;
    gap: 8px;
    border-radius: 16px;
  }
  .breeze-icon svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-height: 520px) {
  .title-card {
    padding: 18px 22px 16px;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }
  .main-title {
    font-size: 32px;
    margin-bottom: 6px;
  }
  .secondary-title {
    font-size: 26px;
    margin-bottom: 10px;
  }
  .title-description {
    font-size: 12.5px;
    margin-bottom: 12px;
  }
  .biome-selector {
    margin-bottom: 12px;
  }
  .primary-btn {
    padding: 11px 22px;
    font-size: 13px;
  }
  .controls-footnote {
    margin-top: 12px;
  }
}

/* Hidden paper cranes summary */
.crane-panel {
  margin: 0 auto 18px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.crane-row {
  display: flex;
  gap: 8px;
}

.crane-icon svg {
  display: block;
  fill: rgba(31, 45, 46, 0.12);
  transition: fill 0.4s ease, transform 0.4s ease;
}

.crane-icon.found svg {
  fill: #e9b949;
  filter: drop-shadow(0 1px 2px rgba(201, 143, 42, 0.45));
}

.crane-note {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

/* Above the treeline: calm green glow on the altitude pill */
.stat-pill.above-trees {
  background: rgba(226, 244, 222, 0.92);
  border-color: rgba(92, 150, 96, 0.6);
  transition: background 0.4s ease, border-color 0.4s ease;
}

.stat-pill.above-trees .stat-value,
.stat-pill.above-trees .stat-label {
  color: #3f7a45;
}

/* Title-screen options menu */
.options-menu {
  margin: 14px auto 4px;
  max-width: 340px;
  text-align: left;
}

.options-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.options-menu summary::-webkit-details-marker { display: none; }

.options-menu summary:hover,
.options-menu[open] summary {
  background: rgba(31, 45, 46, 0.07);
  color: var(--text-primary);
}

.options-menu summary:focus-visible,
.option-row:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 2px;
}

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

.options-list {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(31, 45, 46, 0.1);
  border-radius: 14px;
  font-family: var(--font-sans);
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s ease;
}

.option-row:hover { background: rgba(255, 255, 255, 0.85); }

.option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.option-text strong {
  font-size: 13px;
  font-weight: 600;
}

.option-text small {
  font-size: 11px;
  color: var(--text-secondary);
}

.switch {
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(31, 45, 46, 0.18);
  transition: background 0.2s ease;
}

.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.option-row[aria-checked="true"] .switch { background: var(--accent-warm); }
.option-row[aria-checked="true"] .switch::after { transform: translateX(16px); }

/* Let the title / landing cards scroll when taller than the screen (e.g. options open on a phone) */
.overlay-screen {
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.overlay-screen .title-card {
  margin: auto 0;
}

/* =====================================================================
   CUT-PAPER DIORAMA THEME
   Every UI piece is a cut sheet: card colour + fibre texture (--fibre is set
   from the paper kit at start-up), a lit top-left edge, a dark bottom-right
   edge and a two-part drop shadow onto whatever is behind it.
   ===================================================================== */
:root {
  --cream: #f3ecdc;
  --cream-hi: #fbf6ea;
  --ink: #2b2d5a;
  --coral: #e8604a;
  --gold: #f2b545;
  --teal: #58b0a6;
  --text-primary: #2b2d5a;
  --text-secondary: #4c5590;
  --accent-warm: #e8604a;
  --accent-warm-hover: #d9473b;
  --font-serif: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  --font-sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-cut: 'Archivo Black', 'Arial Black', Impact, sans-serif;
  --fibre: none;
  --sheet-shadow: 0.8px 1.4px 2.5px rgba(10, 6, 20, 0.38), 4px 5.6px 13px rgba(14, 10, 30, 0.5);
  --sheet-shadow-high: 0.8px 1.4px 2.5px rgba(10, 6, 20, 0.38), 8px 12px 26px rgba(14, 10, 30, 0.5);
  --sheet-rim: inset 1.3px 1.6px 0 rgba(255, 247, 232, 0.38), inset -1.1px -1.3px 0 rgba(0, 0, 0, 0.28);
}
html, body { background-color: #2b2d5a; }
#atmosphere-overlay { display: none; } /* the canvas runs the lamp light and vignette itself */

.stat-pill, .whisper, .breeze-zone, .biome-chip, .primary-btn, .secondary-btn, .subtitle-eyebrow,
.title-description, .controls-footnote, .options-menu summary, .options-list, .bloom-mini,
.title-card.compact, .main-title, .new-record-badge, .summary-item {
  background-image: var(--fibre);
  background-size: 340px 340px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: var(--sheet-shadow), var(--sheet-rim);
}

/* ---- HUD: paper tags with a number tile ---- */
.hud-stats { gap: clamp(8px, 1.6vw, 22px); }
.stat-pill {
  background-color: var(--cream-hi);
  border-radius: 3px;
  padding: 6px 8px 6px 14px;
  align-items: center;
  gap: 10px;
}
.stat-pill:nth-child(1) { transform: rotate(-1.2deg); }
.stat-pill:nth-child(2) { transform: rotate(0.6deg); }
.stat-pill:nth-child(3) { transform: rotate(-0.5deg); }
.stat-label {
  font-family: var(--font-cut);
  font-weight: 400;
  font-size: clamp(11px, 1.5vw, 19px);
  letter-spacing: 0.04em;
  color: var(--ink);
}
.stat-value {
  font-family: var(--font-cut);
  font-weight: 400;
  font-size: clamp(17px, 2.5vw, 32px);
  line-height: 1;
  color: var(--coral);
  background-color: var(--cream);
  background-image: var(--fibre);
  background-size: 340px 340px;
  padding: 5px 9px 4px;
  border-radius: 2px;
  box-shadow: 0.8px 1.4px 2.5px rgba(10, 6, 20, 0.38), 2.5px 3.6px 8px rgba(14, 10, 30, 0.4), var(--sheet-rim);
  transform: rotate(1.4deg);
  display: inline-block;
}
.stat-pill:nth-child(3) .stat-value { color: #c98a1c; }
.stat-pill.low-altitude { background-color: #f6c7b8; }
.stat-pill.low-altitude .stat-value, .stat-pill.low-altitude .stat-label { color: #b5372f; }
.stat-pill.above-trees { background-color: #cfe8e2; border: none; }
.stat-pill.above-trees .stat-label { color: #2f7f86; }
/* a swapped tile: the new number drops on */
.stat-value.tile-pop { animation: tile-pop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes tile-pop { 0% { transform: translateY(-14px) rotate(-4deg) scale(1.12); } 100% { transform: rotate(1.4deg); } }

/* ---- in-world message: a paper tag dropped onto the scene ---- */
.whisper {
  top: auto;
  bottom: max(104px, calc(env(safe-area-inset-bottom, 0px) + 104px));
  background-color: var(--cream-hi);
  border-radius: 3px;
  padding: 10px 20px 9px;
  font-family: var(--font-cut);
  font-style: normal;
  font-size: clamp(15px, 2.2vw, 28px);
  color: var(--ink);
  box-shadow: var(--sheet-shadow-high), var(--sheet-rim);
  transform: translate(-50%, -46px) rotate(-3deg) scale(1.06);
  transition: opacity 0.18s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}
.whisper.show { transform: translate(-50%, 0) rotate(-0.7deg); box-shadow: var(--sheet-shadow), var(--sheet-rim); }

/* ---- steering tags ---- */
.breeze-zone {
  background-color: var(--cream-hi);
  border-radius: 3px;
  font-family: var(--font-cut);
  font-weight: 400;
  color: var(--ink);
}
.breeze-zone.left-zone { transform: rotate(-1.5deg); }
.breeze-zone.right-zone { transform: rotate(1.5deg); }
.breeze-zone small { font-family: var(--font-sans); font-weight: 600; color: #2f7f86; }
.breeze-icon { color: var(--teal); }
.breeze-zone.active-gust { background-color: var(--gold); }

/* ---- title card: separate cut pieces dropped on the valley ---- */
.title-card {
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 8px;
}
.title-card > * { margin: 0 !important; }
.subtitle-eyebrow {
  display: inline-block;
  background-color: var(--cream-hi);
  color: var(--ink);
  font-family: var(--font-cut);
  font-weight: 400;
  font-size: clamp(11px, 1.6vw, 17px);
  letter-spacing: 0.06em;
  padding: 8px 18px 7px;
  border-radius: 2px;
  transform: rotate(-1deg);
}
.main-title {
  font-family: var(--font-cut);
  font-weight: 400;
  font-size: clamp(46px, 11vw, 112px);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  background-color: var(--cream);
  padding: 0.14em 0.3em 0.1em;
  border-radius: 3px;
  transform: rotate(-1.8deg);
  box-shadow: var(--sheet-shadow-high), var(--sheet-rim);
  white-space: nowrap;
}
.main-title .cut {
  display: inline-block;
  color: var(--coral);
  text-shadow: 0.8px 1.4px 1.5px rgba(10, 6, 20, 0.38), 2.5px 3.6px 6px rgba(14, 10, 30, 0.34), -0.6px -0.8px 0 rgba(255, 247, 232, 0.35);
  animation: cut-drop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.main-title .cut:nth-child(3n + 2) { color: var(--gold); }
.main-title .cut:nth-child(3n) { color: var(--teal); }
.main-title .cut.gap { width: 0.28em; }
@keyframes cut-drop { 0% { opacity: 0; transform: translateY(-70px) scale(1.08) rotate(var(--rot, 0deg)); } 25% { opacity: 1; } 100% { opacity: 1; transform: rotate(var(--rot, 0deg)); } }
.title-description {
  background-color: var(--cream-hi);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
  padding: 12px 18px;
  border-radius: 2px;
  max-width: 520px;
  transform: rotate(0.5deg);
}
.biome-selector { gap: 10px; justify-content: center; }
.biome-chip {
  background-color: var(--cream-hi);
  color: var(--ink);
  font-family: var(--font-cut);
  font-weight: 400;
  font-size: clamp(12px, 1.7vw, 17px);
  border-radius: 2px;
  padding: 9px 15px 8px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
}
.biome-chip:nth-child(odd) { transform: rotate(-1.2deg); }
.biome-chip:nth-child(even) { transform: rotate(1deg); }
.biome-chip:hover { background-color: #fff9ec; transform: translateY(-2px) rotate(0deg); }
.biome-chip.active { background-color: var(--gold); color: var(--ink); box-shadow: var(--sheet-shadow-high), var(--sheet-rim); }
.bloom-mini { background-color: var(--cream-hi); padding: 7px 14px; border-radius: 2px; color: var(--ink); font-weight: 600; transform: rotate(-0.4deg); }
.bloom-bar { background: rgba(43, 45, 90, 0.18); border-radius: 2px; box-shadow: inset 1px 1.5px 2px rgba(14, 10, 30, 0.35); }
.bloom-fill { background: var(--teal); border-radius: 2px; box-shadow: inset 1.3px 1.6px 0 rgba(255, 247, 232, 0.38); }
.primary-btn {
  background-color: var(--coral);
  color: var(--cream-hi);
  font-family: var(--font-cut);
  font-weight: 400;
  font-size: clamp(16px, 2.6vw, 26px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 3px;
  padding: 16px 30px 15px;
  transform: rotate(-1.2deg);
  box-shadow: var(--sheet-shadow-high), var(--sheet-rim);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background-color 0.2s ease;
}
.primary-btn:hover { background-color: #ee6f58; transform: translateY(-3px) rotate(-0.4deg) scale(1.02); box-shadow: 0.8px 1.4px 2.5px rgba(10, 6, 20, 0.38), 11px 16px 30px rgba(14, 10, 30, 0.5), var(--sheet-rim); }
.primary-btn:active { transform: translateY(1px) rotate(-1.2deg) scale(0.99); box-shadow: var(--sheet-shadow), var(--sheet-rim); }
.options-menu summary { background-color: var(--cream-hi); color: var(--ink); font-family: var(--font-cut); font-weight: 400; border-radius: 2px; padding: 8px 14px; }
.options-list { background-color: var(--cream-hi); border-radius: 3px; padding: 6px; }
.option-row { background: none; border: none; border-radius: 2px; }
.option-row:hover { background: rgba(43, 45, 90, 0.08); }
.option-text strong { font-family: var(--font-cut); font-weight: 400; color: var(--ink); }
.option-text small { color: var(--text-secondary); }
.switch { background: rgba(43, 45, 90, 0.25); border-radius: 3px; box-shadow: inset 1px 1.5px 2px rgba(14, 10, 30, 0.35); }
.switch::after { border-radius: 2px; background: var(--cream-hi); box-shadow: 0.8px 1.4px 2.5px rgba(10, 6, 20, 0.45); }
.option-row[aria-checked="true"] .switch { background: var(--teal); }
.controls-footnote { background-color: var(--cream-hi); color: var(--ink); padding: 10px 16px; border-radius: 2px; font-weight: 500; transform: rotate(-0.4deg); }
.controls-footnote strong { color: #b5372f; }

/* ---- landing: one cream results card, numbers as digit tiles ---- */
.title-card.compact {
  background-color: var(--cream-hi);
  border-radius: 3px;
  padding: 30px 28px 26px;
  max-width: 600px;
  gap: 18px;
  transform: rotate(-0.4deg);
  box-shadow: 0.8px 1.4px 2.5px rgba(10, 6, 20, 0.38), 6.3px 9.2px 20px rgba(14, 10, 30, 0.5), var(--sheet-rim);
}
.overlay-screen.active .title-card.compact { animation: card-drop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes card-drop { 0% { transform: translateY(-80px) rotate(-2.5deg) scale(1.06); } 100% { transform: rotate(-0.4deg); } }
.title-card.compact .subtitle-eyebrow { background-color: var(--teal); color: var(--cream-hi); }
.secondary-title { font-family: var(--font-cut); font-weight: 400; font-size: clamp(30px, 6vw, 52px); line-height: 1; text-transform: uppercase; color: var(--ink); }
.new-record-badge { background-color: var(--gold); color: var(--ink); font-family: var(--font-cut); font-weight: 400; text-transform: uppercase; border-radius: 2px; padding: 8px 14px 7px; transform: rotate(2deg); }
.summary-grid { width: 100%; gap: 12px; }
.summary-item { background: none; box-shadow: none; border-radius: 0; padding: 6px 2px; position: relative; }
.summary-num { font-family: var(--font-cut); font-weight: 400; font-size: clamp(26px, 5.4vw, 50px); line-height: 1; color: var(--teal); display: flex; justify-content: center; flex-wrap: nowrap; gap: 1px; position: relative; z-index: 1; }
.summary-item:nth-child(1) .summary-num { color: var(--coral); font-size: clamp(30px, 6.6vw, 64px); }
.summary-item:nth-child(2) .summary-num { color: #c98a1c; }
.summary-num .tile {
  display: inline-block;
  background-color: var(--cream);
  background-image: var(--fibre);
  background-size: 340px 340px;
  padding: 0.12em 0.1em 0.06em;
  border-radius: 2px;
  box-shadow: 0.8px 1.4px 2.5px rgba(10, 6, 20, 0.38), 3.2px 4.5px 10px rgba(14, 10, 30, 0.42), var(--sheet-rim);
  animation: cut-drop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.summary-num .tile.gap { background: none; box-shadow: none; width: 0.2em; padding: 0; }
.summary-lbl { font-family: var(--font-cut); font-weight: 400; font-size: clamp(10px, 1.6vw, 15px); text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink); margin-top: 10px; display: block; }
/* new record: a gold sunburst pops up behind the distance */
.summary-item.record-highlight { background: none; }
.summary-grid:has(.record-highlight) .summary-item:nth-child(1)::before {
  content: "";
  position: absolute;
  left: 50%; top: 38%;
  width: 150%; aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(12deg);
  background: var(--gold) var(--fibre);
  background-size: 340px 340px;
  clip-path: polygon(50% 0%, 56% 21%, 69% 4%, 67% 26%, 85% 15%, 76% 35%, 96% 31%, 81% 46%, 100% 50%, 81% 55%, 96% 69%, 76% 66%, 85% 85%, 67% 75%, 69% 96%, 56% 80%, 50% 100%, 44% 80%, 31% 96%, 33% 75%, 15% 85%, 24% 66%, 4% 69%, 19% 55%, 0% 50%, 19% 46%, 4% 31%, 24% 35%, 15% 15%, 33% 26%, 31% 4%, 44% 21%);
  animation: burst-pop 0.35s 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  z-index: 0;
}
@keyframes burst-pop { 0% { transform: translate(-50%, -50%) rotate(-10deg) scale(0.2); opacity: 0; } 100% { transform: translate(-50%, -50%) rotate(12deg) scale(1); opacity: 1; } }
.crane-icon svg { width: 30px; height: 30px; fill: rgba(43, 45, 90, 0.16); }
.crane-icon.found svg { fill: var(--cream); filter: drop-shadow(0.8px 1.4px 1.2px rgba(10, 6, 20, 0.45)) drop-shadow(2.5px 3.6px 4px rgba(14, 10, 30, 0.4)); }
.crane-note, .bloom-head, .bloom-foot { color: var(--ink); font-weight: 600; }
.bloom-panel { width: 100%; }
.action-row { gap: 14px; }
.secondary-btn { background-color: var(--cream); color: var(--ink); font-family: var(--font-cut); font-weight: 400; border-radius: 2px; transform: rotate(0.6deg); }
.secondary-btn strong { color: #2f7f86; }
.secondary-btn:hover { background-color: #fff9ec; transform: translateY(-2px) rotate(0deg); }

@media (max-width: 640px) {
  .stat-pill { flex-direction: column; gap: 3px; padding: 5px 7px; }
  .title-card { gap: 12px; padding: 12px 4px; border-radius: 0; }
  .title-card.compact { padding: 22px 16px 18px; border-radius: 3px; gap: 14px; }
  .title-description { font-size: 13px; padding: 9px 14px; }
  .controls-footnote { font-size: 11.5px; }
  .whisper { white-space: normal; text-align: center; width: max-content; }
}
@media (max-height: 520px) {
  .title-card { gap: 8px; padding: 8px 4px; }
  .main-title { font-size: clamp(34px, 12vh, 60px); }
  .title-description { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .main-title .cut, .summary-num .tile, .overlay-screen.active .title-card.compact, .stat-value.tile-pop { animation: none; }
}
