/* ═══════════════════════════════════════════
   DrawTheDay — launch components (v2)
   Loaded after style.css. Uses the same custom properties.
   ═══════════════════════════════════════════ */

/* Layering: content above the fixed city background */
.topbar, .main-content, .site-footer { position: relative; z-index: 1; }

.main-content {
    width: 100%;
    max-width: var(--col-chrome);
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Accessibility helpers */
.visually-hidden {
    position: absolute !important; 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: -999px; top: 0; z-index: 100;
    background: var(--accent); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ── Top bar ── */
.topbar {
    width: 100%; max-width: var(--col-chrome); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.7rem clamp(1rem, 3vw, 2rem);
}
.topbar-brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--text); font-weight: 800; }
.brand-ball {
    display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #3a3f52, #0a0d16 70%);
    color: #fff; font-size: 0.95rem; box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.brand-name { font-size: 1.05rem; letter-spacing: 0.01em; }
.topbar-tools { display: flex; align-items: center; gap: 0.75rem; }

/* ── Hero ── */
.hero { text-align: center; padding: clamp(0.5rem, 2vw, 1.5rem) 0 0.5rem; }
.lead {
    max-width: 640px; margin: 0.8rem auto 0; color: var(--text);
    font-size: clamp(1rem, 1.6vw, 1.3rem); line-height: 1.55; text-wrap: balance;
}
.lead strong { color: color-mix(in oklch, var(--accent) 80%, white); }
.activity-count { margin-top: 0.6rem; color: var(--text-muted); font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* ── Section headings ── */
.section-title { font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 800; text-align: center; margin-bottom: 0.4rem; text-wrap: balance; }
.section-sub { text-align: center; color: var(--text-muted); max-width: 560px; margin: 0 auto 1.5rem; }

/* ── City picker (search-first + region groups) ── */
.cities-section { width: 100%; margin-top: clamp(1.25rem, 3vw, 2.4rem); scroll-margin-top: 80px; }

/* Collapse the result-card slot while empty so it adds no gap before "Pick your city" */
.card-section:has(.activity-card.hidden) { display: none; }

.city-search-wrap { position: relative; max-width: 480px; margin: 0 auto 2rem; }
.city-search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); opacity: 0.6; pointer-events: none; }
.city-search {
    width: 100%; font: inherit; font-size: 1rem; color: var(--text);
    background: color-mix(in oklch, var(--card-bg) 80%, transparent);
    border: 1px solid var(--card-border); border-radius: 999px;
    padding: 0.85rem 1.1rem 0.85rem 2.7rem; transition: border-color 0.18s, box-shadow 0.18s;
}
.city-search::placeholder { color: var(--text-muted); }
.city-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.region-block { margin-bottom: 2.2rem; }
.region-title {
    font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
    color: var(--text-muted); margin-bottom: 0.9rem; display: flex; align-items: center; gap: 0.5rem;
}
.region-count {
    font-size: 0.72rem; background: color-mix(in oklch, var(--accent) 16%, transparent);
    color: color-mix(in oklch, var(--accent) 80%, white); border-radius: 999px; padding: 0.05rem 0.5rem;
}
.city-grid {
    list-style: none; display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
    gap: 0.7rem; width: 100%;
}
.city-card {
    display: flex; align-items: center; gap: 0.75rem; min-width: 0;
    padding: 0.8rem 1rem; border-radius: 12px; text-decoration: none;
    background: color-mix(in oklch, var(--card-bg) 90%, transparent);
    border: 1px solid var(--card-border);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.city-card:hover, .city-card:focus-visible {
    transform: translateY(-2px);
    border-color: color-mix(in oklch, var(--accent) 60%, transparent);
    background: color-mix(in oklch, var(--card-bg) 78%, var(--accent) 8%);
}
.cc-flag { line-height: 0; flex: none; }
.cc-flag .flag { width: 32px; height: 24px; border-radius: 4px; object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.chip .flag { width: 20px; height: 15px; border-radius: 3px; vertical-align: -2px; margin-right: 0.2rem; object-fit: cover; }
.city-flag .flag { width: 64px; height: 48px; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,0.5); object-fit: cover; }
.cc-text { display: flex; flex-direction: column; min-width: 0; }
.cc-name { font-weight: 700; font-size: 1.02rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-meta { font-size: 0.78rem; color: var(--text-muted); }
.cc-go { margin-left: auto; color: var(--text-muted); opacity: 0; transform: translateX(-4px); transition: opacity 0.16s, transform 0.16s; flex: none; }
.city-card:hover .cc-go, .city-card:focus-visible .cc-go { opacity: 1; transform: translateX(0); }
.city-empty { text-align: center; color: var(--text-muted); margin-top: 1rem; }
.city-empty a { color: var(--accent); }

/* ── Buttons: ghost ── */
.card-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.ghost-btn {
    appearance: none; cursor: pointer; text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: transparent; color: var(--text); font: inherit; font-weight: 600; font-size: 0.9rem;
    border: 1px solid var(--card-border); border-radius: 999px; padding: 0.5rem 1rem;
    transition: border-color 0.16s, background 0.16s, transform 0.16s;
}
.ghost-btn:hover { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 12%, transparent); transform: translateY(-1px); }

/* ── City landing page ── */
.city-page { align-items: stretch; }
.breadcrumb { width: 100%; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.city-header { width: 100%; max-width: 820px; margin: 0 auto 2rem; text-align: center; }
.city-h1 { font-size: clamp(1.8rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.1; text-wrap: balance; }
.city-updated { color: var(--text-muted); font-size: 0.85rem; margin: 0.6rem 0 1rem; }
.city-intro { color: var(--text); font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.6; text-align: left; }
.city-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-top: 1.4rem; }

/* Quick reference table */
.city-table-wrap { width: 100%; max-width: 920px; margin: 0 auto 2.5rem; overflow-x: auto; border-radius: 14px; border: 1px solid var(--card-border); }
.city-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; background: color-mix(in oklch, var(--card-bg) 90%, transparent); }
.city-table th, .city-table td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid color-mix(in oklch, var(--card-border) 60%, transparent); }
.city-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); position: sticky; top: 0; background: var(--bg2); }
.city-table tr:last-child td { border-bottom: 0; }
.city-table a { color: var(--text); text-decoration: none; font-weight: 600; }
.city-table a:hover { color: var(--accent); }
.city-table .cost-free { color: #4ade80; font-weight: 700; }
.city-table .cost-cheap { color: #7dd3fc; }

/* City activity cards (static) */
.city-list { width: 100%; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.4rem; }
.static-card { width: 100%; max-width: none; scroll-margin-top: 80px; }
.static-card:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }

/* FAQ */
.faq-section { width: 100%; max-width: 820px; margin: 3rem auto 0; }
.faq-item {
    border: 1px solid var(--card-border); border-radius: 12px; padding: 0.5rem 1rem; margin-bottom: 0.7rem;
    background: color-mix(in oklch, var(--card-bg) 88%, transparent);
}
.faq-item summary { cursor: pointer; font-weight: 700; padding: 0.6rem 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--accent); font-weight: 700; }
.faq-item[open] summary::after { content: '\2013'; }
.faq-item p { padding: 0 0 0.8rem; color: var(--text-muted); }

/* Related cities */
.related-section { width: 100%; max-width: 820px; margin: 3rem auto 0; }
.related-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.chip {
    display: inline-block; padding: 0.45rem 0.95rem; border-radius: 999px; text-decoration: none;
    background: color-mix(in oklch, var(--card-bg) 85%, transparent); border: 1px solid var(--card-border);
    color: var(--text); font-size: 0.88rem; font-weight: 600; transition: border-color 0.16s, background 0.16s;
}
.chip:hover { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 12%, transparent); }
.chip-all { border-color: color-mix(in oklch, var(--accent) 50%, transparent); }

/* ── Footer ── */
/* max-width matches the deck card + map (600px) so every section shares one column width.
   No horizontal padding on desktop so the 600px edge aligns with the map/deck; on mobile
   it gets the same side inset as .main-content so it doesn't run edge-to-edge under the map. */
.site-footer { width: 100%; max-width: var(--col-wide); margin: 4rem auto 0; padding: 2rem 0 0; border-top: 1px solid var(--card-border); }
@media (max-width: 600px) {
    .site-footer { padding-left: clamp(1rem,3vw,2rem); padding-right: clamp(1rem,3vw,2rem); }
}
.footer-cities-title { font-size: 1rem; color: var(--text-muted); margin-bottom: 1.1rem; font-weight: 700; }

/* ── City hub: continent groups with flag chips (compact; ocean-blue accents) ── */
.fc-region { margin-bottom: 1.15rem; }
.fc-region-title {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: color-mix(in oklch, var(--accent) 75%, white);
    margin: 0 0 0.55rem; padding-left: 0.6rem;
    border-left: 3px solid var(--accent);
}
.fc-region-count {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0;
    background: color-mix(in oklch, var(--accent) 16%, transparent);
    color: color-mix(in oklch, var(--accent) 80%, white);
    border-radius: 999px; padding: 0.05rem 0.5rem;
}
/* Subsection nested inside a region (e.g. China within Asia) — same accent language
   as .fc-region-title but smaller/indented, so it reads as "part of Asia" rather
   than a new top-level region. */
.fc-subregion { margin: 0.75rem 0 0 1.1rem; }
.fc-subregion-title {
    display: flex; align-items: center; gap: 0.45rem;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 0.4rem; padding-left: 0.55rem;
    border-left: 2px dashed color-mix(in oklch, var(--accent) 55%, transparent);
}
/* Multi-column so cities read alphabetically DOWN each column, then across —
   and still line up in clean, even columns. auto-sizes 3 cols on desktop, 2 on mobile. */
.fc-list {
    list-style: none; margin: 0; padding: 0;
    column-width: 155px;
    column-gap: 0.35rem;
}
.fc-list li { break-inside: avoid; }
.fc-city {
    display: flex; width: 100%; align-items: center; gap: 0.42rem;
    padding: 0.24rem 0.55rem 0.24rem 0.4rem; border-radius: 8px;
    text-decoration: none; font-size: 0.8rem; color: var(--text-muted);
    border: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.fc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-city .flag {
    width: 20px; height: 15px; border-radius: 3px; object-fit: cover; flex: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.45);
}
.fc-city:hover, .fc-city:focus-visible {
    color: var(--text);
    border-color: color-mix(in oklch, var(--accent) 45%, transparent);
    background: color-mix(in oklch, var(--accent) 10%, transparent);
}
.footer-legal { margin-top: 1.6rem; color: var(--text-muted); font-size: 0.85rem; line-height: 1.8; }
.footer-legal a { color: var(--text-muted); }
.footer-legal a:hover { color: var(--accent); }
.footer-fine { display: block; margin-top: 0.5rem; font-size: 0.78rem; opacity: 0.75; }

/* ── Ad slot — native-styled (card framing, not a bare banner). Ads are
   currently OFF site-wide; this is ready for whenever they switch on. ── */
.ad-slot {
    width: 100%; max-width: var(--col-text); margin: 2rem auto; min-height: 90px;
    background: color-mix(in oklch, var(--card-bg) 88%, transparent);
    border: 1px solid var(--card-border); border-radius: 14px;
    padding: 0.7rem 0.9rem 0.9rem;
}
.ad-slot:empty { display: none; min-height: 0; margin: 0; padding: 0; border: 0; background: none; }   /* no gap when the slot isn't filled (Auto-ads-only mode) */
.ad-slot-footer { margin-top: 2.5rem; }
.ad-sponsored-label {
    display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem;
}

/* ── Consent banner ── */
.consent-banner {
    position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%);
    z-index: 60; width: min(94vw, 720px);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem;
    padding: 1rem 1.2rem; border-radius: 16px;
    background: color-mix(in oklch, var(--card-bg) 75%, transparent);
    border: 1px solid var(--card-border);
    box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}
@supports (backdrop-filter: blur(1px)) {
    .consent-banner { background: color-mix(in oklch, var(--card-bg) 55%, transparent); backdrop-filter: blur(12px); }
}
.consent-text { font-size: 0.85rem; color: var(--text); flex: 1 1 280px; line-height: 1.5; }
.consent-text a { color: var(--accent); }
.consent-actions { display: flex; gap: 0.5rem; }
.consent-btn { cursor: pointer; font: inherit; font-weight: 700; font-size: 0.85rem; border-radius: 999px; padding: 0.5rem 1.1rem; border: 1px solid var(--card-border); }
.consent-decline { background: transparent; color: var(--text); }
.consent-decline:hover { border-color: var(--text-muted); }
.consent-accept { background: var(--accent); color: #fff; border-color: var(--accent); }
.consent-accept:hover { background: color-mix(in oklch, var(--accent) 85%, white); }

/* ── PWA install banner (assets/js/pwa-install.js) ── */
.pwa-install-banner {
    position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%) translateY(12px);
    z-index: 60; width: min(94vw, 560px);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem;
    padding: 0.9rem 1rem 0.9rem 1.2rem; border-radius: 16px;
    background: color-mix(in oklch, var(--card-bg) 75%, transparent);
    border: 1px solid var(--card-border);
    box-shadow: 0 14px 40px rgba(0,0,0,0.45);
    opacity: 0; transition: opacity .25s ease, transform .25s ease;
}
.pwa-install-banner.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
@supports (backdrop-filter: blur(1px)) {
    .pwa-install-banner { background: color-mix(in oklch, var(--card-bg) 55%, transparent); backdrop-filter: blur(12px); }
}
.pwa-install-text { font-size: 0.85rem; color: var(--text); flex: 1 1 260px; line-height: 1.5; }
.pwa-install-actions { display: flex; align-items: center; gap: 0.5rem; }
.pwa-install-btn {
    cursor: pointer; font: inherit; font-weight: 700; font-size: 0.85rem; border-radius: 999px;
    padding: 0.5rem 1.1rem; border: 1px solid transparent; background: var(--accent); color: #fff;
}
.pwa-install-btn:hover { background: color-mix(in oklch, var(--accent) 85%, white); }
.pwa-install-dismiss {
    cursor: pointer; font: inherit; line-height: 1; font-size: 1.1rem; color: var(--text-muted);
    background: transparent; border: none; padding: 0.3rem 0.4rem; border-radius: 999px;
}
.pwa-install-dismiss:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
    .pwa-install-banner { transition: opacity .15s ease; transform: translateX(-50%); }
    .pwa-install-banner.is-visible { transform: translateX(-50%); }
}

/* ── 404 ── */
.notfound { text-align: center; min-height: 60vh; justify-content: center; }
.nf-ball {
    width: 120px; height: 120px; margin: 0 auto 1.5rem; border-radius: 50%; display: grid; place-items: center;
    background: radial-gradient(circle at 35% 30%, #3a3f52, #0a0d16 70%); color: #fff; font-size: 3rem; font-weight: 800;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

/* ── Translate trigger (loads the widget on click only) ── */
.translate-btn {
    cursor: pointer; font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--text);
    background: color-mix(in oklch, var(--card-bg) 80%, transparent);
    border: 1px solid var(--card-border); border-radius: 999px; padding: 0.4rem 0.85rem;
    transition: border-color 0.15s, background 0.15s;
}
.translate-btn:hover { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 12%, transparent); }
#google_translate_element[hidden] { display: none; }

/* ── Google Translate widget: hide injected banner, style the picker ── */
.goog-te-banner-frame, .skiptranslate iframe { display: none !important; }
body { top: 0 !important; position: static !important; }
#goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
.goog-te-gadget { color: transparent !important; font-size: 0 !important; }
.goog-te-gadget .goog-te-combo {
    margin: 0 !important; font-size: 0.82rem !important; font-family: 'Inter', sans-serif !important;
    color: var(--text); background: rgba(10,16,40,0.75); border: 1px solid var(--card-border);
    border-radius: 8px; padding: 0.4rem 0.6rem; cursor: pointer; max-width: 160px;
}

/* ── Motion: reduce, don't kill ── */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }

/* ═══════════════════════════════════════════
   CITY PAGE v2 — flag, on-page ball, category filter + sections
   ═══════════════════════════════════════════ */
.city-flag { line-height: 0; margin-bottom: 0.6rem; }
.city-hero { padding-top: 0.25rem; }
.city-hero-title { line-height: 1.04; }
.hero-eyebrow {
    display: block; font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(0.8rem, 1.6vw, 1.1rem); font-weight: 600; letter-spacing: 0.02em;
    color: var(--text-muted); margin-bottom: 0.3rem; text-transform: none;
}
.city-hero-title .title-accent { display: block; }

/* Sticky category filter bar */
.cat-filter {
    position: sticky; top: 0; z-index: 20; width: 100%;
    display: flex; gap: 0.5rem; flex-wrap: nowrap; overflow-x: auto;
    padding: 0.8rem 0.2rem; margin-bottom: 1.5rem;
    background: color-mix(in oklch, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-bottom: 1px solid color-mix(in oklch, var(--card-border) 60%, transparent);
    scrollbar-width: thin;
}
.cat-chip {
    flex: none; cursor: pointer; font: inherit; font-size: 0.85rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap;
    padding: 0.45rem 0.85rem; border-radius: 999px;
    background: color-mix(in oklch, var(--card-bg) 85%, transparent);
    border: 1px solid var(--card-border); color: var(--text);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cat-chip:hover { border-color: color-mix(in oklch, var(--accent) 55%, transparent); }
.cat-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-count {
    font-size: 0.72rem; background: color-mix(in oklch, currentColor 18%, transparent);
    border-radius: 999px; padding: 0.02rem 0.42rem; opacity: 0.85;
}

/* Category groups */
.cat-groups { width: 100%; }
.cat-group { margin-bottom: 2.6rem; scroll-margin-top: 90px; }
.cat-group-title {
    display: flex; align-items: center; gap: 0.6rem; font-size: 1.35rem; font-weight: 800;
    margin-bottom: 1.1rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid color-mix(in oklch, var(--card-border) 70%, transparent);
}
.cat-ic { font-size: 1.4rem; }
.cat-group-count {
    font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
    background: color-mix(in oklch, var(--card-bg) 80%, transparent);
    border: 1px solid var(--card-border); border-radius: 999px; padding: 0.1rem 0.6rem;
}
.cat-grid {
    display: grid; gap: clamp(1rem, 2vw, 1.4rem);
    grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
    align-items: start;
}
.cat-grid .static-card { margin: 0; }
.static-card .card-title { font-size: 1.15rem; }

/* Quick list (collapsible) */
.quick-list {
    width: 100%; max-width: 920px; margin: 0 auto 2.5rem;
    border: 1px solid var(--card-border); border-radius: 12px;
    background: color-mix(in oklch, var(--card-bg) 88%, transparent); padding: 0.4rem 1rem;
}
.quick-list > summary { cursor: pointer; font-weight: 700; padding: 0.7rem 0; list-style: none; }
.quick-list > summary::-webkit-details-marker { display: none; }
.quick-list .city-table-wrap { border: 0; margin: 0 0 0.8rem; }
