/* Layout idea: a cut-paper world. Cream paper with a map-doodle backdrop, layered torn hills,
   flags strung across the top, and every answer a chunky paper strip that fills with colour.
   Light only, on purpose. */

:root {
  --font-display: 'Fredoka', ui-rounded, 'Nunito', system-ui, sans-serif;
  --font-body: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --paper: #FBF3E4;
  --card: #FFFCF5;
  --ink: #243230;
  --muted: #5B6A66;
  --line: #EADFC7;

  --teal: #0F8A7A;
  --teal-deep: #0A5F55;
  --tomato: #EE5A36;
  --sun: #FFC233;
  --sky: #41A9F0;
  --leaf: #46B864;
  --grape: #8C55D9;
  --pink: #FF6B9D;

  --h: 178;
  --r: 16px;
  --gutter: clamp(18px, 4.5vw, 48px);
  --shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 2px 0 var(--line), 0 10px 22px -12px rgba(80, 55, 20, .35);
  color-scheme: only light;
}

/* each question wears its own hue */
:root, .hued {
  --accent: oklch(.64 .17 var(--h));
  --lead: oklch(.83 .16 var(--h));
  --soft: oklch(.95 .05 var(--h));
  --mid: oklch(.89 .1 var(--h));
  --deep: oklch(.4 .11 var(--h));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--paper) url('/doodles.svg') center top / 640px 640px repeat;
  color: var(--ink); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
main { flex: 1; outline: none; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--sun); color: var(--ink); }

/* ---------- paper: soft-edged card with a wobbly deckle edge */
.paper { position: relative; isolation: isolate; }
.paper::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--card); border-radius: 22px;
  filter: url(#deckle) drop-shadow(0 10px 14px rgba(80, 55, 20, .16)); pointer-events: none;
}

/* ---------- flags */
.flag { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; background: var(--line); box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(40, 30, 10, .28); }
.flag.sm { width: 24px; height: 24px; box-shadow: 0 0 0 1.5px #fff, 0 1px 4px rgba(40, 30, 10, .25); }
.flag-stack { display: inline-flex; }
.flag-stack .flag { width: 30px; height: 30px; margin-left: -9px; }
.flag-stack .flag:first-child { margin-left: 0; }

/* ---------- header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 18px; position: relative; z-index: 3; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--teal-deep); min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-pin { flex: none; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover .brand-pin { transform: translateY(-3px) rotate(-8deg); }
.nav { display: flex; gap: 6px; flex: none; }
.nav a { text-decoration: none; font-weight: 500; font-size: .98rem; padding: 8px 15px; border-radius: 99px; transition: background-color .2s; }
.nav a:hover { background: rgba(255, 255, 255, .7); }
.nav a[aria-current='page'] { background: var(--teal-deep); color: var(--card); }

/* ---------- view transition */
.view { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(10px); } }

/* ---------- type */
.eyebrow { margin: 0; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; line-height: .98; margin: 0; text-wrap: balance; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 24px; border: 0; border-radius: 99px; background: var(--teal); color: #fff; font-weight: 600; font-size: 1.02rem; text-decoration: none; box-shadow: 0 4px 0 var(--teal-deep), 0 10px 18px -8px rgba(10, 95, 85, .6); transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--teal-deep), 0 14px 20px -8px rgba(10, 95, 85, .6); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--teal-deep); }
.btn.alt { background: var(--card); color: var(--ink); box-shadow: 0 4px 0 var(--line), 0 0 0 2px var(--line) inset; }
.btn.alt:hover { box-shadow: 0 6px 0 var(--line), 0 0 0 2px var(--tomato) inset; }
.link { background: none; border: 0; padding: 4px 0; color: var(--muted); font-size: .95rem; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--line); }
.link:hover { color: var(--ink); text-decoration-color: var(--tomato); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 9px 18px; border-radius: 99px; border: 0; background: var(--card); font-weight: 500; box-shadow: 0 2px 0 var(--line), 0 0 0 2px var(--line) inset; transition: transform .15s, box-shadow .15s; }
.chip:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--line), 0 0 0 2px var(--tomato) inset; }
.chip[aria-pressed='true'] { background: var(--teal-deep); color: var(--card); box-shadow: 0 2px 0 var(--ink); }

/* ================= HERO ================= */
.hero { position: relative; }
.bunting { position: relative; height: 150px; margin-top: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.bunting-string { position: absolute; inset: 0; width: 100%; height: 100%; }
.pennant { position: absolute; top: 0; width: var(--pw, 58px); aspect-ratio: 4 / 5; transform-origin: 50% 0; animation: sway 3.6s ease-in-out infinite alternate; animation-delay: var(--d, 0s); filter: drop-shadow(0 4px 3px rgba(60, 40, 10, .25)); }
.pennant img { display: block; width: 100%; height: 100%; object-fit: cover; clip-path: polygon(0 0, 100% 0, 100% 76%, 50% 100%, 0 76%); }
@keyframes sway { from { rotate: calc(var(--a, 0deg) - 5deg); } to { rotate: calc(var(--a, 0deg) + 5deg); } }

.hero { overflow: hidden; }
.hero-copy { text-align: center; padding-top: clamp(0px, 1vw, 12px); position: relative; z-index: 2; }
.title { font-size: clamp(3.1rem, 12.2vw, 9rem); line-height: .93; filter: drop-shadow(0 6px 5px rgba(80, 50, 10, .22)); }
.title .w { display: inline-block; color: var(--teal-deep); -webkit-text-stroke: .14em #FFFCF5; paint-order: stroke fill; animation: pop .7s cubic-bezier(.2, 1.2, .3, 1) both; }
.title .w2 { color: var(--tomato); rotate: -3deg; animation-delay: .1s; margin-inline: .06em; }
.title .w3 { animation-delay: .2s; }
.title .w4 { color: var(--grape); rotate: 3deg; animation-delay: .3s; }
.hero-sub { max-width: 34ch; margin: 22px auto 0; font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: var(--ink); text-wrap: balance; animation: rise .8s .35s both; }

.sky { position: absolute; left: 0; top: 0; width: 100%; height: clamp(560px, 78vw, 780px); z-index: 0; pointer-events: none; }
.sky .spin { transform-box: fill-box; transform-origin: 50% 50%; animation: spin 70s linear infinite; }
.sky .drift { animation: drift 40s ease-in-out infinite alternate; }
.sky .drift.b { animation-duration: 55s; animation-direction: alternate-reverse; }
.hills { display: block; width: 100%; height: clamp(250px, 30vw, 400px); margin-top: -36px; position: relative; z-index: 0; overflow: visible; }
.hills .spin { transform-box: fill-box; transform-origin: 50% 50%; animation: spin 70s linear infinite; }
.hills .sway { transform-box: fill-box; transform-origin: 50% 100%; animation: bob 3s ease-in-out infinite alternate; }
.hills .wave { transform-box: fill-box; transform-origin: 0 50%; animation: wave 1.8s ease-in-out infinite alternate; }
@keyframes wave { from { transform: skewY(-5deg) scaleX(1); } to { transform: skewY(5deg) scaleX(.93); } }
@keyframes bob { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-9px) rotate(2deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(40px); } }

.finder-wrap { position: relative; z-index: 2; margin-top: clamp(26px, 4vw, 44px); }
.finder { max-width: 720px; margin-inline: auto; padding: clamp(18px, 3vw, 28px); }
.finder-label { display: block; margin: 0 0 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--teal-deep); }
.finder-box { position: relative; }
.finder input {
  width: 100%; padding: 16px 70px 16px 22px; border: 3px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink); outline: none;
  font-family: var(--font-display); font-weight: 500; font-size: clamp(1.2rem, 3.6vw, 1.7rem); transition: border-color .2s, box-shadow .2s;
}
.finder input::placeholder { color: #9AA6A2; }
.finder input:focus { border-color: var(--teal); box-shadow: 0 0 0 5px rgba(15, 138, 122, .16); }
.finder-go { position: absolute; right: 7px; top: 50%; translate: 0 -50%; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--tomato); color: #fff; box-shadow: 0 3px 0 #B63B1D; pointer-events: none; }
.finder-list { position: absolute; z-index: 6; left: 0; right: 0; top: calc(100% + 10px); margin: 0; padding: 8px; list-style: none; background: #fff; border-radius: 22px; box-shadow: 0 0 0 2px var(--line), 0 24px 44px -16px rgba(60, 40, 10, .45); max-height: min(330px, 46vh); overflow: auto; }
.finder-list button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px; border: 0; background: transparent; text-align: left; border-radius: 14px; font-size: 1.1rem; font-weight: 500; }
.finder-list button[aria-selected='true'], .finder-list button:hover { background: var(--soft); }
.finder-done { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 14px 24px; text-align: center; }
.finder-done .display { font-size: clamp(1.7rem, 4.6vw, 2.5rem); font-weight: 600; color: var(--teal-deep); }
.finder-done .flag { width: 56px; height: 56px; }
.hero-meta { margin: 16px 0 0; text-align: center; font-size: .95rem; color: var(--muted); }
.hero-meta b { color: var(--ink); font-weight: 600; }

/* ---------- sections */
.section { margin-top: clamp(40px, 6vw, 72px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1; color: var(--teal-deep); }

.sticker-row { display: flex; flex-wrap: wrap; gap: 12px; }
.sticker { display: inline-flex; align-items: center; gap: 10px; padding: 7px 18px 7px 7px; border-radius: 99px; background: var(--card); text-decoration: none; font-weight: 600; box-shadow: var(--shadow); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); animation: pop .6s both; animation-delay: calc(var(--i, 0) * 60ms); }
.sticker:hover { transform: translateY(-3px) rotate(-2deg); }
.sticker small { color: var(--muted); font-weight: 500; font-size: .85rem; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 800px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.card { display: flex; flex-direction: column; gap: 12px; padding: 20px; min-width: 0; }
.card .block { flex: 1; display: flex; flex-direction: column; }
.card .block-body { flex: 1; display: flex; flex-direction: column; }
.card .duel { flex: 1; }
.card-q { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.05; text-wrap: balance; color: var(--ink); }
.card-q a { text-decoration: none; }
.card-tag { display: inline-flex; align-self: flex-start; padding: 3px 12px; border-radius: 99px; background: var(--soft); color: var(--deep); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* ================= VOTE BLOCK ================= */
.duel { display: flex; gap: 8px; min-height: clamp(112px, 12vw, 136px); }
.duel-opt {
  position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 6px; padding: 12px 14px;
  background: var(--soft); border: 0; border-radius: var(--r); text-align: left; overflow: hidden; box-shadow: 0 4px 0 oklch(.85 .08 var(--h));
  transition: flex-grow .9s cubic-bezier(.2, .8, .2, 1), background-color .5s, transform .15s, box-shadow .15s;
}
.is-in .duel-opt { flex-grow: var(--g); }
.is-vote .duel-opt:hover { transform: translateY(-3px); box-shadow: 0 7px 0 oklch(.8 .1 var(--h)); background: oklch(.92 .08 var(--h)); }
.is-vote .duel-opt:active { transform: translateY(3px); box-shadow: 0 1px 0 oklch(.8 .1 var(--h)); }
.duel-opt.is-lead { background: var(--lead); box-shadow: 0 4px 0 oklch(.7 .15 var(--h)); }
.duel-emoji { font-size: 1.7rem; line-height: 1; }
.duel-label { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 2.2vw, 1.35rem); line-height: 1.05; overflow-wrap: anywhere; color: var(--deep); }
.duel-nums { display: flex; flex-direction: column; gap: 2px; }
.duel-pct { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: .95; color: var(--ink); }
.duel-n { font-size: .8rem; color: var(--deep); opacity: .8; font-variant-numeric: tabular-nums; }
.duel-opt.is-mine { outline: 3px solid var(--ink); outline-offset: -3px; }

.opts { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.opt {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 14px; min-height: 46px;
  background: var(--card); border: 0; border-radius: var(--r); text-align: left; overflow: hidden; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.opt > * { position: relative; z-index: 1; }
.opt-fill { position: absolute !important; z-index: 0 !important; inset: 0 auto 0 0; width: 0; background: var(--mid); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.is-in .opt-fill { width: calc(var(--w) * 1%); }
.opt.is-lead .opt-fill { background: var(--lead); }
.is-vote .opt:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 4px 0 var(--lead), 0 12px 20px -12px rgba(80, 55, 20, .4); }
.is-vote .opt:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.opt.is-mine { outline: 3px solid var(--ink); outline-offset: -3px; }
.opt-rank { width: 1.7em; flex: none; font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--muted); text-align: center; }
.opt-label { flex: 1; min-width: 0; font-weight: 500; font-size: 1rem; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt-swatch { width: 28px; height: 28px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(40, 30, 10, .28); }
.opt-meta { display: flex; align-items: baseline; gap: 10px; font-variant-numeric: tabular-nums; flex: none; }
.opt-meta b { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.opt-emoji { font-size: 1.25rem; line-height: 1; width: 1.5em; text-align: center; flex: none; }
.opt-emoji.big { font-size: 1.6rem; }
.opt-meta small { color: var(--muted); font-size: .8rem; }
.opt-flag-spacer { width: 32px; flex: none; }
.tag { display: inline-block; padding: 1px 10px; border-radius: 99px; background: var(--ink); color: var(--card); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.7; }
.duel-opt .tag { position: absolute; top: 9px; right: 9px; }

.block-search { width: 100%; margin-bottom: 14px; padding: 13px 20px; background: #fff; color: var(--ink); border: 3px solid var(--line); border-radius: 99px; font-size: 1.1rem; outline: none; transition: border-color .2s, box-shadow .2s; }
.block-search:focus { border-color: var(--teal); box-shadow: 0 0 0 5px rgba(15, 138, 122, .16); }
.block-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-top: 16px; min-height: 28px; }
.block-note { color: var(--muted); font-size: .92rem; }
.block.is-busy { opacity: .7; pointer-events: none; }
.empty { padding: 28px 0; color: var(--muted); }

/* podium: the top three countries */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2vw, 18px); align-items: end; margin-bottom: 22px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px 18px; border-radius: 22px; background: var(--card); text-align: center; box-shadow: var(--shadow); animation: pop .7s both; min-width: 0; }
.pod:nth-child(1) { order: 2; padding-top: 26px; padding-bottom: 26px; animation-delay: .05s; }
.pod:nth-child(2) { order: 1; animation-delay: .15s; }
.pod:nth-child(3) { order: 3; animation-delay: .25s; }
.pod .flag { width: clamp(42px, 9vw, 60px); height: clamp(42px, 9vw, 60px); box-shadow: 0 0 0 4px #fff, 0 6px 14px rgba(40, 30, 10, .3); }
.pod:nth-child(1) .flag { width: clamp(52px, 12vw, 78px); height: clamp(52px, 12vw, 78px); }
.pod-medal { display: grid; place-items: center; width: 30px; height: 30px; margin-top: -2px; border-radius: 50%; font-family: var(--font-display); font-weight: 700; color: var(--ink); background: var(--sun); box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.pod:nth-child(2) .pod-medal { background: #D8DEE2; }
.pod:nth-child(3) .pod-medal { background: #F0B58A; }
.pod-name { font-family: var(--font-display); font-weight: 600; font-size: clamp(.95rem, 2.4vw, 1.3rem); line-height: 1.1; overflow-wrap: anywhere; }
.pod-pct { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 3.4vw, 2rem); color: var(--teal-deep); line-height: 1; }
.pod-n { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pod.is-mine { outline: 3px solid var(--ink); }

/* reward: the little thank-you after a vote */
.reward { margin: 0 0 16px; padding: 18px 20px; border-radius: var(--r); background: var(--soft); box-shadow: 0 3px 0 oklch(.88 .07 var(--h)); animation: pop .6s cubic-bezier(.2, 1.2, .3, 1) both; }
.reward-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.reward .eyebrow { color: var(--deep); }
.reward p { margin: 0; font-size: 1.12rem; line-height: 1.4; text-wrap: pretty; max-width: 52ch; }
.reward iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; margin-top: 10px; }

/* ---------- question page */
.q-page { padding-block: clamp(10px, 3vw, 30px) 0; }
.back { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 22px; color: var(--muted); text-decoration: none; font-weight: 500; }
.back:hover { color: var(--ink); }
.q-head { position: relative; }
.q-head::before { content: ''; position: absolute; z-index: -1; right: -6%; top: -40px; width: min(46vw, 420px); aspect-ratio: 1; border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%; background: var(--lead); opacity: .38; animation: blob 14s ease-in-out infinite alternate; }
@keyframes blob { to { border-radius: 42% 58% 45% 55% / 56% 44% 52% 48%; rotate: 14deg; } }
.q-title { font-size: clamp(2.2rem, 6.5vw, 4.4rem); max-width: 14ch; margin-top: 12px; color: var(--teal-deep); }
.q-sum { min-height: 1.6em; margin: 16px 0 0; font-size: 1.2rem; color: var(--muted); }
.q-sum strong { color: var(--ink); font-weight: 600; }
.q-body { margin-top: 30px; max-width: 880px; }
.q-after { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 40px; }
.you-card { display: inline-flex; align-items: center; gap: 16px; margin-top: 22px; padding: 12px 26px 12px 12px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); animation: pop .7s cubic-bezier(.2, 1.2, .3, 1) both; }
.you-card .flag { width: 62px; height: 62px; box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(40, 30, 10, .3); }
.you-card .display { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 600; line-height: 1.05; color: var(--teal-deep); }
.you-card .eyebrow { margin-bottom: 2px; }

/* ---------- explore */
.page-head { padding-block: clamp(14px, 4vw, 44px) 8px; position: relative; }
.page-head h1 { font-size: clamp(2.2rem, 6.5vw, 4.4rem); max-width: 14ch; margin-top: 12px; color: var(--teal-deep); }
.page-head p { max-width: 46ch; color: var(--muted); font-size: 1.2rem; margin: 18px 0 0; }
.explore-chips { margin-top: 26px; }
.cat { margin-top: 40px; }
.cat h2 { margin: 0 0 14px; }
.rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, 200px) 24px; align-items: center; gap: 10px 28px; padding: 16px 22px; border-radius: 20px; background: var(--card); text-decoration: none; box-shadow: var(--shadow); transition: transform .2s cubic-bezier(.3, 1.4, .5, 1), box-shadow .2s; }
.row:hover { transform: translateY(-3px) rotate(-.3deg); box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 4px 0 var(--lead), 0 14px 22px -12px rgba(80, 55, 20, .4); }
.row-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.row-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--lead); flex: none; box-shadow: 0 0 0 4px var(--soft); }
.row-prompt { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2.6vw, 1.5rem); line-height: 1.12; display: block; }
.row-sub { display: block; margin-top: 3px; font-family: var(--font-body); font-weight: 400; font-size: .9rem; color: var(--muted); }
.row-bar { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.row-bar i { display: block; height: 100%; width: calc(var(--w) * 1%); background: var(--accent); border-radius: 99px; }
.row-go { color: var(--muted); }
@media (max-width: 640px) { .row { grid-template-columns: minmax(0, 1fr) 20px; padding: 14px 16px; } .row-bar { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- prose */
.prose { max-width: 62ch; }
.prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; margin: 38px 0 6px; line-height: 1.1; color: var(--teal-deep); }
.prose p { margin: 0 0 14px; font-size: 1.15rem; text-wrap: pretty; }

/* ================= MAP ================= */
.map-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.map-views, .map-qs { flex-wrap: nowrap; overflow-x: auto; padding: 4px 4px 8px; margin: 0 -4px; scrollbar-width: none; }
.map-views::-webkit-scrollbar, .map-qs::-webkit-scrollbar { display: none; }
.map-views .chip, .map-qs .chip { flex: none; }
.map-qs .chip { background: transparent; box-shadow: 0 0 0 2px var(--line) inset; font-size: .9rem; padding: 7px 14px; }
.map-qs .chip[aria-pressed='true'] { background: var(--ink); color: var(--card); }
.map-stage {
  --h: 172; position: relative; aspect-ratio: 2 / 1; min-height: 280px; overflow: hidden; border-radius: 26px; user-select: none; -webkit-user-select: none;
  background: #D3EAF0;
  box-shadow: 0 0 0 4px var(--card), 0 0 0 6px var(--line), 0 18px 30px -16px rgba(60, 40, 10, .4);
}
@media (max-width: 700px) { .map-stage { aspect-ratio: 1 / 1.05; border-radius: 22px; } }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.map-stage.is-zoomed .map-svg { touch-action: none; }
.map-stage.is-dragging .map-svg { cursor: grabbing; }
.land { fill: #FBF3E4; stroke: #FFFCF5; stroke-width: .8; stroke-linejoin: round; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .9s ease, stroke .15s; opacity: 0; }
.is-in:not(.settled) .land { animation: landIn .8s cubic-bezier(.2, .9, .3, 1) both; animation-delay: var(--d, 0s); }
@keyframes landIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.land { transform-box: fill-box; transform-origin: 50% 50%; }
.settled .land { opacity: 1; }
.land:hover { stroke: var(--ink); stroke-width: 1.6; }
.land.is-selected { stroke: var(--ink); stroke-width: 2.4; }
.map-pin .pin-bob { animation: pinbob 1.6s ease-in-out infinite alternate; }
.map-pin .pin-ring { fill: none; stroke: #EE5A36; stroke-width: 2; transform-box: fill-box; transform-origin: 50% 50%; animation: ring 2s ease-out infinite; }
@keyframes pinbob { to { transform: translateY(-5px); } }
@keyframes ring { from { transform: scale(.4); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
.map-zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.map-zoom button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--card); font-family: var(--font-display); font-size: 1.4rem; line-height: 1; box-shadow: 0 2px 0 var(--line), 0 6px 12px -6px rgba(40, 30, 10, .4); transition: transform .15s; }
.map-zoom button:hover { transform: translateY(-2px); }
.map-zoom button:active { transform: translateY(2px); }
.map-tip { position: absolute; left: 0; top: 0; z-index: 4; display: flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--card); box-shadow: 0 8px 18px -8px rgba(40, 30, 10, .5); pointer-events: none; white-space: nowrap; }
.map-tip span { display: flex; flex-direction: column; line-height: 1.15; }
.map-tip small { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.map-card { position: absolute; left: 12px; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px); padding: 8px 8px 8px 8px; border-radius: 99px; background: var(--card); box-shadow: 0 10px 22px -10px rgba(40, 30, 10, .55); }
.map-card.pop { animation: pop .5s cubic-bezier(.2, 1.3, .3, 1) both; }
.map-card .flag { width: 48px; height: 48px; }
.map-card-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; padding-right: 4px; }
.map-card-text strong { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.map-card-text span { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.map-card-x { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--soft); font-size: 1.3rem; line-height: 1; }
.map-card-x:hover { background: var(--mid); }
.map-legend { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-deep); pointer-events: none; }
.map-legend i { width: 90px; height: 8px; border-radius: 99px; background: linear-gradient(90deg, oklch(.93 .06 var(--h)), oklch(.55 .21 var(--h))); box-shadow: 0 0 0 2px rgba(255, 255, 255, .8); }
.map-hint { position: absolute; left: 14px; top: 12px; margin: 0; padding: 3px 10px; border-radius: 99px; background: rgba(255, 252, 245, .8); font-size: .75rem; color: var(--muted); pointer-events: none; opacity: 0; transition: opacity .3s; }
.map-stage:hover .map-hint { opacity: 1; }
@media (hover: none) { .map-hint { display: none; } }
@media (max-width: 700px) { .map-legend { display: none; } .map-card { left: 8px; right: 8px; bottom: 8px; max-width: none; } }
.map-top { margin-top: 18px; min-height: 90px; }
.map-top .eyebrow { margin-bottom: 10px; }
button.sticker { border: 0; font: inherit; color: inherit; cursor: pointer; }
.map-page { padding-block: 0 0; }
.map-page .map-stage { aspect-ratio: auto; height: clamp(420px, 68vh, 760px); }
@media (max-width: 700px) { .map-page .map-stage { height: 70vh; } }

/* ---------- footer: teal paper with a torn top edge and a river of flags */
.foot { position: relative; margin-top: clamp(60px, 9vw, 110px); color: #E9F6F2; }
.foot-edge { display: block; width: 100%; height: clamp(34px, 5vw, 60px); margin-bottom: -1px; filter: drop-shadow(0 -4px 6px rgba(10, 60, 50, .2)); }
.foot-body { background: var(--teal-deep); padding-block: 8px 44px; }
.marquee { overflow: hidden; padding-block: 18px 22px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 18px; width: max-content; animation: scroll 70s linear infinite; }
.marquee-track .flag { width: 44px; height: 44px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9); }
@keyframes scroll { to { transform: translateX(-50%); } }
.foot-text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; font-size: .95rem; }
.foot-text p { margin: 0; }
.foot-text a { color: #fff; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: 3px; }

/* ---------- toast + confetti */
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); max-width: min(92vw, 460px); padding: 13px 22px; border-radius: 99px; background: var(--ink); color: var(--card); font-size: .98rem; font-weight: 500; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; z-index: 60; left: 0; top: 0; width: 10px; height: 14px; pointer-events: none; will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 480px) {
  .brand { font-size: .9rem; gap: 6px; }
  .brand-pin { width: 18px; height: 23px; }
  .nav { gap: 2px; }
  .nav a { padding: 7px 9px; font-size: .9rem; }
}

@media (max-width: 480px) { .nav a[href="/about"] { display: none; } }


/* ================= ROLLER (long lists scroll inside their own box) ================= */
.block-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.block-tools .block-search { margin-bottom: 0; }
.sortbar { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.sortbar::-webkit-scrollbar { display: none; }
.sortbar .chip { flex: none; padding: 6px 14px; font-size: .88rem; }
.roller { max-height: min(540px, 66vh); overflow-y: auto; overscroll-behavior: auto; padding: 10px 6px 14px 2px; margin-right: -6px; border-radius: 18px; scrollbar-width: thin; scrollbar-color: var(--lead) transparent;
  -webkit-mask-image: linear-gradient(transparent, #000 14px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(transparent, #000 14px, #000 calc(100% - 22px), transparent); }
.roller::-webkit-scrollbar { width: 8px; }
.roller::-webkit-scrollbar-thumb { background: var(--lead); border-radius: 99px; }
.roller:focus-visible { outline-offset: 0; }
.roller-meta { margin: 8px 0 0; font-size: .85rem; color: var(--muted); }

/* ================= SHARE SHEET ================= */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 18px; opacity: 0; transition: opacity .25s; }
.modal.show { opacity: 1; }
.modal-back { position: absolute; inset: 0; background: rgba(36, 50, 48, .45); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(460px, 100%); max-height: 92vh; overflow: auto; padding: 24px 22px 22px; border-radius: 26px; background: var(--card); box-shadow: 0 30px 60px -20px rgba(30, 20, 5, .6); transform: translateY(18px) scale(.97); transition: transform .35s cubic-bezier(.2, 1.3, .3, 1); }
.modal.show .modal-card { transform: none; }
.modal-x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--soft); font-size: 1.4rem; line-height: 1; }
.modal-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; color: var(--teal-deep); }
.modal-sub { margin: 6px 36px 18px 0; color: var(--muted); font-size: .95rem; text-wrap: pretty; }
.share-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 8px; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 4px 0; border: 0; background: none; font-size: .8rem; font-weight: 500; }
.share-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, .18); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.share-btn:hover .share-ic { transform: translateY(-3px) rotate(-6deg); }
.share-btn:active .share-ic { transform: scale(.92); }
.share-link { display: flex; gap: 8px; margin-top: 20px; }
.share-link input { flex: 1; min-width: 0; padding: 10px 14px; border: 2px solid var(--line); border-radius: 99px; background: #fff; font-size: .9rem; }
.share-link .btn { padding: 10px 18px; font-size: .92rem; box-shadow: 0 3px 0 var(--teal-deep); }
@media (max-width: 420px) { .share-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ================= PASSPORT ================= */
.passport { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 24px; padding: 22px 26px; margin-top: 8px; }
.pp-avatar { flex: none; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--soft); font-size: 2.6rem; box-shadow: 0 0 0 4px #fff, 0 6px 14px rgba(40, 30, 10, .25); overflow: hidden; }
.pp-avatar .flag { width: 100%; height: 100%; box-shadow: none; }
.pp-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 8px; }
.pp-main strong { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; }
.pp-main span { color: var(--muted); font-size: .92rem; }
.xp { height: 12px; border-radius: 99px; background: var(--soft); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); }
.xp i { display: block; height: 100%; width: calc(var(--w) * 1%); border-radius: 99px; background: linear-gradient(90deg, var(--sun), var(--tomato)); transition: width 1s cubic-bezier(.2, .8, .2, 1); animation: grow 1.2s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { width: 0; } }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 22px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); animation: pop .5s both; }
.stat-e { font-size: 1.4rem; line-height: 1.2; }
.stat b { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; }
.stat small { color: var(--muted); font-size: .82rem; }
.profile h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; color: var(--teal-deep); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px 14px; border-radius: 20px; background: var(--card); text-align: center; box-shadow: var(--shadow); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.badge.on:hover { transform: translateY(-3px) rotate(-1.5deg); }
.badge-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(145deg, #FFE9A8, #FFC233); font-size: 1.8rem; box-shadow: 0 3px 0 rgba(150, 90, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .6); }
.badge strong { font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.15; }
.badge small { color: var(--muted); font-size: .78rem; line-height: 1.3; text-wrap: pretty; }
.badge.off { box-shadow: 0 2px 0 var(--line); background: rgba(255, 252, 245, .6); }
.badge.off .badge-ic { background: var(--line); box-shadow: none; filter: grayscale(1); opacity: .55; }
.badge.off strong { color: var(--muted); }
.fine { margin: 36px 0 0; color: var(--muted); font-size: .88rem; max-width: 60ch; }
.profile .rows { margin-top: 12px; }

/* ================= EASTER EGG ANIMATIONS ================= */
.rain { position: fixed; z-index: 90; top: 0; pointer-events: none; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
span.rain { box-shadow: none; }
.brand-pin.fly { animation: pinfly 1.6s cubic-bezier(.3, .1, .3, 1); }
@keyframes pinfly { 0% { transform: none; } 30% { transform: translate(60px, -60px) rotate(25deg) scale(1.6); } 60% { transform: translate(180px, -20px) rotate(-20deg) scale(1.2); } 100% { transform: none; } }
.pennant.spin { animation: pspin .9s cubic-bezier(.3, 1.2, .4, 1); }
@keyframes pspin { from { rotate: 0deg; } to { rotate: 720deg; } }
.sun .shades { display: none; }
.sun.cool .shades { display: block; }
.marquee-track .flag { cursor: pointer; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.marquee-track .flag:hover { transform: scale(1.3) rotate(-8deg); }

/* ================= NAV: header links on desktop, tab bar on phones ================= */
.tabbar { display: none; }
@media (max-width: 640px) {
  .nav { display: none; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { position: fixed; z-index: 40; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 26px; background: rgba(255, 252, 245, .94); backdrop-filter: blur(10px); box-shadow: 0 0 0 2px var(--line), 0 14px 30px -10px rgba(40, 30, 10, .5); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 6px; border-radius: 20px; text-decoration: none; font-size: .72rem; font-weight: 600; color: var(--muted); transition: background-color .2s, transform .15s; }
  .tabbar a span { font-size: 1.25rem; line-height: 1.1; }
  .tabbar a[aria-current='page'] { background: var(--teal-deep); color: #fff; }
  .tabbar a:active { transform: scale(.94); }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
}


/* ================= PINNY + SOUND BUTTON ================= */
.sound { margin-left: auto; margin-right: 6px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .7); font-size: 1.1rem; line-height: 1; box-shadow: 0 2px 0 var(--line); transition: transform .15s; }
.sound:hover { transform: rotate(-12deg) scale(1.08); }
.top { gap: 8px; }
.pinny { cursor: pointer; outline: none; }
.pinny:focus-visible .p-all { filter: drop-shadow(0 0 4px var(--tomato)); }
.pinny .p-all, .pinny .p-bob, .pinny .p-arm, .pinny .p-eye { transform-box: fill-box; }
.pinny .p-bob { transform-origin: 50% 100%; animation: pbob 2.2s ease-in-out infinite alternate; }
@keyframes pbob { from { transform: scaleY(1) translateY(0); } to { transform: scaleY(1.03) translateY(-3px); } }
.pinny .p-eye { transform-origin: 50% 50%; animation: blink 5.5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.pinny .p-arm.r { transform-origin: 0% 100%; animation: armwave 3.2s ease-in-out infinite; }
@keyframes armwave { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-16deg); } 90% { transform: rotate(8deg); } }
.pinny:hover .p-arm.r { animation: armwave2 .5s ease-in-out infinite alternate; }
@keyframes armwave2 { from { transform: rotate(-18deg); } to { transform: rotate(14deg); } }
.pinny:hover .p-all, .pinny.hop .p-all { animation: pjump .55s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 50% 100%; }
@keyframes pjump { 0% { transform: none; } 35% { transform: translateY(-16px) scale(.94, 1.08); } 70% { transform: translateY(0) scale(1.08, .92); } 100% { transform: none; } }
.pinny .m-open, .pinny .p-closed, .pinny .p-cool, .pinny .p-party, .pinny .p-zzz { display: none; }
.pinny:hover .m-smile, .pinny[data-mood='wow'] .m-smile { display: none; }
.pinny:hover .m-open, .pinny[data-mood='wow'] .m-open { display: block; }
.pinny:hover .p-eyes, .pinny[data-mood='wow'] .p-eyes { transform: scale(1.16); transform-origin: 50% 50%; transform-box: fill-box; }
.pinny[data-mood='cool'] .p-cool { display: block; }
.pinny[data-mood='party'] .p-party { display: block; }
.pinny[data-mood='sleepy'] .p-closed, .pinny[data-mood='sleepy'] .p-zzz { display: block; }
.pinny[data-mood='sleepy'] .p-eyes, .pinny[data-mood='sleepy'] .m-open { display: none !important; }
.pinny[data-mood='sleepy'] .p-zzz { animation: zzz 2.4s ease-in-out infinite; }
@keyframes zzz { 0%, 100% { opacity: .2; transform: translateY(6px); } 50% { opacity: 1; transform: translateY(-4px); } }

.opt-sub { color: var(--muted); font-weight: 400; font-size: .8rem; }
.groupbar { flex-wrap: nowrap; overflow-x: auto; padding: 0 2px 4px; scrollbar-width: none; }
.groupbar .chip { flex: none; padding: 5px 13px; font-size: .84rem; background: transparent; box-shadow: 0 0 0 2px var(--line) inset; }
.groupbar .chip[aria-pressed='true'] { background: var(--teal-deep); color: #fff; box-shadow: none; }
.place-cta { margin-top: 16px; }

/* map: cities and regions */
.dot { fill: #fff; stroke: var(--ink); stroke-width: 1.4; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .2s; }
.dot.city.has { fill: var(--tomato); stroke: #fff; }
.dot.region { fill: rgba(255, 255, 255, .4); stroke-dasharray: 2 2; }
.dot.region.has { fill: var(--sun); stroke: var(--ink); stroke-dasharray: none; }
.dot:hover, .dot.is-selected { fill: var(--sun); stroke-width: 2.4; }
.dot.mine { fill: var(--teal); stroke: #fff; stroke-width: 2.4; }
.dot-label { fill: var(--ink); font-family: var(--font-body); font-weight: 600; paint-order: stroke; stroke: #fff; stroke-linejoin: round; pointer-events: none; }
.place-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.place-head .eyebrow { margin: 0; }
.place-head .chip { padding: 5px 14px; font-size: .86rem; }
.btn.mini { padding: 8px 14px; font-size: .85rem; box-shadow: 0 3px 0 var(--teal-deep); white-space: nowrap; }
.map-fine { margin: 12px 0 0; font-size: .9rem; }
.map-fine a { color: var(--muted); }

.share-card-box { margin: 0 0 18px; }
.share-card-wait { display: grid; place-items: center; aspect-ratio: 4 / 5; max-height: 38vh; border-radius: 16px; background: var(--soft); color: var(--muted); font-size: .9rem; }
.share-card { display: block; width: auto; max-width: 100%; max-height: 38vh; margin: 0 auto; border-radius: 16px; box-shadow: 0 10px 24px -10px rgba(40, 30, 10, .5); }
.share-card-actions { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.share-card-actions .btn.mini { text-decoration: none; box-shadow: 0 3px 0 var(--teal-deep); }
.share-card-actions .btn.alt.mini { box-shadow: 0 3px 0 var(--line), 0 0 0 2px var(--line) inset; }


/* ================= PINNY THE GUIDE ================= */
.guide { position: fixed; z-index: 45; left: 0; top: 0; pointer-events: none; visibility: visible; will-change: transform; }
.guide[hidden] { display: none; }
.guide > * { pointer-events: auto; }
.guide-fly { position: relative; width: 118px; height: 140px; }
.guide-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 10px 8px rgba(40, 30, 10, .3)); transform-origin: 50% 70%; }
.guide .pinny { cursor: pointer; }
/* speech bubble: a little paper sticker with a tail, same colours as Pinny */
.guide-bubble { position: absolute; bottom: 146px; width: max-content; max-width: min(240px, 70vw); padding: 9px 16px 10px; border-radius: 22px; background: #fff; border: 3px solid var(--tomato); color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.2; text-wrap: balance; text-align: center; box-shadow: 0 5px 0 rgba(198, 67, 31, .35), 0 14px 22px -10px rgba(40, 30, 10, .45); pointer-events: none; transform-origin: 80% 100%; }
.guide-bubble::after { content: ''; position: absolute; bottom: -13px; width: 18px; height: 18px; background: #fff; border-right: 3px solid var(--tomato); border-bottom: 3px solid var(--tomato); border-bottom-right-radius: 6px; transform: rotate(45deg) skew(8deg, 8deg); }
.guide-bubble[data-side='right'] { right: 4px; }
.guide-bubble[data-side='left'] { left: 4px; transform-origin: 20% 100%; }
.guide-bubble[data-side='right']::after { right: 46px; }
.guide-bubble[data-side='left']::after { left: 46px; }
.guide-bubble.in { animation: bubblein .5s cubic-bezier(.2, 1.5, .3, 1) both; }
@keyframes bubblein { from { opacity: 0; transform: scale(.3) rotate(-6deg); } 60% { transform: scale(1.08) rotate(2deg); } }
.guide-bubble.has-actions { pointer-events: auto; max-width: min(250px, 76vw); }
.guide-bubble strong { color: var(--tomato); }
.guide-panel { position: absolute; bottom: 146px; width: min(300px, calc(100vw - 28px)); padding: 16px 16px 14px; border-radius: 24px; background: var(--card); box-shadow: 0 0 0 2px var(--line), 0 24px 44px -14px rgba(40, 30, 10, .55); }
.guide-panel[data-side='right'] { right: 0; transform-origin: 90% 100%; }
.guide-panel[data-side='left'] { left: 0; transform-origin: 10% 100%; }
.guide-panel.in { animation: panelin .5s cubic-bezier(.2, 1.35, .3, 1) both; }
@keyframes panelin { from { opacity: 0; transform: scale(.3) translateY(30px); } }
.panel-x { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--soft); font-size: 1.2rem; line-height: 1; }
.gp-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.gp-avatar { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--soft); font-size: 1.7rem; overflow: hidden; box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(40, 30, 10, .25); }
.gp-avatar .flag { width: 100%; height: 100%; box-shadow: none; }
.gp-top .eyebrow { margin: 0; font-size: .68rem; }
.gp-title { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.1; }
.gp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 10px; text-align: center; }
.gp-stats b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.1; }
.gp-stats small { color: var(--muted); font-size: .75rem; }
.gp-badges { display: flex; flex-wrap: wrap; gap: 6px; font-size: 1.35rem; min-height: 30px; }
.gp-badges small { color: var(--muted); font-size: .82rem; align-self: center; }
.gp-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.gp-actions .link { font-size: .8rem; }
.iris { position: fixed; inset: 0; z-index: 100; background: var(--paper); pointer-events: none; clip-path: circle(0 at var(--x) var(--y)); transition: clip-path .55s cubic-bezier(.6, .1, .3, 1), opacity .5s; }
.iris.grow { clip-path: circle(150% at var(--x) var(--y)); }
.iris.out { opacity: 0; }
@media (max-width: 640px) {
  .guide-fly { width: 84px; height: 100px; }
  .guide-bubble { bottom: 106px; font-size: .95rem; }
  .guide-panel { bottom: 108px; }
}
@media print { .guide { display: none; } }


/* ================= TOUR ================= */
.tour-spot { position: fixed; z-index: 80; left: 0; top: 0; border-radius: 22px; box-shadow: 0 0 0 4px #fff, 0 0 0 9999px rgba(36, 50, 48, .58); pointer-events: none; will-change: transform, width, height; animation: spotpulse 2.4s ease-in-out infinite; transition: opacity .3s; }
@keyframes spotpulse { 50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, .85), 0 0 0 9999px rgba(36, 50, 48, .58); } }
.tour-card { position: fixed; z-index: 81; width: min(360px, calc(100vw - 24px)); padding: 16px 18px 14px; border-radius: 24px; background: var(--card); box-shadow: 0 0 0 2px var(--line), 0 24px 48px -14px rgba(20, 15, 5, .6); transition: opacity .3s; }
.tour-card.in { animation: panelin .45s cubic-bezier(.2, 1.3, .3, 1) both; }
.tour-spot.out, .tour-card.out { opacity: 0; }
.tour-head { display: flex; align-items: center; gap: 12px; }
.tour-pinny { flex: none; width: 52px; height: 62px; }
.tour-head .eyebrow { margin: 0; font-size: .68rem; }
.tour-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.15; }
.tour-text { margin: 10px 0 12px; font-size: .98rem; line-height: 1.45; text-wrap: pretty; }
.tour-dots { display: flex; gap: 6px; margin-bottom: 12px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .3s, background-color .3s; }
.tour-dots i.on { width: 22px; background: var(--tomato); }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-actions .btn.mini { padding: 8px 16px; }
.tour-actions button:disabled { opacity: .4; pointer-events: none; }

.offer-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.offer-actions .btn.mini { padding: 7px 14px; font-size: .84rem; }
.guide-panel .away { display: block; margin: 8px auto 0; font-size: .75rem; }
.pp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }


/* ================= PINNY: wings, yawns, sparkles, being held ================= */
.pinny .p-look { transition: transform .12s ease-out; }
.pinny .p-wings { display: none; }
.pinny.flying .p-wings { display: block; }
.pinny .wing { transform-box: fill-box; }
.pinny .wing.l { transform-origin: 100% 60%; animation: flapl .16s ease-in-out infinite alternate; }
.pinny .wing.r { transform-origin: 0% 60%; animation: flapr .16s ease-in-out infinite alternate; }
@keyframes flapl { from { transform: rotate(18deg) scaleY(1); } to { transform: rotate(-26deg) scaleY(.75); } }
@keyframes flapr { from { transform: rotate(-18deg) scaleY(1); } to { transform: rotate(26deg) scaleY(.75); } }
.pinny[data-mood='yawn'] .m-smile, .pinny[data-mood='yawn'] .p-eyes { display: none; }
.pinny[data-mood='yawn'] .m-open { display: block; animation: yawnmouth 1.6s ease-in-out; transform-box: fill-box; transform-origin: 50% 0%; }
.pinny[data-mood='yawn'] .p-closed { display: block; }
@keyframes yawnmouth { 0%, 100% { transform: scale(.6, .5); } 35%, 70% { transform: scale(1.5, 1.9); } }
.spark { position: fixed; z-index: 70; pointer-events: none; line-height: 1; will-change: transform, opacity; }
.guide.held .guide-btn { cursor: grabbing; filter: drop-shadow(0 22px 14px rgba(40, 30, 10, .35)); }
.guide.held .guide-fly { transition: transform .12s; }
.guide-btn { touch-action: none; }
.guide-btn svg, .tour-pinny svg { overflow: visible; }

/* smoother, more alive body */
.guide .pinny .p-bob { animation: gbob 2.8s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
@keyframes gbob { from { transform: translateY(0) scale(1, 1); } to { transform: translateY(-6px) scale(1.015, 1.03); } }
.guide .pinny .p-arm.r { animation-duration: 3.8s; }
.guide-btn { will-change: transform; }

/* a fixed hit area, so the hover state doesn't depend on the jumping body underneath the pointer */
.pinny .p-hit { pointer-events: all; }


/* ================= COUNTRY PAGE ================= */
.cpage { padding-block: clamp(10px, 3vw, 30px) 0; }
.cp-hero { display: flex; align-items: center; gap: 22px; margin: 6px 0 18px; }
.cp-flag .flag { width: clamp(76px, 14vw, 120px); height: clamp(76px, 14vw, 120px); box-shadow: 0 0 0 5px #fff, 0 10px 22px rgba(40, 30, 10, .3); }
.cp-hero h1 { font-size: clamp(2.6rem, 8vw, 5.4rem); color: var(--teal-deep); margin-top: 4px; }
.cp-meta { margin: 10px 0 0; color: var(--muted); font-size: 1.1rem; }
.cp-meta b { color: var(--ink); font-weight: 600; }
.cp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.cp-low { max-width: 52ch; font-size: 1.15rem; color: var(--muted); }
.stand-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.stand { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.stand-e { font-size: 2rem; line-height: 1; }
.stand-e .flag { width: 40px; height: 40px; }
.stand-line { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.15; }
.stand-line b:first-child { color: var(--accent); }
.stand-q { margin: 0; color: var(--muted); font-size: .92rem; }
.stand-cmp { margin: 6px 0 0; font-weight: 600; font-size: .95rem; }
.stand-cmp.up, .cq-nums em.up { color: #0F8A4A; }
.stand-cmp.down, .cq-nums em.down { color: #C6431F; }
.cq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 800px) { .cq-grid { grid-template-columns: minmax(0, 1fr); } }
.cq { padding: 18px 20px 16px; min-width: 0; }
.cq-q { margin: 0 0 12px; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.1; }
.cq-q a { text-decoration: none; }
.cq-rows { display: flex; flex-direction: column; gap: 6px; }
.cq-row { position: relative; display: flex; align-items: center; gap: 9px; padding: 7px 12px; min-height: 40px; border-radius: 12px; background: var(--bg-row, var(--card)); overflow: hidden; box-shadow: var(--shadow); }
.cq-row > * { position: relative; z-index: 1; }
.cq-fill { position: absolute !important; z-index: 0 !important; inset: 0 auto 0 0; width: calc(var(--w) * 1%); background: var(--mid); border-radius: 12px; transform-origin: left; animation: cqgrow 1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes cqgrow { from { transform: scaleX(0); } }
.cq-row:first-child .cq-fill { background: var(--lead); }
.cq-label { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.cq-nums { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; flex: none; }
.cq-nums b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.cq-nums small { color: var(--muted); font-size: .75rem; }
.cq-nums em { font-style: normal; font-weight: 600; font-size: .78rem; }
.cq-foot { margin: 10px 0 0; color: var(--muted); font-size: .8rem; }
.opt-swatch.sm { width: 20px; height: 20px; }

/* feedback popup */
.fb-kinds { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fb-kind { border: 2px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 14px; font-size: .9rem; font-weight: 500; }
.fb-kind.on { border-color: var(--teal-deep); background: var(--soft); }
#fb-msg, #fb-contact { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 16px; background: #fff; font: inherit; font-size: .95rem; margin-bottom: 10px; resize: vertical; }
#fb-msg:focus, #fb-contact:focus { outline: none; border-color: var(--teal-deep); }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb-err { color: #c0392b; min-height: 1.2em; margin: 0 0 8px; font-size: .9rem; }
.fb-thanks { text-align: center; padding: 10px 0; }
.fb-big { font-size: 3rem; }
.foot .link-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
