:root {
  --ink: #17221f;
  --muted: #68736f;
  --paper: #f6f5ef;
  --panel: #fffefa;
  --line: #dedfd8;
  --forest: #143d32;
  --forest-2: #0e2d26;
  --sage: #dfe9df;
  --mint: #82c6a6;
  --gold: #d3a94f;
  --gold-soft: #f4e8c7;
  --danger: #a54141;
  --shadow: 0 14px 45px rgba(26, 48, 41, .09);
  --radius: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--paper); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .45rem; font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.04; letter-spacing: -.045em; }
h2 { margin-bottom: .35rem; font-size: clamp(1.35rem, 2vw, 1.75rem); letter-spacing: -.025em; }
h3 { margin-bottom: .2rem; }
.muted { color: var(--muted); }
.light { color: rgba(255,255,255,.72) !important; }
.lead { max-width: 680px; margin-bottom: 0; color: var(--muted); font-size: 1.05rem; }
.eyebrow { margin-bottom: .5rem; color: #537b6d; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.topbar { position: sticky; z-index: 40; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 70px; padding: 0 clamp(18px, 4vw, 64px); border-bottom: 1px solid rgba(20,61,50,.1); background: rgba(246,245,239,.92); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: .65rem; width: max-content; color: var(--forest); font-weight: 850; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px 10px 10px 3px; color: #fff; background: var(--forest); font-family: Georgia, serif; font-size: 1.15rem; font-style: italic; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.brand-large { margin-bottom: 2.2rem; font-size: 1.18rem; }
.brand-large .brand-mark { width: 42px; height: 42px; }
.main-nav { display: flex; align-items: center; gap: .25rem; }
.main-nav a { padding: .62rem .95rem; border-radius: 9px; color: #52615c; font-size: .92rem; font-weight: 650; text-decoration: none; }
.main-nav a:hover, .main-nav a.active { color: var(--forest); background: #e8ece5; }
.user-menu { position: relative; justify-self: end; }
.user-menu summary { display: flex; align-items: center; gap: .65rem; cursor: pointer; list-style: none; color: #46534f; font-size: .88rem; font-weight: 650; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: #648575; }
.user-popover { position: absolute; right: 0; top: calc(100% + 12px); width: 240px; padding: .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.user-popover a, .link-button { display: block; width: 100%; padding: .7rem .8rem; border: 0; border-radius: 8px; color: var(--ink); background: none; text-align: left; text-decoration: none; cursor: pointer; }
.user-popover a:hover, .link-button:hover { background: var(--paper); }

.app-shell { width: min(1200px, calc(100% - 40px)); margin: 0 auto; padding: 56px 0 100px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 36px; }
.compact-heading { align-items: center; margin-bottom: 28px; }
.dashboard-heading { padding: 24px 0 12px; }
.back-link { display: inline-block; margin-bottom: 1.2rem; color: var(--muted); font-size: .9rem; font-weight: 650; text-decoration: none; }
.back-link:hover { color: var(--forest); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: .66rem 1.05rem; border: 1px solid transparent; border-radius: 10px; font-size: .9rem; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--forest); box-shadow: 0 7px 18px rgba(20,61,50,.18); }
.button-primary:hover { background: #0d3128; }
.button-soft { color: var(--forest); border-color: #ccd8d0; background: #edf2ec; }
.button-ghost { color: #4d5d57; border-color: var(--line); background: transparent; }
.button-danger-soft { color: var(--danger); border-color: #e6c9c9; background: #f9eceb; }
.button-wide { width: 100%; }
.button-group { display: flex; flex-wrap: wrap; gap: .65rem; }

.flash { position: fixed; z-index: 90; right: 24px; top: 84px; max-width: 420px; padding: .9rem 1.1rem; border-radius: 11px; color: #fff; background: var(--forest); box-shadow: var(--shadow); animation: flash-in .25s ease-out; }
.flash-error { background: var(--danger); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }
.form-error { margin: 0 0 1.2rem; padding: .85rem 1rem; border: 1px solid #e3b9b9; border-radius: 10px; color: #832f2f; background: #fff0ef; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 34px 0 58px; }
.stat-card { display: flex; flex-direction: column; min-height: 145px; justify-content: flex-end; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 7px 24px rgba(30,50,42,.04); }
.stat-card.accent { color: #fff; border-color: var(--forest); background: var(--forest); }
.stat-value { font-family: Georgia, serif; font-size: 2.7rem; line-height: 1; }
.stat-label { margin-top: .45rem; color: var(--muted); font-size: .88rem; }
.stat-card.accent .stat-label { color: rgba(255,255,255,.68); }
.section-block { margin-top: 28px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 18px; }
.section-heading .eyebrow { margin-bottom: .25rem; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > a { color: var(--forest); font-size: .9rem; font-weight: 750; text-decoration: none; }
.card-list, .repertoire-list { display: grid; gap: 10px; }
.event-row { display: grid; grid-template-columns: 58px 1fr auto auto; align-items: center; gap: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 56px; border-radius: 11px; color: var(--forest); background: var(--sage); }
.date-tile strong { font-family: Georgia, serif; font-size: 1.45rem; line-height: 1; }
.date-tile span { margin-top: 3px; font-size: .58rem; font-weight: 850; letter-spacing: .13em; }
.event-summary h3, .event-summary p { margin: 0; }
.event-summary h3 a { text-decoration: none; }
.event-summary p { color: var(--muted); font-size: .86rem; }
.status { display: inline-flex; align-items: center; width: max-content; padding: .26rem .55rem; border-radius: 99px; color: #56625e; background: #eceeea; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.status-ready { color: #235b45; background: #dcece2; }
.status-live { color: #7a4b05; background: var(--gold-soft); }
.status-finished { color: #4b5362; background: #e5e8ed; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 15px; }
.search-field { display: flex; align-items: center; width: min(440px, 100%); gap: .65rem; padding: 0 .85rem; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.search-field input { width: 100%; padding: .72rem 0; border: 0; outline: 0; background: transparent; }
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.song-row { display: grid; grid-template-columns: 52px 1fr auto 30px; align-items: center; gap: 16px; min-height: 78px; padding: 12px 20px; border-bottom: 1px solid #e8e8e2; text-decoration: none; }
.song-row:last-child { border-bottom: 0; }
.song-row:hover { background: #f0f3ed; }
.song-key { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--forest); background: var(--sage); font-family: Georgia, serif; font-size: 1.15rem; }
.song-main { display: flex; flex-direction: column; }
.song-main small { color: var(--muted); }
.notation-pill { padding: .3rem .55rem; border-radius: 7px; color: #66716d; background: #efefe9; font-size: .7rem; font-weight: 750; }
.row-arrow { color: #8f9995; font-size: 1.2rem; }

.panel { padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 8px 28px rgba(24,47,39,.035); }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 24px; }
.editor-main { display: grid; gap: 20px; }
.editor-sidebar { position: relative; }
.sticky-card { position: sticky; top: 94px; padding: 24px; border-radius: var(--radius); color: #fff; background: var(--forest); box-shadow: var(--shadow); }
.sticky-card h3 { font-size: 1.25rem; }
.sticky-card .muted { color: rgba(255,255,255,.64); }
.sticky-card .button { margin-top: .6rem; }
.sticky-card .button-ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.panel-heading, .panel-heading > div { display: flex; align-items: center; gap: 12px; }
.panel-heading { justify-content: space-between; margin-bottom: 24px; }
.panel-heading h2, .panel-heading p { margin: 0; }
.panel-heading p { color: var(--muted); font-size: .84rem; }
.step-number { display: grid; flex: 0 0 auto; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: var(--forest); background: var(--sage); font-size: .78rem; font-weight: 850; }
.save-indicator { color: var(--muted); font-size: .75rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.span-2 { grid-column: span 2; }
.category-editor-groups { display: grid; gap: 18px; }
.category-editor-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.category-editor-group legend { margin-bottom: 9px; color: #485550; font-size: .78rem; font-weight: 800; }
.category-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.category-check { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 40px; padding: 8px 10px; border: 1px solid #dfe2dc; border-radius: 9px; background: #fafbf8; cursor: pointer; }
.category-check:has(input:checked) { color: var(--forest); border-color: #9fb9ab; background: var(--sage); }
.category-check input { width: auto; }
.category-check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-check small { display: grid; min-width: 23px; height: 23px; place-items: center; border-radius: 99px; color: var(--muted); background: rgba(255,255,255,.7); font-size: .62rem; }
.new-category-field { padding-top: 2px; }
.new-category-field small { color: var(--muted); font-weight: 500; }
.protected-categories { display: grid; gap: 7px; padding: 13px; border: 1px solid #dddeda; border-radius: 10px; background: #f6f6f2; }
.protected-categories > div { display: flex; flex-wrap: wrap; gap: 6px; }
.protected-categories span { padding: .32rem .55rem; border-radius: 99px; color: #5f6965; background: #e7e9e4; font-size: .68rem; font-weight: 750; }
.protected-categories small { color: var(--muted); font-size: .68rem; }
label { display: grid; gap: .42rem; color: #485550; font-size: .78rem; font-weight: 750; }
input, textarea, select { width: 100%; padding: .72rem .8rem; border: 1px solid #d7d9d3; border-radius: 9px; outline: none; color: var(--ink); background: #fff; }
input:focus, textarea:focus, select:focus { border-color: #76a590; box-shadow: 0 0 0 3px rgba(118,165,144,.14); }
textarea { resize: vertical; }
.chord-input, .live-lyrics { font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace; }
.stack-form { display: grid; gap: 16px; }
.compact-form { gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 24px; }
.narrow-form { width: min(760px, 100%); margin: 0 auto; }
.event-background-field { display: grid; grid-template-columns: minmax(0, 1fr) 240px; align-items: stretch; gap: 16px; padding: 16px; border: 1px solid #d7dcd5; border-radius: 12px; background: #f7f8f4; }
.event-background-field > div:first-child { display: flex; flex-direction: column; gap: 9px; }
.event-background-field strong { font-size: .9rem; }
.event-background-field p { margin: -3px 0 2px; color: var(--muted); font-size: .76rem; }
.event-background-field label { font-size: .74rem; }
.event-background-field input[type="file"] { margin-top: 5px; padding: .55rem; background: #fff; }
.event-background-field img, .background-placeholder { width: 100%; aspect-ratio: 16 / 9; align-self: center; border-radius: 9px; object-fit: cover; background: #111; }
.background-placeholder { display: grid; place-items: center; align-content: center; color: rgba(255,255,255,.72); text-align: center; }
.background-placeholder small { color: rgba(255,255,255,.45); }
.event-background-field .clear-background { display: flex; align-items: center; gap: 7px; color: var(--danger); }
.event-background-field .clear-background input { width: auto; }
.check-row { grid-template-columns: auto 1fr; align-items: center; }
.check-row input { width: auto; }

.sections-editor { display: grid; gap: 14px; }
.section-editor-card { overflow: hidden; border: 1px solid #dfe1db; border-radius: 13px; background: #fbfbf7; }
.section-card-head { display: grid; grid-template-columns: 34px 130px 1fr auto; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid #e1e3dd; background: #f0f2ec; }
.section-card-head input, .section-card-head select { padding: .55rem .65rem; }
.drag-handle, .form-order { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #5e6f68; background: #dfe7df; font-size: .72rem; font-weight: 850; }
.mini-actions { display: flex; gap: 3px; }
.mini-actions button, .icon-button { display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 1px solid #d6d9d2; border-radius: 8px; color: #57635f; background: #fff; cursor: pointer; }
.mini-actions button:hover, .icon-button:hover { color: var(--forest); border-color: #aebeb5; }
.icon-button:disabled { opacity: .35; cursor: default; }
.icon-button.danger, .mini-actions [data-remove], .mini-actions [data-form-remove], .mini-actions [data-event-remove] { color: var(--danger); }
.lyrics-chords-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #e3e4df; }
.lyrics-chords-grid label { padding: 14px; background: var(--panel); }
.lyrics-chords-grid textarea { min-height: 155px; border: 0; border-radius: 0; padding: 4px 0; line-height: 1.65; background: transparent; box-shadow: none; }
.section-card-foot { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; padding: 12px 14px; }
.text-action { padding: .55rem .7rem; border: 0; color: var(--forest); background: transparent; font-size: .78rem; font-weight: 750; cursor: pointer; }
.form-builder { display: grid; gap: 14px; }
.form-palette, .event-form-palette { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px; border: 1px dashed #cbd2cb; border-radius: 11px; background: #f5f6f1; }
.form-palette button, .event-form-palette button { padding: .5rem .7rem; border: 1px solid #cdd7d0; border-radius: 8px; color: var(--forest); background: #fff; font-size: .78rem; font-weight: 750; cursor: pointer; }
.form-sequence, .event-form-list { display: grid; gap: 8px; }
.form-empty { padding: 28px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); text-align: center; }
.form-chip { display: grid; grid-template-columns: 34px minmax(100px, 1fr) 110px minmax(130px, 1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.form-chip label { grid-template-columns: auto 55px; align-items: center; }
.form-chip input { padding: .5rem .6rem; }
.event-form-item { display: grid; grid-template-columns: 34px minmax(120px, 1fr) 110px minmax(140px, 1.2fr) auto; align-items: end; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.event-form-name { align-self: center; }
.event-form-name { display: flex; flex-direction: column; }
.event-form-name small { color: var(--muted); }
.event-part-editor { grid-column: 1 / -1; margin: 2px -2px -2px; border-top: 1px solid var(--line); }
.event-part-editor summary { width: max-content; padding: 12px 4px 4px; color: var(--forest); font-size: .78rem; font-weight: 800; cursor: pointer; }
.event-part-editor-body { display: grid; gap: 10px; padding-top: 10px; }
.event-part-editor-body > label { max-width: 430px; }
.event-part-editor-body .lyrics-chords-grid { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.event-part-editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.event-part-editor-foot small { color: var(--muted); }
.event-part-editor-foot .button { min-height: 34px; padding: .4rem .7rem; }
.source-song-edit { display: grid; gap: 7px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.source-song-edit p { margin: 0 0 3px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.stepper { display: grid; grid-template-columns: 40px 1fr 40px; }
.stepper input { border-radius: 0; text-align: center; }
.stepper button { border: 1px solid #d7d9d3; background: #f3f5f1; cursor: pointer; }
.stepper button:first-child { border-radius: 9px 0 0 9px; }
.stepper button:last-child { border-radius: 0 9px 9px 0; }

.events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.event-card { display: flex; flex-direction: column; min-height: 250px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.event-card-top, .event-actions { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.event-card h2 { margin-top: 1.5rem; }
.event-card h2 a { text-decoration: none; }
.event-meta { color: var(--muted); }
.event-actions { margin-top: auto; justify-content: flex-end; }
.event-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 30px; }
.event-title-line { display: flex; align-items: center; gap: 12px; }
.event-title-line h1 { margin: 0; }
.repertoire-note { margin-bottom: 24px; padding: 17px 20px; border-left: 4px solid var(--gold); border-radius: 0 11px 11px 0; background: var(--gold-soft); }
.repertoire-note p { margin: .35rem 0 0; }
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 24px; }
.count-badge { display: grid; place-items: center; min-width: 32px; height: 32px; border-radius: 50%; color: var(--forest); background: var(--sage); font-weight: 800; }
.repertoire-item { display: grid; grid-template-columns: 28px 42px 1fr auto; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: border-color .16s ease, box-shadow .16s ease, opacity .16s ease, transform .16s ease; }
.repertoire-drag-handle { display: grid; place-items: center; width: 28px; height: 38px; padding: 0; border: 1px solid transparent; border-radius: 8px; color: #76847e; background: transparent; font-size: 1.15rem; line-height: 1; cursor: grab; touch-action: none; user-select: none; }
.repertoire-drag-handle:hover, .repertoire-drag-handle:focus-visible { border-color: #c9d4cc; color: var(--forest); background: #eef3ee; outline: none; }
.repertoire-drag-handle:active { cursor: grabbing; }
.repertoire-item.is-dragging { z-index: 2; border-color: #86a092; opacity: .62; box-shadow: 0 10px 24px rgba(28,59,47,.13); transform: scale(.99); pointer-events: none; }
.repertoire-list.is-reordering { border-radius: 12px; background: #f1f5f0; }
.repertoire-list.is-saving { opacity: .72; pointer-events: none; }
.repertoire-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--forest); background: var(--sage); font-family: Georgia, serif; font-size: 1.1rem; }
.repertoire-copy h3, .repertoire-copy p { margin: 0; }
.repertoire-copy h3 a { text-decoration: none; }
.repertoire-copy p { color: var(--muted); font-size: .82rem; }
.repertoire-controls { display: flex; align-items: center; gap: 5px; }
.repertoire-controls form { margin: 0; }
.event-sidebar { display: grid; gap: 16px; }
.event-sidebar .panel h2 { font-size: 1.25rem; }
.share-card { background: #eef1eb; }
.share-card hr { margin: 20px 0; border: 0; border-top: 1px solid #d7dcd5; }
.planner-shell { width: min(1580px, calc(100% - 40px)); }
.planner-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: 22px; }
.song-browser-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 8px 28px rgba(24,47,39,.035); }
.browser-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.browser-heading h2, .browser-heading p { margin: 0; }
.browser-heading > div > p:last-child { margin-top: .35rem; color: var(--muted); font-size: .86rem; }
.browser-search { display: flex; grid-template-columns: auto 1fr; align-items: center; width: min(430px, 46%); gap: 8px; padding: 0 12px; border: 1px solid #cfd5cf; border-radius: 11px; background: #f9faf7; }
.browser-search > span { color: #6e7d77; font-family: Georgia, serif; font-size: 1.3rem; }
.browser-search input { padding: .72rem 0; border: 0; background: transparent; box-shadow: none; }
.browser-workspace { display: grid; grid-template-columns: 205px minmax(300px, .9fr) minmax(360px, 1.15fr); min-height: 660px; }
.browser-filters { max-height: 76vh; overflow-y: auto; padding: 14px 10px 22px; border-right: 1px solid var(--line); background: #f3f5f0; }
.filter-section + .filter-section { margin-top: 18px; padding-top: 15px; border-top: 1px solid #dde1dc; }
.filter-title { margin: 0 9px 7px; color: #74817c; font-size: .65rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.category-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; width: 100%; gap: 7px; padding: 7px 9px; border: 0; border-radius: 8px; color: #4d5b56; background: transparent; text-align: left; cursor: pointer; }
.category-filter span { overflow: hidden; text-overflow: ellipsis; }
.category-filter strong { color: #839089; font-size: .68rem; }
.category-filter:hover { color: var(--forest); background: #e5ebe4; }
.category-filter.active { color: #fff; background: var(--forest); }
.category-filter.active strong { color: rgba(255,255,255,.7); }
.browser-content { min-width: 0; border-right: 1px solid var(--line); }
.browser-result-head { display: flex; align-items: center; justify-content: space-between; min-height: 45px; gap: 10px; padding: 9px 13px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .7rem; }
.browser-result-head strong { color: var(--ink); font-size: .78rem; }
.browser-results { max-height: 72vh; overflow-y: auto; }
.browser-song-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid #e8e9e4; background: #fff; }
.browser-song-row:hover, .browser-song-row.selected { background: #f0f4ef; }
.browser-song-row.selected { box-shadow: inset 3px 0 var(--forest); }
.browser-song-open { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; width: 100%; gap: 10px; padding: 11px 8px 11px 12px; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.browser-song-key { display: grid; place-items: center; width: 38px; min-height: 38px; padding: 4px; border-radius: 9px; color: var(--forest); background: var(--sage); font-family: Georgia, serif; font-weight: 750; }
.browser-song-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.browser-song-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.browser-song-copy small { overflow: hidden; color: var(--muted); font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.browser-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.browser-tags i, .browser-used { display: inline-flex; padding: 2px 5px; border-radius: 5px; color: #66736e; background: #eceeea; font-size: .56rem; font-style: normal; font-weight: 750; }
.browser-tags i.has-chords { color: #7a540d; background: #f6e8bd; }
.browser-used { color: #fff; background: #598171; }
.quick-add { width: 31px; height: 31px; margin-right: 9px; padding: 0; border: 1px solid #bdccc3; border-radius: 9px; color: var(--forest); background: #edf3ee; font-size: 1.15rem; font-weight: 500; cursor: pointer; }
.quick-add:hover { color: #fff; background: var(--forest); }
.quick-add:disabled { opacity: .5; }
.browser-empty, .preview-placeholder { display: grid; min-height: 320px; place-items: center; align-content: center; padding: 30px; color: var(--muted); text-align: center; }
.browser-empty span, .preview-placeholder > span { color: #81968b; font-family: Georgia, serif; font-size: 2.4rem; }
.browser-empty h3, .preview-placeholder h3 { margin: 10px 0 0; }
.browser-empty p, .preview-placeholder p { margin: 5px 0 0; }
.browser-more { padding: 10px 14px; color: var(--muted); background: #f5f6f2; font-size: .68rem; text-align: center; }
.browser-load-sentinel { display: flex; align-items: center; justify-content: center; min-height: 52px; gap: 7px; color: var(--muted); background: #f9faf7; font-size: .7rem; }
.browser-load-sentinel span { display: inline-block; color: var(--forest); font-size: 1rem; animation: preview-spin 1s linear infinite; }
.song-preview { min-width: 0; max-height: 76vh; overflow-y: auto; background: #fcfcf9; }
.preview-head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.preview-head h2, .preview-head p { margin: 0; }
.preview-head h2 { font-size: 1.35rem; }
.preview-head > div > p:last-child { margin-top: 3px; color: var(--muted); font-size: .76rem; }
.preview-head .button { min-height: 36px; padding: .5rem .75rem; }
.preview-actions { display: flex; gap: 7px; }
.preview-actions .button { font-size: .7rem; }
.preview-meta { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 18px 5px; }
.preview-meta span { padding: 5px 7px; border-radius: 7px; color: var(--muted); background: #eff1ec; font-size: .65rem; }
.preview-meta b { color: var(--ink); }
.preview-badges { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 18px 12px; }
.preview-badges span { padding: 3px 6px; border: 1px solid #d8ddd7; border-radius: 99px; color: #5e6d67; font-size: .6rem; }
.preview-form { display: grid; gap: 10px; padding: 0 12px 20px; }
.preview-part { overflow: hidden; border: 1px solid #dde0da; border-radius: 10px; background: #fff; }
.preview-part > header { display: grid; grid-template-columns: 23px 1fr auto; align-items: center; gap: 7px; padding: 7px 10px; border-bottom: 1px solid #e7e8e3; background: #f1f3ee; }
.preview-part > header b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--forest); background: var(--sage); font-size: .63rem; }
.preview-part > header strong { font-size: .78rem; }
.preview-part > header small { color: var(--muted); font-size: .58rem; }
.preview-lines { display: grid; gap: 6px; padding: 10px 12px; }
.preview-line { min-height: 1.8em; }
.preview-line span { display: block; min-height: 1em; color: #a87117; font-family: "Cascadia Mono", Consolas, monospace; font-size: .67rem; font-weight: 850; white-space: pre-wrap; }
.preview-line p { margin: 0; font-size: .76rem; line-height: 1.4; white-space: pre-wrap; }
.preview-comment { margin: 0; padding: 7px 12px; border-top: 1px solid #ecece7; color: var(--muted); background: #fafaf7; font-size: .65rem; }
.preview-spinner { animation: preview-spin 1s linear infinite; }
@keyframes preview-spin { to { transform: rotate(360deg); } }
.planner-sidebar { display: grid; gap: 16px; }
.repertoire-panel { padding: 20px; }
.repertoire-panel .section-heading { margin-bottom: 14px; }
.repertoire-order-hint { margin: 4px 0 0; color: var(--muted); font-size: .7rem; font-weight: 500; }
.repertoire-panel .repertoire-item { grid-template-columns: 22px 34px minmax(0, 1fr); gap: 8px; padding: 10px; }
.repertoire-panel .repertoire-drag-handle { width: 22px; height: 32px; }
.repertoire-panel .repertoire-number { width: 32px; height: 32px; }
.repertoire-panel .repertoire-controls { grid-column: 3; flex-wrap: wrap; }
.repertoire-panel .repertoire-controls .button { min-height: 31px; padding: .35rem .55rem; font-size: .72rem; }
.repertoire-panel .empty-state.compact { min-height: auto; padding: 24px 12px; }
.empty-state { display: grid; place-items: center; max-width: 700px; margin: 70px auto; padding: 50px 30px; border: 1px dashed #cbd0ca; border-radius: var(--radius); text-align: center; }
.empty-state.compact { margin: 0; padding: 35px 20px; }
.empty-state p { color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 15px; border-radius: 50%; color: var(--forest); background: var(--sage); font-family: Georgia, serif; font-size: 1.5rem; }

.auth-body { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(circle at 15% 20%, #31594c 0, transparent 30%), radial-gradient(circle at 88% 85%, #243c34 0, transparent 35%), var(--forest-2); }
.auth-shell { width: min(500px, 100%); }
.auth-card { padding: clamp(28px, 6vw, 48px); border-radius: 22px; background: var(--panel); box-shadow: 0 28px 80px rgba(0,0,0,.23); }
.auth-card h1 { font-size: clamp(2rem, 7vw, 3rem); }
.auth-card .stack-form { margin-top: 1.8rem; }
.notation-preview { display: flex; justify-content: space-between; gap: 1rem; margin-top: 20px; padding: 18px; border-radius: 10px; color: var(--forest); background: var(--sage); }

.live-page { width: 100%; min-height: 100vh; margin: 0; padding: 0; background: #e9ebe5; }
.live-app { min-height: 100vh; }
.live-header { position: sticky; z-index: 45; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 98px; padding: 14px 28px; color: #fff; background: var(--forest-2); box-shadow: 0 8px 30px rgba(0,0,0,.14); }
.live-header .back-link { margin: 0 0 3px; font-size: .73rem; }
.live-header .eyebrow { margin-bottom: .15rem; color: #8fc4ae; }
.live-header h1 { margin: 0; font-size: 1.65rem; letter-spacing: -.02em; }
.live-header-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px 14px; }
.live-output-switch { display: grid; grid-template-columns: repeat(3, auto); overflow: hidden; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; background: rgba(0,0,0,.18); }
.live-output-switch button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; gap: 6px; padding: .48rem .72rem; border: 0; border-right: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.72); background: transparent; font-size: .72rem; font-weight: 800; cursor: pointer; }
.live-output-switch button:last-child { border-right: 0; }
.live-output-switch button:hover { color: #fff; background: rgba(255,255,255,.08); }
.live-output-switch button.active { color: #13251f; background: #fff; box-shadow: inset 0 -3px #70aa8f; }
.live-output-switch button[data-output-mode="blackout"].active { color: #fff; background: #050505; box-shadow: inset 0 -3px #efefef; }
.live-output-switch button:disabled { opacity: .5; cursor: wait; }
.live-output-switch kbd { display: grid; min-width: 20px; height: 20px; place-items: center; border: 1px solid currentColor; border-radius: 5px; font: inherit; font-size: .62rem; }
.live-font-control { display: grid; grid-template-columns: 38px 52px 38px; min-height: 40px; overflow: hidden; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; background: rgba(0,0,0,.18); }
.live-font-control button, .live-font-control output { display: grid; place-items: center; border: 0; color: rgba(255,255,255,.8); background: transparent; font-size: .72rem; font-weight: 850; }
.live-font-control button { cursor: pointer; }
.live-font-control button:hover { color: #fff; background: rgba(255,255,255,.08); }
.live-font-control button:disabled { opacity: .35; cursor: not-allowed; }
.live-font-control output { border-right: 1px solid rgba(255,255,255,.14); border-left: 1px solid rgba(255,255,255,.14); color: #fff; }
.follow-toggle { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: .4rem; color: rgba(255,255,255,.8); }
.follow-toggle input { width: auto; }
.live-notation { display: flex; grid-template-columns: auto auto; align-items: center; gap: .45rem; color: rgba(255,255,255,.68); }
.live-notation select { width: auto; padding: .45rem; color: #fff; border-color: rgba(255,255,255,.22); background: #183b32; }
.connection { display: inline-flex; align-items: center; gap: .45rem; font-size: .72rem; font-weight: 750; }
.connection i { width: 8px; height: 8px; border-radius: 50%; background: #65d296; box-shadow: 0 0 0 4px rgba(101,210,150,.12); }
.connection.offline i { background: #e46c6c; }
.live-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: calc(100vh - 98px); }
.live-setlist { position: sticky; top: 98px; align-self: start; height: calc(100vh - 98px); overflow-y: auto; padding: 24px 16px; color: #fff; background: #17362e; }
.live-setlist > .eyebrow { padding: 0 10px; color: #8db4a4; }
.live-song-link { position: relative; display: grid; grid-template-columns: 27px 1fr auto; align-items: center; width: 100%; gap: 8px; padding: 10px; border: 0; border-radius: 9px; color: rgba(255,255,255,.68); background: transparent; text-align: left; cursor: pointer; }
.live-song-link:hover, .live-song-link.active { color: #fff; background: rgba(255,255,255,.1); }
.live-song-link > span:first-child { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: rgba(255,255,255,.08); font-size: .7rem; }
.live-song-link strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-song-link small { font-size: .62rem; }
.playing-dot { position: absolute; right: 7px; top: 7px; width: 6px !important; height: 6px !important; border-radius: 50% !important; background: var(--gold) !important; }
.live-event-note { margin-top: 28px; padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.12); }
.live-event-note label { color: rgba(255,255,255,.65); }
.live-event-note textarea { color: #fff; border-color: rgba(255,255,255,.15); background: rgba(0,0,0,.12); }
.live-stage { padding: 28px clamp(18px, 4vw, 50px) 80px; overflow: hidden; }
.live-song-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.live-song-head h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
.live-song-head p { margin: 0; color: var(--muted); }
.live-song-controls { display: flex; align-items: end; gap: 12px; }
.live-song-controls label { min-width: 135px; }
.live-song-controls input { max-width: 90px; }
.live-stepper { display: grid; grid-template-columns: 36px 50px 36px; overflow: hidden; border: 1px solid #cad0c9; border-radius: 9px; background: #fff; }
.live-stepper button { border: 0; background: #eef1eb; cursor: pointer; }
.live-stepper strong { display: grid; place-items: center; min-height: 37px; }
.live-song-note { margin-bottom: 18px; }
.live-song-more { margin: -8px 0 18px; }
.live-song-more summary { width: max-content; color: var(--muted); font-size: .72rem; font-weight: 750; cursor: pointer; }
.live-song-more > div { display: flex; align-items: center; gap: 12px; width: min(620px, 100%); margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #f6f7f3; }
.live-song-more p { flex: 1; margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.live-song-more .button { flex: 0 0 auto; min-height: 32px; padding: .35rem .6rem; font-size: .68rem; }
.live-form { display: grid; gap: 14px; }
.live-form-card { position: relative; overflow: hidden; border: 2px solid transparent; border-radius: 15px; background: var(--panel); box-shadow: 0 5px 20px rgba(27,47,40,.06); cursor: pointer; transition: border-color .18s, transform .18s, opacity .18s; }
.live-form-card:hover { border-color: #b7c9bf; }
.live-form-card.is-next { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(211,169,79,.14); }
.live-form-card.is-now { border-color: #3e9472; box-shadow: 0 0 0 3px rgba(62,148,114,.14); }
.live-form-card.is-sending { opacity: .62; }
.live-form-card > header { display: grid; grid-template-columns: 32px 1fr auto auto auto; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid #e6e7e1; background: #f3f4ef; }
.live-form-card h3 { margin: 0; }
.live-edit-part { padding: .42rem .62rem; border: 1px solid #cbd2cb; border-radius: 7px; color: var(--forest); background: #fff; font-size: .7rem; font-weight: 800; cursor: pointer; }
.live-edit-part:hover { border-color: #96aa9e; background: var(--sage); }
.state-badge { padding: .25rem .55rem; border-radius: 99px; font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.state-badge.now { color: #fff; background: #328261; }
.state-badge.next { color: #6e4a08; background: #f1d899; }
.part-transpose { display: grid; grid-template-columns: 28px 34px 28px; overflow: hidden; border: 1px solid #d3d6d0; border-radius: 7px; background: #fff; }
.part-transpose button { border: 0; background: #e9ece6; cursor: pointer; }
.part-transpose span { display: grid; place-items: center; font-size: .72rem; font-weight: 800; }
.live-lyrics { display: grid; gap: 10px; padding: clamp(17px, 3vw, 28px); font-size: clamp(.95rem, 1.7vw, 1.18rem); }
.song-line { min-height: 2.7em; }
.chord-line { min-height: 1.25em; color: #aa7620; font-weight: 850; white-space: pre-wrap; }
.lyric-line { color: #1c2623; white-space: pre-wrap; }
.live-part-editor { display: grid; gap: 12px; padding: 16px; border-top: 1px solid #dfe3dc; background: #f7f8f4; cursor: default; }
.live-part-editor[hidden] { display: none; }
.live-part-editor > label { max-width: 430px; }
.live-part-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.live-part-fields textarea { min-height: 160px; font-family: inherit; line-height: 1.5; }
.live-part-fields label:last-child textarea { color: #8e641d; font-family: "Cascadia Mono", Consolas, monospace; font-weight: 750; }
.live-source-option { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 9px; padding: 11px 12px; border: 1px solid #dfc88f; border-radius: 9px; background: #fff8e8; cursor: pointer; }
.live-source-option input { width: auto; margin-top: 3px; }
.live-source-option span { display: flex; flex-direction: column; gap: 2px; }
.live-source-option strong { color: #634813; font-size: .78rem; }
.live-source-option small { color: #816b3f; font-size: .68rem; line-height: 1.35; }
.live-part-editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.live-part-editor-actions small { margin-right: auto; color: var(--muted); }
.live-part-editor-actions .button { min-height: 36px; padding: .45rem .72rem; }
.part-comment { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 9px 16px; border-top: 1px solid #e8e8e3; background: #fafaf6; }
.part-comment input { padding: .45rem .6rem; border: 0; background: transparent; }
.live-empty { display: grid; min-height: 50vh; place-items: center; align-content: center; color: var(--muted); text-align: center; }
.live-empty span { font-family: Georgia, serif; font-size: 3rem; color: #789486; }

.audience-body, .audience-page { width: 100%; min-height: 100%; margin: 0; padding: 0; overflow: hidden; background: #000; }
.audience-page { height: 100vh; }
.audience-app { position: relative; display: grid; width: 100%; height: 100vh; overflow: hidden; color: #fff; background-color: #111; background-image: var(--audience-background, none); background-position: center; background-size: cover; }
.audience-app::before { position: absolute; z-index: 0; inset: 0; content: ""; background: linear-gradient(180deg, rgba(0,0,0,.34), rgba(0,0,0,.48)); opacity: 0; transition: opacity .2s ease; }
.audience-app.mode-text::before { opacity: 1; }
.audience-app.mode-blackout { background-color: #000; background-image: none !important; }
.audience-stage { position: relative; z-index: 1; display: grid; width: 100%; height: 100%; place-items: center; padding: clamp(32px, 6vh, 80px) clamp(45px, 7vw, 140px); }
.projection-text { width: min(1600px, 100%); font-size: clamp(3rem, 6.2vw, 7.4rem); font-weight: 700; line-height: 1.22; letter-spacing: -.025em; text-align: left; text-wrap: pretty; text-shadow: 0 3px 18px rgba(0,0,0,.9), 0 1px 3px rgba(0,0,0,.9); }
.projection-text.medium { font-size: clamp(2.6rem, 5.2vw, 6.2rem); }
.projection-text.compact { font-size: clamp(2.1rem, 4.2vw, 5rem); line-height: 1.16; }
.projection-line { margin: .08em 0; white-space: pre-wrap; }

.overlay-page { width: 100%; min-height: 100vh; margin: 0; padding: 0; color: #fff; background: transparent; }
.overlay-body { background: transparent; }
.overlay-app { display: grid; grid-template-rows: 1fr auto; min-height: 100vh; padding: 5vh 5vw; background: transparent; }
.overlay-stage { display: grid; align-items: end; }
.overlay-stage .audience-content { width: min(1200px, 92vw); padding: 28px 38px; border-left: 6px solid var(--gold); border-radius: 0 18px 18px 0; background: rgba(7, 18, 15, .82); box-shadow: 0 15px 55px rgba(0,0,0,.25); text-align: left; }
.overlay-stage .audience-content .eyebrow { margin-bottom: 6px; }
.overlay-stage .audience-content h1 { margin-bottom: 12px; text-align: left; }
.overlay-stage .audience-lyrics { margin-top: 0; font-size: clamp(2rem, 4.3vw, 4.4rem); }
.overlay-stage .audience-lyrics p { margin: 0; }
.overlay-meta { display: none; }

@media (max-width: 900px) {
  .topbar { grid-template-columns: auto 1fr auto; }
  .main-nav { justify-self: center; }
  .user-menu summary { font-size: 0; }
  .user-menu summary .avatar { font-size: .88rem; }
  .editor-layout, .event-layout { grid-template-columns: 1fr; }
  .editor-sidebar { order: -1; }
  .sticky-card { position: static; }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .live-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .live-header-tools { flex-wrap: wrap; justify-content: flex-end; }
  .form-chip { grid-template-columns: 30px 1fr 100px auto; }
  .form-comment-input { grid-column: 2 / 5; }
  .event-form-item { grid-template-columns: 30px 1fr 100px auto; }
  .event-form-comment { grid-column: 2 / 5; }
  .browser-workspace { grid-template-columns: 190px minmax(0, 1fr); }
  .song-preview { grid-column: 1 / 3; max-height: none; border-top: 1px solid var(--line); }
  .browser-content { border-right: 0; }
}

@media (max-width: 1250px) {
  .planner-layout { grid-template-columns: 1fr; }
  .planner-sidebar { grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); }
}

@media (max-width: 680px) {
  .topbar { position: static; grid-template-columns: 1fr auto; min-height: 62px; padding: 0 16px; }
  .main-nav { position: fixed; z-index: 60; right: 12px; bottom: 12px; left: 12px; display: grid; grid-template-columns: repeat(3, 1fr); padding: 5px; border: 1px solid #d7dad4; border-radius: 14px; background: rgba(255,255,255,.95); box-shadow: 0 10px 40px rgba(0,0,0,.16); backdrop-filter: blur(14px); }
  .main-nav a { text-align: center; }
  .app-shell { width: min(100% - 24px, 1200px); padding: 34px 0 100px; }
  .page-heading, .event-hero { align-items: stretch; flex-direction: column; }
  .page-heading .button, .event-hero .button-group .button { flex: 1; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card:last-child { grid-column: span 2; }
  .event-row { grid-template-columns: 50px 1fr auto; }
  .event-row > .button { grid-column: 2 / 4; }
  .event-row .status { align-self: start; }
  .song-row { grid-template-columns: 45px 1fr 24px; padding: 11px; }
  .notation-pill { display: none; }
  .events-grid { grid-template-columns: 1fr; }
  .form-grid, .lyrics-chords-grid { grid-template-columns: 1fr; }
  .category-checks { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .section-card-head { grid-template-columns: 30px 1fr auto; }
  .section-card-head select { grid-column: 2; }
  .section-card-head input { grid-column: 2 / 4; grid-row: 2; }
  .section-card-foot { grid-template-columns: 1fr; }
  .form-chip, .event-form-item { grid-template-columns: 30px 1fr auto; align-items: center; }
  .form-chip label, .event-form-item > label:first-of-type { grid-column: 2 / 3; }
  .form-comment-input, .event-form-comment { grid-column: 2 / 4; }
  .repertoire-item { grid-template-columns: 24px 38px 1fr; }
  .repertoire-controls { grid-column: 3; flex-wrap: wrap; }
  .planner-shell { width: min(100% - 18px, 1580px); }
  .browser-heading { align-items: stretch; flex-direction: column; padding: 17px; }
  .browser-search { width: 100%; }
  .browser-workspace { display: block; }
  .browser-filters { display: flex; max-height: none; gap: 8px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .filter-section { display: flex; flex: 0 0 auto; gap: 5px; }
  .filter-section + .filter-section { margin: 0; padding: 0 0 0 8px; border-top: 0; border-left: 1px solid #d9ddd8; }
  .filter-title { display: none; }
  .category-filter { display: flex; width: auto; white-space: nowrap; }
  .browser-results { max-height: 58vh; }
  .song-preview { border-top: 1px solid var(--line); }
  .planner-sidebar { display: grid; grid-template-columns: 1fr; }
  .live-header { position: sticky; top: 0; align-items: flex-start; flex-wrap: wrap; padding: 12px 16px; }
  .live-header .eyebrow { display: none; }
  .live-header-tools { width: 100%; justify-content: space-between; gap: 7px; }
  .live-output-switch { order: -1; width: 100%; }
  .live-output-switch button { min-width: 0; padding: .45rem .35rem; }
  .live-font-control { margin-left: auto; }
  .follow-toggle { display: none; }
  .connection { width: 100%; justify-content: flex-end; }
  .live-layout { display: block; }
  .live-setlist { position: static; width: 100%; height: auto; padding: 10px; overflow-x: auto; }
  .live-setlist > .eyebrow, .live-event-note { display: none; }
  .live-setlist > div:first-of-type { display: flex; gap: 6px; width: max-content; }
  .live-song-link { grid-template-columns: 22px minmax(120px, auto); width: auto; }
  .live-song-link small { display: none; }
  .live-stage { padding: 18px 10px 50px; }
  .live-song-head { align-items: stretch; flex-direction: column; }
  .live-song-controls { justify-content: space-between; }
  .live-song-more > div { align-items: stretch; flex-direction: column; }
  .live-form-card > header { grid-template-columns: 30px 1fr auto; }
  .live-form-card > header .state-badge { grid-column: 2; width: max-content; }
  .live-edit-part { grid-column: 2; width: max-content; }
  .part-transpose { grid-column: 3; grid-row: 1 / 4; }
  .live-part-fields { grid-template-columns: 1fr; }
  .live-part-editor-actions { align-items: stretch; flex-wrap: wrap; }
  .event-background-field { grid-template-columns: 1fr; }
  .live-part-editor-actions small { width: 100%; }
  .part-comment { grid-template-columns: 1fr; }
  .audience-header { grid-template-columns: 1fr auto; padding: 12px 15px; }
  .audience-header > div { display: none; }
  .audience-stage { width: min(100% - 24px, 1100px); padding: 26px 0; }
  .audience-footer { padding: 13px 15px; }
}

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