/* ==========================================================================
   The Wrong-Address Dabba — Design System & Responsive Stylesheet
   Palette: Warm Cream, Turmeric Yellow, Stainless-Steel Grey, Chai Brown,
            Muted Marigold, Subtle Pink (WCAG 2.2 AA Contrast Verified)
   ========================================================================== */

:root {
  --bg-cream: #fff8ec;
  --bg-paper: #fdf0d5;
  --bg-card: #fffdf8;
  --bg-steel-light: #f2f5f8;
  --bg-steel-mid: #cfd7e0;
  --bg-steel-dark: #8793a1;

  --ink-primary: #2b1810;
  --ink-secondary: #5c3a28;
  --ink-muted: #6e4530;

  --turmeric: #f2a900;
  --turmeric-soft: #fde39b;
  --turmeric-border: #c47b00;
  --marigold: #e06d1b;
  --terracotta: #9c4106;
  --chai-brown: #4a2c1d;
  --pink-soft: #f6ced3;
  --pink-accent: #e88d96;
  --berry-deep: #8c2d3b;
  --leaf-green: #246a3b;
  --leaf-soft: #dff4e5;

  --font-display: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, 'Noto Serif Devanagari', 'Noto Serif Kannada', serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Devanagari', 'Noto Sans Kannada', 'Nirmala UI', sans-serif;
  --font-mono: 'Cascadia Mono', 'Consolas', 'Courier New', monospace;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-soft: 0 10px 26px rgba(74, 44, 29, 0.1);
  --shadow-card: 0 4px 0 rgba(43, 24, 16, 0.9);
  --shadow-btn: 0 4px 0 #2b1810;

  --container-max: 1120px;
}

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

html {
  background-color: var(--bg-cream);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-cream);
  background-image:
    radial-gradient(circle at 12% 14%, rgba(242, 169, 0, 0.14) 0, rgba(242, 169, 0, 0) 28%),
    radial-gradient(circle at 88% 18%, rgba(232, 141, 150, 0.16) 0, rgba(232, 141, 150, 0) 26%),
    radial-gradient(circle at 80% 86%, rgba(224, 109, 27, 0.11) 0, rgba(224, 109, 27, 0) 32%);
  color: var(--ink-primary);
  overflow-x: clip;
  position: relative;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--terracotta);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

a:hover {
  color: var(--chai-brown);
}

:focus-visible {
  outline: 3px solid var(--ink-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--turmeric);
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--turmeric);
  color: var(--ink-primary);
  font-weight: 700;
  padding: 0.75rem 1.1rem;
  border: 2.5px solid var(--ink-primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Decorative Ambient Background ---------- */
.bg-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-float {
  position: absolute;
  opacity: 0.28;
  will-change: transform;
}

.bg-float--receipt-1 {
  top: 9%;
  left: 2%;
  width: 58px;
  transform: rotate(-14deg);
  animation: petalFloat 9s ease-in-out infinite;
}

.bg-float--marigold-1 {
  top: 18%;
  right: 3%;
  width: 44px;
  animation: petalFloat 11s ease-in-out infinite reverse;
}

.bg-float--marigold-2 {
  bottom: 14%;
  left: 4%;
  width: 38px;
  animation: petalFloat 10s ease-in-out infinite 1.2s;
}

.bg-float--receipt-2 {
  bottom: 8%;
  right: 3%;
  width: 54px;
  transform: rotate(12deg);
  animation: petalFloat 12s ease-in-out infinite 0.5s;
}

.bg-float--bicycle {
  top: 58%;
  left: 1.5%;
  width: 82px;
  opacity: 0.22;
  animation: petalFloat 14s ease-in-out infinite 0.8s;
}

.bg-float--chai {
  top: 52%;
  right: 2%;
  width: 68px;
  opacity: 0.24;
  animation: petalFloat 10.5s ease-in-out infinite reverse;
}

.bg-star {
  position: absolute;
  color: var(--marigold);
  opacity: 0.35;
  font-size: 1.1rem;
  user-select: none;
}

.bg-star--1 { top: 28%; left: 6%; }
.bg-star--2 { top: 44%; right: 6%; }
.bg-star--3 { bottom: 26%; right: 8%; }

/* ---------- Layout Container ---------- */
.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
  flex: 1 0 auto;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  background: var(--bg-card);
  border: 2.5px solid var(--ink-primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 0 rgba(43, 24, 16, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink-primary);
  min-height: 44px;
  padding-right: 0.25rem;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--ink-secondary);
  font-weight: 600;
}

.header-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--turmeric-soft);
  border: 2px solid var(--ink-primary);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.status-pill--offline {
  background: var(--pink-soft);
  border-color: var(--berry-deep);
  color: var(--ink-primary);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--terracotta);
  flex-shrink: 0;
}

.status-pill--ok .status-dot {
  background: var(--leaf-green);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 0.94rem;
  text-decoration: none;
  color: var(--ink-primary);
}

.nav-link:hover {
  background: var(--bg-paper);
  border-color: var(--ink-primary);
}

.nav-link[aria-current="page"] {
  background: var(--turmeric);
  border-color: var(--ink-primary);
}

/* ---------- Language & Sound Toolbar ---------- */
.lang-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink-primary);
  background: var(--bg-cream);
  color: var(--ink-primary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.14s ease;
}

.pill-btn:hover {
  background: var(--bg-paper);
  transform: translateY(-1px);
}

.pill-btn[aria-pressed="true"] {
  background: var(--chai-brown);
  color: var(--bg-cream);
}

.sound-btn[aria-pressed="true"] {
  background: var(--leaf-green);
  color: var(--bg-cream);
}

/* ---------- Offline Notice Banner ---------- */
.offline-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.1rem;
  border-radius: var(--radius-md);
  border: 2.5px solid var(--berry-deep);
  background: var(--pink-soft);
  color: var(--ink-primary);
  font-weight: 600;
}

.offline-banner[hidden] {
  display: none;
}

/* ---------- Hero / Intro Section ---------- */
.hero-404 {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 1.4rem;
}

.error-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.85rem;
  margin-bottom: 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--pink-soft);
  border: 2px solid var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-primary);
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin-top: 0;
  color: var(--ink-primary);
}

.hero-title {
  font-size: clamp(1.7rem, 4.2vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.1vw, 1.15rem);
  color: var(--ink-secondary);
  margin: 0 auto 1.25rem;
  max-width: 62ch;
}

/* ---------- Primary Navigation Controls (Always Visible & Early in DOM) ---------- */
.nav-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  min-width: 44px;
  padding: 0.68rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 2.5px solid var(--ink-primary);
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink-primary);
}

.btn-primary {
  background: var(--turmeric);
  color: var(--ink-primary);
}

.btn-primary:hover {
  background: #ffba1a;
  color: var(--ink-primary);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--ink-primary);
}

.btn-secondary:hover {
  background: var(--bg-paper);
  color: var(--ink-primary);
}

.btn-chai {
  background: var(--chai-brown);
  color: var(--bg-cream);
}

.btn-chai:hover {
  background: #5c3725;
  color: var(--bg-cream);
}

/* ---------- Main 404 Interactive Stage ---------- */
.dabba-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding: 1.35rem;
  background: var(--bg-card);
  border: 3px solid var(--ink-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* Decorative Celebration Layer */
.celebration-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  z-index: 6;
}

.confetti-petal {
  position: absolute;
  top: -24px;
  width: 14px;
  height: 14px;
  border-radius: 70% 10% 70% 10%;
  animation: confettiFall 2.4s cubic-bezier(0.25, 0.7, 0.35, 1) forwards;
}

/* ---------- Left Column: Dabba + Bhaiya + Tag + Mouse ---------- */
.dabba-visual-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem 1rem;
  background: linear-gradient(180deg, #fff6e3 0%, #fdf0d5 100%);
  border: 2px solid rgba(43, 24, 16, 0.22);
  border-radius: var(--radius-md);
}

.unpack-hint {
  margin: 0 0 0.5rem;
  padding: 0.32rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 2px solid var(--ink-primary);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-primary);
  text-align: center;
}

/* Delivery Tag attached to dabba */
.delivery-tag-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin-bottom: 0.65rem;
  display: flex;
  justify-content: center;
}

.delivery-tag {
  position: relative;
  width: 100%;
  padding: 0.65rem 0.9rem 0.7rem;
  background: #fffdf5;
  border: 2.5px solid var(--ink-primary);
  border-radius: 12px;
  box-shadow: 0 4px 0 rgba(43, 24, 16, 0.16);
  transform-origin: top center;
  animation: tagSway 6s ease-in-out infinite;
}

.delivery-tag::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--turmeric);
  border: 2.5px solid var(--ink-primary);
}

.tag-caption {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.2rem;
}

.tag-path-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-paper);
  border: 1.5px dashed var(--ink-secondary);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
}

.tag-path-visual {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  width: 100%;
}

/* Scene wrapper containing Bhaiya + Interactive 3-Tier Dabba + Mouse */
.tiffin-scene {
  position: relative;
  width: 100%;
  max-width: 380px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.35rem;
  padding-top: 1.1rem;
  min-height: 360px;
}

.bhaiya-figure {
  width: 118px;
  flex-shrink: 0;
  margin-bottom: 6px;
}

.bhaiya-figure img {
  width: 100%;
  height: auto;
}

/* Interactive Three-Tier Carrier Frame */
.dabba-carrier {
  position: relative;
  width: 210px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dabba-handle-svg {
  width: 186px;
  height: auto;
  margin-bottom: -8px;
  z-index: 2;
  pointer-events: none;
}

.steam-group {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 34px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dabba-carrier.has-open-tier .steam-group {
  opacity: 1;
}

.steam-wisp {
  fill: none;
  stroke: var(--ink-secondary);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.45;
  animation: steamRise 3s ease-in-out infinite;
}

.steam-wisp--2 {
  animation-delay: 0.9s;
}

/* Tier Stack uses column-reverse so DOM order is Tier 1 -> Tier 2 -> Tier 3
   (matching keyboard unlock sequence from bottom to top!) */
.tier-stack {
  position: relative;
  width: 186px;
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  padding: 8px 10px 12px;
  border-left: 5px solid var(--ink-primary);
  border-right: 5px solid var(--ink-primary);
  border-bottom: 5px solid var(--ink-primary);
  border-radius: 0 0 18px 18px;
  background: rgba(255, 253, 248, 0.45);
}

.tier-btn {
  position: relative;
  width: 100%;
  min-height: 74px;
  padding: 0.5rem 0.65rem;
  border: 2.5px solid var(--ink-primary);
  border-radius: 12px;
  background: linear-gradient(90deg, #bcc6d1 0%, #eef2f6 26%, #ffffff 50%, #dce3eb 76%, #b4bec9 100%);
  color: var(--ink-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  text-align: left;
  box-shadow: 0 4px 0 rgba(43, 24, 16, 0.25);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.tier-btn::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -3px;
  right: -3px;
  height: 9px;
  border-radius: 6px;
  border: 2px solid var(--ink-primary);
  background: linear-gradient(90deg, #74808d 0%, #eef2f6 40%, #bcc6d1 75%, #65707d 100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: left center;
}

.tier-btn[data-tier="1"]::before {
  background: linear-gradient(90deg, #b85b66 0%, #f4a5ae 42%, #d46a78 100%);
}

.tier-btn[data-tier="2"]::before {
  background: linear-gradient(90deg, #c47b00 0%, #ffd257 42%, #f2a900 100%);
}

.tier-btn[data-tier="3"]::before {
  background: linear-gradient(90deg, #a84909 0%, #f79d54 42%, #e06d1b 100%);
}

.tier-btn:hover:not([aria-disabled="true"]):not([aria-expanded="true"]) {
  transform: translateY(-2px);
}

.tier-btn[aria-disabled="true"] {
  background: linear-gradient(90deg, #cfd6de 0%, #e5eaef 50%, #cfd6de 100%);
  border-style: dashed;
  cursor: not-allowed;
}

.tier-btn[aria-expanded="true"] {
  background: linear-gradient(90deg, #f5e2b5 0%, #fffaf0 48%, #f2d89f 100%);
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px rgba(43, 24, 16, 0.16);
}

.tier-btn[aria-expanded="true"]::before {
  transform: translateY(-7px) rotate(-4deg);
}

.tier-btn.is-rattling {
  animation: tierRattle 0.35s ease;
}

.tier-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ink-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  flex-shrink: 0;
  background: var(--turmeric);
  color: var(--ink-primary);
}

.tier-btn[aria-expanded="true"] .tier-badge {
  background: var(--leaf-green);
  color: var(--bg-cream);
}

.tier-btn[aria-disabled="true"] .tier-badge {
  background: var(--bg-steel-mid);
  color: var(--ink-primary);
}

.tier-label-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tier-title {
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1.2;
}

.tier-state {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-primary);
}

/* Hidden Easter Egg Mouse Button */
.mouse-egg-btn {
  position: relative;
  align-self: flex-end;
  width: 58px;
  min-width: 48px;
  min-height: 58px;
  padding: 2px;
  margin-left: -12px;
  margin-bottom: 2px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.mouse-egg-btn:hover {
  transform: translateY(-3px) scale(1.04);
}

.mouse-egg-btn.is-discovered {
  animation: mousePop 0.5s ease;
}

.mouse-egg-tag {
  position: absolute;
  top: -10px;
  right: -2px;
  background: var(--berry-deep);
  color: var(--bg-cream);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink-primary);
}

/* ---------- Right Column: Unpacked Tier Cards & Controls ---------- */
.dabba-panel-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.progress-bar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-paper);
  border: 2px solid var(--ink-primary);
}

.progress-text {
  font-weight: 800;
  font-size: 0.92rem;
}

.progress-pips {
  display: inline-flex;
  gap: 0.35rem;
}

.pip {
  width: 24px;
  height: 10px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink-primary);
  background: var(--bg-card);
}

.pip.is-done {
  background: var(--leaf-green);
}

/* Pre-reserved slots prevent layout shift (CLS = 0) when tiers open */
.tier-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tier-card {
  min-height: 122px;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 2.5px dashed rgba(43, 24, 16, 0.35);
  background: rgba(253, 240, 213, 0.45);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.tier-card.is-revealed {
  border-style: solid;
  border-color: var(--ink-primary);
  background: var(--bg-card);
  box-shadow: 0 3px 0 rgba(43, 24, 16, 0.14);
}

.tier-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.tier-card-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  margin: 0;
}

.tier-card-chip {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink-primary);
  background: var(--bg-paper);
}

.tier-card.is-revealed .tier-card-chip {
  background: var(--leaf-soft);
}

.tier-card-placeholder {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 0.92rem;
}

.tier-card-body[hidden] {
  display: none;
}

.tier-reveal-layout {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tier-reveal-art {
  width: 68px;
  height: auto;
  flex-shrink: 0;
}

.tier-reveal-copy {
  min-width: 0;
  flex: 1;
}

/* Easy One-Tap Sound Activation Bar */
.sound-quick-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.85rem;
  margin: 0 auto 1.25rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink-primary);
  background: var(--turmeric-soft);
  color: var(--ink-primary);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 3px 0 rgba(43, 24, 16, 0.14);
}

.sound-quick-bar.is-sound-on {
  background: var(--leaf-soft);
}

.sound-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.38rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink-primary);
  background: var(--turmeric);
  color: var(--ink-primary);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
}

.sound-quick-bar.is-sound-on .sound-quick-btn {
  background: var(--chai-brown);
  color: var(--bg-cream);
}

.tier-mini-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  object-fit: contain;
}

.scene-doodle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.35rem 0.6rem 0;
  margin-top: 0.45rem;
  border-top: 2px dashed rgba(43, 24, 16, 0.25);
}

.scene-doodle-item {
  width: 58px;
  height: auto;
  opacity: 0.92;
}

.scene-doodle-caption {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-secondary);
  text-align: center;
}

.apology-note {
  margin: 0.25rem 0 0.4rem;
  padding: 0.6rem 0.75rem;
  background: #fff7e1;
  border-left: 4px solid var(--marigold);
  border-radius: 6px;
  font-style: italic;
  font-weight: 600;
}

.suggestion-box {
  margin-top: 0.45rem;
}

.suggestion-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.suggestion-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink-primary);
  background: var(--turmeric);
  color: var(--ink-primary);
  font-weight: 800;
  text-decoration: none;
}

.suggestion-link:hover {
  background: #ffbe26;
}

.delivery-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border: 2.5px solid var(--berry-deep);
  border-radius: 8px;
  color: var(--berry-deep);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  transform: rotate(-2deg);
  margin-bottom: 0.45rem;
  animation: stampDrop 0.35s ease;
}

.panel-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-top: 0.25rem;
}

/* Secret Discovery Cards */
.secret-toast {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  border: 2.5px solid var(--berry-deep);
  background: #fff4f6;
  color: var(--ink-primary);
}

.secret-toast[hidden] {
  display: none;
}

.secret-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
}

/* ---------- Standard Routes Content Styling (/, /about, /projects, /contact) ---------- */
.page-hero {
  background: var(--bg-card);
  border: 3px solid var(--ink-primary);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.page-hero--single {
  grid-template-columns: minmax(0, 1fr);
}

.hero-art {
  max-width: 210px;
  margin: 0 auto;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

.info-card {
  background: var(--bg-card);
  border: 2.5px solid var(--ink-primary);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  box-shadow: 0 4px 0 rgba(43, 24, 16, 0.12);
}

.card-art-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.card-spot-art {
  width: 62px;
  height: auto;
  flex-shrink: 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 1.4rem;
  align-items: center;
}

.contact-art-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.7rem;
  padding: 1rem;
  background: var(--bg-paper);
  border: 2px dashed var(--ink-primary);
  border-radius: var(--radius-md);
}

.info-card h2,
.info-card h3 {
  margin-bottom: 0.5rem;
}

.tag-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink-primary);
  background: var(--turmeric-soft);
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 0.55rem;
}

/* Contact Form */
.dispatch-form {
  display: grid;
  gap: 1rem;
  max-width: 560px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-weight: 800;
}

.form-field input,
.form-field textarea {
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--ink-primary);
  border-radius: var(--radius-sm);
  background: var(--bg-cream);
  min-height: 44px;
}

.form-status {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--leaf-green);
  background: var(--leaf-soft);
  font-weight: 700;
}

.form-status[hidden] {
  display: none;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  padding: 1rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.1rem;
  margin-bottom: 0.45rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
  font-weight: 700;
}

/* ---------- Keyframes ---------- */
@keyframes petalFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(6deg); }
}

@keyframes tagSway {
  0%, 100% { transform: rotate(-1.2deg); }
  50% { transform: rotate(1.2deg); }
}

@keyframes steamRise {
  0% { transform: translateY(6px); opacity: 0; }
  45% { opacity: 0.55; }
  100% { transform: translateY(-12px); opacity: 0; }
}

@keyframes stampDrop {
  0% { transform: scale(1.22) rotate(-6deg); opacity: 0; }
  100% { transform: scale(1) rotate(-2deg); opacity: 1; }
}

@keyframes tierRattle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes mousePop {
  0% { transform: translateY(6px) scale(0.95); }
  50% { transform: translateY(-6px) scale(1.08); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(420px) rotate(320deg);
    opacity: 0;
  }
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 900px) {
  .dabba-stage {
    grid-template-columns: minmax(0, 1fr);
    padding: 1rem;
  }

  .page-hero,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .tier-reveal-layout {
    flex-direction: column;
    align-items: flex-start;
  }

  .tier-mini-icon {
    display: none;
  }
  .page-shell {
    padding: 0.65rem 0.65rem 2rem;
  }

  .site-header {
    padding: 0.65rem 0.75rem;
    border-radius: 18px;
  }

  .tiffin-scene {
    min-height: 310px;
    gap: 0.15rem;
  }

  .bhaiya-figure {
    width: 88px;
  }

  .dabba-carrier {
    width: 178px;
  }

  .dabba-handle-svg {
    width: 162px;
  }

  .tier-stack {
    width: 164px;
    padding: 6px 7px 10px;
  }

  .tier-btn {
    min-height: 68px;
    padding: 0.4rem 0.5rem;
  }

  .mouse-egg-btn {
    width: 48px;
    margin-left: -14px;
  }

  .tier-card {
    min-height: 112px;
  }
}

/* ---------- Accessibility: Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .bg-float,
  .steam-group,
  .celebration-layer {
    display: none !important;
  }

  .delivery-tag {
    transform: none !important;
  }
}
