/* Fonts are loaded via <link> in App.razor <head> (preconnect + one request):
   Bricolage Grotesque (display), IBM Plex Mono (data/labels), Inter (body/UI). */

:root {
    color-scheme: dark;
    /* Dark theme — a warm wisteria-charcoal, not a blue-black void. The
       ground carries a faint wisteria undertone so the theme belongs to
       GigGeist rather than generic grey; a clear elevation ladder; softly
       tinted borders; text a touch under pure white; and a wisteria accent
       family shared with the light theme. */
    --so-bg: #17141c;
    --so-sidebar: #131019;
    --so-shell-gradient: linear-gradient(155deg, #18131f 0%, #131019 55%, #19131f 100%);
    --so-shell-glass: rgba(24, 19, 31, .88);
    --so-surface-1: #201c29;
    --so-surface-2: #292433;
    --so-surface-3: #332d3f;
    --so-surface: var(--so-surface-1);
    --so-surface-raised: var(--so-surface-2);
    --so-border: #322c3d;
    --so-border-light: #423a50;
    --so-border-strong: var(--so-border-light);
    --so-text: #efecf3;
    --so-text-primary: var(--so-text);
    --so-text-secondary: #b4acc0;
    --so-text-muted: #857c91;
    --so-wisteria: #c9a0dc;
    --so-accent: #a97ac0;
    --so-accent-hover: #d9bce7;
    --so-accent-bright: var(--so-accent-hover);
    --so-accent-soft: rgba(201, 160, 220, .2);
    /* Secondary accent — the #C9A0DC wisteria identity. It provides glints,
       gradient sheens and glows while darker derived tones carry fills. */
    --so-accent-2: #c9a0dc;
    --so-accent-2-hover: #e5ccef;
    --so-accent-2-soft: rgba(201, 160, 220, .2);
    --so-accent-gradient: linear-gradient(120deg, var(--so-accent), var(--so-accent-2));
    /* Signature GigGeist wisteria accent primary action tokens */
    --so-primary-action: #a97ac0;
    --so-primary-action-hover: #d9bce7;
    --so-primary-action-gradient: linear-gradient(135deg, #a97ac0 0%, #c9a0dc 100%);
    --so-primary-action-hover-gradient: linear-gradient(135deg, #d9bce7 0%, #e5ccef 100%);
    --so-primary-action-shadow: none;
    --so-secondary-action-gradient: none;
    --so-success: #37d08a;
    --so-warning: #edb03e;
    --so-danger: #f0616c;
    --so-focus: #d7b8ff;
    --so-link: #cfc7db;
    --so-link-hover: #ffffff;
    --so-input-bg: var(--so-surface-2);
    --so-overlay: rgba(3, 6, 12, .70);
    --so-canvas-pattern-overlay: rgba(23, 20, 28, .94);
    --so-nav-hover-bg: color-mix(in srgb, var(--so-surface-raised) 60%, transparent);
    --so-nav-active-bg: color-mix(in srgb, var(--so-wisteria) 20%, var(--so-surface-raised));
    --so-nav-active-border: color-mix(in srgb, var(--so-wisteria) 58%, var(--so-border));
    --so-nav-active-text: var(--so-accent-hover);
    --so-info: #7ba6ff;
    --so-info-soft: rgba(96, 138, 224, .17);
    --so-radius-sm: 8px;
    --so-radius-md: 12px;
    --so-radius-lg: 18px;
    --so-shadow-sm: 0 1px 2px rgba(6, 3, 10, .4), 0 4px 14px rgba(6, 3, 10, .26);
    --so-shadow-md: 0 2px 8px rgba(6, 3, 10, .4), 0 16px 40px rgba(6, 3, 10, .38);
    --so-shadow-lg: 0 8px 22px rgba(6, 3, 10, .46), 0 28px 60px rgba(6, 3, 10, .5);
    --so-space-1: .25rem; --so-space-2: .5rem; --so-space-3: .75rem; --so-space-4: 1rem;
    --so-space-5: 1.25rem; --so-space-6: 1.5rem; --so-space-8: 2rem; --so-space-10: 2.5rem;
    --so-font-body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Display — a confident grotesque with character for titles, heroes and
       empty-state headlines. Falls back to the body face so nothing shifts
       if it is slow. */
    --so-font-display: 'Bricolage Grotesque', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Mono — the "production document" voice: call times, dates, money,
       technical labels, IDs. */
    --so-font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
    --so-font-weight-regular: 400; --so-font-weight-medium: 500; --so-font-weight-semibold: 600;
    --so-font-weight-bold: 700; --so-font-weight-heavy: 800;
    --so-font-size-xs: .6875rem; --so-font-size-sm: .8125rem; --so-font-size-md: .9375rem;
    --so-font-size-lg: 1.0625rem; --so-font-size-xl: 1.25rem;
    --so-breakpoint-mobile: 480px; --so-breakpoint-tablet: 768px; --so-breakpoint-desktop: 1024px;
    --so-ease: cubic-bezier(.2, .75, .25, 1);
    --so-mobile-nav-height: 80px;
    --so-mobile-header-height: 52px;
    --so-feed-composer-height: 64px;
    --so-page-gutter: var(--so-space-4);
    --so-page-bg: var(--so-bg);
    --so-page-header-gap: var(--so-space-5);
    --so-section-heading-gap: var(--so-space-3);
    --so-section-gap: var(--so-space-6);
    --so-surface-padding-compact: var(--so-space-3);
    --so-surface-padding-standard: var(--so-space-4);
    --so-surface-padding-hero: var(--so-space-6);
}

/* Shared GigGeist temporary interaction layer. Page-specific classes may add
   layout, while this primitive owns elevation, motion and safe-area behaviour. */
.gg-sheet-backdrop {
    position: fixed;
    z-index: 1190;
    inset: 0;
    width: 100%;
    border: 0;
    background: var(--so-overlay);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: gg-backdrop-in 180ms ease-out both;
}

html.gg-sheet-open { overflow: hidden; overscroll-behavior: none; }
body.gg-sheet-open { position: fixed; width: 100%; overflow: hidden; overscroll-behavior: none; }
body.gg-sheet-open .mobile-bottom-nav { pointer-events: none; }

.gg-sheet {
    position: fixed;
    z-index: 1200;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: min(90dvh, 52rem);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 1.1rem max(1rem, env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    color: var(--so-text);
    background: var(--so-surface-raised);
    border: 1px solid color-mix(in srgb, var(--so-border-strong) 75%, transparent);
    border-width: 1px 0 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -20px 55px rgba(0, 0, 0, .42);
    animation: gg-sheet-in 220ms cubic-bezier(.2, .72, .2, 1) both;
}

.gg-sheet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.gg-sheet-header h2 { margin: .15rem 0 0; font-size: 1.2rem; }
.gg-sheet-eyebrow { color: var(--so-text-muted); font-size: .65rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.gg-sheet-close { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; color: var(--so-text-secondary); background: transparent; border: 0; border-radius: 50%; font: inherit; font-size: 1.5rem; }
.gg-sheet-footer { display: flex; justify-content: flex-end; gap: .65rem; padding-top: .85rem; border-top: 1px solid var(--so-border); }
.gg-sheet-footer .btn { min-height: 44px; }
.gg-sheet-close:focus-visible { outline: 2px solid var(--so-focus); outline-offset: 2px; }

@media (min-width: 768px) {
    /* top:0/left:0 + a vw/vh-based translate, not top:50%/left:50% +
       translate(-50%,-50%): the percentage-self-reference in translate()
       combined with a percentage top/left on a height:auto flex column
       (see .financial-edit-form) made some engines resolve the box's
       auto height to a near-zero degenerate value instead of shrink-
       wrapping content — reproduced and fixed on the member-fee editor
       sheet, which is short enough to expose it (longer sheets happened
       to look fine only because their content padded past the collapse).
       vw/vh don't depend on the element's own box, so this avoids the
       circularity entirely while still centering + shrink-wrapping. */
    .gg-sheet { top: 0; right: auto; bottom: auto; left: 0; width: min(calc(100% - 2rem), 36rem); max-height: min(86vh, 52rem); padding: 1.35rem; border-width: 1px; border-radius: var(--so-radius-lg); transform: translate(calc(50vw - 50%), calc(50vh - 50%)); animation-name: gg-dialog-in; }
    .gg-sheet--editor { width: min(calc(100% - 2rem), 43rem); }
    .gg-sheet--confirm { width: min(calc(100% - 2rem), 30rem); }
}

@keyframes gg-backdrop-in { from { opacity: 0; } }
@keyframes gg-sheet-in { from { opacity: .75; transform: translateY(20px); } }
/* Opacity-only: a `transform` set here would win the cascade over EVERY
   other rule's `transform` for the whole animation's duration and (via
   fill-mode:both) forever after — including centering transforms defined
   per-dialog-class (.gg-sheet's own, and .financial-sheet's differing
   left/bottom-based one in EventDetails.razor.css). Animating transform
   here previously baked one dialog class's centering formula into every
   dialog using this animation, breaking the others. Each class's own
   static `transform` (see their own comments for why they're written the
   way they are) now applies untouched. */
@keyframes gg-dialog-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .gg-sheet, .gg-sheet-backdrop { animation: none; }
}

/* GigGeist surface hierarchy: page -> grouped section -> exceptional interaction. */
.so-section-surface {
    padding: var(--so-surface-padding-standard);
    background: color-mix(in srgb, var(--so-surface) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--so-border) 72%, transparent);
    border-radius: var(--so-radius-md);
    box-shadow: none;
}
.so-attention-surface {
    padding: var(--so-surface-padding-standard);
    background: color-mix(in srgb, var(--so-warning) 6%, var(--so-surface));
    border: 1px solid color-mix(in srgb, var(--so-warning) 34%, var(--so-border));
    border-radius: var(--so-radius-md);
}
.so-compact-row { min-height: 48px; padding: var(--so-surface-padding-compact) 0; }
.so-divided-list > :where(article, a, button, .so-list-row) + :where(article, a, button, .so-list-row) {
    border-top: 1px solid color-mix(in srgb, var(--so-border) 68%, transparent);
}
.band-member-list.so-section-surface,
.band-lineup-list.so-section-surface { gap: 0; padding: 0 var(--so-space-3); }
.band-member-list.so-section-surface .band-member-card,
.band-lineup-list.so-section-surface article {
    padding-inline: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}
@media (max-width: 430px) {
    :root { --so-surface-padding-standard: var(--so-space-3); }
}

/* Focused mobile refinement: shared density, texture and Feed geometry. */
.main-content {
    background-image: linear-gradient(var(--so-canvas-pattern-overlay), var(--so-canvas-pattern-overlay)), url('/giggeist-pattern.svg');
}

@media (max-width: 768px) {
    .content { padding-top: .5rem; }
    .so-card, .so-card-raised, .so-card-highlight, .so-card-danger { padding: var(--so-space-4); border-color: color-mix(in srgb, var(--so-border) 72%, transparent); }
}

/* Feed is an activity stream, not a chat transcript. */
.giggeist-feed .feed-posts { align-content: start; }
.giggeist-feed > .so-page-header { flex: 0 0 auto; width: 100%; max-width: 760px; margin: 0 auto var(--so-page-header-gap); }
.giggeist-feed .feed-post {
    justify-self: stretch;
    width: 100%;
    max-width: none;
    padding: .8rem .9rem;
    background: color-mix(in srgb, var(--so-surface-raised) 82%, transparent);
    border-color: color-mix(in srgb, var(--so-border) 64%, transparent);
    border-radius: var(--so-radius-md);
}
.giggeist-feed .feed-post-mine {
    align-self: auto;
    justify-self: stretch;
    background: color-mix(in srgb, var(--so-accent) 5%, var(--so-surface-raised));
    border-color: color-mix(in srgb, var(--so-accent) 18%, var(--so-border));
}
.giggeist-feed .feed-post-mine .feed-avatar { display: grid; }
.giggeist-feed .feed-post-mine .feed-author strong { display: block; }
.giggeist-feed .feed-avatar { width: 34px; height: 34px; font-size: .66rem; }
.giggeist-feed .feed-author strong { font-size: .82rem; }
.giggeist-feed .feed-post time, .giggeist-feed .feed-reply time { font-size: .66rem; }
.giggeist-feed .feed-post > p { margin: .65rem 0 .45rem; font-size: .88rem; line-height: 1.48; }
.giggeist-feed .feed-reply-toggle { min-height: 40px; padding: .2rem 0; color: var(--so-text-muted) !important; font-size: .7rem; font-weight: 550; opacity: .82; }
.giggeist-feed .feed-post-actions summary { width: 44px; height: 44px; }
.giggeist-feed .feed-replies { gap: .55rem; margin-top: .45rem; padding-left: .75rem; }
.giggeist-feed .feed-reply p { font-size: .8rem; line-height: 1.45; }

@media (max-width: 767px) {
    .giggeist-feed {
        height: calc(100dvh - var(--so-mobile-header-height));
        margin: 0;
        padding: 0;
        overflow: hidden;
        background-image: linear-gradient(rgba(11,16,24,.7), rgba(11,16,24,.7)), url('/giggeist-feed-pattern.svg');
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .giggeist-feed > .so-page-header { padding: var(--so-space-2) var(--so-space-3) 0; margin-bottom: var(--so-space-2); }
    .giggeist-feed .feed-posts {
        padding: .65rem .55rem calc(var(--so-feed-composer-height) + var(--so-mobile-nav-height) + 1.5rem + env(safe-area-inset-bottom));
        scroll-padding-bottom: calc(var(--so-feed-composer-height) + var(--so-mobile-nav-height) + 1.5rem + env(safe-area-inset-bottom));
    }
    .giggeist-feed .feed-composer {
        position: fixed;
        z-index: 29;
        right: .5rem;
        bottom: calc(var(--so-mobile-nav-height) + env(safe-area-inset-bottom));
        left: .5rem;
        min-height: var(--so-feed-composer-height);
        margin: 0;
        padding: .45rem .5rem;
        background: color-mix(in srgb, var(--so-surface-raised) 94%, transparent);
        border-color: color-mix(in srgb, var(--so-border) 78%, transparent);
        border-radius: 13px 13px 0 0;
        box-shadow: 0 -12px 30px rgba(0,0,0,.28);
        backdrop-filter: blur(16px);
    }
    .giggeist-feed .feed-composer textarea { min-height: 44px; max-height: 92px; font-size: .86rem; }
    .giggeist-feed .feed-post { padding: .72rem .78rem; }
}

:root[data-theme="light"] {
    color-scheme: light;
    /* Soft Plum: warm-white content with a slightly more visible branded
       shell. Plum identifies actions and selection; ordinary cards stay white. */
    --so-bg: #faf7fb;
    --so-sidebar: #f3eaf5;
    --so-shell-gradient: linear-gradient(155deg, #ffffff 0%, #faf7fb 34%, #f3eaf5 72%, #eadbed 100%);
    --so-shell-glass: rgba(250, 247, 251, .92);
    --so-surface-1: #ffffff;
    --so-surface-2: #faf7fb;
    --so-surface-3: #f3eaf5;
    --so-surface-subtle: #faf7fb;
    --so-surface-raised: #ffffff;
    --so-border: #e6dce8;
    --so-border-light: #d8c9dc;
    --so-border-strong: #d8c9dc;
    --so-text: #1f1b24;
    --so-text-primary: #1f1b24;
    --so-text-secondary: #6b6470;
    --so-text-muted: #837b88;
    --so-wisteria: #c9a0dc;
    --so-accent: #8b5c8e;
    --so-accent-hover: #7a4f7e;
    --so-accent-bright: #704675;
    --so-accent-soft: #f3eaf5;
    --so-accent-2: #b789ba;
    --so-accent-2-hover: #7a4f7e;
    --so-accent-2-soft: #f7f0f8;
    --so-accent-gradient: linear-gradient(120deg, var(--so-accent), var(--so-accent-2));
    /* Primary actions were an indigo/violet family (#9353d3, #8b5cf6, #7c3aed)
       while every other accent in the light theme — links, active nav, badges,
       the hero call-to-action — is the wisteria mauve above. Two different
       purples on the same screen read as a mistake, so the buttons now sit in
       the brand family. #7a4f7e on white text is 6.6:1, comfortably AA. */
    --so-primary-action: #7a4f7e;
    --so-primary-action-hover: #684369;
    --so-primary-action-gradient: linear-gradient(135deg, #9a68a0 0%, #7a4f7e 55%, #684369 100%);
    --so-primary-action-hover-gradient: linear-gradient(135deg, #8a5a90 0%, #684369 55%, #57384f 100%);
    --so-primary-action-shadow: 0 4px 14px rgba(122, 79, 126, .28), inset 0 1px 0 rgba(255, 255, 255, .22);
    --so-secondary-action-gradient: linear-gradient(135deg, #ffffff 0%, color-mix(in srgb, var(--so-wisteria) 13%, #faf7fb) 100%);
    --so-success: #0f7550;
    --so-success-soft: #e2f2ea;
    --so-warning: #8a5a10;
    --so-warning-soft: #f8eedb;
    --so-danger: #bf3a4c;
    --so-danger-soft: #f8e7ea;
    --so-info: #345fca;
    --so-info-soft: #e6ecf8;
    --so-input-bg: #ffffff;
    --so-focus: #8a5a9d;
    --so-link: #5f5662;
    --so-link-hover: #272229;
    --so-overlay: rgba(39, 24, 41, .34);
    --so-canvas-pattern-overlay: rgba(250, 247, 251, .965);
    --so-nav-hover-bg: rgba(255, 255, 255, .62);
    --so-nav-active-bg: rgba(139, 92, 142, .09);
    --so-nav-active-border: rgba(139, 92, 142, .28);
    --so-nav-active-text: #704675;
    --so-shadow-sm: 0 1px 2px rgba(52, 38, 55, .04), 0 1px 3px rgba(52, 38, 55, .07);
    --so-shadow-md: 0 2px 6px rgba(52, 38, 55, .05), 0 10px 24px rgba(52, 38, 55, .08);
    --so-shadow-lg: 0 6px 16px rgba(52, 38, 55, .07), 0 22px 48px rgba(52, 38, 55, .12);
}

/* Selective colour system: wisteria is reserved for brand and interaction state. */
html body a:not(:where(.btn, [class*="-primary"], .home-hero-action, .home-secondary-card, .home-next-gig, .home-pinned-post, .next-step, .lineup-preset, .event-back-link, .home-hero-action, [class*="event-status"])) { color: var(--so-link); }
html body a:not(:where(.btn, [class*="-primary"], .home-hero-action, .home-secondary-card, .home-next-gig, .home-pinned-post, .next-step, .lineup-preset, .event-back-link, [class*="event-status"])):hover,
html body a:not(:where(.btn, [class*="-primary"], .home-hero-action, .home-secondary-card, .home-next-gig, .home-pinned-post, .next-step, .lineup-preset, .event-back-link, [class*="event-status"])):focus-visible { color: var(--so-link-hover); }

html body .alert-info,
html body .so-alert-info { color: var(--so-info); background: var(--so-info-soft); border-color: color-mix(in srgb, var(--so-info) 42%, var(--so-border)); }
html body .so-status-info { color: var(--so-info); background: var(--so-info-soft); }
html body .event-status-waiting,
html body .event-status.is-pending,
html body .lineup-state-badge.invited { color: var(--so-warning) !important; background: color-mix(in srgb, var(--so-warning) 12%, transparent) !important; }
html body .event-status-planning { color: var(--so-info) !important; background: var(--so-info-soft) !important; }
html body .event-status-draft { color: var(--so-text-secondary) !important; background: var(--so-surface-3) !important; }
html body .nav-attention-badge,
html body .mobile-bottom-icon strong,
html body .mobile-notification-bell strong,
html body .notification-bell > strong { color: #181104 !important; background: var(--so-warning) !important; }

html body .account-access-eyebrow,
html body .onboarding-eyebrow,
html body .login-eyebrow,
html body .dashboard-eyebrow,
html body .focus-label,
html body .clone-heading p,
html body .clone-source span,
html body .gig-kicker,
html body .template-eyebrow,
html body .members-eyebrow,
html body .bands-eyebrow,
html body .notifications-heading p,
html body .venue-eyebrow,
html body .venue-card-top,
html body .venue-editor header p,
html body .invite-eyebrow,
html body .invite-small-label { color: var(--so-text-muted) !important; }
html body .event-eyebrow,
html body .next-action-label { color: var(--so-text-muted) !important; }

html body .event-card:hover,
html body .member-card:hover,
html body .venue-card:hover,
html body .venue-card:focus-visible,
html body .song-card:hover,
html body .song-card:focus-visible,
html body .band-card:hover,
html body .band-card:focus-within,
html body .notification-item:hover,
html body .notification-item:focus-within { border-color: var(--so-border-light) !important; }

html body .feed-avatar,
html body .conversation-avatar,
html body .band-avatar,
html body .bands-empty-mark,
html body .account-access-icon { color: var(--so-text-secondary) !important; background: var(--so-surface-3) !important; border-color: var(--so-border-light) !important; }
html body .member-avatar { color: var(--so-text) !important; background: var(--so-surface-3) !important; border-color: var(--so-border-light) !important; }
html body .band-role-owner { color: var(--so-text-secondary) !important; background: var(--so-surface-3) !important; border-color: var(--so-border) !important; }
/* A pinned post is emphasis, not information, and it carries a mauve PINNED
   chip — sharing the blue `--so-info` treatment with unread notifications made
   the card read as a different colour family from its own badge. Unread
   notifications keep the informational blue. */
html body .feed-post-pinned { background: color-mix(in srgb, var(--so-accent) 7%, var(--so-surface)) !important; border-color: color-mix(in srgb, var(--so-accent) 34%, var(--so-border)) !important; }
html body .notification-item.unread { background: color-mix(in srgb, var(--so-info) 6%, var(--so-surface)) !important; border-color: color-mix(in srgb, var(--so-info) 28%, var(--so-border)) !important; }
html body .notification-item.unread .notification-dot { background: var(--so-info) !important; border-color: #9dc0ff !important; }
html body .notification-item.unread .notification-icon { color: var(--so-info) !important; }
html body .profile-completion-prompt,
html body .onboarding-match { background: var(--so-surface-raised) !important; border-color: var(--so-border-light) !important; }
html body .profile-completion-prompt b { color: var(--so-link) !important; }
html body .setlist-card { border-color: var(--so-border-light) !important; }
html body .status-draft { color: var(--so-text-secondary) !important; background: var(--so-surface-3) !important; }
html body .event-summary-card { background: var(--so-surface) !important; border-color: var(--so-border) !important; }
html body .attention-row:hover { color: inherit; background: var(--so-surface-raised) !important; border-color: var(--so-border-light) !important; }
html body .attention-action,
html body .attention-inline-actions button,
html body .owner-member-gigs-list b,
html body .member-card-header > div > span,
html body .member-action:not(.danger),
html body .member-contact a:hover,
html body .member-contact a:focus-visible { color: var(--so-link) !important; }
html body .member-action:not(.danger):hover,
html body .member-action:not(.danger):focus-visible { color: var(--so-link-hover) !important; background: var(--so-surface-3) !important; }
html body .event-chat-link:not(.calendar-primary),
html body .gig-chat-link,
html body .gig-calendar-link.secondary,
html body .gig-map-link,
html body .calendar-file-link,
html body .member-chat-link,
html body .member-row-actions a,
html body .band-card-link,
html body .notification-action,
html body .feed-message-link,
html body .feed-reply-toggle { color: var(--so-link) !important; }
html body .event-action-menu > div > a { color: var(--so-text) !important; }
html body .event-action-menu > div > a:hover,
html body .event-action-menu > div > a:focus-visible { color: var(--so-text) !important; }
html body .btn-primary:hover,
html body .so-btn-primary:hover,
html body .landing-primary:hover,
html body .band-action-primary:hover,
html body .calendar-primary:hover {
    color: #fff !important;
    background-color: var(--so-primary-action-hover) !important;
    background-image: var(--so-primary-action-hover-gradient) !important;
    border-color: var(--so-primary-action-hover) !important;
}

:root[data-theme="light"] body,
:root[data-theme="light"] .main-content { background: var(--so-bg); color: var(--so-text); }
:root[data-theme="light"] .sidebar,
:root[data-theme="light"] .nav-scrollable { background: var(--so-shell-gradient); border-color: var(--so-border); }
:root[data-theme="light"] .topbar,
:root[data-theme="light"] .mobile-nav-shell .navbar,
:root[data-theme="light"] .mobile-bottom-nav { border-color: var(--so-border); }

:root[data-theme="light"] .so-card,
:root[data-theme="light"] .so-card-raised,
:root[data-theme="light"] .event-card,
:root[data-theme="light"] .member-card,
:root[data-theme="light"] .venue-card,
:root[data-theme="light"] .song-card,
:root[data-theme="light"] .notification-item,
:root[data-theme="light"] .feed-post,
:root[data-theme="light"] .feed-composer,
:root[data-theme="light"] .band-feed,
:root[data-theme="light"] .event-summary-card,
:root[data-theme="light"] .lineup-slot-card,
:root[data-theme="light"] .lineup-progress-panel,
:root[data-theme="light"] .account-access-card { color: var(--so-text); background: var(--so-surface); border-color: var(--so-border); }
:root[data-theme="light"] input,
:root[data-theme="light"] textarea,
:root[data-theme="light"] select,
:root[data-theme="light"] .so-input,
:root[data-theme="light"] .so-select,
:root[data-theme="light"] .so-textarea { color: var(--so-text); background: var(--so-surface-2); border-color: var(--so-border-light); }
:root[data-theme="light"] .feed-composer textarea,
:root[data-theme="light"] .feed-composer input[type="text"] { background: var(--so-surface-2); }
:root[data-theme="light"] .feed-composer { background: var(--so-surface); border: 1px solid var(--so-border); box-shadow: var(--so-shadow-sm); }
:root[data-theme="light"] .feed-composer textarea,
:root[data-theme="light"] .feed-composer input[type="text"],
:root[data-theme="light"] .feed-composer textarea:focus,
:root[data-theme="light"] .feed-composer input[type="text"]:focus { display: block; width: 100%; min-height: 44px; color: var(--so-text); background: var(--so-input-bg); border: 1px solid var(--so-border-light); }
:root[data-theme="light"] .feed-composer textarea::placeholder,
:root[data-theme="light"] .feed-composer input[type="text"]::placeholder { color: var(--so-text-muted); opacity: 1; }
:root[data-theme="light"] .feed-composer-actions { border-color: var(--so-border); }
:root[data-theme="light"] .feed-photo-action { color: var(--so-text-secondary); }
:root[data-theme="light"] .feed-post-action:not(:disabled) { color: #ffffff; background: var(--so-accent); }
:root[data-theme="light"] .feed-post-action:disabled { color: var(--so-text-muted); background: var(--so-surface-3); }
:root[data-theme="light"] .account-popover,
:root[data-theme="light"] .mobile-account-popover,
:root[data-theme="light"] .band-switcher-popover,
:root[data-theme="light"] .mobile-band-switcher-popover { color: var(--so-text); background: var(--so-surface); border-color: var(--so-border); box-shadow: var(--so-shadow-lg); }

@media (max-width: 768px) {
    body:has(.mobile-band-switcher-popover) { overflow: hidden; }
}
:root[data-theme="light"] .account-menu-link,
:root[data-theme="light"] .mobile-account-popover a,
:root[data-theme="light"] .mobile-account-popover button { color: var(--so-text-secondary); }
:root[data-theme="light"] .account-menu-link:hover,
:root[data-theme="light"] .mobile-account-popover a:hover,
:root[data-theme="light"] .mobile-account-popover button:hover { color: var(--so-text); background: var(--so-surface-3); }
:root[data-theme="light"] .topbar-tagline,
:root[data-theme="light"] .feed-header p,
:root[data-theme="light"] .feed-post time,
:root[data-theme="light"] .feed-reply time { color: var(--so-text-muted); }
/* .band-hero intentionally omitted — the poster/hero stays dark artwork in both themes. */
:root[data-theme="light"] .gig-schedule,
:root[data-theme="light"] .gig-brief-header,
:root[data-theme="light"] .logistics-grid,
:root[data-theme="light"] .financial-summary,
:root[data-theme="light"] .financial-card { background: var(--so-surface); border-color: var(--so-border); }

html, body {
    font-family: var(--so-font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Stage 3 shared content surfaces */
.so-card, .so-card-raised, .so-card-highlight, .so-card-danger {
    color: var(--so-text);
    border: 1px solid var(--so-border);
    border-radius: var(--so-radius-md);
    padding: var(--so-space-5);
}
.so-card { background: var(--so-surface); }
.so-card-raised { background: var(--so-surface-raised); box-shadow: var(--so-shadow-sm); }
.so-card-highlight { background: var(--so-surface-raised); border-color: var(--so-border-light); }
.so-card-danger { background: color-mix(in srgb, var(--so-danger) 9%, var(--so-surface)); border-color: color-mix(in srgb, var(--so-danger) 45%, var(--so-border)); }
.home-next-gig, .member-card, .venue-card, .notification-item { background: var(--so-surface); border-color: var(--so-border); border-radius: var(--so-radius-md); }
.home-secondary-card, .home-pinned-post { border-color: var(--so-border); border-radius: var(--so-radius-md); }
.event-summary-card { border-color: var(--so-border); border-radius: var(--so-radius-lg); }
.lineup-progress-panel, .lineup-slot-card { border-color: var(--so-border); border-radius: var(--so-radius-md); }
.venue-empty, .repertoire-empty, .notification-empty, .empty-section { border-color: var(--so-border); border-radius: var(--so-radius-md); background: var(--so-surface); }
.so-card > :first-child, .so-card-raised > :first-child, .so-card-highlight > :first-child, .so-card-danger > :first-child { margin-top: 0; }
.so-card > :last-child, .so-card-raised > :last-child, .so-card-highlight > :last-child, .so-card-danger > :last-child { margin-bottom: 0; }
.so-stack { display: grid; gap: var(--so-space-4); }
.so-section-heading { margin-bottom: var(--so-space-4); }
@media (max-width: 480px) {
    .so-card, .so-card-raised, .so-card-highlight, .so-card-danger { padding: var(--so-space-4); }
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    color-scheme: dark;
}

html,
body {
    background: var(--so-bg);
    color: var(--so-text);
}

body {
    min-height: 100vh;
}

main,
.content {
    background: var(--so-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--so-text);
}

p,
label,
small {
    color: var(--so-text-secondary);
}

a {
    color: var(--so-accent-hover);
}

    a:hover {
        color: var(--so-accent-bright);
    }

.form-control,
.form-select {
    background: var(--so-surface-2);
    border: 1px solid var(--so-border-light);
    color: var(--so-text);
}

.form-control::placeholder { color: var(--so-text-muted); opacity: 1; }

    .form-control:focus,
    .form-select:focus {
        background: var(--so-surface-3);
        border-color: var(--so-accent);
        color: var(--so-text);
        box-shadow: 0 0 0 3px var(--so-accent-soft);
    }

.list-group-item {
    background: #171a22;
    border-color: #2a2f3a;
    color: var(--so-text);
}

.alert-secondary {
    background: #1d2029;
    border-color: #303542;
    color: #d7dae1;
}

.alert-info {
    background: #172535;
    border-color: #234866;
    color: var(--so-info);
}

.alert-success {
    background: #152b24;
    border-color: #26684f;
    color: #d1f3e4;
}

.alert-primary {
    background: var(--so-info-soft);
    border-color: color-mix(in srgb, var(--so-info) 42%, var(--so-border));
    color: var(--so-info);
}

.btn-outline-secondary {
    border-color: #5d6472;
    color: #d7dae1;
}

    .btn-outline-secondary:hover {
        background: #303542;
        border-color: #6e7687;
        color: white;
    }

hr {
    border-color: #303542;
    opacity: 1;
}

h1,
h2,
h3 {
    font-family: var(--so-font-display);
    letter-spacing: -0.02em;
}
:root[data-theme="light"] .topbar-tagline,
:root[data-theme="light"] .feed-header p,
:root[data-theme="light"] .feed-post time,
:root[data-theme="light"] .feed-reply time { color: var(--so-text-muted); }
/* .band-hero intentionally omitted — the poster/hero stays dark artwork in both themes. */
:root[data-theme="light"] .gig-schedule,
:root[data-theme="light"] .gig-brief-header,
:root[data-theme="light"] .logistics-grid,
:root[data-theme="light"] .financial-summary,
:root[data-theme="light"] .financial-card { background: var(--so-surface); border-color: var(--so-border); }

html, body {
    font-family: var(--so-font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Stage 3 shared content surfaces */
.so-card, .so-card-raised, .so-card-highlight, .so-card-danger {
    color: var(--so-text);
    border: 1px solid var(--so-border);
    border-radius: var(--so-radius-md);
    padding: var(--so-space-5);
}
.so-card { background: var(--so-surface); }
.so-card-raised { background: var(--so-surface-raised); box-shadow: var(--so-shadow-sm); }
.so-card-highlight { background: var(--so-surface-raised); border-color: var(--so-border-light); }
.so-card-danger { background: color-mix(in srgb, var(--so-danger) 9%, var(--so-surface)); border-color: color-mix(in srgb, var(--so-danger) 45%, var(--so-border)); }
.home-next-gig, .member-card, .venue-card, .notification-item { background: var(--so-surface); border-color: var(--so-border); border-radius: var(--so-radius-md); }
.home-secondary-card, .home-pinned-post { border-color: var(--so-border); border-radius: var(--so-radius-md); }
.event-summary-card { border-color: var(--so-border); border-radius: var(--so-radius-lg); }
.lineup-progress-panel, .lineup-slot-card { border-color: var(--so-border); border-radius: var(--so-radius-md); }
.venue-empty, .repertoire-empty, .notification-empty, .empty-section { border-color: var(--so-border); border-radius: var(--so-radius-md); background: var(--so-surface); }
.so-card > :first-child, .so-card-raised > :first-child, .so-card-highlight > :first-child, .so-card-danger > :first-child { margin-top: 0; }
.so-card > :last-child, .so-card-raised > :last-child, .so-card-highlight > :last-child, .so-card-danger > :last-child { margin-bottom: 0; }
.so-stack { display: grid; gap: var(--so-space-4); }
.so-section-heading { margin-bottom: var(--so-space-4); }
@media (max-width: 480px) {
    .so-card, .so-card-raised, .so-card-highlight, .so-card-danger { padding: var(--so-space-4); }
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMS25Ljc0NzVjMjY3Ljg2IDY5LjczMDkgMjY3Ljg3OSA2OS41ODc3IDI2Ny44NzkgNjkuMzE3OSAyNjcuODc5IDY3LjExODIgMjY2LjQ0OCA2Ni4wMTgzIDI2My41ODYgNjYuMDE4M1pNMjYzLjU3NiA4Ni4wNTQ3QzI2MS4wNDkgODYuMDU0NyAyNTkuNzg2IDg3LjMwMDUgMjU5Ljc4NiA4OS43OTIxIDI1OS43ODYgOTIuMjgzNyAyNjEuMDQ5IDkzLjUyOTUgMjYzLjU3NiA5My41Mjk1IDI2Ni4xMTYgOTMuNTI5NSAyNjcuMzg3IDkyLjI4MzcgMjY3LjM4NyA4OS43OTIxIDI2Ny4zODcgODcuMzAwNSAyNjYuMTE2IDg2LjA1NDcgMjYzLjU3NiA4Ni4wNTQ3WiIgZmlsbD0iIkZGRTUwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9nPjwvc3ZnPg==) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    color-scheme: dark;
}

html,
body {
    background: var(--so-bg);
    color: var(--so-text);
}

body {
    min-height: 100vh;
}

main,
.content {
    background: var(--so-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--so-text);
}

p,
label,
small {
    color: var(--so-text-secondary);
}

a {
    color: var(--so-accent-hover);
}

    a:hover {
        color: var(--so-accent-bright);
    }

.form-control,
.form-select {
    background: var(--so-surface-2);
    border: 1px solid var(--so-border-light);
    color: var(--so-text);
}

.form-control::placeholder { color: var(--so-text-muted); opacity: 1; }

    .form-control:focus,
    .form-select:focus {
        background: var(--so-surface-3);
        border-color: var(--so-accent);
        color: var(--so-text);
        box-shadow: 0 0 0 3px var(--so-accent-soft);
    }

.list-group-item {
    background: #171a22;
    border-color: #2a2f3a;
    color: var(--so-text);
}

.alert-secondary {
    background: #1d2029;
    border-color: #303542;
    color: #d7dae1;
}

.alert-info {
    background: #172535;
    border-color: #234866;
    color: var(--so-info);
}

.alert-success {
    background: #152b24;
    border-color: #26684f;
    color: #d1f3e4;
}

.alert-primary {
    background: var(--so-info-soft);
    border-color: color-mix(in srgb, var(--so-info) 42%, var(--so-border));
    color: var(--so-info);
}

.btn-outline-secondary {
    border-color: #5d6472;
    color: #d7dae1;
}

    .btn-outline-secondary:hover {
        background: #303542;
        border-color: #6e7687;
        color: white;
    }

hr {
    border-color: #303542;
    opacity: 1;
}

h1,
h2,
h3 {
    font-family: var(--so-font-display);
    letter-spacing: -0.02em;
}

h4,
h5,
h6 {
    font-family: var(--so-font-body);
    letter-spacing: -0.015em;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    text-align: center;
    box-sizing: border-box;
    line-height: 1.2;
    gap: 0.45rem;
    min-height: 44px;
    padding: .55rem .95rem;
    font-weight: 700;
    border-radius: .65rem;
    transition: transform 140ms var(--so-ease), box-shadow 180ms var(--so-ease), background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn:hover { opacity: 0.9; }
.btn:active { opacity: 0.85; transform: scale(.98); }

/* Pixel-perfect vertical centering for button icons, svgs, and text arrows (→) */
.btn > *,
.so-btn > *,
.lu-btn > * {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.btn-primary,
.so-btn-primary {
    min-height: 44px;
    color: #ffffff !important;
    background-color: var(--so-primary-action) !important;
    background-image: var(--so-primary-action-gradient) !important;
    border-color: var(--so-primary-action) !important;
    border-radius: var(--so-radius-control, 10px);
    box-shadow: var(--so-primary-action-shadow) !important;
}
.btn-primary:hover,
.so-btn-primary:hover {
    background: transparent;
}

.btn-outline-primary:hover {
    color: var(--so-accent-hover);
    border-color: var(--so-accent);
    background: var(--so-accent-soft);
}

/* .btn-link: a text button, not a browser-blue link. */
.btn-link,
.btn.btn-link {
    color: var(--so-accent-hover);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    text-decoration: none;
}
.btn-link:hover,
.btn.btn-link:hover { color: var(--so-accent-bright); text-decoration: underline; }

.btn-outline-secondary,
.btn-secondary {
    color: var(--so-text-secondary);
    border: 1px solid var(--so-border);
    background: var(--so-surface-2);
    box-shadow: none;
}
.btn-secondary:hover {
    color: var(--so-text);
    background: var(--so-surface-3);
    border-color: var(--so-border-light);
}

.btn-danger, .btn-outline-danger:hover {
    color: #fff;
    border-color: var(--so-danger);
    background: var(--so-danger);
}

.btn-outline-danger {
    color: var(--so-danger);
    border-color: rgba(240, 100, 100, .5);
    background: transparent;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--so-focus);
    outline-offset: 3px;
    box-shadow: none;
}

.btn:disabled, button:disabled {
    opacity: .48;
    cursor: not-allowed;
    transform: none;
}

.alert-danger { color: #ffd2d2; background: rgba(240,100,100,.11); border-color: rgba(240,100,100,.32); }
.alert-success { color: #c8f8dd; background: rgba(56,212,135,.1); border-color: rgba(56,212,135,.3); }
.alert-info { color: #ded7ff; background: var(--so-accent-soft); border-color: rgba(167,139,250,.28); }

    .btn-primary:hover {
        background: var(--so-accent-bright);
        border-color: var(--so-accent-bright);
        box-shadow: 0 8px 22px rgba(139, 92, 246, .24);
    }

.form-control,
.form-select {
    min-height: 44px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

/* Shared StageOps control primitives. Page-specific styles may extend these. */
.so-field { display: grid; gap: var(--so-space-2); }
.so-label { color: var(--so-text-secondary); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-semibold); }
.so-help { color: var(--so-text-muted); font-size: var(--so-font-size-sm); line-height: 1.45; }
.so-error { display: block; color: var(--so-danger); font-size: var(--so-font-size-sm); line-height: 1.4; }
.so-input, .so-select, .so-textarea { min-height: 44px; color: var(--so-text); background: var(--so-surface-2); border: 1px solid var(--so-border); border-radius: var(--so-radius-sm); }
.so-input, .so-select { padding: var(--so-space-2) var(--so-space-3); }
.so-textarea { width: 100%; min-height: 96px; padding: var(--so-space-3); resize: vertical; }
.so-input:focus-visible, .so-select:focus-visible, .so-textarea:focus-visible { outline: 3px solid var(--so-focus); outline-offset: 2px; border-color: var(--so-accent); }
.so-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--so-space-4); }
.so-phone-field { display: flex; flex-wrap: wrap; gap: var(--so-space-2); }
.so-phone-field .so-phone-code { flex: 1 1 9rem; min-width: 7rem; }
.so-phone-field .so-phone-local { flex: 2 1 9rem; min-width: 6rem; }
.so-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--so-space-2); min-height: 44px; padding: var(--so-space-2) var(--so-space-4); border: 1px solid transparent; border-radius: var(--so-radius-sm); font: inherit; font-weight: var(--so-font-weight-bold); text-decoration: none; cursor: pointer; }
.so-btn-primary { color: #fff; background-color: var(--so-primary-action); background-image: var(--so-primary-action-gradient); border-color: var(--so-primary-action); box-shadow: var(--so-primary-action-shadow); }
.so-btn-secondary { color: var(--so-text); background: var(--so-surface-3); border-color: var(--so-border-light); }
.so-btn-outline { color: var(--so-link); background: transparent; border-color: var(--so-border-light); }
.so-btn-danger { color: #fff; background: var(--so-danger); }
.so-btn-inline { min-height: 36px; padding: var(--so-space-1) var(--so-space-2); color: var(--so-link); background: transparent; border-color: transparent; }
.so-btn:hover { filter: brightness(1.08); }
.so-btn:focus-visible { outline: 3px solid var(--so-focus); outline-offset: 3px; }
.so-btn:disabled { opacity: .48; cursor: not-allowed; }
.so-alert { display: flex; gap: var(--so-space-3); padding: var(--so-space-3) var(--so-space-4); border: 1px solid var(--so-border); border-radius: var(--so-radius-md); line-height: 1.45; }
.so-alert-info { color: var(--so-text-secondary); background: var(--so-accent-soft); border-color: var(--so-accent); }
.so-alert-success { color: #c8f8dd; background: rgba(56,212,135,.1); border-color: var(--so-success); }
.so-alert-warning { color: #ffe8b0; background: rgba(244,185,66,.1); border-color: var(--so-warning); }
.so-alert-danger { color: #ffd2d2; background: rgba(240,100,100,.1); border-color: var(--so-danger); }
.so-status { display: inline-flex; align-items: center; min-height: 28px; padding: var(--so-space-1) var(--so-space-2); border: 1px solid currentColor; border-radius: 999px; font-size: .75rem; font-weight: var(--so-font-weight-bold); line-height: 1; }
.so-status-neutral, .so-status-muted { color: var(--so-text-muted); background: rgba(135,145,161,.12); }
.so-status-info { color: var(--so-accent-hover); background: var(--so-accent-soft); }
.so-status-warning { color: var(--so-warning); background: rgba(244,185,66,.12); }
.so-status-success { color: var(--so-success); background: rgba(56,212,135,.12); }
.so-status-danger { color: var(--so-danger); background: rgba(240,100,100,.12); }

/* Stage 5 semantic mappings. Feature selectors remain intact for DOM/test compatibility. */
.event-status-badge, .event-status, .lineup-state-badge, .payment-badge, .event-status-badge[class*="event-status-"] {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: var(--so-space-1) var(--so-space-2);
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: var(--so-font-weight-bold);
    line-height: 1.1;
}
.event-status-draft, .event-status.is-draft, .lineup-state-badge.prepared { color: var(--so-text-muted); background: rgba(135,145,161,.12); }
.event-status-waiting, .event-status-planning, .event-status.is-pending, .lineup-state-badge.invited { color: var(--so-accent-hover); background: var(--so-accent-soft); }
.event-status-confirmed, .event-status-ready, .event-status-completed, .lineup-state-badge.accepted, .payment-badge.paid { color: var(--so-success); background: rgba(56,212,135,.12); }
.lineup-state-badge.maybe, .payment-badge.awaiting { color: var(--so-warning); background: rgba(244,185,66,.12); }
.event-status-cancelled, .lineup-state-badge.replacement, .lineup-state-badge.declined { color: var(--so-danger); background: rgba(240,100,100,.12); }
.attention-warning, .attention-centre .attention-warning { border-color: color-mix(in srgb, var(--so-warning) 45%, var(--so-border)); }
.attention-danger, .needs-attention-card.attention-danger { border-color: color-mix(in srgb, var(--so-danger) 55%, var(--so-border)); }
.nav-attention-badge { color: #fff; background: var(--so-accent); }

@media (max-width: 480px) { .so-field-row { grid-template-columns: 1fr; } .so-btn { width: 100%; } }

::selection { color: #fff; background: rgba(139, 92, 246, .45); }

.stageops-lockup { display: inline-flex; flex-direction: column; align-items: flex-start; color: var(--so-text); text-decoration: none; }
.stageops-lockup:hover { color: #fff; }
.stageops-lockup-art { display: block; line-height: 0; }
.stageops-lockup .brand-logo { display: block; width: auto; height: 2.25rem; max-width: 100%; }
.stageops-lockup .brand-logo-light-surface { display: none; }
:root[data-theme="light"] .stageops-lockup .brand-logo-light-surface { display: block; }
:root[data-theme="light"] .stageops-lockup .brand-logo-dark-surface { display: none; }
.stageops-lockup > small { margin-top: .45rem; color: var(--so-text-secondary); font-size: .78rem; font-weight: 650; letter-spacing: .025em; }
.stageops-lockup strong { color: #fff; font-size: 1.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }

.account-access-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; background: var(--so-bg); }
.account-access-shell.in-app { min-height: 70vh; }
/* These pages (profile, account, privacy, delete account) reuse the sign-in
   card inside the app shell. The shell already shows the brand in the sidebar,
   so a second lockup halfway down the page reads as a stray sign-in screen —
   and the 29rem sign-in width leaves an in-app settings page as a narrow strip
   floating in white space. */
.account-access-shell.in-app > .account-access-card > .stageops-lockup { display: none; }
.account-access-shell.in-app > .account-access-card { width: min(100%, 46rem); }
.account-access-card { width: min(100%, 29rem); padding: 2rem; border: 1px solid var(--so-border); border-radius: var(--so-radius-lg); background: var(--so-surface); color: var(--so-text); box-shadow: var(--so-shadow-md); }
.account-access-card > .stageops-lockup { margin-bottom: 1.5rem; }
.stageops-lockup.landing-hero-brand .brand-logo { height: clamp(3.25rem, 7vw, 5.25rem); }
.stageops-lockup.invite-brand { display: inline-flex; margin-bottom: var(--so-space-5); }
@media (max-width: 768px) { .stageops-lockup .brand-logo { height: 2rem; } .stageops-lockup.landing-hero-brand .brand-logo { height: clamp(2.8rem, 13vw, 3.75rem); } }
.account-access-card h1 { margin: 0 0 .65rem; font-size: clamp(1.9rem, 7vw, 2.55rem); font-weight: 800; }
.account-access-eyebrow { margin: 0 0 .45rem; color: var(--so-accent-bright); font-size: .6875rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.account-access-copy { color: var(--so-text-secondary); margin-bottom: 1.4rem; line-height: 1.55; }
.account-access-icon { width: 3rem; height: 3rem; display: grid; place-items: center; margin-bottom: 1rem; border-radius: 50%; background: var(--so-accent-soft); color: var(--so-accent-bright); font-size: 1.25rem; }
.account-access-icon.success { background: rgba(56,212,135,.12); color: var(--so-success); }
.account-access-field, .account-access-card .field-group { margin-bottom: 1rem; }
.account-access-field label, .account-access-card .field-group label { display: block; margin-bottom: .4rem; color: var(--so-text-secondary); font-size: .8125rem; font-weight: 600; }
.account-access-card .form-control, .account-access-card .form-select { color: var(--so-text); background: var(--so-surface-2); border: 1px solid var(--so-border-light); }
.account-access-card .btn-primary { width: 100%; min-height: 46px; margin-top: .5rem; }
.account-access-link, .login-link { display: block; margin-top: 1.25rem; color: var(--so-text-secondary); text-align: center; text-decoration: none; }
.account-access-link:hover, .login-link:hover { color: var(--so-accent-bright); }
.account-access-button { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.account-divider { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0 .9rem; color: var(--so-text-muted); font-size: .75rem; }
.account-divider::before, .account-divider::after { content: ""; flex: 1; height: 1px; background: var(--so-border); }
.create-account-link { display: flex; align-items: center; justify-content: center; min-height: 46px; color: var(--so-text); background: var(--so-surface-raised); border: 1px solid var(--so-border-strong); border-radius: var(--so-radius-sm); font-size: .8125rem; font-weight: 700; text-decoration: none; }
.create-account-link:hover { color: var(--so-accent-bright); border-color: rgba(167,139,250,.4); }
.google-signin-form { margin: 1.15rem 0 0; }
.google-signin-button { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: .75rem; padding: .7rem 1.1rem; border: 1px solid #d9dee7; border-radius: .75rem; background: #fff; color: #172033; font: inherit; font-size: .875rem; font-weight: 750; cursor: pointer; box-shadow: 0 5px 16px rgba(0,0,0,.18); transition: transform 140ms var(--so-ease), box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease; }
.google-signin-button:hover { background: #f8faff; border-color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.24); transform: translateY(-1px); }
.google-signin-button:active { transform: translateY(0); }
.google-signin-button:focus-visible { outline: 3px solid var(--so-focus); outline-offset: 3px; }
.google-mark { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; }
.google-mark svg { display: block; width: 100%; height: 100%; }

.onboarding-shell { width: min(100%, 760px); margin: 0 auto; padding: 1.25rem; background: var(--so-bg); }
.onboarding-header { margin-bottom: 1.5rem; }
.onboarding-header .stageops-lockup { margin-bottom: 2rem; }
.onboarding-header p { margin: .55rem 0 0; color: var(--so-text-secondary); }
.onboarding-eyebrow { margin: 0 0 .45rem !important; color: var(--so-accent-bright) !important; font-size: .6875rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.onboarding-header h1 { margin: 0; font-size: clamp(2.2rem, 7vw, 3.5rem); font-weight: 800; letter-spacing: -.05em; }
.onboarding-card { padding: 1.4rem; border: 1px solid var(--so-border); border-radius: var(--so-radius-lg); background: var(--so-surface); box-shadow: var(--so-shadow-sm); }
.onboarding-card .field-group { margin-bottom: 1rem; }
.onboarding-card .field-group label { display: block; margin-bottom: .4rem; color: var(--so-text-secondary); font-size: .8125rem; font-weight: 600; }
.onboarding-match { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: 1rem; border: 1px solid rgba(167,139,250,.25); border-radius: var(--so-radius-md); background: var(--so-accent-soft); }
.onboarding-match p { margin: .2rem 0 0; color: var(--so-text-secondary); }

.system-state { width: min(100% - 2rem, 680px); margin: clamp(2rem, 10vh, 7rem) auto; padding: clamp(1.5rem, 5vw, 2.5rem); border: 1px solid var(--so-border); border-radius: var(--so-radius-lg); background: var(--so-surface); box-shadow: var(--so-shadow-md); }
.system-state .stageops-lockup { margin-bottom: 2rem; }
.system-state h1 { margin: 0 0 .7rem; font-size: clamp(2rem, 7vw, 3.2rem); font-weight: 800; letter-spacing: -.05em; }
.system-state p { max-width: 52ch; color: var(--so-text-secondary); }
.system-state code { color: var(--so-text-muted); }
.system-state-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.4rem; }

@media (max-width: 480px) {
    .account-access-card { padding: 1.35rem; }
    .onboarding-shell { padding: .8rem; }
    .onboarding-card { padding: 1rem; }
    .onboarding-match { align-items: stretch; flex-direction: column; }
    .onboarding-match .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.band-feed { display: flex; flex-direction: column; max-width: 760px; height: calc(100dvh - 66px - 4.5rem); margin: 0 auto; padding: 1.25rem; overflow: hidden; }
.feed-header { margin-bottom: .9rem; }
.feed-header p { margin: 0; color: var(--so-text-muted); font-size: .9rem; }
.feed-composer { z-index: 2; order: 2; flex: 0 0 auto; padding: .78rem .85rem calc(.72rem + env(safe-area-inset-bottom)); background: #161b25; border: 1px solid #2a3241; border-radius: 16px; box-shadow: 0 -8px 28px rgba(0,0,0,.18); transition: border-color 160ms ease, box-shadow 160ms ease; }
.feed-composer:focus-within { border-color: var(--so-accent); box-shadow: 0 0 0 3px var(--so-accent-soft), 0 10px 30px rgba(0,0,0,.12); }
.feed-composer textarea { display: block; field-sizing: content; width: 100%; min-height: 2.7rem; max-height: 9rem; padding: .2rem .15rem; overflow-y: auto; resize: none; color: #edf0f6; background: transparent; border: 0; outline: 0; box-shadow: none; font: inherit; font-size: .96rem; line-height: 1.5; }
.feed-composer textarea::placeholder { color: var(--so-text-muted); opacity: 1; }
.feed-composer-actions { display: flex; align-items: center; gap: .55rem; min-height: 40px; margin-top: .45rem; padding-top: .55rem; border-top: 1px solid rgba(255,255,255,.07); }
.feed-composer-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.feed-photo-action { display: inline-flex; align-items: center; gap: .38rem; min-height: 38px; padding: .45rem .56rem; color: #bdc8d9; cursor: pointer; border: 1px solid transparent; border-radius: 9px; font-size: .78rem; font-weight: 650; }
.feed-photo-action:hover { color: #fff; background: #202838; }
.feed-photo-action:focus-within { outline: 2px solid var(--so-focus); outline-offset: 2px; }
.feed-photo-count { min-width: 0; overflow: hidden; color: var(--so-text-muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.feed-post-action { min-height: 38px; margin-left: auto; padding: .45rem .9rem; color: #fff; background: var(--so-accent); border: 0; border-radius: 9px; font: inherit; font-size: .8rem; font-weight: var(--so-font-weight-bold); }
.feed-post-action:hover:not(:disabled) { background: var(--so-accent-hover); }
.feed-post-action:disabled { color: #7f8898; background: #242b38; cursor: not-allowed; }
.feed-composer-previews { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-top: .65rem; }
.feed-composer-preview { position: relative; aspect-ratio: 1 / .8; overflow: hidden; background: #111722; border-radius: 9px; }
.feed-composer-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.feed-composer-preview button { position: absolute; top: .3rem; right: .3rem; display: grid; width: 25px; height: 25px; place-items: center; color: #fff; cursor: pointer; background: rgba(8,11,17,.78); border: 1px solid rgba(255,255,255,.22); border-radius: 50%; font-size: 1.05rem; line-height: 1; }
.feed-composer-preview button:focus-visible { outline: 2px solid #bba9ff; outline-offset: 2px; }
.feed-composer-error { margin: .55rem 0 0; color: var(--so-danger); font-size: .78rem; }
.feed-composer, .feed-reply-composer { display: grid; gap: .65rem; }
.feed-reply-composer textarea { width: 100%; resize: vertical; border: 1px solid #d7dbe3; border-radius: .65rem; padding: .75rem; font: inherit; }
.feed-reply-composer .btn { justify-self: end; min-height: 44px; }
.feed-posts { display: grid; flex: 1 1 auto; min-height: 0; gap: .85rem; padding: 0 .15rem 1.2rem; overflow-y: auto; overscroll-behavior: contain; }
.feed-post { padding: 1rem 1.05rem; background: rgba(19, 26, 39, .72); border: 1px solid rgba(161, 177, 206, .12); border-radius: 15px; }
.feed-post-pinned { background:linear-gradient(135deg,rgba(77,56,125,.27),rgba(19,26,39,.78)); border-color:rgba(190,171,255,.34); }
.feed-pinned-label { display:inline-flex; align-items:center; gap:.25rem; margin-left:auto; color:var(--so-accent-hover); font-size:.66rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.feed-post-actions { position:relative; margin-left:.15rem; }.feed-post-actions summary { display:grid; width:34px; height:34px; place-items:center; color:#aeb9c9; cursor:pointer; background:transparent; border:0; border-radius:8px; list-style:none; }.feed-post-actions summary::-webkit-details-marker{display:none}.feed-post-actions summary:hover,.feed-post-actions[open] summary{color:#fff;background:#252f41}.feed-post-actions>div{position:absolute;z-index:5;top:calc(100% + .3rem);right:0;padding:.3rem;background:#101827;border:1px solid #334057;border-radius:9px;box-shadow:0 12px 24px rgba(0,0,0,.3)}.feed-post-actions button{min-width:100px;min-height:36px;padding:.4rem .55rem;color:var(--so-text);cursor:pointer;background:transparent;border:0;border-radius:6px;font:inherit;font-size:.75rem;text-align:left}.feed-post-actions button:hover{background:#253049}
.feed-post-header, .feed-reply > header { display: flex; gap: .7rem; align-items: center; }
.feed-avatar { display: grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto; color: #efeaff; background: linear-gradient(145deg, #59448f, #263452); border: 1px solid rgba(196, 181, 253, .38); border-radius: 50%; font-size: .7rem; font-weight: 800; letter-spacing: .02em; }
.feed-author { display: flex; min-width: 0; flex-direction: column; gap: .14rem; line-height: 1.15; }
.feed-author strong { overflow: hidden; color: var(--so-text); font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.feed-post time, .feed-reply time { color: var(--so-text-muted); font-size: .72rem; }
.feed-post > p, .feed-reply p { max-width: 66ch; margin: .85rem 0 .75rem; color: var(--so-text-secondary); font-size: .96rem; line-height: 1.58; white-space: pre-wrap; overflow-wrap: anywhere; }
.feed-reply-toggle { border: 0; background: transparent; padding: .3rem 0; color: var(--so-accent-hover); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; min-height: 40px; }
.feed-reply-toggle:hover { color: var(--so-accent-hover); }
.feed-replies { display: grid; gap: .8rem; margin: .7rem 0 0 .35rem; padding: .15rem 0 .1rem .95rem; border-left: 1px solid rgba(177, 192, 220, .22); }
.feed-reply { padding: .15rem 0; }
.feed-reply-avatar { width: 27px; height: 27px; font-size: .6rem; }
.feed-reply p { margin: .55rem 0 0 2.2rem; color: var(--so-text-secondary); font-size: .9rem; line-height: 1.52; }
.feed-reply-composer { margin-top: .75rem; }
.feed-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin: .85rem 0; }
.feed-images a { display: block; min-width: 0; overflow: hidden; background: #101725; border-radius: 12px; }
.feed-images img { display: block; width: 100%; aspect-ratio: 1 / .8; object-fit: cover; transition: transform 180ms ease; }
.feed-images a:hover img { transform: scale(1.025); }
.feed-images:has(a:only-child) { grid-template-columns: minmax(0, 1fr); }
.feed-images:has(a:only-child) img { max-height: 420px; aspect-ratio: 1.35 / 1; }
.feed-images img.feed-image-failed { display: none; }
@media (max-width: 768px) { .band-feed { height: calc(100dvh - 64px - 76px - 1.5rem - env(safe-area-inset-bottom)); padding: .85rem .35rem .35rem; } .feed-empty { flex: 1 1 auto; min-height: 0; padding: 1.25rem .85rem; overflow-y: auto; } .feed-empty h2 { margin: 0; color: var(--so-text); font-size: 1rem; } .feed-empty p { margin: .35rem 0 0; color: var(--so-text-muted); font-size: .88rem; } .feed-composer { margin: 0 .2rem; } .feed-post { padding: .9rem; } }
@media (max-width: 430px) { .band-feed { padding: .75rem 0 .25rem; } .feed-replies { margin-left: .35rem; padding-left: .75rem; } .feed-composer { padding: .72rem calc(.72rem + env(safe-area-inset-right)) calc(.72rem + env(safe-area-inset-bottom)) calc(.72rem + env(safe-area-inset-left)); } .feed-photo-action span { display: none; } .feed-photo-action { width: 38px; justify-content: center; padding: .45rem; } .feed-composer-actions { gap: .4rem; } .feed-photo-count { font-size: .66rem; } }

/* Stage 6L Feed refinement: content-first activity stream using shared tokens. */
.band-feed { max-width: 780px; padding: var(--so-space-5) var(--so-space-4); }
.feed-header { margin-bottom: var(--so-space-4); }
.feed-header p { margin: 0; color: var(--so-text-secondary); font-size: var(--so-font-size-sm); line-height: 1.5; }
.feed-composer { padding: var(--so-space-4); background: var(--so-surface); border-color: var(--so-border); border-radius: var(--so-radius-md); box-shadow: none; }
.feed-composer:focus-within { border-color: var(--so-accent); box-shadow: 0 0 0 3px var(--so-accent-soft); }
.feed-composer textarea { min-height: 3rem; padding: var(--so-space-2) 0; color: var(--so-text); font-size: .95rem; }
.feed-composer textarea::placeholder { color: var(--so-text-muted); }
.feed-composer-actions { gap: var(--so-space-2); min-height: 44px; margin-top: var(--so-space-2); padding-top: var(--so-space-3); border-top-color: var(--so-border); }
.feed-photo-action { min-height: 44px; display: inline-flex; align-items: center; gap: var(--so-space-2); padding: var(--so-space-2) var(--so-space-3); color: var(--so-text-secondary); border-radius: var(--so-radius-sm); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-semibold); }
.feed-photo-action:hover, .feed-photo-action:focus-visible { color: var(--so-accent-hover); background: var(--so-accent-soft); }
.feed-photo-count { color: var(--so-text-muted); font-size: var(--so-font-size-sm); }
.feed-post-action { min-height: 44px; padding: var(--so-space-2) var(--so-space-4); border-radius: var(--so-radius-sm); font-size: var(--so-font-size-sm); }
.feed-post-action:focus-visible, .feed-reply-toggle:focus-visible, .feed-post-actions summary:focus-visible { outline: 3px solid var(--so-focus); outline-offset: 2px; }
.feed-composer-previews { gap: var(--so-space-2); margin-top: var(--so-space-3); }
.feed-composer-preview { border-radius: var(--so-radius-sm); }
.feed-composer-preview button { width: 30px; height: 30px; }
.feed-composer-error { margin-top: var(--so-space-3); color: var(--so-danger); font-size: var(--so-font-size-sm); }
.feed-posts { gap: var(--so-space-3); padding: 0 0 var(--so-space-5); }
.feed-post { padding: var(--so-space-4); background: var(--so-surface); border-color: var(--so-border); border-radius: var(--so-radius-md); }
.feed-post-pinned { background: color-mix(in srgb, var(--so-accent) 8%, var(--so-surface)); border-color: color-mix(in srgb, var(--so-accent) 42%, var(--so-border)); }
.feed-post-header { gap: var(--so-space-3); }
.feed-avatar { width: 40px; height: 40px; color: var(--so-text); background: var(--so-accent-soft); border-color: color-mix(in srgb, var(--so-accent) 35%, var(--so-border)); }
.feed-author { gap: var(--so-space-1); }
.feed-author strong { color: var(--so-text); font-size: 1rem; font-weight: var(--so-font-weight-semibold); }
.feed-post time, .feed-reply time { color: var(--so-text-muted); font-size: var(--so-font-size-sm); font-variant-numeric: tabular-nums; }
.feed-post > p, .feed-reply p { margin: var(--so-space-4) 0 var(--so-space-3); color: var(--so-text); font-size: .95rem; line-height: 1.6; }
.feed-images { gap: var(--so-space-2); margin: var(--so-space-4) 0; }
.feed-images a { background: var(--so-surface-raised); border-radius: var(--so-radius-sm); }
.feed-images img { aspect-ratio: 1 / .82; }
.feed-images:has(a:only-child) img { max-height: 400px; }
.feed-reply-toggle { min-height: 44px; padding: var(--so-space-2) 0; color: var(--so-accent-hover); font-size: var(--so-font-size-sm); }
.feed-reply-toggle:hover { color: var(--so-text); }
.feed-replies { margin-top: var(--so-space-3); padding-left: var(--so-space-4); border-left-color: var(--so-border); }
.feed-reply { padding: var(--so-space-2) 0; }
.feed-reply-avatar { width: 32px; height: 32px; }
.feed-reply p { margin: var(--so-space-2) 0 0 2.2rem; color: var(--so-text-secondary); font-size: var(--so-font-size-sm); }
.feed-reply-composer { gap: var(--so-space-3); margin-top: var(--so-space-4); }
.feed-reply-composer textarea { min-height: 76px; padding: var(--so-space-3); color: var(--so-text); background: var(--so-surface-raised); border-color: var(--so-border); border-radius: var(--so-radius-sm); }
.feed-reply-composer textarea:focus-visible { outline: 3px solid var(--so-focus); outline-offset: 2px; border-color: var(--so-accent); }
.feed-empty, .empty-state { padding: var(--so-space-8) var(--so-space-5); color: var(--so-text-secondary); background: var(--so-surface); border-color: var(--so-border); border-radius: var(--so-radius-md); }
.feed-empty h2, .empty-state h2 { margin: 0; color: var(--so-text); font-size: 1.1rem; font-weight: var(--so-font-weight-semibold); }
.feed-empty p, .empty-state p { margin-top: var(--so-space-2); color: var(--so-text-secondary); line-height: 1.5; }
@media (max-width: 768px) { .band-feed { height: calc(100dvh - 64px - 76px - 1.5rem - env(safe-area-inset-bottom)); padding: var(--so-space-4) var(--so-space-2) var(--so-space-1); } .feed-post { padding: var(--so-space-3); } }
@media (max-width: 430px) { .band-feed { padding: var(--so-space-3) 0 var(--so-space-1); } .feed-composer { margin: 0 var(--so-space-2); } .feed-posts { padding-left: var(--so-space-2); padding-right: var(--so-space-2); } .feed-photo-action span { display: none; } .feed-photo-action { width: 44px; justify-content: center; } .feed-post > p, .feed-reply p { font-size: .92rem; } }

/* Feed conversation treatment: intentionally mirrors Gig Chat's compact
   conversation surface while retaining posts, replies and photo actions. */
.band-feed {
    width: 100%;
    max-width: 960px;
    height: min(780px, calc(100dvh - 104px));
    margin: 0 auto;
    padding: var(--so-space-4);
    background: var(--so-surface);
    border: 1px solid var(--so-border);
    border-radius: var(--so-radius-lg);
    box-shadow: var(--so-shadow-sm);
}
.feed-header { margin: 0; padding: var(--so-space-3) var(--so-space-4); background: var(--so-surface-raised); border-bottom: 1px solid var(--so-border); border-radius: var(--so-radius-md) var(--so-radius-md) 0 0; }
.feed-header p { color: var(--so-text-secondary); font-size: var(--so-font-size-sm); }
.feed-posts { gap: var(--so-space-3); padding: var(--so-space-5) var(--so-space-3); }
.feed-post { width: fit-content; max-width: min(78%, 640px); padding: var(--so-space-3) var(--so-space-4); background: var(--so-surface-raised); border-color: var(--so-border); border-radius: var(--so-radius-sm) var(--so-radius-md) var(--so-radius-md); }
.feed-post-pinned { background: color-mix(in srgb, var(--so-accent) 12%, var(--so-surface-raised)); border-color: color-mix(in srgb, var(--so-accent) 42%, var(--so-border)); }
.feed-post-header { gap: var(--so-space-3); }
.feed-avatar { width: 36px; height: 36px; background: var(--so-accent-soft); border-color: color-mix(in srgb, var(--so-accent) 35%, var(--so-border)); }
.feed-author strong { font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-semibold); }
.feed-post > p { margin: var(--so-space-2) 0 var(--so-space-3); font-size: .9rem; line-height: 1.55; }
.feed-composer { margin: 0; padding: var(--so-space-3); background: var(--so-surface-raised); border-color: var(--so-border); border-radius: var(--so-radius-md); box-shadow: none; }
.feed-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--so-space-2); }
.feed-composer textarea, .feed-composer input[type="text"] { grid-column: 1; grid-row: 1; width: 100%; height: 46px; min-height: 46px; max-height: 46px; padding: 0 var(--so-space-3); overflow-x: auto; overflow-y: hidden; white-space: nowrap; background: var(--so-surface); border: 1px solid var(--so-border-light); border-radius: 999px; }
.feed-composer textarea { height: auto; min-height: 46px; max-height: 112px; padding-top: var(--so-space-2); padding-bottom: var(--so-space-2); overflow-x: hidden; overflow-y: auto; resize: none; white-space: pre-wrap; field-sizing: content; }
.feed-composer-actions { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: var(--so-space-2); min-height: 44px; margin: 0; padding: 0; border: 0; }
.feed-composer-previews { grid-column: 1 / -1; grid-row: 2; width: 100%; }
.feed-composer-error { grid-column: 1 / -1; grid-row: 3; }
.feed-photo-action { width: 44px; justify-content: center; padding: var(--so-space-2); }
.feed-photo-action span { display: none; }
.feed-post-action { min-height: 44px; padding: var(--so-space-2) var(--so-space-4); border-radius: var(--so-radius-sm); font-weight: var(--so-font-weight-semibold); }
.feed-reply-toggle { color: var(--so-accent-hover); font-weight: var(--so-font-weight-semibold); }
@media (max-width: 767px) {
    .band-feed { height: calc(100dvh - .8rem); margin: -.25rem 0 0; padding: var(--so-space-3); border-radius: var(--so-radius-md); }
    .feed-post { max-width: 92%; padding: var(--so-space-3); }
    .feed-composer { position: fixed; z-index: 90; right: var(--so-space-3); bottom: calc(var(--so-mobile-nav-height) + env(safe-area-inset-bottom)); left: var(--so-space-3); margin: 0; padding: var(--so-space-2); border-radius: var(--so-radius-md); }
}
@media (max-width: 430px) {
    .band-feed { padding: var(--so-space-2) 0 var(--so-space-1); }
    .feed-header { padding: var(--so-space-3); }
    .feed-posts { padding: var(--so-space-4) var(--so-space-2) calc(var(--so-mobile-nav-height) + 7rem + env(safe-area-inset-bottom)); }
    .feed-post { max-width: 95%; }
    .feed-composer { right: var(--so-space-2); left: var(--so-space-2); }
}
.schedule-tabs { display:flex; gap:.25rem; margin-bottom:1rem; } .schedule-tabs button { min-height:44px; padding:.5rem 1rem; color:var(--so-text-secondary); background:#202838; border:1px solid #313d52; border-radius:.5rem; font:inherit; font-weight:700; } .schedule-tabs button[aria-selected="true"] { color:#fff; background:#7058c8; border-color:#8067d8; } .schedule-tabs button:hover:not([aria-selected="true"]) { color:#fff; background:#273248; } .schedule-list{display:grid;gap:.35rem}.schedule-item{display:grid;grid-template-columns:72px 1fr auto;gap:.75rem;align-items:center;padding:.85rem 0;border-bottom:1px solid #e6e8ed;color:inherit;text-decoration:none;min-height:64px}.schedule-item time{display:grid;color:#5840af}.schedule-item span{display:grid;gap:.15rem}.schedule-item small,.feed-empty small{color:var(--so-text-muted)}.feed-empty{display:grid;flex:1 1 auto;min-height:0;gap:.35rem;padding:0 .15rem 1rem;overflow-y:auto}
.schedule-heading{margin-bottom:1rem}.schedule-heading p{margin:0;color:var(--so-accent-hover);font-size:.68rem;font-weight:850;letter-spacing:.1em;text-transform:uppercase}.schedule-heading h1{margin:.25rem 0;scroll-margin-top:5rem;color:var(--so-text);font-size:1.45rem}.schedule-heading span{color:var(--so-text-muted);font-size:.88rem}.schedule-list{gap:.75rem}.schedule-card{display:grid;grid-template-columns:62px minmax(0,1fr) auto;gap:.9rem;align-items:center;min-height:90px;padding:.8rem .9rem;color:inherit;background:#151d2b;border:1px solid rgba(165,181,209,.14);border-radius:14px;text-decoration:none}.schedule-card:hover{border-color:rgba(197,180,255,.4);background:#192334}.schedule-date{display:grid;place-items:center;align-content:center;min-height:64px;color:var(--so-accent-hover);background:#25213b;border-radius:10px;line-height:1}.schedule-date span,.schedule-date small{font-size:.62rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.schedule-date strong{margin:.22rem 0;color:#fff;font-size:1.45rem}.schedule-card-copy{display:grid;min-width:0;gap:.22rem}.schedule-card-copy>strong{overflow:hidden;color:var(--so-text);font-size:1rem;text-overflow:ellipsis;white-space:nowrap}.schedule-card-copy small{color:var(--so-text-muted)}.schedule-card-copy em{color:var(--so-accent-hover);font-size:.76rem;font-style:normal;font-weight:700}.schedule-card>b{color:var(--so-accent-hover);font-size:1.5rem}.schedule-empty{padding:1.3rem .2rem;color:var(--so-text-muted)}.schedule-empty h2{margin:0;color:var(--so-text);font-size:1rem}.schedule-empty p{margin:.35rem 0 0}@media(max-width:430px){.schedule-card{gap:.7rem;padding:.75rem}.schedule-card-copy>strong{white-space:normal}.schedule-date{min-height:58px}}
.events-heading{display:flex;gap:1rem;justify-content:space-between;align-items:end;margin-bottom:1rem}.events-heading p{margin:0;color:var(--so-accent-hover);font-size:.68rem;font-weight:850;letter-spacing:.1em;text-transform:uppercase}.events-heading h1{margin:.25rem 0;scroll-margin-top:5rem;color:var(--so-text);font-size:1.45rem}.events-heading span{color:var(--so-text-muted);font-size:.88rem}.events-heading .btn{min-height:44px;white-space:nowrap}.events-tabs{display:flex;gap:.25rem;margin-bottom:1rem}.events-tabs button{min-height:44px;padding:.5rem 1rem;color:var(--so-text-secondary);background:#202838;border:1px solid #313d52;border-radius:.5rem;font:inherit;font-weight:700}.events-tabs button[aria-selected="true"]{color:#fff;background:#7058c8;border-color:#8067d8}.events-tabs button:hover:not([aria-selected="true"]){color:#fff;background:#273248}.events-card-list{display:grid;gap:.75rem}.event-card{display:grid;grid-template-columns:62px minmax(0,1fr) auto;gap:.9rem;align-items:center;min-height:100px;padding:.85rem .9rem;color:inherit;background:#151d2b;border:1px solid rgba(165,181,209,.14);border-radius:14px;text-decoration:none}.event-card:hover{border-color:rgba(197,180,255,.4);background:#192334}.event-date{display:grid;place-items:center;align-content:center;min-height:64px;color:var(--so-accent-hover);background:#25213b;border-radius:10px;line-height:1}.event-date span,.event-date small{font-size:.62rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.event-date strong{margin:.22rem 0;color:#fff;font-size:1.45rem}.event-card-copy{display:grid;min-width:0;gap:.2rem}.event-card-copy>strong{overflow:hidden;color:var(--so-text);font-size:1rem;text-overflow:ellipsis;white-space:nowrap}.event-card-copy small{color:var(--so-text-muted)}.event-status{justify-self:start;margin-top:.2rem;padding:.18rem .45rem;color:var(--so-accent-hover);background:rgba(112,88,200,.16);border:1px solid rgba(172,151,244,.22);border-radius:999px;font-size:.69rem;font-style:normal;font-weight:800}.event-status.is-draft{color:var(--so-text-secondary);background:rgba(148,163,184,.13);border-color:rgba(148,163,184,.2)}.event-status.is-pending{color:var(--so-warning);background:rgba(181,130,43,.14);border-color:rgba(223,174,77,.23)}.event-card>b{color:var(--so-accent-hover);font-size:1.5rem}.events-empty{padding:1.3rem .2rem;color:var(--so-text-muted)}.events-empty h2{margin:0;color:var(--so-text);font-size:1rem}.events-empty p{margin:.35rem 0 0}@media(max-width:430px){.events-heading{align-items:start}.events-heading .btn{font-size:.9rem}.event-card{gap:.7rem;padding:.75rem}.event-card-copy>strong{white-space:normal}.event-date{min-height:58px}}
.event-back-link{display:inline-flex;margin:0 0 1rem;color:var(--so-text-secondary);font-size:.875rem;font-weight:700;text-decoration:none}.event-back-link:hover{color:var(--so-accent-bright)}
.band-overview{display:grid;max-width:760px;gap:1.4rem;margin:0 auto;padding:0 0 1.5rem}.band-overview-heading{display:flex;gap:1rem;justify-content:space-between;align-items:end}.band-overview-heading p,.band-section-heading p{margin:0;color:var(--so-accent-hover);font-size:.68rem;font-weight:850;letter-spacing:.1em;text-transform:uppercase}.band-overview-heading h1{margin:.25rem 0;color:var(--so-text);font-size:1.55rem}.band-overview-heading span{color:var(--so-text-muted);font-size:.9rem}.band-overview-heading .btn{min-height:44px;white-space:nowrap}.band-overview-description{max-width:60ch;margin:-.65rem 0 0;color:var(--so-text-secondary);line-height:1.5}.band-section{display:grid;gap:.7rem}.band-section-heading{display:flex;align-items:end;justify-content:space-between;gap:1rem}.band-section-heading h2{margin:.2rem 0 0;color:var(--so-text);font-size:1.1rem}.band-section-heading>a{color:var(--so-accent-hover);font-size:.82rem;font-weight:750;text-decoration:none}.band-member-list,.band-lineup-list{display:grid;gap:.55rem}.band-member-card,.band-lineup-list article{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:.75rem;align-items:center;min-height:68px;padding:.7rem .8rem;background:var(--so-surface);border:1px solid var(--so-border);border-radius:13px}.band-avatar{display:grid;place-items:center;width:38px;height:38px;color:var(--so-text);background:color-mix(in srgb,var(--so-accent) 22%,var(--so-surface-3));border-radius:50%;font-size:.78rem;font-weight:850}.band-member-card>span:nth-child(2),.band-lineup-list article>span{display:grid;min-width:0;gap:.16rem}.band-member-card strong,.band-lineup-list strong{overflow:hidden;color:var(--so-text);text-overflow:ellipsis;white-space:nowrap}.band-member-card small,.band-lineup-list small{color:var(--so-text-muted);font-size:.78rem}.band-member-card em,.band-lineup-list em{color:var(--so-accent-hover);font-size:.72rem;font-style:normal;font-weight:750}.band-lineup-list article{grid-template-columns:minmax(0,1fr) auto}.band-empty{padding:1rem .15rem;color:var(--so-text-muted)}.band-empty h1,.band-empty h3{margin:0;color:var(--so-text);font-size:1rem}.band-empty p{margin:.35rem 0 0}@media(max-width:430px){.band-overview{gap:1.2rem;padding:0 0 2rem}.band-overview-heading{align-items:start}.band-overview-heading .btn{font-size:.83rem}.band-member-card,.band-lineup-list article{padding:.7rem}.band-member-card strong,.band-lineup-list strong{white-space:normal}.band-member-card em{align-self:start}.band-lineup-list article{gap:.6rem}}
/* ── Setlist hub: the inline setlist editor on Band Overview ───── */
.band-setlist-hub{display:grid;gap:0;padding:0;background:var(--so-surface);border:1px solid var(--so-border);border-radius:16px;overflow:hidden}
.setlist-hub-header{display:flex;flex-wrap:wrap;align-items:start;justify-content:space-between;gap:.8rem;padding:1.1rem 1.25rem;background:linear-gradient(180deg,color-mix(in srgb,var(--so-accent) 8%,var(--so-surface)),var(--so-surface));border-bottom:1px solid var(--so-border)}
.setlist-hub-header h2{margin:0;color:var(--so-text);font-size:1.15rem;font-weight:800}
.setlist-hub-kicker{margin:0 0 .2rem;color:var(--so-accent-hover);font-size:.65rem;font-weight:850;letter-spacing:.1em;text-transform:uppercase}
.setlist-hub-badge{display:inline-flex;align-items:center;gap:.25rem;margin-top:.15rem;color:var(--so-accent-hover);font-size:.72rem;font-weight:700}
.setlist-hub-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .9rem;align-self:center}
.setlist-hub-link{color:var(--so-accent-hover);font-size:.78rem;font-weight:700;text-decoration:none;white-space:nowrap}.setlist-hub-link:hover{text-decoration:underline}
.setlist-hub-empty{display:grid;gap:.65rem;padding:1.4rem 1.25rem;text-align:center;justify-items:center}
.setlist-hub-empty-icon{width:52px;height:52px;color:var(--so-text-muted);opacity:.5}
.setlist-hub-empty-icon svg{width:100%;height:100%}
.setlist-hub-empty h3{margin:0;color:var(--so-text);font-size:1rem;font-weight:800}
.setlist-hub-empty p{margin:0;max-width:42ch;color:var(--so-text-muted);font-size:.88rem;line-height:1.5}
.setlist-hub-create{display:flex;gap:.5rem;width:100%;max-width:420px}
.setlist-hub-create input{flex:1;min-height:42px}
.setlist-hub-create button{white-space:nowrap}
.setlist-hub-error{color:var(--so-danger);font-size:.82rem;font-weight:600}
.setlist-hub-list{display:grid;gap:0;margin:0;padding:0;list-style:none}
.setlist-hub-item{display:grid;grid-template-columns:2.2rem minmax(0,1fr) auto auto auto;align-items:center;gap:.5rem;padding:.55rem 1.15rem;border-bottom:1px solid color-mix(in srgb,var(--so-border) 50%,transparent);transition:background .12s ease}
.setlist-hub-item:last-child{border-bottom:none}
.setlist-hub-item:hover{background:color-mix(in srgb,var(--so-accent) 4%,transparent)}
.setlist-hub-num{color:var(--so-text-muted);font-family:var(--so-font-mono);font-size:.72rem;font-weight:700;text-align:center;font-variant-numeric:tabular-nums}
.setlist-hub-song{display:grid;gap:.1rem;min-width:0;color:inherit;text-decoration:none}
.setlist-hub-song:hover strong{color:var(--so-accent-hover)}
.setlist-hub-song strong{overflow:hidden;color:var(--so-text);font-size:.9rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}
.setlist-hub-artist{color:var(--so-text-muted);font-size:.76rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.setlist-hub-key{flex:0 0 auto;padding:.12rem .35rem;color:var(--so-accent-hover);background:color-mix(in srgb,var(--so-accent) 10%,transparent);border-radius:4px;font-family:var(--so-font-mono);font-size:.72rem;font-weight:700;white-space:nowrap}
.setlist-hub-no-chart{flex:0 0 auto;color:var(--so-warning);font-size:.7rem;font-weight:700;white-space:nowrap}
.setlist-hub-item-actions{display:flex;gap:.2rem;flex:0 0 auto}
.setlist-hub-move,.setlist-hub-remove{display:grid;place-items:center;width:28px;height:28px;padding:0;color:var(--so-text-muted);background:transparent;border:1px solid transparent;border-radius:6px;font-size:.78rem;cursor:pointer;transition:all .12s ease}
.setlist-hub-move:hover{color:var(--so-text);background:var(--so-surface-2);border-color:var(--so-border)}
.setlist-hub-move:disabled{opacity:.3;cursor:default}
.setlist-hub-move:disabled:hover{color:var(--so-text-muted);background:transparent;border-color:transparent}
.setlist-hub-remove:hover{color:var(--so-danger);background:color-mix(in srgb,var(--so-danger) 8%,transparent);border-color:color-mix(in srgb,var(--so-danger) 20%,transparent)}
.setlist-hub-add{display:flex;gap:.5rem;padding:.7rem 1.15rem;border-top:1px solid var(--so-border)}
.setlist-hub-add select{flex:1;min-height:40px}
.setlist-hub-add button{white-space:nowrap}
.setlist-hub-empty-songs,.setlist-hub-all-added{padding:.9rem 1.25rem;margin:0;color:var(--so-text-muted);font-size:.85rem}
.setlist-hub-all-added a{color:var(--so-accent-hover);font-weight:700}
.setlist-hub-key-editor{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:.5rem;padding:.5rem .5rem .1rem}
.setlist-hub-key-editor select{min-height:38px}
@media(max-width:480px){
    .setlist-hub-header{flex-direction:column;gap:.5rem;padding:.9rem 1rem}
    .setlist-hub-item{grid-template-columns:1.8rem minmax(0,1fr) auto;padding:.5rem .85rem}
    .setlist-hub-song{grid-column:2/-1}
    .setlist-hub-key{grid-row:2;grid-column:2;justify-self:start;margin-top:.15rem}
    .setlist-hub-item-actions{grid-row:2;grid-column:3;justify-self:end;margin-top:.15rem}
    .setlist-hub-no-chart{display:none}
    .setlist-hub-add{flex-direction:column;padding:.65rem .85rem}
    .setlist-hub-create{flex-direction:column}
}
.peaceful-home{display:grid;max-width:760px;gap:1rem;margin:0 auto;padding:1rem 0 4rem}.band-hero{position:relative;display:grid;min-height:270px;overflow:hidden;background:linear-gradient(145deg,#3d2d65,#17243a);border:1px solid rgba(198,181,255,.22);border-radius:20px}.band-hero>img{width:100%;height:100%;object-fit:cover}.band-hero-fallback{display:grid;place-items:center;color:var(--so-text);background:radial-gradient(circle at 30% 20%,#8a6cc5,#293b59 64%);font-size:clamp(3rem,13vw,6rem);font-weight:850}.band-hero-overlay{position:absolute;inset:auto 0 0;padding:3.7rem 1.4rem 1.35rem;background:linear-gradient(transparent,rgba(6,11,20,.9) 60%)}.band-hero-overlay h1{margin:0;color:#fff;font-size:clamp(2rem,7vw,3.5rem);letter-spacing:-.045em}.band-hero-overlay p{margin:.3rem 0 0;color:#d9ceff;font-weight:750}.band-hero-overlay span{display:block;max-width:54ch;margin-top:.55rem;color:var(--so-text-secondary);line-height:1.45}.home-next-gig,.home-secondary-card{display:grid;color:inherit;text-decoration:none;background:#151d2b;border:1px solid rgba(165,181,209,.14);border-radius:15px}.home-next-gig{gap:.25rem;padding:1.2rem 1.3rem}.home-next-gig>span,.home-secondary-card>span{color:var(--so-accent-hover);font-size:.68rem;font-weight:850;letter-spacing:.09em;text-transform:uppercase}.home-next-gig strong{color:var(--so-text);font-size:1.18rem}.home-next-gig p{margin:0;color:var(--so-text-secondary)}.home-next-gig em,.home-secondary-card em{margin-top:.45rem;color:var(--so-accent-hover);font-size:.8rem;font-style:normal;font-weight:750}.home-secondary-widgets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.home-secondary-card{gap:.4rem;min-height:126px;padding:1rem}.home-secondary-card strong{color:var(--so-text);font-size:.9rem;line-height:1.35}@media(max-width:480px){.peaceful-home{padding:.65rem 0 3rem}.band-hero{min-height:235px;border-radius:16px}.band-hero-overlay{padding:3rem 1rem 1rem}.home-secondary-widgets{grid-template-columns:1fr}.home-secondary-card{min-height:0}}@media(min-width:768px){.peaceful-home{padding-top:1.4rem}.band-hero{min-height:330px}}
.home-pinned-post{display:grid;gap:.65rem;padding:1rem 1.1rem;color:var(--so-text-secondary);background:linear-gradient(145deg,#181d2c,#151d2b);border:1px solid rgba(190,174,255,.24);border-radius:15px}.home-pinned-post header{display:flex;align-items:center;gap:.45rem;min-width:0}.home-pinned-label{padding:.16rem .42rem;color:#d9ceff;background:rgba(112,88,200,.18);border-radius:999px;font-size:.64rem;font-weight:850}.home-pinned-avatar{display:grid;place-items:center;width:26px;height:26px;color:var(--so-text);background:#493a76;border-radius:50%;font-size:.62rem;font-weight:850}.home-pinned-post header strong{overflow:hidden;color:var(--so-text);font-size:.82rem;text-overflow:ellipsis;white-space:nowrap}.home-pinned-post time{margin-left:auto;color:var(--so-text-muted);font-size:.7rem;white-space:nowrap}.home-pinned-post>p{margin:0;color:var(--so-text-secondary);line-height:1.48;white-space:pre-wrap}.home-pinned-post>a{justify-self:start;color:var(--so-accent-hover);font-size:.78rem;font-weight:800;text-decoration:none}.home-pinned-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:.45rem;max-height:180px;overflow:hidden}.home-pinned-images a{min-width:0}.home-pinned-images img{display:block;width:100%;height:120px;object-fit:cover;border-radius:9px}@media(max-width:480px){.home-pinned-post{padding:.9rem}.home-pinned-post time{font-size:.65rem}.home-pinned-images img{height:100px}}
.invitations-page{display:grid;max-width:760px;gap:1.35rem;margin:0 auto}.invitations-page header{display:grid;gap:.25rem}.invitations-page header p{margin:0;color:var(--so-accent-hover);font-size:.7rem;font-weight:800;text-transform:uppercase}.invitations-page header h1,.invitations-page h2{margin:0}.invitations-page header span,.invitations-empty{color:var(--so-text-muted)}.invitations-page section{display:grid;gap:.65rem}.invitation-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.8rem;padding:1rem;background:#151d2b;border:1px solid rgba(165,181,209,.14);border-radius:13px}.invitation-card time{color:#c7baff;font-size:.78rem;font-weight:800}.invitation-card div{display:grid;gap:.2rem;min-width:0}.invitation-card strong{color:var(--so-text)}.invitation-card span{overflow:hidden;color:#a5afbf;font-size:.8rem;text-overflow:ellipsis;white-space:nowrap}.invitation-card a{color:var(--so-accent-hover);font-size:.8rem;font-weight:800;text-decoration:none}@media(max-width:430px){.invitation-card{grid-template-columns:auto 1fr}.invitation-card a{grid-column:2}.invitation-card time{align-self:start}}
.band-home { display:grid; min-height:calc(100dvh - 66px - 3rem); place-items:center; padding:2rem 1rem 8rem; text-align:center; }.band-home-identity { display:grid; justify-items:center; max-width:540px; }.band-home-logo,.band-home-logo-fallback { display:grid; width:min(34vw,150px); height:min(34vw,150px); place-items:center; overflow:hidden; color:var(--so-text); background:linear-gradient(145deg,#634aa0,#263853); border:1px solid rgba(205,190,255,.42); border-radius:50%; box-shadow:0 18px 45px rgba(0,0,0,.2); font-size:clamp(2rem,9vw,3.3rem); font-weight:800; }.band-home-logo { object-fit:cover; }.band-home-identity h1 { margin:1.4rem 0 0; color:var(--so-text); font-size:clamp(2rem,8vw,4rem); letter-spacing:-.045em; }.band-home-location { margin:.55rem 0 0; color:var(--so-accent-hover); font-weight:700; }.band-home-description { max-width:48ch; margin:.85rem 0 0; color:var(--so-text-muted); line-height:1.6; }.band-settings { display:grid; max-width:620px; gap:.8rem; margin:0 auto; }.band-settings header { display:grid; gap:.35rem; margin-bottom:.7rem; }.band-settings header p { margin:0; color:var(--so-accent-hover); font-size:.72rem; font-weight:800; text-transform:uppercase; }.band-settings header h1 { margin:0; }.band-settings header span { color:var(--so-text-muted); }.band-settings form { display:grid; gap:.55rem; padding:1rem; background:#131a27; border:1px solid rgba(161,177,206,.12); border-radius:14px; }.band-settings label { color:var(--so-text-secondary); font-size:.8rem; font-weight:700; }.band-settings input,.band-settings textarea { width:100%; padding:.65rem; color:var(--so-text); background:#0d1420; border:1px solid #2b3649; border-radius:8px; }.band-settings textarea { min-height:96px; }.band-settings button { justify-self:start; margin-top:.4rem; }@media(max-width:767px){.band-home{min-height:calc(100dvh - 64px - 2rem);padding:1.5rem 1rem 5rem}.band-home-logo,.band-home-logo-fallback{width:116px;height:116px}.band-settings{padding:.15rem}.band-settings button{width:100%;min-height:46px}}

/* Stage 6J Auth and onboarding refinement. */
.account-access-shell { min-height: 100dvh; padding: var(--so-space-6) var(--so-space-4); }
.account-access-card { width: min(100%, 30rem); padding: var(--so-space-8); background: var(--so-surface); border-color: var(--so-border); border-radius: var(--so-radius-lg); box-shadow: var(--so-shadow-md); }
.account-access-card > .stageops-lockup { margin-bottom: var(--so-space-6); }
.account-access-card h1 { margin-bottom: var(--so-space-2); font-size: clamp(1.9rem, 5vw, 2.5rem); font-weight: var(--so-font-weight-bold); letter-spacing: -.04em; }
.account-access-eyebrow, .onboarding-eyebrow { margin-bottom: var(--so-space-2); color: var(--so-accent-hover) !important; font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-bold); letter-spacing: .08em; }
.account-access-copy { margin-bottom: var(--so-space-5); color: var(--so-text-secondary); line-height: 1.5; }
.account-access-field, .account-access-card .field-group { margin-bottom: var(--so-space-4); }
.account-access-field label, .account-access-card .field-group label { margin-bottom: var(--so-space-2); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-semibold); }
.account-access-card .form-control, .account-access-card .form-select { min-height: 46px; background: var(--so-surface-raised); border-color: var(--so-border); border-radius: var(--so-radius-sm); }
.account-access-card .form-control:focus-visible, .account-access-card .form-select:focus-visible { outline: 3px solid var(--so-focus); outline-offset: 2px; border-color: var(--so-accent); box-shadow: none; }
.account-access-card .so-btn-primary, .account-access-card .btn-primary { width: 100%; min-height: 48px; margin-top: var(--so-space-2); }
.notification-settings { display: grid; gap: .65rem; margin-top: 1rem; }
.notification-settings label { display: flex; align-items: center; gap: .6rem; color: var(--so-text-primary, var(--so-text)); }
.notification-settings input[type="checkbox"] { accent-color: var(--so-accent); width: 1.1rem; height: 1.1rem; }
.notification-settings h3 { margin: .75rem 0 0; font-size: .9rem; color: var(--so-text-secondary); }

/* Conversation feed: message-first presentation. */
.band-feed {
    width: 100%;
    max-width: none;
    height: calc(100dvh - 66px - 2rem);
    margin: 0;
    padding: var(--so-space-4) 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background-color: var(--so-bg);
    background-image: radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--so-accent) 4%, transparent) 0 1px, transparent 1.5px), radial-gradient(circle at 76% 68%, color-mix(in srgb, var(--so-text-muted) 3%, transparent) 0 1px, transparent 1.5px);
    background-size: 42px 42px, 58px 58px;
}
.feed-posts {
    width: 100%;
    gap: .55rem;
    padding: var(--so-space-4) clamp(1rem, 7vw, 8rem) calc(var(--so-mobile-nav-height) + 7rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--so-bg) 86%, transparent);
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--so-text-muted) 45%, transparent) transparent;
}
.feed-posts::-webkit-scrollbar { width: 4px; }
.feed-posts::-webkit-scrollbar-track { background: transparent; }
.feed-posts::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--so-text-muted) 42%, transparent); border-radius: 99px; }
.feed-posts:hover::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--so-text-muted) 68%, transparent); }
.feed-post {
    width: fit-content;
    max-width: min(72%, 760px);
    padding: var(--so-space-3) var(--so-space-4);
    background: var(--so-surface-raised);
    border: 1px solid var(--so-border);
    border-radius: 16px 16px 16px 5px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
}
.feed-post-other { align-self: flex-start; }
.feed-post-mine { align-self: flex-end; background: color-mix(in srgb, var(--so-accent) 17%, var(--so-surface-raised)); border-color: color-mix(in srgb, var(--so-accent) 30%, var(--so-border)); border-radius: 16px 16px 5px 16px; }
.feed-post-other { justify-self: start; }
.feed-post-mine { justify-self: end; }
.feed-post-mine .feed-avatar { display: none; }
.feed-post-pinned { background: color-mix(in srgb, var(--so-accent) 10%, var(--so-surface-raised)); border-color: color-mix(in srgb, var(--so-accent) 35%, var(--so-border)); }
.feed-post-header { gap: var(--so-space-2); }
.feed-post-mine .feed-author strong { display: none; }
.feed-post > p { margin: var(--so-space-2) 0; color: var(--so-text); font-size: 1rem; line-height: 1.5; }
.feed-message-link { color: var(--so-accent-bright); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--so-accent-bright) 55%, transparent); text-underline-offset: 2px; overflow-wrap: anywhere; }
.feed-message-link:hover, .feed-message-link:focus-visible { color: var(--so-accent-hover); }
.feed-post-actions { opacity: 0; transition: opacity 140ms ease; }
.feed-post:hover .feed-post-actions, .feed-post:focus-within .feed-post-actions, .feed-post-actions[open] { opacity: 1; }
.feed-replies { margin: var(--so-space-2) 0 0; padding: var(--so-space-2) 0 0 var(--so-space-3); border-left: 1px solid var(--so-border); }
.feed-reply { padding: var(--so-space-2) 0; }
.feed-reply-mine { text-align: right; }
.feed-reply-mine { justify-self: end; }
.feed-reply-other { justify-self: start; }
.feed-reply-mine header { justify-content: flex-end; }
.feed-reply-mine .feed-author strong { display: none; }
.feed-reply p { margin: var(--so-space-1) 0 0; color: var(--so-text); font-size: .92rem; }
.feed-reply-toggle { color: var(--so-text-muted); font-size: .74rem; font-weight: 600; opacity: .8; }
.feed-reply-toggle:hover { color: var(--so-accent-bright); }
@media (max-width: 767px) {
    .band-feed { height: calc(100dvh - .8rem); padding: var(--so-space-2) 0; }
    .feed-post { max-width: 86%; }
    .feed-post-actions { opacity: 1; }
}
@media (max-width: 430px) {
    .feed-posts { padding-left: var(--so-space-2); padding-right: var(--so-space-2); }
    .feed-post { max-width: 91%; padding: var(--so-space-3); }
}

/* Premium floating composer treatment. */
.feed-composer {
    width: 100%;
    max-width: none;
    margin-right: auto;
    margin-left: auto;
    padding: .65rem clamp(1rem, 7vw, 8rem);
    background: color-mix(in srgb, var(--so-surface-raised) 92%, var(--so-bg));
    border: 1px solid color-mix(in srgb, var(--so-border) 68%, transparent);
    border-radius: 18px;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .14);
}
.feed-composer textarea { min-height: 2.5rem; padding: .45rem .7rem; background: color-mix(in srgb, var(--so-surface) 72%, transparent); border-radius: 999px; }
.feed-composer textarea:focus { background: var(--so-surface); box-shadow: 0 0 0 2px color-mix(in srgb, var(--so-accent) 42%, transparent); }
.feed-composer-actions { gap: .25rem; margin-top: .25rem; padding-top: .25rem; border-top: 0; }
.feed-photo-action { width: 42px; min-height: 42px; justify-content: center; padding: .45rem; border-radius: 50%; }
.feed-photo-action:hover { background: color-mix(in srgb, var(--so-accent) 13%, transparent); }
.feed-post-action { display: inline-flex; width: 42px; min-height: 42px; align-items: center; justify-content: center; gap: .25rem; padding: .45rem; border-radius: 50%; }
.feed-post-action-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.feed-post-action:disabled { color: var(--so-text-muted); background: color-mix(in srgb, var(--so-surface) 72%, transparent); }
@media (max-width: 767px) { .feed-composer { width: auto; max-width: none; margin-right: 0; margin-left: 0; padding: .35rem .45rem; } }
.band-feed .feed-composer { bottom: env(safe-area-inset-bottom); }

/* Feed-only GigGeist identity: one lightweight line-art asset beneath the
   existing conversation cards and composer. */
.giggeist-feed {
    background-color: #0b1018;
    background-image: linear-gradient(rgba(11, 16, 24, .12), rgba(11, 16, 24, .12)), url('/giggeist-feed-pattern.svg');
    background-size: auto, 960px 640px;
    background-position: center, center top;
    overflow-x: hidden;
}
.giggeist-feed .feed-posts { background: transparent; }
.feed-rock-on-action {
    display: inline-grid;
    width: 42px;
    min-width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    color: var(--so-text);
    cursor: pointer;
    background: color-mix(in srgb, var(--so-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--so-accent) 28%, var(--so-border));
    border-radius: 50%;
    font: inherit;
    font-size: 1.15rem;
}
.feed-rock-on-action:hover:not(:disabled) { background: color-mix(in srgb, var(--so-accent) 20%, transparent); }
.feed-rock-on-action:focus-visible { outline: 2px solid var(--so-focus); outline-offset: 2px; }
.feed-rock-on-action:disabled { cursor: not-allowed; opacity: .55; }
@media (max-width: 767px) {
    .giggeist-feed .feed-composer { bottom: calc(var(--so-mobile-nav-height) + env(safe-area-inset-bottom)); }
}
@media (max-width: 430px) {
    .giggeist-feed { background-size: auto, 720px 480px; }
    .giggeist-feed .feed-photo-count { display: none; }
}

.gigs-page { width: min(100%, 960px); margin: 0 auto; padding: var(--so-space-4); }
.gigs-heading { align-items: end; }
.schedule-card-copy .event-status { width: fit-content; }
.schedule-empty a { color: var(--so-accent-bright); font-weight: 700; }
@media (max-width: 430px) {
    .gigs-page { padding: var(--so-space-3) var(--so-space-2) calc(var(--so-mobile-nav-height) + var(--so-space-5)); }
    .gigs-heading { align-items: start; }
}

/* Global GigGeist canvas texture. Navigation and cards remain solid above it. */
body { background-color: var(--so-bg); background-image: url('/giggeist-pattern.svg'); background-size: 420px 320px; }
#giggeist-boot-status { position: fixed; z-index: 10002; left: 50%; bottom: calc(2rem + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; justify-items: center; gap: var(--so-space-3); width: min(90vw, 28rem); color: var(--so-text-muted); text-align: center; font-size: var(--so-font-size-sm); }
#giggeist-boot-status button { min-height: 44px; padding: .55rem 1rem; color: #fff; background: var(--so-accent); border: 1px solid var(--so-accent-hover); border-radius: var(--so-radius-sm); font: inherit; font-weight: var(--so-font-weight-bold); }
@media (prefers-reduced-motion: reduce) { html[data-giggeist-boot="starting"] body::after { animation: none; opacity: 1; } }
.notification-time-row { display: flex; gap: .75rem; }
.notification-time-row label { display: grid; gap: .25rem; flex: 1; }
.account-access-link, .login-link { min-height: 44px; align-items: center; justify-content: center; margin-top: var(--so-space-4); font-size: var(--so-font-size-sm); }
.google-signin-form { margin-top: var(--so-space-5); }
.google-signin-button { min-height: 48px; border-radius: var(--so-radius-sm); box-shadow: none; }
.google-signin-button:hover { transform: none; box-shadow: var(--so-shadow-sm); }
.account-divider { margin: var(--so-space-5) 0 var(--so-space-4); }
.onboarding-shell { width: min(100%, 760px); padding: var(--so-space-6) var(--so-space-4); }
.onboarding-header { margin-bottom: var(--so-space-6); }
.onboarding-header .stageops-lockup { margin-bottom: var(--so-space-6); }
.onboarding-header h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: var(--so-font-weight-bold); letter-spacing: -.04em; }
.onboarding-header p { color: var(--so-text-secondary); line-height: 1.5; }
.onboarding-card { padding: var(--so-space-6); background: var(--so-surface); border-color: var(--so-border); border-radius: var(--so-radius-lg); box-shadow: var(--so-shadow-sm); }
.onboarding-match { gap: var(--so-space-4); margin-top: var(--so-space-5); padding: var(--so-space-4); border-color: color-mix(in srgb, var(--so-accent) 34%, var(--so-border)); border-radius: var(--so-radius-md); background: var(--so-accent-soft); }
@media (max-width: 767px) { .account-access-shell { padding: var(--so-space-4) var(--so-space-3); } .account-access-card { padding: var(--so-space-6) var(--so-space-4); } .onboarding-shell { padding: var(--so-space-4) var(--so-space-3); } .onboarding-card { padding: var(--so-space-5) var(--so-space-4); } }
@media (max-width: 430px) { .account-access-shell { padding: var(--so-space-3) var(--so-space-2); } .account-access-card { padding: var(--so-space-5) var(--so-space-3); } .account-access-card h1 { font-size: 1.9rem; } .onboarding-shell { padding: var(--so-space-3) var(--so-space-2); } .onboarding-card { padding: var(--so-space-4) var(--so-space-3); } }
.band-overview-editor { padding: 1rem; background: #121a27; border: 1px solid #303b4c; border-radius: 14px; }
.band-overview-editor > label { color: var(--so-text-secondary); font-size: .72rem; font-weight: 750; }
nav.band-navigation { display: flex; gap: .35rem; margin-bottom: 1.25rem; padding: .3rem; overflow-x: auto; background: var(--so-surface-3); border: 1px solid var(--so-border); border-radius: 14px; }
nav.band-navigation > a { display: flex; flex: 1 0 auto; align-items: center; justify-content: center; gap: .48rem; padding: .68rem .9rem; color: var(--so-text-secondary); background: transparent; border: 1px solid transparent; border-radius: 10px; font-size: .82rem; font-weight: 750; text-align: center; text-decoration: none !important; }
nav.band-navigation > a:hover { color: var(--so-text); background: color-mix(in srgb, var(--so-surface) 60%, transparent); }
nav.band-navigation > a.active { color: var(--so-text); background: var(--so-surface); box-shadow: var(--so-shadow-sm); }

.band-overview-heading .btn-secondary { min-height: 40px; padding: .42rem .68rem; color: var(--so-text-secondary); background: transparent; border-color: var(--so-border); font-size: .75rem; box-shadow: none; }
.band-member-card { min-height: 58px; padding: .55rem .2rem; border-color: color-mix(in srgb, var(--so-border) 62%, transparent); }
.band-member-card em { padding: .22rem .45rem; color: var(--so-text-muted); background: var(--so-surface-raised); border: 0; font-size: .66rem; }

@media (max-width: 767px) {
    .giggeist-feed { height: calc(100dvh - var(--so-mobile-header-height)); margin: 0; padding: 0; overflow: hidden; background-image: linear-gradient(rgba(11,16,24,.88), rgba(11,16,24,.88)), url('/giggeist-feed-pattern.svg'); border: 0; border-radius: 0; box-shadow: none; }
    .giggeist-feed .feed-posts { align-content: start; padding: .65rem .55rem calc(var(--so-feed-composer-height) + var(--so-mobile-nav-height) + 1.5rem + env(safe-area-inset-bottom)); scroll-padding-bottom: calc(var(--so-feed-composer-height) + var(--so-mobile-nav-height) + 1.5rem + env(safe-area-inset-bottom)); }
    .giggeist-feed .feed-empty { padding: 1rem .65rem calc(var(--so-feed-composer-height) + var(--so-mobile-nav-height) + 1.5rem + env(safe-area-inset-bottom)); }
    .giggeist-feed .feed-composer { position: fixed; z-index: 29; right: .5rem; bottom: calc(var(--so-mobile-nav-height) + env(safe-area-inset-bottom)); left: .5rem; min-height: var(--so-feed-composer-height); margin: 0; padding: .45rem .5rem; background: color-mix(in srgb, var(--so-surface-raised) 94%, transparent); border-color: color-mix(in srgb, var(--so-border) 78%, transparent); border-radius: 13px 13px 0 0; box-shadow: 0 -12px 30px rgba(0,0,0,.28); backdrop-filter: blur(16px); }
    .giggeist-feed .feed-post { justify-self: stretch; width: 100%; max-width: none; padding: .72rem .78rem; background: color-mix(in srgb, var(--so-surface-raised) 82%, transparent); border-color: color-mix(in srgb, var(--so-border) 64%, transparent); border-radius: var(--so-radius-md); }
    .giggeist-feed .feed-post-mine { align-self: auto; justify-self: stretch; background: color-mix(in srgb, var(--so-accent) 5%, var(--so-surface-raised)); border-color: color-mix(in srgb, var(--so-accent) 18%, var(--so-border)); }
    .giggeist-feed .feed-post-mine .feed-avatar { display: grid; }
    .giggeist-feed .feed-post-mine .feed-author strong { display: block; }
    .giggeist-feed .feed-avatar { width: 34px; height: 34px; font-size: .66rem; }
    .giggeist-feed .feed-author strong { font-size: .82rem; }
    .giggeist-feed .feed-post time, .giggeist-feed .feed-reply time { font-size: .66rem; }
    .giggeist-feed .feed-post > p { margin: .65rem 0 .45rem; font-size: .88rem; line-height: 1.48; }
    .giggeist-feed .feed-reply-toggle { min-height: 40px; padding: .2rem 0; color: var(--so-text-muted) !important; font-size: .7rem; font-weight: 550; opacity: .82; }
    .band-member-card { min-height: 54px; padding: .45rem 0; }
}

/* Feed authorship remains instantly legible without oversized chat bubbles. */
.giggeist-feed .feed-post {
    justify-self: start;
    width: fit-content;
    min-width: min(18rem, 72%);
    max-width: 86%;
    border-radius: var(--so-radius-md);
}
.giggeist-feed .feed-post-mine {
    align-self: auto;
    justify-self: end;
    background: color-mix(in srgb, var(--so-accent) 9%, var(--so-surface-raised));
    border-color: color-mix(in srgb, var(--so-accent) 24%, var(--so-border));
}
.giggeist-feed .feed-post-other { justify-self: start; }
.giggeist-feed .feed-post-mine .feed-avatar,
.giggeist-feed .feed-post-mine .feed-author strong { display: none; }
@media (max-width: 430px) {
    .giggeist-feed .feed-post { min-width: min(15rem, 74%); max-width: 88%; }
}

@media (max-width: 767px) {
    .main-content:has(.giggeist-feed), .content:has(.giggeist-feed) { padding: 0; }
    .giggeist-feed .feed-empty { display: grid; flex: 0 0 auto; min-height: 0; gap: .25rem; margin: .65rem; padding: 1rem; background: color-mix(in srgb, var(--so-surface-raised) 74%, transparent); border: 0; border-radius: var(--so-radius-md); }
    .giggeist-feed .feed-empty h2 { font-size: .95rem; }
    .giggeist-feed .feed-empty p { margin: 0; font-size: .8rem; }
}
nav.band-navigation > a > span { color: var(--so-text-muted); font-size: 1rem; line-height: 1; text-decoration: none; }
nav.band-navigation > a.active > span { color: var(--so-accent); }
@media (max-width: 520px) { nav.band-navigation > a { padding-inline: .68rem; } }
nav.setlist-tabs { display: inline-flex; gap: .2rem; margin-bottom: 1.1rem; padding: .2rem; background: var(--so-surface-2); border: 1px solid var(--so-border); border-radius: 10px; }
nav.setlist-tabs > a { padding: .42rem 1rem; color: var(--so-text-secondary); background: transparent; border-radius: 7px; font-size: .82rem; font-weight: 700; text-decoration: none !important; }
nav.setlist-tabs > a:hover { color: var(--so-text); }
nav.setlist-tabs > a.active { color: var(--so-text); background: var(--so-surface); box-shadow: var(--so-shadow-sm); }
.band-lifecycle-panel,.band-danger-zone{display:grid;gap:1rem;margin-top:1rem;padding:1.1rem;background:var(--so-surface);border:1px solid var(--so-border);border-radius:var(--so-radius-md)}
.band-lifecycle-panel h2,.band-danger-zone h2{margin:0 0 .35rem;color:var(--so-text);font-size:1rem}.band-lifecycle-panel p,.band-danger-zone p{margin:0;color:var(--so-text-secondary);font-size:.82rem;line-height:1.55}.band-lifecycle-confirm,.band-delete-confirm{display:grid;gap:.75rem;padding-top:.85rem;border-top:1px solid var(--so-border)}.band-lifecycle-confirm>div,.band-delete-confirm>div{display:flex;gap:.6rem;flex-wrap:wrap}.band-danger-zone{border-color:color-mix(in srgb,var(--so-danger) 48%,var(--so-border));background:color-mix(in srgb,var(--so-danger) 5%,var(--so-surface))}.band-danger-label{color:var(--so-danger)!important;font-size:.68rem!important;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.band-delete-confirm label{color:var(--so-text);font-size:.8rem}.band-delete-confirm input{max-width:26rem;border-color:color-mix(in srgb,var(--so-danger) 35%,var(--so-border))}.band-delete-confirm .btn-danger:disabled{opacity:.42;cursor:not-allowed}
@media(max-width:767px){.band-lifecycle-confirm>div,.band-delete-confirm>div{display:grid}.band-lifecycle-panel button,.band-danger-zone button{width:100%}}

/* "My bands" (Organisations.razor) and "Archived bands" (ArchivedOrganisations.razor)
   share this class family. Global rather than scoped because both pages need it —
   scoped .razor.css only reaches markup from its own component. */
.bands-shell { width: 100%; max-width: 1120px; margin: 0 auto; }
.bands-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--so-space-6); padding: var(--so-space-4) 0 var(--so-space-6); border-bottom: 1px solid var(--so-border); }
.bands-eyebrow { margin: 0 0 var(--so-space-2); color: var(--so-accent-hover); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-bold); letter-spacing: .08em; }
.bands-heading h1 { margin: 0; color: var(--so-text); font-size: clamp(2rem, 4vw, 2.75rem); font-weight: var(--so-font-weight-bold); letter-spacing: -.04em; line-height: .95; }
.bands-heading p:last-child { max-width: 42rem; margin: var(--so-space-2) 0 0; color: var(--so-text-secondary); font-size: .9rem; line-height: 1.5; }
.band-actions { display: flex; flex: 0 0 auto; gap: var(--so-space-2); }
.band-action { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: var(--so-space-2) var(--so-space-4); border: 1px solid transparent; border-radius: var(--so-radius-sm); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-semibold); text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.band-action-primary { color: #fff; background: var(--so-accent); }
.band-action-primary span { font-size: 1.05rem; line-height: 0; }
.band-action-primary:hover, .band-action-primary:focus-visible { background: var(--so-accent-hover); }
.band-action-secondary { color: var(--so-text); background: var(--so-surface-raised); border-color: var(--so-border); }
.band-action-secondary:hover, .band-action-secondary:focus-visible { border-color: var(--so-accent); }
.bands-section { padding-top: var(--so-space-6); }
.bands-section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--so-space-3); }
.bands-section-heading h2 { margin: 0; color: var(--so-text); font-size: 1rem; font-weight: var(--so-font-weight-semibold); }
.bands-section-heading > span { padding: var(--so-space-1) var(--so-space-2); color: var(--so-text-muted); background: var(--so-surface-raised); border: 1px solid var(--so-border); border-radius: 999px; font-size: var(--so-font-size-sm); }
.band-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--so-space-3); }
.band-card { overflow: hidden; background: var(--so-surface); border: 1px solid var(--so-border); border-radius: var(--so-radius-md); transition: border-color .15s ease, background-color .15s ease; }
.band-card:hover, .band-card:focus-within { background: var(--so-surface-raised); border-color: color-mix(in srgb, var(--so-accent) 42%, var(--so-border)); }
.band-card-main { display: flex; align-items: center; gap: var(--so-space-4); min-height: 96px; padding: var(--so-space-4); }
.band-avatar { display: grid; place-items: center; width: 50px; height: 50px; flex: 0 0 50px; color: var(--so-text); background: var(--so-accent-soft); border: 1px solid color-mix(in srgb, var(--so-accent) 36%, var(--so-border)); border-radius: var(--so-radius-sm); font-size: 1rem; font-weight: 850; }
.archived-bands-shell .band-avatar { color: var(--so-text-secondary); background: var(--so-surface-3); border-color: var(--so-border); }
.band-identity h3 { margin: 0 0 var(--so-space-2); color: var(--so-text); font-size: 1.15rem; font-weight: var(--so-font-weight-semibold); letter-spacing: -.02em; overflow-wrap: anywhere; }
.band-role { display: inline-flex; align-items: center; width: fit-content; padding: .2rem .45rem; color: var(--so-text-secondary); background: var(--so-surface-3); border: 1px solid var(--so-border-light); border-radius: 999px; font-size: .65rem; font-weight: 800; line-height: 1.1; letter-spacing: .04em; text-transform: uppercase; }
.band-role-owner { color: var(--so-accent-hover); background: var(--so-accent-soft); border-color: color-mix(in srgb, var(--so-accent) 34%, var(--so-border)); }
.band-card-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--so-space-2) var(--so-space-4); padding: var(--so-space-3) var(--so-space-4); color: var(--so-text-muted); background: var(--so-surface); border-top: 1px solid var(--so-border); font-size: var(--so-font-size-sm); }
.band-card-footer form { margin: 0; }
.band-card-link { min-height: 40px; display: inline-flex; align-items: center; color: var(--so-accent-hover); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-semibold); text-decoration: none; white-space: nowrap; }
.band-card-link:hover, .band-card-link:focus-visible { color: var(--so-text); }
.band-card-footer .band-card-link { padding: .35rem .5rem; border: 1px solid transparent; border-radius: var(--so-radius-sm); background: transparent; cursor: pointer; font: inherit; }
.band-card-footer .band-card-link:hover { background: var(--so-accent-soft); border-color: var(--so-border); }
.bands-empty { padding: var(--so-space-10) var(--so-space-6); text-align: center; background: var(--so-surface); border: 1px dashed var(--so-border-strong); border-radius: var(--so-radius-md); }
.bands-empty-mark { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto var(--so-space-4); color: var(--so-accent-bright); background: var(--so-accent-soft); border-radius: 50%; font-size: 1.25rem; }
.bands-empty h2 { margin: 0 0 .4rem; color: var(--so-text); font-size: 1.15rem; font-weight: var(--so-font-weight-semibold); }
.bands-empty p { margin: 0; color: var(--so-text-secondary); font-size: .8rem; line-height: 1.5; }
@media (max-width: 767px) {
    .bands-heading { align-items: stretch; flex-direction: column; gap: var(--so-space-5); padding: var(--so-space-3) 0 var(--so-space-5); }
    .band-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--so-space-2); }
    .band-grid { grid-template-columns: 1fr; gap: var(--so-space-3); }
}
@media (max-width: 430px) {
    .bands-shell { width: 100%; }
    .bands-heading h1 { font-size: 2rem; }
    .band-actions { grid-template-columns: 1fr; }
    .band-action { min-height: 42px; padding: .55rem .8rem; font-size: .82rem; }
    .band-card-main { min-height: 84px; padding: var(--so-space-3); }
    .band-card-footer { align-items: flex-start; flex-direction: column; padding: var(--so-space-3); }
}

/* Google OAuth must not run in an embedded native WebView. The native shell
   uses email/password until the supported system-browser/native exchange lands. */
.giggeist-native .google-signin-form,
.giggeist-native .google-signin-form + .account-divider { display: none; }

/* Premium Feed: one activity-stream grid with explicit identity on every item. */
.giggeist-feed .feed-posts { gap: .55rem; }
.giggeist-feed .feed-post,
.giggeist-feed .feed-post-mine,
.giggeist-feed .feed-post-other {
    align-self: auto;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    max-width: none;
    border-radius: var(--so-radius-md);
}
.giggeist-feed .feed-post-mine {
    background: color-mix(in srgb, var(--so-accent) 5%, var(--so-surface-raised));
    border-color: color-mix(in srgb, var(--so-accent) 24%, var(--so-border));
    box-shadow: inset 3px 0 color-mix(in srgb, var(--so-accent) 72%, transparent);
}
.giggeist-feed .feed-post-mine .feed-avatar,
.giggeist-feed .feed-post-mine .feed-author strong,
.giggeist-feed .feed-reply-mine .feed-avatar,
.giggeist-feed .feed-reply-mine .feed-author strong { display: grid; }
.giggeist-feed .feed-author { min-width: 0; }
.giggeist-feed .feed-author strong { overflow: hidden; color: var(--so-text); text-overflow: ellipsis; white-space: nowrap; }
.giggeist-feed .feed-post > p { margin: .55rem 0 .35rem; }
.giggeist-feed .feed-post-actions summary { overflow: hidden; color: transparent; font-size: 0; }
.giggeist-feed .feed-post-actions summary::after { content: "•••"; color: var(--so-text-muted); font-size: .8rem; letter-spacing: .08em; }
.giggeist-feed .feed-reply-toggle { min-height: 32px; padding: .1rem 0; color: var(--so-text-muted) !important; font-size: .7rem; font-weight: 550; opacity: .82; }
.giggeist-feed .feed-replies { gap: .25rem; margin: .35rem 0 0 .4rem; padding: .3rem 0 0 .8rem; border-left: 2px solid color-mix(in srgb, var(--so-accent) 28%, var(--so-border)); }
.giggeist-feed .feed-reply,
.giggeist-feed .feed-reply-mine,
.giggeist-feed .feed-reply-other { justify-self: stretch; padding: .4rem 0; text-align: left; }
.giggeist-feed .feed-reply-mine header { justify-content: flex-start; }
.giggeist-feed .feed-reply > header { min-height: 32px; }
.giggeist-feed .feed-reply p { margin: .3rem 0 0 2.5rem; }
.giggeist-feed .feed-reply .feed-post-actions { margin-left: auto; }
.giggeist-feed .feed-composer { padding: .35rem .45rem; gap: .35rem; }
.giggeist-feed .feed-composer textarea { min-height: 40px; max-height: 112px; padding: .35rem .65rem; }
.giggeist-feed .feed-composer-actions { min-height: 40px; gap: .2rem; }
.giggeist-feed .feed-photo-action,
.giggeist-feed .feed-rock-on-action,
.giggeist-feed .feed-post-action { width: 40px; min-height: 40px; padding: .4rem; }
.giggeist-feed .feed-photo-action span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 767px) {
    .giggeist-feed .feed-posts { gap: .45rem; }
    .giggeist-feed .feed-post { padding: .65rem .72rem; }
    .giggeist-feed .feed-composer { min-height: 52px; }
}

/* Feed redesign pass: quiet the canvas texture behind the stream, turn the
   empty state into an invitation, and give the send control a ready state. */
.giggeist-feed {
    background-image: linear-gradient(rgba(11, 16, 24, .93), rgba(11, 16, 24, .96)), url('/giggeist-feed-pattern.svg');
}
.giggeist-feed .feed-posts {
    background: color-mix(in srgb, var(--so-bg) 97%, transparent);
}

.giggeist-feed .feed-empty {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: var(--so-space-3);
    margin: 0;
    padding: clamp(2rem, 8vw, 4rem) var(--so-space-5);
    text-align: center;
    background: transparent;
    border: 0;
}
.giggeist-feed .feed-empty-glyph {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    color: var(--so-accent-hover);
    background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--so-accent) 30%, transparent), color-mix(in srgb, var(--so-accent) 10%, transparent));
    border: 1px solid color-mix(in srgb, var(--so-accent) 40%, var(--so-border));
    border-radius: 50%;
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--so-accent) 8%, transparent);
}
.giggeist-feed .feed-empty h2 {
    margin: 0;
    color: var(--so-text);
    font-size: 1.15rem;
    font-weight: var(--so-font-weight-bold);
    letter-spacing: -.02em;
}
.giggeist-feed .feed-empty p {
    max-width: 34ch;
    margin: 0;
    color: var(--so-text-secondary);
    font-size: .9rem;
    line-height: 1.5;
}
.giggeist-feed .feed-empty-prompts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--so-space-2);
    margin-top: var(--so-space-2);
}
.giggeist-feed .feed-empty-prompts button {
    min-height: 40px;
    padding: .5rem .9rem;
    color: var(--so-text);
    background: color-mix(in srgb, var(--so-surface-raised) 88%, transparent);
    border: 1px solid var(--so-border-light);
    border-radius: 999px;
    font: inherit;
    font-size: .82rem;
    font-weight: var(--so-font-weight-semibold);
    cursor: pointer;
    transition: border-color 120ms var(--so-ease), background 120ms var(--so-ease), transform 80ms var(--so-ease);
}
.giggeist-feed .feed-empty-prompts button:hover,
.giggeist-feed .feed-empty-prompts button:focus-visible {
    border-color: var(--so-accent);
    background: var(--so-accent-soft);
    outline: none;
}
.giggeist-feed .feed-empty-prompts button:active { transform: scale(.97); }

.giggeist-feed .feed-post-action:not(:disabled) {
    color: #fff;
    background: var(--so-accent);
    border-color: transparent;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--so-accent) 22%, transparent), 0 6px 18px color-mix(in srgb, var(--so-accent) 32%, transparent);
}
.giggeist-feed .feed-post-action:not(:disabled):hover { background: var(--so-accent-hover); }

@media (max-width: 767px) {
    .giggeist-feed .feed-empty {
        flex: 1 1 auto;
        min-height: 0;
        padding: 1.5rem var(--so-space-4) calc(var(--so-feed-composer-height) + var(--so-mobile-nav-height) + 2rem + env(safe-area-inset-bottom));
        overflow-y: auto;
    }
}

/* ============================================================
   Feed post cards — one calm activity stream, not a chat.
   This block is authoritative: it resets the older bubble
   experiments and defines the finished card.
   ============================================================ */
.giggeist-feed .feed-posts {
    width: 100%;
    max-width: 640px;
    margin-inline: auto;
    gap: var(--so-space-3);
    padding-right: clamp(var(--so-space-3), 4vw, var(--so-space-6));
    padding-left: clamp(var(--so-space-3), 4vw, var(--so-space-6));
}

.giggeist-feed .feed-post,
.giggeist-feed .feed-post-mine,
.giggeist-feed .feed-post-other {
    align-self: stretch;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: var(--so-space-4);
    background: var(--so-surface-raised);
    border: 1px solid var(--so-border);
    border-radius: var(--so-radius-md);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.giggeist-feed .feed-post-mine {
    background: var(--so-surface-raised);
    border-color: var(--so-border);
    border-left: 3px solid color-mix(in srgb, var(--so-accent) 62%, transparent);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}

/* Header: avatar | name + timestamp | actions */
.giggeist-feed .feed-post-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
}
.giggeist-feed .feed-post-mine .feed-avatar,
.giggeist-feed .feed-post-other .feed-avatar,
.giggeist-feed .feed-post-mine .feed-author strong {
    display: grid;
}
.giggeist-feed .feed-avatar {
    width: 38px;
    height: 38px;
    color: var(--so-text);
    background: linear-gradient(150deg, color-mix(in srgb, var(--so-accent) 42%, var(--so-surface-3)), var(--so-surface-3));
    border: 1px solid color-mix(in srgb, var(--so-accent) 28%, var(--so-border));
    font-size: .72rem;
    font-weight: 800;
}
.giggeist-feed .feed-author {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .1rem;
    line-height: 1.2;
}
.giggeist-feed .feed-author strong {
    overflow: hidden;
    color: var(--so-text);
    font-size: .9rem;
    font-weight: var(--so-font-weight-semibold);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.giggeist-feed .feed-post time,
.giggeist-feed .feed-reply time {
    color: var(--so-text-muted);
    font-size: .74rem;
    font-weight: var(--so-font-weight-regular);
    font-variant-numeric: tabular-nums;
}

/* Actions trigger — quiet until you reach for it */
.giggeist-feed .feed-post-actions {
    align-self: start;
    margin: 0;
    opacity: .45;
    transition: opacity 140ms ease;
}
.giggeist-feed .feed-post:hover .feed-post-actions,
.giggeist-feed .feed-post:focus-within .feed-post-actions,
.giggeist-feed .feed-post-actions[open] { opacity: 1; }
.giggeist-feed .feed-post-actions summary {
    width: 30px;
    height: 30px;
    border-radius: var(--so-radius-sm);
}

/* Body */
.giggeist-feed .feed-post > p {
    max-width: none;
    margin: .7rem 0 0;
    color: var(--so-text);
    font-size: .94rem;
    line-height: 1.6;
}
.giggeist-feed .feed-edited { color: var(--so-text-muted); font-size: .72rem; }

/* Footer / reply affordance */
.giggeist-feed .feed-reply-toggle {
    min-height: 36px;
    margin-top: .8rem;
    padding: .55rem 0 0;
    color: var(--so-text-secondary) !important;
    border-top: 1px solid color-mix(in srgb, var(--so-border) 60%, transparent);
    font-size: .78rem;
    font-weight: var(--so-font-weight-semibold);
    opacity: 1;
}
.giggeist-feed .feed-reply-toggle:hover,
.giggeist-feed .feed-reply-toggle:focus-visible { color: var(--so-accent-hover) !important; }

/* Reply thread */
.giggeist-feed .feed-replies {
    gap: 0;
    margin: .8rem 0 0;
    padding: 0 0 0 var(--so-space-4);
    border-left: 2px solid color-mix(in srgb, var(--so-border) 75%, transparent);
}
.giggeist-feed .feed-reply,
.giggeist-feed .feed-reply-mine,
.giggeist-feed .feed-reply-other {
    justify-self: stretch;
    padding: .7rem 0;
    text-align: left;
}
.giggeist-feed .feed-reply + .feed-reply {
    border-top: 1px solid color-mix(in srgb, var(--so-border) 45%, transparent);
}
.giggeist-feed .feed-reply > header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    min-height: 0;
    justify-content: flex-start;
}
.giggeist-feed .feed-reply-mine header { justify-content: flex-start; }
.giggeist-feed .feed-reply-avatar { width: 28px; height: 28px; font-size: .6rem; }
.giggeist-feed .feed-reply p {
    margin: .4rem 0 0;
    color: var(--so-text-secondary);
    font-size: .88rem;
    line-height: 1.55;
}
.giggeist-feed .feed-reply .feed-post-actions summary { width: 26px; height: 26px; }

/* Pinned: a ribbon, not a wash */
.giggeist-feed .feed-post-pinned {
    background: var(--so-surface-raised);
    border-color: color-mix(in srgb, var(--so-accent) 45%, var(--so-border));
    box-shadow: inset 0 2px color-mix(in srgb, var(--so-accent) 70%, transparent), 0 1px 2px rgba(0, 0, 0, .18);
}
.giggeist-feed .feed-post-pinned .feed-pinned-label {
    order: -1;
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin: 0 0 .4rem;
    padding: .2rem .5rem;
    color: var(--so-accent-hover);
    background: color-mix(in srgb, var(--so-accent) 14%, transparent);
    border-radius: 999px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Images */
.giggeist-feed .feed-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem;
    margin: .8rem 0 0;
}
.giggeist-feed .feed-images a {
    overflow: hidden;
    background: var(--so-surface-3);
    border-radius: var(--so-radius-sm);
}
.giggeist-feed .feed-images img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.giggeist-feed .feed-images:has(a:only-child) { grid-template-columns: minmax(0, 1fr); }
.giggeist-feed .feed-images:has(a:only-child) img { aspect-ratio: 16 / 10; max-height: 420px; }

/* Inline reply composer — match the app's primary action */
.giggeist-feed .feed-reply-composer { gap: .5rem; margin-top: .7rem; }
.giggeist-feed .feed-reply-composer label {
    color: var(--so-text-secondary);
    font-size: .74rem;
    font-weight: var(--so-font-weight-semibold);
}
.giggeist-feed .feed-reply-composer textarea {
    min-height: 68px;
    padding: .6rem .7rem;
    color: var(--so-text);
    background: var(--so-surface);
    border: 1px solid var(--so-border-light);
    border-radius: var(--so-radius-sm);
}
.giggeist-feed .feed-reply-composer .btn {
    justify-self: end;
    min-height: 40px;
    padding: .5rem 1.1rem;
    color: #fff;
    background: var(--so-accent);
    border: 1px solid var(--so-accent);
    border-radius: var(--so-radius-sm);
    font-weight: var(--so-font-weight-semibold);
}
.giggeist-feed .feed-reply-composer .btn:hover:not(:disabled) { background: var(--so-accent-hover); border-color: var(--so-accent-hover); }
.giggeist-feed .feed-reply-composer .btn:disabled { opacity: .5; }

@media (max-width: 767px) {
    .giggeist-feed .feed-posts { max-width: none; padding-inline: var(--so-space-3); }
    .giggeist-feed .feed-post,
    .giggeist-feed .feed-post-mine,
    .giggeist-feed .feed-post-other { padding: var(--so-space-3); border-radius: var(--so-radius-md); }
    .giggeist-feed .feed-post-actions { opacity: 1; }
    .giggeist-feed .feed-replies { padding-left: var(--so-space-3); }
}

/* ============================================================
   Feed composer — one floating glass pill, top and bottom of
   the app sharing a material. Plus the "rock on" flourish.
   ============================================================ */

/* Desktop: the feed flows in the page; the composer floats,
   bottom-anchored and centred over the reading column. */
@media (min-width: 768px) {
    .giggeist-feed {
        display: block;
        height: auto;
        min-height: calc(100dvh - 66px - 3rem);
        overflow: visible;
        background: transparent;
    }
    .giggeist-feed .feed-posts {
        height: auto;
        max-height: none;
        flex: none;
        overflow: visible;
        padding-bottom: 7rem;
        background: transparent;
    }
    .giggeist-feed .feed-empty { padding-bottom: 8rem; }

    .giggeist-feed .feed-composer {
        position: fixed;
        z-index: 40;
        right: 0;
        bottom: 1.5rem;
        left: 242px;
        width: min(640px, calc(100% - 3rem));
        margin: 0 auto;
        padding: .45rem .45rem .45rem 1rem;
        background: linear-gradient(180deg, rgba(52, 58, 76, .5), rgba(18, 23, 35, .66));
        border: 1px solid rgba(238, 240, 250, .14);
        border-radius: 18px;
        box-shadow: 0 18px 44px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .1);
        -webkit-backdrop-filter: saturate(155%) blur(22px);
        backdrop-filter: saturate(155%) blur(22px);
    }
}

/* Mobile: a rounded pill that reads as a sibling of the floating
   bottom nav — same material, same insets, a real gap between. */
@media (max-width: 767px) {
    .giggeist-feed .feed-composer {
        position: fixed;
        z-index: 40;
        right: max(.5rem, env(safe-area-inset-right));
        bottom: calc(var(--so-mobile-nav-height) + env(safe-area-inset-bottom));
        left: max(.5rem, env(safe-area-inset-left));
        min-height: 0;
        margin: 0;
        padding: .4rem .4rem .4rem .85rem;
        background: linear-gradient(180deg, rgba(52, 58, 76, .5), rgba(18, 23, 35, .66));
        border: 1px solid rgba(238, 240, 250, .16);
        border-radius: 18px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .12);
        -webkit-backdrop-filter: saturate(155%) blur(22px);
        backdrop-filter: saturate(155%) blur(22px);
    }
    .giggeist-feed .feed-posts {
        padding-bottom: calc(var(--so-mobile-nav-height) + 5rem + env(safe-area-inset-bottom));
        scroll-padding-bottom: calc(var(--so-mobile-nav-height) + 5rem + env(safe-area-inset-bottom));
    }
    .giggeist-feed .feed-empty {
        padding-bottom: calc(var(--so-mobile-nav-height) + 5.5rem + env(safe-area-inset-bottom));
    }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .giggeist-feed .feed-composer { background: var(--so-surface-raised); }
}

.giggeist-feed .feed-composer textarea {
    background: color-mix(in srgb, var(--so-surface) 60%, transparent);
    border-color: color-mix(in srgb, var(--so-border-light) 80%, transparent);
    transition: background 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.giggeist-feed .feed-composer textarea:focus,
.giggeist-feed .feed-composer textarea:focus-visible {
    background: var(--so-surface);
    border-color: color-mix(in srgb, var(--so-accent) 55%, var(--so-border-light));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--so-accent) 40%, transparent);
    outline: none;
}
/* Only the textarea carries the focus ring — the pill itself stays calm so
   there is no double outline flashing in and out on an empty focus/blur. */
.giggeist-feed .feed-composer:focus-within {
    border-color: rgba(238, 240, 250, .16);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .12);
}

/* --- "Rock on" flourish -------------------------------------- */
.giggeist-feed .feed-rock-on-action {
    position: relative;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    overflow: visible;
    font-size: 1.5rem;
    transition: transform 120ms var(--so-ease), background 140ms ease;
}
.giggeist-feed .feed-rock-on-action:active:not(:disabled) { transform: scale(.9); }
.giggeist-feed .feed-rock-on-glyph {
    display: inline-block;
    line-height: 1;
    transform-origin: 68% 72%;
}
.giggeist-feed .feed-rock-on-action:hover:not(:disabled) .feed-rock-on-glyph {
    animation: gg-rockon-wiggle 520ms ease;
}
.giggeist-feed .feed-rock-on-action.gg-rockon-pop .feed-rock-on-glyph {
    animation: gg-rockon-pop 620ms cubic-bezier(.34, 1.56, .64, 1);
}
.giggeist-feed .feed-rock-on-action::after {
    content: "";
    position: absolute;
    inset: -3px;
    border: 2px solid color-mix(in srgb, var(--so-accent) 65%, transparent);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}
.giggeist-feed .feed-rock-on-action.gg-rockon-pop::after {
    animation: gg-rockon-wave 620ms ease-out;
}

@keyframes gg-rockon-wiggle {
    0%, 100% { transform: rotate(0); }
    22% { transform: rotate(-16deg); }
    48% { transform: rotate(12deg); }
    72% { transform: rotate(-6deg); }
    88% { transform: rotate(3deg); }
}
@keyframes gg-rockon-pop {
    0% { transform: scale(1) rotate(0); }
    28% { transform: scale(.78) rotate(-14deg); }
    55% { transform: scale(1.45) rotate(10deg); }
    78% { transform: scale(.96) rotate(-3deg); }
    100% { transform: scale(1) rotate(0); }
}
@keyframes gg-rockon-wave {
    0% { opacity: .85; transform: scale(.55); }
    100% { opacity: 0; transform: scale(2.6); }
}

.gg-rockon-particle {
    position: fixed;
    z-index: 9999;
    line-height: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: gg-rockon-fly 950ms cubic-bezier(.15, .7, .35, 1) var(--delay, 0ms) forwards;
    will-change: transform, opacity;
}
@keyframes gg-rockon-fly {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.35) rotate(0); }
    16% { opacity: 1; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.05) rotate(var(--rot)); }
}
@media (prefers-reduced-motion: reduce) {
    .giggeist-feed .feed-rock-on-action:hover:not(:disabled) .feed-rock-on-glyph,
    .giggeist-feed .feed-rock-on-action.gg-rockon-pop .feed-rock-on-glyph,
    .giggeist-feed .feed-rock-on-action.gg-rockon-pop::after { animation: none; }
    .gg-rockon-particle { display: none; }
}

/* Feed surface is flat and opaque — the canvas texture must never bleed
   through the stream on scroll or overscroll bounce. The `.main-content main`
   selector matches the specificity of the scoped rule that otherwise forces
   page <main> elements transparent. */
.main-content:has(.giggeist-feed) { background-image: none; }
.giggeist-feed,
.main-content main.giggeist-feed.band-feed {
    background: var(--so-bg);
    background-image: none;
}
.giggeist-feed .feed-posts,
.giggeist-feed .feed-empty {
    background: var(--so-bg);
}
@media (min-width: 768px) {
    .giggeist-feed,
    .main-content main.giggeist-feed.band-feed,
    .giggeist-feed .feed-posts,
    .giggeist-feed .feed-empty { background: var(--so-bg); }
    .giggeist-feed .feed-posts { padding-bottom: 8.5rem; }
}

/* ============================================================
   Gigs list + Events workspace cards — onto the design-system
   tokens so they match the Messages cards and adapt to theme.
   Supersedes the earlier hard-coded-hex versions.
   ============================================================ */
.schedule-card,
.event-card {
    align-items: center;
    min-height: 76px;
    padding: var(--so-space-3) var(--so-space-4);
    background: var(--so-surface-raised);
    border: 1px solid var(--so-border);
    border-radius: var(--so-radius-md);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
    transition: border-color 120ms var(--so-ease), background 120ms var(--so-ease);
}
.schedule-card:hover,
.schedule-card:focus-visible,
.event-card:hover,
.event-card:focus-visible {
    background: color-mix(in srgb, var(--so-surface-3) 55%, var(--so-surface-raised));
    border-color: var(--so-border-light);
    outline: none;
}
.schedule-card:focus-visible,
.event-card:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--so-accent) 40%, transparent); }

.schedule-date,
.event-date {
    min-height: 58px;
    color: var(--so-text-secondary);
    background: var(--so-surface-3);
    border: 1px solid color-mix(in srgb, var(--so-border) 60%, transparent);
    border-radius: var(--so-radius-sm);
}
.schedule-date span,
.schedule-date small,
.event-date span,
.event-date small { color: var(--so-text-muted); }
.schedule-date strong,
.event-date strong { color: var(--so-text); font-size: 1.35rem; font-variant-numeric: tabular-nums; }

.schedule-card-copy > strong,
.event-card-copy > strong { color: var(--so-text); }
.schedule-card-copy small,
.event-card-copy small { color: var(--so-text-muted); }
.schedule-card-copy em { color: var(--so-accent-hover); }

.schedule-card > b,
.event-card > b {
    color: var(--so-text-muted);
    font-size: 1.1rem;
    font-weight: var(--so-font-weight-regular);
}

/* Owner's compact gig-readiness board — line-up / times / money at a glance,
   the calm-by-default language from EventDetails' "At a glance" rows: quiet
   when healthy, an amber cue only when something needs attention. */
.schedule-readiness { display: flex; flex-wrap: wrap; gap: .32rem; margin-top: .3rem; }
.readiness-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .18rem .5rem .18rem .4rem;
    color: var(--so-text-secondary);
    background: var(--so-surface-3);
    border: 1px solid color-mix(in srgb, var(--so-border) 70%, transparent);
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.readiness-chip i { color: var(--so-text-muted); font-size: .78em; font-style: normal; }
.readiness-chip.needs-attention { color: var(--so-warning); background: rgba(181,130,43,.13); border-color: color-mix(in srgb, var(--so-warning) 38%, transparent); }
.readiness-chip.needs-attention i { color: var(--so-warning); }
@media (max-width: 430px) {
    .schedule-readiness { gap: .26rem; }
    .readiness-chip { padding: .16rem .42rem .16rem .36rem; font-size: .64rem; }
}

/* Segmented control */
.schedule-tabs button,
.events-tabs button {
    color: var(--so-text-secondary);
    background: var(--so-surface-2);
    border: 1px solid var(--so-border);
    border-radius: var(--so-radius-sm);
    font-weight: var(--so-font-weight-semibold);
    transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}
.schedule-tabs button:hover:not([aria-selected="true"]),
.events-tabs button:hover:not([aria-selected="true"]) {
    color: var(--so-text);
    background: var(--so-surface-3);
}
.schedule-tabs button[aria-selected="true"],
.events-tabs button[aria-selected="true"] {
    color: #fff;
    background: var(--so-accent);
    border-color: var(--so-accent);
}
.schedule-tabs button:focus-visible,
.events-tabs button:focus-visible { outline: 2px solid var(--so-focus); outline-offset: 2px; }

:root[data-theme="light"] .schedule-tabs button,
:root[data-theme="light"] .events-tabs button {
    background: #fff;
    border-color: var(--so-border);
    border-radius: 999px;
}
:root[data-theme="light"] .schedule-tabs button[aria-selected="true"],
:root[data-theme="light"] .events-tabs button[aria-selected="true"] {
    color: #704675;
    background: var(--so-accent-soft);
    border-color: color-mix(in srgb, var(--so-accent) 24%, var(--so-border));
}

/* Headings + empty states */
.schedule-heading p,
.events-heading p { color: var(--so-accent-hover); }
.schedule-heading h1,
.events-heading h1 { color: var(--so-text); }
.schedule-heading span,
.events-heading span { color: var(--so-text-muted); }
.schedule-empty,
.events-empty { color: var(--so-text-secondary); }
.schedule-empty h2,
.events-empty h2 { color: var(--so-text); }

/* ============================================================
   LIGHT MODE — the designed counterpart, not an inversion.
   Glass goes white-translucent, the canvas texture drops to a
   whisper, and the Home surfaces that hard-code dark hex are
   brought onto the tokens. The band poster/hero stays dark
   artwork by design (see the omission above).
   ============================================================ */

/* --- Chrome: white-frosted glass instead of dark-frosted --- */
:root[data-theme="light"] .topbar {
    background: linear-gradient(180deg, rgba(251, 249, 252, .88), rgba(245, 239, 247, .72));
    border-bottom: 1px solid var(--so-border);
    box-shadow: 0 1px 2px rgba(52, 38, 55, .04);
    -webkit-backdrop-filter: saturate(140%) blur(22px);
    backdrop-filter: saturate(140%) blur(22px);
}
:root[data-theme="light"] .mobile-nav-shell .navbar {
    background: linear-gradient(180deg, rgba(251, 249, 252, .9), rgba(242, 233, 244, .76));
    border-bottom: 1px solid var(--so-border);
    box-shadow: inset 0 -1px rgba(255, 255, 255, .5);
    -webkit-backdrop-filter: saturate(140%) blur(22px);
    backdrop-filter: saturate(140%) blur(22px);
}
:root[data-theme="light"] .mobile-nav-shell.drawer-active .navbar {
    background: var(--so-shell-gradient);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
@media (max-width: 768px) {
    :root[data-theme="light"] .mobile-bottom-nav {
        background: linear-gradient(180deg, rgba(251, 249, 252, .88), rgba(242, 233, 244, .74));
        border: 1px solid var(--so-border);
        box-shadow: 0 8px 24px rgba(52, 38, 55, .11), 0 20px 48px rgba(52, 38, 55, .12), inset 0 1px rgba(255, 255, 255, .72);
    }
    :root[data-theme="light"] .mobile-nav-selection::before {
        background: var(--so-nav-active-bg);
        border-color: var(--so-nav-active-border);
        box-shadow: inset 0 1px rgba(255, 255, 255, .56), 0 2px 8px rgba(52, 38, 55, .08);
    }
    :root[data-theme="light"] .mobile-bottom-link.active { color: var(--so-accent-ink, var(--so-accent-hover)); }
}
:root[data-theme="light"] .giggeist-feed .feed-composer {
    background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .68));
    border: 1px solid var(--so-border-strong);
    box-shadow: 0 1px 2px rgba(23, 28, 54, .04), 0 10px 26px rgba(23, 28, 54, .1);
    -webkit-backdrop-filter: saturate(140%) blur(22px);
    backdrop-filter: saturate(140%) blur(22px);
}

/* --- Canvas texture: a whisper on light, and never behind the stream --- */
:root[data-theme="light"] body,
:root[data-theme="light"] .main-content {
    background-color: var(--so-bg);
    background-image: linear-gradient(rgba(236, 237, 242, .955), rgba(236, 237, 242, .955)), url('/giggeist-pattern.svg');
    background-blend-mode: normal;
}
/* --- Home: bring the hard-coded dark cards onto the tokens (hero stays dark) --- */
:root[data-theme="light"] .home-next-gig,
:root[data-theme="light"] .home-secondary-card {
    background: var(--so-surface);
    border-color: var(--so-border);
    box-shadow: var(--so-shadow-sm);
}
:root[data-theme="light"] .home-next-gig > span,
:root[data-theme="light"] .home-secondary-card > span,
:root[data-theme="light"] .home-next-gig em,
:root[data-theme="light"] .home-secondary-card em { color: var(--so-accent-hover); }
:root[data-theme="light"] .home-next-gig strong,
:root[data-theme="light"] .home-secondary-card strong { color: var(--so-text); }
:root[data-theme="light"] .home-next-gig p { color: var(--so-text-secondary); }
/* "Needs attention" reads as a neutral card with an amber edge — the same
   language EventDetails uses — not a warm cream panel clashing with the
   cool canvas. Matches the dark theme, which never tinted this card. */
:root[data-theme="light"] .home-secondary-card.attention {
    background: var(--so-surface);
    border-color: var(--so-border);
    box-shadow: inset 3px 0 0 var(--so-warning), var(--so-shadow-sm);
}
:root[data-theme="light"] .home-secondary-card.attention > span { color: var(--so-warning); }

:root[data-theme="light"] .home-pinned-post {
    color: var(--so-text-secondary);
    background: var(--so-surface);
    border-color: color-mix(in srgb, var(--so-accent) 34%, var(--so-border));
    box-shadow: var(--so-shadow-sm);
}
:root[data-theme="light"] .home-pinned-label {
    color: var(--so-accent-hover);
    background: var(--so-accent-soft);
}
:root[data-theme="light"] .home-pinned-avatar {
    color: var(--so-text-secondary);
    background: var(--so-surface-3);
}
:root[data-theme="light"] .home-pinned-post header strong,
:root[data-theme="light"] .home-pinned-post > p { color: var(--so-text); }
:root[data-theme="light"] .home-pinned-post time { color: var(--so-text-muted); }
:root[data-theme="light"] .home-pinned-post > a { color: var(--so-accent-hover); }

/* Band sub-navigation tabs are now token-driven in BandNavigation.razor.css. */

/* --- Appearance control in the account menu --- */
.appearance-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    padding: .55rem .85rem;
}
.appearance-row > span:first-child {
    flex: 1;
    color: var(--so-text-secondary);
    font-size: .82rem;
    font-weight: 500;
}
.appearance-toggle {
    display: inline-flex;
    padding: 3px;
    background: var(--so-surface-3);
    border: 1px solid var(--so-border);
    border-radius: 999px;
}
.appearance-toggle button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 26px;
    padding: 0;
    color: var(--so-text-muted);
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}
.appearance-toggle button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.appearance-toggle button[aria-pressed="true"] {
    color: var(--so-text);
    background: var(--so-surface);
    box-shadow: var(--so-shadow-sm);
}
.appearance-toggle button:focus-visible { outline: 2px solid var(--so-focus); outline-offset: 2px; }
.mobile-appearance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    width: 100%;
    padding: .6rem .85rem;
    border-top: 1px solid var(--so-border);
    border-bottom: 1px solid var(--so-border);
}
.mobile-appearance-row > span:first-child {
    color: var(--so-text-secondary);
    font-size: .82rem;
    font-weight: 500;
}

/* --- Top bar + mobile header: chrome text/controls onto the tokens --- */
:root[data-theme="light"] .band-home-identity > span,
:root[data-theme="light"] .account-copy small,
:root[data-theme="light"] .account-chevron { color: var(--so-text-muted); }
:root[data-theme="light"] .band-home-identity h1,
:root[data-theme="light"] .band-switcher-trigger,
:root[data-theme="light"] .band-switcher-trigger strong,
:root[data-theme="light"] .account-copy strong { color: var(--so-text); }
:root[data-theme="light"] .band-switcher-trigger:hover,
:root[data-theme="light"] .band-switcher-trigger:focus-visible { background: var(--so-surface-3); }
:root[data-theme="light"] .notification-bell {
    color: var(--so-text-secondary);
    background: var(--so-surface);
    border-color: var(--so-border);
}
:root[data-theme="light"] .notification-bell:hover { color: var(--so-text); border-color: var(--so-border-light); }
:root[data-theme="light"] .user-avatar {
    color: var(--so-text);
    background: var(--so-surface-3);
    border-color: var(--so-border-light);
}
:root[data-theme="light"] .account-menu > summary:hover,
:root[data-theme="light"] .account-menu[open] > summary {
    background: var(--so-surface-3);
    border-color: var(--so-border);
}

:root[data-theme="light"] .stageops-brand-name,
:root[data-theme="light"] .mobile-account-menu > summary { color: var(--so-text); }
:root[data-theme="light"] .mobile-notification-bell {
    color: var(--so-text-secondary);
    background: var(--so-surface);
    border-color: var(--so-border);
}
:root[data-theme="light"] .mobile-band-avatar.initials,
:root[data-theme="light"] .band-switcher-avatar.initials {
    color: var(--so-accent-hover);
    background: var(--so-accent-soft);
}
:root[data-theme="light"] .mobile-menu-button span { background: var(--so-text-secondary); }
:root[data-theme="light"] .mobile-menu-button:hover,
:root[data-theme="light"] .mobile-menu-button:focus-visible {
    background: var(--so-surface-3);
    border-color: var(--so-border);
}
:root[data-theme="light"] .mobile-nav-shell.drawer-active .mobile-menu-button {
    background: var(--so-accent-soft);
    border-color: color-mix(in srgb, var(--so-accent) 35%, var(--so-border));
}

/* --- Account popover (desktop + mobile): identity block, sign-out, dividers --- */
:root[data-theme="light"] .account-identity strong,
:root[data-theme="light"] .mobile-account-identity-copy strong { color: var(--so-text); }
:root[data-theme="light"] .user-avatar.large,
:root[data-theme="light"] .mobile-menu-avatar {
    color: var(--so-text);
    background: var(--so-surface-3);
    border-color: var(--so-border-light);
}
:root[data-theme="light"] .account-menu-link.sign-out,
:root[data-theme="light"] .mobile-account-link.mobile-sign-out { color: var(--so-text-secondary); }
:root[data-theme="light"] .account-menu-link.sign-out:hover,
:root[data-theme="light"] .mobile-account-link.mobile-sign-out:hover { color: var(--so-text); }
:root[data-theme="light"] .account-identity,
:root[data-theme="light"] .account-menu-actions,
:root[data-theme="light"] .account-popover > form,
:root[data-theme="light"] .mobile-account-identity,
:root[data-theme="light"] .mobile-account-actions { border-color: var(--so-border); }

/* Sidebar nav item hover/active now token-driven in NavMenu.razor.css —
   an accent rail + soft tint in both themes, no heavy fill. */

/* ============================================================
   LIGHT MODE — overlays, popovers, forms, and the last of the
   hard-coded dark surfaces. Keep the page a calm place: soft
   scrims, off-white cards, restrained purple.
   ============================================================ */

/* Scrims: a soft neutral veil, never near-black across white. */
:root[data-theme="light"] .gg-sheet-backdrop,
:root[data-theme="light"] .mobile-band-switcher-scrim,
:root[data-theme="light"] .mobile-nav-scrim,
:root[data-theme="light"] .hero-position-backdrop {
    background: rgba(33, 38, 47, .30);
}

/* Popovers / sheets land on the raised surface with a soft shadow. */
:root[data-theme="light"] .account-popover,
:root[data-theme="light"] .mobile-account-popover,
:root[data-theme="light"] .band-switcher-popover,
:root[data-theme="light"] .mobile-band-switcher-popover,
:root[data-theme="light"] .gg-sheet,
:root[data-theme="light"] .feed-post-actions > div,
:root[data-theme="light"] .band-photo-menu > div,
:root[data-theme="light"] .hero-position-dialog {
    color: var(--so-text);
    background: var(--so-surface-raised);
    border-color: var(--so-border);
    box-shadow: var(--so-shadow-lg);
}

/* List rows inside those popovers: readable text, gentle hover. */
:root[data-theme="light"] .band-switcher-option,
:root[data-theme="light"] .mobile-band-switcher-option,
:root[data-theme="light"] .band-switcher-actions a,
:root[data-theme="light"] .mobile-band-switcher-actions a,
:root[data-theme="light"] .feed-post-actions button { color: var(--so-text-secondary); }
:root[data-theme="light"] .band-switcher-option:hover,
:root[data-theme="light"] .band-switcher-option:focus-visible,
:root[data-theme="light"] .mobile-band-switcher-option:hover,
:root[data-theme="light"] .mobile-band-switcher-option:focus-visible,
:root[data-theme="light"] .band-switcher-actions a:hover,
:root[data-theme="light"] .band-switcher-actions a:focus-visible,
:root[data-theme="light"] .mobile-band-switcher-actions a:hover,
:root[data-theme="light"] .feed-post-actions button:hover {
    color: var(--so-text);
    background: var(--so-surface-3);
}
:root[data-theme="light"] .band-option-avatar,
:root[data-theme="light"] .mobile-band-switcher-option img {
    color: var(--so-accent-hover);
    background: var(--so-accent-soft);
}
:root[data-theme="light"] .band-switcher-trigger:hover,
:root[data-theme="light"] .band-switcher-trigger:focus-visible,
:root[data-theme="light"] .band-switcher-trigger:active,
:root[data-theme="light"] .account-menu > summary:hover,
:root[data-theme="light"] .account-menu[open] > summary { background: var(--so-surface-3); border-color: var(--so-border); }

/* Form fields: never a black well on white. */
:root[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]),
:root[data-theme="light"] textarea,
:root[data-theme="light"] select,
:root[data-theme="light"] .form-control,
:root[data-theme="light"] .form-select,
:root[data-theme="light"] .so-input,
:root[data-theme="light"] .so-select,
:root[data-theme="light"] .so-textarea {
    color: var(--so-text);
    background: var(--so-surface-1);
    border-color: var(--so-border-light);
}
:root[data-theme="light"] .form-control:focus,
:root[data-theme="light"] .form-select:focus,
:root[data-theme="light"] input:focus,
:root[data-theme="light"] textarea:focus,
:root[data-theme="light"] select:focus {
    background: #fff;
    border-color: var(--so-accent);
    box-shadow: 0 0 0 3px var(--so-accent-soft);
}

/* Pinned announcement on Home: was a dark card — bring it fully onto tokens. */
:root[data-theme="light"] .home-pinned-post,
:root[data-theme="light"] .peaceful-home .home-pinned-post {
    color: var(--so-text);
    background: var(--so-surface-raised);
    border-color: color-mix(in srgb, var(--so-accent) 26%, var(--so-border));
    box-shadow: var(--so-shadow-sm);
    opacity: 1;
}
:root[data-theme="light"] .home-pinned-post > p,
:root[data-theme="light"] .home-pinned-post header strong { color: var(--so-text); }
:root[data-theme="light"] .home-pinned-post time { color: var(--so-text-muted); }
:root[data-theme="light"] .home-pinned-post > a { color: var(--so-accent-hover); }
:root[data-theme="light"] .home-pinned-label {
    color: var(--so-accent-hover);
    background: var(--so-accent-soft);
}
:root[data-theme="light"] .home-pinned-avatar {
    color: var(--so-accent-hover);
    background: var(--so-accent-soft);
}

/* Common dark surfaces that a few scoped rules still hard-code. */
:root[data-theme="light"] .slot-list,
:root[data-theme="light"] .add-slot-panel,
:root[data-theme="light"] .attention-row,
:root[data-theme="light"] .owner-member-gigs-list > a,
:root[data-theme="light"] .owner-member-gigs-list > div,
:root[data-theme="light"] .rail-card,
:root[data-theme="light"] .event-card-footer,
:root[data-theme="light"] .member-dashboard-section,
:root[data-theme="light"] .attention-centre {
    background: var(--so-surface-1);
    border-color: var(--so-border);
}
:root[data-theme="light"] .empty-template { border-color: var(--so-border-light); }
:root[data-theme="light"] .rail-activity-row:hover { background: var(--so-surface-2); }

/* --- Event venue hero: dark artwork that fades into the page in both themes.
   .event-hero-shade already ends its 180deg gradient at --so-page-bg, which
   now resolves to the live theme ground, so the hero bottom edge *is* the
   page colour — no hard seam. Deepen that fade a touch more here. --- */
.event-hero-shade {
    background:
        linear-gradient(90deg, rgba(5, 8, 13, .48), rgba(5, 8, 13, .08) 68%, rgba(5, 8, 13, .2)),
        linear-gradient(180deg, rgba(4, 7, 12, .16) 0%, rgba(4, 7, 12, .14) 26%, rgba(5, 8, 14, .62) 58%, color-mix(in srgb, var(--so-page-bg) 88%, #05080e) 84%, var(--so-page-bg) 100%);
}
:root[data-theme="light"] .event-venue-hero {
    background: radial-gradient(circle at 78% 16%, rgba(141, 92, 246, .22), transparent 40%), linear-gradient(160deg, #221a36 0%, #14192a 52%, #10131d 100%);
}
.event-top-flow > .readiness-summary {
    background: var(--so-surface-raised);
    box-shadow: var(--so-shadow-sm);
}

/* Emoji in a message render larger than the surrounding text; a message that
   is nothing but emoji goes jumbo. */
.giggeist-feed .feed-post > p .feed-emoji,
.giggeist-feed .feed-reply p .feed-emoji { font-size: 1.5em; line-height: 1; vertical-align: -.18em; }
.giggeist-feed .feed-post > p.is-emoji-only,
.giggeist-feed .feed-reply p.is-emoji-only { line-height: 1.1; }
.giggeist-feed .feed-post > p.is-emoji-only .feed-emoji,
.giggeist-feed .feed-reply p.is-emoji-only .feed-emoji { font-size: 2.7em; vertical-align: -.1em; }

/* ============================================================
   Wisteria secondary accent — woven in sparingly.
   ============================================================ */
.btn-primary {
    box-shadow: var(--so-primary-action-shadow);
}
.btn-primary:hover { box-shadow: var(--so-primary-action-shadow); }

.nav-attention-badge,
.mobile-bottom-icon strong,
.mobile-notification-bell strong,
.notification-bell > strong { background: var(--so-accent-gradient); }

.giggeist-feed .feed-post-mine { border-left-color: color-mix(in srgb, var(--so-accent) 52%, var(--so-accent-2) 34%); }

.giggeist-feed .feed-post-pinned {
    box-shadow: inset 0 2px 0 0 var(--so-accent), var(--so-shadow-sm);
    border-image: linear-gradient(120deg, color-mix(in srgb, var(--so-accent) 45%, var(--so-border)), color-mix(in srgb, var(--so-accent-2) 40%, var(--so-border))) 1;
}
.giggeist-feed .feed-post-pinned .feed-pinned-label {
    color: #fff;
    background: linear-gradient(120deg,
        color-mix(in srgb, var(--so-accent) 88%, #000 4%),
        color-mix(in srgb, var(--so-accent-2) 82%, var(--so-accent) 8%));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.giggeist-feed .feed-empty-glyph {
    background: radial-gradient(circle at 35% 30%, var(--so-accent-2-soft), transparent 60%), radial-gradient(circle at 65% 70%, color-mix(in srgb, var(--so-accent) 24%, transparent), transparent 60%);
    border-color: color-mix(in srgb, var(--so-accent) 34%, var(--so-border));
}
.giggeist-feed .feed-rock-on-action.gg-rockon-pop::after {
    border-color: var(--so-accent-2);
}

@media (max-width: 768px) {
    .mobile-nav-selection::before {
        box-shadow: inset 0 1px rgba(255,255,255,.24), 0 4px 14px rgba(0,0,0,.18);
    }
    :root[data-theme="light"] .mobile-nav-selection::before {
        box-shadow: inset 0 1px rgba(255,255,255,.5), 0 2px 8px rgba(52,38,55,.08);
    }
}

/* GigChat: the canvas pattern behind messages is a whisper on light, not a
   mid-grey web competing with the bubbles. */
:root[data-theme="light"] .chat-messages {
    background-color: var(--so-surface-1);
    background-image: linear-gradient(rgba(249, 250, 252, .93), rgba(249, 250, 252, .93)), url('/giggeist-pattern.svg');
    background-blend-mode: normal;
}
:root[data-theme="light"] .chat-shell { background: var(--so-surface-raised); }
:root[data-theme="light"] .chat-header,
:root[data-theme="light"] .chat-composer { background: var(--so-surface-raised); }

/* ============================================================
   FLAT GROUNDS — no canvas texture on any screen, either theme.
   This supersedes every earlier staged pattern / line-art /
   radial-dot experiment (feed, chat, shells, body, main).
   ============================================================ */
body,
.main-content,
.band-feed,
.giggeist-feed,
.giggeist-feed .feed-posts,
.giggeist-feed .feed-empty,
.chat-messages {
    background-image: none !important;
    background-blend-mode: normal;
}
body,
.main-content,
.band-feed,
.giggeist-feed,
.giggeist-feed .feed-posts,
.giggeist-feed .feed-empty {
    background-color: var(--so-bg);
}
.chat-messages { background-color: var(--so-bg); }

/* ============================================================
   PINNED POST — a compact chip, not a stretched pill ribbon.
   ============================================================ */
.giggeist-feed .feed-post-pinned,
.feed-post-pinned {
    background: color-mix(in srgb, var(--so-accent) 7%, var(--so-surface-raised));
    border: 1px solid color-mix(in srgb, var(--so-accent) 38%, var(--so-border));
    border-image: none;
    box-shadow: var(--so-shadow-sm);
}
.giggeist-feed .feed-post-pinned .feed-pinned-label,
.feed-post-pinned .feed-pinned-label {
    order: -1;
    grid-column: 1 / -1;
    justify-self: start;
    align-self: start;
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    width: auto;
    margin: 0 0 .55rem;
    padding: .22rem .5rem .22rem .42rem;
    color: #fff;
    background: linear-gradient(120deg, var(--so-accent), color-mix(in srgb, var(--so-accent-2) 78%, var(--so-accent)));
    border: 0;
    border-radius: 999px;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.giggeist-feed .feed-post-pinned .feed-pinned-label > span,
.feed-post-pinned .feed-pinned-label > span { font-size: .78rem; line-height: 1; }

/* ============================================================
   Pass 1/2 — data in the mono voice. Dates, day tags, call
   times and money read as a production document, not body
   copy. Kept to date/time/number spans only.
   ============================================================ */
.schedule-date,
.event-date {
    background: var(--so-accent-soft);
    font-variant-numeric: tabular-nums;
}
.schedule-date span, .schedule-date small,
.event-date span, .event-date small {
    font-family: var(--so-font-mono);
    font-weight: 500;
    letter-spacing: .1em;
}
.schedule-date strong,
.event-date strong {
    font-family: var(--so-font-mono);
    font-weight: 500;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.schedule-card-copy em,
.event-card-copy em {
    font-family: var(--so-font-mono);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}
.invitation-card time {
    font-family: var(--so-font-mono);
    color: var(--so-accent-hover);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
}

/* Shared "resource library" page pattern (search + card grid + editor form),
   originally Venues/VenueEditor-scoped only; promoted here so Songs/SongEditor
   (and any future library page) get the same look without duplicating scoped
   CSS — Blazor scoped styles never reach a different component's markup. */
.venue-page { max-width: 1180px; padding: var(--so-space-5); }
.venue-search { max-width: 34rem; margin-bottom: var(--so-space-5); }
.venue-search input { min-height: 44px; background: var(--so-surface-2); border: 1px solid var(--so-border-light); }
.venue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--so-space-3); }
.venue-card { display: block; min-height: 0; padding: var(--so-space-4); color: inherit; text-decoration: none; background: var(--so-surface); border: 1px solid var(--so-border); border-radius: var(--so-radius-md); transition: border-color .15s ease, background-color .15s ease; }
.venue-card:hover, .venue-card:focus-visible { background: var(--so-surface-raised); border-color: color-mix(in srgb, var(--so-accent) 42%, var(--so-border)); }
.venue-card-top, .venue-meta { display: flex; justify-content: space-between; gap: var(--so-space-2); flex-wrap: wrap; }
.venue-card-top { color: var(--so-accent-hover); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-semibold); letter-spacing: .04em; }
.venue-card-top b { font-size: 1.1rem; }
.venue-card h2 { margin: var(--so-space-5) 0 var(--so-space-1); color: var(--so-text); font-size: 1.25rem; font-weight: var(--so-font-weight-semibold); overflow-wrap: anywhere; }
.venue-card p { margin: 0; color: var(--so-text-secondary); font-size: var(--so-font-size-sm); line-height: 1.45; }
.venue-meta { margin-top: var(--so-space-5); color: var(--so-text-muted); font-size: var(--so-font-size-sm); line-height: 1.35; }
.venue-empty { display: grid; gap: var(--so-space-2); padding: var(--so-space-8) var(--so-space-5); text-align: center; background: var(--so-surface); border: 1px dashed var(--so-border); border-radius: var(--so-radius-md); }
.venue-empty strong { color: var(--so-text); font-size: 1.05rem; }
.venue-empty span { color: var(--so-text-secondary); line-height: 1.45; }
.venue-empty a { color: var(--so-accent-hover); font-weight: var(--so-font-weight-semibold); }

.venue-editor { max-width: 920px; padding: var(--so-space-5); }
.venue-editor header { margin-bottom: var(--so-space-6); }
.venue-editor header > a { color: var(--so-accent-hover); font-weight: var(--so-font-weight-semibold); }
.venue-editor header p { margin: var(--so-space-5) 0 var(--so-space-1); color: var(--so-accent-hover); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-bold); letter-spacing: .08em; }
.venue-editor h1 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: var(--so-font-weight-bold); letter-spacing: -.04em; }
.venue-editor header span { color: var(--so-text-secondary); line-height: 1.5; }
.venue-editor section { margin: var(--so-space-4) 0; padding: var(--so-space-5); background: var(--so-surface); border: 1px solid var(--so-border); border-radius: var(--so-radius-md); }
.venue-editor h2 { margin: 0 0 var(--so-space-5); color: var(--so-text); font-size: 1.1rem; font-weight: var(--so-font-weight-semibold); }
.editor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--so-space-4); }
.editor-grid .wide { grid-column: 1 / -1; }
.field-group { display: grid; gap: var(--so-space-2); }
.field-group label { color: var(--so-text-secondary); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-semibold); }
.field-group .form-control, .field-group .form-select { background: var(--so-surface-raised); border: 1px solid var(--so-border); }
.field-group textarea { min-height: 104px; }
.field-group .chart-textarea { min-height: 320px; font-family: var(--so-font-mono); font-size: .85rem; line-height: 1.6; white-space: pre; }
.field-group small { color: var(--so-text-muted); font-size: .72rem; line-height: 1.45; }
.editor-actions { display: flex; gap: var(--so-space-3); padding: var(--so-space-4) 0 var(--so-space-8); }
.attached-file-row { display: flex; align-items: center; justify-content: space-between; gap: var(--so-space-3); padding: var(--so-space-3) var(--so-space-4); background: var(--so-surface-raised); border: 1px solid var(--so-border); border-radius: var(--so-radius-sm); }
.attached-file-row a { color: var(--so-accent-hover); font-weight: var(--so-font-weight-semibold); }
.ug-search { padding: var(--so-space-4); background: var(--so-surface-raised); border: 1px solid var(--so-border); border-radius: var(--so-radius-sm); }
.ug-search-row { display: flex; gap: var(--so-space-2); margin-top: var(--so-space-2); }
.ug-search-row .form-control { flex: 1 1 auto; }
.ug-results { display: grid; gap: var(--so-space-2); margin: var(--so-space-3) 0 0; padding: 0; list-style: none; }
.ug-results li { display: flex; align-items: center; justify-content: space-between; gap: var(--so-space-3); padding: var(--so-space-3); background: var(--so-surface); border: 1px solid var(--so-border); border-radius: var(--so-radius-sm); }
.ug-result-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--so-space-2); min-width: 0; }
.ug-result-info strong { color: var(--so-text); }
.ug-result-info span { color: var(--so-text-secondary); font-size: var(--so-font-size-sm); }
.ug-result-meta { color: var(--so-text-muted) !important; font-family: var(--so-font-mono); font-size: var(--so-font-size-xs) !important; }
@media (max-width: 480px) {
    .ug-search-row { flex-direction: column; }
    .ug-results li { flex-direction: column; align-items: stretch; }
}
.venue-remove { background: color-mix(in srgb, var(--so-danger) 6%, var(--so-surface)); border: 1px solid color-mix(in srgb, var(--so-danger) 32%, var(--so-border)); border-radius: var(--so-radius-md); padding: var(--so-space-5); margin: var(--so-space-4) 0; }

@media (max-width: 600px) {
    .venue-page { padding: var(--so-space-4); }
    .venue-grid { gap: var(--so-space-3); }
    .venue-card { padding: var(--so-space-4); }
}
@media (max-width: 650px) {
    .venue-editor { padding: var(--so-space-4); }
    .venue-editor section { padding: var(--so-space-4); }
    .editor-actions { position: sticky; bottom: 0; padding: var(--so-space-3); margin: 0 calc(var(--so-space-4) * -1); background: color-mix(in srgb, var(--so-surface-1) 94%, transparent); border-top: 1px solid var(--so-border); }
}

/* Chart viewer pages (ChartView.razor, SongChartView.razor) — shared across
   both so a global rule beats duplicating scoped CSS per page. */
.chart-view-page { max-width: 760px; margin: 0 auto; padding: var(--so-space-5); display: grid; gap: var(--so-space-4); }
.chart-view-page.is-list-view { max-width: 1100px; }
.chart-view-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--so-space-3); flex-wrap: wrap; }
.chart-view-back { color: var(--so-accent-hover); font-weight: var(--so-font-weight-semibold); }
.chart-view-topbar-actions { display: flex; align-items: center; gap: var(--so-space-3); flex-wrap: wrap; }
.chart-view-perform-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--so-space-3); color: var(--so-text); background: var(--so-surface-2); border: 1px solid var(--so-border); border-radius: var(--so-radius-sm); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-semibold); text-decoration: none; }
.chart-view-perform-btn:hover { border-color: var(--so-accent-hover); color: var(--so-accent-hover); }
.chart-view-mode-toggle { display: inline-flex; gap: 2px; padding: 2px; background: var(--so-surface-2); border: 1px solid var(--so-border); border-radius: var(--so-radius-sm); }
.chart-view-mode-toggle button { min-height: 34px; padding: 0 var(--so-space-3); color: var(--so-text-secondary); background: transparent; border: none; border-radius: calc(var(--so-radius-sm) - 2px); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-semibold); cursor: pointer; }
.chart-view-mode-toggle button.is-active { color: var(--so-text); background: var(--so-surface-raised); }

.chart-view-layout.has-rail { display: grid; grid-template-columns: 320px 1fr; align-items: start; gap: var(--so-space-4); }
.chart-view-rail { display: grid; gap: var(--so-space-3); position: sticky; top: var(--so-space-4); max-height: calc(100vh - var(--so-space-8)); overflow-y: auto; }
.chart-view-rail-item { display: grid; gap: 4px; padding: var(--so-space-3) var(--so-space-3); color: var(--so-text-secondary); background: var(--so-surface); border: 1px solid var(--so-border); border-bottom: 2px solid var(--so-border-light); border-radius: var(--so-radius-sm); }
.chart-view-rail-item strong { color: var(--so-text); font-size: var(--so-font-size-sm); word-wrap: break-word; overflow-wrap: break-word; }
.chart-view-rail-item span { color: var(--so-text-muted); font-size: var(--so-font-size-xs); word-wrap: break-word; overflow-wrap: break-word; }
.chart-view-rail-item.is-active { border-color: var(--so-accent-hover); border-bottom-color: var(--so-accent-hover); background: color-mix(in srgb, var(--so-accent-hover) 8%, var(--so-surface)); }
.chart-view-main { min-width: 0; }

@media (max-width: 768px) {
    .chart-view-layout.has-rail { grid-template-columns: 1fr; }
    .chart-view-rail { position: static; max-height: none; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); overflow-x: auto; overflow-y: visible; padding-bottom: var(--so-space-1); gap: var(--so-space-2); }
    .chart-view-rail-item { padding: var(--so-space-2) var(--so-space-3); min-height: 80px; }
}
@media (max-width: 480px) {
    .chart-view-page { padding: var(--so-space-3); }
}

/* Chart text wrapping for mobile — force text to wrap instead of overflow */
.chart-lyric-row, .chart-chord-row { word-break: break-all !important; }

/* Setlist list/item rows — shared between EventDetails.razor (a gig's own
   setlist) and SetlistTemplateEditor.razor (a reusable default setlist), so
   a global rule beats duplicating scoped CSS per page. */
.song-setlist-list { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: var(--so-space-2); margin: 0 0 var(--so-space-4); padding: 0; list-style: none; }
.song-setlist-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--so-space-3); padding: var(--so-space-3) var(--so-space-4); background: var(--so-surface-raised); border: 1px solid var(--so-border); border-radius: var(--so-radius-sm); }
.song-setlist-item:not(.is-dragging) { transition: transform .12s ease; }
.song-setlist-item.is-dragging { position: relative; z-index: 5; opacity: .85; box-shadow: var(--so-shadow-md, 0 8px 20px rgba(0, 0, 0, .18)); cursor: grabbing; }
.song-setlist-drag-handle { flex: 0 0 auto; min-width: 32px; min-height: 32px; padding: 0; color: var(--so-text-muted); background: transparent; border: none; border-radius: var(--so-radius-sm); font-size: 1.1rem; line-height: 1; cursor: grab; touch-action: none; }
.song-setlist-drag-handle:hover { color: var(--so-text); background: var(--so-surface-2); }
.song-setlist-drag-handle:active { cursor: grabbing; }
.song-setlist-info { display: flex; flex: 1 1 auto; flex-wrap: nowrap; align-items: baseline; gap: var(--so-space-2); min-width: 0; overflow: hidden; }
.song-setlist-info-link { color: inherit; text-decoration: none; border-radius: var(--so-radius-sm); }
.song-setlist-info-link:hover { text-decoration: underline; text-decoration-color: var(--so-accent-hover); }
.song-setlist-info-link:hover strong { color: var(--so-accent-hover); }
/* Base metadata colours; the grid below permits long titles and artists to
   wrap without forcing the containing grid wider than the viewport. */
.song-setlist-info strong { flex: 1 1 auto; min-width: 2.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--so-text); }
.song-setlist-info span { flex: 0 0 auto; color: var(--so-text-secondary); font-size: var(--so-font-size-sm); white-space: nowrap; }
.song-setlist-key { flex: 0 0 auto; font-family: var(--so-font-mono); color: var(--so-accent-hover) !important; white-space: nowrap; }
.song-setlist-placeholder-badge { flex: 0 0 auto; color: var(--so-warning); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-semibold); white-space: nowrap; }
.song-setlist-default-badge { display: inline-flex; align-items: center; gap: .3rem; color: var(--so-accent-hover); font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-semibold); }
.song-setlist-actions { display: flex; gap: var(--so-space-2); flex: 0 0 auto; }
.song-setlist-actions .btn { min-height: 36px; padding: 0 var(--so-space-3); }
.song-setlist-item { min-width: 0; }
.song-setlist-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; flex-basis: 18rem; gap: var(--so-space-2); }
.song-setlist-info strong { grid-column: 1 / -1; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.song-setlist-info span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.song-setlist-actions { flex-wrap: wrap; }
.song-setlist-actions .btn, .song-setlist-drag-handle { min-width: 44px; min-height: 44px; }
.setlist-performance-action { display: inline-flex; margin-top: var(--so-space-3); }
/* Set editor header: description on its own line, actions grouped beneath it. */
.setlist-editor-note { display: block; margin-top: var(--so-space-2); }
.setlist-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--so-space-2); margin-top: var(--so-space-4); }
.setlist-editor-actions .btn { min-height: 40px; }
.song-setlist-key-controls { display: inline-flex; align-items: center; gap: .35rem; }
.song-setlist-key-controls span { min-width: 2.75rem; color: var(--so-accent-hover); font-family: var(--so-font-mono); font-weight: var(--so-font-weight-semibold); text-align: center; }
.song-setlist-key-controls .btn { width: 44px; min-width: 44px; padding: 0; font-size: 1rem; }
@media (max-width: 1024px) {
    .song-setlist-info { flex-basis: 100%; width: 100%; }
    body:has(.mobile-nav-shell.drawer-active) { overflow: hidden; overscroll-behavior: none; }
}
/* A form row above or below a list needs the same breathing room the
   repertoire search has — without it the first card butts straight up
   against the input. */
.song-setlist-add { display: flex; gap: var(--so-space-2); margin-block: var(--so-space-5); }
.song-setlist-add select { flex: 1 1 auto; min-height: 44px; }
@media (max-width: 480px) {
    .song-setlist-item { flex-direction: column; align-items: stretch; }
    .song-setlist-add { flex-direction: column; }
}

/* ── Repertoire page & song cards ──────────────────────────────── */
.repertoire-page { max-width: 1180px; padding: var(--so-space-5); }
.repertoire-intro { margin-bottom: var(--so-space-5); color: var(--so-text-muted); line-height: 1.45; }
.repertoire-search { max-width: 34rem; margin-bottom: var(--so-space-5); }
.repertoire-search input { min-height: 44px; background: var(--so-surface-2); border: 1px solid var(--so-border-light); }
.repertoire-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--so-space-3); }
/* Repertoire is grouped by artist, so the artist is a heading rather than a
   line on every card. Without that second line the cards no longer need the
   taller card's height. */
.repertoire-artist-group + .repertoire-artist-group { margin-top: var(--so-space-5); }
.repertoire-artist-heading {
    display: flex; align-items: baseline; gap: var(--so-space-2);
    margin: 0 0 var(--so-space-3);
    color: var(--so-text); font-size: 1rem;
    font-weight: var(--so-font-weight-bold); letter-spacing: -.01em;
}
.repertoire-artist-name { min-width: 0; overflow-wrap: anywhere; }
.repertoire-artist-count {
    flex: 0 0 auto;
    color: var(--so-text-muted);
    font-size: var(--so-font-size-sm); font-weight: var(--so-font-weight-regular);
}
.repertoire-artist-group { max-width: 46rem; }
.repertoire-list { list-style: none; display: grid; gap: 0; margin: 0; padding: 0;
    border: 1px solid var(--so-border); border-radius: var(--so-radius-md);
    background: var(--so-surface); overflow: hidden; }
.repertoire-list > li + li { border-top: 1px solid color-mix(in srgb, var(--so-border) 60%, transparent); }
.repertoire-row {
    display: grid;
    /* Fixed columns, not auto: with auto the key chip lands at a different x
       on every row, because CHART READY and NO CHART are different widths.
       Scanning down a key column is the whole point of showing it. */
    grid-template-columns: minmax(0, 1fr) 2.6rem 7rem 14px;
    align-items: center; gap: var(--so-space-3);
    min-height: 56px; padding: var(--so-space-3) var(--so-space-4);
    color: inherit; text-decoration: none;
    transition: background-color .15s ease;
}
.repertoire-row:hover, .repertoire-row:focus-visible { background: var(--so-surface-raised); }
.repertoire-row:focus-visible { outline: 2px solid var(--so-focus); outline-offset: -2px; }
.repertoire-row-title {
    margin: 0; min-width: 0;
    color: var(--so-text); font-family: var(--so-font-display);
    font-size: 1rem; font-weight: var(--so-font-weight-bold);
    line-height: 1.3; overflow-wrap: anywhere;
}
/* A song with no chart yet is still worth showing — just quieter. */
.repertoire-row--needs-chart .repertoire-row-title { color: var(--so-text-secondary); }
.song-card-key--none { color: var(--so-text-muted); background: transparent; border-color: transparent; }
.repertoire-row .song-card-key { height: 1.6rem; min-width: 2.1rem; font-size: .82rem; }
.repertoire-row .song-card-status { white-space: nowrap; }
.repertoire-row .song-card-key { justify-self: center; }
.repertoire-row:hover .song-card-arrow, .repertoire-row:focus-visible .song-card-arrow {
    color: var(--so-accent-hover); transform: translateX(2px);
}
@media (max-width: 560px) {
    /* Title takes the row to itself; key and status sit underneath it so
       neither has to truncate on a phone. */
    .repertoire-row { grid-template-columns: minmax(0, 1fr) 14px; gap: var(--so-space-2) var(--so-space-3); }
    .repertoire-row-title { grid-column: 1; }
    .repertoire-row .song-card-key { grid-column: 1; grid-row: 2; justify-self: start; }
    .repertoire-row .song-card-status { grid-column: 1; grid-row: 2; justify-self: start; margin-left: 3rem; }
    .repertoire-row .song-card-arrow { grid-column: 2; grid-row: 1 / span 2; }
}
/* Hand-off to another band. A band-scoped page that a musician might expect
   to hold their other bands' things ends with this instead of mixing them in:
   the page keeps one band's context, and switching band is one click and
   comes straight back to the same page. */
.band-handoff {
    max-width: 46rem; margin-top: var(--so-space-8);
    padding-top: var(--so-space-5);
    border-top: 1px solid color-mix(in srgb, var(--so-border) 70%, transparent);
}
.band-handoff h2 { margin: 0 0 var(--so-space-1); color: var(--so-text); font-size: 1rem; font-weight: var(--so-font-weight-bold); letter-spacing: -.01em; }
.band-handoff > p { margin: 0 0 var(--so-space-3); color: var(--so-text-muted); font-size: var(--so-font-size-sm); line-height: 1.45; }
.band-handoff form { display: grid; gap: var(--so-space-2); }
.band-handoff-option {
    display: grid; grid-template-columns: minmax(0, 1fr) auto 14px;
    align-items: center; gap: var(--so-space-3);
    width: 100%; min-height: 52px; padding: var(--so-space-3) var(--so-space-4);
    color: inherit; text-align: left;
    background: var(--so-surface);
    border: 1px solid var(--so-border);
    border-radius: var(--so-radius-md);
    font: inherit; cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.band-handoff-option:hover, .band-handoff-option:focus-visible {
    background: var(--so-surface-raised);
    border-color: color-mix(in srgb, var(--so-accent) 42%, var(--so-border));
}
.band-handoff-option:focus-visible { outline: 2px solid var(--so-focus); outline-offset: 2px; }
.band-handoff-name { min-width: 0; color: var(--so-text); font-weight: var(--so-font-weight-bold); overflow-wrap: anywhere; }
.band-handoff-count { color: var(--so-text-muted); font-size: var(--so-font-size-sm); white-space: nowrap; }
.band-handoff-option:hover .song-card-arrow, .band-handoff-option:focus-visible .song-card-arrow {
    color: var(--so-accent-hover); transform: translateX(2px);
}
.song-card {
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 140px; padding: var(--so-space-5);
    color: inherit; text-decoration: none;
    background: var(--so-surface);
    border: 1px solid var(--so-border);
    border-radius: var(--so-radius-md);
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.song-card:hover, .song-card:focus-visible {
    background: var(--so-surface-raised);
    border-color: color-mix(in srgb, var(--so-accent) 42%, var(--so-border));
    box-shadow: 0 2px 8px color-mix(in srgb, var(--so-accent) 8%, transparent);
}
.song-card--needs-chart { border-style: dashed; }
.song-card-header { display: flex; align-items: flex-start; gap: var(--so-space-3); }
.song-card-titles { flex: 1; min-width: 0; }
.song-card-titles h2,
.song-card-titles h3 {
    margin: 0;
    color: var(--so-text);
    font-family: var(--so-font-display);
    font-size: 1.15rem;
    font-weight: var(--so-font-weight-bold);
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.song-card-titles p { margin: .2rem 0 0; color: var(--so-text-secondary); font-size: var(--so-font-size-sm); line-height: 1.35; }
.song-card-key {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.4rem; height: 2rem; padding: 0 .55rem;
    color: var(--so-accent-hover); background: var(--so-accent-soft);
    border: 1px solid color-mix(in srgb, var(--so-accent) 22%, transparent);
    border-radius: var(--so-radius-sm);
    font-family: var(--so-font-mono); font-size: .92rem; font-weight: var(--so-font-weight-bold);
    letter-spacing: .01em; line-height: 1; white-space: nowrap;
}
.song-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: var(--so-space-4); padding-top: var(--so-space-3);
    border-top: 1px solid color-mix(in srgb, var(--so-border) 50%, transparent);
}
.song-card-status {
    font-size: var(--so-font-size-xs);
    font-weight: var(--so-font-weight-semibold);
    letter-spacing: .03em;
    text-transform: uppercase;
}
.song-card-status--chart { color: var(--so-accent-hover); }
.song-card-status--file { color: var(--so-text-muted); }
.song-card-status--empty { color: var(--so-text-muted); opacity: .7; }
.song-card-arrow {
    width: 14px; height: 14px;
    color: var(--so-text-muted);
    transition: color .15s ease, transform .15s ease;
}
.song-card:hover .song-card-arrow,
.song-card:focus-visible .song-card-arrow {
    color: var(--so-accent-hover);
    transform: translateX(2px);
}
.repertoire-empty {
    display: grid; gap: var(--so-space-2);
    padding: var(--so-space-8) var(--so-space-5);
    text-align: center;
    background: var(--so-surface);
    border: 1px dashed var(--so-border);
    border-radius: var(--so-radius-md);
}
.repertoire-empty strong { color: var(--so-text); font-size: 1.05rem; }
.repertoire-empty span { color: var(--so-text-secondary); line-height: 1.45; }
.repertoire-empty a { color: var(--so-accent-hover); font-weight: var(--so-font-weight-semibold); }
@media (max-width: 600px) {
    .repertoire-page { padding: var(--so-space-4); }
    .repertoire-grid { gap: var(--so-space-3); }
    .song-card { min-height: 120px; padding: var(--so-space-4); }
}
@media (max-width: 430px) {
    .repertoire-page { padding: var(--so-space-3); }
}

/* ── Social graphic generator (gig page "Promote" section) ─────── */
.social-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--so-space-2); margin: var(--so-space-4) 0; }
.social-photo-tile, .social-photo-upload {
    position: relative; display: flex; align-items: center; justify-content: center;
    aspect-ratio: 1; overflow: hidden; padding: 0;
    background: var(--so-surface-2); border: 2px solid var(--so-border); border-radius: var(--so-radius-sm);
    cursor: pointer; transition: border-color .15s ease;
}
.social-photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.social-photo-tile:hover { border-color: color-mix(in srgb, var(--so-accent) 45%, var(--so-border)); }
.social-photo-tile.is-selected { border-color: var(--so-accent-hover); box-shadow: 0 0 0 2px color-mix(in srgb, var(--so-accent) 25%, transparent); }
.social-photo-upload { flex-direction: column; gap: .3rem; color: var(--so-text-muted); font-size: var(--so-font-size-xs); font-weight: var(--so-font-weight-semibold); text-align: center; border-style: dashed; }
.social-photo-upload:hover { color: var(--so-accent-hover); border-color: color-mix(in srgb, var(--so-accent) 45%, var(--so-border)); }
.social-photo-upload.is-busy { opacity: .6; cursor: default; }
.social-photo-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.social-preview { display: grid; gap: var(--so-space-3); justify-items: start; margin-top: var(--so-space-2); }
.social-preview img { width: 100%; max-width: 360px; aspect-ratio: 1; object-fit: cover; border-radius: var(--so-radius-md); border: 1px solid var(--so-border); }
.poster-preview-frame {
    position: relative; padding: .65rem; background: linear-gradient(160deg, color-mix(in srgb, var(--so-accent) 16%, var(--so-surface-raised)), var(--so-surface-raised));
    border: 1px solid color-mix(in srgb, var(--so-accent) 22%, var(--so-border)); border-radius: calc(var(--so-radius-md) + .5rem);
    box-shadow: 0 24px 60px -24px rgba(0,0,0,.55), 0 2px 0 rgba(255,255,255,.02) inset;
}
.poster-preview-frame::before {
    content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit;
    background: linear-gradient(160deg, color-mix(in srgb, var(--so-accent) 55%, transparent), transparent 55%);
    opacity: .35; filter: blur(14px);
}
.poster-preview-frame img { display: block; box-shadow: 0 10px 28px -12px rgba(0,0,0,.6); }
.poster-preview-caption { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; }
.poster-toggle { display: flex; align-items: center; gap: .65rem; min-height: 44px; color: var(--so-text-secondary); cursor: pointer; }
.poster-toggle input { width: 1.15rem; height: 1.15rem; accent-color: var(--so-accent); }
.poster-range-field label { display: flex; justify-content: space-between; gap: 1rem; }
.poster-range-field input[type="range"] { width: 100%; accent-color: var(--so-accent); }
.social-preview { grid-template-columns: minmax(0,360px); }
.poster-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.poster-workspace > .social-preview { grid-row: 1; margin: 0; justify-items: stretch; grid-template-columns: minmax(0, 1fr); }
.poster-workspace .social-preview img { width: 100%; max-width: 480px; aspect-ratio: 4 / 5; object-fit: contain; border-radius: 4px; }
.poster-workspace > .social-photo-grid { grid-row: 2; grid-template-columns: repeat(auto-fill, minmax(64px, 84px)); margin: 0; }
.poster-workspace > .planning-details-grid { grid-row: 3; }
.poster-export-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (min-width: 1000px) {
    .poster-workspace { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 1.5rem; }
    .poster-workspace > .social-preview { grid-column: 1; grid-row: 1 / 3; position: sticky; top: 5rem; }
    .poster-workspace > .social-photo-grid { grid-column: 2; grid-row: 1; }
    .poster-workspace > .planning-details-grid { grid-column: 2; grid-row: 2; }
}
.poster-field-group { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; padding-top: 1.15rem; border-top: 1px solid var(--so-border); }
.poster-field-group:first-child { padding-top: 0; border-top: 0; }
.poster-group-heading { grid-column: 1 / -1; margin: 0 0 -.15rem; color: var(--so-text-muted); font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.poster-design-ideas { grid-column: 1 / -1; min-width: 0; }
.poster-design-ideas-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .5rem; }
.poster-design-ideas-header .form-label { margin: 0; }
.poster-shuffle-button {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .4rem .75rem; min-height: 36px;
    color: var(--so-accent-hover); background: color-mix(in srgb, var(--so-accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--so-accent) 35%, var(--so-border));
    border-radius: 999px; font-size: .78rem; font-weight: var(--so-font-weight-semibold);
    cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.poster-shuffle-button:hover { background: color-mix(in srgb, var(--so-accent) 22%, transparent); border-color: var(--so-accent); }
.poster-shuffle-button:active { transform: scale(.96); }
.poster-shuffle-icon { display: inline-block; transition: transform .3s ease; }
.poster-shuffle-button:hover .poster-shuffle-icon { transform: rotate(18deg); }
.poster-design-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.poster-design-choice {
    padding: .35rem; border: 1px solid var(--so-border, #45404f); background: transparent; color: inherit;
    border-radius: .6rem; min-height: 44px; cursor: pointer; overflow: hidden;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.poster-design-choice img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; border-radius: .25rem; transition: transform .25s ease; }
.poster-design-choice span { display: block; padding: .4rem 0; font-size: .8rem; }
.poster-design-choice:hover { border-color: color-mix(in srgb, var(--so-accent) 45%, var(--so-border)); transform: translateY(-2px); box-shadow: 0 8px 18px -12px rgba(0,0,0,.55); }
.poster-design-choice:hover img { transform: scale(1.04); }
.poster-design-choice:active { transform: translateY(0) scale(.98); }
.poster-design-choice[aria-pressed="true"] { outline: 2px solid var(--so-accent, #9e74ec); }
.poster-design-choice:focus-visible { outline: 3px solid #c4a6ff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    .poster-shuffle-icon, .poster-design-choice, .poster-design-choice img, .poster-shuffle-button { transition: none; }
    .poster-design-choice:hover { transform: none; }
}

/* Owner dashboard trend chart — rendered as raw SVG via MarkupString
   (Razor treats <text> as a reserved tag, RZ1023, so the SVG is built as
   a string instead of markup), which means it never gets a scoped-CSS
   attribute — these rules must live in the global stylesheet, not
   TrendBarChart.razor.css, or they silently never match. */
.trend-chart { display: block; width: 100%; height: auto; }
.trend-chart-gridline { stroke: var(--so-border); stroke-width: 1; }
/* The UI face with tabular figures, not the mono face: these labels scale up
   with the SVG viewBox, so at render size the mono "920"/"Sept" read as a
   different typeface from every other number in the app. */
.trend-chart-axis-label { fill: var(--so-text-muted); font-size: 9px; font-family: inherit; font-variant-numeric: tabular-nums; }
.trend-chart-bar--revenue { fill: var(--so-success); }
.trend-chart-bar--costs { fill: var(--so-accent); }

/* Story 5: a defensive layout baseline. This does not hide overflow; it lets
   descendants shrink so their own wrapping rules can keep content in view. */
html, body, .app-shell, .content, main { max-width: 100%; }
.content, main, main > *, .so-page-header, .so-page-header-copy,
.so-page-header-aside, .owner-dashboard-card, .owner-dashboard-card-heading,
.owner-dashboard-table-row, .owner-dashboard-list-row, .event-section,
.event-summary-card, .planning-grid, .planning-details-grid { min-width: 0; }
img, video, canvas { max-width: 100%; }

@media (max-width: 560px) {
    .lu-add { align-items: stretch; }
    .lu-add-label, .lu-add-select { flex-basis: 100%; min-width: 0; }
    .lu-add .lu-btn { flex: 1 1 auto; }
    .lu-candidate { grid-template-columns: auto minmax(0, 1fr); }
    .lu-candidate-tick { display: none; }
    .lu-chips { grid-column: 1 / -1; }
    .song-setlist-info { min-width: 0; }
}

/* Story 1: semantic mobile density. */
@media (max-width: 1024px) {
    :root {
        --so-page-gutter: var(--so-space-3);
        --so-page-header-gap: var(--so-space-4);
        --so-section-heading-gap: var(--so-space-2);
        --so-section-gap: var(--so-space-5);
        --so-surface-padding-compact: var(--so-space-2);
        --so-surface-padding-standard: var(--so-space-3);
        --so-surface-padding-hero: var(--so-space-5);
    }
}

/* Story 4: shared control density. Primary actions retain their fill while
   secondary actions use a quieter surface and every compact control keeps a
   40px minimum hit area. */
.btn {
    min-height: 42px;
    padding-inline: .78rem;
    font-size: var(--so-font-size-sm);
    line-height: 1.2;
}
.btn-primary { min-height: var(--so-target-min, 40px); border-radius: var(--so-radius-control, 10px); font-weight: var(--so-font-weight-bold); }
.btn-outline-secondary, .btn-secondary {
    background: transparent;
    border-color: color-mix(in srgb, var(--so-border) 84%, transparent);
}
.btn-outline-secondary:hover, .btn-secondary:hover { background: var(--so-surface-2); }
.so-btn { min-height: var(--so-target-min, 40px); padding: .45rem .78rem; font-size: var(--so-font-size-sm); }
.so-btn-primary { min-height: var(--so-target-min, 40px); border-radius: var(--so-radius-control, 10px); }
.so-btn-inline { min-height: 40px; padding-inline: var(--so-space-2); }
:root[data-theme="light"] body .btn-secondary,
:root[data-theme="light"] body .btn-outline-secondary,
:root[data-theme="light"] body .so-btn-secondary {
    color: var(--so-accent-hover);
    background: #fff;
    border-color: color-mix(in srgb, var(--so-accent) 22%, var(--so-border));
    border-radius: var(--so-radius-control, 10px);
    box-shadow: 0 1px 2px rgba(52, 38, 55, .04);
}
:root[data-theme="light"] body .btn-secondary:hover,
:root[data-theme="light"] body .btn-outline-secondary:hover,
:root[data-theme="light"] body .so-btn-secondary:hover {
    color: var(--so-accent-hover);
    background: var(--so-accent-soft);
    border-color: color-mix(in srgb, var(--so-accent) 34%, var(--so-border));
}
.so-status,
.event-status-badge, .event-status, .lineup-state-badge, .payment-badge,
.event-status-badge[class*="event-status-"] {
    min-height: 24px;
    padding: .2rem .45rem;
    border-radius: var(--so-radius-sm);
    font-size: .68rem;
    font-weight: var(--so-font-weight-semibold);
    line-height: 1;
}
.song-setlist-actions { gap: .35rem; }
.song-setlist-actions .btn { min-width: auto; min-height: 40px; padding-inline: .65rem; }
.song-setlist-actions .btn[aria-label], .song-setlist-drag-handle {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
}
.song-setlist-drag-handle { font-size: 1rem; }
.song-setlist-add { align-items: center; }
@media (max-width: 480px) {
    .song-setlist-actions .btn[aria-label], .song-setlist-drag-handle { width: 44px; min-width: 44px; min-height: 44px; }
    .setlist-hub-item-actions {
        display: flex;
        grid-row: 1;
        grid-column: 4;
        justify-self: end;
        justify-content: center;
        gap: 0;
        width: 44px;
        margin: 0;
    }
    .setlist-hub-move, .setlist-hub-remove {
        display: grid;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        color: var(--so-text-secondary);
        border-color: color-mix(in srgb, var(--so-border) 84%, transparent);
        background: var(--so-surface-raised);
    }
    .setlist-hub-move:disabled { opacity: .38; }

    .setlist-hub-item-actions,
    .song-setlist-actions {
        position: relative;
        z-index: 2;
        pointer-events: auto;
        touch-action: manipulation;
    }
    .song-setlist-actions {
        display: flex;
        justify-content: flex-end;
        width: 100%;
    }
    .song-setlist-actions .btn[aria-label] {
        display: inline-grid;
        flex: 0 0 44px;
        place-items: center;
        width: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 0;
    }
    .setlist-hub-item {
        grid-template-columns: 1.35rem minmax(0, 1fr) auto 44px;
        gap: .35rem;
        min-height: 52px;
        padding: .3rem .65rem;
    }
    .setlist-hub-num { grid-row: 1; grid-column: 1; }
    .setlist-hub-song { grid-row: 1; grid-column: 2; gap: 0; }
    .setlist-hub-key { grid-row: 1; grid-column: 3; margin: 0; }
    .setlist-hub-song strong { font-size: .84rem; }
    .setlist-hub-artist { font-size: .7rem; }
    .setlist-hub-key-editor { padding: .35rem 0 .1rem; }
}

@media (max-width: 768px) {
    :root[data-theme="light"] .mobile-bottom-nav .mobile-nav-selection::before {
        background-color: rgba(255, 255, 255, .52);
        background-image:
            linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.22) 46%, rgba(255,255,255,.42)),
            linear-gradient(110deg, transparent 18%, rgba(255,255,255,.7) 42%, transparent 64%);
        border-color: #c9a0dc;
        box-shadow: inset 0 1px rgba(255,255,255,.98), inset 0 -1px rgba(111,70,129,.12), inset 0 0 12px rgba(201,160,220,.16), 0 0 8px rgba(201,160,220,.72), 0 0 24px rgba(201,160,220,.36);
        -webkit-backdrop-filter: saturate(200%) blur(14px);
        backdrop-filter: saturate(200%) blur(14px);
    }
    :root[data-theme="light"] .mobile-bottom-nav .mobile-bottom-link.active { color: var(--so-nav-active-text); }
    .btn, .so-btn,
    .event-action-bar > a,
    .event-action-bar > span,
    .event-action-bar > details > summary { justify-content: center; text-align: center; }
    :root[data-theme="light"] .btn-primary {
        background-color: var(--so-primary-action);
        background-image: var(--so-primary-action-gradient);
        border-color: var(--so-primary-action);
        box-shadow: var(--so-primary-action-shadow);
    }
    :root[data-theme="light"] .btn-primary:hover {
        background-color: var(--so-primary-action-hover) !important;
        background-image: var(--so-primary-action-hover-gradient) !important;
        border-color: var(--so-primary-action-hover) !important;
    }
    :root[data-theme="light"] .event-action-bar > a:first-of-type {
        color: #fff;
        background-color: var(--so-primary-action);
        background-image: var(--so-primary-action-gradient);
        border-color: color-mix(in srgb, var(--so-primary-action) 42%, var(--so-border));
        box-shadow: var(--so-primary-action-shadow);
    }
}
@media (max-width: 767px) {
    :root { --so-page-header-gap: var(--so-space-3); --so-section-gap: var(--so-space-4); --so-surface-padding-hero: var(--so-space-4); }
    .so-stack { gap: var(--so-space-3); }
    .so-compact-row { min-height: 44px; }
    .band-overview { gap: var(--so-space-4); padding-bottom: calc(var(--so-mobile-nav-height) + var(--so-space-4) + env(safe-area-inset-bottom)); }
    .band-section { gap: var(--so-space-2); }
    .band-member-card, .band-lineup-list article { min-height: 52px; padding-block: var(--so-space-2); }
    .song-setlist-list { gap: var(--so-space-1); margin-bottom: var(--so-space-3); }
    .song-setlist-item { gap: var(--so-space-2); padding: var(--so-space-2) var(--so-space-3); }
    .song-setlist-bulk-import { margin-top: var(--so-space-3); padding: var(--so-space-2) var(--so-space-3); }
}

/* Story 2: shared operational hierarchy, using the existing type scale and tokens. */
.song-setlist-info strong,
.band-member-card strong,
.band-lineup-list strong {
    color: var(--so-text);
    font-weight: var(--so-font-weight-bold);
    line-height: 1.3;
}

.song-setlist-info span,
.band-member-card small,
.band-lineup-list small {
    color: var(--so-text-muted);
    font-weight: var(--so-font-weight-regular);
}

.band-member-card em,
.band-lineup-list em {
    color: var(--so-text-secondary);
    font-weight: var(--so-font-weight-semibold);
}

/* Story 3: repeated operational items share one surface and use dividers. */
.song-setlist-list,
.band-member-list,
.band-lineup-list {
    gap: 0;
    overflow: hidden;
    background: var(--so-surface);
    border: 1px solid var(--so-border);
    border-radius: var(--so-radius-md);
}

.song-setlist-item,
.band-member-card,
.band-lineup-list article {
    box-sizing: border-box;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--so-border);
    border-radius: 0;
    box-shadow: none;
}

.song-setlist-item:first-child,
.band-member-card:first-child,
.band-lineup-list article:first-child { border-top: 0; }

.song-setlist-item.is-dragging {
    background: var(--so-surface-raised);
    border-radius: var(--so-radius-sm);
    box-shadow: var(--so-shadow-md);
}

@media (max-width: 480px) {
    .song-setlist-actions { width: 100%; justify-content: flex-end; }
}

.schedule-readiness-quiet {
    display: block;
    margin-top: 2px;
    color: var(--so-text-muted);
    font-size: var(--so-font-size-xs);
    font-weight: var(--so-font-weight-normal);
}

/* ============================================================================
   CONTROL CONSISTENCY
   ----------------------------------------------------------------------------
   app.css has grown in layers, and controls drifted apart as it did: an audit
   across 27 screens found 12 different border-radii on buttons alone, badges in
   6 shapes, and primary buttons rounded 13px sitting beside secondary buttons
   rounded 10.4px. This block is the single authority for control geometry and
   hit areas. It is appended last on purpose — later rules win in this file.
   ========================================================================== */

:root {
    /* One radius for anything you press, one for anything pill-shaped. */
    --so-radius-control: 10px;
    --so-radius-pill: 999px;
    /* The smallest a control may be before it stops being reliable on stage. */
    --so-target-min: 40px;
}

/* --- Buttons: one height, whatever the family ---------------------------- */
/* `.btn` and `.so-btn` both declare 44px but later rules trimmed them to 40px
   and 42px respectively, so a `.btn` and a `.so-btn` sitting in the same row
   (e.g. "Perform Set" beside "Sync now" on a gig) were visibly different
   heights. One value, applied last. */
.btn,
.so-btn,
.lu-btn {
    min-height: var(--so-target-min);
}

/* Text-only affordances that are deliberately not button-sized keep their own
   compact height — they are links in button clothing. */
.btn-link,
.btn.btn-link,
.so-btn-inline,
.feed-reply-toggle,
.band-card-link {
    min-height: auto;
}

/* --- Buttons: one shape, whatever the variant ---------------------------- */
.btn,
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger,
.btn-danger,
.so-btn,
.so-btn-primary,
.so-btn-secondary,
.so-btn-outline,
.so-btn-danger,
.lu-btn {
    border-radius: var(--so-radius-control);
}

/* `.btn-outline-primary` only ever had a :hover rule, so its resting state fell
   through to Bootstrap's default blue — a browser-blue button in the middle of
   a mauve app (e.g. "Back to dashboard" on the gig brief). */
.btn-outline-primary {
    color: var(--so-accent-hover);
    background: transparent;
    border-color: var(--so-accent);
}

/* Pressables that had drifted to their own radii — 6px, 7px, 8.8px, 9px and
   9.6px respectively — brought onto the same corner as every other control.
   List ROWS (account menu items, overview rows) keep their own shape: they
   read as rows, not buttons. */
.band-switcher-option,
.setlist-hub-move,
.setlist-hub-remove,
.song-setlist-drag-handle,
.poster-design-choice,
.add-position-action,
.event-menu-danger {
    border-radius: var(--so-radius-control);
}

/* Round icon buttons stay round. */
.btn.is-round,
.so-btn.is-round,
.feed-rock-on-action,
.feed-post-action {
    border-radius: 50%;
}

/* --- Hit areas ----------------------------------------------------------- */
/* Compact controls that had shrunk to 26–30px: still visually small, but now
   big enough to hit with a plectrum in your hand. */
.appearance-toggle button,
.setlist-hub-move,
.setlist-hub-remove,
.song-setlist-drag-handle {
    min-width: var(--so-target-min);
    min-height: var(--so-target-min);
}

/* Filter tabs were 37px — just under the mark, and inconsistent with the
   40px controls beside them. */
.notification-filters button,
.events-tabs button,
.schedule-tabs button {
    min-height: var(--so-target-min);
}

.appearance-toggle button {
    border-radius: var(--so-radius-control);
}

/* --- Badges and status pills --------------------------------------------- */
/* Previously a mix of 0px / 8px / 10px / 999px radii at five font sizes and
   four weights. Status-style chips are now one pill; the uppercase eyebrow
   labels keep their own treatment below. */
.event-status,
.membership-badge,
.so-page-header-badge,
.setlist-hub-badge,
.song-setlist-default-badge,
.song-setlist-placeholder-badge,
.home-pinned-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: .15rem .55rem;
    border-radius: var(--so-radius-pill);
    font-size: var(--so-font-size-xs, .75rem);
    font-weight: var(--so-font-weight-semibold, 600);
    line-height: 1.3;
    white-space: nowrap;
}

/* --- Messages: heading aligned to its own column -------------------------- */
/* The page heading sat in a 760px column while the posts sit in a 640px one
   with 24px of padding, so "Messages" hung 84px to the left of the cards it
   titles. Same column, same gutter, one left edge. */
.giggeist-feed > .so-page-header {
    max-width: 640px;
    padding-left: 24px;
    padding-right: 24px;
}
@media (max-width: 430px) {
    .giggeist-feed > .so-page-header {
        padding-left: var(--so-space-2);
        padding-right: var(--so-space-2);
    }
}

/* --- Selection ----------------------------------------------------------- */
/* Was the retired indigo (#8b5cf6); now the brand mauve. */
::selection { color: #fff; background: color-mix(in srgb, var(--so-accent) 45%, transparent); }
