/* Base reset, previously supplied by Tailwind CDN. */
*, *::before, *::after { box-sizing: border-box; border-width: 0; border-style: solid; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-size: inherit; font-weight: inherit; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; padding: 0; }
button { background: transparent; cursor: pointer; text-transform: none; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }
img, svg, video, canvas { display: block; vertical-align: middle; }
img, video { max-width: 100%; height: auto; }
strong { font-weight: 600; }
.hidden { display: none !important; }

/* Together — design system (Luma-inspired, see revamp/luma_design.md).
   Tokens first; all screens share these components. */

:root {
    --page: #141414;
    --surface: #202020;
    --surface-raised: #292929;
    --surface-hover: #303030;
    --text: #f7f7f7;
    --text-secondary: #a3a3a3;
    --text-muted: #777777;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --action: #ffffff;
    --action-text: #171717;
    --accent: #f2c94c;          /* brand yellow, used sparingly (badges, highlights) */
    --success: #4ade80;
    --danger: #f87171;
    --focus: #8ab4ff;

    --font-body: -apple-system, system-ui, "Apple Color Emoji", Inter, Roboto, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-display: var(--font-body);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --header-h: 56px;
    --gutter: 16px;
    --ease: 180ms ease;

    /* Compact layout scale (BUG-013) — every page uses these instead of one-off values. */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --page-top: 32px;           /* space between header and a page's first line */
    --page-bottom: 48px;
    --section-gap: 24px;        /* between blocks on a page */
    --card-pad: 16px;
    --control-h: 44px;          /* minimum tap target */
    --fs-sm: 14px;
    --fs-h1: 28px;
    --fs-h2: 20px;
    --content-narrow: 800px;    /* discovery, account pages */
    --content-wide: 928px;      /* event page */
}
@media (max-width: 640px) {
    :root {
        --page-top: 16px;
        --page-bottom: 32px;
        --section-gap: 16px;
        --card-pad: 14px;
        --fs-h1: 24px;
        --fs-h2: 18px;
    }
}

html { background: var(--page); }
body {
    font-family: var(--font-body);
    background-color: var(--page);
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Subtle cool glow at the top of discovery surfaces */
.ambient {
    background: radial-gradient(ellipse 85% 360px at 50% -100px, rgba(75, 98, 160, 0.22), transparent 80%), var(--page);
    min-height: calc(100vh - var(--header-h));
}

/* ---------- focus + motion ---------- */
:where(a, button, input, select, textarea, [role="button"], [role="radio"], [tabindex]):focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--gutter);
    background: rgba(20, 20, 20, 0.82);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.site-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: var(--text);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
    text-decoration: none;
}
.site-header__logo { display: block; height: 26px; width: auto; }
.brand-logo { display: inline-block; height: 18px; width: auto; vertical-align: middle; }
.site-header__nav { display: flex; align-items: center; gap: 4px; }
.site-header__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--ease), background-color var(--ease);
}
.site-header__link:hover, .site-header__link[aria-current="page"] { color: var(--text); }
.site-header__signin {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    margin-left: 4px;
    border-radius: 999px;
    background: var(--surface-raised);
    border: 1px solid var(--line-strong);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--ease);
}
.site-header__signin:hover { background: var(--surface-hover); }
.site-header__account {
    width: 44px;
    height: 44px;
    margin-left: 4px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    text-decoration: none;
}
.site-header__avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--surface-raised);
    border: 1px solid var(--line-strong);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}
@media (max-width: 480px) {
    .site-header__link--wide { display: none; }
}

/* ---------- layout ---------- */
.container-narrow { width: 100%; max-width: calc(var(--content-narrow) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.page-wrap { width: 100%; max-width: calc(var(--content-wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */
.page-title { font-family: var(--font-display); font-size: var(--fs-h1); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.section-title { font-size: 20px; line-height: 1.2; font-weight: 600; }
.muted { color: var(--text-secondary); }
.faint { color: var(--text-muted); }
.gradient-text {
    background-image: radial-gradient(circle at 12px 12px, rgb(171, 70, 221) 0%, rgb(243, 26, 124) 36%, rgb(248, 113, 43) 51%, rgb(234, 171, 38) 77%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Repaint the gradient on each wrapped line and leave room for glyph overhang (BUG-007). */
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    padding-right: 0.06em;
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: var(--radius);
    font: 500 16px/24px var(--font-body);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--ease), opacity var(--ease), transform var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: 0.45; }
.btn--primary { background: var(--action); color: var(--action-text); }
.btn--primary:hover:not(:disabled) { background: #e9e9e9; }
.btn--secondary { background: var(--surface-raised); color: var(--text); border-color: var(--line-strong); }
.btn--secondary:hover:not(:disabled) { background: var(--surface-hover); }
.btn--block { width: 100%; }

/* ---------- chips (filters) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text-secondary);
    font: 500 14px var(--font-body);
    cursor: pointer;
    transition: background-color var(--ease), color var(--ease);
}
.chip:hover { color: var(--text); background: var(--surface); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--action-text); border-color: var(--text); }

/* ---------- badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--surface-raised);
    color: var(--text-secondary);
    border: 1px solid var(--line);
}
.badge--going { background: rgba(74, 222, 128, 0.12); color: var(--success); border-color: rgba(74, 222, 128, 0.3); }
.badge--soldout { background: rgba(248, 113, 113, 0.1); color: var(--danger); border-color: rgba(248, 113, 113, 0.28); }
.badge--invite { background: rgba(242, 201, 76, 0.1); color: var(--accent); border-color: rgba(242, 201, 76, 0.3); }

/* ---------- poster (original fallback artwork when an event has no image) ---------- */
.poster {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-raised);
    flex-shrink: 0;
}
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.poster__img { object-fit: contain; }                       /* whole poster, never cropped or stretched */
.poster__fill { object-fit: cover; filter: blur(24px) brightness(0.55); transform: scale(1.2); }
.poster__art {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}
.poster__art span { font-size: clamp(28px, 30cqw, 96px); line-height: 1; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35)); }
.poster { container-type: inline-size; }

/* ---------- discover ---------- */
/* Top/bottom only: a padding shorthand here wiped .container-narrow's side gutter, putting the hero and
   date markers flush against the screen edge on phones (BUG-007). */
.discover { padding-top: var(--page-top); padding-bottom: var(--page-bottom); }
.discover > * { min-width: 0; }
.discover__intro { margin-bottom: var(--section-gap); }
.discover__hero { font-size: var(--fs-h1); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; overflow-wrap: anywhere; }
.discover__lede { margin-top: var(--space-2); color: var(--text-secondary); max-width: 560px; overflow-wrap: anywhere; }
.discover__filters { margin: 0 0 var(--section-gap); }
.discover__notice { margin: calc(-1 * var(--space-2)) 0 var(--section-gap); }

.timeline { position: relative; }
.timeline__group { position: relative; padding-left: 20px; padding-bottom: var(--section-gap); min-width: 0; }
.timeline__group::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 10px;
    bottom: 0;
    border-left: 1px dashed var(--line-strong);
}
.timeline__group:last-child::before { bottom: var(--section-gap); }
.timeline__date { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin-bottom: var(--space-3); }
.timeline__date::before {
    content: "";
    position: absolute;
    left: -20px; /* sits in the group's 20px padding, never outside the content column */
    top: 0.5em;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--text-muted);
}
.timeline__day { font-weight: 600; }
.timeline__weekday { color: var(--text-muted); }
.timeline__cards { display: grid; gap: 12px; }

.event-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    transition: background-color var(--ease), border-color var(--ease);
}
.event-card:hover { background: var(--surface-raised); border-color: var(--line-strong); }
.event-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.event-card__time { color: var(--text-secondary); font-size: 14px; }
.event-card__title { font-size: 20px; line-height: 1.25; font-weight: 600; overflow-wrap: anywhere; }
.event-card__meta { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 14px; min-width: 0; }
.event-card__meta svg { flex-shrink: 0; opacity: 0.8; }
.event-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.event-card__price { font-size: 14px; font-weight: 600; }
.event-card .poster { width: 160px; }
@media (max-width: 640px) {
    .event-card { padding: 12px; gap: 12px; }
    .event-card .poster { width: 104px; }
    .event-card__title { font-size: 17px; }
}

.empty-state {
    padding: 48px 24px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--text-secondary);
}
.empty-state__title { color: var(--text); font-weight: 600; margin-bottom: 4px; }

.skeleton { background: var(--surface); border-radius: var(--radius-lg); height: 140px; border: 1px solid var(--line); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--text-muted); font-size: 14px; }
.site-footer a { color: var(--text-secondary); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: var(--text); }
.site-footer__row { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; justify-content: space-between; }

/* ---------- shared bits ---------- */
[hidden] { display: none !important; }
.section-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.link-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 4px;
    background: none;
    border: 0;
    color: var(--text);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.skeleton.poster { height: auto; }
body.has-dialog { overflow: hidden; }

/* ---------- event page ---------- */
.event {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
    padding-top: var(--page-top);
    padding-bottom: var(--page-bottom);
}
.event__media { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 24px; }
.event__media .poster { width: 100%; border-radius: var(--radius-lg); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }
.event__host-name { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.event__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.event__badges { display: flex; flex-wrap: wrap; gap: 8px; }
.event__title {
    font-family: var(--font-display);
    font-size: 38px;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.015em;
    overflow-wrap: anywhere;
    margin-bottom: 4px;
}
.event__section { margin-top: 16px; }
.event__subhead { font-size: 16px; font-weight: 600; margin: 20px 0 6px; }
.prose p { color: var(--text); margin-bottom: var(--space-3); overflow-wrap: anywhere; } /* BUG-011: body copy at full contrast */
.event__venue-name { font-weight: 600; }
.event__venue-notes { white-space: normal; }
.event__directions { margin-top: var(--space-1); }
.meta-row--link { color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
.meta-row--link:hover .meta-row__primary { text-decoration: underline; text-underline-offset: 3px; }
.prose p:last-child { margin-bottom: 0; }

.meta-row { display: flex; align-items: center; gap: 14px; }
.meta-row__tile {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    overflow: hidden;
}
.meta-row__tile--cal { display: flex; flex-direction: column; }
.cal__month {
    width: 100%;
    text-align: center;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 16px;
    background: var(--surface-raised);
    color: var(--text-secondary);
}
.cal__day { flex: 1; display: grid; place-items: center; font-size: 17px; font-weight: 600; color: var(--text); line-height: 1; }
.meta-row__text { min-width: 0; }
.meta-row__primary { font-weight: 500; overflow-wrap: anywhere; }
.meta-row__secondary { font-size: 14px; color: var(--text-secondary); overflow-wrap: anywhere; }

@media (max-width: 767px) {
    .event { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
    .event__media { position: static; }
    /* The poster must not fill the first screen: cap it so the title and details show (BUG-005/006). */
    .event__media .poster { aspect-ratio: auto; height: min(calc(100vw - 2 * var(--gutter)), 40vh); }
    .event__host { display: none; }
    .event__title { font-size: 28px; }
}

/* ---------- registration panel ---------- */
.panel {
    margin-top: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: clip; /* clip, not hidden: hidden would stop the sticky order bar from sticking */
}
.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: var(--surface-raised);
    border-bottom: 1px solid var(--line);
}
.panel__title { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.panel__body { padding: var(--card-pad); display: flex; flex-direction: column; gap: var(--space-3); }
.panel__text { color: var(--text); }
.panel__hint { font-size: 14px; color: var(--text-secondary); }
.panel__hint--cap { color: var(--accent); }
.panel__notice {
    font-size: 14px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(74, 222, 128, 0.1);
    color: var(--success);
}
.panel__cancel { align-self: center; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--text-secondary); }
.price-row span:last-child { font-size: 18px; font-weight: 600; color: var(--text); }

.tiers { list-style: none; display: flex; flex-direction: column; }
.tier { display: flex; align-items: center; gap: var(--space-3); padding: 10px 0; border-bottom: 1px solid var(--line); }
.tier:first-child { padding-top: 0; }
.tier__info { flex: 1; min-width: 0; }
.tier__name { font-weight: 600; overflow-wrap: anywhere; }
.tier__desc { font-size: 13px; line-height: 1.4; color: var(--text-secondary); overflow-wrap: anywhere; }
.tier__meta { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.tier__price { color: var(--text); font-weight: 600; }
.tier--soldout { padding: 6px 0; }
.tier--soldout .tier__info { opacity: 0.45; }
.tier--soldout .tier__desc { display: none; }           /* sold out: name, price and label only */
.tier--soldout .stepper { opacity: 0.25; }
.tiers--locked .stepper { opacity: 0.4; }

.stepper { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.stepper__btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface-raised);
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--ease);
}
.stepper__btn:hover:not(:disabled) { background: var(--surface-hover); }
.stepper__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper__qty { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.panel__footer { display: flex; flex-direction: column; gap: var(--space-2); }
.order-lines { font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; }
@media (max-width: 767px) {
    .panel__footer {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin: 0 calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad));
        padding: var(--space-3) var(--card-pad) calc(var(--space-3) + env(safe-area-inset-bottom));
        background: var(--surface);
        border-top: 1px solid var(--line-strong);
        box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.35);
    }
}
.order-total { display: flex; justify-content: space-between; align-items: baseline; color: var(--text-secondary); font-size: 14px; }
.order-total__amount { font-size: 20px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

.booked__count { font-size: 20px; font-weight: 600; }
.booked__lines { list-style: none; margin-top: 8px; }
.booked__line { display: flex; justify-content: space-between; padding: 6px 0; color: var(--text-secondary); border-top: 1px solid var(--line); }

.unavailable { text-align: center; padding: 96px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.unavailable__emoji { font-size: 48px; }
.unavailable .btn { margin-top: 12px; }

/* ---------- dialog (checkout / invite / sign in) ---------- */
.dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 24px;
    overflow-y: auto;
    animation: fade-in 160ms ease;
}
.dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    padding: 32px 24px 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.dialog__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    cursor: pointer;
}
.dialog__close:hover { background: var(--surface-raised); color: var(--text); }
.dialog__title { font-size: 22px; line-height: 1.25; font-weight: 600; margin: 4px 40px 8px 0; outline: none; }
.dialog__lede { color: var(--text-secondary); margin-bottom: 20px; }
.dialog__recap { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.dialog__form { display: flex; flex-direction: column; gap: 16px; }
.dialog__notice { font-size: 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--text-secondary); margin: 12px 0; }
.dialog__form .dialog__notice { margin: 0; }
.dialog__notice--error { background: rgba(248, 113, 113, 0.1); color: var(--danger); }
.dialog__fine { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 12px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
    .dialog-backdrop { padding: 0; background: var(--surface); }
    .dialog { max-width: none; min-height: 100%; border: 0; border-radius: 0; box-shadow: none; padding: 56px 20px 32px; }
}

/* ---------- form fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.field__control {
    display: flex;
    align-items: center;
    min-height: 48px;
    background: var(--surface-raised);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    transition: border-color var(--ease);
}
.field__control:focus-within { border-color: var(--focus); }
.field__prefix { padding-left: 14px; color: var(--text-secondary); font-weight: 500; }
.field__input {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    padding: 0 14px;
    background: transparent;
    border: 0;
    color: var(--text);
    font: 16px var(--font-body);
}
.field__prefix + .field__input { padding-left: 8px; }
.field__input:focus { outline: none; }
.field__input::placeholder { color: var(--text-muted); }
.field__control:has([aria-invalid="true"]) { border-color: var(--danger); }
.field__error { font-size: 13px; color: var(--danger); }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices[aria-invalid="true"] .choice { border-color: rgba(248, 113, 113, 0.6); }
.choice {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface-raised);
    color: var(--text);
    font: 500 15px var(--font-body);
    cursor: pointer;
    transition: background-color var(--ease), color var(--ease);
}
.choice:hover { background: var(--surface-hover); }
.choice[aria-checked="true"] { background: var(--action); color: var(--action-text); border-color: var(--action); }

/* ---------- OTP resend ---------- */
.resend { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.resend__text { font-size: 14px; color: var(--text-secondary); margin-bottom: 10px; }
.resend__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.resend__actions .btn { padding: 0 10px; font-size: 14px; }

/* ---------- order summary ---------- */
.summary { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.summary__event { font-weight: 500; color: var(--text-secondary); overflow-wrap: anywhere; }
.summary__lines { list-style: none; }
.summary__line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary__line--discount { color: var(--success); }
.summary__total { display: flex; justify-content: space-between; font-weight: 600; font-size: 18px; }
.promo { display: flex; flex-direction: column; gap: 6px; }
.promo__row { display: flex; gap: 8px; }
.promo__row .field__input { background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.promo__row .field__input:focus { border-color: var(--focus); }
.promo__message { font-size: 13px; }
.promo__message--ok { color: var(--success); }
.promo__message--error { color: var(--danger); }

/* ---------- confirmation ---------- */
.confirm { display: flex; flex-direction: column; gap: 12px; text-align: center; align-items: stretch; }
.confirm .dialog__title { margin: 0; }
.confirm .dialog__lede { margin-bottom: 8px; }
.confirm__icon {
    align-self: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 26px;
    background: rgba(74, 222, 128, 0.14);
    color: var(--success);
}
.confirm__count { font-weight: 500; overflow-wrap: anywhere; }

/* ---------- sign-up page ---------- */
.auth-page { display: flex; justify-content: center; padding: 48px var(--gutter) 64px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card__lede { color: var(--text-secondary); margin: 8px 0 24px; }

/* ---------- dinner and account screens ---------- */
.account-page { width: 100%; max-width: calc(720px + 2 * var(--gutter)); margin: 0 auto; padding: var(--page-top) var(--gutter) var(--page-bottom); min-height: calc(100vh - 160px); }
.account-page--narrow { max-width: 560px; }
.screen-heading { margin: var(--space-2) 0 var(--section-gap); }
.screen-title { font-size: var(--fs-h1); line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.screen-lede { color: var(--text-secondary); margin-top: var(--space-2); max-width: 52ch; }
.screen-stack { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.screen-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.screen-toolbar > * { min-width: 0; }
.screen-toolbar .btn { flex-shrink: 0; }
.card-title { font-weight: 600; font-size: var(--fs-h2); line-height: 1.3; overflow-wrap: anywhere; }
.muted { color: var(--text-secondary); }
.fine-print { font-size: 14px; }
.status-success { color: var(--success); }
.danger-text { color: var(--danger); }
.account-nav { display: flex; justify-content: center; gap: 24px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.account-nav [aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 6px; }
.slot-card, .plan-card { display: flex; align-items: center; gap: 16px; width: 100%; padding: 20px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--text); text-align: left; cursor: pointer; transition: background-color var(--ease), border-color var(--ease); }
.slot-card:hover:not(:disabled), .plan-card:hover { background: var(--surface-raised); }
.slot-card.selected, .plan-card.selected { border-color: var(--text); background: var(--surface-raised); }
.slot-card:disabled { opacity: 0.5; cursor: not-allowed; }
.slot-card__date { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); width: 56px; min-height: 64px; flex-shrink: 0; font-size: 12px; color: var(--text-secondary); }
.slot-card__date strong { font-size: 24px; font-weight: 600; color: var(--text); }
.slot-card__content { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.slot-card__content > strong { font-weight: 600; }
.slot-card__content .status-success { font-size: 13px; }
.selection-dot { width: 20px; height: 20px; border: 1px solid var(--text-muted); border-radius: 50%; flex-shrink: 0; }
.selected .selection-dot { background: var(--text); border: 5px solid var(--surface-raised); outline: 1px solid var(--text); }
.plan-card { justify-content: space-between; min-height: 80px; }
.plan-card > span { display: flex; flex-direction: column; gap: 4px; }
.plan-card > strong { font-size: 20px; white-space: nowrap; }
.details-list { display: grid; gap: 16px; }
.details-list dt { color: var(--text-secondary); font-size: 14px; margin-bottom: 4px; }
.btn--compact { padding: 0 14px; font-size: 15px; }

/* profile (BUG-008) */
.profile-card { padding: var(--card-pad); display: flex; flex-direction: column; gap: var(--space-3); }
.profile-identity { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.profile-identity__text { min-width: 0; }
.profile-name { font-size: var(--fs-h2); font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.profile-avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; background: var(--surface-raised); display: grid; place-items: center; font-size: 24px; }
.profile-row { display: flex; align-items: center; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); min-width: 0; }
.profile-row__label { font-size: var(--fs-sm); color: var(--text-secondary); width: 44px; flex-shrink: 0; }
.profile-row__value { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.list-group { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: clip; }
.list-row {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
    min-height: 48px; padding: 0 var(--card-pad); width: 100%;
    background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row:hover { background: var(--surface-raised); }
.list-row.danger-text { color: var(--danger); }
.character-card { padding: 0 var(--card-pad); }
.character-card > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 48px; cursor: pointer; list-style: none; }
.character-card > summary::-webkit-details-marker { display: none; }
.character-card > summary::after { content: "▾"; color: var(--text-secondary); transition: transform var(--ease); }
.character-card[open] > summary::after { transform: rotate(180deg); }
.character-card > summary .section-label { margin: 0; padding: 0; border: 0; }
.character-card__name { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.character-card[open] { padding-bottom: var(--card-pad); }
.character-card[open] > p { margin-bottom: var(--space-3); }
.trait-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.trait-list .chip { display: inline-flex; align-items: center; min-height: 0; padding: 4px 10px; font-size: 13px; cursor: default; }
.menu-row { justify-content: space-between; text-align: left; padding: 16px; }
.location-dialog { position: fixed; margin: auto; width: calc(100% - 32px); max-width: 440px; max-height: calc(100dvh - 48px); overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 24px; }
.location-dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
.location-dialog .screen-toolbar { margin-bottom: 20px; }
.history-card { overflow-wrap: anywhere; padding: var(--card-pad); display: flex; flex-direction: column; gap: var(--space-1); }
.history-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.history-card__kind { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
.history-card__title { font-size: 17px; font-weight: 600; line-height: 1.3; }
.history-card__meta, .history-card__tickets { font-size: var(--fs-sm); color: var(--text-secondary); }
.history-card__tickets { color: var(--text); }
.history-card__action { align-self: flex-start; margin-top: var(--space-2); }
.history-card--past { opacity: 0.85; }
.app-promo { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.app-promo p { flex: 1 1 220px; font-size: var(--fs-sm); }
.legal-copy { line-height: 1.7; }
.legal-heading { display: flex; align-items: center; gap: 12px; }
.legal-icon { color: var(--text-secondary); }
.legal-section { display: flex; flex-direction: column; gap: 24px; color: var(--text-secondary); }
.legal-subtitle { color: var(--text); font-weight: 600; margin-bottom: 8px; }
.legal-list { list-style: disc; padding-left: 20px; }
.legal-list li + li { margin-top: 8px; }
.legal-paragraph { margin: 8px 0; }
.legal-copy a { overflow-wrap: anywhere; }
.auth-card > .section-label { margin: 24px 0 12px; }
.auth-card > .link-btn { margin-bottom: 20px; }
.screen-loading { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--text-secondary); }
.loader { width: 32px; height: 32px; border: 3px solid var(--line-strong); border-top-color: var(--text); border-radius: 50%; animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.72); display: grid; place-items: center; padding: 24px; }
.loading-content { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; padding: 24px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); }
.toast { position: fixed; z-index: 90; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(440px, calc(100% - 32px)); padding: 14px 20px; border-radius: var(--radius); background: var(--surface-raised); border: 1px solid var(--line-strong); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); font-size: 14px; overflow-wrap: anywhere; }
.toast[data-type="error"] { border-color: var(--danger); }
.toast[data-type="success"] { border-color: var(--success); }
.toast[data-type="warning"] { border-color: var(--accent); }
@media (max-width: 640px) {
    .slot-card, .plan-card { padding: 16px; gap: 12px; }
    .slot-card__content { font-size: 14px; }
    .legal-copy .panel__body { padding: 16px; }
}
