/* Lunchbox Logic site tokens. Generated by gen/palette.py from the game cloths. */
/* Registered so the gingham colours and size can transition between sections. */
@property --g-base { syntax: "<color>"; inherits: true; initial-value: #fff8f0; }
@property --g-v { syntax: "<color>"; inherits: true; initial-value: #fff8f0; }
@property --g-h { syntax: "<color>"; inherits: true; initial-value: #fff8f0; }
@property --g-x { syntax: "<color>"; inherits: true; initial-value: #fff8f0; }
@property --g-accent { syntax: "<color>"; inherits: true; initial-value: #fff8f0; }
@property --g-accent-text { syntax: "<color>"; inherits: true; initial-value: #fff8f0; }
@property --g-size { syntax: "<length>"; inherits: true; initial-value: 72px; }
:root {
  --cream: #fff8f0;
  --ink: #1c1915;
  --ink-soft: #5a4a3a;
  --coral: #e25b66;
  --coral-dark: #b8323c;
  --star: #f3b33d;
  --daily-green: #3f7d4e;
  --wicker: #c8955a;
  --wicker-edge: #7a4f25;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-ui: "Nunito", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  /* type scale 1.25, base 18px */
  --step--1: 0.9rem; --step-0: 1.125rem; --step-1: 1.4rem; --step-2: 1.75rem; --step-3: 2.2rem; --step-4: 2.75rem; --step-5: clamp(2.75rem, 6vw + 1rem, 5.4rem);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 72px; --space-9: 112px;
  --radius-s: 10px; --radius-m: 18px; --radius-l: 28px; --radius-pill: 999px;
  --shadow-card: 0 2px 0 rgba(60,35,15,.18), 0 14px 30px -12px rgba(60,35,15,.35);
  --ease-out: cubic-bezier(.2,.8,.2,1); --ease-bounce: cubic-bezier(.34,1.56,.64,1);
}
[data-pack="uk"] {
  --g-base: #fdf1e1; --g-v: #f9c6b9; --g-h: #f9c6b9; --g-x: #ec8a84;
  --g-accent: #b8323c; --g-accent-text: #b8323c; --g-size: 72px;
}
[data-pack="usa"] {
  --g-base: #fdf0e0; --g-v: #f08a8c; --g-h: #f08a8c; --g-x: #d64648;
  --g-accent: #a8232c; --g-accent-text: #a8232c; --g-size: 72px;
}
[data-pack="fr"] {
  --g-base: #feedd9; --g-v: #8b9bb3; --g-h: #fbd8a0; --g-x: #516b8c;
  --g-accent: #2c4170; --g-accent-text: #2c4170; --g-size: 96px;
}
[data-pack="de"] {
  --g-base: #fdf0d9; --g-v: #ecba76; --g-h: #a2aa78; --g-x: #647648;
  --g-accent: #355a33; --g-accent-text: #355a33; --g-size: 72px;
}
[data-pack="se"] {
  --g-base: #fef3e0; --g-v: #d4dfe6; --g-h: #f9e3ba; --g-x: #b0c6dc;
  --g-accent: #355f94; --g-accent-text: #355f94; --g-size: 72px;
}
[data-pack="more"] {
  --g-base: #fdf7ec; --g-v: #f0e6d4; --g-h: #f0e6d4; --g-x: #e2d4bc;
  --g-accent: #7f6c4a; --g-accent-text: #7f6c4a; --g-size: 72px;
}

/* CSS gingham: 4 solid tones, 50% duty, stripe on the first half of each period. */
.gingham {
  background-color: var(--g-base);
  background-image:
    /* woven hairline texture, 2 threads per 6px, very low alpha */
    repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(60,35,15,.045) 0 1px, transparent 1px 3px),
    /* crossing (top-left quadrant of each period) */
    conic-gradient(from 270deg at 50% 50%, var(--g-x) 0 25%, transparent 0 100%),
    /* horizontal band, top half */
    linear-gradient(180deg, var(--g-h) 50%, transparent 0),
    /* vertical band, left half */
    linear-gradient(90deg, var(--g-v) 50%, transparent 0);
  background-size: auto, auto, var(--g-size) var(--g-size), var(--g-size) var(--g-size), var(--g-size) var(--g-size);
  transition: --g-base .9s var(--ease-out), --g-v .9s var(--ease-out), --g-h .9s var(--ease-out), --g-x .9s var(--ease-out), --g-size .9s var(--ease-out), --g-accent .9s, --g-accent-text .9s;
}
@media (prefers-reduced-motion: reduce) { .gingham { transition: none; } }

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-var-latin.woff2") format("woff2"); font-weight: 500 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-italic-latin.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito-var-latin.woff2") format("woff2"); font-weight: 500 900; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 600 var(--step-0)/1.55 var(--font-ui); color: var(--ink); background: var(--cream); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.015em; margin: 0 0 .4em; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 0; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; box-shadow: 0 0 0 6px var(--cream); }
.foot :focus-visible { outline-color: var(--cream); box-shadow: 0 0 0 6px var(--ink); }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }
.eyebrow { font-weight: 900; text-transform: uppercase; letter-spacing: .12em; font-size: var(--step--1); color: var(--g-accent-text); margin-bottom: .6em; }
.lead { font-size: var(--step-1); line-height: 1.45; font-weight: 600; max-width: 34ch; }
.small { font-size: var(--step--1); color: var(--ink-soft); }

/* ---------- the cloth ---------- */
/* Motion mode: one fixed cloth behind everything, recoloured per section by JS. */
.cloth { position: fixed; inset: 0; z-index: -1; }
/* Static mode (no JS, reduced motion, or the mockup): every section paints its own cloth. */
html:not(.js) [data-section], html.static [data-section] { background-color: var(--g-base); background-image: var(--static-cloth); }
html:not(.js) .cloth, html.static .cloth { display: none; }
[data-section] { --static-cloth:
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(60,35,15,.04) 0 1px, transparent 1px 3px),
    conic-gradient(from 270deg at 50% 50%, var(--g-x) 0 25%, transparent 0 100%),
    linear-gradient(180deg, var(--g-h) 50%, transparent 0),
    linear-gradient(90deg, var(--g-v) 50%, transparent 0);
  background-size: auto, auto, var(--g-size) var(--g-size), var(--g-size) var(--g-size), var(--g-size) var(--g-size);
  position: relative; }

/* Cream panels carry all body text (ink on cream = 16.6:1). Never set text straight on the checks. */
.panel, .hero-copy, .recipe, .etiquette, .label, .daily-panel, .plain, .more-copy, .tour-intro > * {
  background: color-mix(in srgb, var(--cream) 94%, transparent); border-radius: var(--radius-l); box-shadow: var(--shadow-card); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--space-5); padding: 10px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--cream) 92%, transparent); border-bottom: 2px dashed color-mix(in srgb, var(--g-accent) 45%, transparent);
  transition: --g-accent .9s var(--ease-out); }
.lockup { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.lockup img:first-child { border-radius: 12px; }
.top nav { display: flex; gap: var(--space-5); margin-left: auto; font-weight: 800; }
.top nav a { text-decoration: none; padding: 6px 2px; border-bottom: 3px solid transparent; }
.top nav a:hover { border-color: var(--g-accent); }
.chip { margin: 0; font-size: var(--step--1); padding: 6px 14px; border-radius: var(--radius-pill); background: var(--ink); color: var(--cream); white-space: nowrap; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-5); align-items: center; padding: clamp(32px, 6vw, 96px) clamp(16px, 4vw, 64px) clamp(64px, 9vw, 140px); min-height: min(92vh, 900px); }
.hero-copy { grid-column: 1 / 7; grid-row: 1; padding: clamp(24px, 3.4vw, 56px); transform: rotate(-1.2deg); position: relative; z-index: 2; }
.hero h1 { font-size: var(--step-5); font-weight: 800; }
.hero h1 em { font-style: italic; font-weight: 600; color: var(--g-accent-text); display: block; }
.stores { list-style: none; padding: 0; margin: var(--space-5) 0 var(--space-3); display: flex; gap: var(--space-3); flex-wrap: wrap; }
.stores li { border: 2px solid var(--ink); border-radius: var(--radius-m); padding: 8px 16px; font-size: var(--step--1); font-weight: 700; color: var(--ink-soft); }
.stores span { display: block; font-size: var(--step-0); font-weight: 900; color: var(--ink); }
.hero-art { grid-column: 6 / 13; grid-row: 1; position: relative; aspect-ratio: 1 / 1.02; }
.arch { position: absolute; inset: 0 0 18% 14%; border-radius: 999px 999px var(--radius-l) var(--radius-l); overflow: hidden; border: 8px solid var(--cream); box-shadow: var(--shadow-card); }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.hamper { position: absolute; left: 0; bottom: -6%; width: 78%; z-index: 2; filter: drop-shadow(0 18px 18px rgba(60,35,15,.28)); }
.float { position: absolute; z-index: 3; filter: drop-shadow(0 10px 10px rgba(60,35,15,.25)); }
.f1 { right: 4%; top: 8%; width: 18%; rotate: 12deg; }
.f2 { right: -2%; bottom: 22%; width: 22%; rotate: -18deg; }
.f3 { left: 6%; top: 10%; width: 15%; rotate: -8deg; }

/* ---------- how it plays ---------- */
.play { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-6) var(--space-5); padding: var(--space-9) clamp(16px, 4vw, 64px); align-items: start; }
.recipe { grid-column: 1 / 7; padding: clamp(24px, 3vw, 48px); transform: rotate(.8deg); }
.recipe h2 { font-size: var(--step-4); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: var(--space-6) 0 0; display: grid; gap: var(--space-5); }
.steps li { counter-increment: s; position: relative; padding-left: 76px; min-height: 64px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -4px; font: 800 3.6rem/0.9 var(--font-display); color: var(--g-accent-text); }
.steps b { display: block; font-size: var(--step-1); font-family: var(--font-display); }
.board-wrap { grid-column: 7 / 13; margin: var(--space-7) 0 0; }
.board { --cell: clamp(48px, 6.2vw, 88px); position: relative; display: grid; grid-template-columns: repeat(5, var(--cell)); grid-template-rows: repeat(5, var(--cell)); gap: 4px; padding: 14px; width: max-content; margin-inline: auto;
  background: repeating-linear-gradient(90deg, #d9a96a 0 6px, #c8955a 6px 12px), #c8955a; border: 6px solid var(--wicker-edge); border-radius: 22px; box-shadow: var(--shadow-card); rotate: -2deg; }
.board::before { content: ""; grid-area: 1 / 1 / 6 / 6; background: repeating-linear-gradient(0deg, transparent 0 calc(var(--cell) - 2px), rgba(122,79,37,.35) 0 calc(var(--cell) + 2px)); border-radius: 10px; }
.cell { grid-row: var(--r); grid-column: var(--c); border-radius: 10px; }
.cell.wicker { background: repeating-linear-gradient(45deg, #b07a43 0 5px, #c8955a 5px 10px); box-shadow: inset 0 0 0 2px var(--wicker-edge); }
.piece { grid-row: var(--r) / span var(--h); grid-column: var(--c) / span var(--w); border-radius: 12px; display: grid; place-items: center; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), 0 2px 0 rgba(0,0,0,.2); }
.piece img { width: min(100%, calc(var(--cell) * 1.1)); }
.g-savoury { background: linear-gradient(160deg, #e8742a, #d35400); } .g-fruit { background: linear-gradient(160deg, #22a88d, #148f77); }
.g-sweet { background: linear-gradient(160deg, #d97aa1, #c45b86); } .g-dairy { background: linear-gradient(160deg, #e6b83a, #d4a017); }
.g-drinks { background: linear-gradient(160deg, #4f9fd6, #2e86c1); }
.ghost { opacity: .9; outline: 3px dashed var(--cream); outline-offset: -6px; translate: 14px -18px; rotate: 4deg; box-shadow: 0 16px 20px rgba(60,35,15,.35); }
.wall { grid-area: 1 / 3 / 6 / 3; justify-self: end; width: 6px; margin-right: -5px; background: var(--wicker-edge); border-radius: 3px; z-index: 1; }
.board-wrap figcaption { text-align: center; font-size: var(--step--1); color: var(--ink-soft); margin-top: var(--space-5); background: var(--cream); width: max-content; margin-inline: auto; padding: 4px 12px; border-radius: 999px; }
.etiquette { grid-column: 2 / 12; padding: var(--space-6) clamp(20px, 3vw, 48px); display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; grid-template-areas: "h r" "p r"; align-content: start; gap: var(--space-2) var(--space-7); margin-top: var(--space-6); border: 2px dashed var(--g-accent); rotate: -.6deg; }
.etiquette h3 { font-size: var(--step-4); grid-area: h; margin: 0; } .etiquette > p { grid-area: p; } .etiquette .rules { grid-area: r; align-self: center; }
.rules { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.rules li { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px; background: #fff; border-radius: var(--radius-pill); font-weight: 700; box-shadow: 0 1px 0 rgba(60,35,15,.2); }
.rules img { width: 28px; }

/* ---------- tour ---------- */
.tour-intro { padding: var(--space-9) clamp(16px, 4vw, 64px) var(--space-7); display: grid; justify-items: start; gap: var(--space-4); }
.tour-intro > * { padding: 10px 22px; margin: 0; }
.mega { font-size: clamp(3.2rem, 9vw, 8.5rem); font-weight: 800; line-height: .92; padding: 22px 32px !important; transform: rotate(-1.5deg); }
.country { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-5); align-items: center; padding: var(--space-9) clamp(16px, 4vw, 64px); min-height: 92vh; overflow: hidden; }
.index { position: absolute; font: 800 clamp(8rem, 22vw, 22rem)/.8 var(--font-display); color: var(--cream); opacity: .55; margin: 0; top: 4%; pointer-events: none; -webkit-text-stroke: 3px var(--g-accent); }
.label { padding: clamp(24px, 3vw, 44px); position: relative; z-index: 2; border: 3px dashed var(--g-accent); outline: 8px solid var(--cream); }
.pack { font-weight: 900; text-transform: uppercase; letter-spacing: .12em; color: var(--g-accent-text); margin-bottom: .5em; }
.pack span { font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink-soft); }
.label h3 { font-size: clamp(2.1rem, 3.3vw, 3.4rem); }
.menu { font-weight: 800; margin: 0; }
.menu span { display: block; font-size: var(--step--1); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); }
.scene { position: relative; }
.vignette { display: block; filter: drop-shadow(0 20px 18px rgba(60,35,15,.25)); }
.badge { position: absolute; width: clamp(90px, 10vw, 150px); z-index: 2; filter: drop-shadow(0 8px 8px rgba(60,35,15,.25)); }
.items { list-style: none; padding: 0; margin: 0; display: flex; gap: 6px; position: relative; z-index: 3; }
.items li { width: clamp(52px, 5.6vw, 80px); background: var(--cream); border-radius: 18px; padding: 4px; box-shadow: 0 3px 0 rgba(60,35,15,.18); }
.items li:nth-child(odd) { rotate: -4deg; } .items li:nth-child(even) { rotate: 3deg; translate: 0 8px; }
.items.inline { margin-top: var(--space-5); } .items.inline li { width: 56px; }
.ribbon { position: absolute; top: -16px; right: 28px; margin: 0; background: var(--coral-dark); color: var(--cream); font-weight: 900; padding: 6px 18px; border-radius: 6px; rotate: 4deg; letter-spacing: .05em; }

/* variant a: text left (cols 1-5), scene right, index top right */
.v-a .label { grid-column: 1 / 6; } .v-a .scene { grid-column: 6 / 13; } .v-a .index { right: 2%; }
.v-a .badge { left: -4%; top: -6%; } .v-a .items { margin: -40px 0 0 10%; }
/* variant b: scene left large, text right lower */
.v-b .scene { grid-column: 1 / 8; grid-row: 1; } .v-b .label { grid-column: 8 / 13; grid-row: 1; align-self: end; margin-bottom: 6%; } .v-b .index { left: 2%; top: auto; bottom: 2%; }
.v-b .badge { right: 2%; top: -8%; } .v-b .items { margin: -30px 0 0 auto; width: max-content; }
/* variant c (France): awning across the top, big scene centred, label overlaps bottom left */
.v-c { padding-top: 0; align-items: start; }
.v-c .awning { grid-column: 1 / -1; margin: 0 calc(-1 * clamp(16px, 4vw, 64px)) var(--space-6); }
.v-c .awning img { width: 100%; }
.v-c .scene { grid-column: 4 / 13; grid-row: 2; } .v-c .label { grid-column: 1 / 7; grid-row: 2; align-self: end; margin-bottom: -4%; }
.v-c .badge { right: 6%; top: 0; } .v-c .index { right: 3%; top: auto; bottom: 0; }
/* variant d (Germany): narrow text left, items in a column, scene */
.v-d .label { grid-column: 1 / 5; } .v-d .scene { grid-column: 5 / 13; display: grid; grid-template-columns: auto 1fr; gap: var(--space-5); align-items: center; }
.v-d .items.column { flex-direction: column; } .v-d .badge { right: 0; bottom: -4%; } .v-d .index { left: 30%; top: 2%; }
/* variant e (Sweden): scene left, label right high */
.v-e .scene { grid-column: 1 / 7; grid-row: 1; } .v-e .label { grid-column: 7 / 12; grid-row: 1; align-self: start; margin-top: 6%; }
.v-e .badge { left: 0; bottom: 6%; } .v-e .items { position: absolute; right: -6%; top: 10%; flex-direction: column; } .v-e .index { right: 2%; bottom: 0; top: auto; }

/* ---------- daily ---------- */
.daily { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-5); padding: var(--space-9) clamp(16px, 4vw, 64px); align-items: center; }
.daily-panel { grid-column: 1 / 8; padding: clamp(28px, 4vw, 64px); background: var(--daily-green); color: var(--cream); position: relative; }
.daily-panel h2 { font-size: var(--step-4); }
.daily-panel .eyebrow { color: var(--cream); }
.daily-panel .dh { position: absolute; right: 28px; top: -36px; width: 88px; background: var(--cream); border-radius: 24px; padding: 8px; rotate: 8deg; box-shadow: var(--shadow-card); }
.note { grid-column: 8 / 12; margin: 0; background: #fff; padding: 22px 24px 26px; border-radius: 6px; rotate: 3deg; box-shadow: var(--shadow-card);
  background-image: repeating-linear-gradient(180deg, transparent 0 31px, #e9dccb 31px 32px); }
.note figcaption { font-size: var(--step--1); font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 8px; }
.note pre { font: 700 1rem/32px var(--font-ui); margin: 0; white-space: pre-wrap; }

/* ---------- small print ---------- */
.print { padding: var(--space-9) clamp(16px, 4vw, 64px) var(--space-7); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-5); }
.print h2 { grid-column: 1 / 5; font-size: var(--step-4); align-self: start; position: sticky; top: 110px; background: var(--cream); padding: 22px 26px; border-radius: var(--radius-l); box-shadow: var(--shadow-card); rotate: -2deg; }
.plain { grid-column: 5 / 13; margin: 0; padding: var(--space-6) clamp(24px, 3vw, 48px); columns: 2 280px; column-gap: var(--space-7); }
.plain div { break-inside: avoid; padding: 0 0 var(--space-5) 34px; position: relative; }
.plain div::before { content: ""; position: absolute; left: 0; top: .35em; width: 20px; height: 20px; background: url("../img/ui/status-met.webp") center / contain no-repeat; }
.plain dt { font: 700 var(--step-1)/1.2 var(--font-display); }
.plain dd { margin: 4px 0 0; }

/* ---------- more coming ---------- */
.more { padding: var(--space-8) clamp(16px, 4vw, 64px) var(--space-9); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-5); align-items: center; }
.more-card { grid-column: 2 / 5; grid-row: 1; aspect-ratio: 4 / 3; border-radius: var(--radius-l); border: 4px dashed #b8a47e; background: color-mix(in srgb, var(--cream) 80%, transparent); display: grid; place-items: center; rotate: -4deg; }
.more-card span { font: 800 6rem/1 var(--font-display); color: #b8a47e; }
.locked { grid-column: 4 / 7; grid-row: 1; width: 100%; max-width: 240px; justify-self: center; z-index: 2; rotate: 5deg; filter: drop-shadow(0 14px 12px rgba(60,35,15,.28)); }
.more-copy { grid-column: 7 / 12; padding: clamp(24px, 3vw, 44px); }
.more-copy h2 { font-size: var(--step-4); }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: var(--cream); padding: var(--space-8) clamp(16px, 4vw, 64px); display: grid; gap: 6px; }
.foot img { filter: brightness(0) invert(.96) sepia(.2); margin-bottom: var(--space-4); }
.foot .big { font: 700 var(--step-3)/1.1 var(--font-display); max-width: 18ch; margin-bottom: var(--space-4); }
.foot a { font-weight: 800; text-underline-offset: 3px; } .foot .small { color: #d9cdbd; }

/* ---------- motion ---------- */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity .7s var(--ease-out), translate .7s var(--ease-out); }
.js .reveal.is-in { opacity: 1; translate: 0 0; }
.js .drop { opacity: 0; translate: 0 -60px; }
.js .is-in .drop { animation: drop .7s var(--ease-bounce) calc(var(--i) * 140ms + 200ms) both; }
@keyframes drop { 0% { opacity: 0; translate: 0 -70px; } 60% { opacity: 1; translate: 0 6px; } 80% { translate: 0 -3px; } 100% { opacity: 1; translate: 0 0; } }
.items li, .badge, .float, .rules li { transition: rotate .3s var(--ease-bounce), scale .3s var(--ease-bounce); }
.items li:hover, .badge:hover, .rules li:hover { animation: wobble .5s var(--ease-out); }
@keyframes wobble { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-6deg) scale(1.06); } 60% { transform: rotate(4deg) scale(1.04); } }
.float { animation: bob 6s ease-in-out infinite alternate; }
.f2 { animation-delay: -2s; } .f3 { animation-delay: -4s; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-12px); } }
/* Parallax: JS (or CSS scroll timeline) writes --p in [-1, 1] per section; each layer moves by depth. */
.layer { translate: 0 calc(var(--p, 0) * var(--depth, 0) * 120px); }
html.js:not(.static) .layer { will-change: translate; }
@supports (animation-timeline: view()) {
  html.js.sdt [data-section] .layer { animation: px linear both; animation-timeline: view(); }
  /* Bob and the scroll timeline are separate animations, so the floats keep both. */
  html.js.sdt [data-section] .float.layer {
    animation-name: bob, px;
    animation-duration: 6s, auto;
    animation-timing-function: ease-in-out, linear;
    animation-iteration-count: infinite, 1;
    animation-direction: alternate, normal;
    animation-fill-mode: none, both;
    animation-timeline: auto, view();
    animation-delay: 0s, 0s;
  }
  html.js.sdt [data-section] .f2.layer { animation-delay: -2s, 0s; }
  html.js.sdt [data-section] .f3.layer { animation-delay: -4s, 0s; }
  @keyframes px { from { translate: 0 calc(var(--depth, 0) * 120px); } to { translate: 0 calc(var(--depth, 0) * -120px); } }
}

html.static .layer, html.static .float { translate: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cloth { display: none; }
  .top { transition: none; }
  [data-section] { background-color: var(--g-base); background-image: var(--static-cloth); }
  .layer, .float, html.js.sdt [data-section] .layer, html.js.sdt [data-section] .float.layer { translate: none !important; animation: none !important; }
  .js .reveal { translate: none; transition: opacity .4s linear; }
  .js .drop, .js .is-in .drop { opacity: 1; translate: none; animation: none; }
  .items li:hover, .badge:hover, .rules li:hover { animation: none; }
}

/* ---------- narrow screens ---------- */
@media (max-width: 899px) {
  .top { flex-wrap: wrap; gap: 8px 16px; } .top nav { order: 3; width: 100%; margin: 0; gap: 18px; overflow-x: auto; font-size: var(--step--1); }
  .chip { margin-left: auto; font-size: .78rem; padding: 5px 10px; }
  .lockup img:last-child { width: 140px; }
  .hero, .play, .country, .daily, .print, .more { grid-template-columns: 1fr; padding-block: var(--space-8); }
  .hero > *, .play > *, .country > *, .daily > *, .print > *, .more > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .hero { min-height: 0; padding-top: var(--space-6); }
  .hero-copy { transform: none; } .hero-art { order: -1; max-width: 460px; justify-self: center; width: 100%; margin-bottom: -8%; }
  .recipe, .label { transform: none; }
  .board { --cell: min(58px, calc((100vw - 90px) / 5)); }
  .etiquette { grid-template-columns: 1fr; } .etiquette h3 { grid-row: auto; }
  .country { min-height: 0; gap: var(--space-4); }
  .country .scene { order: -1; } .v-d .scene { grid-template-columns: 1fr; } .v-d .items.column { flex-direction: row; order: 2; }
  .v-e .items { position: relative; right: auto; top: auto; flex-direction: row; }
  .v-c .awning { order: -2; margin-bottom: 0; } .v-c .label { margin-bottom: 0; }
  .items { flex-wrap: wrap; margin: -20px 0 0 !important; justify-content: center; width: auto !important; }
  .index { font-size: 9rem; top: 1% !important; bottom: auto !important; right: 4% !important; left: auto !important; }
  .print h2 { position: static; rotate: 0deg; }
  .more-card { width: 70%; justify-self: start; } .locked { margin-top: -30%; justify-self: end; max-width: 180px; }
  .note { rotate: 1.5deg; }
}

/* ---------- v2: vary the label treatment so the five countries don't read as one repeated card ---------- */
.v-b .label { background: var(--g-accent); color: var(--cream); border: 0; outline: 0; rotate: 1.5deg; }
.v-b .label .pack, .v-b .label .pack span, .v-b .label .menu span { color: #ffe9e4; }
.v-c .label { border-style: solid; border-width: 0 0 0 10px; border-color: var(--g-accent); outline: 0; border-radius: 6px var(--radius-l) var(--radius-l) 6px; }
.v-c .label h3 { font-size: clamp(2.4rem, 4.2vw, 4.4rem); }
.v-d .label { border: 0; outline: 0; rotate: -1.5deg; border-radius: 4px; box-shadow: 8px 8px 0 var(--g-accent); }
.v-e .label { border: 0; outline: 4px solid var(--g-accent); outline-offset: -14px; }
.hero-packs { display: flex; gap: 6px; align-items: center; margin: var(--space-5) 0 0; padding: 0; list-style: none; flex-wrap: wrap; font-weight: 800; font-size: var(--step--1); }
.hero-packs img { width: 40px; height: 40px; }
.hero-packs li { display: flex; align-items: center; gap: 6px; padding-right: 10px; }
[data-section] { overflow-x: clip; }
/* The small-print heading sticks to the viewport, so this section must not clip. */
.print { overflow: visible; }
@media (max-width: 899px) {
  .top nav { display: none; }
  .chip span { display: none; }
  .items.inline { margin: var(--space-4) 0 0 !important; justify-content: flex-start; }
  .v-b .label, .v-d .label { rotate: 0deg; }
  body.policy-body .top nav { display: flex; flex-wrap: wrap; }
}

/* ---------- privacy ---------- */
body.policy-body { background: var(--cream); }
body.policy-body .top {
  background-color: var(--g-base);
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(60,35,15,.045) 0 1px, transparent 1px 3px),
    conic-gradient(from 270deg at 50% 50%, var(--g-x) 0 25%, transparent 0 100%),
    linear-gradient(180deg, var(--g-h) 50%, transparent 0),
    linear-gradient(90deg, var(--g-v) 50%, transparent 0);
  background-size: auto, auto, var(--g-size) var(--g-size), var(--g-size) var(--g-size), var(--g-size) var(--g-size);
}
.policy { width: min(68ch, calc(100% - 32px)); margin: var(--space-7) auto var(--space-8); }
.policy h1 { font-size: var(--step-4); font-weight: 800; }
.policy h2 { font-size: var(--step-2); margin-top: 1.5em; }
.policy .updated { color: var(--ink-soft); font-size: var(--step--1); }
.policy a { color: var(--g-accent-text); font-weight: 800; text-underline-offset: 3px; }
.policy ul { padding-left: 1.2em; }
.policy li { margin: .45em 0; }
.policy li::marker { color: var(--g-accent-text); }
@media (max-width: 899px) {
  body.policy-body .chip span { display: inline; }
}
