/* ==========================================================================
   AngelTown Community — Design Tokens
   Sourced from DESIGN.md (Pinterest system): image-first discovery,
   Pinterest Red as a strictly reserved CTA accent, warm neutral chrome,
   sharp square-corner vocabulary, flat full-bleed cards.
   ========================================================================== */

:root {
    /* --- Primitives: color (from DESIGN.md colors.*) --- */
    --pin-red: #e60023;
    --pin-red-pressed: #cc001f;
    --pin-red-deep: #99001a;
    --pin-red-deeper: #730013;
    --ink: #000000;
    --ink-soft: #211922;
    --text: #33332e;
    --muted: #62625b;
    --muted-soft: #91918c;
    --border: #dadad3;
    --border-soft: #e5e5e0;
    --canvas: #ffffff;
    --surface-soft: #fbfbf9;
    --surface-card: #f6f6f3;
    --surface-secondary: #e5e5e0;
    --surface-secondary-pressed: #c8c8c1;
    --surface-dark: #262622;
    --on-accent: #ffffff;
    --on-dark: #ffffff;
    --focus: #435ee5;
    --info-blue: #2b48d4;
    --success: #103c25;
    --success-pale: #c7f0da;
    --warning: #d17711;
    --error: #9e0a0a;

    /* --- Primitives: spacing (from DESIGN.md spacing.*) --- */
    --space-xxs: 4px;
    --space-xs: 6px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-xxl: 32px;
    --space-section: 64px;

    /* --- Primitives: type (from DESIGN.md typography.*) --- */
    --font-body: 'Pin Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --display-xl-size: clamp(2.5rem, 1.9rem + 2.6vw, 70px);
    --display-lg-size: clamp(2rem, 1.6rem + 1.6vw, 44px);
    --heading-xl-size: 28px;
    --heading-lg-size: 22px;
    --body-md-size: 16px;
    --body-sm-size: 14px;
    --caption-size: 12px;
    --button-size: 14px;

    /* --- Primitives: radius / shadow / motion (from DESIGN.md rounded.*) --- */
    --r-none: 0px;
    --r-sm: 0px;
    --r-md: 0px;
    --r-lg: 0px;
    --r-full: 0px;

    --shadow-modal: 0 24px 48px -16px rgba(14, 13, 12, 0.28);
    --focus-ring: rgba(67, 94, 229, 0.15);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 150ms;
    --duration: 220ms;

    /* --- Semantic --- */
    --color-bg: var(--surface-soft);
    --color-surface: var(--canvas);
    --color-surface-sunk: var(--surface-card);
    --color-ink: var(--ink-soft);
    --color-muted: var(--muted);
    --color-line: var(--border);
    --color-line-strong: var(--muted-soft);
    --color-accent: var(--pin-red);
    --color-accent-strong: var(--pin-red-pressed);
    --color-accent-tint: #fbe1e3;
    --color-inverse-bg: var(--surface-dark);
    --color-inverse-ink: var(--on-dark);

    /* legacy aliases still referenced inline in a couple templates */
    --black: var(--color-ink);
    --white: var(--color-surface);
    --line: var(--color-line);
}

/* ==========================================================================
   Dark theme — token overrides only. Every component below is built on
   these custom properties, so redefining the primitives here recolors the
   whole site. Applied when the OS prefers dark and the user hasn't chosen
   light explicitly, OR when the user has explicitly chosen dark via the
   navbar toggle (data-theme, persisted to localStorage by theme.js).
   Accent red, on-accent/on-dark, and surface-dark stay fixed across themes
   so the brand mark and "always-dark" chip surfaces stay stable; badge
   fills were moved off --ink onto --surface-dark for the same reason.
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ink: #f5f4f1;
        --ink-soft: #e8e5e0;
        --text: #cfcdc5;
        --muted: #9c9a92;
        --muted-soft: #6b6963;
        --border: #3a3934;
        --border-soft: #454440;
        --canvas: #262421;
        --surface-soft: #121110;
        --surface-card: #1e1c1a;
        --surface-secondary: #332f2b;
        --surface-secondary-pressed: #433e38;
        --surface-dark: #0a0908;
        --focus: #7c93ff;
        --info-blue: #6f8cff;
        --success: #4ade80;
        --success-pale: #123521;
        --warning: #f0993d;
        --error: #ff6b6b;
        --color-accent-tint: #3a1418;
        --focus-ring: rgba(124, 147, 255, 0.28);
        --shadow-modal: 0 24px 48px -16px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    }
}

:root[data-theme="dark"] {
    --ink: #f5f4f1;
    --ink-soft: #e8e5e0;
    --text: #cfcdc5;
    --muted: #9c9a92;
    --muted-soft: #6b6963;
    --border: #3a3934;
    --border-soft: #454440;
    --canvas: #262421;
    --surface-soft: #121110;
    --surface-card: #1e1c1a;
    --surface-secondary: #332f2b;
    --surface-secondary-pressed: #433e38;
    --surface-dark: #0a0908;
    --focus: #7c93ff;
    --info-blue: #6f8cff;
    --success: #4ade80;
    --success-pale: #123521;
    --warning: #f0993d;
    --error: #ff6b6b;
    --color-accent-tint: #3a1418;
    --focus-ring: rgba(124, 147, 255, 0.28);
    --shadow-modal: 0 24px 48px -16px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

body,
.site-header,
.site-footer,
.card,
.btn,
.auth-panel,
.form-plain input,
.form-plain textarea,
.main-nav {
    transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--body-md-size);
    color: var(--text);
    background: var(--color-bg);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-body);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a {
    color: inherit;
    text-decoration: none;
}

::selection { background: var(--pin-red); color: var(--on-accent); }

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.micro-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: var(--caption-size);
    font-weight: 500;
    color: var(--color-muted);
}

.micro-label.accent { color: var(--pin-red); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    background: var(--canvas);
    border-bottom: 1px solid var(--color-line);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: opacity var(--duration-fast) var(--ease);
}

.brand:hover { opacity: 0.72; }

.brand-logo {
    height: 26px;
    width: auto;
    display: block;
}

.brand-text {
    font-weight: 700;
    font-size: var(--body-md-size);
    color: var(--ink);
    letter-spacing: -0.02em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--surface-card);
    color: var(--ink);
    border: none;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.theme-toggle:hover { background: var(--surface-secondary); }

.theme-toggle svg { width: 18px; height: 18px; }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: flex; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: flex; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

:root[data-theme="dark"] .theme-toggle .icon-sun { display: flex; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: flex; }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav a {
    position: relative;
    margin-left: var(--space-xl);
    font-size: var(--body-sm-size);
    font-weight: 600;
    color: var(--ink);
    padding: var(--space-sm) 0;
    transition: color var(--duration-fast) var(--ease);
}

.main-nav a:not(.pill):hover { color: var(--pin-red); }

.main-nav a.pill {
    background: var(--surface-secondary);
    color: var(--ink);
    border-radius: var(--r-full);
    padding: var(--space-sm) var(--space-lg);
    margin-left: var(--space-xl);
    font-weight: 700;
    transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.main-nav a.pill:hover {
    background: var(--pin-red);
    color: var(--on-accent);
}

/* ==========================================================================
   Messages
   ========================================================================== */

.messages {
    padding: var(--space-md) var(--space-xl) 0;
    margin: 0 auto;
    max-width: 1280px;
}

.message {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--r-full);
    margin-bottom: var(--space-sm);
    font-size: var(--body-sm-size);
    font-weight: 500;
    background: var(--surface-card);
    color: var(--ink);
}

.message::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 0;
    background: var(--success);
    flex: none;
}

.message-success { background: var(--success-pale); color: var(--success); }
.message-success::before { background: var(--success); }
.message-error { background: var(--color-accent-tint); color: var(--error); font-weight: 600; }
.message-error::before { background: var(--error); }

main {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-xxl) var(--space-xl) var(--space-section);
}

main.full-bleed {
    max-width: none;
    padding: 0;
}

main.full-bleed > .page-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-section) var(--space-xl);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    overflow: hidden;
    text-align: center;
}

.hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: var(--space-xxl) var(--space-xl);
}

.hero-content .btn {
    background: var(--pin-red-deep);
    color: var(--on-accent);
    border-color: var(--pin-red-deep);
}

.hero-content .btn:hover {
    background: var(--pin-red-deeper);
    border-color: var(--pin-red-deeper);
}

/* Brand strip */
.brand-strip {
    border-bottom: 1px solid var(--color-line);
    background: var(--canvas);
    padding: var(--space-xxl) var(--space-xl);
    text-align: center;
}

.brand-strip p {
    max-width: 640px;
    margin: 0 auto;
    font-size: var(--heading-lg-size);
    font-weight: 500;
    line-height: 1.5;
    color: var(--text);
}

/* ==========================================================================
   Page header
   ========================================================================== */

.page-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-line);
}

.page-header h1 {
    font-size: var(--heading-xl-size);
    letter-spacing: -1.2px;
}

.page-header p:not(.micro-label) {
    max-width: 56ch;
    color: var(--text);
    margin-top: var(--space-sm);
    margin-bottom: 0;
}

/* ==========================================================================
   Profile
   ========================================================================== */

.profile-header {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-xxl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-line);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-card);
}

.profile-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-muted);
}

.profile-header-info h1 {
    font-size: var(--heading-xl-size);
    letter-spacing: -1.2px;
    margin-bottom: var(--space-xxs);
}

.profile-bio {
    max-width: 56ch;
    color: var(--text);
    margin: var(--space-sm) 0 var(--space-lg);
}

/* ==========================================================================
   Card grid — Pinterest-style masonry
   ========================================================================== */

.card-grid {
    columns: 2;
    column-gap: var(--space-sm);
}

@media (min-width: 700px) {
    .card-grid { columns: 3; }
}

@media (min-width: 1000px) {
    .card-grid { columns: 4; }
}

@media (min-width: 1400px) {
    .card-grid { columns: 5; }
}

.card {
    display: block;
    break-inside: avoid;
    margin-bottom: var(--space-sm);
    background: var(--surface-card);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: opacity var(--duration-fast) var(--ease);
}

/* Wall layout toggle */
.wall-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.wall-toolbar .micro-label { margin: 0; }

.view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--surface-card);
    border-radius: var(--r-sm);
    padding: 2px;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: transparent;
    color: var(--color-muted);
    border: none;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.view-toggle-btn svg { width: 16px; height: 16px; }

.view-toggle-btn:hover { color: var(--ink); }

.view-toggle-btn[aria-pressed="true"] {
    background: var(--canvas);
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(14, 13, 12, 0.12);
}

.card-grid.layout-single {
    columns: 1;
    max-width: 560px;
    margin: 0 auto;
}

.card-grid.layout-single .card { margin-bottom: var(--space-lg); }

a.card:hover { opacity: 0.92; }

.card-image-wrap {
    position: relative;
    overflow: hidden;
    background: var(--surface-card);
}

.card-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

.card-image-wrap.sold-out img {
    filter: grayscale(35%);
    opacity: 0.5;
}

.card-body {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.card-title {
    font-weight: 600;
    font-size: var(--body-md-size);
    color: var(--ink);
    margin-bottom: var(--space-xxs);
    line-height: 1.35;
}

.card-body .micro-label { margin-bottom: var(--space-xs); }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--surface-dark);
    color: var(--on-dark);
    border-radius: var(--r-full);
    padding: var(--space-xxs) var(--space-md);
    font-size: var(--caption-size);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 0;
    background: currentColor;
}

.badge.sold-out { background: var(--surface-dark); color: var(--on-dark); }
.badge.accent { background: var(--pin-red); color: var(--on-accent); }

/* Empty state */
.empty-state {
    padding: var(--space-xxl) var(--space-lg);
    text-align: center;
    background: var(--surface-card);
    border-radius: var(--r-md);
    color: var(--color-muted);
}

.empty-state a { color: var(--pin-red); font-weight: 600; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-plain { max-width: 480px; }

.form-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.form-plain label {
    display: block;
    font-size: var(--caption-size);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
    margin: var(--space-xl) 0 var(--space-xs);
}

.form-plain label:first-child { margin-top: 0; }

.form-plain input[type="text"],
.form-plain input[type="email"],
.form-plain input[type="password"],
.form-plain textarea,
.form-plain input[type="file"] {
    width: 100%;
    height: 48px;
    padding: 11px 15px;
    border: 1px solid var(--muted-soft);
    background: var(--canvas);
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: var(--body-md-size);
    color: var(--ink);
    transition: border-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}

.form-plain textarea { height: auto; min-height: 120px; padding-top: var(--space-md); }

.form-plain input:focus,
.form-plain textarea:focus {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-plain .field-error {
    color: var(--error);
    font-size: var(--caption-size);
    margin-top: var(--space-xs);
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background: var(--pin-red);
    color: var(--on-accent);
    border: 1px solid var(--pin-red);
    border-radius: var(--r-md);
    height: 44px;
    padding: 0 var(--space-xl);
    font-size: var(--button-size);
    font-weight: 700;
    cursor: pointer;
    margin-top: var(--space-xl);
    transition: background var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}

.btn:hover {
    background: var(--pin-red-pressed);
    border-color: var(--pin-red-pressed);
}

.btn:active { transform: translateY(1px); }

.btn:disabled {
    background: var(--surface-secondary);
    color: var(--muted-soft);
    border-color: var(--surface-secondary);
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: var(--surface-secondary);
    color: var(--ink);
    border-color: var(--surface-secondary);
}

.btn-outline:hover {
    background: var(--surface-secondary-pressed);
    border-color: var(--surface-secondary-pressed);
}

/* ==========================================================================
   Auth panel (login / signup / logout / email screens)
   ========================================================================== */

.auth-shell {
    display: flex;
    justify-content: center;
    padding-top: var(--space-lg);
}

.auth-panel {
    width: 100%;
    max-width: 440px;
    background: var(--canvas);
    border-radius: var(--r-lg);
    padding: var(--space-xxl);
    box-shadow: var(--shadow-modal);
}

.auth-panel .page-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
}

.auth-panel .form-plain { max-width: none; }

.auth-panel .btn { width: 100%; margin-left: 0; margin-right: 0; }

.auth-switch {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-line);
    text-align: center;
}

.auth-switch a {
    color: var(--pin-red);
    font-weight: 700;
}

.auth-switch a + a { margin-left: var(--space-lg); }

/* Account hub ------------------------------------------------------------- */

.account-grid {
    display: grid;
    gap: var(--space-xl);
    max-width: 640px;
}

.account-section {
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-line);
}

.account-section:last-child { border-bottom: none; }

.account-section > .micro-label { margin-bottom: var(--space-md); }

.account-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.account-links a {
    color: var(--pin-red);
    font-weight: 600;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    border-top: 1px solid var(--color-line);
    background: var(--canvas);
    padding-top: var(--space-section);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-xl) var(--space-xxl);
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 2fr;
    gap: var(--space-xxl);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
}

.footer-logo {
    display: inline-flex;
    transition: opacity var(--duration-fast) var(--ease);
}

.footer-logo:hover { opacity: 0.72; }

.footer-logo img {
    height: 32px;
    width: auto;
    display: block;
}

.footer-tagline {
    max-width: 34ch;
    margin: 0;
    font-size: var(--body-sm-size);
    line-height: 1.6;
    color: var(--color-muted);
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--surface-card);
    color: var(--ink);
    border-radius: var(--r-full);
    transition: background var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.footer-socials a:hover {
    background: var(--pin-red);
    color: var(--on-accent);
}

.footer-socials svg {
    width: 16px;
    height: 16px;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xxl) var(--space-xl);
}

.footer-col h4 {
    margin: 0 0 var(--space-md);
    font-size: var(--caption-size);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.footer-col-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
}

.footer-col-links a {
    font-size: var(--body-sm-size);
    font-weight: 600;
    color: var(--text);
    transition: color var(--duration-fast) var(--ease);
}

.footer-col-links a:hover { color: var(--pin-red); }

.footer-bottom {
    border-top: 1px solid var(--color-line);
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.footer-bottom p {
    margin: 0;
    font-size: var(--caption-size);
    color: var(--color-muted);
}

.footer-back-to-top {
    font-size: var(--caption-size);
    font-weight: 600;
    color: var(--color-muted);
    transition: color var(--duration-fast) var(--ease);
}

.footer-back-to-top:hover { color: var(--pin-red); }

@media (max-width: 720px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-xxl);
        text-align: center;
    }

    .footer-brand { align-items: center; }

    .footer-tagline { margin: 0 auto; }

    .footer-cols {
        grid-template-columns: repeat(2, 1fr);
        text-align: center;
    }

    .footer-col-links { align-items: center; }

    .footer-bottom { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
    .footer-cols { grid-template-columns: 1fr; gap: var(--space-xl); }
}

/* ==========================================================================
   Tickets / event detail
   ========================================================================== */

.event-layout {
    display: grid;
    gap: var(--space-xxl);
}

@media (min-width: 820px) {
    .event-layout { grid-template-columns: minmax(0, 420px) 1fr; align-items: start; }
}

.event-layout .card-image-wrap {
    border-radius: var(--r-lg);
}

.event-detail-meta {
    border-bottom: 1px solid var(--color-line);
    padding: var(--space-lg) 0;
}

.capacity-track {
    height: 4px;
    background: var(--border-soft);
    border-radius: var(--r-full);
    overflow: hidden;
    margin-top: var(--space-sm);
    max-width: 240px;
}

.capacity-fill {
    height: 100%;
    background: var(--pin-red);
    border-radius: var(--r-full);
}

.ticket-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    background: var(--surface-card);
    border-radius: var(--r-md);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-sm);
}

.ticket-row .ticket-info .card-title { margin-bottom: var(--space-xxs); }

.status-dot {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--caption-size);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-dot::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 0;
    background: var(--success);
}

.status-dot.status-cancelled { color: var(--color-muted); }
.status-dot.status-cancelled::before { background: var(--muted-soft); }
.status-dot.status-confirmed { color: var(--success); }
.status-dot.status-confirmed::before { background: var(--success); }
.status-dot.status-pending { color: var(--warning); }
.status-dot.status-pending::before { background: var(--warning); }

/* ==========================================================================
   Receipt / order summary
   ========================================================================== */

.receipt-box {
    margin-top: var(--space-xl);
    border-top: 1px solid var(--color-line);
}

.receipt-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-line);
}

.receipt-row.receipt-total {
    font-weight: 700;
    font-size: 1.1em;
}

.article-cover {
    aspect-ratio: 16 / 9;
    max-height: 480px;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

@media (min-width: 700px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

.gallery-grid .card-image-wrap {
    aspect-ratio: 3 / 4;
}

.gallery-grid .card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-caption {
    padding: var(--space-xs) 0 0;
    color: var(--color-muted);
    font-size: var(--caption-size);
}

.article-body {
    max-width: 640px;
}

.article-body p {
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.result-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: var(--success);
    color: var(--on-accent);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.result-page {
    max-width: 480px;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 720px) {
    .site-header { padding: var(--space-md) var(--space-lg); }

    .nav-toggle-label {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--surface-card);
        border-radius: var(--r-sm);
        cursor: pointer;
    }

    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        content: '';
        display: block;
        width: 18px;
        height: 1.5px;
        background: var(--ink);
        position: relative;
        transition: transform var(--duration-fast) var(--ease), opacity var(--duration-fast) var(--ease);
    }

    .nav-toggle-label span::before { position: absolute; top: -6px; }
    .nav-toggle-label span::after { position: absolute; top: 6px; }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        background: var(--canvas);
        border-bottom: 1px solid var(--color-line);
        padding: var(--space-sm) var(--space-lg) var(--space-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--duration) var(--ease);
    }

    .main-nav a { margin-left: 0; margin-top: var(--space-lg); }
    .main-nav a.pill { margin-left: 0; }

    .nav-toggle:checked ~ .main-nav { max-height: 320px; }

    main { padding: var(--space-xl) var(--space-lg) var(--space-xxl); }
    main.full-bleed > .page-inner { padding: var(--space-xxl) var(--space-lg); }
    .auth-panel { padding: var(--space-xl) var(--space-lg); }
}

@media (max-width: 480px) {
    .card-grid { columns: 2; column-gap: var(--space-sm); }
    .hero-content h1 { font-size: var(--display-lg-size); }
}
