/* ─── H15DEN · Guess the Cuisine (daily minigame) ─── */
#fg, #fg * { box-sizing: border-box; margin: 0; padding: 0; }
#fg {
  --bg: #ffffff; --card: #ffffff; --ink: #14110d; --muted: #6b6459;
  /* Accent tokens are intentionally monochrome: the game is black and white. */
  --line: rgba(20,17,13,0.10); --amber: #14110d; --amber-soft: #f3f2f0;
  --good: #0e7a54; --good-soft: #e3f3ec; --bad: #c0392b; --bad-soft: #fbe9e7;
  --shadow: 0 12px 40px rgba(20,17,13,0.10);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink); background: var(--bg);
  /* Break out of the Shopify theme's narrow page column to use the full width. */
  width: 96vw; max-width: 1360px;
  position: relative; left: 50%; transform: translateX(-50%);
  padding: 20px clamp(16px, 3vw, 44px) 64px;
  -webkit-font-smoothing: antialiased;
}
/* Keep intro / results cards readable: only the round goes full-width. */
#fg .fg-card.fg-pad { max-width: 560px; margin-left: auto; margin-right: auto; }
#fg.dark {
  --bg: #16130f; --card: #201b15; --ink: #f4efe7; --muted: #a89e8f;
  --line: rgba(244,239,231,0.12); --amber: #f4efe7; --amber-soft: #2a251e;
  --good: #4fd1a0; --good-soft: #17301f; --bad: #ff8a7a; --bad-soft: #331a16;
  --shadow: 0 12px 40px rgba(0,0,0,0.45);
}
#fg .fg-hidden { display: none !important; }
/* The Shopify theme styles bare h1/p/li/etc, which overrode our colors and made
   headings invisible in dark mode. Pin them to our own tokens; the more specific
   class rules below (muted, good, bad) still win where they apply. */
#fg h1, #fg h2, #fg h3, #fg h4, #fg h5, #fg p, #fg li, #fg ul, #fg small, #fg strong, #fg b {
  color: var(--ink); font-family: inherit; background: none;
}

/* Header */
#fg .fg-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
#fg .fg-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
#fg .fg-brand .fg-logo { font-size: 22px; }
#fg .fg-top-btn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
#fg .fg-top-btn:hover { color: var(--ink); border-color: var(--ink); }
#fg .fg-top-right { display: flex; align-items: center; gap: 8px; }
#fg a.fg-top-btn { display: inline-flex; align-items: center; text-decoration: none !important; }
#fg .fg-user { gap: 7px; padding-left: 5px; color: var(--ink); }
#fg .fg-user-dot { width: 21px; height: 21px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: none; }
@media (max-width: 520px) { #fg .fg-user-name { display: none; } }

/* Cards */
#fg .fg-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
#fg .fg-pad { padding: 28px 26px; }

/* Intro */
#fg .fg-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; }
#fg .fg-title { font-size: clamp(28px, 7vw, 40px); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 14px; }
#fg .fg-sub { font-size: 15px; line-height: 1.6; color: var(--muted); margin-bottom: 24px; }
#fg .fg-how { list-style: none; display: grid; gap: 12px; margin-bottom: 26px; }
#fg .fg-how li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; }
#fg .fg-how .fg-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--amber-soft); color: var(--amber); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
#fg .fg-btn { display: block; width: 100%; padding: 16px; border: none; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit; transition: transform .08s ease, opacity .15s ease; }
#fg .fg-btn:hover { opacity: 0.92; }
#fg .fg-btn:active { transform: scale(0.99); }
#fg .fg-btn.fg-amber { background: var(--ink); color: var(--bg); }
#fg .fg-btn.fg-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
/* Buttons rendered as links (e.g. the Discover this gem CTA) */
#fg a.fg-btn { text-align: center; text-decoration: none !important; box-sizing: border-box; }
#fg a.fg-btn.fg-gem { margin-top: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#fg a.fg-btn.fg-gem svg { flex: none; }
#fg a.fg-btn.fg-gem:hover { border-color: var(--ink); }

/* Progress */
#fg .fg-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
#fg .fg-dots { display: flex; gap: 6px; flex: 1; }
#fg .fg-dot { height: 6px; flex: 1; border-radius: 999px; background: var(--line); transition: background .2s ease; }
#fg .fg-dot.done { background: var(--muted); }
#fg .fg-dot.cur { background: var(--ink); }
#fg .fg-count { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* Round: two columns on desktop: photo left, play panel right */
#fg .fg-round { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: stretch; }
#fg .fg-photo-col { position: relative; background: #d9d2c6; overflow: hidden; min-height: 100%; }
#fg .fg-photo { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
#fg .fg-zoom { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.62); color: #fff; border: none; border-radius: 999px; padding: 8px 14px; font-size: 12.5px; font-weight: 700; font-family: inherit; cursor: zoom-in; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
/* Photo caption: city (on reveal) + credit, stacked above the Zoom button */
#fg .fg-photo-cap { position: absolute; right: 12px; bottom: 52px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
#fg .fg-cap-pill { background: rgba(0,0,0,0.62); color: #fff; font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); white-space: nowrap; }
#fg .fg-cap-city { font-weight: 700; }
#fg .fg-cap-credit { opacity: 0.9; font-size: 10.5px; }
#fg .fg-zoom:hover { background: rgba(0,0,0,0.8); }
/* Continent reveal: spinning monochrome globe (appended to body) */
.fg-globe-ov { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; background: rgba(250,249,247,0.98); animation: fg-lb-in .18s ease; cursor: pointer; }
.fg-globe-ov.dark { background: rgba(10,9,7,0.97); }
.fg-globe-wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; color: #14110d; font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.fg-globe-ov.dark .fg-globe-wrap { color: #f4efe7; }
.fg-globe { width: min(74vw, 300px); height: auto; color: inherit; }
/* Sphere: faint face, solid rim, land in mid grey until one is picked out */
.fg-globe .globe-face { fill: currentColor; opacity: 0.05; }
.fg-globe .rim { fill: none; stroke: currentColor; stroke-width: 2.2; }
.fg-globe .grat > * { fill: none; stroke: currentColor; stroke-width: 0.8; opacity: 0.22; }
.fg-globe .land { fill: currentColor; opacity: 0.3; stroke: currentColor; stroke-width: 0.6; stroke-linejoin: round; transition: opacity .4s ease; }
.fg-globe.stopped .land { opacity: 0.14; }
.fg-globe.stopped .land.hi { opacity: 1; animation: fg-land-pop .5s ease; }
@keyframes fg-land-pop { 0% { opacity: 0.3; } 40% { opacity: 1; } 100% { opacity: 1; } }
.fg-globe-label { font-size: clamp(22px, 6vw, 32px); font-weight: 700; letter-spacing: -0.01em; opacity: 0; transform: translateY(10px); }
.fg-globe-label.in { animation: fg-globe-label .45s ease forwards; }
@keyframes fg-globe-label { to { opacity: 1; transform: none; } }

/* Hint confirmation dialog (appended to body, so it carries its own theming) */
.fg-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fg-lb-in .15s ease; }
.fg-modal-card { width: 100%; max-width: 390px; background: #fff; color: #14110d; border-radius: 20px; padding: 24px 22px; box-shadow: 0 24px 70px rgba(0,0,0,0.4); font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.fg-modal.dark .fg-modal-card { background: #201b15; color: #f4efe7; box-shadow: 0 24px 70px rgba(0,0,0,0.7); }
.fg-modal-h { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 16px; }
.fg-modal-flag { width: 26px; height: 19px; object-fit: cover; border-radius: 3px; vertical-align: -4px; margin-right: 9px; box-shadow: 0 0 0 1px rgba(0,0,0,0.12); }
/* Lock-in box: flag floated top-right, no repeated country name */
.fg-lockbox { display: flex; align-items: center; gap: 14px; }
.fg-lockbox .fg-modal-d { flex: 1; margin: 0; }
.fg-lock-flag { flex: none; width: 44px; height: 31px; object-fit: cover; border-radius: 4px; border: 1px solid rgba(20,17,13,0.18); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.fg-modal.dark .fg-lock-flag { border-color: rgba(244,239,231,0.3); }

/* Double-or-nothing roulette (appended to body) */
.fg-roul-ov { position: fixed; inset: 0; z-index: 100002; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 20px; color: #14110d; font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: rgba(250,249,247,0.98); animation: fg-lb-in .15s ease; overflow: hidden; }
.fg-roul-ov.dark { color: #f4efe7; background: rgba(8,7,5,0.98); }
.fg-roul-head { font-size: 12px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: #c0392b; }
.fg-roul-ov.dark .fg-roul-head { color: #ff8a7a; }
.fg-roul-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 620px; position: relative; z-index: 1; }
.fg-roul-card { position: relative; width: 108px; padding: 14px 8px; border: 2px solid rgba(20,17,13,0.14); border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: rgba(20,17,13,0.02); transition: transform .1s ease, border-color .12s ease; }
.fg-roul-ov.dark .fg-roul-card { border-color: rgba(244,239,231,0.16); background: rgba(244,239,231,0.03); }
.fg-roul-card img { width: 46px; height: 33px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,0.12); }
.fg-roul-card .fg-flag-fallback { width: 46px; height: 33px; border-radius: 4px; background: rgba(20,17,13,0.12); }
.fg-roul-name { font-size: 13px; font-weight: 700; text-align: center; line-height: 1.2; }
.fg-roul-x { display: none; }
.fg-roul-card.hi { border-color: #14110d; transform: translateY(-5px) scale(1.06); box-shadow: 0 12px 26px rgba(0,0,0,0.2); }
.fg-roul-ov.dark .fg-roul-card.hi { border-color: #f4efe7; }
.fg-roul-card.out { background: #14110d !important; border-color: #14110d !important; transform: none; }
.fg-roul-ov.dark .fg-roul-card.out { background: #000 !important; border-color: #000 !important; }
.fg-roul-card.out img, .fg-roul-card.out .fg-roul-name { opacity: 0.1; }
.fg-roul-card.out .fg-roul-x { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; color: #fff; font-size: 30px; font-weight: 800; }
.fg-roul-card.win { border-color: #0e7a54 !important; background: #e3f3ec !important; }
.fg-roul-ov.dark .fg-roul-card.win { border-color: #4fd1a0 !important; background: #17301f !important; }
.fg-roul-card.lose { border-color: #c0392b !important; }
.fg-roul-ov.dark .fg-roul-card.lose { border-color: #ff8a7a !important; }
.fg-roul-sub { font-size: 15px; font-weight: 700; min-height: 22px; text-align: center; }
.fg-roul-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.fg-help-p { font-size: 13.5px; line-height: 1.55; margin-bottom: 12px; opacity: 0.85; }
.fg-help-p:last-of-type { margin-bottom: 4px; }

/* Step-by-step tutorial */
.fg-tut-card { text-align: center; position: relative; }
.fg-tut-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(20,17,13,0.06); color: #14110d; font-size: 20px; line-height: 1; cursor: pointer; font-family: inherit; display: grid; place-items: center; }
.fg-tut-close:hover { background: rgba(20,17,13,0.12); }
.fg-modal.dark .fg-tut-close { background: rgba(244,239,231,0.1); color: #f4efe7; }
.fg-tut-visual { position: relative; width: 100%; height: 168px; border-radius: 14px; margin-bottom: 18px; display: flex; align-items: center; justify-content: center; background: rgba(20,17,13,0.05); overflow: hidden; }
.fg-modal.dark .fg-tut-visual { background: rgba(244,239,231,0.07); }
.fg-tut-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fg-tut-visual svg { width: 62%; height: auto; color: #14110d; }
.fg-modal.dark .fg-tut-visual svg { color: #f4efe7; }
.fg-tut-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.55; margin-bottom: 8px; }
.fg-tut-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.fg-tut-text { font-size: 14px; line-height: 1.55; opacity: 0.82; min-height: 66px; }
.fg-tut-dots { display: flex; justify-content: center; gap: 7px; margin: 16px 0 18px; }
.fg-tut-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(20,17,13,0.18); transition: all .2s ease; }
.fg-tut-dots span.on { background: #14110d; width: 20px; border-radius: 4px; }
.fg-modal.dark .fg-tut-dots span { background: rgba(244,239,231,0.22); }
.fg-modal.dark .fg-tut-dots span.on { background: #f4efe7; }
.fg-tut-nav { display: flex; gap: 10px; }
.fg-tut-nav .fg-mbtn { margin-top: 0; flex: 1; }
.fg-modal-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #c0392b; margin-bottom: 8px; }
/* Danger card: black outline (adapts in dark), shake in */
.fg-modal-card.danger { border: 2px solid currentColor; box-shadow: 0 24px 70px rgba(0,0,0,0.28); animation: fg-modal-shake .4s ease; }
.fg-modal.dark .fg-modal-eyebrow { color: #ff8a7a; }
/* Full-opacity, colour-coded stake boxes */
.fg-modal-item.fg-mi { opacity: 1; border-width: 1.5px; }
/* All stake boxes use a clean black (theme-adapting) outline */
.fg-mi-black, .fg-mi-win, .fg-mi-lose { border-color: currentColor !important; }
.fg-mi-win .fg-modal-t em, .fg-mi-lose .fg-modal-t em { color: inherit !important; opacity: 0.7; }
.fg-mbtn-danger { background: #c0392b !important; color: #fff !important; }
.fg-mbtn-danger:hover { background: #a83224 !important; }
.fg-mbtn-green { background: #0e7a54 !important; color: #fff !important; }
.fg-mbtn-green:hover { background: #0b6144 !important; }
@keyframes fg-modal-shake { 10%,90%{transform:translateX(-1px)} 30%,70%{transform:translateX(3px)} 50%{transform:translateX(-4px)} }

/* DOUBLE OR NOTHING reveal (appended to body) */
.fg-dbl-ov { position: fixed; inset: 0; z-index: 100002; display: flex; align-items: center; justify-content: center; background: rgba(250,249,247,0.98); animation: fg-lb-in .15s ease; cursor: pointer; overflow: hidden; }
.fg-dbl-ov.dark { background: rgba(8,7,5,0.98); }
.fg-dbl-wrap { display: flex; flex-direction: column; align-items: center; color: #14110d; font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; text-align: center; }
.fg-dbl-ov.dark .fg-dbl-wrap { color: #f4efe7; }
.fg-dbl-mark { font-size: clamp(64px, 20vw, 130px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; opacity: 0; transform: scale(0.3) rotate(-12deg); animation: fg-dbl-mark .6s cubic-bezier(.2,1.4,.4,1) .05s forwards; }
.fg-dbl-line { width: 0; height: 2px; background: currentColor; margin: 18px 0; animation: fg-dbl-line .5s ease .55s forwards; }
.fg-dbl-text { font-size: clamp(20px, 6vw, 40px); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0; animation: fg-dbl-text .6s ease .7s forwards; }
.fg-dbl-sub { font-size: clamp(12px, 3.5vw, 15px); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #c0392b; opacity: 0; margin-top: 12px; animation: fg-dbl-sub .5s ease 1.15s forwards; }
.fg-dbl-ov.dark .fg-dbl-sub { color: #ff8a7a; }
@keyframes fg-dbl-mark { to { opacity: 1; transform: none; } }
@keyframes fg-dbl-line { to { width: min(74vw, 340px); } }
@keyframes fg-dbl-text { from { opacity: 0; letter-spacing: 0.3em; } to { opacity: 1; letter-spacing: 0.05em; } }
@keyframes fg-dbl-sub { to { opacity: 1; } }
.fg-modal-item { border: 1px solid rgba(20,17,13,0.12); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; opacity: 0.55; }
.fg-modal.dark .fg-modal-item { border-color: rgba(244,239,231,0.14); }
.fg-modal-item.active { opacity: 1; border-color: currentColor; }
.fg-modal-t { font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 3px; }
.fg-modal-t em { font-style: normal; font-size: 12px; font-weight: 700; opacity: 0.7; }
.fg-modal-d { font-size: 13px; line-height: 1.5; opacity: 0.72; }
.fg-mbtn { display: block; width: 100%; margin-top: 12px; padding: 14px; border: none; border-radius: 13px; background: #14110d; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.fg-modal.dark .fg-mbtn { background: #f4efe7; color: #14110d; }
.fg-mbtn-ghost { margin-top: 8px; background: transparent; color: inherit; border: 1px solid rgba(20,17,13,0.15); }
.fg-modal.dark .fg-mbtn-ghost { background: transparent; color: #f4efe7; border-color: rgba(244,239,231,0.2); }

/* Full-screen photo zoom (appended to body, so not scoped under #fg) */
.fg-lb { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,0.93); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; animation: fg-lb-in .18s ease; }
.fg-lb img { max-width: 96vw; max-height: 94vh; object-fit: contain; border-radius: 10px; display: block; }
@keyframes fg-lb-in { from { opacity: 0; } to { opacity: 1; } }
#fg .fg-play-col { display: flex; flex-direction: column; min-width: 0; }
#fg .fg-q { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; padding: 22px 24px 4px; }
#fg .fg-q small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 3px; }
#fg .fg-q-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
#fg .fg-score-live { flex: none; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
#fg .fg-score-live.drop { animation: fg-score-drop .5s ease; }
@keyframes fg-score-drop {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.22) translateY(-2px); border-color: var(--bad); color: var(--bad); }
  55%  { transform: scale(0.97); border-color: var(--bad); color: var(--bad); }
  100% { transform: scale(1); }
}
/* Stack on narrow screens */
@media (max-width: 720px) {
  #fg .fg-round { grid-template-columns: 1fr; }
  #fg .fg-photo-col { aspect-ratio: 4/3; min-height: 0; }
}
/* Desktop: fixed round height, big photo, right panel scrolls internally (page never does) */
@media (min-width: 721px) {
  #fg .fg-round { height: min(78vh, 680px); }
  #fg .fg-photo-col { aspect-ratio: auto; }
  #fg .fg-photo { position: absolute; inset: 0; }
  #fg .fg-play-col { overflow-y: auto; }
}

/* Main menu (game picker) */
#fg .fg-card.fg-pad.fg-menu-card { max-width: 780px; }
#fg .fg-menu { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 22px; }
@media (min-width: 660px) { #fg .fg-menu { grid-template-columns: 1fr 1fr; } }
#fg .fg-game { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; padding: 20px 18px; background: var(--card); }
#fg .fg-game-help { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; font-family: inherit; display: grid; place-items: center; }
#fg .fg-game-help:hover { color: var(--ink); border-color: var(--ink); }
#fg .fg-game-h { padding-right: 30px; }
#fg .fg-game-h { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
#fg .fg-game-d { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin-bottom: 12px; flex: 1 1 auto; }
#fg .fg-game-s { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
#fg .fg-game-count { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 12px; }
#fg .fg-lock-note { margin-top: 12px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--ink); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; }

/* Photo counter badge */
#fg .fg-count-badge { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(0,0,0,0.62); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Photo thumbnail strip */
#fg .fg-thumbs { position: absolute; left: 12px; bottom: 12px; right: 104px; z-index: 2; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
#fg .fg-thumbs::-webkit-scrollbar { display: none; }
#fg .fg-thumb { flex: none; width: 46px; height: 46px; padding: 0; border: 2px solid rgba(255,255,255,0.55); border-radius: 9px; overflow: hidden; cursor: pointer; background: rgba(0,0,0,0.3); opacity: 0.75; transition: opacity .12s ease, border-color .12s ease; }
#fg .fg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
#fg .fg-thumb.active, #fg .fg-thumb:hover { opacity: 1; border-color: #fff; }

/* Neighborhood Guessr map */
#fg .fg-map { flex: 1 1 auto; min-height: 260px; margin: 14px 22px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--amber-soft); z-index: 0; }
#fg .fg-geo-actions { padding: 14px 22px 18px; }
#fg .fg-hint-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
#fg .fg-hintbtn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; color: var(--muted); }
#fg .fg-hintbtn svg { display: block; }
#fg .fg-hintbtn:hover:not(:disabled) { color: var(--ink); border-color: var(--ink); }
#fg .fg-hintbtn:disabled { opacity: 0.4; cursor: default; }
/* Reveal-name button */
#fg .fg-namebtn { font-size: 13px; font-weight: 800; letter-spacing: -0.02em; }
#fg .fg-namebtn.armed { background: var(--ink); color: var(--bg); border-color: var(--ink); opacity: 1; }
/* 1-of-3 button */
#fg .fg-thirdsbtn { font-size: 16px; font-weight: 800; }
#fg .fg-thirdsbtn.armed { background: var(--ink); color: var(--bg); border-color: var(--ink); opacity: 1; }
/* Three-option buttons for the 1-of-3 hint */
#fg .fg-third-opt { padding: 15px 14px; font-size: 16px; }
/* Double or nothing button */
#fg .fg-x2btn { font-size: 13px; font-weight: 800; letter-spacing: 0.02em; }
#fg .fg-x2btn.armed { background: var(--ink); color: var(--bg); border-color: var(--ink); opacity: 1; animation: fg-x2-pulse 1.1s ease-in-out infinite; }
@keyframes fg-x2-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(20,17,13,0); } 50% { box-shadow: 0 0 0 4px rgba(20,17,13,0.12); } }
#fg.dark .fg-x2btn.armed { animation: fg-x2-pulse-d 1.1s ease-in-out infinite; }
@keyframes fg-x2-pulse-d { 0%, 100% { box-shadow: 0 0 0 0 rgba(244,239,231,0); } 50% { box-shadow: 0 0 0 4px rgba(244,239,231,0.18); } }
#fg .fg-hint-out { font-size: 12.5px; font-weight: 700; color: var(--ink); }
#fg .fg-mode-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }
/* Pins are SVG circleMarkers styled in JS, so they can't depend on this file */
#fg.dark .fg-map { background: #241f18; }
#fg.dark .leaflet-control-attribution { background: rgba(0,0,0,0.55) !important; color: #999 !important; }
#fg.dark .leaflet-control-attribution a { color: #aaa !important; }
#fg .leaflet-control-attribution { font-size: 9px !important; }
/* Leaflet injects its own controls; keep them from inheriting page styles */
#fg .leaflet-container { font-family: inherit; background: transparent; }
@media (max-width: 720px) { #fg .fg-map { min-height: 300px; } }

/* Clues (progressive reveal) */
#fg .fg-clues { display: grid; gap: 8px; padding: 0 22px; }
#fg .fg-clues:not(:empty) { padding-top: 16px; }
#fg .fg-clue { border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 10px; padding: 12px 14px; background: var(--amber-soft); animation: fg-pop .22s ease; }
#fg .fg-clue-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
#fg .fg-clue-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); }
#fg .fg-clue-nav { display: flex; align-items: center; gap: 4px; flex: none; }
#fg .fg-clue-arrow { width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); font-size: 15px; line-height: 1; cursor: pointer; font-family: inherit; }
#fg .fg-clue-arrow:hover:not(:disabled) { border-color: var(--ink); }
#fg .fg-clue-arrow:disabled { opacity: 0.3; cursor: default; }
#fg .fg-clue-count { font-size: 10.5px; font-weight: 700; color: var(--muted); min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }
#fg .fg-clue-text { display: block; font-size: 14px; line-height: 1.55; color: var(--ink); }
@keyframes fg-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Give up */
#fg .fg-giveup { display: block; margin: 12px auto 0; padding: 6px 8px; background: none; border: none; color: var(--muted); font-family: inherit; font-size: 12.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
#fg .fg-giveup:hover { color: var(--bad); }

/* Wrong-guess shake */
#fg .fg-picker.shake { animation: fg-shake .4s cubic-bezier(.36,.07,.19,.97); }
@keyframes fg-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

/* Correct-guess flag celebration (appended to body) */
.fg-flag-ov { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; background: rgba(250,249,247,0.9); animation: fg-lb-in .15s ease; cursor: pointer; }
.fg-flag-ov.dark { background: rgba(10,9,7,0.92); }
.fg-flag-card { display: flex; flex-direction: column; align-items: center; gap: 16px; color: #14110d; font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; animation: fg-flag-pop .5s cubic-bezier(.2,1.3,.4,1) both; }
.fg-flag-ov.dark .fg-flag-card { color: #f4efe7; }
.fg-flag-img { position: relative; }
.fg-flag-img img { width: min(62vw, 240px); height: auto; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,0.28); display: block; }
.fg-flag-check { position: absolute; right: -12px; bottom: -12px; width: 46px; height: 46px; border-radius: 50%; background: #0e7a54; color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 700; box-shadow: 0 6px 18px rgba(14,122,84,0.45); animation: fg-flag-check .35s .28s ease both; }
.fg-flag-name { font-size: clamp(20px, 5vw, 28px); font-weight: 700; letter-spacing: -0.01em; animation: fg-globe-label .4s .22s ease both; }
@keyframes fg-flag-pop { 0% { opacity: 0; transform: scale(0.6) rotate(-6deg); } 60% { transform: scale(1.06) rotate(2deg); } 100% { opacity: 1; transform: none; } }
@keyframes fg-flag-check { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: none; } }

/* Perfect 5/5 flourish */
.fg-flag-perfect { font-size: 12px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink, #14110d); opacity: 0; animation: fg-perfect-in .5s .15s ease both; }
.fg-flag-ov.dark .fg-flag-perfect { color: #f4efe7; }
@keyframes fg-perfect-in { from { opacity: 0; transform: translateY(6px) scale(0.9); } to { opacity: 1; transform: none; } }
.fg-flag-ov.perfect .fg-flag-img img { box-shadow: 0 0 0 3px currentColor, 0 18px 55px rgba(0,0,0,0.32); }
.fg-flag-ov.perfect .fg-flag-img::after { content: ""; position: absolute; inset: -10px; border-radius: 20px; border: 2px solid currentColor; opacity: 0; animation: fg-perfect-ring 1s .3s ease-out; }
@keyframes fg-perfect-ring { 0% { opacity: 0.55; transform: scale(0.9); } 100% { opacity: 0; transform: scale(1.35); } }

/* Epic double-or-nothing win */
.fg-flag-ov.epic .fg-flag-card { animation: fg-flag-pop .6s cubic-bezier(.2,1.5,.35,1) both; }
.fg-flag-ov.epic .fg-flag-img img { width: min(72vw, 300px); box-shadow: 0 0 0 4px currentColor, 0 22px 60px rgba(0,0,0,0.38); }
.fg-flag-ov.epic .fg-flag-perfect.epic { font-size: 15px; letter-spacing: 0.26em; animation: fg-epic-label .5s .12s ease both; }
@keyframes fg-epic-label { 0% { opacity: 0; transform: scale(1.6); letter-spacing: 0.6em; } 100% { opacity: 1; transform: none; letter-spacing: 0.26em; } }
/* Rotating starburst behind the flag */
.fg-rays { position: absolute; left: 50%; top: 50%; width: 150vmax; height: 150vmax; z-index: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, currentColor 0deg 1.4deg, transparent 1.4deg 9deg);
  -webkit-mask-image: radial-gradient(circle, #000 6%, transparent 62%); mask-image: radial-gradient(circle, #000 6%, transparent 62%);
  opacity: 0; transform: translate(-50%, -50%);
  animation: fg-rays-spin 14s linear infinite, fg-rays-in .6s ease forwards; }
@keyframes fg-rays-spin { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes fg-rays-in { to { opacity: 0.14; } }
/* Expanding shockwave rings */
.fg-shock { position: absolute; left: 50%; top: 50%; width: 160px; height: 160px; border: 3px solid currentColor; border-radius: 50%; z-index: 1; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(0.35); animation: fg-shock .85s cubic-bezier(.2,.6,.3,1) .06s; }
.fg-shock.two { animation-delay: .28s; }
@keyframes fg-shock { 0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.35); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(4.4); } }
/* One quick screen flash */
.fg-flash { position: absolute; inset: 0; z-index: 2; background: currentColor; opacity: 0; pointer-events: none; animation: fg-flash .4s ease-out; }
@keyframes fg-flash { 0% { opacity: 0.28; } 100% { opacity: 0; } }
.fg-flag-ov .fg-flag-card { position: relative; z-index: 3; }

/* Confetti */
.fg-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.fg-confetti i { position: absolute; top: -8%; width: 9px; height: 14px; opacity: 0; animation-name: fg-confetti-fall; animation-timing-function: cubic-bezier(.25,.6,.4,1); animation-iteration-count: 1; animation-fill-mode: forwards; }
.fg-confetti i.round { border-radius: 50%; width: 10px; height: 10px; }
.fg-confetti i.c-a { background: #14110d; }
.fg-confetti i.c-b { background: #9a9186; }
.fg-confetti i.c-c { background: #d9d2c6; }
.fg-flag-ov.dark .fg-confetti i.c-a { background: #f4efe7; }
.fg-flag-ov.dark .fg-confetti i.c-b { background: #b7ac9c; }
.fg-flag-ov.dark .fg-confetti i.c-c { background: #6b6255; }
@keyframes fg-confetti-fall {
  0% { opacity: 0; top: -8%; }
  10% { opacity: 1; }
  100% { opacity: 0.9; top: 108%; }
}

/* Last-guess warning */
#fg .fg-lastguess { margin: 0 22px 10px; padding: 9px 12px; border: 1px solid var(--bad); border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-size: 12.5px; font-weight: 700; text-align: center; }
#fg .fg-lastguess.pulse { animation: fg-lastguess-in .4s ease; }
@keyframes fg-lastguess-in { 0% { opacity: 0; transform: translateY(-4px); } 60% { transform: scale(1.03); } 100% { opacity: 1; transform: none; } }

/* Country picker */
#fg .fg-picker { padding: 16px 22px 22px; }
#fg .fg-picker-input { width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); font-size: 16px; font-family: inherit; outline: none; transition: border-color .12s ease; }
#fg .fg-picker-input:focus { border-color: var(--ink); }
#fg .fg-picker-input::placeholder { color: var(--muted); }
#fg .fg-picker-list { display: grid; gap: 6px; margin-top: 10px; max-height: 300px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#fg .fg-picker-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; text-align: left; transition: border-color .1s ease, background .1s ease; }
#fg .fg-picker-item:hover:not(:disabled) { border-color: var(--ink); background: var(--line); }
/* Ruled out by the continent hint */
#fg .fg-picker-item.vanish { animation: fg-vanish .4s ease forwards; pointer-events: none; }
@keyframes fg-vanish { to { opacity: 0; transform: translateX(-16px) scale(0.95); } }
/* Countries already tried this round */
#fg .fg-picker-item.used { opacity: 0.4; cursor: default; text-decoration: line-through; }
#fg .fg-picker-item.used img { filter: grayscale(1); }
/* Random pick */
#fg .fg-picker-random { font-weight: 700; border-style: dashed; }
#fg .fg-picker-note { font-weight: 600; font-size: 12.5px; color: var(--muted); }
#fg .fg-picker-random svg { flex: none; }
#fg .fg-picker-item img { width: 26px; height: 20px; object-fit: cover; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px var(--line); }
#fg .fg-picker-item .fg-flag-fallback, #fg .fg-flag-fallback { width: 26px; height: 20px; border-radius: 3px; background: var(--line); flex: none; }
#fg .fg-picker-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 14px; }

/* Reveal panel */
#fg .fg-reveal { border-top: 1px solid var(--line); padding: 20px 22px; }
#fg .fg-reveal-verdict { font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
#fg .fg-reveal-verdict.good { color: var(--good); }
#fg .fg-reveal-verdict.bad { color: var(--bad); }
#fg .fg-reveal-food { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
#fg .fg-reveal-desc { font-size: 14px; line-height: 1.55; color: var(--muted); margin-bottom: 12px; }
#fg .fg-reveal-store { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--amber); background: var(--amber-soft); padding: 7px 12px; border-radius: 999px; margin-bottom: 16px; }

/* Results */
#fg .fg-score-big { font-size: clamp(44px, 14vw, 72px); font-weight: 700; line-height: 1; letter-spacing: -0.03em; text-align: center; margin-bottom: 6px; }
#fg .fg-score-max { font-size: 0.4em; font-weight: 600; color: var(--muted); }
#fg .fg-score-label { text-align: center; font-size: 15px; color: var(--muted); margin-bottom: 22px; }
#fg .fg-grid { text-align: center; font-size: 30px; letter-spacing: 6px; margin-bottom: 22px; }
#fg .fg-streak { display: flex; justify-content: center; gap: 22px; margin-bottom: 24px; }
#fg .fg-stat { text-align: center; }
#fg .fg-stat .n { font-size: 26px; font-weight: 700; }
#fg .fg-stat .l { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
/* Score history */
#fg .fg-hist { margin: 20px 0 22px; text-align: left; }
#fg .fg-hist-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
#fg .fg-hist-row:first-of-type { border-top: none; }
#fg .fg-hist-date { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
#fg .fg-hist-grid { font-size: 17px; letter-spacing: 2px; line-height: 1; }
#fg .fg-hist-score { text-align: right; font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; }
#fg .fg-hist-score span { font-size: 10.5px; font-weight: 600; color: var(--muted); margin-left: 2px; }
#fg .fg-hist-empty { padding: 26px 8px; text-align: center; color: var(--muted); font-size: 14px; }

/* Per-dish recap on the results screen */
#fg .fg-recap { margin: 4px 0 22px; text-align: left; }
#fg .fg-recap-h { font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
#fg .fg-recap-row { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-top: 1px solid var(--line); border-radius: 10px; text-decoration: none !important; color: inherit; }
#fg .fg-recap-row:first-of-type { border-top: none; }
#fg a.fg-recap-row:hover { background: var(--amber-soft); }
#fg .fg-recap-img { width: 48px; height: 48px; border-radius: 10px; background: var(--line); background-size: cover; background-position: center; flex: 0 0 48px; }
#fg .fg-recap-body { flex: 1 1 auto; min-width: 0; }
#fg .fg-recap-name { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; }
#fg .fg-recap-go { color: var(--muted); font-weight: 700; }
#fg a.fg-recap-row:hover .fg-recap-go { color: var(--ink); }
#fg .fg-recap-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
#fg .fg-recap-flag { width: 18px; height: 13px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); flex: none; }
#fg .fg-recap-store { color: var(--muted); }
#fg .fg-recap-score { flex: 0 0 auto; text-align: right; font-size: 16px; font-weight: 700; color: var(--ink); white-space: nowrap; }
#fg .fg-recap-score span { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

#fg .fg-cta { margin-top: 14px; padding: 20px; border-radius: 16px; background: var(--amber-soft); text-align: center; }
#fg .fg-cta h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
#fg .fg-cta p { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
#fg .fg-countdown { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
#fg .fg-pool { text-align: center; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); margin-top: 14px; }
#fg .fg-countdown b { color: var(--ink); font-variant-numeric: tabular-nums; }

#fg .fg-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 50; }
#fg .fg-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

#fg .fg-state { padding: 60px 24px; text-align: center; color: var(--muted); font-size: 15px; }
#fg .fg-spin { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--amber); border-radius: 50%; margin: 0 auto 16px; animation: fg-spin 0.8s linear infinite; }
@keyframes fg-spin { to { transform: rotate(360deg); } }
@media (max-width: 380px) { #fg .fg-opts { grid-template-columns: 1fr; } }
