/* Inter (OFL), self-hosted; only downloaded when a theme that uses it is active. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-var.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Earth site: warm, low-glare palette; generous legible type; dark mode; adjustable size. */
:root {
  --bg: #f6f2ea;          /* warm paper, not white */
  --surface: #fffcf6;
  --surface-2: #efe9dd;
  --text: #2b3034;        /* soft near-black, not pure black */
  --muted: #5d656c;
  --accent: #1f6f5f;      /* deep sea-green */
  --accent-ink: #ffffff;
  --accent-soft: #d9ebe4;
  --earth: #b36a2b;       /* ochre, used sparingly */
  --border: #e1dacb;
  --focus: #2c8c78;
  --shadow: 0 1px 2px rgba(50, 40, 20, .06), 0 8px 24px rgba(50, 40, 20, .06);
  --radius: 14px;
  --measure: 66ch;
  --step--1: .9rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.45rem;
  --step-3: 1.8rem;
  --step-4: 2.3rem;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #171b1e;
  --surface: #1f2529;
  --surface-2: #262d32;
  --text: #e4ded3;        /* warm off-white text */
  --muted: #a4acb2;
  --accent: #78c7b2;
  --accent-ink: #10201b;
  --accent-soft: #223730;
  --earth: #d49154;
  --border: #2f373d;
  --focus: #8fd8c4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #171b1e; --surface: #1f2529; --surface-2: #262d32; --text: #e4ded3; --muted: #a4acb2;
    --accent: #78c7b2; --accent-ink: #10201b; --accent-soft: #223730; --earth: #d49154;
    --border: #2f373d; --focus: #8fd8c4;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

/* ---- Extra themes: chosen from the theme menu; each only redefines tokens. ---- */
/* "Nutrisize": mirrors the Nutrisize Health look (Inter, 16px base, white + mint tint,
   translucent white header, dark-green centred footer). Content stays independent. */
:root[data-theme="nutrisize"] {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f4faf7;
  --text: #12211b; --muted: #40544a;
  --accent: #16794c; --accent-ink: #ffffff; --accent-soft: #e3f5ec;
  --earth: #2f9e68; --border: #d3e8dc; --focus: #1268b3;
  --shadow: 0 4px 24px rgba(11, 61, 46, .08);
  --radius: 14px; --measure: 66ch;
  --brand-ink: #0b3d2e; --btn: #16794c; --btn-hover: #0f5c39;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: calc(100% * var(--zoom, 1)); color-scheme: light;
}
:root[data-theme="sepia"] {
  --bg: #f4ecd8; --surface: #fbf5e6; --surface-2: #eadfc4; --text: #3b2f20; --muted: #6a5a43;
  --accent: #8a4b12; --accent-ink: #fffaf0; --accent-soft: #ecd9b4; --earth: #a35a1c;
  --border: #d9c9a5; --focus: #8a4b12; color-scheme: light;
}
:root[data-theme="ocean"] {
  --bg: #0f1f2e; --surface: #162b3f; --surface-2: #1d3750; --text: #e3edf5; --muted: #a6bccd;
  --accent: #6cc4ee; --accent-ink: #08202f; --accent-soft: #1d3d57; --earth: #f0b36a;
  --border: #284862; --focus: #8fd6f5; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}
:root[data-theme="forest"] {
  --bg: #14201a; --surface: #1b2b23; --surface-2: #233829; --text: #e6eddf; --muted: #a9bcab;
  --accent: #8fd49a; --accent-ink: #0d1f13; --accent-soft: #274232; --earth: #e0b070;
  --border: #2f4a39; --focus: #a6e3ae; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}
/* Arcforge: violet and teal on ink (matches the games brand). */
:root[data-theme="arcforge"] {
  --bg: #0d0b1f; --surface: #17142d; --surface-2: #211d3d; --text: #ece9ff; --muted: #b4aed6;
  --accent: #4fd1c5; --accent-ink: #0d0b1f; --accent-soft: #1d2f3d; --earth: #9b7bff;
  --border: #2d2852; --focus: #7ee3d9; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
}
:root[data-theme="contrast"] {
  --bg: #fffdf5; --surface: #ffffff; --surface-2: #f0ede0; --text: #111111; --muted: #2b2b2b;
  --accent: #0b3fa8; --accent-ink: #ffffff; --accent-soft: #dfe8fb; --earth: #7a3d00;
  --border: #555555; --focus: #0b3fa8; --shadow: none; color-scheme: light;
}
:root[data-theme="contrast"] .card, :root[data-theme="contrast"] .results li, :root[data-theme="contrast"] .list li { border-width: 2px; }


* { box-sizing: border-box; }
html { font-size: calc(112.5% * var(--zoom, 1)); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Atkinson Hyperlegible", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-0); line-height: 1.65; letter-spacing: .005em;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: var(--step-4); } h2 { font-size: var(--step-2); } h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: var(--measure); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2rem, 48rem); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 3.75rem; flex-wrap: wrap; padding-block: .4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: var(--step-1); color: var(--text); text-decoration: none; }
.brand svg { width: 1.6em; height: 1.6em; }
.brand .mark { width: 2.1rem; height: 2.1rem; display: block; filter: drop-shadow(0 1px 3px rgba(10, 60, 80, .35)); }
.nav { display: flex; gap: .25rem; margin-left: auto; flex-wrap: wrap; }
.nav a { padding: .5rem .8rem; border-radius: 999px; text-decoration: none; color: var(--text); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); }
.controls { display: flex; gap: .25rem; align-items: center; }
.ctl { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; min-width: 2.4rem; height: 2.4rem; padding: 0 .7rem; font: inherit; font-size: var(--step--1); cursor: pointer; }
.ctl:hover { background: var(--surface-2); }

/* Hero */
.hero { padding-block: clamp(2rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem); display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 52rem) { .hero { grid-template-columns: 1.2fr .8fr; } }
.hero h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.4rem); max-width: 16ch; }
.hero .lede { font-size: var(--step-1); color: var(--muted); max-width: 42ch; }
.globe { width: min(100%, 22rem); margin-inline: auto; display: block; filter: drop-shadow(0 12px 30px rgba(31, 111, 95, .18)); }

/* Search */
.search { display: flex; gap: .5rem; max-width: 40rem; margin-block: 1.25rem; }
.search input[type="search"] { flex: 1; font: inherit; font-size: var(--step-0); padding: .8rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); min-width: 0; }
.search input::placeholder { color: var(--muted); }
.btn { font: inherit; font-weight: 600; padding: .8rem 1.2rem; border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.btn:hover { filter: brightness(1.05); }
.btn--ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.results { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .6rem; }
.results li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.1rem; }
.results .kind { font-size: var(--step--1); color: var(--muted); }
.results-status { color: var(--muted); font-size: var(--step--1); min-height: 1.5em; }

/* Cards */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); margin: 0; padding: 0; list-style: none; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .35rem; min-height: 100%; }
.card h3 { margin: 0; }
.card a.cover { color: inherit; text-decoration: none; }
.card a.cover:hover h3 { color: var(--accent); }
.card .blurb { color: var(--muted); margin: 0; font-size: var(--step--1); }
.card .count { margin-top: auto; font-size: var(--step--1); color: var(--muted); }
.card--domain { border-top: 4px solid var(--accent); }
.badge { display: inline-block; font-size: .78rem; padding: .1rem .55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.badge--coming { background: var(--surface-2); color: var(--muted); }

section { padding-block: clamp(1.5rem, 4vw, 3rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }
.principles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); padding: 0; margin: 0; list-style: none; }
.principles li { padding: 1rem 1.1rem; border-left: 3px solid var(--earth); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.principles h3 { margin-bottom: .2em; font-size: var(--step-0); }
.principles p { margin: 0; font-size: var(--step--1); color: var(--muted); }

.breadcrumb { font-size: var(--step--1); color: var(--muted); margin: 1.2rem 0 .4rem; }
.breadcrumb a { color: var(--muted); }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.list li { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .75rem 1rem; display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; }
.list .blurb { color: var(--muted); font-size: var(--step--1); margin: 0; flex: 1 1 20rem; }
.empty { background: var(--surface-2); border-radius: var(--radius); padding: 1.2rem 1.3rem; color: var(--muted); }
.pager { display: flex; gap: .5rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.pager a, .pager span { padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; }
.pager span[aria-current] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.project-media { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin-block: 1rem; }
.project-media figure { margin: 0; }
.project-media img { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; }
.project-media figcaption { font-size: .8rem; color: var(--muted); }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-block: 1rem; }

.site-footer { border-top: 1px solid var(--border); margin-top: 3rem; padding-block: 2rem; color: var(--muted); font-size: var(--step--1); }
.site-footer .wrap { display: flex; gap: 1rem 2rem; flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* Nutrisize chrome (Nutrisize-style header, hero tint, cards, footer) */
[data-theme="nutrisize"] body { font-family: var(--font); line-height: 1.65; letter-spacing: 0; }
[data-theme="nutrisize"] a { text-decoration: none; }
[data-theme="nutrisize"] a:hover { text-decoration: underline; }
[data-theme="nutrisize"] h1, [data-theme="nutrisize"] h2, [data-theme="nutrisize"] h3 { color: var(--brand-ink); letter-spacing: -.02em; font-weight: 800; }
[data-theme="nutrisize"] h1 { font-weight: 900; letter-spacing: -.03em; line-height: 1.12; }
[data-theme="nutrisize"] .site-header { background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
[data-theme="nutrisize"] .site-header .wrap { width: min(100% - 3rem, 1080px); gap: 1.75rem; min-height: 3.625rem; padding-block: .75rem; }
[data-theme="nutrisize"] .brand { color: var(--brand-ink); font-weight: 800; font-size: 1.0625rem; letter-spacing: -.02em; text-decoration: none; }
[data-theme="nutrisize"] .nav { gap: 1.375rem; }
[data-theme="nutrisize"] .nav a { padding: 0; border-radius: 0; color: var(--muted); font-size: .9375rem; font-weight: 500; background: none; }
[data-theme="nutrisize"] .nav a:hover, [data-theme="nutrisize"] .nav a[aria-current="page"] { color: #16794c; background: none; text-decoration: none; }
[data-theme="nutrisize"] .ctl, [data-theme="nutrisize"] .theme-list { background: #fff; border-color: var(--border); }
[data-theme="nutrisize"] .wrap { width: min(100% - 3rem, 1080px); }
[data-theme="nutrisize"] body { overflow-x: clip; }
[data-theme="nutrisize"] .hero { position: relative; isolation: isolate; }
[data-theme="nutrisize"] .hero::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: radial-gradient(1000px 500px at 85% -10%, #d8f3e3 0%, transparent 60%), radial-gradient(900px 500px at 10% 110%, #e3f5ec 0%, transparent 60%), #f4faf7; }
[data-theme="nutrisize"] .hero .lede { color: var(--muted); }
[data-theme="nutrisize"] .card, [data-theme="nutrisize"] .results li { border-color: var(--border); box-shadow: var(--shadow); }
[data-theme="nutrisize"] .card { padding: 1.625rem; }
[data-theme="nutrisize"] .card--domain { border-top-color: #2f9e68; }
[data-theme="nutrisize"] .btn { background: var(--btn); border-radius: 999px; font-weight: 600; }
[data-theme="nutrisize"] .btn:hover { background: var(--btn-hover); filter: none; text-decoration: none; }
[data-theme="nutrisize"] .btn--ghost { background: transparent; color: var(--btn); border-color: var(--btn); }
[data-theme="nutrisize"] .btn--ghost:hover { background: var(--accent-soft); }
[data-theme="nutrisize"] .badge { background: #e3f5ec; color: #16794c; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; padding: .25rem .875rem; }
[data-theme="nutrisize"] .pager span[aria-current] { background: var(--btn); }
[data-theme="nutrisize"] .site-footer { background: #0b3d2e; color: #cfe6db; border-top: 0; margin-top: 3rem; padding: 2.75rem 0 2.25rem; font-size: .875rem; text-align: center; }
[data-theme="nutrisize"] .site-footer .wrap { flex-direction: column; align-items: center; justify-content: center; gap: 1.125rem; }
[data-theme="nutrisize"] .site-footer a { color: #eaf7f0; font-weight: 500; }

/* Theme menu: swatch button + listbox with name, description and a tick on the active theme */
.theme-menu { position: relative; }
.sw { display: inline-block; width: 1.35rem; height: 1.35rem; flex: none; border-radius: 50%; border: 1.5px solid var(--muted); }
.ctl--theme { display: inline-flex; align-items: center; gap: .5rem; padding: 0 .75rem; }
.ctl--theme .chev { width: .8rem; height: .55rem; }
.theme-list { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 40; width: min(21rem, calc(100vw - 2rem)); max-height: min(70vh, 30rem); overflow: auto; margin: 0; padding: .4rem; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.theme-list[hidden] { display: none; }
.theme-list li { display: flex; align-items: center; gap: .85rem; padding: .7rem .8rem; border-radius: 10px; cursor: pointer; }
.theme-list li:hover { background: var(--surface-2); }
.theme-list li[aria-selected="true"] { background: var(--surface-2); }
.theme-list li:focus-visible { outline: 3px solid var(--focus); outline-offset: -2px; }
.theme-list .t-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.theme-list .t-name { font-weight: 700; line-height: 1.3; }
.theme-list .t-desc { color: var(--muted); font-size: var(--step--1); line-height: 1.35; }
.theme-list .tick { width: 1.1rem; height: 1.1rem; color: var(--accent); visibility: hidden; flex: none; }
.theme-list li[aria-selected="true"] .tick { visibility: visible; }
@media (max-width: 40rem) { .theme-list { position: fixed; left: 1rem; right: 1rem; top: 4.5rem; width: auto; } }

/* Text-size zoom: A- / 100% / A+ */
.zoom { display: inline-flex; gap: .2rem; align-items: center; }
.ctl--zoom { display: inline-flex; align-items: baseline; justify-content: center; gap: .05em; padding: 0 .6rem; font-weight: 700; }
.z-a--sm { font-size: .85em; } .z-a--lg { font-size: 1.2em; }
.z-sign { font-size: 1.05em; }
.ctl--zoomval { min-width: 3.6rem; font-variant-numeric: tabular-nums; }
.ctl:disabled { opacity: .4; cursor: default; }

/* ---- Interactive globe ---- */
.hero { align-items: start; }
@media (min-width: 52rem) { .hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
:root {
  --g-ocean-hi: #2b94b8; --g-ocean-lo: #0b4560; --g-land: #6bcf8c; --g-land-edge: rgba(8, 60, 40, .55);
  --g-grat: rgba(255, 255, 255, .14); --g-glow: rgba(120, 220, 170, .5); --g-night: rgb(4, 14, 30);
  --g-text: #0d2a1e; --g-halo: rgba(255, 255, 255, .92);
}
.globe-stage { width: 100%; max-width: 40rem; margin-inline: auto; }
:root[data-theme="nutrisize"] { --g-ocean-hi: #34a4c4; --g-ocean-lo: #0a4a63; --g-land: #7bd896; --g-glow: rgba(110, 220, 150, .6); }
:root[data-theme="sepia"] { --g-ocean-hi: #8fb6b0; --g-ocean-lo: #3d6d6c; --g-land: #d6b97b; --g-land-edge: rgba(90, 60, 20, .5); --g-glow: rgba(214, 170, 90, .5); --g-text: #3b2f20; }
:root[data-theme="dark"], :root[data-theme="ocean"], :root[data-theme="forest"], :root[data-theme="arcforge"] {
  --g-text: #f2f6f4; --g-halo: rgba(8, 14, 20, .88); --g-night: rgb(0, 4, 14); --g-land-edge: rgba(0, 20, 14, .6);
}
:root[data-theme="dark"] { --g-ocean-hi: #1d6a82; --g-ocean-lo: #082a3a; --g-land: #4fae8c; --g-glow: rgba(120, 199, 178, .45); }
:root[data-theme="ocean"] { --g-ocean-hi: #2a79c4; --g-ocean-lo: #082a55; --g-land: #5bb8d8; --g-glow: rgba(108, 196, 238, .55); }
:root[data-theme="forest"] { --g-ocean-hi: #2a7a66; --g-ocean-lo: #0b3025; --g-land: #8fd49a; --g-glow: rgba(143, 212, 154, .5); }
:root[data-theme="arcforge"] { --g-ocean-hi: #4a3aa8; --g-ocean-lo: #120c3a; --g-land: #3fd1c2; --g-glow: rgba(124, 92, 255, .6); --g-land-edge: rgba(8, 10, 40, .55); }
:root[data-theme="contrast"] { --g-ocean-hi: #2f6fd0; --g-ocean-lo: #0a2a6a; --g-land: #4fb35a; --g-land-edge: rgba(0, 0, 0, .75); --g-glow: rgba(11, 63, 168, .35); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { --g-ocean-hi: #1d6a82; --g-ocean-lo: #082a3a; --g-land: #4fae8c; --g-text: #f2f6f4; --g-halo: rgba(8, 14, 20, .88); --g-night: rgb(0, 4, 14); }
}

.globe-chips { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-bottom: .6rem; }
.chip { font: inherit; font-size: var(--step--1); font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.chip span { color: var(--muted); font-weight: 500; }
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chip[aria-pressed="true"] span { color: inherit; opacity: .85; }
.dot { display: inline-block; width: .8rem; height: .8rem; flex: none; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.dot--heritage { background: radial-gradient(circle at 35% 30%, #ffe08a, #f5b82e 55%, #b27a00); }
.dot--nature { background: radial-gradient(circle at 35% 30%, #ff9d92, #ee5a4c 55%, #b52b1f); }
.dot--wildlife { background: radial-gradient(circle at 35% 30%, #c4a9ff, #8f68f0 55%, #5a34c4); }
.dot--extremes { background: radial-gradient(circle at 35% 30%, #ff8fc3, #e2408f 55%, #a8185f); }

.globe-canvas { position: relative; width: 100%; aspect-ratio: 1; display: flex; justify-content: center; align-items: flex-start; }
.globe-canvas.is-flat { aspect-ratio: auto; min-height: 12rem; }
.globe-canvas:not(.is-live) .globe { width: min(100%, 26rem); }
.globe-cv { display: block; border-radius: 50%; cursor: grab; outline-offset: 4px; max-width: 100%; }
.globe-cv.is-flat { border-radius: 1rem; box-shadow: 0 10px 30px rgba(10, 40, 60, .18); }
.globe-cv.is-grab { cursor: grabbing; }
.globe-views { position: absolute; left: .4rem; top: .4rem; z-index: 2; display: inline-flex; padding: .2rem; gap: .15rem; border-radius: 999px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(6px); box-shadow: var(--shadow); }
.gv { font: inherit; font-size: var(--step--1); font-weight: 600; padding: .3rem .8rem; border-radius: 999px; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.gv:hover { background: var(--surface-2); }
.gv[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.globe-tools { position: absolute; right: .4rem; top: .4rem; display: flex; flex-direction: column; gap: .35rem; }
.gt { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--text); font: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); }
.gt:hover { background: var(--surface-2); }
.gt[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.globe-panel { position: absolute; left: .5rem; right: .5rem; bottom: .5rem; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1.1rem 1rem; }
.globe-panel[hidden] { display: none; }
.gp-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .3rem; }
.gp-kind, .gp-unesco { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .15rem .55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.gp-unesco { background: var(--surface-2); color: var(--muted); }
.gp-close { margin-left: auto; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.gp-name { margin: 0 0 .1rem; font-size: var(--step-1); }
.gp-where { margin: 0 0 .4rem; font-size: var(--step--1); }
.gp-blurb { margin: 0 0 .7rem; font-size: var(--step--1); max-width: none; }
.gp-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.gp-actions .btn { padding: .5rem .9rem; font-size: var(--step--1); }
.globe-hint { text-align: center; font-size: var(--step--1); margin: .6rem 0 0; max-width: none; }
.globe-list { margin-top: .6rem; }
.globe-list summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.globe-list ul { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .25rem .9rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); font-size: var(--step--1); }
.globe-list a { display: flex; gap: .45rem; align-items: baseline; text-decoration: none; padding: .25rem 0; }
.globe-list a:hover { text-decoration: underline; }
@media (max-width: 40rem) { .globe-panel { position: static; margin-top: .6rem; } .globe-canvas { aspect-ratio: auto; flex-direction: column; align-items: center; } }

/* Phone fixes: let hero columns shrink (search form no longer overflows) and lay globe controls in a row below the map */
.hero > * { min-width: 0; }
.search input[type="search"] { width: 100%; }
@media (max-width: 40rem) {
  .globe-tools { position: static; flex-direction: row; justify-content: center; flex-wrap: wrap; margin-top: .6rem; }
}
