/* ==========================================================================
   MapyGo — public design system
   Sections: tokens · reset · type · layout · components · pages · print
   ========================================================================== */

/* ------------------------------------------------------------- 1. tokens -- */
:root {
    /* brand */
    --brand-900: #06322f;
    --brand-800: #0a453f;
    --brand-700: #0e5c56;
    --brand-600: #13736b;
    --brand-500: #1a8f85;
    --brand-300: #6fc7be;
    --brand-100: #dcf1ee;

    --gold-700: #9a6a24;
    --gold-600: #b8823a;
    --gold-500: #c9954a;
    --gold-300: #e6c78e;
    --gold-100: #f7edda;

    --coral: #d0603f;
    --plum: #7c4b78;
    --sky: #2b7fb8;

    /* neutrals — warm paper on the light side, cool ink on the dark */
    --ink: #101820;
    --ink-2: #33404f;
    --muted: #6a7684;
    --line: #e6e1d8;
    --line-strong: #d5cec1;
    --paper: #ffffff;
    --surface: #faf8f4;
    --surface-2: #f3efe8;
    --surface-3: #ebe6dc;

    --ok: #1f7a4d;
    --warn: #b3761a;
    --bad: #c0392b;

    /* type */
    --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* geometry */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --container: 1240px;
    --gutter: clamp(16px, 4vw, 28px);
    --header-h: 68px;

    /* elevation */
    --shadow-xs: 0 1px 2px rgba(16, 24, 32, .06);
    --shadow-sm: 0 2px 8px rgba(16, 24, 32, .07), 0 1px 2px rgba(16, 24, 32, .04);
    --shadow: 0 10px 30px -12px rgba(16, 24, 32, .18), 0 2px 8px rgba(16, 24, 32, .05);
    --shadow-lg: 0 28px 60px -24px rgba(16, 24, 32, .3), 0 8px 24px -12px rgba(16, 24, 32, .12);
    --shadow-gold: 0 12px 30px -12px rgba(184, 130, 58, .55);

    --ease: cubic-bezier(.2, .7, .3, 1);
    color-scheme: light;
}

[data-theme="dark"] {
    --ink: #e9eef4;
    --ink-2: #b9c4d1;
    --muted: #8d9aab;
    --line: #212c3a;
    --line-strong: #2e3b4c;
    --paper: #111823;
    --surface: #0c121b;
    --surface-2: #161f2b;
    --surface-3: #1d2836;

    --brand-700: #2aa79a;
    --brand-600: #34b8a9;
    --brand-100: #10312f;
    --gold-600: #d3a05a;
    --gold-500: #ddb173;
    --gold-100: #33291a;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, .45);
    --shadow: 0 14px 34px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 30px 70px -26px rgba(0, 0, 0, .8);
    color-scheme: dark;
}

/* -------------------------------------------------------------- 2. reset -- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure, blockquote { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
    outline: 2px solid var(--brand-600);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection { background: color-mix(in srgb, var(--gold-500) 40%, transparent); }

/* --------------------------------------------------------------- 3. type -- */
h1, h2, h3, h4, h5 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.015em;
    font-variation-settings: 'SOFT' 0, 'WONK' 0;
}
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem); }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; }
small { font-size: .8125rem; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brand-700);
}
.eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-500), transparent);
    border-radius: 2px;
}
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; color: var(--ink-2); }
.serif { font-family: var(--font-display); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }

/* ------------------------------------------------------------- 4. layout -- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--narrow { max-width: 820px; }
.container--wide { max-width: 1440px; }

.section { padding-block: clamp(40px, 6vw, 76px); }
.section--tight { padding-block: clamp(28px, 4vw, 46px); }
.section--paper { background: var(--paper); }
.section--tint { background: var(--surface-2); }

.stack > * + * { margin-top: var(--stack-gap, 16px); }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(24px, 3vw, 44px);
    align-items: start;
}
@media (max-width: 1023px) { .split { grid-template-columns: minmax(0, 1fr); } }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: clamp(20px, 3vw, 32px);
    flex-wrap: wrap;
}
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 62ch; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 200;
    background: var(--brand-700); color: #fff; padding: 10px 16px; border-radius: 8px;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------- 5. components -- */

/* buttons */
.btn {
    --btn-bg: var(--brand-700);
    --btn-fg: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 20px;
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-weight: 650;
    font-size: .94rem;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn svg { flex: none; }
.btn--gold { --btn-bg: linear-gradient(135deg, var(--gold-600), var(--gold-500)); --btn-fg: #2a1c06; box-shadow: var(--shadow-gold); }
.btn--dark { --btn-bg: var(--ink); --btn-fg: var(--paper); }
.btn--ghost {
    --btn-bg: transparent; --btn-fg: var(--ink);
    border-color: var(--line-strong); box-shadow: none;
}
.btn--ghost:hover { background: var(--surface-2); box-shadow: var(--shadow-xs); }
.btn--light { --btn-bg: rgba(255,255,255,.14); --btn-fg: #fff; border-color: rgba(255,255,255,.28); backdrop-filter: blur(8px); }
.btn--light:hover { --btn-bg: rgba(255,255,255,.24); }
.btn--sm { padding: 8px 14px; font-size: .85rem; }
.btn--lg { padding: 14px 26px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* chips & badges */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-2);
    transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
a.chip:hover { background: var(--brand-100); border-color: var(--brand-300); color: var(--brand-700); }
.chip--solid { background: var(--brand-700); color: #fff; border-color: transparent; }
.chip--gold { background: var(--gold-100); border-color: var(--gold-300); color: var(--gold-700); }
.chip--ghost { background: transparent; }
.chip.is-active { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.chip svg { opacity: .8; }

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 6px;
    font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.badge--ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge--muted { background: var(--surface-3); color: var(--muted); }
.badge--warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.badge--bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }

.pill-cat {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    font-size: .74rem; font-weight: 700; letter-spacing: .02em;
    background: color-mix(in srgb, var(--cat, var(--brand-700)) 14%, var(--paper));
    color: color-mix(in srgb, var(--cat, var(--brand-700)) 85%, var(--ink));
    border: 1px solid color-mix(in srgb, var(--cat, var(--brand-700)) 26%, transparent);
}

/* stars */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.star {
    width: 13px; height: 13px; display: inline-block;
    background: var(--line-strong);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.star.is-full { background: var(--gold-500); }
.star.is-half { background: linear-gradient(90deg, var(--gold-500) 50%, var(--line-strong) 50%); }

/* cards */
.card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-3);
}
.card__media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .6s var(--ease);
}
.card:hover .card__media img { transform: scale(1.055); }
.card__media::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(8, 14, 20, .72) 0%, rgba(8, 14, 20, .18) 42%, transparent 70%);
}
.card__overlay {
    position: absolute; inset-inline: 0; bottom: 0; z-index: 2;
    padding: 14px 16px; color: #fff;
}
.card__overlay h3 { color: #fff; font-size: 1.22rem; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.card__overlay .meta { color: rgba(255,255,255,.86); font-size: .82rem; }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__body h3 { font-size: 1.14rem; }
.card__body p { color: var(--muted); font-size: .9rem; }
.card__foot {
    margin-top: auto; padding-top: 12px;
    border-top: 1px dashed var(--line);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    font-size: .82rem; color: var(--muted);
}
.card__flag {
    position: absolute; top: 12px; left: 12px; z-index: 3;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; border-radius: 999px;
    background: rgba(9, 15, 22, .58);
    backdrop-filter: blur(8px);
    color: #fff; font-size: .73rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    border: 1px solid rgba(255,255,255,.2);
}
.card__flag--gold { background: linear-gradient(135deg, var(--gold-600), var(--gold-500)); color: #2a1c06; border-color: transparent; }
.card__rank {
    position: absolute; top: 12px; right: 12px; z-index: 3;
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 700; font-size: .95rem;
    background: rgba(9, 15, 22, .6); color: #fff;
    border: 1px solid rgba(255,255,255,.24);
    backdrop-filter: blur(8px);
}
.card__rank.is-top { background: linear-gradient(135deg, var(--gold-600), var(--gold-300)); color: #2a1c06; border-color: transparent; }
.card-link::after { content: ''; position: absolute; inset: 0; z-index: 4; }

/* meta rows */
.metaline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--muted); }
.metaline > span { display: inline-flex; align-items: center; gap: 5px; }
.metaline svg { opacity: .7; }

/* forms */
.field { display: block; margin-bottom: 16px; }
.field > label, .label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--ink-2);
    margin-bottom: 7px;
}
.input, .select, .textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--ink);
    transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
    font-size: .95rem;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--brand-600);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-600) 18%, transparent);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236a7684' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
}
.hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.error-text { font-size: .8rem; color: var(--bad); margin-top: 6px; }

/* segmented control */
.segmented {
    display: inline-flex;
    padding: 4px;
    gap: 4px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    flex-wrap: wrap;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 650;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all .18s var(--ease);
    white-space: nowrap;
}
.segmented label:hover { color: var(--ink); }
.segmented input:checked + label {
    background: var(--paper);
    color: var(--brand-700);
    box-shadow: var(--shadow-sm);
}
.segmented input:focus-visible + label { outline: 2px solid var(--brand-600); outline-offset: 2px; }

/* option cards (planner) */
.optioncards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.optioncard { position: relative; }
.optioncard input { position: absolute; opacity: 0; pointer-events: none; }
.optioncard label {
    display: flex; flex-direction: column; gap: 4px;
    padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    cursor: pointer;
    height: 100%;
    transition: all .18s var(--ease);
}
.optioncard label strong { font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.optioncard label span { font-size: .78rem; color: var(--muted); line-height: 1.45; }
.optioncard label:hover { border-color: var(--brand-300); }
.optioncard input:checked + label {
    border-color: var(--brand-600);
    background: color-mix(in srgb, var(--brand-100) 60%, var(--paper));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-600) 12%, transparent);
}
.optioncard input:focus-visible + label { outline: 2px solid var(--brand-600); outline-offset: 2px; }

/* range */
.range { width: 100%; accent-color: var(--brand-700); }

/* alerts */
.alert {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
    font-size: .9rem;
}
.alert svg { flex: none; margin-top: 2px; }
.alert--success { background: color-mix(in srgb, var(--ok) 10%, var(--paper)); border-color: color-mix(in srgb, var(--ok) 30%, transparent); color: var(--ok); }
.alert--error { background: color-mix(in srgb, var(--bad) 9%, var(--paper)); border-color: color-mix(in srgb, var(--bad) 28%, transparent); color: var(--bad); }
.alert--warning { background: color-mix(in srgb, var(--warn) 12%, var(--paper)); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.alert--info { background: var(--brand-100); border-color: var(--brand-300); color: var(--brand-800); }

/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.crumbs a:hover { color: var(--brand-700); }
.crumbs svg { opacity: .45; }

/* pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--paper);
    font-size: .9rem; font-weight: 600; color: var(--ink-2);
    transition: all .16s var(--ease);
}
.pagination a:hover { border-color: var(--brand-600); color: var(--brand-700); }
.pagination .is-current { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.pagination .is-gap { border: 0; background: none; }

/* accordion */
.accordion { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.accordion details + details { border-top: 1px solid var(--line); }
.accordion summary {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 20px; cursor: pointer; font-weight: 650; list-style: none;
    transition: background .16s var(--ease);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { background: var(--surface-2); }
.accordion summary::after {
    content: ''; flex: none; width: 10px; height: 10px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s var(--ease);
}
.accordion details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.accordion .accordion__body { padding: 0 20px 18px; color: var(--ink-2); font-size: .94rem; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.table { font-size: .9rem; }
.table th, .table td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface-2); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }

/* ad slots */
.adslot {
    margin: clamp(20px, 3vw, 34px) 0;
    padding: 12px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--surface-2) 60%, transparent);
    text-align: center;
    overflow: hidden;
}
.adslot__label {
    display: block; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 8px;
}
.adslot--inline { margin: 0; height: 100%; display: grid; place-items: center; min-height: 220px; }

/* ---------------------------------------------------------- 6. site chrome */
.header {
    position: sticky; top: 0; z-index: 100;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-xs); }
.header__inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.32rem; letter-spacing: -.02em; }
.logo__mark {
    width: 34px; height: 34px; border-radius: 11px; flex: none;
    display: grid; place-items: center;
    background: linear-gradient(140deg, var(--brand-700), var(--brand-500) 55%, var(--gold-500));
    color: #fff; box-shadow: var(--shadow-sm);
}
.logo__mark svg { width: 19px; height: 19px; }
.logo em { font-style: normal; color: var(--gold-600); }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
    padding: 8px 13px; border-radius: 999px;
    font-size: .92rem; font-weight: 600; color: var(--ink-2);
    transition: background .16s var(--ease), color .16s var(--ease);
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.is-active { color: var(--brand-700); background: var(--brand-100); }

.header__tools { display: flex; align-items: center; gap: 8px; }
.iconbtn {
    width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink-2);
    transition: all .16s var(--ease);
}
.iconbtn:hover { border-color: var(--brand-300); color: var(--brand-700); }
.burger { display: none; }

@media (max-width: 900px) {
    .nav { display: none; }
    .burger { display: grid; }
}

/* mobile drawer */
.drawer {
    position: fixed; inset: 0; z-index: 200;
    background: color-mix(in srgb, var(--ink) 55%, transparent);
    backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity .22s var(--ease);
}
.drawer.is-open { opacity: 1; pointer-events: auto; }
.drawer__panel {
    position: absolute; inset-block: 0; right: 0; width: min(360px, 88vw);
    background: var(--paper); padding: 22px;
    display: flex; flex-direction: column; gap: 8px;
    transform: translateX(100%); transition: transform .28s var(--ease);
    overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__panel a {
    padding: 13px 14px; border-radius: var(--radius-sm); font-weight: 600;
    display: flex; align-items: center; gap: 10px;
}
.drawer__panel a:hover { background: var(--surface-2); }

/* search box */
.searchbox { position: relative; }
.searchbox input {
    width: 100%; padding: 15px 52px 15px 48px;
    border-radius: 999px; border: 1px solid var(--line-strong);
    background: var(--paper); font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.searchbox input:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-600) 15%, transparent), var(--shadow); }
.searchbox__icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.searchbox__go {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--brand-700); color: #fff; display: grid; place-items: center;
}
.searchbox__go:hover { background: var(--brand-600); }
.suggest {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); overflow: hidden; display: none; max-height: 380px; overflow-y: auto;
}
.suggest.is-open { display: block; }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 11px 16px; font-size: .93rem; }
.suggest a:hover, .suggest a.is-active { background: var(--surface-2); }
.suggest .s-kind { margin-left: auto; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.suggest__group { padding: 8px 16px 4px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* footer */
.footer {
    margin-top: auto;
    background: var(--ink);
    color: color-mix(in srgb, #fff 78%, transparent);
    padding-block: clamp(40px, 5vw, 64px) 24px;
}
[data-theme="dark"] .footer { background: #070c13; }
.footer h4 { color: #fff; font-family: var(--font-sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.footer a { color: color-mix(in srgb, #fff 72%, transparent); font-size: .9rem; display: inline-block; padding: 3px 0; }
.footer a:hover { color: var(--gold-300); }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(auto-fit, minmax(150px, 1fr)); gap: 32px; }
.footer__bottom {
    margin-top: 36px; padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.12);
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-size: .82rem; color: rgba(255,255,255,.55);
}
.footer .logo { color: #fff; }
.social { display: flex; gap: 8px; }
.social a {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
}
.social a:hover { background: var(--gold-600); color: #1b1204; border-color: transparent; }

/* ------------------------------------------------------------- 7. hero --- */
.hero {
    position: relative;
    padding-block: clamp(48px, 8vw, 104px);
    overflow: hidden;
    background: radial-gradient(120% 100% at 12% 0%, var(--brand-800) 0%, var(--brand-900) 45%, #071c22 100%);
    color: #fff;
    isolation: isolate;
}
.hero::after {
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image:
        radial-gradient(38% 46% at 82% 18%, color-mix(in srgb, var(--gold-500) 40%, transparent) 0%, transparent 70%),
        radial-gradient(40% 40% at 10% 84%, color-mix(in srgb, var(--brand-500) 55%, transparent) 0%, transparent 68%);
}
.hero__grain {
    position: absolute; inset: 0; z-index: -1; opacity: .16; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero h1 em { font-style: italic; color: var(--gold-300); }
.hero p.lead { color: rgba(255,255,255,.82); max-width: 56ch; }
.hero .eyebrow { color: var(--gold-300); }
.hero .eyebrow::before { background: linear-gradient(90deg, var(--gold-300), transparent); }
.hero__search { max-width: 620px; margin-top: 26px; }
.hero__search input { background: rgba(255,255,255,.97); border-color: transparent; color: var(--ink); }
.hero__stats { display: flex; flex-wrap: wrap; gap: 28px 40px; margin-top: 34px; }
.hero__stats div strong { display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: #fff; }
.hero__stats div span { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); }

/* profile hero (destination / place) */
.phero { position: relative; color: #fff; isolation: isolate; }
.phero__media { position: absolute; inset: 0; z-index: -2; }
.phero__media img { width: 100%; height: 100%; object-fit: cover; }
.phero::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(6,12,18,.72) 0%, rgba(6,12,18,.45) 35%, rgba(6,12,18,.88) 100%);
}
.phero__inner { padding-block: clamp(40px, 7vw, 92px) clamp(24px, 4vw, 40px); }
.phero h1 { color: #fff; margin-block: 10px 12px; }
.phero .crumbs { color: rgba(255,255,255,.72); }
.phero .crumbs a:hover { color: #fff; }
.phero__tagline { font-size: 1.08rem; color: rgba(255,255,255,.85); max-width: 60ch; }
.phero__facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.phero__facts .chip { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(6px); }
.phero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* sticky sub navigation */
.subnav {
    position: sticky; top: var(--header-h); z-index: 90;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.subnav__inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav a {
    padding: 14px 14px; font-size: .88rem; font-weight: 650; color: var(--muted);
    border-bottom: 2px solid transparent; white-space: nowrap;
    transition: color .16s var(--ease), border-color .16s var(--ease);
}
.subnav a:hover { color: var(--ink); }
.subnav a.is-active { color: var(--brand-700); border-bottom-color: var(--brand-700); }

/* anchor offset for sticky bars */
[id] { scroll-margin-top: calc(var(--header-h) + 60px); }

/* fact grid */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { background: var(--paper); padding: 16px 18px; }
.facts dt { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.facts dd { margin: 6px 0 0; font-weight: 650; font-size: .98rem; }

/* place list rows */
.plist { display: flex; flex-direction: column; gap: 14px; }
.prow {
    position: relative;
    display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 18px;
    padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--paper); align-items: center;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.prow:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.prow__media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); }
.prow__media img { width: 100%; height: 100%; object-fit: cover; }
.prow__rank {
    position: absolute; top: 6px; left: 6px;
    width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
    background: rgba(8,14,20,.7); color: #fff; font-size: .78rem; font-weight: 700;
    font-family: var(--font-display); backdrop-filter: blur(4px);
}
.prow__rank.is-top { background: linear-gradient(135deg, var(--gold-600), var(--gold-300)); color: #2a1c06; }
.prow h3 { font-size: 1.08rem; margin-bottom: 4px; }
.prow p { font-size: .88rem; color: var(--muted); margin: 0 0 8px; }
.prow__side { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; font-size: .82rem; }
@media (max-width: 720px) {
    .prow { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
    .prow__side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; text-align: left; }
}

/* category tiles */
.cattile {
    position: relative; display: flex; flex-direction: column; gap: 8px;
    padding: 20px; border-radius: var(--radius);
    border: 1px solid var(--line); background: var(--paper);
    transition: all .22s var(--ease); overflow: hidden;
}
.cattile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--cat, var(--brand-700)) 40%, transparent); }
.cattile::before {
    content: ''; position: absolute; inset: 0 0 auto; height: 3px;
    background: linear-gradient(90deg, var(--cat, var(--brand-700)), transparent);
}
.cattile__icon {
    width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--cat, var(--brand-700)) 13%, var(--paper));
    color: var(--cat, var(--brand-700));
    border: 1px solid color-mix(in srgb, var(--cat, var(--brand-700)) 22%, transparent);
}
.cattile h3 { font-size: 1.02rem; font-family: var(--font-sans); font-weight: 700; }
.cattile p { font-size: .84rem; color: var(--muted); margin: 0; }
.cattile__count { font-size: .78rem; font-weight: 700; color: var(--cat, var(--brand-700)); margin-top: auto; padding-top: 8px; }

/* map */
.mapwrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.mapwrap--tall { aspect-ratio: 16 / 10; }
.mapwrap--wide { aspect-ratio: 21 / 9; }
#map, .map-canvas { width: 100%; height: 100%; min-height: 320px; }
.map-fallback { display: grid; place-items: center; text-align: center; padding: 40px 24px; gap: 12px; min-height: 320px; }
.leaflet-container { font: inherit !important; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 5px; }

/* itinerary timeline */
.day { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.day + .day { margin-top: 18px; }
.day__head {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 16px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.day__num {
    width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center;
    background: linear-gradient(140deg, var(--brand-700), var(--brand-500)); color: #fff;
    font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
}
.day__head h3 { font-size: 1.08rem; }
.day__head .metaline { width: 100%; }
.day__body { padding: 6px 20px 18px; }

.stop { position: relative; padding: 18px 0 18px 34px; }
.stop + .stop { border-top: 1px dashed var(--line); }
.stop::before {
    content: ''; position: absolute; left: 7px; top: 26px; bottom: -18px;
    width: 2px; background: linear-gradient(var(--line-strong), transparent);
}
.stop:last-child::before { display: none; }
.stop__dot {
    position: absolute; left: 0; top: 21px;
    width: 16px; height: 16px; border-radius: 50%;
    border: 3px solid var(--paper); background: var(--brand-600);
    box-shadow: 0 0 0 1px var(--line-strong);
}
.stop--meal .stop__dot { background: var(--gold-500); }
.stop--travel .stop__dot { background: var(--muted); }
.stop__time { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-700); }
.stop h4 { font-family: var(--font-sans); font-size: 1.02rem; font-weight: 700; margin: 3px 0 4px; }
.stop p { font-size: .89rem; color: var(--muted); margin: 0 0 8px; }
.stop--travel { padding-block: 10px; }
.stop--travel .stop__time { color: var(--muted); }

/* cost breakdown */
.costbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.costbar span { display: block; height: 100%; }
.costlist { display: grid; gap: 10px; margin-top: 16px; }
.costlist li { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.costlist i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.costlist b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* sidebar cards */
.side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--header-h) + 76px); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.panel__head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: .95rem; }
.panel__body { padding: 16px 18px; }
.panel--brand { background: linear-gradient(150deg, var(--brand-800), var(--brand-700)); color: #fff; border-color: transparent; }
.panel--brand .panel__head { border-color: rgba(255,255,255,.16); }
.panel--brand a:not(.btn) { color: var(--gold-300); }

/* prose (editorial content) */
.prose { font-size: 1.02rem; line-height: 1.75; color: var(--ink-2); max-width: 72ch; }
.prose h2 { margin: 1.7em 0 .5em; color: var(--ink); }
.prose h3 { margin: 1.4em 0 .4em; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--brand-600); }
.prose a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--gold-600); }
.prose blockquote {
    margin: 1.4em 0; padding: 4px 0 4px 20px;
    border-left: 3px solid var(--gold-500); font-family: var(--font-display); font-size: 1.1rem; color: var(--ink);
}
.prose img { border-radius: var(--radius); margin: 1.4em 0; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.gallery img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); width: 100%; }

/* empty state */
.empty {
    text-align: center; padding: 56px 24px; border: 1px dashed var(--line-strong);
    border-radius: var(--radius); background: var(--paper); color: var(--muted);
}
.empty svg { margin: 0 auto 12px; color: var(--line-strong); }

/* toast */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
    display: flex; gap: 10px; align-items: center;
    padding: 12px 16px; border-radius: var(--radius-sm);
    background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
    font-size: .9rem; animation: toastIn .3s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* scroll strip */
.hscroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.hscroll > * { flex: 0 0 clamp(240px, 74vw, 300px); scroll-snap-align: start; }
.hscroll::-webkit-scrollbar { height: 6px; }
.hscroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }

/* skeleton */
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* layout shell */
.page { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

/* ------------------------------------------------------------- 8. print --- */
@media print {
    .header, .subnav, .footer, .adslot, .btn, .side, .drawer, .toasts, .no-print { display: none !important; }
    body { background: #fff; color: #000; font-size: 12pt; }
    .day, .panel, .card { break-inside: avoid; border-color: #ccc; }
    .split { grid-template-columns: 1fr; }
    a[href]::after { content: ''; }
    .phero { color: #000; }
    .phero::before, .phero__media { display: none; }
    .phero h1, .phero .crumbs { color: #000; }
}
