/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===================================
   DESIGN TOKENS  —  BASE / FALLBACK
   ===================================
   Generated by app/services/theming.py from the 'default' system theme.
   Every theme (system ones included) is stored in the `theme` table and
   compiled into an inline <style> block that overrides this one, so this
   block exists purely as the bootstrap fallback if no theme resolves.

   Do not hand-edit and do not add per-theme blocks here — regenerate with:
     uv run flask --app app print-default-tokens

   NAMING WARNING: --dark is the PAGE BACKGROUND and --white is the BODY TEXT
   COLOUR, whatever their actual lightness. On light themes --dark is white.
   Only theming.py is allowed to know this; see its module docstring.
   =================================== */
:root {
  --primary: #FF2D55;
  --primary-text: #FF2D55;
  --accent-text: #FF006E;
  --primary-dark: #D12546;
  --primary-rgb: 255, 45, 85;
  --secondary: #5E60CE;
  --secondary-rgb: 94, 96, 206;
  --accent: #FF006E;
  --dark: #0A0A0A;
  --dark-gray: #1A1A1A;
  --mid-gray: #333333;
  --light-gray: #F5F5F5;
  --white: #FFFFFF;
  --on-primary: #0A0A0A;
  --on-secondary: #FFFFFF;
  --on-accent: #0A0A0A;
  --text-primary: #FFFFFF;
  --text-body: rgba(255, 255, 255, 0.88);
  --text-secondary: rgba(255, 255, 255, 0.9);
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-subtle: rgba(255, 255, 255, 0.6);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-color-strong: rgba(255, 255, 255, 0.24);
  --border: 1px solid rgba(255, 255, 255, 0.12);
  --gradient-primary: linear-gradient(135deg, #FF2D55 0%, #FF2D55 100%);
  --gradient-secondary: linear-gradient(135deg, #5E60CE 0%, #5E60CE 100%);
  --gradient-dark: linear-gradient(135deg, #0A0A0A 0%, #0A0A0A 100%);
  --gradient-hero: linear-gradient(135deg, rgba(255, 45, 85, 0.85) 0%, rgba(255, 45, 85, 0.85) 100%);
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --heading-weight: 700;
  --body-weight: 400;
  --body-weight-strong: 600;
  --heading-letter-spacing: 0em;
  --heading-transform: none;
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --radius-input: 6px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.072);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.102);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.138);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.18);
  --spacing-xs: 0.5rem;
  --spacing-sm: 1.0rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.0rem;
  --spacing-xl: 3.0rem;
  --spacing-2xl: 4.0rem;
  --status-good: #549457;
  --status-good-bg: rgba(46, 125, 50, 0.14);
  --status-good-border: rgba(84, 148, 87, 0.45);
  --status-warn: #C27235;
  --status-warn-bg: rgba(180, 83, 9, 0.14);
  --status-warn-border: rgba(194, 114, 53, 0.45);
  --status-bad: #D56262;
  --status-bad-bg: rgba(198, 40, 40, 0.14);
  --status-bad-border: rgba(213, 98, 98, 0.45);
  --status-info: #4A88CE;
  --status-info-bg: rgba(21, 101, 192, 0.14);
  --status-info-border: rgba(74, 136, 206, 0.45);
  --info-bg: rgba(94, 96, 206, 0.12);
  --hero-scrim-rgb: 0, 0, 0;
}




/* Sticky footer. Short pages — a blog with three posts, an empty cart — left a
   stripe of page background below the footer, which reads as the page having
   failed to load rather than as the page simply being short. */
body {
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    font-weight: var(--body-weight, 400);
    line-height: 1.65;
    /* --text-body is the full text colour at ~88%. Pure #000 on #FFF is 21:1,
       which reads as glare rather than as contrast; this lands around 15:1 —
       comfortably above the 4.5:1 AA floor with the hardness taken off. */
    color: var(--text-body, var(--white));
    background: var(--dark);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Heading personality comes from the active theme. font-family is deliberately
   NOT set here — individual components opt into var(--font-heading), and
   forcing it globally would restyle surfaces that intentionally use body type. */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--heading-weight);
    letter-spacing: var(--heading-letter-spacing);
    text-transform: var(--heading-transform);
    /* Headings keep the undiluted text colour — the contrast step between a
       heading and its body copy is what creates hierarchy without extra weight. */
    color: var(--text-primary);
    line-height: 1.25;
    text-wrap: balance;
}

/* Long-form prose reads better a little narrower than a full 1200px container. */
p { max-width: 68ch; }
/* The measure is for running prose only. Anything laid out by a parent —
   centred empty states, grid cells, table cells — must not inherit a 68ch
   block, or it sits left inside a centred container. */
.container > p, .hero-content p, [class*="-grid"] p, td p, li p,
.empty-state p, .no-media, [class*="-card"] p, [class*="-cell"] p,
[style*="text-align: center"] p, .section-cta p { max-width: none; }
.empty-state p, .no-media { max-width: none; margin-inline: auto; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ===================================
   NAVIGATION
   =================================== */
.main-nav {
    background: var(--dark-gray);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: var(--heading-weight);
    /* Painted, not clipped. The old rule set -webkit-text-fill-color:transparent
       and relied on background-clip to show the text — anywhere that clip fails
       the wordmark disappears entirely. Solid colour is also simply calmer, and
       a theme that wants the gradient back can switch Gradients to Vivid. */
    color: var(--primary-text);
    text-decoration: none;
    letter-spacing: 0.02em;
    display: inline-block;
    line-height: 1.2;
}

/* Opt-in gradient wordmark — only when the theme asks for a vivid gradient. */
[data-gradients="full"] .nav-logo {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-logo-image {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a:not(.btn) {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: var(--body-weight, 400);
    font-size: 0.9375rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.18s ease;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn):hover,
.nav-links a:not(.btn)[aria-current="page"] {
    color: var(--text-primary);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.6875rem 1.375rem;
    min-height: 2.75rem;          /* a comfortable 44px pointer target */
    font-family: inherit;         /* <button> does NOT inherit this by default */
    font-size: 0.9375rem;
    font-weight: var(--body-weight-strong, 600);
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    border-radius: var(--radius-pill);
    transition: background-color .18s ease, border-color .18s ease,
                color .18s ease, box-shadow .18s ease, transform .18s ease;
    cursor: pointer;
    border: 1px solid transparent;
    vertical-align: middle;
}

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

.btn-primary {
    background: var(--gradient-primary);
    /* Derived from the fill, not hardcoded white — a yellow or lime primary
       would otherwise carry an unreadable label. */
    color: var(--on-primary, #FFFFFF);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--on-secondary, #FFFFFF);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* The default for anything that is not the one action we want pressed:
   readable, clearly clickable, and quiet enough to sit beside a primary. */
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color-strong);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary-text);
    background: rgba(var(--primary-rgb), 0.06);
}

/* Lowest-emphasis action — no chrome at all until you point at it. */
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
}

.btn-ghost:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-text);
}

.btn-small {
    padding: 0.4375rem 0.9375rem;
    min-height: 2.125rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 0.9375rem 2rem;
    min-height: 3.25rem;
    font-size: 1.0625rem;
}

/* Disabled state must stay legible: 0.6 opacity on a mid-grey fill dropped
   "Sold out" to roughly 2:1 against its own background. */
.btn-disabled,
.btn:disabled,
.btn[disabled] {
    background: var(--mid-gray);
    color: var(--text-muted);
    border-color: transparent;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 1;
}

.btn-disabled:hover,
.btn:disabled:hover {
    transform: none;
    background: var(--mid-gray);
}

.btn-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    background: var(--gradient-primary);
    color: var(--on-primary, #FFFFFF);
    border: none;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.2;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: var(--body-weight-strong, 600);
    transition: background-color .18s ease, box-shadow .18s ease;
}

.btn-play:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero-section {
    /* Sized by its content with a ceiling, not by the viewport. The old 80vh
       rule meant a tall monitor got a taller slab of colour and pushed the
       actual music further below the fold. */
    min-height: 34vh;
    padding: var(--spacing-2xl) 0;
    background: var(--dark);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Only draw the wash when there is an image underneath to soften. */
.hero-section.has-image {
    min-height: 46vh;
}

.hero-overlay {
    position: relative;
    inset: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section.has-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
                rgba(var(--hero-scrim-rgb, 0, 0, 0), 0.35) 0%,
                rgba(var(--hero-scrim-rgb, 0, 0, 0), 0.72) 100%);
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 46rem;
    padding: var(--spacing-lg);
}

.hero-eyebrow {
    font-size: 0.8125rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-text);
    margin-bottom: var(--spacing-sm);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    margin-bottom: var(--spacing-sm);
    animation: fadeInUp 0.4s ease-out both;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.6vw, 1.1875rem);
    color: var(--text-muted);
    max-width: 34rem;
    margin: 0 auto var(--spacing-lg);
    animation: fadeInUp 0.4s ease-out both;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.4s ease-out both;
}

/* Over a photograph the scrim carries the contrast, so the type goes light. */
.hero-section.has-image .hero-title,
.hero-section.has-image .hero-subtitle,
.hero-section.has-image .hero-eyebrow {
    color: #FFFFFF;
}

.hero-section.has-image .hero-subtitle { color: rgba(255, 255, 255, 0.86); }
.hero-section.has-image .hero-eyebrow  { color: rgba(255, 255, 255, 0.78); }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   SECTIONS
   =================================== */
.featured-section,
.tour-section,
.store-preview,
.music-catalog,
.tour-dates-section,
.store-section {
    padding: var(--spacing-2xl) 0;
    background: var(--dark);
}

.featured-section {
    background: var(--dark-gray);
}

.store-preview {
    background: var(--dark-gray);
}

.section-title {
    font-size: clamp(1.5rem, 2.4vw, 1.875rem);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
    max-width: 44rem;
}

/* Section heading + optional "see all" on one line — repeated on the home page
   sections so every band of content opens the same way. */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
}

.section-head .section-title,
.section-head .section-subtitle { margin-bottom: 0; }

.section-head-text { display: flex; flex-direction: column; gap: 0.25rem; }

.section-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    white-space: nowrap;
    border-bottom: 1px solid transparent;
    transition: color .18s ease, border-color .18s ease;
}

.section-link:hover { color: var(--primary-text); border-bottom-color: currentColor; }

.section-cta {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* ===================================
   ALBUM GRID
   =================================== */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: var(--spacing-sm);
}

.album-card {
    display: block;
    background: var(--dark-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    transition: border-color .18s ease, transform .18s ease;
}

.album-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-color-strong);
}

.album-cover {
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.album-card:hover .album-cover img {
    transform: scale(1.1);
}


.album-info {
    padding: var(--spacing-sm);
    color: var(--text-primary);
}

.album-info h3 {
    font-size: 1.0625rem;
    margin-bottom: 0.125rem;
}

.album-date {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Large Album Grid for Music Page */
.album-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
}

.album-card-large {
    background: var(--dark-gray);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s ease;
}

.album-card-large:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.album-link {
    text-decoration: none;
    color: inherit;
}

.album-cover-large {
    aspect-ratio: 1/1;
    position: relative;
    overflow: hidden;
}

.album-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.album-card-large:hover .album-cover-large img {
    transform: scale(1.1);
}

.album-overlay {
    position: absolute;
    inset: 0;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.album-card-large:hover .album-overlay {
    opacity: 0.5;
}

.play-icon {
    font-size: 4rem;
    color: var(--white);
}


.album-info-large {
    padding: var(--spacing-lg);
    color: var(--white);
}

.album-info-large h2 {
    font-size: 1.5rem;
    font-weight: var(--heading-weight);
    margin-bottom: 0.5rem;
}

.album-year {
    color: var(--primary-text);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.album-description {
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===================================
   PAGE HEADERS
   =================================== */
.page-header {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    text-align: center;
    background: var(--dark);
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3.4vw, 2.5rem);
    font-weight: var(--heading-weight);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

/* Admin is a tool, not a shopfront — its headings sit one step down. */
.admin-section .page-title,
.admin-dashboard .page-title,
.admin-header .page-title,
.admin-header h1 {
    font-size: clamp(1.375rem, 2vw, 1.75rem);
}

.page-subtitle {
    font-size: 1.0625rem;
    color: var(--text-muted);
    max-width: 44rem;
    margin-inline: auto;
}

/* ===================================
   ALBUM DETAIL
   =================================== */
.album-detail-header {
    padding: var(--spacing-2xl) 0;
    background: var(--dark-gray);
}

.album-detail-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.album-cover-xl {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.album-cover-xl img {
    width: 100%;
    display: block;
}


.album-meta {
    color: var(--white);
}

.album-label {
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: 2px;
    margin-bottom: var(--spacing-xs);
}

.album-title-xl {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: var(--heading-weight);
    margin-bottom: var(--spacing-sm);
}

.album-release {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.album-description-full {
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
}

.album-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* ===================================
   TRACKLIST
   =================================== */
.tracklist-section {
    padding: var(--spacing-2xl) 0;
    background: var(--dark);
}

.tracklist {
    background: var(--dark-gray);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.track-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: var(--spacing-md);
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.track-item:last-child {
    border-bottom: none;
}

.track-item:hover {
    background: rgba(var(--primary-rgb), 0.06);
}

.track-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-text);
    text-align: center;
}

.track-info {
    color: var(--white);
}

.track-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.track-duration {
    color: var(--text-subtle);
    font-size: 0.875rem;
}

.track-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.audio-player-container {
    margin-top: var(--spacing-lg);
}

/* ===================================
   TOUR DATES
   =================================== */
.tour-list {
    margin-top: var(--spacing-lg);
}

.tour-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: var(--spacing-lg);
    align-items: center;
    background: var(--dark-gray);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    transition: all 0.3s ease;
}

.tour-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.tour-date {
    text-align: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    color: var(--on-primary);
}

.tour-month {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
}


.tour-day {
    display: block;
    font-size: 2rem;
    font-weight: var(--heading-weight);
}

.tour-details {
    color: var(--white);
}

.tour-details h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.tour-details p {
    color: var(--text-muted);
}

/* Tour Grid for Tour Page */
.tour-grid {
    display: grid;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.tour-card {
    background: var(--dark-gray);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: var(--spacing-lg);
    align-items: start;
    transition: all 0.3s ease;
}

.tour-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tour-card.sold-out {
    opacity: 0.7;
}

.tour-card-date {
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: center;
    color: var(--white);
}

.tour-card-month {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.tour-card-day {
    display: block;
    font-size: 2.5rem;
    font-weight: var(--heading-weight);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.tour-card-year {
    display: block;
    font-size: 0.875rem;
    opacity: 0.8;
}

.tour-card-details {
    color: var(--white);
}

.tour-card-venue {
    font-size: 1.5rem;
    font-weight: var(--heading-weight);
    margin-bottom: 0.5rem;
}

.tour-card-location {
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.tour-card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.tour-card-time {
    color: var(--primary-text);
    font-weight: 600;
}

.tour-card-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* Past Shows */
.past-shows-section {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-2xl);
    border-top: 1px solid var(--border-color);
}

.past-shows-list {
    margin-top: var(--spacing-lg);
}

.past-show-item {
    display: grid;
    grid-template-columns: 9rem 2fr 1fr;
    gap: var(--spacing-md);
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-subtle);
    font-size: 0.9375rem;
}

.past-show-item:last-child { border-bottom: none; }

.past-show-date {
    font-weight: 600;
}

.past-show-venue {
    font-weight: 600;
}

/* ===================================
   STORE/PRODUCTS
   =================================== */
.store-category {
    margin-bottom: var(--spacing-2xl);
}

.category-title {
    font-size: 2rem;
    font-weight: var(--heading-weight);
    color: var(--white);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: var(--spacing-sm);
}

.product-card {
    display: block;
    background: var(--dark-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    transition: border-color .18s ease, transform .18s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-color-strong);
}

.product-card a {
    text-decoration: none;
    color: inherit;
}

.product-image {
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-placeholder,
.album-placeholder,
.album-placeholder-large,
.album-placeholder-xl,
.song-artwork-placeholder,
.song-cover-placeholder,
.post-image-placeholder,
.related-image-placeholder {
    width: 100%;
    /* height comes from the wrapper's aspect-ratio where there is one; the
       card-level placeholders below set their own. Never height:100% here —
       an unwrapped placeholder then eats the whole card. */
    background: var(--mid-gray);
    color: var(--text-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: var(--heading-weight);
    text-transform: uppercase;
}

.product-placeholder,
.album-placeholder,
.album-placeholder-large,
.album-placeholder-xl,
.song-artwork-placeholder,
.song-cover-placeholder { height: 100%; }

/* Card-level placeholders have no sized wrapper, so they match the height of
   the <img> they stand in for. */
.post-image-placeholder { height: 200px; }
.related-image-placeholder { height: 150px; }


.product-info {
    padding: var(--spacing-sm);
    color: var(--text-primary);
}

.product-name {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.product-price {
    color: var(--text-body);
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.product-stock {
    font-size: 0.875rem;
    color: var(--text-subtle);
    margin-bottom: var(--spacing-sm);
}

.product-stock-out {
    font-size: 0.875rem;
    color: var(--primary-text);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

/* Product Detail */
.product-detail-section {
    padding: var(--spacing-2xl) 0;
    background: var(--dark);
}

.product-detail-grid {
    align-items: start;
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-xl);
}

.product-image-xl {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.product-image-xl img {
    width: 100%;
    display: block;
}

.product-placeholder-xl {
    aspect-ratio: 1/1;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
}

.product-detail-info {
    color: var(--white);
}

.product-type-label {
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: 2px;
    margin-bottom: var(--spacing-xs);
}

.product-title-xl {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: var(--heading-weight);
    margin-bottom: var(--spacing-md);
}

.product-price-xl {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-text);
    margin-bottom: var(--spacing-lg);
}

.product-description {
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
    color: var(--text-secondary);
}

.product-stock-info {
    margin-bottom: var(--spacing-lg);
}

.stock-available {
    color: var(--status-good);
    font-weight: 600;
}

.stock-out {
    color: var(--status-bad);
    font-weight: 600;
}

.product-actions {
    margin-bottom: var(--spacing-lg);
}

.product-meta {
    color: var(--text-muted);
    line-height: 2;
}

.product-back-link {
    margin-top: var(--spacing-xl);
}

/* ===================================
   FOOTER
   =================================== */
.main-footer {
    margin-top: auto;
    background: var(--dark-gray);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.footer-social {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.footer-social h3 {
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: var(--body-weight-strong, 600);
    margin-bottom: var(--spacing-sm);
}

.social-links {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.18s ease;
}

.social-link:hover {
    color: var(--primary-text);
}

.footer-copy {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    color: var(--text-subtle);
    font-size: 0.875rem;
}

/* ===================================
   ALERTS & MESSAGES
   =================================== */
.flash-messages {
    position: fixed;
    top: 80px;
    right: var(--spacing-lg);
    z-index: 9999;
    max-width: 400px;
}

.alert {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
}

.alert-success {
    background: var(--status-good-bg);
    color: var(--status-good);
    border: 1px solid var(--status-good-border);
}

.alert-error {
    background: var(--status-bad-bg);
    color: var(--status-bad);
    border: 1px solid var(--status-bad-border);
    color: var(--white);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===================================
   EMPTY STATES
   =================================== */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-subtle);
    font-size: 1.125rem;
}

/* ===================================
   AUDIO PLAYER
   =================================== */
.audio-player {
    background: var(--dark-gray);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.audio-player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    color: var(--white);
}

.audio-player-title {
    font-weight: 700;
    font-size: 1.125rem;
}

.audio-player-duration {
    color: var(--primary-text);
    font-weight: 600;
}

.audio-controls {
    width: 100%;
    height: 40px;
    outline: none;
}

.audio-controls::-webkit-media-controls-panel {
    background: var(--dark);
}

.error-message {
    color: var(--primary-text);
    text-align: center;
    padding: var(--spacing-md);
}

/* ===================================
   HTMX LOADING STATES
   =================================== */
.htmx-request {
    opacity: 0.7;
    cursor: wait;
}

/* ===================================
   ADMIN & AUTH CONSOLIDATED STYLES
   =================================== */

/* Utility Classes */
.inline-form {
    display: inline;
}

/* Admin Dashboard */
.admin-dashboard {
    padding: var(--spacing-2xl) 0;
    background: var(--dark);
    min-height: 80vh;
}

.admin-stats {
    /* auto-fill, not auto-fit: auto-fit collapses the empty tracks so a
       6-item set stretched into 5-wide + 1 orphan at full width. */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--dark-gray);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.stat-number {
    font-size: 1.875rem;
    font-weight: var(--heading-weight);
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

.stat-link {
    color: var(--primary-text);
    text-decoration: none;
    font-size: 0.875rem;
    margin-top: auto;
}

.stat-link:hover {
    text-decoration: underline;
}

.admin-quick-links h2 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: var(--spacing-sm);
}

.quick-link-card {
    background: var(--dark-gray);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: border-color .18s ease, background-color .18s ease;
}

.quick-link-card:hover {
    border-color: var(--border-color-strong);
    background: var(--mid-gray);
}

.quick-link-card h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.quick-link-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Admin Sections (Lists) */
.admin-section {
    padding: var(--spacing-2xl) 0;
    background: var(--dark);
    min-height: 80vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    /* flex-start, not center: with a two-line title the action group used to be
       vertically centred against nothing. */
    align-items: flex-start;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
}

.admin-header-actions {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
    flex-wrap: wrap;
}

.admin-section .page-subtitle,
.admin-dashboard .page-subtitle,
.admin-header .page-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    text-align: left;
    margin-top: 0.25rem;
}

.admin-table {
    background: var(--dark-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
}

.admin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.admin-row:last-child {
    border-bottom: none;
}

.admin-row-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.admin-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.admin-thumb-placeholder {
    width: 60px;
    height: 60px;
    background: var(--mid-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: var(--heading-weight);
    font-size: 1.5rem;
    color: var(--text-subtle);
}

.admin-row-info {
    flex: 1;
}

.admin-row-info h3 {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.admin-row-info p {
    color: var(--text-subtle);
    font-size: 0.875rem;
}

.admin-row-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.admin-back {
    margin-top: var(--spacing-xl);
}

/* Song-specific list items */
.song-track-number {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--on-primary);
}

.song-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

.song-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.song-album-badge {
    background: var(--gradient-primary);
    color: #FFFFFF;  /* Always white text on gradient badges */
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
}

.song-standalone-badge {
    background: var(--gradient-secondary);
    color: #FFFFFF;  /* Always white text on gradient badges */
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Tour date specific */
.tour-date-badge {
    background: var(--gradient-primary);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--on-primary);
    min-width: 60px;
}

.tour-month {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.tour-day {
    display: block;
    font-size: 1.5rem;
    font-weight: var(--heading-weight);
}

.badge-sold-out,
.badge-cancelled {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

.badge-sold-out {
    background: var(--primary);
    color: var(--white);
}

.badge-cancelled {
    background: var(--mid-gray);
    color: var(--white);
}

/* Admin Forms */
.admin-form-section {
    padding: var(--spacing-2xl) 0;
    background: var(--dark);
    min-height: 80vh;
}

.admin-form-tabs {
    max-width: 900px;
    margin: var(--spacing-lg) auto 0;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-subtle);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    color: var(--primary-text);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-content h3:first-child {
    margin-top: 0;
}

.tab-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

.admin-form {
    background: var(--dark-gray);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-lg);
    max-width: 60rem;
    margin-inline: auto;
}

.admin-form-tabs .admin-form {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    margin-top: 0;
    max-width: none;
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-weight: var(--body-weight-strong, 600);
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--dark);
    border: 1px solid var(--border-color-strong);
    /* Deliberately NOT --radius-md: on the "Rounded" scale that is 18px, which
       makes a text field look like a pill button. Inputs get their own step. */
    border-radius: var(--radius-input);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-subtle); }

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.16);
}

.form-group small {
    display: block;
    color: var(--text-subtle);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

/* Auth Pages */
.auth-section {
    padding: var(--spacing-2xl) 0;
    background: var(--dark);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.auth-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--dark-gray);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.auth-card h1 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.auth-form .form-group {
    margin-bottom: var(--spacing-lg);
}

.auth-form label {
    display: block;
    color: var(--white);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-form input {
    width: 100%;
    padding: 0.6875rem 0.75rem;
    background: var(--dark);
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-input);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
}


.auth-form button {
    width: 100%;
    margin-top: var(--spacing-md);
}

.auth-footer {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
}

.auth-footer a {
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Music Pages - Song Detail */
.song-detail-header {
    padding: var(--spacing-2xl) 0;
    background: var(--dark-gray);
}

.song-detail-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
}

.song-artwork {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.song-artwork img {
    width: 100%;
    display: block;
}

.song-artwork-placeholder {
    aspect-ratio: 1/1;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    font-weight: var(--heading-weight);
    color: var(--on-primary);
}

.song-meta {
    color: var(--white);
}

.song-label {
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-text);
    letter-spacing: 2px;
    margin-bottom: var(--spacing-xs);
}

.song-title-xl {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: var(--heading-weight);
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
}

.song-artist {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.song-album-link {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.song-album-link a {
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 600;
}

.song-album-link a:hover {
    text-decoration: underline;
}

.song-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--dark-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.song-detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--text-subtle);
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--white);
}

.song-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
}

.song-player-container {
    margin-top: var(--spacing-lg);
}

.song-lyrics {
    grid-column: 1 / -1;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.song-lyrics pre {
    font-family: inherit;
    white-space: pre-wrap;
    color: var(--text-body);
    line-height: 1.8;
    max-width: 60ch;
}

.song-lyrics h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
}

.song-lyrics pre {
    white-space: pre-wrap;
    line-height: 1.8;
    color: var(--text-secondary);
    font-family: inherit;
}

.more-from-album {
    padding: var(--spacing-2xl) 0;
    background: var(--dark);
}

.more-songs-grid {
    display: grid;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    background: var(--dark-gray);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.more-song-card {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: var(--spacing-md);
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.more-song-card:last-child {
    border-bottom: none;
}

.more-song-card:hover {
    background: rgba(var(--primary-rgb), 0.06);
}

.more-song-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-text);
    text-align: center;
}

.more-song-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.more-song-info a {
    color: var(--white);
    text-decoration: none;
}

.more-song-info a:hover {
    color: var(--primary-text);
}

.more-song-info p {
    color: var(--text-subtle);
    font-size: 0.875rem;
}

.more-song-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* Music Pages - Songs List */
.songs-catalog {
    padding: var(--spacing-2xl) 0;
    background: var(--dark);
    min-height: 70vh;
}

.songs-list {
    background: var(--dark-gray);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.song-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--spacing-lg);
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.song-row:last-child {
    border-bottom: none;
}

.song-row:hover {
    background: rgba(var(--primary-rgb), 0.06);
}

.song-row-main {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.song-row-cover {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

.song-cover-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: var(--heading-weight);
    color: var(--on-primary);
}

.song-row-info {
    flex: 1;
}

.song-row-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.song-row-title a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.2s ease;
}

.song-row-title a:hover {
    color: var(--primary-text);
}

.song-row-artist {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.song-row-album {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.song-row-album a {
    color: var(--primary-text);
    text-decoration: none;
}

.song-row-album a:hover {
    text-decoration: underline;
}

.song-row-duration {
    color: var(--text-subtle);
    font-size: 0.875rem;
}

.song-row-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.audio-player-sticky {
    position: sticky;
    bottom: 0;
    margin-top: var(--spacing-lg);
    z-index: 100;
}

/* Theme Selector UI */
.theme-selector-form {
    max-width: 800px;
    margin: 0 auto;
}

.theme-selector {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    justify-content: center;
}

.theme-option {
    width: 160px;
    height: 160px;
    border-radius: var(--radius-lg);
    border: 4px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-option:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.theme-option.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.theme-option-default {
    background: linear-gradient(135deg, #FF2D55 0%, #5E60CE 100%);
}

.theme-option-earthy {
    background: linear-gradient(135deg, #D4622D 0%, #8B5A3C 100%);
}

.theme-option-genz {
    background: linear-gradient(135deg, #FF006E 0%, #8338EC 100%);
}

.theme-option-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: var(--spacing-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
}

.theme-description {
    background: var(--dark-gray);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    text-align: center;
}

.theme-description h3 {
    color: var(--primary-text);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.theme-description p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.settings-panel {
    background: var(--dark-gray);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xl);
}

.settings-panel h2 {
    color: var(--white);
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
}


/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    /* .hero-title / .hero-subtitle / .page-title are clamp()ed now and size
       themselves; overriding them here would only fight the fluid scale. */

    .hero-cta {
        justify-content: center;
    }

    /* Mobile navigation, no JavaScript.
       The links used to wrap into four ragged rows beside a vertically-centred
       wordmark. Stacking the logo and letting the links scroll horizontally
       keeps every destination reachable in one row without a hamburger — which
       would need JS this project deliberately does not use for chrome. */
    .nav-container {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-xs);
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .nav-logo { align-self: center; }

    .nav-links {
        gap: var(--spacing-sm);
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.125rem;
        justify-content: flex-start;
    }

    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links li { flex: 0 0 auto; }
    .nav-links a { white-space: nowrap; }

    .album-detail-grid,
    .product-detail-grid {
        grid-template-columns: 1fr;
    }

    .tour-item,
    .tour-card {
        grid-template-columns: 1fr;
    }

    .past-show-item {
        grid-template-columns: 1fr;
        gap: var(--spacing-xs);
    }

    /* Admin responsive */
    .tab-buttons {
        overflow-x: auto;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .container { padding: 0 var(--spacing-sm); }

    .home-section { padding: var(--spacing-lg) 0; }

    .admin-form { padding: var(--spacing-md); }

    /* Song detail responsive */
    .song-detail-grid {
        grid-template-columns: 1fr;
    }

    .song-title-xl {
        font-size: 2rem;
    }

    /* Song row responsive */
    .song-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .song-row-actions {
        justify-content: flex-start;
    }
}
/* ========================================
   MEDIA LIBRARY STYLES
   ======================================== */

/* Media Library Upload Section */
.media-upload-section {
    background: var(--dark-gray);
    padding: 2rem;
    border-radius: var(--radius-md);
    margin-bottom: 3rem;
}

.media-upload-section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.upload-form .form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.upload-form input[type="file"] {
    background: var(--dark);
    color: var(--text-primary);
    padding: 0.625rem 0.75rem;
    min-height: 2.625rem;
    font-family: inherit;
    font-size: 0.9375rem;
    border-radius: var(--radius-input);
    border: 1px dashed var(--border-color-strong);
    cursor: pointer;
    transition: border-color 0.18s ease;
}

.upload-form input[type="file"]:hover {
    border-color: var(--accent);
    background: var(--mid-gray);
}

/* Media Tabs */
.media-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-text);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Media Grid (for images) */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.media-card {
    background: var(--dark-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color .18s ease;
}

.media-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color-strong);
}

.media-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--mid-gray);
}

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

.media-info {
    padding: 1rem;
}

.media-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-filename {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-meta {
    font-size: 0.75rem;
    color: var(--text-subtle);
    margin-bottom: 1rem;
}

.media-actions {
    display: flex;
    gap: 0.5rem;
}

/* Media List (for audio) */
.media-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.media-list-item {
    background: var(--dark-gray);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: background 0.3s ease;
}

.media-list-item:hover {
    background: var(--mid-gray);
}

.media-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.media-details {
    flex: 1;
}

.media-details h3 {
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.no-media {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Media Picker Modal */
.media-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-picker-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.media-picker-content {
    position: relative;
    background: var(--dark-gray);
    border-radius: var(--radius-lg);
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.media-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.media-picker-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--mid-gray);
    color: var(--text-primary);
}

.media-picker-body {
    padding: 2rem;
    overflow-y: auto;
}

.media-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.media-picker-item {
    background: var(--dark);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.media-picker-item:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.media-picker-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.media-picker-name {
    padding: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-picker-list .media-picker-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.media-picker-list .media-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
}

.media-picker-details {
    flex: 1;
}

.media-picker-meta {
    font-size: 0.75rem;
    color: var(--text-subtle);
}

/* Dual-Mode Toggle Buttons */
.media-input-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: var(--dark);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    width: fit-content;
}

.toggle-btn {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    color: var(--text-primary);
}

.toggle-btn.active {
    background: var(--primary);
    color: #FFFFFF;
}

.media-input-mode {
    margin-bottom: 1rem;
}

/* Media Preview in Forms */
.media-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--dark);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.media-preview img.media-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.media-preview .media-filename {
    flex: 1;
    color: var(--text-primary);
}

.no-media-selected {
    color: var(--text-muted);
    font-style: italic;
}

/* Inline Form Styles */

/* Responsive Design */
@media (max-width: 768px) {
    .upload-form .form-row {
        grid-template-columns: 1fr;
    }

    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .media-picker-content {
        width: 95%;
        max-height: 90vh;
    }

    .media-picker-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .media-list-item {
        flex-wrap: wrap;
    }

    .media-actions {
        flex-wrap: wrap;
    }
}

/* ===================================
   BLOG STYLES
   =================================== */

/* Blog Hero */
.blog-hero {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    text-align: center;
    background: var(--dark);
    border-bottom: 1px solid var(--border-color);
}

.blog-hero .page-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.blog-list-section {
    padding: 3rem 0;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: var(--spacing-sm);
}

.post-card {
    background: var(--dark-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color .18s ease, background-color .18s ease;
    border: 1px solid var(--border-color);
}

.post-card:hover { border-color: var(--border-color-strong); }

/* The whole card is the hit target, not just the title. */
.post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}





.post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}











/* Article Detail Page */
.article-detail {
    padding-bottom: 3rem;
}

.article-hero-wrapper {
    background: var(--dark);
    padding: 2rem 0 0;
}

.article-hero {
    width: 100%;
    max-width: 1200px;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin: 0 auto;
    display: block;
}

.article-header {
    padding: var(--spacing-xl) 0 var(--spacing-md);
    text-align: center;
}

.article-header .container,
.article-body .container { max-width: 50rem; }

.article-title {
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    margin: 0 0 1rem 0;
    line-height: 1.2;
    color: var(--text-primary);
}

.article-meta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-size: 1rem;
}

.article-meta span::after {
    content: '•';
    margin-left: 1rem;
}

.article-meta span:last-child::after {
    content: '';
    margin: 0;
}

.article-body {
    padding: 2rem 0;
}

.article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-body);
}

.article-content p { max-width: none; }

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    font-weight: 700;
}

.article-content h1 { font-size: 2.5rem; }
.article-content h2 { font-size: 2rem; }
.article-content h3 { font-size: 1.5rem; }

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content a {
    color: var(--primary-text);
    text-decoration: underline;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 2rem 0;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
}

.article-content code {
    background: var(--dark-gray);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.article-content pre {
    background: var(--dark-gray);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 2rem 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.article-content table th,
.article-content table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.article-content table th {
    background: var(--dark-gray);
    font-weight: 700;
    text-align: left;
}

.article-content hr {
    border: none;
    border-top: 2px solid var(--border-color, rgba(255, 255, 255, 0.1));
    margin: 3rem 0;
}

.article-footer {
    padding: 2rem 0;
}

/* Related Articles */
.related-articles {
    background: var(--dark-gray);
    padding: 3rem 0;
    margin-top: 3rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.related-card {
    background: var(--dark);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s ease;
}

.related-card:hover {
    transform: translateY(-4px);
}

.related-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}



.related-content {
    padding: 1rem;
}

.related-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.related-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-title a:hover {
    color: var(--primary-text);
}

.related-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Admin Styles for Articles */
.status-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: var(--status-good-bg);
    color: var(--status-good);
    border: 1px solid var(--status-good-border);
}

.badge-warning {
    background: var(--status-warn-bg);
    color: var(--status-warn);
    border: 1px solid var(--status-warn-border);
}

.badge-secondary {
    background: var(--mid-gray);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.badge-danger {
    background: var(--status-bad-bg);
    color: var(--status-bad);
    border: 1px solid var(--status-bad-border);
}

/* Admin Filters */
.admin-filters {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--dark-gray);
    border-radius: var(--radius-md);
}

.filter-form {
    margin: 0;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

/* Markdown Editor */
.markdown-editor {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    background: var(--dark-gray);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.markdown-help-callout {
    background: var(--info-bg, rgba(59, 130, 246, 0.1));
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.markdown-help-callout h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.markdown-help-callout ul {
    margin: 0;
    padding-left: 1.5rem;
}

.markdown-help-callout li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.markdown-help-callout code {
    background: var(--dark-gray);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

/* Info Box */
.info-box {
    background: var(--dark-gray);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.info-box p {
    margin: 0;
    color: var(--text-secondary);
}

/* Recent Posts on Homepage */
.recent-posts-section {
    padding: 4rem 0;
    background: var(--dark-gray);
}

/* Responsive Design for Blog */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .article-title {
        font-size: 2rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .article-meta span::after {
        display: none;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   LANDING / MARKETING PAGE
   ============================================================ */

/* --- Nav --- */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
    background: transparent;
}

.landing-nav.scrolled {
    background: var(--dark, #1a1a2e);
    box-shadow: 0 2px 20px rgba(0,0,0,0.4);
    padding: 0.5rem 0;
}

.landing-nav .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.landing-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.landing-nav .nav-links a:not(.btn) {
    color: var(--text-primary, #fff);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.landing-nav .nav-links a:not(.btn):hover {
    color: var(--primary-text);
}

.btn-nav-cta {
    padding: 0.5rem 1.25rem !important;
    font-size: 0.9rem !important;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.15rem;
    border-radius: var(--radius-md, 8px);
}


/* --- Hero --- */
.landing-hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 8rem 0 5rem;
}

.landing-hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-dark);
    z-index: 0;
}

.landing-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(var(--primary-rgb, 255,45,85), 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(var(--secondary-rgb, 94,96,206), 0.12) 0%, transparent 50%);
    animation: heroPulse 8s ease-in-out infinite alternate;
}

@keyframes heroPulse {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.landing-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 850px;
}

.landing-title {
    font-family: var(--font-heading, var(--font-display));
    font-size: 4rem;
    font-weight: var(--heading-weight);
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    color: var(--text-primary, #fff);
    line-height: 1.1;
    animation: fadeInUp 0.8s ease-out;
}

.landing-subtitle {
    font-size: 1.35rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
    animation: fadeInUp 1s ease-out;
}

.landing-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1.2s ease-out;
}

/* --- Social Proof --- */
.landing-social-proof {
    padding: 1.5rem 0;
    text-align: center;
    background: var(--dark-gray);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.landing-social-proof p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin: 0;
}

/* --- Section headings --- */
.landing-section-title {
    font-family: var(--font-heading, var(--font-display));
    font-size: 2.5rem;
    font-weight: var(--heading-weight);
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--text-primary, #fff);
}

.landing-section-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* --- Features --- */
.landing-features {
    padding: 5rem 0;
    background: var(--dark, #1a1a2e);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--dark-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 12px);
    padding: 2rem;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary, #FF2D55);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary, linear-gradient(135deg, var(--primary), var(--secondary)));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.4rem;
    color: var(--on-primary);
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #fff);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* --- Theme Showcase --- */
.landing-themes {
    padding: 5rem 0;
    background: var(--dark-gray, #16213e);
}

.theme-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.theme-showcase-card {
    text-align: center;
}

.theme-showcase-card h3 {
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem;
    color: var(--text-primary, #fff);
}

.theme-showcase-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.theme-showcase-preview {
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    aspect-ratio: 4/3;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.theme-showcase-card:hover .theme-showcase-preview {
    transform: scale(1.03);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

/* Mini theme previews */
.theme-preview-default {
    background: #0f0f23;
}
.theme-preview-default .theme-preview-nav { background: #1a1a2e; height: 8%; }
.theme-preview-default .theme-preview-hero { background: linear-gradient(135deg, #FF2D55, #5E60CE); height: 35%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; }
.theme-preview-default .theme-preview-title { width: 60%; height: 12px; background: rgba(255,255,255,0.9); border-radius: var(--radius-md); }
.theme-preview-default .theme-preview-text { width: 40%; height: 8px; background: rgba(255,255,255,0.5); border-radius: var(--radius-sm); }
.theme-preview-default .theme-preview-cards { display: flex; gap: 8px; padding: 12px; height: 57%; }
.theme-preview-default .theme-preview-card-item { flex: 1; background: #1a1a2e; border-radius: var(--radius-md); border: 1px solid rgba(255,45,85,0.2); }

.theme-preview-earthy {
    background: #2C1810;
}
.theme-preview-earthy .theme-preview-nav { background: #3D2317; height: 8%; }
.theme-preview-earthy .theme-preview-hero { background: linear-gradient(135deg, #D4622D, #8B4513); height: 35%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; }
.theme-preview-earthy .theme-preview-title { width: 60%; height: 12px; background: rgba(255,255,255,0.9); border-radius: var(--radius-md); }
.theme-preview-earthy .theme-preview-text { width: 40%; height: 8px; background: rgba(255,255,255,0.5); border-radius: var(--radius-sm); }
.theme-preview-earthy .theme-preview-cards { display: flex; gap: 8px; padding: 12px; height: 57%; }
.theme-preview-earthy .theme-preview-card-item { flex: 1; background: #3D2317; border-radius: var(--radius-md); border: 1px solid rgba(212,98,45,0.2); }

.theme-preview-genz {
    background: #FFF5F9;
}
.theme-preview-genz .theme-preview-nav { background: #fff; height: 8%; }
.theme-preview-genz .theme-preview-hero { background: linear-gradient(135deg, #FF006E, #8338EC); height: 35%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; }
.theme-preview-genz .theme-preview-title { width: 60%; height: 12px; background: rgba(255,255,255,0.9); border-radius: var(--radius-md); }
.theme-preview-genz .theme-preview-text { width: 40%; height: 8px; background: rgba(255,255,255,0.5); border-radius: var(--radius-sm); }
.theme-preview-genz .theme-preview-cards { display: flex; gap: 8px; padding: 12px; height: 57%; }
.theme-preview-genz .theme-preview-card-item { flex: 1; background: #fff; border-radius: var(--radius-md); border: 1px solid rgba(255,0,110,0.15); }

/* --- How It Works --- */
.landing-how-it-works {
    padding: 5rem 0;
    background: var(--dark, #1a1a2e);
}

.how-it-works-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
}

.how-step {
    flex: 1;
    text-align: center;
    padding: 0 1.5rem;
}

.how-step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary, linear-gradient(135deg, var(--primary), var(--secondary)));
    color: var(--on-primary);
    font-size: 1.5rem;
    font-weight: var(--heading-weight);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.how-step h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #fff);
}

.how-step p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.how-step-connector {
    width: 60px;
    min-width: 60px;
    height: 2px;
    background: var(--primary, #FF2D55);
    opacity: 0.3;
    margin-top: 28px;
}

/* --- Pricing --- */
.landing-pricing {
    padding: 5rem 0;
    background: var(--dark-gray, #16213e);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.pricing-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md, 12px);
    padding: 2.5rem 2rem;
    position: relative;
    transition: transform 0.25s;
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.pricing-card-featured {
    border-color: var(--primary, #FF2D55);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 0 40px rgba(var(--primary-rgb, 255,45,85), 0.15);
    transform: scale(1.05);
    z-index: 1;
}

.pricing-card-featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary, #FF2D55);
    color: var(--on-primary);
    padding: 0.3rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.pricing-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.pricing-card-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary, #fff);
}

.pricing-price {
    font-family: var(--font-heading, var(--font-display));
    font-size: 2.5rem;
    font-weight: var(--heading-weight);
    color: var(--primary, #FF2D55);
    margin-bottom: 0.5rem;
}

.pricing-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.pricing-features li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-primary, rgba(255,255,255,0.85));
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.pricing-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--primary, #FF2D55);
    font-weight: 700;
}

/* --- Freeform Content --- */
.landing-content {
    padding: 4rem 0;
    background: var(--dark, #1a1a2e);
}

.landing-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.landing-body h1,
.landing-body h2,
.landing-body h3 {
    font-family: var(--font-heading, var(--font-display));
    margin: 2rem 0 1rem;
}

.landing-body h1 { font-size: 2rem; }
.landing-body h2 { font-size: 1.6rem; }
.landing-body h3 { font-size: 1.3rem; }
.landing-body p { margin-bottom: 1rem; }
.landing-body a { color: var(--primary-text); text-decoration: underline; }
.landing-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 1.5rem 0; }
.landing-body ul, .landing-body ol { margin: 1rem 0 1rem 2rem; }
.landing-body li { margin-bottom: 0.5rem; }

.landing-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(255,255,255,0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.landing-body pre {
    background: rgba(0,0,0,0.3);
    padding: 1rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.landing-body code { font-size: 0.9em; }

/* --- Final CTA --- */
.landing-final-cta {
    padding: 5rem 0;
    text-align: center;
    background: var(--gradient-primary, linear-gradient(135deg, var(--primary), var(--secondary)));
}

.landing-final-cta h2 {
    font-family: var(--font-heading, var(--font-display));
    font-size: 2.5rem;
    font-weight: var(--heading-weight);
    color: var(--on-primary);
    margin-bottom: 1rem;
}

.landing-final-cta p {
    font-size: 1.15rem;
    /* Sits on the brand fill, so it takes the derived label colour. The old
       rgba(255,255,255,0.85) was ~2.95:1 on a hot-pink banner. */
    color: var(--on-primary);
    max-width: 550px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Inverted: a primary button on a primary banner would vanish. */
.landing-final-cta .btn {
    background: var(--dark);
    color: var(--primary-text);
    border: none;
}

.landing-final-cta .btn:hover {
    background: var(--dark-gray);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* --- Landing Footer --- */
.landing-footer {
    padding: 3rem 0 1.5rem;
    background: var(--dark, #0a0a1a);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.landing-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.landing-footer-brand h3 {
    font-family: var(--font-heading, var(--font-display));
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #fff);
}

.landing-footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.landing-footer-links h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.landing-footer-links ul {
    list-style: none;
    padding: 0;
}

.landing-footer-links li {
    margin-bottom: 0.4rem;
}

.landing-footer-links a {
    color: var(--text-primary, rgba(255,255,255,0.7));
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.landing-footer-links a:hover {
    color: var(--primary-text);
}

.landing-footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}

.landing-footer-bottom p {
    color: var(--text-secondary, rgba(255,255,255,0.3));
    font-size: 0.85rem;
    margin: 0;
}

/* --- Landing Page Responsive --- */
@media (max-width: 968px) {
    .features-grid,
    .theme-showcase-grid,
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-card-featured {
        transform: scale(1);
    }

    .pricing-card-featured:hover {
        transform: translateY(-4px);
    }

    .landing-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .landing-nav .nav-links {
        gap: 0.75rem;
        font-size: 0.85rem;
    }

    .landing-hero {
        min-height: 70vh;
        padding: 6rem 0 3rem;
    }

    .landing-title {
        font-size: 2.5rem;
    }

    .landing-subtitle {
        font-size: 1.1rem;
    }

    .landing-hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .landing-section-title {
        font-size: 2rem;
    }

    .features-grid,
    .theme-showcase-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .how-it-works-steps {
        flex-direction: column;
        align-items: center;
    }

    .how-step-connector {
        width: 2px;
        height: 30px;
        min-width: auto;
        margin: 0;
    }

    .landing-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .landing-final-cta h2 {
        font-size: 1.8rem;
    }
}

/* ============================================================
   GLOBAL ADMIN EXTRAS
   ============================================================ */

.admin-table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-secondary, rgba(255,255,255,0.7));
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.admin-table code {
    background: rgba(255,255,255,0.08);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

/* Commerce admin grids — shared styles for album Sale Formats and merch Variants tables */

.sale-formats-block,
.variant-grid-block {
    margin: var(--spacing-xl) 0 0;
    padding: var(--spacing-lg) 0 0;
    border-top: 1px solid var(--border-color);
}

.sale-formats-block h3,
.variant-grid-block h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
}

/* The block is separated by its own top rule; the first one in a panel would
   otherwise draw a stray line across the top with nothing above it. */
.sale-formats-block:first-child,
.variant-grid-block:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.sale-formats-block .form-help-text,
.variant-grid-block .form-help-text {
    color: var(--text-subtle);
    margin: 0 0 var(--spacing-md);
}

.admin-format-grid,
.admin-variant-grid {
    width: 100%;
    min-width: 44rem;      /* forces .scroll-x to scroll rather than squash */
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.admin-format-grid th,
.admin-variant-grid th,
.admin-format-grid td,
.admin-variant-grid td {
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.admin-format-grid th,
.admin-variant-grid th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-format-grid tbody tr:last-child td,
.admin-variant-grid tbody tr:last-child td {
    border-bottom: 0;
}

/* Enabled column — first on Sale Formats, last on Variants. Narrow, centred. */
.admin-format-grid th:first-child,
.admin-format-grid td:first-child,
.admin-variant-grid th:last-child,
.admin-variant-grid td:last-child {
    width: 5rem;
    text-align: center;
}

/* Reset the global .form-group input full-width rule inside these tables
   so inputs size by their cell / max-width rather than the outer form. */
.admin-format-grid input,
.admin-variant-grid input {
    width: auto;
}

.admin-format-grid input[type="number"],
.admin-variant-grid input[type="number"] {
    width: 100%;
    max-width: 8.5rem;
    padding: 0.4375rem 0.5rem;
    background: var(--dark);
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-input);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
}

.admin-variant-grid input[type="text"] {
    width: 100%;
    max-width: 10rem;
    padding: 0.4375rem 0.5rem;
    background: var(--dark);
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-input);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
}

.admin-format-grid input[type="number"]:focus,
.admin-variant-grid input[type="number"]:focus,
.admin-variant-grid input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

/* Theme-aware checkboxes: larger, themed accent, consistent margin */
.admin-format-grid input[type="checkbox"],
.admin-variant-grid input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary);
    cursor: pointer;
    margin: 0;
}

/* Em-dash placeholders in "not applicable" cells */
.grid-empty {
    color: var(--text-subtle);
    font-style: normal;
}

/* Column sizing for Sale Formats. The table gets a min-width so a narrow panel
   scrolls it instead of wrapping "Digital sales cap" onto three lines. */
.admin-format-grid { min-width: 41rem; }
.admin-format-grid th { white-space: nowrap; }
.admin-format-grid th:first-child,
.admin-format-grid td:first-child { width: 5rem; }
.admin-format-grid th:nth-child(2),
.admin-format-grid td:nth-child(2) { width: 11rem; }
.admin-format-grid th:nth-child(3),
.admin-format-grid td:nth-child(3) { width: 8rem; }
.admin-format-grid th:nth-child(4),
.admin-format-grid td:nth-child(4) { width: 9.5rem; }

/* An unchecked format's price/stock fields do nothing until it is enabled. */
.admin-format-grid tr:has(input[type="checkbox"]:not(:checked)) input[type="number"] {
    opacity: 0.45;
}

/* Variant grid: axis columns take their natural width */
.admin-variant-grid th:first-child,
.admin-variant-grid td:first-child {
    min-width: 7rem;
}

/* ---------------------------------------------------------------
   Public commerce UI — album buy block, song buy block, cart page
   --------------------------------------------------------------- */

.album-buy-formats {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
}

.album-buy-formats h3 {
    margin: 0 0 var(--spacing-md);
    color: var(--primary-text);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.album-format-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.album-format-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin: 0;
}

.album-format-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.album-format-label {
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
}

.album-format-price {
    color: var(--primary-text);
    font-weight: 600;
    font-size: 1.25rem;
}

.stock-available,
.stock-out {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stock-available { color: var(--status-good); }
.stock-out { color: var(--status-bad); }

.song-album-only-note {
    margin: 0;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.song-album-only-note a {
    color: var(--primary-text);
    font-weight: 600;
}

.song-buy-form {
    margin: 0;
    display: inline-flex;
}

.cart-section {
    padding: var(--spacing-2xl) 0;
    background: var(--dark);
    min-height: 60vh;
}

.cart-section .empty-state {
    background: var(--dark-gray);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    text-align: center;
}

.cart-section .empty-state p + p {
    margin-top: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.cart-group {
    background: var(--dark-gray);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg) var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.cart-group h2 {
    margin: 0 0 var(--spacing-md);
    color: var(--primary-text);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.cart-table th,
.cart-table td {
    padding: var(--spacing-md) var(--spacing-sm);
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.cart-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cart-table tbody tr:last-child td { border-bottom: 0; }

.cart-item-desc strong {
    color: var(--white);
    font-weight: 700;
    font-size: 1.05rem;
}

.cart-item-sub {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.1rem;
}

.cart-item-price,
.cart-item-total {
    color: var(--primary-text);
    font-weight: 700;
    white-space: nowrap;
}

.cart-item-total { font-size: 1.1rem; }

.cart-item-qty input[type="number"] {
    width: 5rem;
    padding: 0.5rem 0.6rem;
    background: var(--dark);
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-input);
    color: var(--white);
    font-size: 0.95rem;
}

.cart-item-qty input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
}

.cart-summary {
    background: var(--dark-gray);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    text-align: right;
}

.cart-grand-total {
    margin: 0 0 var(--spacing-md);
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}

.cart-grand-total strong {
    color: var(--text-muted);
    font-weight: 600;
    margin-right: var(--spacing-sm);
}

.cart-footnote {
    margin: var(--spacing-md) 0 0;
    color: var(--text-subtle);
    font-size: 0.875rem;
}

.cart-back {
    margin-top: var(--spacing-lg);
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell .btn {
    margin-right: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
}


.badge-muted {
    background: rgba(150, 150, 150, 0.2);
    color: #999;
}



/* Destructive and confirming actions. Tinted rather than filled: a delete
   button should be findable, not the loudest thing on the page — and these
   used to be literal #dc3545 / #28a745, invisible as a *system* to the theme. */
.btn-danger {
    background: var(--status-bad-bg);
    color: var(--status-bad);
    border-color: var(--status-bad-border);
}

.btn-danger:hover {
    background: var(--status-bad);
    color: var(--dark);
    border-color: var(--status-bad);
}

.btn-success {
    background: var(--status-good-bg);
    color: var(--status-good);
    border-color: var(--status-good-border);
}

.btn-success:hover {
    background: var(--status-good);
    color: var(--dark);
    border-color: var(--status-good);
}

.admin-actions {
    margin-bottom: 1.5rem;
}


.markdown-help-inline {
    margin: 1rem 0 1.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
}

.markdown-help-inline h4 {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary, rgba(255,255,255,0.7));
}

.markdown-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.markdown-ref-grid code {
    background: rgba(255,255,255,0.08);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: block;
}

.markdown-editor {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Master Audio Section */
.master-audio-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--dark-gray);
    border-radius: var(--radius-md);
}

.master-audio-section h2 {
    margin-top: 0;
}

.format-chips-container {
    margin: 1rem 0;
}

.format-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chip-available {
    background: var(--status-good-bg);
    color: var(--status-good);
    border: 1px solid var(--status-good-border);
}

.chip-missing {
    background: var(--mid-gray);
    color: var(--text-muted);
    opacity: 0.6;
}

.preview-slider-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--mid-gray);
    border-radius: var(--radius-md);
}

.preview-slider-section label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.master-upload-form {
    margin-top: 1rem;
}


/* =========================================================================
   CHECKOUT, ACCOUNT, INVOICE, PLAYLIST, ADMIN ORDERS / CUSTOMERS / SETTINGS
   All themed via existing CSS vars so default / earthy-outback / pop-genz
   flip cleanly.
   ========================================================================= */

/* --- Checkout form ------------------------------------------------------- */

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--spacing-lg);
}

@media (max-width: 900px) {
    .checkout-grid { grid-template-columns: 1fr; }
}

.checkout-form .form-group { margin-bottom: var(--spacing-md); }
.checkout-form .form-group .req { color: var(--primary-text); }
.checkout-form .form-group small {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.checkout-shipping-zones {
    margin-top: var(--spacing-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.zone-chip {
    display: inline-block;
    margin: 0 0.35rem 0.35rem 0;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.cart-table-compact td { padding: 0.4rem 0.5rem; }

.checkout-totals p {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0.4rem 0;
    color: var(--text-secondary);
}
.checkout-totals .muted span { color: var(--text-muted); }

.checkout-side .cart-summary { margin-top: var(--spacing-md); }

/* --- Status pills (used on return page, account, admin) ----------------- */

.status-pill {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: var(--body-weight-strong, 600);
    letter-spacing: 0.01em;
    background: var(--mid-gray);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.status-pill.status-paid { background: var(--status-good-bg); color: var(--status-good); border-color: var(--status-good-border); }
.status-pill.status-pending,
.status-pill.status-awaiting_payment { background: var(--status-warn-bg); color: var(--status-warn); border-color: var(--status-warn-border); }
.status-pill.status-failed,
.status-pill.status-cancelled,
.status-pill.status-expired { background: var(--status-bad-bg); color: var(--status-bad); border-color: var(--status-bad-border); }
.status-pill.status-refunded,
.status-pill.status-partially_refunded { background: var(--status-info-bg); color: var(--status-info); border-color: var(--status-info-border); }
.status-pill.status-disputed { background: var(--primary); color: var(--on-primary); }

.checkout-status { margin: 0 0 var(--spacing-sm) 0; }
.checkout-status-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* --- Auth (customer login + verify) ------------------------------------- */

.auth-lead {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}
.auth-form .form-group label {
    display: block;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
}
.auth-resend { margin-top: var(--spacing-md); text-align: center; }
.auth-resend a { color: var(--primary-text); }

/* --- Account: purchases, order detail ----------------------------------- */

.account-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.download-link {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    margin: 0.15rem 0;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
}
.download-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

/* --- Invoice (print-friendly) ------------------------------------------- */

.invoice-container { max-width: 800px; }
.invoice-card {
    background: var(--white);
    color: #1a202c;
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
}
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}
.invoice-header h1 { margin: 0; color: var(--primary-text); }
.invoice-business { text-align: right; color: #2d3748; }
.invoice-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    color: #2d3748;
}
.invoice-meta h3 { margin: 0 0 0.4rem 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: #718096; }
.invoice-table { width: 100%; border-collapse: collapse; }
.invoice-table th, .invoice-table td { padding: 0.5rem; border-bottom: 1px solid #e2e8f0; }
.invoice-table th { text-align: left; color: #718096; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.invoice-table .right { text-align: right; }
.invoice-table tfoot td { border-bottom: none; padding-top: 0.6rem; }
.invoice-total td { font-size: 1.2rem; padding-top: 1rem !important; border-top: 1px solid var(--border-color-strong); }
.invoice-footer { margin-top: var(--spacing-md); color: #4a5568; }

@media print {
    nav, footer, .cart-back, .flash-messages { display: none !important; }
    .invoice-card { box-shadow: none; border: 1px solid #ddd; }
}

/* --- Switch tenant tiles ------------------------------------------------ */

.tenant-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--spacing-md);
}
.tenant-tile {
    display: block;
    padding: var(--spacing-md);
    background: var(--dark-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}
.tenant-tile:hover { border-color: var(--primary); transform: translateY(-2px); }
.tenant-tile h3 { margin: 0 0 0.5rem 0; color: var(--primary-text); }
.tenant-tile-meta { color: var(--text-secondary); margin: 0.3rem 0; font-size: 0.9rem; }
.tenant-tile-meta.muted { color: var(--text-muted); }

/* --- Continuous-playlist player ----------------------------------------- */

.playlist-player {
    background: var(--dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}
.now-playing { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.6rem; }
.now-playing-label { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
#np-title { color: var(--white); font-weight: 600; font-size: 1.05rem; }
.player-controls { margin-top: 0.5rem; display: flex; gap: 0.4rem; }

.playlist-list { list-style: none; padding: 0; margin: 0; }
.playlist-list li {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.4rem;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.15s, background 0.15s;
}
.playlist-list li.current { border-color: var(--primary); background: rgba(255, 45, 85, 0.08); }
.playlist-row {
    width: 100%;
    background: none;
    border: none;
    color: var(--white);
    text-align: left;
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
}
.playlist-num { color: var(--text-muted); width: 2rem; }
.playlist-title { flex: 1; }
.playlist-artist { color: var(--text-muted); font-size: 0.85rem; }
.playlist-download {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-sm);
}
.playlist-download:hover { color: var(--primary-text); background: rgba(255, 255, 255, 0.06); }

/* --- Admin tabs nav (settings / orders / customers) --------------------- */

.admin-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-md);
}
.admin-tabs-nav .tab-btn {
    padding: 0.7rem 1.1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    background: none;
    font-weight: 500;
}
.admin-tabs-nav .tab-btn:hover { color: var(--white); }
.admin-tabs-nav .tab-btn.active {
    color: var(--primary-text);
    border-bottom-color: var(--primary);
    font-weight: 700;
}

.webhook-url {
    background: var(--dark);
    padding: 0.7rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    word-break: break-all;
}
.webhook-url code { color: var(--primary-text); font-family: monospace; }

.test-conn-result {
    margin-top: var(--spacing-sm);
    padding: 0.7rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-family: monospace;
    background: var(--dark);
    color: var(--text-secondary);
}
.test-conn-result.ok { border-color: var(--status-good-border); color: var(--status-good); }
.test-conn-result.error { border-color: var(--primary); color: var(--primary-text); }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    margin: 0.3rem 0;
}
.checkbox-row input[type="checkbox"] { accent-color: var(--primary); }

.form-section-heading {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--primary-text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    font-weight: 700;
}


/* --- Admin orders / customers ------------------------------------------- */

.token-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: baseline;
    margin: 0.2rem 0;
    color: var(--white);
    font-size: 0.9rem;
}

.audit-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}
.audit-timeline li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.92rem;
}
.audit-timeline li:last-child { border-bottom: none; }
.audit-timeline strong { color: var(--white); margin: 0 0.4rem; }
.audit-payload {
    background: var(--dark);
    color: var(--text-muted);
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    margin-top: 0.3rem;
    overflow-x: auto;
}

.internal-notes {
    background: var(--dark);
    color: var(--text-secondary);
    padding: 0.7rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.85rem;
}

.muted { color: var(--text-muted); }

/* ===================================
   THEME SYSTEM UI
   ===================================
   Gallery, editor and wizard. These surfaces are themed like everything else,
   so they follow the tenant's own tokens — the editor previews inside an
   iframe precisely so an in-progress edit can't make this chrome unusable.
   =================================== */

/* --- shared bits the rest of the admin didn't already have --------- */
.container-narrow { max-width: 900px; }

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.8125rem;
    letter-spacing: 0.5px;
}




/* ===================================
   THEME GALLERY
   =================================== */
.theme-group-heading {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin: var(--spacing-xl) 0 var(--spacing-xs);
}
.theme-group-heading:first-of-type { margin-top: 0; }

.theme-group-note {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-md);
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.theme-card {
    display: flex;
    flex-direction: column;
    background: var(--dark-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.theme-card:hover { transform: translateY(-3px); border-color: var(--border-color-strong); }
.theme-card.is-active { border-color: var(--primary); }

/* Miniature of a real page: nav rule, headline, card with a button. Enough
   structure that two themes are actually distinguishable at a glance. */
.theme-card-preview {
    aspect-ratio: 16 / 10;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}
.theme-card-chrome { display: flex; align-items: center; gap: 0.4rem; padding-bottom: 0.5rem; border-bottom: 1px solid; }
.theme-card-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.theme-card-rule { height: 4px; border-radius: 2px; flex: 1; }
.theme-card-headline { font-family: var(--font-heading); font-size: 1.75rem; font-weight: 800; line-height: 1; }
.theme-card-panel {
    border-radius: 6px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}
.theme-card-btn { width: 42px; height: 12px; border-radius: 999px; }
.theme-card-line { height: 5px; border-radius: 3px; width: 100%; }
.theme-card-line.short { width: 60%; }
.theme-card-chips { display: flex; gap: 0.3rem; }
.theme-card-chips i { width: 16px; height: 16px; border-radius: 50%; display: block; }

.theme-card-body { padding: var(--spacing-sm); }
.theme-card-title { display: flex; align-items: center; gap: 0.5rem; }
.theme-card-title h3 { font-size: 1rem; margin: 0; font-family: var(--font-heading); }
.theme-badge {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--primary);
    color: var(--on-primary);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-pill);
}
.theme-card-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0.35rem 0 0.5rem;
    min-height: 2.4em;
}
.theme-card-meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-sm);
}
.theme-card-meta span {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-subtle);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
}
.theme-card-actions {
    margin-top: auto; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.theme-card-actions form { display: inline; }

.theme-empty {
    background: var(--dark-gray);
    border: 1px dashed var(--border-color-strong);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}
.theme-empty p { margin: 0; }
.theme-empty-hint { color: var(--text-muted); font-size: 0.9375rem; margin-top: 0.5rem !important; }

/* ===================================
   THEME EDITOR — two-pane
   =================================== */
.theme-editor {
    display: grid;
    grid-template-columns: minmax(340px, 400px) 1fr;
    height: calc(100vh - 70px);
    background: var(--dark);
}

.te-panel {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    min-height: 0;
    background: var(--dark-gray);
}

.te-panel-head { padding: var(--spacing-sm); border-bottom: 1px solid var(--border-color); }
.te-back {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}
.te-back:hover { color: var(--primary-text); }

.te-name, .te-desc {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--text-primary);
    padding: 0.2rem 0;
    font-family: inherit;
}
.te-name { font-size: 1.25rem; font-weight: 700; font-family: var(--font-heading); }
.te-desc { font-size: 0.875rem; color: var(--text-muted); }
.te-name:hover, .te-desc:hover { border-bottom-color: var(--border-color); }
.te-name:focus, .te-desc:focus { outline: none; border-bottom-color: var(--primary); }

.te-lineage, .te-wizard-note { font-size: 0.75rem; color: var(--text-subtle); margin-top: 0.4rem; }
.te-wizard-note {
    color: var(--text-muted);
    border-left: 2px solid var(--primary);
    padding-left: 0.5rem;
    margin-top: 0.6rem;
}

.te-modes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}
.te-modes-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-subtle); }
.te-toggle { display: flex; border: 1px solid var(--border-color); border-radius: 999px; overflow: hidden; }
.te-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.3rem 0.85rem;
    font-size: 0.8125rem;
    cursor: pointer;
    font-family: inherit;
}
.te-toggle-btn.is-on { background: var(--primary); color: var(--on-primary); }

.te-scroll { flex: 1; overflow-y: auto; padding: var(--spacing-sm); }

.te-group { border: none; padding: 0; margin: 0 0 var(--spacing-lg); }
.te-group legend {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-subtle);
    padding: 0 0 0.6rem;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-sm);
}

/* Advanced fields collapse rather than move to another screen, so the user
   keeps their place in the form. */
.te-advanced { display: none; }
.theme-editor.show-advanced .te-advanced { display: block; }

.tf-field { margin-bottom: var(--spacing-sm); }
.tf-field > label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-secondary);
}
.tf-hint { font-size: 0.75rem; color: var(--text-subtle); margin-top: 0.3rem; line-height: 1.45; }
.tf-hint-block { margin: 0 0 var(--spacing-sm); }

.tf-field select, .tf-field input[type="text"] {
    width: 100%;
    background: var(--dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.45rem 0.6rem;
    font-family: inherit;
    font-size: 0.875rem;
}
.tf-field select:focus, .tf-field input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}
.tf-field input[type="range"] { width: 100%; accent-color: var(--primary); }

/* colour rows */
.tf-colour-row { display: flex; gap: 0.5rem; align-items: center; }
.tf-swatch {
    width: 46px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    flex: none;
}
.tf-hex {
    flex: 1;
    background: var(--dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    padding: 0.45rem 0.6rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.8125rem;
    text-transform: uppercase;
}
.tf-hex:focus { outline: none; border-color: var(--primary); color: var(--text-primary); }

/* segmented controls */
.tf-segmented { display: flex; gap: 0.4rem; }
.tf-segmented-wide { display: grid; grid-template-columns: repeat(3, 1fr); }
.tf-seg {
    flex: 1;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.tf-seg input { position: absolute; opacity: 0; pointer-events: none; }
.tf-seg:hover { border-color: var(--border-color-strong); }
.tf-seg.is-on { border-color: var(--primary); color: var(--text-primary); background: rgba(var(--primary-rgb), 0.12); }
.tf-seg-shape {
    display: block;
    width: 26px;
    height: 16px;
    margin: 0 auto 0.35rem;
    border: 2px solid currentColor;
    opacity: 0.75;
}

/* font pairings — the mood label leads, family names are secondary */
.tf-pairings { display: grid; gap: 0.4rem; }
.tf-pairing {
    display: grid;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.7rem;
    cursor: pointer;
    transition: border-color 0.15s ease;
}
.tf-pairing input { position: absolute; opacity: 0; pointer-events: none; }
.tf-pairing:hover { border-color: var(--border-color-strong); }
.tf-pairing.is-on { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.1); }
.tf-pairing-mood { font-weight: 700; font-size: 0.875rem; color: var(--text-primary); }
.tf-pairing-fonts { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.1rem; }
.tf-pairing-note { font-size: 0.6875rem; color: var(--text-subtle); margin-top: 0.15rem; }

/* contrast readout */
.contrast-report {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.7rem;
    margin-top: var(--spacing-sm);
}
.contrast-summary { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.contrast-summary strong { color: var(--status-good); }
.contrast-summary.has-failures strong { color: var(--status-warn); }
.contrast-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.contrast-item {
    display: grid;
    grid-template-columns: 28px 1fr auto auto;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}
.contrast-chip {
    width: 28px;
    height: 20px;
    border-radius: 3px;
    display: grid;
    place-items: center;
    font-size: 0.625rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
}
.contrast-label { color: var(--text-muted); }
.contrast-ratio { font-family: ui-monospace, monospace; color: var(--text-subtle); }
.contrast-verdict { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; }
.contrast-item.pass .contrast-verdict { color: var(--status-good); }
.contrast-item.fail .contrast-verdict { color: var(--status-warn); }

.te-panel-foot {
    display: flex;
    gap: 0.5rem;
    padding: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
    background: var(--dark-gray);
}
.te-panel-foot .btn { flex: 1; }

/* --- preview pane ------------------------------------------------- */
.te-preview { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.te-preview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    padding: 0.5rem var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}
.te-preview-pages { display: flex; gap: 0.3rem; }
.te-page-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    cursor: pointer;
    font-family: inherit;
}
.te-page-btn.is-on { border-color: var(--primary); color: var(--text-primary); }
.te-preview-hint { font-size: 0.75rem; color: var(--text-subtle); }
.te-preview-frame { flex: 1; min-height: 0; background: var(--dark); }
.te-preview-frame iframe { width: 100%; height: 100%; border: none; display: block; }

@media (max-width: 900px) {
    .theme-editor { grid-template-columns: 1fr; height: auto; }
    .te-panel { border-right: none; border-bottom: 1px solid var(--border-color); }
    .te-preview-frame { height: 70vh; }
}

/* ===================================
   THEME WIZARD
   =================================== */
.tw-head { margin-bottom: var(--spacing-xl); }
.tw-head h1 { margin: 0.4rem 0 0.3rem; }

.tw-form { display: grid; gap: var(--spacing-xl); }

.tw-step { border: none; padding: 0; margin: 0; }
.tw-step legend {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    margin-bottom: 0.2rem;
    padding: 0;
}
.tw-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--on-primary);
    display: grid;
    place-items: center;
    font-size: 0.8125rem;
    font-weight: 700;
    flex: none;
}
.tw-note { color: var(--text-muted); font-size: 0.875rem; margin-bottom: var(--spacing-sm); }

.tw-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; }
.tw-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 420px; }
.tw-cards-3 { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

.tw-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--dark-gray);
    padding: var(--spacing-sm);
    cursor: pointer;
    text-align: center;
    display: grid;
    gap: 0.5rem;
    align-content: center;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.tw-card input { position: absolute; opacity: 0; pointer-events: none; }
.tw-card:hover { border-color: var(--border-color-strong); transform: translateY(-2px); }
.tw-card.is-on { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.1); }
.tw-card-label { font-size: 0.875rem; font-weight: 600; }
.tw-card-swatches { display: flex; gap: 0.25rem; justify-content: center; }
.tw-card-swatches i { width: 18px; height: 18px; border-radius: 50%; display: block; }

.tw-mode-chip {
    height: 48px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-size: 1.125rem;
    border: 1px solid var(--border-color);
}
.tw-mode-dark { background: #0F0F14; color: #fff; }
.tw-mode-light { background: #FAFAFC; color: #14141F; }

.tw-corner {
    width: 34px;
    height: 22px;
    margin: 0 auto;
    border: 2px solid var(--text-muted);
}

.tw-hues { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tw-hue { cursor: pointer; }
.tw-hue input { position: absolute; opacity: 0; pointer-events: none; }
.tw-hue > span {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    box-shadow: 0 0 0 1px var(--border-color);
}
.tw-hue input:checked + span { border-color: var(--dark); box-shadow: 0 0 0 2px var(--primary); }
.tw-hue-custom input[type="color"] {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px dashed var(--border-color-strong);
    background: transparent;
    padding: 2px;
    cursor: pointer;
}

.tw-actions { display: flex; gap: var(--spacing-xs); align-items: center; }

/* Active-theme summary on the Settings page */
.settings-theme-row { display: flex; gap: var(--spacing-md); align-items: flex-start; flex-wrap: wrap; }
.settings-theme-swatch {
    width: 160px;
    height: 104px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: var(--spacing-xs);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: none;
}
.settings-theme-aa { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; line-height: 1; }
.settings-theme-chips { display: flex; gap: 0.3rem; }
.settings-theme-chips i { width: 16px; height: 16px; border-radius: 50%; display: block; }
.settings-theme-meta { flex: 1; min-width: 220px; }
.settings-theme-meta p { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: var(--spacing-sm); }

/* ===================================
   MASTER UPLOAD — progress & probe results
   =================================== */
.upload-progress { margin-top: var(--spacing-sm); }
.upload-progress-bar {
    height: 8px;
    background: var(--mid-gray);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.upload-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--gradient-primary);
    transition: width .15s linear;
}
.upload-progress-text {
    font-size: .875rem;
    color: var(--text-muted);
    margin-top: .4rem;
    font-variant-numeric: tabular-nums;
}
.upload-error {
    color: var(--primary-text);
    background: rgba(var(--primary-rgb), .1);
    border-left: 3px solid var(--primary);
    padding: .7rem .9rem;
    border-radius: var(--radius-sm);
    margin-top: var(--spacing-sm);
    font-size: .9375rem;
}
.master-meta {
    display: inline-block;
    font-size: .8125rem;
    color: var(--text-subtle);
    margin-left: .6rem;
    font-variant-numeric: tabular-nums;
}

/* Values we read out of the uploaded file. Presented as offers, never applied
   automatically — the artist's own typing always wins. */
.probe-suggestions {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-top: var(--spacing-md);
    background: var(--dark-gray);
}
.probe-suggestions h3 { font-size: 1rem; margin: 0 0 .3rem; font-family: var(--font-heading); }
.probe-suggestions > p { font-size: .875rem; color: var(--text-muted); margin-bottom: var(--spacing-sm); }
.probe-suggestions ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.probe-suggestions li {
    display: grid;
    grid-template-columns: 8rem 1fr auto;
    gap: .75rem;
    align-items: center;
    font-size: .9375rem;
}
.probe-field {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-subtle);
}
.probe-value { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 40rem) {
    .probe-suggestions li { grid-template-columns: 1fr auto; }
    .probe-field { grid-column: 1 / -1; }
}

/* ===================================
   RELEASE STUDIO
   ===================================
   One screen per album: drop masters, review the running order, act on several
   tracks at once. Replaces the create-song → edit-song → upload loop.
   =================================== */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.scroll-x { overflow-x: auto; }

.studio-eyebrow {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-subtle);
    margin-bottom: .25rem;
}

.studio-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: var(--spacing-lg);
    align-items: start;
}
@media (max-width: 62rem) {
    .studio-grid { grid-template-columns: 1fr; }
    .studio-side { order: -1; }
}

/* --- dropzone ----------------------------------------------------- */
.dropzone {
    border: 2px dashed var(--border-color-strong);
    border-radius: var(--radius-lg);
    background: var(--dark-gray);
    padding: var(--spacing-xl) var(--spacing-lg);
    text-align: center;
    transition: border-color .15s ease, background .15s ease;
    margin-bottom: var(--spacing-md);
}
.dropzone.is-over {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), .08);
}
.dropzone-disabled { opacity: .6; }
.dropzone-headline {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .4rem;
}
.dropzone-sub {
    color: var(--text-muted);
    font-size: .9375rem;
    max-width: 46ch;
    margin: 0 auto var(--spacing-sm);
}
.dropzone-hint { color: var(--text-subtle); font-size: .8125rem; margin-top: .6rem; }

/* --- upload queue ------------------------------------------------- */
.upload-queue {
    display: grid;
    gap: .35rem;
    margin-bottom: var(--spacing-md);
}
.uq-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 8rem 6rem;
    gap: .75rem;
    align-items: center;
    font-size: .875rem;
    padding: .45rem .7rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--dark-gray);
}
.uq-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uq-bar { height: 6px; background: var(--mid-gray); border-radius: var(--radius-pill); overflow: hidden; }
.uq-bar i { display: block; height: 100%; width: 0; background: var(--gradient-primary); transition: width .15s linear; }
.uq-state { text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: .8125rem; }
.uq-row.is-done { border-color: var(--status-good-border); }
.uq-row.is-done .uq-state { color: var(--status-good); }
.uq-row.is-bad { border-color: rgba(251, 191, 36, .5); }
.uq-row.is-bad .uq-state { color: var(--status-warn); text-align: left; grid-column: 2 / -1; }
.uq-row.is-bad .uq-bar { display: none; }

/* --- track table -------------------------------------------------- */
.track-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--dark-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    min-width: 46rem;
}
.track-table th {
    text-align: left;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-subtle);
    padding: .6rem .7rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}
.track-table td {
    padding: .5rem .7rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.track-table tr:last-child td { border-bottom: none; }
.track-row.is-dragging { opacity: .4; }
.track-handle {
    cursor: grab;
    color: var(--text-subtle);
    width: 1.5rem;
    user-select: none;
    font-size: 1.1rem;
}
.track-handle:active { cursor: grabbing; }
.track-select { width: 2rem; }
.track-select input { accent-color: var(--primary); }
.track-num { width: 2.5rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.track-time { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.track-title { min-width: 14rem; }
.track-source {
    display: block;
    font-size: .7rem;
    color: var(--text-subtle);
    margin-top: .15rem;
    overflow-wrap: anywhere;
}
.track-empty td { text-align: center; color: var(--text-muted); padding: var(--spacing-lg); }

.inline-input {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: .3rem .4rem;
    font-family: inherit;
    font-size: .9375rem;
}
.inline-input:hover { border-color: var(--border-color); }
.inline-input:focus { outline: none; border-color: var(--primary); background: var(--dark); }
.inline-input.inline-saved { border-color: var(--status-good); }
.inline-input.inline-bad { border-color: var(--status-warn); }
select.inline-input { min-width: 9rem; }

/* --- status chips ------------------------------------------------- */
.tchip {
    display: inline-block;
    font-size: .6875rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .15rem .45rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    white-space: nowrap;
    margin-right: .2rem;
}
.tchip-good { color: var(--status-good); border-color: var(--status-good-border); }
.tchip-work { color: var(--primary-text); border-color: rgba(var(--primary-rgb), .45); }
.tchip-bad  { color: var(--status-warn); border-color: var(--status-warn-border); }
.tchip-none { color: var(--text-subtle); }

/* --- bulk bar ----------------------------------------------------- */
.bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    padding: .6rem .8rem;
    margin-bottom: .6rem;
    background: var(--dark-gray);
    border: 1px solid var(--border-color);
    transition: background-color .18s ease, border-color .18s ease;
    border-radius: var(--radius-md);
}
.bulk-count { font-size: .875rem; color: var(--text-secondary); }
.bulk-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.bulk-actions select {
    background: var(--dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: .35rem .5rem;
    font-family: inherit;
    font-size: .875rem;
}

.studio-note { font-size: .8125rem; color: var(--text-subtle); margin-top: .7rem; }

/* --- readiness ---------------------------------------------------- */
.readiness {
    background: var(--dark-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    position: sticky;
    top: var(--spacing-md);
}
.readiness-head { display: flex; align-items: center; justify-content: space-between; }
.readiness-head h2 { font-size: 1.0625rem; margin: 0; font-family: var(--font-heading); }
.readiness-score {
    font-variant-numeric: tabular-nums;
    font-size: .8125rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: .1rem .5rem;
}
.readiness-score.is-ready { color: var(--status-good); border-color: var(--status-good-border); }
.readiness-verdict { font-size: .875rem; color: var(--text-muted); margin: .4rem 0 var(--spacing-sm); }
.readiness-verdict.is-ready { color: var(--status-good); }
.readiness-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.readiness-item {
    display: grid;
    grid-template-columns: 1rem minmax(0, 1fr) auto;
    gap: .5rem;
    align-items: baseline;
    font-size: .875rem;
}
.readiness-mark { color: var(--text-subtle); text-align: center; }
.readiness-item.done .readiness-mark { color: var(--status-good); }
.readiness-label { color: var(--text-secondary); }
.readiness-item.optional .readiness-label { color: var(--text-subtle); }
.readiness-detail { color: var(--text-subtle); font-size: .8125rem; text-align: right; white-space: nowrap; }
.readiness-failures {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
    font-size: .8125rem;
}
.readiness-failures ul { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .3rem; }
.readiness-failures span { display: block; color: var(--text-subtle); }

/* ===================================
   BUYER DOWNLOAD PAGES
   ===================================
   Global /d/ routes, branded with the artist's theme. This is the only surface a
   paying fan touches after checkout — twelve raw links undersold the record, so
   the album is the primary action and single tracks are secondary.
   =================================== */
.dl-body {
    background: var(--dark);
    color: var(--text-primary);
    min-height: 100vh;
}
.dl-shell {
    max-width: 46rem;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-2xl);
}
.dl-brand {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}
.dl-brand-name {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.dl-card {
    background: var(--dark-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}
.dl-card-center { text-align: center; }

.dl-head {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}
.dl-art {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: var(--radius-md);
    flex: none;
    box-shadow: var(--shadow-md);
}
.dl-kicker {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-subtle);
    margin-bottom: .25rem;
}
.dl-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    line-height: 1.1;
    margin: 0 0 .3rem;
}
.dl-meta { color: var(--text-muted); font-size: .9375rem; margin: 0; }

.dl-section {
    font-family: var(--font-heading);
    font-size: .8125rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-subtle);
    margin: var(--spacing-lg) 0 .5rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border-color);
}
.dl-help { color: var(--text-muted); font-size: .9375rem; margin-bottom: var(--spacing-sm); }

/* format list — the primary action */
.dl-formats { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.dl-format { display: flex; align-items: center; gap: var(--spacing-sm); }
.dl-format-btn {
    flex: 1;
    display: grid;
    gap: .1rem;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: .7rem .9rem;
    transition: border-color .15s ease, background .15s ease;
}
.dl-format-btn:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), .08);
}
.dl-format-label { font-weight: 700; font-size: 1rem; }
.dl-format-desc { color: var(--text-muted); font-size: .8125rem; }
.dl-format-size {
    font-size: .75rem;
    color: var(--text-subtle);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.dl-format-build { font-style: italic; }

/* per-track list — deliberately quieter than the album action */
.dl-tracks { list-style: none; margin: 0; padding: 0; }
.dl-track {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr) auto auto;
    gap: .75rem;
    align-items: center;
    padding: .5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: .9375rem;
}
.dl-track:last-child { border-bottom: none; }
.dl-track-num { color: var(--text-subtle); font-variant-numeric: tabular-nums; text-align: right; }
.dl-track-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-track-time { color: var(--text-subtle); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.dl-track-get { color: var(--primary-text); text-decoration: none; font-size: .875rem; font-weight: 600; }
.dl-track-get:hover { text-decoration: underline; }
.dl-track-gone { color: var(--text-subtle); font-size: .8125rem; }

.dl-limit {
    margin-top: var(--spacing-md);
    font-size: .8125rem;
    color: var(--text-subtle);
}
.dl-foot {
    text-align: center;
    margin-top: var(--spacing-lg);
    color: var(--text-subtle);
    font-size: .8125rem;
}

.dl-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto var(--spacing-md);
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: dl-spin 900ms linear infinite;
}
@keyframes dl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .dl-spinner { animation: none; border-top-color: var(--border-color); }
}

@media (max-width: 34rem) {
    .dl-format { flex-direction: column; align-items: stretch; }
    .dl-format-size { text-align: right; }
    .dl-track { grid-template-columns: 1.5rem minmax(0, 1fr) auto; }
    .dl-track-time { display: none; }
}

.order-dl-note {
    display: block;
    font-size: .75rem;
    color: var(--text-subtle);
    margin-top: .3rem;
}

/* ===================================
   SALES VIEW
   ===================================
   Album formats and per-track sale settings on one screen. These are one
   decision ("sell the album digitally, and these three tracks individually")
   that previously required thirteen separate forms.
   =================================== */
.sales-summary {
    background: var(--dark-gray);
    border-left: 2px solid var(--primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-md);
}
.sales-summary p { margin: 0; }
.sales-summary-sub { color: var(--text-muted); font-size: .9375rem; margin-top: .3rem !important; }
.sales-pill {
    display: inline-block;
    background: var(--mid-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: .1rem .6rem;
    margin-left: .4rem;
    font-size: .875rem;
    font-variant-numeric: tabular-nums;
}

.sales-warnings { display: grid; gap: .4rem; margin-bottom: var(--spacing-md); }
.sales-warning {
    margin: 0;
    padding: .6rem .85rem;
    border-radius: var(--radius-sm);
    font-size: .9375rem;
    border-left: 3px solid;
}
.sales-warning-blocking {
    color: var(--status-warn);
    border-color: var(--status-warn);
    background: var(--status-warn-bg);
}
.sales-warning-warning {
    color: var(--text-secondary);
    border-color: var(--border-color-strong);
    background: var(--dark-gray);
}

.sales-bulk {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    font-size: .875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}
.sales-bulk-sep { color: var(--text-subtle); }
.sales-bulk-price { display: flex; align-items: center; gap: .3rem; }
.sales-bulk-price input { width: 5.5rem; }

.sales-grid .sales-title { min-width: 12rem; }
.sales-grid select,
.sales-grid input[type="number"] {
    background: var(--dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: .35rem .5rem;
    font-family: inherit;
    font-size: .875rem;
    width: 100%;
}
.sales-grid input.is-muted { opacity: .4; }
.sales-grid input[type="number"] { max-width: 8rem; font-variant-numeric: tabular-nums; }

/* A track set to sell separately with no price cannot actually be bought — the
   cart refuses it. Flag the row rather than letting a fan find out. */
.sales-row.is-unpriced .sales-price {
    border-color: var(--status-warn);
    opacity: 1;
}
.sales-row.is-unpriced .sales-title::after {
    content: 'needs a price';
    display: block;
    font-size: .6875rem;
    color: var(--status-warn);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.readiness-fix { color: var(--primary-text); text-decoration: none; }
.readiness-fix:hover { text-decoration: underline; }

/* ===================================
   HOME PAGE COMPOSITION
   ===================================
   Every band on the home page is optional, so the rhythm has to come from the
   sections themselves rather than from a fixed running order. Alternating
   surface colours (rather than slabs of brand gradient) is what separates them.
   =================================== */

.home-section {
    padding: var(--spacing-xl) 0;
    background: var(--dark);
}

/* Alternate the background of adjacent bands so consecutive sections read as
   separate without needing a rule drawn between them. */
.home-section + .home-section { border-top: 1px solid var(--border-color); }
.home-section.featured-section,
.home-section.store-preview { background: var(--dark-gray); }
.home-section.featured-section + .home-section.shows-section { border-top: none; }

/* --- Upcoming shows ------------------------------------------------------ */

.show-list {
    display: flex;
    flex-direction: column;
}

.show-row {
    display: grid;
    grid-template-columns: 3.5rem 1fr auto;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.show-row:last-child { border-bottom: none; }

/* A date needs to be scannable down a column, not decorated. The old version
   was a gradient-filled tile competing with the venue name beside it. */
.show-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.show-month {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.show-day {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: var(--heading-weight);
    color: var(--text-primary);
}

.show-venue {
    font-size: 1.0625rem;
    margin: 0;
}

.show-location {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0.125rem 0 0;
}

.show-time::before { content: ' · '; }

.show-description {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0.375rem 0 0;
}

.show-actions {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Sold out is information, not a disabled control — it was previously a greyed
   <button> at 0.6 opacity, which read as broken rather than as unavailable. */
.show-badge {
    font-size: 0.8125rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 0.3125rem 0.75rem;
    white-space: nowrap;
}

.show-row.is-sold-out .show-venue { color: var(--text-muted); }

/* --- About --------------------------------------------------------------- */
/* No heading by design: on an artist's own site this is simply the band
   talking, and a label turns a voice into a form field. */

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    gap: var(--spacing-xl);
    align-items: start;
}

.about-layout:not(:has(.about-portrait)) { grid-template-columns: minmax(0, 1fr); }

.about-portrait img {
    width: 100%;
    border-radius: var(--radius-md);
    display: block;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.about-prose {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-body);
    max-width: 60ch;
}

.about-prose p { margin-bottom: var(--spacing-sm); }
.about-prose p:last-child { margin-bottom: 0; }

/* The first line carries the voice, so it gets a little more presence. */
.about-prose > p:first-child {
    font-size: 1.1875rem;
    color: var(--text-primary);
}

.about-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    font-size: 0.9375rem;
}

.about-links a {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
    transition: color .18s ease, border-color .18s ease;
}

.about-links a:hover { color: var(--primary-text); border-bottom-color: currentColor; }

@media (max-width: 780px) {
    .about-layout { grid-template-columns: minmax(0, 1fr); gap: var(--spacing-md); }
    .about-portrait { max-width: 14rem; }
    .show-row { grid-template-columns: 3rem 1fr; }
    .show-actions { grid-column: 2; justify-content: flex-start; }
}

/* ===================================
   MOTION
   ===================================
   Entrance animations were staggered across three elements at up to 1.2s. They
   replay on any repaint, and they delay the one thing a visitor came for. Kept
   short, and switched off entirely for anyone who has asked for less motion. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Gradient-style swatches in the theme editor's Finish group. */
.tf-seg-swatch {
    display: block;
    width: 100%;
    height: 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.375rem;
}
.tf-seg-swatch-none { background: var(--primary); }
.tf-seg-swatch-soft { background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--accent))); }
.tf-seg-swatch-full { background: linear-gradient(135deg, var(--primary), var(--accent)); }

/* Quiet cross-link at the foot of the store — music is sold on album pages,
   which is not obvious from a merch-only grid. */
.store-footnote {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.store-footnote a { color: var(--primary-text); text-decoration: none; }
.store-footnote a:hover { text-decoration: underline; }

/* A track's price is information, not the primary action of the page — it used
   to be a filled brand button that merely navigated to the song. */
.track-buy {
    color: var(--text-body);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1px;
    transition: color .18s ease, border-color .18s ease;
}

.track-buy:hover { color: var(--primary-text); border-bottom-color: currentColor; }

.form-note { display: block; color: var(--text-muted); margin-top: 0.25rem; }

/* ===================================
   BLOG CARD
   ===================================
   One definition shared by the home-page teaser and the blog index. The whole
   card is the hit target: a title-only link left the date and summary reading
   as decoration, and on the blog index the click target was easy to miss
   entirely. */

.post-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.post-content {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: var(--spacing-sm);
    flex: 1;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-subtle);
}

.post-author::before { content: '· '; }

.post-title {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--text-primary);
}

.post-summary {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Pushed to the bottom so the affordance lines up across cards of unequal
   summary length. */
.post-read-more {
    margin-top: auto;
    padding-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--primary-text);
}

.post-card:hover .post-read-more { text-decoration: underline; }
.post-card:hover .post-title { color: var(--primary-text); }

.post-card:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Article standfirst — the summary shown on the index, repeated at the top of
   the piece so a reader arriving from a shared link gets the same framing. */
.article-lead {
    max-width: none;
    margin: var(--spacing-sm) 0 0;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.article-draft-note {
    display: inline-block;
    margin-top: var(--spacing-sm);
    padding: 0.3125rem 0.75rem;
    border-radius: var(--radius-pill);
    background: var(--status-warn-bg);
    color: var(--status-warn);
    border: 1px solid var(--status-warn-border);
    font-size: 0.8125rem;
}

/* Switch-artist page. Global route, so it uses account/_global_base.html and
   the neutral .dl-shell wrapper rather than a tenant's branded chrome. */
.switch-head {
    margin-bottom: var(--spacing-lg);
}

.switch-head h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--spacing-xs);
}

.switch-sub {
    color: var(--text-muted);
    margin: 0;
}
