:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --sidebar: #0e1115;
  --surface: #13171c;
  --surface-subtle: #191e24;
  --surface-raised: #20262d;
  --surface-warm: #261f1a;
  --text: #f4f4f1;
  --text-secondary: #b5bbc4;
  --text-tertiary: #7f8792;
  --border: #262c33;
  --border-strong: #3a424c;
  --accent: #aebcff;
  --accent-strong: #d8deff;
  --accent-soft: #202641;
  --on-accent: #0c1020;
  --score-ink: #20242a;
  --score-accent: #304b65;
  --warm: #f0ae79;
  --warm-soft: #30231b;
  --on-warm: #1d130c;
  --success: #75ad82;
  --danger: #dc8179;
  --danger-soft: #342022;
  --focus: rgba(174, 188, 255, 0.34);
  --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.30);
  --shadow-overlay: 0 28px 80px rgba(0, 0, 0, 0.58);
  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 13px;
  --sidebar-width: 244px;
  --content-width: 1320px;
  font-family: "Manrope", "Noto Sans SC", ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; scrollbar-color: var(--border-strong) transparent; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; letter-spacing: -.006em; }
body.overlay-open { overflow: hidden; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [role="button"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .52; }
button[aria-busy="true"] { position: relative; display: flex; align-items: center; justify-content: center; }
button[aria-busy="true"]::before { content: ""; width: 13px; height: 13px; margin-right: 7px; display: inline-block; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: control-spin 700ms linear infinite; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20;
  width: var(--sidebar-width); padding: 24px 18px 20px;
  display: flex; flex-direction: column;
  background: var(--sidebar); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { width: 178px; height: 86px; display: block; object-fit: contain; object-position: left center; }
.brand-logo-inverse { filter: invert(1) brightness(1.12); }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 11px; color: var(--on-accent); background: var(--accent);
}
.brand-mark svg { width: 26px; fill: none; stroke: currentColor; stroke-width: 4.3; stroke-linecap: round; stroke-linejoin: round; }
.brand-copy { min-width: 0; }
.brand strong { display: flex; align-items: baseline; gap: 6px; font-size: 15px; font-weight: 800; line-height: 1.2; letter-spacing: -.025em; }
.brand strong b { color: var(--accent-strong); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.brand small { display: block; margin-top: 4px; color: var(--text-tertiary); font-size: 8px; font-weight: 800; letter-spacing: .19em; }

.nav-list { margin-top: 36px; display: grid; gap: 4px; }
.nav-item {
  width: 100%; min-height: 44px; display: flex; align-items: center; gap: 11px;
  padding: 0 12px; border: 0; border-radius: var(--radius-md);
  color: var(--text-secondary); background: transparent; cursor: pointer;
  text-align: left; font-weight: 600; transition: color 160ms ease, background 160ms ease;
}
.nav-item svg, .setlist-shortcut svg, .mobile-setlist-button svg, .mobile-bottom-nav svg, .filter-button svg, .view-button svg {
  width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.045); }
.nav-item.active { color: var(--accent-strong); background: var(--accent-soft); }
.studio-nav { margin-bottom: 7px; color: var(--accent-strong); border: 1px solid rgba(174,188,255,.16); background: rgba(174,188,255,.055); }
.studio-nav:hover { color: #fff; border-color: rgba(174,188,255,.34); background: var(--accent-soft); }
.studio-nav b { color: var(--on-accent); background: var(--accent); font-size: 7px; letter-spacing: .08em; }
.nav-item b {
  margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 999px;
  color: var(--text-secondary); background: rgba(255,255,255,.055); font-size: 10px; text-align: center;
}
.nav-item.active b { color: var(--accent-strong); background: rgba(148,171,192,.11); }
.setlist-shortcut {
  width: 100%; min-height: 42px; margin-top: 10px; padding: 0 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text-secondary); background: rgba(255,255,255,.018); cursor: pointer; font-size: 11px; font-weight: 650;
}
.setlist-shortcut:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.setlist-shortcut > span { display: flex; align-items: center; gap: 9px; }
.setlist-shortcut b { min-width: 20px; padding: 2px 6px; border-radius: 999px; color: var(--on-accent); background: var(--accent); font-size: 9px; }
.side-divider { height: 1px; margin: 22px 4px; background: var(--border); }
.side-label { margin: 0 0 10px 8px; color: var(--text-tertiary); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.quick-keys { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
.key-chip {
  min-width: 34px; min-height: 34px; padding: 0 8px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text-secondary); background: transparent; cursor: pointer; font-size: 11px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.key-chip:hover { border-color: var(--accent); color: var(--accent); }
.key-chip.active { border-color: var(--accent); color: var(--on-accent); background: var(--accent); }
.side-note { margin-top: auto; padding: 16px 8px 12px; display: flex; align-items: flex-start; gap: 9px; border-top: 1px solid var(--border); }
.side-note > div { min-width: 0; flex: 1; }
.status-dot { width: 8px; height: 8px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(117,173,130,.12); }
.side-note strong, .workspace-status strong { display: block; font-size: 12px; }
.side-note small, .workspace-status small { display: block; margin-top: 3px; color: var(--text-tertiary); font-size: 10px; line-height: 1.45; }
.sync-refresh { min-width: 42px; height: 34px; margin-top: -7px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-tertiary); background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; }
.sync-refresh:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.notion-link { display: flex; justify-content: space-between; padding: 10px 8px; color: var(--text-secondary); font-size: 11px; }
.notion-link:hover { color: var(--accent); }

.main { margin-left: var(--sidebar-width); min-height: 100vh; padding-bottom: 80px; }
.mobile-header, .mobile-bottom-nav { display: none; }
.workspace-header {
  position: relative; max-width: var(--content-width); min-height: 166px; margin: 0 auto; padding: 38px 36px 29px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; border-bottom: 1px solid var(--border);
}
.eyebrow, .section-kicker { margin: 0 0 9px; color: var(--warm); font-size: 9px; font-weight: 800; letter-spacing: .17em; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--text-tertiary); }
.eyebrow span:first-child { color: var(--accent-strong); }
.eyebrow i { width: 22px; height: 1px; background: var(--border-strong); }
.workspace-header h1 { margin: 0; font-size: clamp(34px, 3.4vw, 48px); font-weight: 750; line-height: 1.12; letter-spacing: -.05em; }
.workspace-intro { max-width: 720px; margin: 12px 0 0; color: var(--text-secondary); font-size: 13px; line-height: 1.65; }
.workspace-status { min-width: 170px; display: flex; align-items: flex-start; gap: 10px; padding-bottom: 3px; }
.workspace-header-actions { min-width: 245px; display: grid; gap: 14px; }
.studio-entry { min-height: 62px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 11px; padding: 10px 13px; border: 1px solid rgba(174,188,255,.26); border-radius: var(--radius-md); color: var(--accent-strong); background: linear-gradient(135deg, rgba(174,188,255,.13), rgba(174,188,255,.045)); transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.studio-entry:hover { transform: translateY(-1px); border-color: var(--accent); background: var(--accent-soft); }
.studio-entry-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; color: var(--on-accent); background: var(--accent); font-size: 21px; font-weight: 500; }
.studio-entry strong, .studio-entry small { display: block; }
.studio-entry strong { font-size: 12px; }
.studio-entry small { margin-top: 3px; color: var(--text-tertiary); font-size: 9px; }
.studio-entry > b { font-size: 18px; font-weight: 400; }

.search-panel {
  position: sticky; top: 0; z-index: 16;
  max-width: var(--content-width); margin: 0 auto; padding: 12px 36px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border); background: rgba(11,13,16,.94); backdrop-filter: blur(14px);
}
.search-box {
  height: 48px; min-width: 0; flex: 1; display: flex; align-items: center; gap: 11px;
  padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface); transition: border-color 160ms ease, box-shadow 160ms ease;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.search-box svg { width: 19px; fill: none; stroke: var(--text-tertiary); stroke-width: 1.8; stroke-linecap: round; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; }
.search-box input::placeholder { color: var(--text-tertiary); }
kbd { padding: 3px 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--text-tertiary); background: var(--surface-subtle); font: 10px ui-sans-serif, system-ui; }
.filter-button {
  height: 48px; min-width: 104px; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  color: var(--text-secondary); background: var(--surface); cursor: pointer; font-weight: 650;
}
.filter-button:hover, .filter-button[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.filter-button b { display: none; min-width: 18px; padding: 2px 5px; border-radius: 999px; color: var(--on-accent); background: var(--accent); font-size: 9px; }
.filter-button b.visible { display: inline-block; }
.view-switch { height: 48px; display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); }
.view-button { width: 39px; height: 39px; display: grid; place-items: center; border: 0; border-radius: 7px; color: var(--text-tertiary); background: transparent; cursor: pointer; }
.view-button:hover { color: var(--text); background: var(--surface-subtle); }
.view-button.active { color: var(--accent-strong); background: var(--accent-soft); }

.filter-drawer {
  max-width: calc(var(--content-width) - 72px); max-height: 0; margin: 0 auto; padding: 0;
  display: flex; align-items: flex-end; gap: 12px; overflow: hidden; visibility: hidden; opacity: 0;
  border-bottom: 1px solid transparent; pointer-events: none; transform: translateY(-5px);
  transition: max-height 220ms ease, margin 220ms ease, padding 220ms ease, opacity 160ms ease, transform 180ms ease, border-color 180ms ease;
}
.filter-drawer.open { max-height: 96px; margin-bottom: 10px; padding: 16px 0; visibility: visible; opacity: 1; border-color: var(--border); pointer-events: auto; transform: translateY(0); }
.filter-group { flex: 1; display: grid; gap: 6px; }
.filter-group span { color: var(--text-secondary); font-size: 10px; font-weight: 700; }
.filter-group select { width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); background: var(--surface); }
.text-button { min-height: 42px; border: 0; padding: 0 8px; color: var(--accent); background: transparent; cursor: pointer; font-weight: 650; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }

.library-section { max-width: var(--content-width); margin: 0 auto; padding: 25px 36px 0; }
.worship-calendar-section { max-width: var(--content-width); margin: 0 auto; padding: 12px 36px 0; }
.calendar-toolbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); }
.calendar-toolbar p { margin: 0 0 4px; color: var(--warm); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.calendar-toolbar h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.calendar-controls { display: flex; gap: 5px; }
.calendar-controls button { min-width: 40px; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--surface); cursor: pointer; font-size: 11px; font-weight: 700; }
.calendar-controls button:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.calendar-stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: stretch; border-bottom: 1px solid var(--border); }
.calendar-stat-strip > div { padding: 14px 14px 14px 0; }
.calendar-stat-strip > div + div { padding-left: 14px; border-left: 1px solid var(--border); }
.calendar-stat-strip span, .calendar-detail-meta span { display: block; color: var(--text-tertiary); font-size: 9px; }
.calendar-stat-strip strong { display: block; margin-top: 3px; color: var(--accent-strong); font-size: 16px; font-variant-numeric: tabular-nums; }
.calendar-stat-strip > a { align-self: center; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--accent); font-size: 10px; font-weight: 700; }
.calendar-stat-strip > a:hover { border-color: var(--accent); background: var(--accent-soft); }
.calendar-workspace { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 14px; align-items: start; padding-top: 18px; }
.calendar-board, .calendar-detail { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.calendar-board { overflow: hidden; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--border); background: var(--surface-subtle); }
.calendar-weekdays span { padding: 10px 8px; color: var(--text-tertiary); text-align: center; font-size: 9px; font-weight: 700; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-day { min-width: 0; min-height: 106px; padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:nth-last-child(-n + 7) { border-bottom: 0; }
.calendar-day.outside { background: rgba(255,255,255,.012); }
.calendar-day.outside > * { opacity: .38; }
.calendar-day-number { width: 23px; height: 23px; display: grid; place-items: center; margin-bottom: 5px; color: var(--text-secondary); border-radius: 50%; font-size: 9px; font-variant-numeric: tabular-nums; }
.calendar-day.today .calendar-day-number { color: var(--on-accent); background: var(--accent); font-weight: 800; }
.calendar-service-chip { width: 100%; min-height: 34px; display: grid; gap: 2px; margin-top: 4px; padding: 6px 7px; overflow: hidden; border: 1px solid var(--border); border-left: 2px solid var(--warm); border-radius: 5px; text-align: left; color: var(--text-secondary); background: var(--surface-subtle); cursor: pointer; }
.calendar-service-chip span, .calendar-service-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-service-chip span { color: var(--text-tertiary); font-size: 7px; letter-spacing: .05em; }
.calendar-service-chip strong { font-size: 9px; }
.calendar-service-chip:hover, .calendar-service-chip.active { color: var(--accent-strong); border-color: var(--accent); background: var(--accent-soft); }
.calendar-service-chip.active { border-left-color: var(--accent); }
.calendar-empty-state { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 18px; border-top: 1px solid var(--border); background: var(--surface-subtle); }
.calendar-empty-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--warm); font: 750 12px "Manrope", "Noto Sans SC", sans-serif; }
.calendar-empty-state h3 { margin: 0; font-size: 13px; }
.calendar-empty-state p { margin: 4px 0 0; color: var(--text-secondary); font-size: 10px; line-height: 1.55; }
.calendar-empty-state a { padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--accent); font-size: 10px; font-weight: 700; white-space: nowrap; }
.calendar-detail { position: sticky; top: 18px; overflow: hidden; }
.calendar-detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border); background: var(--surface-subtle); }
.calendar-detail-header p { margin: 0 0 4px; color: var(--warm); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.calendar-detail-header h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.calendar-detail-header > span { flex: 0 0 auto; padding: 5px 7px; border-radius: 999px; color: var(--accent-strong); background: var(--accent-soft); font-size: 8px; font-weight: 700; }
.calendar-detail-meta { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.calendar-detail-meta > div { min-width: 0; padding: 12px 14px; }
.calendar-detail-meta > div + div { border-left: 1px solid var(--border); }
.calendar-detail-meta strong { display: block; overflow: hidden; margin-top: 4px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-detail-section { padding: 14px; border-bottom: 1px solid var(--border); }
.calendar-section-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; color: var(--text-secondary); font-size: 9px; font-weight: 700; }
.calendar-section-label b { color: var(--text-tertiary); font-size: 8px; }
.calendar-team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.calendar-role { min-width: 0; padding: 8px; background: var(--surface); }
.calendar-role span, .calendar-role strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-role span { color: var(--text-tertiary); font-size: 8px; }
.calendar-role strong { margin-top: 3px; font-size: 9px; }
.calendar-role.is-empty strong { color: var(--text-tertiary); font-weight: 500; }
.calendar-notes { margin: 12px 14px; }
.calendar-notion-link { min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; color: var(--accent); font-size: 10px; font-weight: 700; }
.calendar-notion-link:hover { background: var(--accent-soft); }
.calendar-detail-empty { min-height: 230px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 28px; color: var(--text-secondary); }
.calendar-detail-empty p { margin: 0 0 4px; color: var(--text-tertiary); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.calendar-detail-empty h3 { margin: 0 0 5px; color: var(--text); font-size: 15px; }
.calendar-detail-empty span:last-child { font-size: 10px; line-height: 1.55; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.section-kicker { margin-bottom: 4px; }
.section-heading h2 { margin: 0; font-size: 25px; font-weight: 750; line-height: 1.25; letter-spacing: -.035em; }
.section-actions > span { color: var(--text-tertiary); font-size: 12px; font-variant-numeric: tabular-nums; }

.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.score-card {
  position: relative; min-width: 0; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.score-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-float); }
.score-cover { height: 194px; position: relative; overflow: hidden; cursor: pointer; background: var(--surface-subtle); }
.cover-image { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top center; filter: contrast(.99) saturate(.72); transition: filter 200ms ease; }
.score-card:hover .cover-image { filter: contrast(1) saturate(.9); }
.score-number { position: absolute; left: 10px; top: 10px; padding: 5px 7px; border-radius: 4px; color: var(--score-ink); background: rgba(255,255,255,.94); font: 800 8px/1 "Manrope", sans-serif; letter-spacing: .1em; box-shadow: 0 2px 8px rgba(0,0,0,.16); }
.score-select {
  position: absolute; z-index: 2; top: 10px; right: 10px;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.8); border-radius: var(--radius-md);
  color: var(--score-accent); background: rgba(255,255,255,.94); box-shadow: 0 2px 10px rgba(0,0,0,.18);
  cursor: pointer; font-size: 19px;
}
.score-select:hover { background: #fff; }
.score-select.added { color: var(--on-accent); border-color: var(--accent); background: var(--accent); }
.score-body { padding: 15px 15px 13px; }
.score-title-row { display: flex; align-items: flex-start; gap: 10px; }
.score-title-row h3 { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 750; line-height: 1.45; letter-spacing: -.02em; overflow-wrap: anywhere; }
.favorite-button { width: 40px; height: 40px; margin: -9px -8px 0 0; border: 0; border-radius: 8px; color: var(--text-tertiary); background: transparent; cursor: pointer; font-size: 20px; line-height: 1; }
.favorite-button:hover { color: var(--warm); background: var(--surface-warm); }
.favorite-button.active { color: var(--warm); }
.song-types { min-height: 20px; display: flex; flex-wrap: wrap; gap: 5px; margin: 5px 0 11px; }
.song-type { padding: 3px 6px; border: 1px solid rgba(240,174,121,.28); border-radius: 4px; color: var(--warm); background: transparent; font-size: 8px; font-weight: 750; letter-spacing: .03em; }
.song-type.unset { color: var(--text-tertiary); background: var(--surface-subtle); font-weight: 550; }
.score-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--text-secondary); font-size: 11px; }
.score-meta span { position: relative; }
.score-meta span + span::before { content: "·"; position: absolute; left: -7px; color: var(--border-strong); }
.score-meta strong { color: var(--text); font-weight: 650; }
.score-insight { min-height: 38px; margin-top: 13px; padding: 9px 0 0; display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 9px; }
.score-insight strong { color: var(--accent-strong); font-size: 15px; font-variant-numeric: tabular-nums; }
.score-insight i { width: 1px; height: 14px; margin: 0 2px; background: var(--border-strong); }
.score-insight span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-footer { display: flex; align-items: center; justify-content: flex-end; margin-top: 8px; }
.detail-link { min-height: 36px; border: 0; padding: 0 2px 0 12px; color: var(--accent); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.detail-link:hover { color: var(--accent-strong); }

.score-grid.list { grid-template-columns: 1fr; gap: 8px; }
.score-grid.list .score-card { min-height: 112px; display: grid; grid-template-columns: 112px minmax(0, 1fr); }
.score-grid.list .score-cover { height: 100%; min-height: 112px; }
.score-grid.list .score-number { display: none; }
.score-grid.list .score-select { width: 40px; height: 40px; top: 8px; right: 8px; }
.score-grid.list .score-body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; align-items: center; gap: 22px; padding: 12px 16px; }
.score-grid.list .song-types { margin-bottom: 7px; }
.score-grid.list .score-insight { margin-top: 8px; }
.score-grid.list .score-footer { margin: 0; padding: 0; border: 0; }

.skeleton-card { pointer-events: none; }
.skeleton-cover, .skeleton-body i { background: linear-gradient(90deg, #23282d 25%, #2c3238 48%, #23282d 72%); background-size: 220% 100%; animation: skeleton 1.4s ease-in-out infinite; }
.skeleton-cover { height: 205px; }
.skeleton-body { padding: 18px 16px; }
.skeleton-body i { display: block; height: 10px; margin-bottom: 10px; border-radius: 5px; }
.skeleton-body i:nth-child(1) { width: 64%; height: 15px; }
.skeleton-body i:nth-child(2) { width: 38%; }
.skeleton-body i:nth-child(3) { width: 84%; }
@keyframes skeleton { to { background-position: -220% 0; } }

.empty-state { padding: 64px 20px; text-align: center; border-top: 1px solid var(--border); }
.empty-state-icon { width: 52px; height: 52px; margin: 0 auto; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--accent); background: var(--surface); }
.empty-state-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h3 { margin: 12px 0 6px; font-size: 18px; }
.empty-state p { margin: 0 0 20px; color: var(--text-secondary); font-size: 13px; }
.primary-button, .secondary-button { min-height: 44px; border-radius: var(--radius-md); padding: 0 16px; font-weight: 700; cursor: pointer; }
.primary-button { border: 1px solid var(--accent); color: var(--on-accent); background: var(--accent); }
.primary-button:not(:disabled):hover { border-color: var(--accent-strong); background: var(--accent-strong); }
.secondary-button { border: 1px solid var(--border-strong); color: var(--text); background: var(--surface); }
.secondary-button:not(:disabled):hover { border-color: var(--accent); color: var(--accent); }

.setlist-tray { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(420px, 94vw); padding: 28px; display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow-overlay); transform: translateX(105%); transition: transform 220ms ease; }
.setlist-tray.open { transform: translateX(0); }
.tray-header { display: flex; justify-content: space-between; align-items: flex-start; }
.tray-header p { margin: 0 0 4px; color: var(--warm); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.tray-header h2 { margin: 0; font-size: 25px; font-weight: 750; line-height: 1.3; letter-spacing: -.035em; }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-secondary); background: transparent; cursor: pointer; font-size: 20px; }
.icon-button:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-subtle); }
.tray-summary { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 24px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tray-summary div { padding: 14px 0; }
.tray-summary div + div { padding-left: 18px; border-left: 1px solid var(--border); }
.tray-summary span, .tray-summary strong { display: block; }
.tray-summary span { color: var(--text-tertiary); font-size: 10px; }
.tray-summary strong { margin-top: 4px; font-size: 16px; font-variant-numeric: tabular-nums; }
.tray-hint { margin: 14px 0 8px; color: var(--text-tertiary); font-size: 10px; line-height: 1.55; }
.tray-list { min-height: 0; overflow: auto; display: grid; align-content: start; padding-right: 4px; }
.tray-item { min-height: 78px; display: grid; grid-template-columns: 52px 1fr 40px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tray-cover { position: relative; width: 52px; height: 58px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-subtle); }
.tray-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; filter: grayscale(.18) contrast(.98); }
.tray-cover span { position: absolute; left: 4px; bottom: 4px; padding: 2px 4px; border-radius: 4px; color: #fff; background: rgba(32,36,42,.76); font-size: 8px; font-weight: 700; }
.tray-item-copy { min-width: 0; }
.tray-item strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.tray-item small { display: block; overflow: hidden; margin-top: 5px; color: var(--text-tertiary); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.tray-remove { width: 40px; height: 40px; border: 0; border-radius: 8px; color: var(--text-tertiary); background: transparent; cursor: pointer; font-size: 18px; }
.tray-remove:hover { color: var(--danger); background: var(--danger-soft); }
.tray-empty { margin: auto; max-width: 230px; text-align: center; color: var(--text-tertiary); }
.tray-empty > span { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 12px; border: 1px solid var(--border); border-radius: 50%; color: var(--accent); background: var(--surface-subtle); }
.tray-empty svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.tray-empty strong { display: block; color: var(--text); font-size: 13px; }
.tray-empty p { margin: 6px 0 0; font-size: 11px; line-height: 1.6; }
.tray-footer { margin-top: auto; padding-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid var(--border); background: var(--surface); }
.page-backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(0,0,0,.58); opacity: 0; pointer-events: none; transition: opacity 180ms ease; }
.page-backdrop.open { opacity: 1; pointer-events: auto; }

.score-dialog { width: min(1120px, calc(100vw - 40px)); max-height: calc(100vh - 40px); padding: 0; overflow: hidden; border: 0; border-radius: var(--radius-lg); color: var(--text); background: var(--surface); box-shadow: var(--shadow-overlay); }
.score-dialog::backdrop { background: rgba(0,0,0,.72); }
.score-dialog[open] { animation: dialog-enter 180ms ease-out; }
.score-dialog[open]::backdrop { animation: backdrop-enter 180ms ease-out; }
.dialog-close { position: absolute; z-index: 5; right: 14px; top: 14px; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.64); border-radius: var(--radius-md); color: #fff; background: rgba(32,36,42,.72); cursor: pointer; font-size: 23px; }
.dialog-workspace { height: min(820px, calc(100vh - 40px)); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(410px, .85fr); }
.dialog-media-pane { min-width: 0; overflow: hidden; display: flex; flex-direction: column; background: #111417; }
.dialog-score-preview { min-height: 0; flex: 1; display: flex; gap: 16px; align-items: flex-start; overflow: auto; padding: 30px; scroll-snap-type: x mandatory; }
.dialog-score-preview img { flex: 0 0 auto; width: min(100%, 620px); max-height: none; display: block; object-fit: contain; object-position: top; border-radius: 3px; background: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.38); scroll-snap-align: center; }
.preview-caption { min-height: 46px; padding: 0 30px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; color: var(--text-secondary); border-top: 1px solid var(--border); font-size: 11px; }
.preview-page-note { color: var(--text-tertiary); font-size: 9px; }
.preview-caption strong { color: var(--text); }
.dialog-content-pane { min-width: 0; overflow: auto; border-left: 1px solid var(--border); background: var(--surface); }
.dialog-body { padding: 32px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-right: 42px; }
.dialog-heading-copy { min-width: 0; }
.dialog-heading p { margin: 0 0 6px; color: var(--warm); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.dialog-title { margin: 0 0 10px; font-size: clamp(24px, 3vw, 31px); font-weight: 750; line-height: 1.3; letter-spacing: -.035em; }
.dialog-types { min-height: 24px; display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 18px; }
.dialog-types span { padding: 4px 7px; border-radius: 999px; color: var(--warm); background: var(--warm-soft); font-size: 9px; font-weight: 700; }
.dialog-types span.unset { color: var(--text-tertiary); background: var(--surface-subtle); font-weight: 550; }
.use-level { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; color: var(--accent-strong); background: var(--accent-soft); font-size: 10px; font-weight: 700; }
.dialog-meta { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.dialog-meta div { min-width: 0; padding: 13px 8px 13px 0; }
.dialog-meta span { display: block; color: var(--text-tertiary); font-size: 10px; }
.dialog-meta strong { display: block; overflow: hidden; margin-top: 4px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.detail-panels { margin-top: 0; }
.detail-panel, .related-panel, .worship-archive { padding: 20px 0; border-bottom: 1px solid var(--border); background: transparent; }
.detail-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-panel-heading p { margin: 0 0 3px; color: var(--text-tertiary); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.detail-panel-heading h3 { margin: 0; font-size: 15px; line-height: 1.4; }
.detail-panel-heading > span, .detail-panel-heading > small { max-width: 190px; color: var(--text-tertiary); font-size: 10px; line-height: 1.45; text-align: right; }
.detail-panel-heading > strong { color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
.archive-admin-link { color: var(--accent); font-size: 10px; font-weight: 700; }
.archive-empty { min-height: 116px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 13px; margin-top: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.archive-empty-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--accent); background: var(--accent-soft); }
.archive-empty-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.archive-empty strong { display: block; font-size: 12px; }
.archive-empty p { margin: 5px 0 0; color: var(--text-secondary); font-size: 10px; line-height: 1.65; }
.archive-empty-guide { grid-column: 1 / -1; display: grid; gap: 7px; padding: 12px 0 2px; border-top: 1px solid var(--border); }
.archive-empty-guide span { display: grid; grid-template-columns: 64px 1fr; gap: 8px; color: var(--text-secondary); font-size: 10px; line-height: 1.55; }
.archive-empty-guide b { color: var(--text); font-weight: 700; }
.archive-empty-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.archive-empty-actions a { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--accent); font-size: 10px; font-weight: 700; }
.archive-empty-actions a:hover { border-color: var(--accent); background: var(--accent-soft); }
.archive-layout { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.service-date-list { max-height: 148px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-content: start; gap: 5px; padding-right: 2px; }
.service-date { position: relative; width: 100%; min-height: 42px; padding: 7px 28px 7px 10px; border: 1px solid transparent; border-radius: var(--radius-sm); text-align: left; color: var(--text-secondary); background: var(--surface-subtle); cursor: pointer; }
.service-date::after { position: absolute; top: 50%; right: 10px; content: "›"; color: var(--text-tertiary); font-size: 15px; transform: translateY(-50%); }
.service-date strong, .service-date small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-date strong { font-size: 10px; font-variant-numeric: tabular-nums; }
.service-date small { margin-top: 2px; color: var(--text-tertiary); font-size: 9px; }
.service-date.active { color: var(--on-accent); border-color: var(--accent); background: var(--accent); }
.service-date.active small { color: rgba(18,24,30,.72); }
.service-date.active::after { color: rgba(18,24,30,.72); }
.archive-select-hint { margin: 2px 0 0; color: var(--text-tertiary); font-size: 9px; line-height: 1.5; }
.service-record { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); outline: none; background: var(--surface); }
.service-record-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border); background: var(--surface-subtle); }
.service-record-header span { color: var(--warm); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.service-record-header h3 { margin: 3px 0 0; font-size: 15px; line-height: 1.4; }
.service-record-header > strong { color: var(--accent); font-size: 10px; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); }
.team-grid div { min-width: 0; min-height: 52px; padding: 9px 10px; background: var(--surface); }
.team-grid span, .team-grid strong { display: block; }
.team-grid span { color: var(--text-tertiary); font-size: 9px; }
.team-grid strong { overflow: hidden; margin-top: 4px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.team-grid .is-empty strong { color: var(--text-tertiary); font-weight: 500; }
.service-record-columns { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 12px; }
.record-section + .record-section { padding-top: 12px; border-top: 1px solid var(--border); }
.record-section-title { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--text-secondary); font-size: 10px; font-weight: 700; }
.record-section-title b { color: var(--text-tertiary); font-size: 9px; }
.service-setlist, .service-audio { display: grid; gap: 5px; }
.service-song { width: 100%; min-height: 40px; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: left; color: var(--text-secondary); background: var(--surface); font-size: 10px; }
button.service-song { cursor: pointer; }
.service-song > span { color: var(--text-tertiary); font-size: 9px; }
.service-song small { color: var(--text-tertiary); font-size: 9px; }
.service-song.current { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.service-song.unavailable { border-style: dashed; color: var(--text-tertiary); background: rgba(255,255,255,.018); }
.service-song .unavailable-label { color: var(--warm); font-weight: 700; }
.audio-item { padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.audio-item > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.audio-item span { color: var(--text-tertiary); font-size: 9px; }
.audio-item strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.audio-item audio { width: 100%; height: 34px; }
.record-empty { margin: 0; padding: 14px 8px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--text-tertiary); text-align: center; font-size: 10px; }
.service-notes { margin: 0 12px 12px; padding: 10px; border-left: 2px solid var(--warm); color: var(--text-secondary); background: var(--surface-warm); font-size: 10px; line-height: 1.6; }
.service-notes strong { margin-right: 8px; }
.tempo-range { width: 100%; margin: 18px 0 12px; accent-color: var(--accent); }
.metronome-controls { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.tempo-heading { display: flex; align-items: baseline; gap: 7px; }
.tempo-heading span { color: var(--text-tertiary); font-size: 9px; }
.tempo-heading strong { color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
.metronome-controls label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px; color: var(--text-secondary); font-size: 10px; }
.metronome-controls input { width: 72px; min-width: 0; height: 44px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); background: var(--surface); font-size: 11px; }
.metronome-button { min-height: 44px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--accent); background: var(--surface); cursor: pointer; font-size: 10px; font-weight: 700; }
.metronome-button.playing { color: var(--on-warm); border-color: var(--warm); background: var(--warm); }
.tempo-note { display: block; margin-top: 8px; color: var(--text-tertiary); font-size: 9px; line-height: 1.5; }
.beat-row { height: 24px; display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.beat-row small { margin-left: auto; color: var(--text-tertiary); font-size: 9px; }
.beat-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); transition: transform 80ms, background 80ms; }
.beat-dot.accent { width: 9px; height: 9px; }
.beat-dot.active { transform: scale(1.35); background: var(--warm); }
.related-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 11px; }
.related-song { min-width: 0; min-height: 62px; display: grid; grid-template-columns: minmax(0, 1fr) 52px; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: left; background: var(--surface); cursor: pointer; }
.related-song:hover { border-color: var(--accent); background: var(--accent-soft); }
.related-song-copy { min-width: 0; }
.related-song strong, .related-song small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-song strong { font-size: 11px; }
.related-song small { margin-top: 4px; color: var(--text-tertiary); font-size: 9px; }
.related-score { display: grid; gap: 5px; text-align: right; }
.related-score b { color: var(--warm); font-size: 10px; }
.related-score i { width: 52px; height: 3px; overflow: hidden; display: block; border-radius: 3px; background: var(--border); }
.related-score em { height: 100%; display: block; border-radius: inherit; background: var(--warm); }
.sync-notice { margin-top: 16px; padding: 13px; border-left: 3px solid var(--warm); color: var(--text-secondary); background: var(--surface-warm); font-size: 11px; line-height: 1.6; }
.dialog-actions { position: sticky; bottom: -32px; z-index: 2; display: flex; gap: 8px; margin: 22px -32px -32px; padding: 16px 32px; border-top: 1px solid var(--border); background: rgba(25,29,33,.97); }
.dialog-actions a, .dialog-actions button { flex: 1; display: grid; place-items: center; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; max-width: min(460px, calc(100vw - 30px)); padding: 11px 16px; overflow: hidden; border-radius: var(--radius-md); color: #fff; background: #2b3139; box-shadow: var(--shadow-float); font-size: 12px; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity 180ms, transform 180ms; }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; width: var(--toast-progress, 0%); height: 2px; background: rgba(255,255,255,.68); transition: width 160ms linear; }
.toast[data-tone="success"] { background: var(--accent-strong); }
.toast[data-tone="progress"] { background: #2e4054; }
.toast[data-tone="error"] { background: #8e3f3f; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes control-spin { to { transform: rotate(360deg); } }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes backdrop-enter { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1180px) and (min-width: 861px) {
  :root { --sidebar-width: 76px; }
  .sidebar { padding: 20px 12px; }
  .brand { justify-content: center; }
  .brand-logo { width: 52px; height: 58px; object-fit: cover; object-position: 50% 12%; }
  .brand > span:last-child, .side-divider, .side-label, .quick-keys, .side-note, .notion-link { display: none; }
  .nav-list { margin-top: 28px; gap: 7px; }
  .nav-item { position: relative; justify-content: center; padding: 0; }
  .nav-item > span { display: none; }
  .nav-item b { position: absolute; top: 2px; right: 2px; min-width: 16px; padding: 1px 4px; font-size: 8px; }
  .setlist-shortcut { position: relative; justify-content: center; padding: 0; }
  .setlist-shortcut > span { font-size: 0; }
  .setlist-shortcut b { position: absolute; top: 1px; right: 1px; min-width: 15px; padding: 1px 4px; font-size: 7px; }
  .score-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .score-cover { height: 180px; }
  .workspace-header, .search-panel, .library-section, .worship-calendar-section { padding-left: 26px; padding-right: 26px; }
  .filter-drawer { max-width: calc(100% - 52px); }
  .calendar-workspace { grid-template-columns: minmax(0, 1fr) 330px; }
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: 108px; }
  .mobile-header { position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--border); background: rgba(15,17,19,.97); }
  .brand.compact { min-height: 44px; gap: 9px; }
  .brand.compact .brand-logo { width: 132px; height: 52px; object-fit: contain; object-position: left center; }
  .brand.compact .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 16px; }
  .brand.compact strong { font-size: 15px; }
  .mobile-setlist-button { min-width: 76px; height: 42px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); color: var(--text-secondary); background: var(--surface); cursor: pointer; font-size: 11px; font-weight: 700; }
  .mobile-setlist-button b { min-width: 17px; padding: 2px 5px; border-radius: 999px; color: var(--on-accent); background: var(--accent); font-size: 8px; }
  .mobile-bottom-nav { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; min-height: 64px; padding: 5px 12px calc(5px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); background: rgba(20,23,26,.97); }
  .mobile-bottom-nav button, .mobile-bottom-nav a { position: relative; min-height: 52px; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; border-radius: var(--radius-md); color: var(--text-tertiary); background: transparent; cursor: pointer; font-size: 10px; }
  .mobile-bottom-nav button.active, .mobile-bottom-nav a:hover { color: var(--accent); }
  .mobile-bottom-nav svg { width: 19px; height: 19px; }
  .mobile-bottom-nav b { position: absolute; top: 3px; left: calc(50% + 7px); min-width: 16px; padding: 1px 4px; border-radius: 999px; color: var(--on-warm); background: var(--warm); font-size: 8px; }
  .workspace-header { padding: 24px 18px 18px; align-items: flex-start; }
  .workspace-header-actions { min-width: 210px; }
  .studio-entry { min-width: 210px; }
  .workspace-header h1 { font-size: 29px; }
  .workspace-intro { max-width: 470px; }
  .workspace-status { display: none; }
  .search-panel { top: 60px; padding: 10px 16px; gap: 8px; }
  .filter-button { min-width: 48px; width: 48px; padding: 0; }
  .filter-button span { display: none; }
  .view-switch { flex: 0 0 auto; }
  .detail-link { min-height: 44px; }
  .filter-drawer { max-width: none; margin: 0 16px; padding: 0; flex-wrap: wrap; }
  .filter-drawer.open { max-height: 220px; margin-bottom: 8px; padding-top: 14px; padding-bottom: 14px; }
  .filter-group { min-width: calc(50% - 6px); }
  .library-section, .worship-calendar-section { padding: 22px 16px 0; }
  .calendar-workspace { grid-template-columns: 1fr; }
  .calendar-detail { position: static; }
  .calendar-stat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .calendar-stat-strip > a { grid-column: 1 / -1; margin: 0 0 14px; text-align: center; }
  .score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .score-cover { height: 180px; }
  .score-grid.list .score-body { grid-template-columns: minmax(0,1fr) 210px; }
  .setlist-tray { padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); }
  .score-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; overflow: auto; border-radius: 0; }
  .dialog-workspace { height: auto; min-height: 100dvh; display: block; }
  .dialog-media-pane { height: min(58vh, 520px); }
  .dialog-score-preview { padding: 18px; }
  .dialog-score-preview img { width: min(100%, 520px); }
  .preview-caption { min-height: 42px; padding: 0 18px; grid-template-columns: 1fr auto; gap: 12px; }
  .preview-page-note { display: none; }
  .dialog-content-pane { overflow: visible; border-left: 0; }
  .dialog-body { padding: 24px 20px; }
  .dialog-heading { padding-right: 26px; }
  .dialog-close { position: fixed; }
  .dialog-actions { bottom: 0; margin: 20px -20px -24px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

@media (max-width: 620px) {
  .workspace-header { display: block; }
  .workspace-header-actions { margin-top: 18px; }
  .studio-entry { width: 100%; min-width: 0; }
  .workspace-intro { font-size: 12px; }
  .search-panel { flex-wrap: nowrap; }
  .search-box { height: 46px; padding: 0 12px; }
  kbd { display: none; }
  .filter-button, .view-switch { height: 46px; }
  .filter-group select { height: 44px; }
  .view-button { width: 40px; height: 40px; }
  .section-heading { margin-bottom: 14px; }
  .section-heading h2 { font-size: 21px; }
  .worship-calendar-section { padding-top: 8px; }
  .calendar-toolbar { min-height: 58px; }
  .calendar-toolbar h2 { font-size: 18px; }
  .calendar-controls button { min-width: 36px; height: 36px; padding: 0 9px; }
  .calendar-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-stat-strip > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .calendar-stat-strip > div:nth-child(4) { border-top: 1px solid var(--border); }
  .calendar-stat-strip > div { padding: 10px; }
  .calendar-stat-strip > div + div { padding-left: 10px; }
  .calendar-workspace { padding-top: 12px; }
  .calendar-weekdays span { padding: 8px 2px; font-size: 8px; }
  .calendar-day { min-height: 72px; padding: 4px; }
  .calendar-day-number { width: 20px; height: 20px; margin-bottom: 2px; font-size: 8px; }
  .calendar-service-chip { min-height: 25px; padding: 4px; border-left-width: 2px; }
  .calendar-service-chip span { display: none; }
  .calendar-service-chip strong { font-size: 7px; }
  .calendar-empty-state { grid-template-columns: auto 1fr; }
  .calendar-empty-state a { grid-column: 1 / -1; text-align: center; }
  .calendar-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-grid { grid-template-columns: 1fr; gap: 12px; }
  .score-cover { height: 190px; }
  .score-grid.list .score-card { min-height: 104px; grid-template-columns: 96px minmax(0,1fr); }
  .score-grid.list .score-cover { min-height: 104px; }
  .score-grid.list .score-body { display: block; padding: 11px 12px; }
  .score-grid.list .score-insight { display: none; }
  .score-grid.list .score-footer { margin-top: 6px; justify-content: flex-start; }
  .score-grid.list .detail-link { min-height: 40px; padding-left: 0; }
  .score-grid.list .favorite-button { margin-right: -4px; }
  .dialog-meta { grid-template-columns: repeat(3, 1fr); }
  .service-date-list { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); max-height: 142px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .related-list { grid-template-columns: 1fr; }
  .dialog-actions { flex-direction: column; }
  .setlist-tray { width: 100vw; max-width: none; }
  .tray-footer { grid-template-columns: 1fr; }
}

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