:root {
    color-scheme: dark;
    /* Brand */
    --accent: #7c3aed;
    --accent2: #2563eb;
    --accent-soft: rgba(124, 58, 237, .18);
    --on-accent: #fff;
    /* Brand as *foreground* (text/icons) on dark surfaces: lighter tints of the
       same hue so small accent text meets WCAG AA (>=4.5:1) on --bg/--card/--card2
       and on --accent-soft. Fills/gradients keep the exact brand above. */
    --accent-fg: #a78bfa;
    --accent2-fg: #60a5fa;
    /* Surfaces */
    --bg: #0e0e13;
    --bg-glow: #1a1530;
    --card: #191922;
    --card2: #20202c;
    --surface: #191922;
    --surface-2: #20202c;
    --header-glass: rgba(20, 20, 26, .72);
    --appbar-bg: rgba(14, 14, 19, .4);
    /* Text */
    --ink: #f4f4f6;
    --ink-2: #c6cbd4;
    --ink-3: #9aa0aa;
    --muted: #9aa0aa;
    --line: #2b2b37;
    --separator: #2b2b37;
    /* Status */
    --ok: #8fe6b0;
    --ok-border: #2e7a52;
    --warn: #ffd166;
    --warn-border: #8f7a2e;
    --danger: #ff8b98;
    --danger-border: #8f2e3f;
    --danger-soft: rgba(255, 90, 110, .12);
    --rating: #ffd166;
    /* Seatmap */
    --seat-free: #27b279;
    --seat-sold: #3a3a44;
    --seat-blocked: #111;
    --seat-rec: var(--accent);
    /* Geometry */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .4);
    --shadow-2: 0 14px 34px rgba(0, 0, 0, .5);
    /* Motion */
    --dur-fast: .12s;
    --dur: .2s;
    --dur-slow: .32s;
    --ease-standard: cubic-bezier(.2, 0, 0, 1);
    --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
}
html[data-theme="light"] {
    color-scheme: light;
    --accent: #7c3aed;
    --accent2: #2563eb;
    --accent-soft: rgba(124, 58, 237, .12);
    --on-accent: #fff;
    /* On white the exact brand is already AA (5.7 / 5.2), so fg == accent. */
    --accent-fg: #7c3aed;
    --accent2-fg: #2563eb;
    --bg: #f2f2f7;
    --bg-glow: #e7e2ff;
    --card: #fff;
    --card2: #f2f2f7;
    --surface: #fff;
    --surface-2: #f2f2f7;
    --header-glass: rgba(255, 255, 255, .72);
    --appbar-bg: rgba(242, 242, 247, .6);
    --ink: #1c1c1e;
    --ink-2: #3c3c43;
    --ink-3: #6e6e73;
    --muted: #6e6e73;
    --line: #e3e3e8;
    --separator: #e3e3e8;
    --ok: #1d8a4e;
    --ok-border: #9fd9b6;
    --warn: #9a6a00;
    --warn-border: #e6cd8f;
    --danger: #d70015;
    --danger-border: #f0a9b0;
    --danger-soft: rgba(215, 0, 21, .10);
    --rating: #b7791f;
    --seat-free: #27b279;
    --seat-sold: #d1d1d6;
    --seat-blocked: #a1a1aa;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .06);
    --shadow-2: 0 10px 30px rgba(0, 0, 0, .12);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: radial-gradient(1200px 600px at 50% -10%, var(--bg-glow), var(--bg) 60%);
    min-height: 100vh;
}
header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    padding-top: calc(10px + env(safe-area-inset-top));
    position: sticky;
    top: 0;
    z-index: 20;
}
/* Glass layer for the app bar.
   NOTE: `backdrop-filter` must live on a NON-descendant of the sticky <header>
   (sticky creates a stacking context, so a child/::before would have nothing to
   sample → no blur). A fixed `body::before` strip sits just behind the bar and
   is masked so the frosted edge fades out at the bottom (no hard cut).
   Its height is kept in sync with the header by motion.js (`--appbar-h`). */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--appbar-h, 62px);
    z-index: 15;
    pointer-events: none;
    background: linear-gradient(180deg, var(--appbar-bg), transparent);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(180deg, #000 calc(100% - 20px), transparent 100%);
}
header a { color: var(--ink); text-decoration: none; }
main { max-width: 1000px; margin: 0 auto; padding: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
h1 { margin: 0 0 4px; font-size: 26px; }
h2 { margin: 0; font-size: 22px; }
label { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--ink-2); margin: 0 0 6px; }
select, input { width: 100%; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); font-size: 16px; background: var(--card2); color: var(--ink); min-width: 0; max-width: 100%; transition: border-color var(--dur) var(--ease-standard), box-shadow var(--dur) var(--ease-standard); }
/* Uniform control height: native date/time pickers are otherwise taller. */
select, input:not([type="checkbox"]):not([type="radio"]) { height: 52px; }
select, input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 120px; }
button, .btn {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: var(--on-accent); border: 0; padding: 13px 24px; border-radius: var(--radius-pill);
    font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 16px; min-height: 48px;
    display: inline-block; text-decoration: none; text-align: center;
}
/* Controls that aren't call-to-action buttons keep their intrinsic size. */
.theme-switch, .switch, button.link, .avatar-btn, .stepper__btn { min-height: 0; }
.btn-magic {
    display: block; width: 100%; padding: 16px; font-size: 17px; margin-top: 8px;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    box-shadow: 0 8px 30px var(--accent-soft);
}
.movie-hero {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent-soft), transparent 55%);
}
.poster { width: 150px; border-radius: var(--radius-lg); border: 1px solid var(--line); flex: none; object-fit: cover; box-shadow: var(--shadow-2); }
.poster-frame {
    position: relative;
    width: 150px;
    flex: none;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    overflow: hidden;
    box-shadow: var(--shadow-2);
}
.poster-frame > .poster-art { position: absolute; inset: 0; }
.poster-frame > .poster-art svg { width: 46%; height: 46%; }
.poster-frame > img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; }
.poster-frame--sm { width: 46px; border-radius: 8px; box-shadow: none; }
.poster-frame--sm > .poster-art svg { width: 56%; height: 56%; }
.poster-frame--xs { width: 36px; border-radius: 7px; box-shadow: none; }
.poster-frame--xs > .poster-art svg { width: 58%; height: 58%; }
.movie-info { flex: 1; min-width: 0; }
.movie-info h2 { font-size: 28px; line-height: 1.15; }
.movie-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 14px; color: var(--muted); }
.rating { color: var(--rating); font-weight: 800; font-size: 15px; }
.trailer { color: var(--accent2-fg); text-decoration: none; font-weight: 600; }
.overview { color: var(--ink-2); font-size: 15px; line-height: 1.55; margin: 12px 0 0; }
/* Standalone error page (500): rendered without the request context. */
.error-page { max-width: 520px; margin: 64px auto; padding: 0 16px; }
.error-page__title { margin-top: 0; }

/* Film facts: one quiet line under the hero meta (GEO, no box). */
.page-facts { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
/* Disclosure: native <details>, quiet and closed by default (FAQ, help). */
.disclosure { border-bottom: 1px solid var(--line); }
.disclosure__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 10px 0;
    cursor: pointer;
    list-style: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}
.disclosure__summary::-webkit-details-marker { display: none; }
.disclosure__summary::after { content: "+"; font-size: 18px; font-weight: 400; color: var(--muted); }
.disclosure[open] > .disclosure__summary::after { content: "−"; }
.disclosure__summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
.disclosure__body { padding: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--ink-2); max-width: 65ch; }
.faq { margin: 28px 0 0; border-top: 1px solid var(--line); padding-top: 14px; }
.faq__title { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.badge { display: inline-flex; align-items: center; line-height: 1.3; font-size: 11px; padding: 3px 9px; border-radius: var(--radius-pill); border: 1px solid var(--line); color: var(--muted); background: var(--card2); white-space: nowrap; }
.badge.version { color: var(--accent-fg); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.badge.format { color: var(--accent2-fg); border-color: color-mix(in srgb, var(--accent2) 40%, transparent); background: color-mix(in srgb, var(--accent2) 14%, transparent); }
.badge.price { color: var(--ok); border-color: var(--ok-border); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.option {
    background: var(--card2);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 10px;
}
.option:last-child { margin-bottom: 0; }
/* The showtime the visitor tapped in the search (``/movies/<slug>/?show=<perf_code>``). */
.option--selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.option .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.option__body { min-width: 0; }
.option__cinema { font-size: 18px; font-weight: 800; line-height: 1.2; }
/* The cinema name links to its page, carrying the show so it is pinned there. */
.option__cinema-link { color: inherit; text-decoration: none; }
.option__cinema-link:hover, .option__cinema-link:focus-visible { color: var(--accent-fg); text-decoration: underline; }
.option__dist { margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.option__when { display: flex; align-items: baseline; gap: 8px; margin-top: 3px; }
.option__date { font-size: 14px; font-weight: 600; }
.option__time { font-size: 18px; font-weight: 800; color: var(--accent2-fg); }
.option .seat { font-weight: 700; color: var(--accent2-fg); }
.buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 0;
    cursor: pointer;
    background: var(--ink);
    color: var(--card);
    text-decoration: none;
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.muted { color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); }
.hint ul { margin: 4px 0; padding-left: 18px; }
.hint li { margin: 2px 0; }
details.tech { margin-top: 4px; }
details.tech summary { cursor: pointer; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; user-select: none; }
.tech-body { padding: 10px 0 4px; border-top: 1px dashed var(--line); margin-top: 8px; }
.bar { height: 8px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; margin: 6px 0 10px; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: var(--radius-pill); }
.seatmap { --seat-cell: 22px; --seat-gap: 1px; display: grid; grid-template-columns: repeat(var(--seat-cols, 1), var(--seat-cell)); justify-content: safe center; align-content: start; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); align-items: center; margin-top: 10px; flex-wrap: wrap; }
.legend .leg { width: 12px; height: 12px; display: inline-block; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.legend .leg.free { background: var(--seat-free); }
.legend .leg.sold { background: var(--seat-sold); }
.legend .leg.blocked { background: var(--seat-blocked); border: 1px solid var(--line); }
.legend .leg.rec { background: var(--seat-rec); }
.seatmap-row { display: contents; }
.seatmap-aisle { grid-column: 1 / -1; height: 8px; }
.seatmap-divider { grid-column: 1 / -1; display: flex; align-items: center; margin: 16px 0; }
.seatmap-divider::before, .seatmap-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.seatmap-divider span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; padding: 0 10px; }
.rowlabel { width: var(--seat-cell, 22px); font-size: 10px; color: var(--muted); text-align: right; padding-right: 6px; }
.seatcell { width: var(--seat-cell, 22px); height: var(--seat-cell, 22px); display: inline-flex; align-items: center; justify-content: center; font-size: 9px; margin: 0; border: var(--seat-gap, 1px) solid transparent; border-radius: 5px; background-clip: content-box; }
.seatcell.free { background-color: var(--seat-free); }
.seatcell.sold { background-color: var(--seat-sold); }
.seatcell.blocked { background-color: var(--seat-blocked); border-color: var(--line); }
.seatcell.rec { background-color: var(--seat-rec); color: var(--on-accent); font-weight: 700; box-shadow: 0 0 0 2px var(--accent-soft); }
.seatcell.empty { background-color: transparent; }
.screen { grid-column: 1 / -1; margin-top: 8px; text-align: center; background: var(--ink); color: var(--card); font-size: 11px; letter-spacing: 3px; padding: 5px; border-radius: 4px; font-weight: 700; }
.occ-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.occ-table th, .occ-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.occ-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.nav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav a, .nav button.link { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; background: none; border: 0; cursor: pointer; padding: 0; margin: 0; min-height: 0; }
.nav a:hover { color: var(--ink); }
.nav .nav-install { display: inline-flex; align-items: center; gap: 6px; line-height: 1; text-decoration: underline; text-underline-offset: 2px; }
.nav .nav-install svg { display: block; }
.nav-menu { position: relative; display: inline-flex; }
.avatar-btn {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
    background: var(--card2); color: var(--muted); display: inline-flex;
    align-items: center; justify-content: center; cursor: pointer; margin: 0; padding: 0;
    list-style: none;
}
.avatar-btn::-webkit-details-marker { display: none; }
.avatar-btn:hover, .nav-menu[open] .avatar-btn { color: var(--ink); border-color: var(--accent); }
.nav-dropdown {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; z-index: 30;
    display: flex; flex-direction: column; padding: 6px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
}
.nav-dropdown a, .nav-dropdown button, .nav-dropdown button.link {
    display: block; width: 100%; text-align: left; margin: 0; padding: 9px 10px; min-height: 0;
    border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink);
    font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.nav-dropdown a:hover, .nav-dropdown button:hover { background: var(--card2); }
.nav-divider { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.lang { display: flex; gap: 6px; }
.lang button { color: var(--muted); background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 8px; font-size: 12px; cursor: pointer; margin: 0; font-weight: 600; min-width: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; }
.lang button.active { color: var(--ink); border-color: var(--accent); }
.nav-dropdown .lang { margin: 6px 4px; }
.nav-dropdown .lang button { flex: 1; }
/* --- Auth flow: editorial hero + frosted sheet sliding over it --- */
.auth { max-width: 460px; margin: 0 auto; }
.auth__hero {
    position: relative;
    overflow: hidden;
    min-height: 174px;
    border-radius: 26px;
    padding: 26px 24px 48px;
    color: #fff;
    background:
        radial-gradient(120% 140% at 85% 8%, rgba(124, 58, 237, .6), transparent 55%),
        linear-gradient(155deg, #190f38, #2a1b6b 62%, #171030);
    box-shadow: var(--shadow-2);
}
.auth__eyebrow {
    display: block;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 255, 255, .72);
}
.auth__hero { text-align: center; }
/* Outcome pages (check your inbox, password changed…) read as a single centred
   message; forms stay left-aligned. */
.auth--message .auth-card { text-align: center; }
.auth--message .auth-card .btn { margin-top: 18px; }
.auth__headline { margin: 10px 0 0; font-size: 32px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.auth__lede { margin: 10px 0 0; color: rgba(255, 255, 255, .82); font-size: 15px; line-height: 1.4; }

.auth-card {
    position: relative;
    z-index: 1;
    max-width: none;
    margin: -30px 0 0;
    padding: 22px 20px 18px;
    border-radius: 24px;
    background: color-mix(in srgb, var(--card) 86%, transparent);
    border: 1px solid var(--line);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: var(--shadow-2);
}
.auth-card .btn, .auth-card button[type="submit"], .auth-card .btn-magic { width: 100%; margin-top: 20px; }
.auth-card h2 { font-size: 17px; margin: 22px 0 6px; }
.auth-card > .hint { margin-top: 16px; text-align: center; }
.field { margin-top: 16px; }
.field .hint { margin-top: 6px; }
.field--check { margin-top: 14px; }
.field--error input, .field--error select { border-color: var(--danger-border); }

/* Segmented control (radio group) — for short, mutually exclusive choices. */
.segmented { border: 0; padding: 0; min-inline-size: 0; }
.fieldset-reset { border: 0; padding: 0; }
.segmented__track {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--card2);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.segmented__option { position: relative; display: flex; flex: 1 1 0; margin: 0; cursor: pointer; }
.segmented__option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.segmented__option span {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 42px;
    padding: 6px 4px;
    font-size: 13px;
    line-height: 1.15;
    font-weight: 600;
    border-radius: 12px;
    color: var(--muted);
    transition: background-color var(--dur) var(--ease-standard), color var(--dur) var(--ease-standard);
}
.segmented__option:has(input:checked) span { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-1); }
.segmented__option:focus-within span { outline: 2px solid var(--accent2); outline-offset: 2px; }
.field__label { display: block; padding: 0; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.errors { color: var(--danger); font-size: 13px; margin: 6px 0; }
.errors ul { margin: 4px 0; padding-left: 18px; }
.errorlist {
    list-style: none;
    margin: 6px 0;
    padding: 6px 10px;
    color: #d70015;
    font-size: 13px;
    font-weight: 600;
    background: var(--danger-soft);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius);
}
.errorlist li { margin: 2px 0; }
.messages { margin: 0 0 14px; display: grid; gap: 8px; }
.message { font-size: 14px; margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: var(--radius-lg); background: var(--card2); color: var(--ink); }
.message.success { border-left-color: var(--ok); }
.message.error { border-left-color: var(--danger); }
.message.warning { border-left-color: var(--warn); }
.message.info { border-left-color: var(--accent2); }
.checkbox { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); text-transform: none; letter-spacing: 0; margin-top: 12px; min-height: 44px; }
.checkbox input { width: 22px; height: 22px; flex: none; }
main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* --- Components / utilities --- */
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 12px; }
/* Moderator section pages: the top "back" button needs room below, or it reads
   as attached to the card that follows. */
.moderator-back { margin: 12px 0 18px; }
.back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 14px;
    color: var(--ink-2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
}
.back:hover { color: var(--ink); }
.back svg { width: 18px; height: 18px; }
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: spin .7s linear infinite;
}
.spinner--demo { opacity: 1; }
.city-status { display: none; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.city-status.htmx-request { display: inline-flex; }
.city-status__spinner { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
/* City autocomplete combobox (controlled listbox). */
.combo { position: relative; }
.combo__list {
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
    max-height: 260px;
    overflow-y: auto;
}
.combo__list[hidden] { display: none; }
.combo__option { padding: 11px 12px; border-radius: 10px; cursor: pointer; font-size: 15px; color: var(--ink); }
.combo__option:hover, .combo__option[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-fg); }
.combo__hint { color: var(--muted); font-size: 13px; }
/* Global search popup (home): grouped film/cinema results in the combo list. */
.combo__list.search-popup { max-height: 70vh; }
.search-popup__group {
    padding: 10px 12px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}
.search-popup__option { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.search-popup__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.search-popup__title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-popup__meta { color: var(--muted); font-size: 12px; }
.search-popup__all {
    display: block;
    padding: 9px 12px;
    margin-top: 2px;
    border-top: 1px solid var(--line);
    color: var(--accent2-fg);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
}
.search-popup__empty { padding: 14px 12px; color: var(--muted); font-size: 14px; text-align: center; }
.layout-input { font-family: ui-monospace, Menlo, Consolas, monospace; white-space: pre; font-size: 14px; }
.inline-form { display: inline; }

/* --- Profile --- */
.profile-list { margin: 8px 0 0; }
.profile-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.profile-row:last-child { border-bottom: 0; }
.profile-row dt { margin: 0; font-size: 14px; color: var(--muted); }
.profile-row dd { margin: 0; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }

/* --- Polish: focus, htmx feedback, reduced motion --- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.buy:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 2px;
}
.bottom-nav__item:focus-visible,
.theme-switch:focus-visible,
.tab:focus-visible,
.stat:focus-visible,
.section-head__link:focus-visible,
.media-card:focus-visible,
.loc-pill:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 2px;
}
.htmx-request.spinner { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    /* ``html[data-motion="on"]`` (the /_ui/ gallery) opts back in so every
       animation can be reviewed even when the OS asks to reduce motion. */
    html:not([data-motion="on"]) * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
    /* Small, non-repetitive state feedback is kept even with reduced motion:
       the theme switch knob slide (no spring/overshoot here). */
    html:not([data-motion="on"]) .theme-switch,
    html:not([data-motion="on"]) .theme-switch .theme-switch__knob,
    html:not([data-motion="on"]) .theme-switch .theme-switch__knob > span {
        transition: transform .2s ease, opacity .15s ease, background-color .2s ease !important;
    }
    /* Note: the glass blur (`backdrop-filter`) is NOT motion — it stays on with
       reduced motion, so the app bar keeps its frosted look. */
}

/* --- Mobile (smartphone) --- */
@media (max-width: 560px) {
    header:not(.app-bar) { padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top)); gap: 10px; flex-wrap: wrap; }
    header:not(.app-bar) > a { font-size: 18px; }
    .nav { margin-left: 0; width: 100%; gap: 10px; flex-wrap: wrap; align-items: center; }
    .nav a, .nav button.link { font-size: 12px; }
    main { padding: 14px; }
    .card { padding: 16px; border-radius: 14px; }
    h1 { font-size: 22px; }
    h2 { font-size: 19px; }
    .movie-hero { gap: 12px; padding: 12px; }
    .poster { width: 110px; }
    .poster-frame { width: 110px; }
    .movie-detail-top--poster { grid-template-columns: 1fr; }
    .movie-detail-top__poster { max-width: 200px; }
    .movie-detail-top__poster img { height: auto; }
    .movie-info h2 { font-size: 22px; }
    .overview { font-size: 14px; }
    .row > div { flex: 1 1 calc(50% - 5px); min-width: 0; overflow: hidden; }
    .row { gap: 10px; }
    input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; min-width: 0; }
    .option .head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .option .head .actions { width: 100%; }
    .card button[type="submit"], .card .btn, .btn-magic { width: 100%; }
    /* Keep the search form inline on mobile (don't stretch its submit button). */
    .card .search-form .btn, .card .search-form button[type="submit"] { width: auto; }
    .btn-magic { font-size: 16px; padding: 15px; }
    .seatcell { font-size: 8px; }
    .seatmap { --seat-cell: 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    ol { padding-left: 18px; }
}
@media (max-width: 380px) {
    .poster { width: 76px; }
    .poster-frame { width: 76px; }
    .seatmap { --seat-cell: 18px; }
    h1 { font-size: 20px; }
}

/* --- Portal components: buttons, badges, tabs, stats, lists --- */
.btn-secondary {
    background: var(--card2);
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: none;
}
.btn-secondary:hover { background: var(--accent-soft); color: var(--accent-fg); border-color: transparent; }
.btn-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border: 0;
    box-shadow: none;
}
.btn-danger:hover { box-shadow: 0 6px 18px var(--danger-soft); }
.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    margin-top: 0;
    min-height: 34px;
}
/* Text button ("link" variant): borderless, accent, underline on hover. */
.link, a.link, button.link {
    background: none;
    border: 0;
    color: var(--accent2-fg);
    text-decoration: none;
    padding: 11px 8px;
    min-height: 44px;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.link:hover, a.link:hover, button.link:hover { text-decoration: underline; box-shadow: none; }
button.link:active { transform: none; }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.badge.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.badge.muted { color: var(--muted); }
.badge.rating { color: var(--rating); border-color: color-mix(in srgb, var(--rating) 40%, transparent); background: color-mix(in srgb, var(--rating) 14%, transparent); }
.toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.actions form { margin: 0; }
.actions button, .actions .btn, .actions .buy, .actions .btn-secondary, .actions .btn-danger { margin-top: 0; }
.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}
.tab {
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: var(--card2);
    color: var(--muted);
    text-decoration: none;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}
.tab:hover { color: var(--ink); background: var(--accent-soft); }
.tab.active {
    color: var(--on-accent);
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-color: transparent;
}
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 180px));
    gap: 12px;
    margin: 12px 0;
    justify-content: start;
}
.stat {
    display: block;
    background: linear-gradient(180deg, var(--card2), var(--card));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-decoration: none;
    color: var(--ink);
}
.stat:hover { border-color: var(--accent); }
.stat__value { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-top: 4px;
}
.stat.warn { border-color: var(--warn-border); }
.stat.warn .stat__value { color: var(--warn); }
.stat.ok { border-color: var(--ok-border); }
.stat.ok .stat__value { color: var(--ok); }
.stat.format { border-color: var(--accent2); }
/* Moderator: the raw name from the data source, made legible. */
.movie-source-name {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 17px;
    margin: 2px 0 14px;
}
.movie-source-name__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}
.movie-source-name__year { color: var(--muted); }
/* Moderator: the internal record id, next to the title and in the merged rows. */
.movie-id,
.record-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}
.movie-id {
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
}
.record-id { margin-right: 4px; }
/* Moderator: film detail top block — info on the left, poster on the right
   filling the full height of the block. */
.movie-detail-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}
.movie-detail-top--poster { grid-template-columns: minmax(0, 1fr) 200px; }
.movie-detail-top__main { min-width: 0; }
.movie-detail-top__main .movie-source-name { margin-bottom: 0; }
.movie-detail-top__poster { display: flex; }
.movie-detail-top__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    border: 1px solid var(--line);
}
/* A row of secondary buttons (link/unlink in the film detail). */
.movie-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
/* A single row of boolean flags. */
.flag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin: 8px 0 14px;
}
.flag-row .field { margin: 0; }
/* Moderator: the raw triage cards (id + title on the left, actions on the right). */
.film-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.film-card__title { font-weight: 700; font-size: 16px; }
/* Moderator: the film catalogue as an editable, Excel-like table. The rows are
   forms (autosave), so they can't live in a real <table>; a grid keeps the
   columns aligned with the header row. */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    margin-bottom: 16px;
}
.filter-bar .search-field { flex: 1 1 200px; }
/* Film directory filters: date/time + distance inputs, plus segmented version/format. */
.filters { display: grid; gap: 16px; margin: 14px 0 18px; }
.filters__row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.filters__field { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.filters__field input { width: auto; height: 44px; padding: 0 12px; }
.filters__field input[type="date"] { width: 168px; }
.filters__field input[type="time"] { width: 118px; }
.filters__field input[type="number"] { width: 132px; }
.filters__choices { display: grid; gap: 14px 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.filters__reset { justify-self: start; font-weight: 700; font-size: 13px; color: var(--accent2-fg); text-decoration: none; white-space: nowrap; }
.data-table {
    margin-bottom: 16px;
    background: var(--card2);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}
.data-table__row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 76px 76px 68px 76px 96px 108px;
    align-items: center;
    gap: 8px;
    min-width: 720px;
    padding: 8px 14px;
    position: relative;
}
.data-table__row + .data-table__row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 14px;
    right: 0;
    height: 1px;
    background: var(--line);
}
.data-table__row--head {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.data-table__cell { display: flex; align-items: center; min-width: 0; }
.data-table__cell--name { gap: 6px; }
.data-table__name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.data-table__cell--check { justify-content: flex-start; }
.data-table__cell--check input[type="checkbox"] { width: 20px; height: 20px; }
.data-table__cell--action { justify-content: flex-end; }
.data-table__rank { width: 100%; }
.data-table__status { color: var(--ok); font-weight: 700; }
/* Programming view: the film's schedule under its row. */
.show-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    color: var(--muted);
}
.show-list__item { display: flex; justify-content: space-between; gap: 12px; }
.stat.format .stat__value { color: var(--accent2-fg); }
.stat.version { border-color: var(--accent); }
.stat.version .stat__value { color: var(--accent-fg); }
.list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--card2);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.list__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    position: relative;
}
.list__row + .list__row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 0;
    height: 1px;
    background: var(--line);
}
.list__row:hover { background: var(--accent-soft); }
/* Row explicitly selected via a shared link (e.g. ``/search/?show=<perf_code>``). */
.list__row--selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.list__row--selected .list__title { color: var(--accent-fg); }
.list > .empty { padding: 18px 16px; }
.list__row > .actions { flex: 0 0 auto; align-self: center; }
/* The body asks for room: when the row is narrow the action wraps below it,
   so the cinema name (and its distance badge) stay on one line. */
.list__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 190px; }
.list__row > .actions { margin-left: auto; }
.list__poster {
    width: 46px;
    height: 69px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    flex: none;
}
.list__overview { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.request-poster {
    width: 96px;
    height: 144px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    float: right;
    margin: 0 0 12px 12px;
}
.list__title { font-weight: 700; }
/* The leading entity of a showtime card (the cinema in search/film, the film in a
   cinema page): slightly larger than the secondary line under it. */
.list__title--lg { font-size: 17px; line-height: 1.25; }
/* Title + its distance badge on one line (the badge follows the name). */
/* Inline flow: the distance badge follows the last word of the name. */
.list__titleline { display: block; }
/* Showtime rows use a compact poster so the text column keeps its room. */
.list__row .poster-frame { width: 56px; }
/* In-row links (film / cinema): inherit the row typography, accent on hover. */
.list__link { color: inherit; text-decoration: none; }
.list__link:hover { color: var(--accent-fg); text-decoration: underline; }
.list__meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}
.empty { color: var(--muted); font-size: 14px; padding: 16px; margin: 0; text-align: center; }
.notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    margin: 0 0 16px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--muted);
    border-radius: var(--radius-lg);
    background: var(--card2);
}
.notice__title { display: block; font-size: 15px; font-weight: 800; margin-bottom: 2px; }
.notice__body { font-size: 14px; line-height: 1.5; color: var(--muted); }
.notice--info { border-left-color: var(--accent2); background: linear-gradient(90deg, var(--accent-soft), var(--card2) 60%); }
.notice--info .notice__title, .notice--info .notice__body { color: var(--ink); }
.notice--info .notice__body { font-weight: 600; }
.notice--warn { border-left-color: var(--warn); background: linear-gradient(90deg, rgba(255, 209, 102, .14), var(--card2) 60%); }
.notice--warn .notice__title { color: var(--warn); }
.notice--danger { border-left-color: var(--danger); background: linear-gradient(90deg, var(--danger-soft), var(--card2) 60%); }
.notice--danger .notice__title { color: var(--danger); }
.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}
.search-form input { flex: 1; }
.search-form button, .search-form .btn { margin-top: 0; white-space: nowrap; }
@media (max-width: 560px) {
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar .actions { width: 100%; }
    /* Lists keep compact, inline trailing actions (iOS grouped style) even on
       a narrow phone — one line, never stacked full width. */
    .list__row { flex-direction: row; align-items: center; flex-wrap: nowrap; }
    .list__row > .actions { flex: 0 0 auto; align-self: center; }
    /* Page-level action groups stack full width on a phone… */
    .actions button, .actions .btn, .actions .btn-secondary, .actions .btn-danger, .actions .buy { width: 100%; }
    /* …but non-CTA controls and list-row actions keep their intrinsic size. */
    .actions button.switch, .actions button.theme-switch { width: 51px; }
    .actions button.dot-select__trigger { width: 44px; }
    .list__row .actions button, .list__row .actions .btn,
    .list__row .actions .btn-secondary, .list__row .actions .btn-danger,
    .list__row .actions .buy { width: auto; }
}

/* --- Home / app navigation components (wireframe) --- */
.app-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    padding-top: calc(10px + env(safe-area-inset-top));
    position: sticky;
    top: 0;
    z-index: 20;
}
.app-bar__brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.app-bar__wordmark { font-size: 22px; font-weight: 800; letter-spacing: -.6px; color: var(--ink); text-transform: lowercase; }
.app-bar__actions { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.app-bar__action { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; padding: 0 2px; min-height: 32px; }
.app-bar__action:hover { color: var(--ink); }
.app-bar__action svg { display: block; }
/* The install entry point only makes sense on a phone/tablet (mobile). */
html:not([data-mobile="true"]) .app-bar__install { display: none; }
/* Notifications: only offer the control where they can actually be enabled
   (secure context + service worker + PushManager + not already denied). */
html:not([data-push-capable="true"]) .push-entry { display: none; }
@media (max-width: 480px) {
    .app-bar__action-label { display: none; }
    .app-bar { gap: 8px; }
    .app-bar__actions { gap: 6px; }
    .app-bar__wordmark { font-size: 20px; }
    .loc-pill { padding: 6px 10px; font-size: 13px; }
    .loc-pill svg { width: 16px; height: 16px; }
    .lang { gap: 4px; }
    .lang button { min-width: 28px; min-height: 28px; font-size: 11px; padding: 2px 6px; }
}

.loc-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent-fg);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.loc-pill svg { display: block; }
.loc-pill[role="button"] { cursor: pointer; }
/* Attention ring lives on a non-link wrapper: Chromium does not repaint an
   animated conic-gradient on the ::before of an <a href>, so the pill link is
   nested inside this wrapper (which carries `.attention`). */
.loc-pill-wrap { display: inline-flex; border-radius: var(--radius-pill); }

.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 24px;
    min-height: 220px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    background:
        radial-gradient(120% 140% at 85% 10%, rgba(124, 58, 237, .55), transparent 55%),
        linear-gradient(150deg, #191036, #2a1b6b 60%, #1a1240);
    box-shadow: var(--shadow-2);
}
.hero__content { position: relative; z-index: 1; }
.hero__eyebrow {
    display: block;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 255, 255, .72);
}
.hero__title { margin: 8px 0 16px; font-size: 30px; line-height: 1.15; font-weight: 800; color: #fff; }
.hero .btn { margin-top: 0; width: auto; }
/* Auth: roomier hero/sheet on wider screens. */
@media (min-width: 700px) {
    .auth__hero { min-height: 210px; padding: 34px 32px 62px; }
    .auth__headline { font-size: 40px; }
    .auth-card { margin: -42px 0 0; padding: 28px 28px 24px; }
}

.search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--card2);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
}
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-field__icon { display: inline-flex; color: var(--muted); flex: none; }
.search-field__input { flex: 1; border: 0; background: transparent; color: var(--ink); height: auto; padding: 0 0 0 3px; font-size: 16px; }
/* Only the outer (:focus-within) ring should show: kill the browser's native
   inner focus outline, and give the caret a little breathing room on the left. */
.search-field__input:focus, .search-field__input:focus-visible { outline: none; }
.search-field__input::-webkit-search-cancel-button { cursor: pointer; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 24px 0 12px;
}
/* A section header opening a card shouldn't add its own top margin on top of the
   card padding (it left a big empty gap above the title). */
.card > .section-head:first-child { margin-top: 0; }
.section-head__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.section-head__eyebrow {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-fg);
}
.section-head__title { margin: 0; font-size: 22px; font-weight: 800; }
.section-head__link { color: var(--accent2-fg); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.section-head__link:hover { text-decoration: underline; }

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
}
/* Directory of venues: wider cards than the compact home/grid tiles, so long
   cinema names (with the distance badge) get room instead of wrapping to slivers. */
.media-grid--venue { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.media-card { display: block; text-decoration: none; color: var(--ink); cursor: pointer; }
.media-card__poster {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(150deg, var(--accent-soft), var(--bg-glow));
}
.media-card__poster--img { background: var(--card2); }
.media-card__poster img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
.rank-badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 2;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: var(--on-accent);
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-1);
}
.media-card__body { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.media-card__title { font-weight: 700; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.media-card__meta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 6px; }
.media-card__meta-row .media-card__meta { min-width: 0; overflow-wrap: anywhere; }
.media-card__meta-row .badge { margin-left: auto; }
.media-card__meta { color: var(--muted); font-size: 12px; }

/* Cinema placeholder art: when a venue has no photo, the poster area shows a
   cinema icon on a tinted gradient (see ``media_art`` / ``ui_poster_art``). */
.media-card__poster--art { background: none; }
.poster-art {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, var(--accent-soft), var(--bg-glow));
}
.media-card__poster > .poster-art { position: absolute; inset: 0; }
.poster-art svg { width: 42%; height: 42%; opacity: .9; }
.poster-art--t2 { background: linear-gradient(150deg, var(--card2), color-mix(in oklab, var(--accent2) 30%, var(--bg-glow))); }
.poster-art--t3 { background: linear-gradient(140deg, color-mix(in oklab, var(--accent) 22%, var(--bg-glow)), color-mix(in oklab, var(--accent2) 26%, var(--card2))); }
.poster-art--t4 { background: radial-gradient(120% 120% at 30% 20%, color-mix(in oklab, var(--accent) 32%, var(--bg-glow)), var(--card2)); }
.poster-art--t5 { background: linear-gradient(150deg, color-mix(in oklab, var(--ok) 24%, var(--bg-glow)), var(--card2)); }
.poster-art--t6 { background: linear-gradient(150deg, color-mix(in oklab, var(--warn) 24%, var(--bg-glow)), var(--card2)); }
.poster-art--lg {
    min-height: 220px;
    border-radius: 14px;
    border: 1px solid var(--line);
    margin-bottom: var(--space-4);
}
.poster-art--lg svg { width: 96px; height: 96px; }

.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 2px;
    padding: 6px 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--header-glass);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    position: sticky;
    bottom: 0;
    z-index: 20;
}
.bottom-nav__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    padding: 8px 6px;
    border-radius: var(--radius-pill);
    color: var(--muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: transform var(--dur-fast) var(--ease-standard), background-color var(--dur) var(--ease-standard), color var(--dur) var(--ease-standard), box-shadow var(--dur) var(--ease-standard);
}
.bottom-nav__item:hover { background: var(--card2); color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.bottom-nav__item:active { transform: scale(.94); box-shadow: none; }
.bottom-nav__item--active { color: var(--accent-fg); background: var(--accent-soft); box-shadow: 0 6px 18px var(--accent-soft); }
.bottom-nav__item--active:hover { color: var(--accent-fg); background: var(--accent-soft); box-shadow: 0 6px 18px var(--accent-soft); }
.bottom-nav__icon { display: inline-flex; transition: transform var(--dur) var(--ease-spring); }
.bottom-nav__icon svg { display: block; width: 24px; height: 24px; }
.bottom-nav__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottom-nav__badge {
    position: absolute;
    top: 0;
    right: 12px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --- Dev-only gallery framing --- */
.gallery-phone {
    max-width: 390px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 32px;
    overflow: hidden;
    background: var(--bg);
    box-shadow: var(--shadow-2);
}
.gallery-phone__body { padding: 16px; display: flex; flex-direction: column; }
/* Keep framed components inside the phone mock instead of letting their
   fixed/sticky positioning escape to the viewport. */
.gallery-phone .app-bar { position: static; padding-inline: 12px; padding-top: 10px; }
.gallery-phone .bottom-nav {
    position: static;
    inset: auto;
    transform: none;
    width: 100%;
    max-width: none;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--line);
    box-shadow: none;
    padding: 6px;
}
.gallery-phone .bottom-nav__item { flex-direction: column; gap: 4px; padding: 8px 6px; border-radius: var(--radius-pill); font-size: 11px; }
.gallery-phone .bottom-nav__icon svg { width: 24px; height: 24px; }
.gallery-phone .app-bar, .gallery-phone .bottom-nav { view-transition-name: none; }

/* --- Home page (wireframe landing) --- */
.hero__sub { margin: 0 0 16px; color: rgba(255, 255, 255, .82); font-size: 15px; line-height: 1.4; }
.home .search-field { margin-top: 16px; }
/* The home rails are one-row carousels (truncated to the visible count by the
   media queries below). Scoped to `.home-rail`, so a normal `.media-grid`
   elsewhere — e.g. the /cines/ directory — keeps the wrapping grid. */
.media-grid.home-rail { display: flex; flex-wrap: nowrap; gap: 12px; }
.media-grid.home-rail > * { flex: 1 1 0; min-width: 0; }

/* Global bottom navigation (all pages). The desktop dock override lives in the
   media query below and must come *after* this rule to win. */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; }

/* Tablet & desktop: wider content, floating navigation dock (all pages) */
@media (min-width: 700px) {
    main { padding: 32px 28px calc(120px + env(safe-area-inset-bottom)); }
    .app-bar { padding-inline: max(24px, calc((100vw - 1000px) / 2 + 28px)); }
    .hero { min-height: 320px; padding: 40px; }
    .hero__title { font-size: 44px; max-width: 18ch; }
    .hero__sub { font-size: 17px; }
    .section-head { margin-top: 32px; }

    .bottom-nav {
        display: flex;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: min(560px, calc(100vw - 40px));
        max-width: none;
        bottom: 20px;
        padding: 8px 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius-pill);
        box-shadow: var(--shadow-2);
    }
    .bottom-nav__item {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        padding: 11px 16px;
        border-radius: var(--radius-pill);
        font-size: 14px;
    }
    .bottom-nav__item--active { background: var(--accent-soft); }
    .bottom-nav__icon svg { width: 20px; height: 20px; }
}

/* Generic "dot + menu" selector: a round trigger opening a same-width list. */
.dot-select { position: relative; display: inline-flex; flex: none; }
.dot-select__trigger {
    width: 44px;
    height: 44px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--card2);
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--dur) var(--ease-standard), color var(--dur) var(--ease-standard), background-color var(--dur) var(--ease-standard);
}
.dot-select__trigger:hover { border-color: var(--accent); color: var(--accent-fg); }
.dot-select.is-open .dot-select__trigger { border-color: var(--accent); color: var(--accent-fg); background: var(--accent-soft); }
.dot-select__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    width: 44px;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-6px) scale(.94);
    transform-origin: top center;
    transition: opacity var(--dur) var(--ease-standard), transform var(--dur) var(--ease-spring), visibility var(--dur) var(--ease-standard);
}
.dot-select.is-open .dot-select__menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) scale(1); }
.dot-select__option {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease-standard), color var(--dur) var(--ease-standard);
}
.dot-select__option:hover { background: var(--card2); color: var(--ink); }
.dot-select__option.is-active { background: var(--accent-soft); color: var(--accent-fg); }
/* Compact variant (app bar): matches the location pill / theme switch height. */
.dot-select--sm .dot-select__trigger { width: 34px; height: 34px; font-size: 11px; }
.dot-select--sm .dot-select__menu { width: 38px; }
.dot-select--sm .dot-select__option { height: 30px; font-size: 11px; }

/* --- Theme switch (iOS-style) --- */
.theme-switch {
    position: relative;
    flex: none;
    width: 51px;
    height: 31px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--card2);
    cursor: pointer;
    transition: background-color .28s ease, border-color .28s ease;
}
.theme-switch__knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow-1);
    color: var(--accent-fg);
    display: grid;
    place-items: center;
    transition: transform .3s cubic-bezier(.34, 1.4, .64, 1), background-color .28s ease;
}
.theme-switch__knob svg { width: 15px; height: 15px; display: block; }
.theme-switch__knob > span { grid-area: 1 / 1; display: inline-flex; transition: opacity .2s ease; }
html[data-theme="light"] .theme-switch__knob { transform: translateX(20px); }
html[data-theme="dark"] .theme-switch__sun { opacity: 0; }
html[data-theme="light"] .theme-switch__moon { opacity: 0; }
.theme-switch:active .theme-switch__knob { width: 28px; }

/* --- Global bottom navigation (app-like, all pages) --- */
@media (max-width: 699px) {
    main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* --- Home carousels: more items as the screen widens (always one row) --- */
@media (max-width: 699px) {
    .media-grid.home-rail > :nth-child(n+4) { display: none; }
}
@media (min-width: 700px) and (max-width: 999px) {
    .media-grid.home-rail > :nth-child(n+5) { display: none; }
}
@media (min-width: 1000px) {
    .media-grid.home-rail > :nth-child(n+7) { display: none; }
}





/* ============================================================
   Motion & interaction (subtle / Apple-like)
   Hooks: html.js [data-reveal], [data-count], [data-replay]
   ============================================================ */

@keyframes notice-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
@keyframes rec-pulse { 0% { box-shadow: 0 0 0 0 var(--accent-soft); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes nav-bounce { 0% { transform: translateY(0); } 35% { transform: translateY(-3px); } 100% { transform: translateY(0); } }
@keyframes skeleton-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Reveal on scroll (opt-in; visible without JS or with reduced motion) */
html.js [data-reveal] {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--dur-slow) var(--ease-standard), transform var(--dur-slow) var(--ease-standard);
}
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Press feedback */
.press { transition: transform var(--dur-fast) var(--ease-standard); }
.press:active { transform: scale(.97); }

/* Buttons & links */
button, .btn, .buy, .tab, .stat, .media-card, .option, .bottom-nav__item, .list__row, .loc-pill, .section-head__link {
    transition: transform var(--dur-fast) var(--ease-standard), background-color var(--dur) var(--ease-standard),
        border-color var(--dur) var(--ease-standard), color var(--dur) var(--ease-standard);
}
button:active, .btn:active, .buy:active { transform: scale(.97); }
button:hover, .btn:hover, .buy:hover { box-shadow: 0 6px 18px var(--accent-soft); }

.tab:hover, .stat:hover, .loc-pill:hover, .section-head__link:hover { transform: translateY(-1px); }

/* Cards & media */
.media-card:hover { transform: translateY(-2px); }
.media-card__poster img { transition: transform var(--dur-slow) var(--ease-standard); }
.media-card:hover .media-card__poster img { transform: scale(1.05); }
.poster-art svg { transition: transform var(--dur-slow) var(--ease-standard); }
.media-card:hover .poster-art svg { transform: scale(1.08); }
.poster-frame img, .poster-frame .poster-art svg { transition: transform var(--dur-slow) var(--ease-standard); }
.poster-frame:hover img, .poster-frame:hover .poster-art svg { transform: scale(1.05); }
.rank-badge { transition: transform var(--dur) var(--ease-standard), box-shadow var(--dur) var(--ease-standard); }
.media-card:hover .rank-badge { transform: translateY(-1px); box-shadow: 0 8px 20px var(--accent-soft); }

/* List rows */
.option:hover { border-color: var(--accent); }

/* Notices & messages */
.notice { animation: notice-in var(--dur-slow) var(--ease-standard); }

/* Bottom navigation active bounce */
.bottom-nav__item--active .bottom-nav__icon { animation: nav-bounce var(--dur-slow) var(--ease-spring); }

/* Search field focus expand */
.search-field { transition: border-color var(--dur) var(--ease-standard), box-shadow var(--dur) var(--ease-standard); }

/* Seatmap */
.seatcell { transition: transform var(--dur-fast) var(--ease-standard), background-color var(--dur) var(--ease-standard); }
.seatcell.free:hover, .seatcell.rec:hover { transform: scale(1.15); }
.seatcell.rec { animation: rec-pulse var(--dur-slow) var(--ease-standard) 1; }

/* Skeleton shimmer */
.skeleton {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--card2) 25%, var(--line) 37%, var(--card2) 63%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.3s linear infinite;
    color: transparent;
    min-height: 1em;
}
.skeleton--text { height: 12px; }
.skeleton--line { height: 14px; margin: 6px 0; }
.skeleton--card { height: 120px; border-radius: var(--radius); }
.skeleton--poster { aspect-ratio: 3 / 4; width: 100%; border-radius: 14px; }
.skeleton--w60 { width: 60%; }
.skeleton--w40 { width: 40%; }
.search-skeleton { display: none; margin-bottom: 16px; }
.search-skeleton.htmx-request { display: grid; gap: 12px; }
.search-skeleton__row { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card2); }

/* Welcome / reward moment (auth confirmation, signup) */
.welcome { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 6px 2px 2px; }
.welcome__icon {
    display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent-fg);
    animation: win-pop var(--dur-slow) var(--ease-spring) 1, win-ring 1.1s var(--ease-standard) .08s 1;
}
.welcome__icon svg { width: 32px; height: 32px; animation: pop-in var(--dur-slow) var(--ease-spring) .14s both; }
.welcome__title { margin: 0; font-size: 20px; }
.welcome__text { margin: 0; }
/* A small "win" celebration: spring in + a single expanding halo. */
@keyframes win-pop {
    0% { transform: scale(.4); opacity: 0; }
    55% { transform: scale(1.12); opacity: 1; }
    75% { transform: scale(.96); }
    100% { transform: scale(1); }
}
@keyframes win-ring {
    0% { box-shadow: 0 0 0 0 var(--accent-soft); }
    70% { box-shadow: 0 0 0 16px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* Gallery-only: animations off switch (mirrors reduced motion) */
html[data-motion="off"] * {
    transition: none !important;
    animation: none !important;
}
html[data-motion="off"] [data-reveal] { opacity: 1 !important; transform: none !important; }

/* Reduced motion: never hide revealed content, no perpetual motion.
   ``html[data-motion="on"]`` (the /_ui/ gallery) opts back in so every animation
   can be reviewed even when the OS asks to reduce motion. */
@media (prefers-reduced-motion: reduce) {
    html.js:not([data-motion="on"]) [data-reveal] { opacity: 1 !important; transform: none !important; }
    html:not([data-motion="on"]) .skeleton,
    html:not([data-motion="on"]) .notice,
    html:not([data-motion="on"]) .seatcell.rec,
    html:not([data-motion="on"]) .bottom-nav__item--active .bottom-nav__icon,
    html:not([data-motion="on"]) .welcome__icon { animation: none !important; }
}

/* Cross-document view transitions (progressive enhancement) */
@view-transition { navigation: auto; }
.app-bar, header { view-transition-name: app-header; }
.bottom-nav { view-transition-name: app-nav; }

/* Generic iOS-style switch (checked = accent knob on the trailing side) */
.switch {
    position: relative;
    flex: none;
    width: 51px;
    height: 31px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--card2);
    cursor: pointer;
    transition: background-color var(--dur) var(--ease-standard), border-color var(--dur) var(--ease-standard);
}
.switch__knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow-1);
    transition: transform var(--dur) var(--ease-spring), background-color var(--dur) var(--ease-standard);
}
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"] .switch__knob { transform: translateX(20px); background: #fff; }
.switch:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }

/* Dev-only gallery framing helpers */
.gallery-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gallery-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gallery-stagger { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.gallery-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 40px 4px 18px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-fg);
}
.gallery-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#gallery-root > .gallery-group:first-child { margin-top: 0; }
/* More breathing room between the gallery's section cards (top level only). */
#gallery-root > div > .card { margin-bottom: 22px; }
.gallery-attention { padding: 12px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.icon-cell { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); color: var(--ink); }

/* Smart prompts: persistent, attention-grabbing capability nudges
   (share location / install app / enable notifications). */
.smart-prompts { display: grid; gap: 10px; margin: 0 0 16px; }
.smart-prompts[hidden], .smart-prompt[hidden] { display: none; }
.smart-prompt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--line);
}
.smart-prompt__icon { flex: none; display: inline-flex; color: var(--accent-fg); }
.smart-prompt__icon svg { display: block; }
.smart-prompt__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.smart-prompt__title { font-size: 14px; font-weight: 800; }
.smart-prompt__hint { font-size: 13px; color: var(--muted); line-height: 1.4; }
.smart-prompt__action {
    flex: none;
    margin-left: auto;
    padding: 9px 16px;
    border: 0;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: var(--on-accent);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.smart-prompt__action:hover { box-shadow: 0 6px 18px var(--accent-soft); }
.smart-prompt__action:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }

/* "Illuminated" animated border + pulsing halo, to catch the eye.
   Applies to any element with .attention (smart prompts, the location pill...). */
@property --attention-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.attention { position: relative; }
.attention::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(
        from var(--attention-angle, 0deg),
        var(--accent) 0deg,
        var(--accent2) 90deg,
        #fff 150deg,
        var(--accent2) 210deg,
        var(--accent) 300deg,
        var(--accent) 360deg
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    animation: attention-sweep 3s linear infinite;
    pointer-events: none;
}
.attention::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    animation: attention-glow 2.4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes attention-sweep { to { --attention-angle: 360deg; } }
@keyframes attention-glow {
    0%, 100% { box-shadow: 0 0 8px 0 var(--accent-soft); }
    50% { box-shadow: 0 0 18px 4px var(--accent-soft); }
}
/* The attention border is deliberately always animated (product decision):
   it must stay eye-catching even when the OS asks to reduce motion. */
html[data-motion="off"] .attention::before { animation: none; }

/* Inline "message from FilaDiez" bubble, anchored to an element (pill, button…). */
.fd-bubble {
    position: fixed;
    z-index: 200;
    max-width: 260px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent2);
    box-shadow: var(--shadow-2);
    color: var(--ink);
    font-size: 13px;
    line-height: 1.4;
    animation: fd-bubble-in var(--dur) var(--ease-standard);
}
.fd-bubble[hidden] { display: none; }
.fd-bubble--ok { border-left-color: var(--ok); }
.fd-bubble--error { border-left-color: var(--danger); }
.fd-bubble--info { border-left-color: var(--accent2); }
.fd-bubble::after {
    content: "";
    position: absolute;
    top: -5px;
    left: var(--bubble-arrow, 18px);
    width: 10px;
    height: 10px;
    background: var(--card);
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    transform: rotate(45deg);
}
.fd-bubble--above::after {
    top: auto;
    bottom: -5px;
    border-left: 0;
    border-top: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
@keyframes fd-bubble-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

/* Increased contrast (HIG "Increase Contrast"): push the accent *foreground*
   further in both themes. Fills/gradients keep the exact brand. */
@media (prefers-contrast: more) {
    :root {
        --accent-fg: #c4b5fd;
        --accent2-fg: #93c5fd;
    }
    html[data-theme="light"] {
        --accent-fg: #5b21b6;
        --accent2-fg: #1d4ed8;
    }
}



