:root {
  color-scheme: light;
  --green: #173d32;
  --green-dark: #102f27;
  --green-soft: #eaf1ed;
  --gold: #bd9a53;
  --ink: #202722;
  --muted: #7a817c;
  --line: #e9ece9;
  --canvas: #f7f8f6;
  font-family: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.sidebar {
  width: 252px; position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; overflow-y: auto; overscroll-behavior-y: contain;
  flex-direction: column; padding: 28px 18px 18px; background: var(--green); color: #fff;
}
.brand { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 4px 27px; color: inherit; text-align: center; text-decoration: none; }
.brand-logo { display: block; width: 112px; height: 112px; flex: 0 0 auto; border-radius: 50%; background: #fff; object-fit: cover; object-position: center top; }
.brand-identity { display: grid; justify-items: center; gap: 4px; }
.brand-name { color: #fff; font: 600 16px "Playfair Display", serif; letter-spacing: -.15px; }
.brand-location { color: #d3b46d; font-size: 10px; font-weight: 700; letter-spacing: 2px; }
.sidebar-label { padding: 0 12px 12px; color: #a8bbb3; font-size: 10px; font-weight: 700; letter-spacing: 1.25px; }
.nav-list { display: grid; gap: 5px; }
.nav-link { display: flex; width: 100%; align-items: center; gap: 13px; border: 0; border-radius: 9px; background: transparent; padding: 11px 12px; color: #d3dfd9; text-align: left; transition: .18s ease; }
.nav-link:hover { background: #ffffff12; color: #fff; }
.nav-link.active { background: #ffffff19; color: #fff; box-shadow: inset 3px 0 #d5b770; }
.nav-icon { width: 18px; color: #cfb777; font-size: 18px; text-align: center; }
.nav-count { margin-left: auto; border-radius: 20px; background: #ffffff20; padding: 2px 8px; font-size: 11px; }
.sidebar-bottom { margin-top: auto; }
.local-note { display: flex; gap: 10px; margin: 15px 4px 17px; padding: 13px 11px; border: 1px solid #ffffff20; border-radius: 10px; background: #ffffff0c; }
.note-icon { color: #d8bd78; font-size: 22px; }
.local-note strong { font-size: 12px; font-weight: 600; }
.local-note p { margin: 4px 0 0; color: #b9c9c1; font-size: 11px; line-height: 1.45; }
.backup-link { padding-block: 9px; font-size: 12px; }
.sidebar-version { padding: 16px 12px 0; color: #91a79d; font-size: 9px; letter-spacing: .8px; }
.main-area { display: flex; min-height: 100vh; flex-direction: column; margin-left: 252px; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: #fff; }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #919892; font-size: 12px; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.crumb-separator { color: #c1c7c2; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.local-status { color: #68736c; font-size: 11px; }
.local-status span { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #4f9a69; }
.avatar { width: 33px; height: 33px; border: 0; border-radius: 50%; background: #f0eadb; color: #7d6330; font-weight: 700; }
.mobile-menu { display: none; border: 0; background: none; color: var(--green); font-size: 20px; }
.page-content { max-width: 1440px; margin: 0 auto; padding: 38px 42px 56px; }
.site-footer { width: 100%; margin-top: auto; background: linear-gradient(115deg, #14382e, #1b4537); color: #d8e2dc; }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 25px 42px 15px; }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 22px; }
.footer-parish { display: flex; align-items: center; gap: 14px; }
.footer-emblem { display: grid; width: 43px; height: 43px; flex: 0 0 43px; place-items: center; border: 1px solid #d3b66b77; border-radius: 13px; background: #ffffff0b; color: #dfc779; font-size: 23px; }
.footer-parish-copy { display: grid; gap: 4px; }
.footer-kicker { color: #c5b575; font-size: 8px; font-weight: 700; letter-spacing: 1.15px; }
.footer-parish-copy strong { color: #fff; font: 600 18px "Playfair Display", serif; }
.footer-location { color: #bdcfc4; font-size: 10px; }
.footer-location span { padding: 0 4px; color: #d3b66b; }
.footer-credit { display: grid; justify-items: end; gap: 4px; }
.footer-credit-label { color: #b8cbc0; font-size: 9px; }
.footer-credit strong { color: #fff; font-size: 12px; font-weight: 700; }
.footer-credit a { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; color: #dfc779; font-size: 10px; font-weight: 600; text-decoration: none; }
.footer-credit a:hover { color: #fff1b7; text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid #ffffff20; color: #a9beb2; font-size: 9px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.eyebrow { margin: 0 0 8px; color: #9c8250; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; color: #20352b; font: 600 30px "Playfair Display", serif; letter-spacing: -.3px; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 13px; }
.btn { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; padding: 0 15px; font-size: 12px; font-weight: 600; transition: .18s ease; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { border-color: var(--line); background: #fff; color: #4d5750; }
.btn-secondary:hover { border-color: #bcc9c0; background: #fafbf9; }
.btn-danger { border-color: #f1d9d5; background: #fff7f6; color: #a44136; }
.btn-small { min-height: 32px; padding: 0 10px; font-size: 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 28px; }
.stat-card { position: relative; overflow: hidden; min-height: 118px; padding: 19px 19px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.stat-card::after { position: absolute; right: -11px; bottom: -35px; width: 95px; height: 95px; border-radius: 50%; background: #f5f2e9; content: ""; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #707b73; font-size: 11px; }
.stat-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: var(--green-soft); color: var(--green); font-size: 17px; }
.stat-value { position: relative; z-index: 1; margin: 9px 0 0; color: #24382d; font: 600 27px "Playfair Display", serif; }
.section-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 22px; border-bottom: 1px solid #f0f2ef; }
.section-header h2 { margin: 0; color: #2a382f; font: 600 17px "Playfair Display", serif; }
.text-link { border: 0; background: none; color: #557b65; font-size: 11px; font-weight: 600; }
.song-list { padding: 0 22px; }
.song-row { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid #f1f2f0; }
.song-row:last-child { border-bottom: 0; }
.song-art { display: grid; width: 41px; height: 41px; flex: 0 0 41px; place-items: center; border-radius: 10px; background: #f3f0e7; color: #9c824d; font-size: 18px; }
.song-info { min-width: 0; flex: 1; }
.song-title { display: block; overflow: hidden; border: 0; background: transparent; padding: 0; color: #29352d; font-size: 12px; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.song-meta { margin: 4px 0 0; color: #8b938d; font-size: 10px; }
.song-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #78827b; font-size: 16px; }
.icon-button:hover { border-color: var(--line); background: #f8f9f7; }
.icon-button.favorite { color: #b17a58; }
.library-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid #f0f2ef; }
.search-wrap { position: relative; flex: 1 1 260px; }
.search-wrap span { position: absolute; top: 10px; left: 12px; color: #929a94; }
.search-wrap .search-icon { position: absolute; top: 10px; left: 12px; width: 19px; height: 19px; border-radius: 50%; object-fit: cover; }
.field, .select-field, .textarea-field { width: 100%; border: 1px solid #e4e8e4; border-radius: 8px; outline: none; background: #fff; color: var(--ink); }
.field, .select-field { height: 39px; padding: 0 11px; }
.search-wrap .field { padding-left: 35px; }
.field:focus, .select-field:focus, .textarea-field:focus { border-color: #89a795; box-shadow: 0 0 0 3px #e8f0eb; }
.select-field { min-width: 165px; color: #5f6962; font-size: 11px; }
.table-wrap { overflow-x: auto; }
.song-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.song-table th { padding: 12px 17px; background: #fafbf9; color: #929a94; font-size: 9px; font-weight: 700; letter-spacing: .8px; text-align: left; text-transform: uppercase; }
.song-table td { padding: 14px 17px; border-top: 1px solid #f0f2ef; color: #69736c; font-size: 11px; }
.song-table tr:hover td { background: #fcfdfb; }
.table-title { border: 0; background: none; padding: 0; color: #2b3930; font-size: 12px; font-weight: 700; text-align: left; }
.pill { display: inline-flex; align-items: center; border-radius: 30px; background: #edf3ef; padding: 5px 9px; color: #4f765e; font-size: 10px; }
.file-indicators { display: flex; gap: 6px; }
.file-indicators span { border-radius: 5px; background: #f5f6f4; padding: 4px 6px; color: #838b85; font-size: 9px; }
.row-action { display: inline-flex; gap: 4px; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.category-card { position: relative; overflow: hidden; min-height: 119px; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 18px; text-align: left; transition: .18s ease; }
.category-card:hover { transform: translateY(-2px); border-color: #c4d2c8; box-shadow: 0 9px 24px #193b2a0d; }
.category-card::after { position: absolute; top: -28px; right: -20px; width: 88px; height: 88px; border-radius: 50%; background: #f4f2e9; content: ""; }
.category-symbol { position: relative; z-index: 1; color: #a48a52; font-size: 17px; }
.category-name { position: relative; z-index: 1; margin: 13px 0 4px; color: #2d3a31; font-size: 12px; font-weight: 700; }
.category-total { position: relative; z-index: 1; margin: 0; color: #909891; font-size: 10px; }
.empty-state { padding: 48px 20px; color: #7a847d; text-align: center; }
.empty-icon { display: grid; width: 49px; height: 49px; place-items: center; margin: 0 auto 14px; border-radius: 15px; background: #f0f3ef; color: #6c8c77; font-size: 23px; }
.empty-state h3 { margin-bottom: 7px; color: #344239; font: 600 17px "Playfair Display", serif; }
.empty-state p { max-width: 350px; margin: 0 auto 16px; color: #88918a; font-size: 11px; line-height: 1.6; }
.welcome-panel { display: flex; min-height: 171px; align-items: center; justify-content: space-between; overflow: hidden; margin-bottom: 24px; border-radius: 13px; background: linear-gradient(110deg, #173d32, #285642); padding: 27px 32px; color: #fff; }
.welcome-panel h2 { margin: 0 0 7px; font: 600 25px "Playfair Display", serif; }
.welcome-panel p { max-width: 470px; margin: 0; color: #cfddd5; font-size: 12px; line-height: 1.6; }
.welcome-motif { padding-right: 28px; color: #d4b76e; font: 88px "Playfair Display", serif; opacity: .75; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; overflow-y: auto; background: #12251dc4; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(600px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 14px; background: #fff; box-shadow: 0 24px 80px #0a1a1240; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0 0 5px; color: #24372c; font: 600 20px "Playfair Display", serif; }
.modal-head p { margin: 0; color: #818b83; font-size: 11px; }
.modal-body { padding: 20px 24px 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-field { display: grid; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: #58645c; font-size: 11px; font-weight: 600; }
.form-field label span { color: #b15347; }
.textarea-field { min-height: 124px; resize: vertical; padding: 10px 11px; line-height: 1.5; }
.file-input { width: 100%; border: 1px dashed #d9e0da; border-radius: 8px; background: #fafbf9; padding: 10px; color: #707a72; font-size: 10px; }
.field-hint { margin: -2px 0 0; color: #929a94; font-size: 9px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 21px; }
.detail-category { margin-bottom: 16px; }
.lyrics { white-space: pre-wrap; border-radius: 9px; background: #fafbf9; padding: 17px; color: #566259; font-size: 12px; line-height: 1.8; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 18px; color: #778179; font-size: 11px; }
.detail-meta strong { color: #414e45; }
.detail-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: grid; gap: 8px; }
.toast { max-width: min(380px, calc(100vw - 32px)); border-radius: 9px; background: #203a2c; padding: 13px 17px; color: #fff; box-shadow: 0 8px 28px #172d2033; font-size: 12px; animation: toast-in .2s ease-out; }
.toast.error { background: #8f382f; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.mobile-overlay { display: none; }
.mobile-action-bar { display: none; }
.auth-screen { display: grid; min-height: 100vh; place-items: center; padding: 24px 16px; background: linear-gradient(135deg, #14382e, #1f4c3b 60%, #2a5a45); }
.auth-card { width: min(420px, 100%); border-radius: 16px; background: #fff; padding: 30px 28px 22px; text-align: center; box-shadow: 0 24px 80px #0a1a1260; }
.auth-logo { display: block; width: 104px; height: 104px; margin: 0 auto 14px; border-radius: 50%; object-fit: cover; object-position: center top; }
.auth-card h1 { font-size: 24px; }
.auth-card .page-subtitle { margin-bottom: 18px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 18px; padding: 4px; border-radius: 10px; background: #f0f3ef; }
.auth-tab { min-height: 38px; border: 0; border-radius: 8px; background: transparent; color: #66716a; font-size: 12px; font-weight: 600; }
.auth-tab.active { background: #fff; color: var(--green); box-shadow: 0 1px 4px #173d3214; }
#auth-form { display: grid; gap: 13px; text-align: left; }
.auth-message { margin: 0; border-radius: 8px; background: #edf5ef; padding: 10px 12px; color: #2f5d44; font-size: 11px; line-height: 1.5; }
.auth-message.error { background: #fbeceb; color: #9a3a30; }
.auth-submit { width: 100%; min-height: 44px; }
.auth-forgot { justify-self: center; padding: 4px; }
.auth-footnote { margin: 18px 0 0; color: #8b938d; font-size: 10px; }
.auth-footnote a { color: #477153; font-weight: 600; text-decoration: none; }
.user-card strong, .user-card p { overflow-wrap: anywhere; }
.role-badge { display: inline-block; margin-top: 7px; border-radius: 20px; background: #ffffff20; padding: 3px 9px; color: #e8efe9; font-size: 10px; font-weight: 600; }
.role-badge.admin { background: #d3b46d; color: #2d2410; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; border: 1px solid #ead9a9; border-radius: 11px; background: #fbf6e6; padding: 14px 18px; }
.notice strong { color: #5f4a14; font-size: 12px; }
.notice p { margin: 4px 0 0; color: #7d6a35; font-size: 11px; }

@media (max-width: 1050px) {
  .sidebar { width: 224px; }
  .main-area { margin-left: 224px; }
  .topbar { padding-inline: 28px; }
  .page-content { padding-inline: 28px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sidebar { width: 270px; transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .mobile-overlay.open { position: fixed; inset: 0; z-index: 19; display: block; background: #10251c80; }
  .main-area { margin-left: 0; }
  .topbar { height: 61px; justify-content: flex-start; gap: 13px; padding: 0 17px; }
  .mobile-menu { display: block; }
  .topbar-right { margin-left: auto; }
  .local-status { display: none; }
  .page-content { width: 100%; padding: 26px 17px 40px; }
  .footer-inner { padding: 22px 17px calc(96px + env(safe-area-inset-bottom)); }
  .footer-main { align-items: flex-start; flex-direction: column; gap: 20px; padding-bottom: 17px; }
  .footer-credit { justify-items: start; padding-left: 57px; }
  .footer-bottom { flex-direction: column; gap: 5px; }
  .sidebar { scrollbar-width: thin; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 27px; }
  .stats-grid { gap: 10px; }
  .stat-card { min-height: 108px; padding: 14px; }
  .stat-value { font-size: 24px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .welcome-panel { min-height: 150px; padding: 23px; }
  .welcome-panel h2 { font-size: 21px; }
  .welcome-motif { padding-right: 0; font-size: 64px; }
  .page-content { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
  .mobile-action-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 15; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 9px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #ffffffed; box-shadow: 0 -8px 24px #173d320c; backdrop-filter: blur(12px); }
  .mobile-action-bar .btn { min-height: 46px; }
  .btn { min-height: 44px; }
  .icon-button { width: 40px; height: 40px; }
  .nav-link { min-height: 46px; }
  .field, .select-field { min-height: 44px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .song-table { min-width: 790px; }
  .song-actions { gap: 3px; }
  .modal-backdrop { align-items: end; padding: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .modal { width: 100%; max-height: calc(100dvh - 16px); border-radius: 14px 14px 10px 10px; }
  .modal-head { position: sticky; top: 0; z-index: 1; background: #fff; }
  .modal-actions { position: sticky; bottom: -24px; margin: 21px -17px -24px; padding: 12px 17px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #ffffffed; }
  .toast-region { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); left: 12px; }
  .toast { max-width: none; }
}
@media (max-width: 480px) {
  .breadcrumb { gap: 7px; font-size: 10px; }
  .avatar { width: 30px; height: 30px; }
  .page-content { padding-right: 13px; padding-left: 13px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-height: 100px; }
  .stat-top { align-items: flex-start; gap: 5px; font-size: 9px; }
  .stat-icon { width: 26px; height: 26px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .welcome-motif { display: none; }
  .section-header, .song-list { padding-inline: 15px; }
  .song-actions .btn-small { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .modal-head, .modal-body { padding-inline: 17px; }
  .welcome-panel { padding: 20px; }
  .welcome-panel p { font-size: 11px; }
  .library-toolbar { padding-inline: 12px; }
  .select-field { min-width: 0; flex: 1 1 140px; }
  .mobile-action-bar { padding-inline: 11px; }
  .mobile-action-bar .btn { gap: 5px; padding-inline: 8px; font-size: 11px; }
  .footer-inner { padding-right: 13px; padding-left: 13px; }
  .footer-parish { gap: 11px; }
  .footer-parish-copy strong { font-size: 17px; }
}

/* Premium visual system */
:root {
  --green: #174536;
  --green-dark: #103629;
  --green-soft: #e8f1eb;
  --gold: #c5a45e;
  --ink: #202c25;
  --muted: #66746b;
  --line: #e4e9e3;
  --canvas: #f4f6f1;
  --surface-shadow: 0 12px 34px #173d3210;
}

body {
  background:
    radial-gradient(ellipse at 88% 0%, #e4ede4 0, transparent 30rem),
    var(--canvas);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

button, input, select, textarea { font-size: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #c5a45e88;
  outline-offset: 3px;
}

.sidebar {
  width: 268px;
  padding: 30px 20px 20px;
  border-right: 1px solid #ffffff15;
  background:
    radial-gradient(ellipse at 10% 0%, #ffffff12, transparent 48%),
    linear-gradient(165deg, #1c503d, #12382d 72%);
  box-shadow: 10px 0 35px #102c2010;
}
.brand { gap: 11px; padding-bottom: 34px; }
.brand-logo {
  width: 120px;
  height: 120px;
  border: 3px solid #d8c17f;
  box-shadow: 0 8px 30px #081e1738;
}
.brand-name { font-size: 19px; }
.brand-location { font-size: 12px; letter-spacing: 2.4px; }
.sidebar-label { padding-bottom: 14px; font-size: 11px; letter-spacing: 1.5px; }
.nav-list { gap: 7px; }
.nav-link {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 500;
}
.nav-link:hover { border-color: #ffffff1b; background: #ffffff12; }
.nav-link.active {
  border-color: #d8c17f55;
  background: linear-gradient(100deg, #ffffff20, #ffffff0b);
  box-shadow: inset 3px 0 #ddc475, 0 5px 18px #09261b25;
}
.nav-icon { width: 21px; font-size: 20px; }
.nav-count { padding: 3px 9px; font-size: 12px; }
.local-note {
  gap: 12px;
  margin: 18px 2px;
  border-color: #d5bd7850;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff13, #ffffff08);
  padding: 15px 13px;
}
.note-icon { font-size: 25px; }
.local-note strong { font-size: 14px; }
.local-note p { font-size: 13px; }
.role-badge { padding: 4px 10px; font-size: 11px; }
.backup-link { min-height: 44px; font-size: 13px; }
.sidebar-version { font-size: 10px; letter-spacing: 1px; }

.main-area { margin-left: 268px; }
.topbar {
  height: 78px;
  padding-inline: clamp(26px, 4vw, 58px);
  border-bottom-color: #e6ebe4;
  background: #ffffffed;
  box-shadow: 0 3px 18px #24372d08;
  backdrop-filter: blur(14px);
}
.breadcrumb { gap: 12px; font-size: 14px; }
.topbar-right { gap: 15px; }
.local-status { font-size: 13px; }
.local-status span { width: 8px; height: 8px; }
.avatar {
  width: 42px;
  height: 42px;
  border: 2px solid #dec984;
  background: linear-gradient(145deg, #f6f0dc, #e8ddba);
  color: #715a28;
  font-size: 16px;
}
.page-content {
  width: 100%;
  max-width: 1540px;
  padding: 46px clamp(26px, 4vw, 58px) 64px;
}
.page-heading { margin-bottom: 32px; }
.eyebrow { margin-bottom: 10px; color: #9a7637; font-size: 12px; letter-spacing: 1.7px; }
h1 { margin-bottom: 9px; color: #183e30; font-size: clamp(32px, 3vw, 40px); letter-spacing: -.65px; }
.page-subtitle { max-width: 720px; color: #68766d; font-size: 16px; line-height: 1.65; }

.btn {
  min-height: 48px;
  border-radius: 11px;
  padding-inline: 19px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 3px 10px #173d320d;
}
.btn-primary {
  border-color: #174536;
  background: linear-gradient(135deg, #205842, #153f30);
  box-shadow: 0 7px 16px #17453625;
}
.btn-primary:hover { transform: translateY(-1px); background: linear-gradient(135deg, #286b4f, #174536); box-shadow: 0 10px 22px #17453630; }
.btn-secondary { border-color: #dfe6dd; background: linear-gradient(180deg, #fff, #fafbf8); color: #43564a; }
.btn-secondary:hover { border-color: #a9bfad; background: #f5f9f4; }
.btn-danger { border-color: #efd4ce; background: #fff5f2; }
.btn-small { min-height: 39px; padding-inline: 13px; font-size: 13px; }

.stats-grid { gap: 18px; margin-bottom: 32px; }
.stat-card {
  min-height: 142px;
  border: 1px solid #e0e8de;
  border-radius: 17px;
  background: linear-gradient(145deg, #fff 0%, #fcfdfb 100%);
  padding: 22px 22px 19px;
  box-shadow: var(--surface-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px #173d3217; }
.stat-card:nth-child(1) { border-top: 3px solid #4d8b68; }
.stat-card:nth-child(2) { border-top: 3px solid #c4a354; }
.stat-card:nth-child(3) { border-top: 3px solid #6986a2; }
.stat-card:nth-child(4) { border-top: 3px solid #b97872; }
.stat-card::after { right: -15px; bottom: -43px; width: 115px; height: 115px; background: #f1f4e9; }
.stat-top { color: #68766d; font-size: 14px; font-weight: 600; }
.stat-icon { width: 39px; height: 39px; border: 1px solid #dbe8dd; border-radius: 12px; font-size: 20px; }
.stat-value { margin-top: 12px; color: #1e4735; font-size: 34px; }

.section-card {
  overflow: hidden;
  border: 1px solid #dfe7dc;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--surface-shadow);
}
.section-header { padding: 22px 26px; border-bottom-color: #e9eee7; }
.section-header h2 { color: #234432; font-size: 21px; }
.text-link { padding: 8px; color: #376d4e; font-size: 14px; }
.text-link:hover { color: #173d32; text-decoration: underline; }
.song-list { padding-inline: 26px; }
.song-row { gap: 16px; padding: 18px 0; border-bottom-color: #edf0eb; }
.song-art {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
  border: 1px solid #eadfbf;
  border-radius: 14px;
  background: linear-gradient(145deg, #fbf6e8, #f0e8d1);
  color: #9b7a35;
  font-size: 21px;
}
.song-title { font-size: 15px; }
.song-meta { margin-top: 5px; color: #738077; font-size: 13px; }
.song-actions { gap: 6px; }
.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid #e5ebe3;
  border-radius: 11px;
  background: #fff;
  color: #617268;
  font-size: 18px;
  transition: .18s ease;
}
.icon-button:hover { border-color: #c5d6c7; background: #f0f6f0; color: #24573b; }
.icon-button.favorite { color: #a65f56; }

.library-toolbar { gap: 12px; padding: 20px 24px; border-bottom-color: #e8eee6; background: linear-gradient(180deg, #fff, #fcfdfb); }
.search-wrap { flex-basis: 320px; }
.search-wrap span { top: 11px; left: 14px; font-size: 20px; }
.search-wrap .search-icon { top: 12px; left: 14px; width: 20px; height: 20px; }
.field, .select-field, .textarea-field { border-color: #dfe6de; border-radius: 11px; background-color: #fff; font-size: 15px; }
.field, .select-field { height: 48px; padding-inline: 14px; }
.search-wrap .field { padding-left: 43px; }
.field::placeholder, .textarea-field::placeholder { color: #97a199; }
.field:focus, .select-field:focus, .textarea-field:focus { border-color: #6d9a78; box-shadow: 0 0 0 4px #e6f0e7; }
.select-field { min-width: 180px; color: #45554a; }
.table-wrap { padding: 0 8px 8px; }
.song-table th { padding: 15px 18px; background: #f4f7f2; color: #65746a; font-size: 11px; letter-spacing: .9px; }
.song-table td { padding: 16px 18px; border-top-color: #edf0eb; color: #58675d; font-size: 14px; }
.song-table tr:hover td { background: #fbfcf9; }
.table-title { color: #244b37; font-size: 15px; }
.table-title:hover { color: #497d54; text-decoration: underline; }
.pill { border: 1px solid #d8e6d9; background: #edf5ed; padding: 6px 11px; color: #3f6b49; font-size: 12px; font-weight: 600; }
.file-indicators span { border: 1px solid #e8e9df; border-radius: 7px; background: #f8f7ef; padding: 5px 8px; color: #76643a; font-size: 11px; font-weight: 600; }
.row-action { gap: 5px; }

.category-grid { gap: 18px; }
.category-card {
  min-height: 155px;
  border: 1px solid #dfe7dc;
  border-radius: 17px;
  background: linear-gradient(145deg, #fff, #fbfcf8);
  padding: 22px;
  box-shadow: var(--surface-shadow);
}
.category-card:nth-child(3n + 1) { border-bottom: 3px solid #79a482; }
.category-card:nth-child(3n + 2) { border-bottom: 3px solid #d0b66e; }
.category-card:nth-child(3n) { border-bottom: 3px solid #91a8b7; }
.category-card:hover { transform: translateY(-4px); border-color: #b9cfbb; box-shadow: 0 17px 35px #193b2a16; }
.category-card::after { top: -24px; right: -17px; width: 105px; height: 105px; background: linear-gradient(145deg, #f7f3e7, #edf3e9); }
.category-symbol { font-size: 23px; }
.category-name { margin-top: 16px; color: #284432; font-size: 16px; }
.category-total { color: #718076; font-size: 13px; }
.category-section-heading { margin: 30px 0 15px; color: #284432; font: 600 20px "Playfair Display", serif; }
.song-category-pills { display: flex; flex-wrap: wrap; gap: 5px; min-width: 170px; }
.song-category-pills .pill { white-space: normal; }
.category-fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
.category-fieldset legend { margin-bottom: 7px; color: #58645c; font-size: 12px; font-weight: 700; }
.category-fieldset legend span { color: #b15347; }
.category-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 250px; overflow-y: auto; border: 1px solid #dfe6de; border-radius: 11px; background: #fbfcfa; padding: 10px; }
.category-choice { display: flex; min-height: 39px; align-items: center; gap: 9px; border: 1px solid #e7ece5; border-radius: 9px; background: #fff; padding: 8px 10px; color: #45554a; cursor: pointer; }
.category-choice input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: #356b4c; }
.category-choice span { font-size: 12px; line-height: 1.35; }
.category-choice input:checked + span { color: #24573b; font-weight: 700; }
.detail-mass-moment { margin: 9px 0 0; color: #718076; font-size: 12px; }
.empty-state { padding: 58px 24px; }
.empty-icon { width: 60px; height: 60px; border: 1px solid #dce8dc; border-radius: 18px; font-size: 27px; }
.empty-state h3 { font-size: 21px; }
.empty-state p { max-width: 440px; color: #707d73; font-size: 14px; }

.welcome-panel {
  position: relative;
  min-height: 205px;
  margin-bottom: 28px;
  border: 1px solid #c7ae6570;
  border-radius: 20px;
  background:
    radial-gradient(circle at 84% 50%, #ffffff12 0 8rem, transparent 8.1rem),
    linear-gradient(115deg, #174536, #286044 67%, #356b4c);
  padding: 34px 38px;
  box-shadow: 0 16px 38px #173d3225;
}
.welcome-panel h2 { margin-bottom: 9px; font-size: 30px; }
.welcome-panel p { max-width: 560px; color: #e0ebe2; font-size: 15px; line-height: 1.7; }
.welcome-motif { padding-right: 32px; color: #e1c779; font-size: 100px; text-shadow: 0 5px 24px #081f1840; }

.notice {
  margin-bottom: 22px;
  border: 1px solid #e3cc8b;
  border-left: 5px solid #bf9d4e;
  border-radius: 14px;
  background: linear-gradient(110deg, #fff9e8, #fffdf6);
  padding: 17px 20px;
  box-shadow: 0 8px 22px #7f641315;
}
.notice strong { color: #574514; font-size: 14px; }
.notice p { color: #796837; font-size: 13px; }

.modal-backdrop { background: #0d251bd1; backdrop-filter: blur(5px); }
.modal {
  width: min(680px, 100%);
  border: 1px solid #e2e8df;
  border-radius: 20px;
  box-shadow: 0 30px 100px #07191066;
}
.modal-head { padding: 25px 28px 20px; border-bottom-color: #e8eee6; }
.modal-head h2 { color: #1d4532; font-size: 24px; }
.modal-head p { color: #68766d; font-size: 14px; }
.modal-body { padding: 24px 28px 28px; }
.form-grid { gap: 19px; }
.form-field { gap: 9px; }
.form-field label { color: #405449; font-size: 14px; font-weight: 700; }
.textarea-field { min-height: 150px; padding: 13px 14px; line-height: 1.65; }
.file-input { border-color: #cbd9cc; border-radius: 11px; background: #f9fbf8; padding: 13px; color: #58685e; font-size: 13px; }
.field-hint { margin-top: 0; color: #737f76; font-size: 12px; line-height: 1.5; }
.modal-actions { gap: 11px; margin-top: 25px; }
.lyrics { border: 1px solid #e6ece4; border-radius: 13px; background: #f8faf6; padding: 21px; color: #45574a; font-size: 15px; line-height: 1.9; }
.detail-meta { gap: 12px 22px; color: #637268; font-size: 14px; }
.detail-files { gap: 10px; }

.toast-region { right: 26px; bottom: 26px; gap: 10px; }
.toast { max-width: min(440px, calc(100vw - 40px)); border: 1px solid #ffffff30; border-radius: 13px; background: #1b4935; padding: 15px 19px; font-size: 14px; box-shadow: 0 12px 35px #11291e35; }
.toast.error { background: #8c3c34; }

.site-footer { background: linear-gradient(115deg, #123a2d, #1b503a); }
.footer-inner { padding-top: 30px; padding-bottom: 20px; }
.footer-main { padding-bottom: 25px; }
.footer-emblem { width: 50px; height: 50px; flex-basis: 50px; border-radius: 15px; font-size: 26px; }
.footer-kicker { font-size: 10px; letter-spacing: 1.3px; }
.footer-parish-copy strong { font-size: 20px; }
.footer-location { font-size: 13px; }
.footer-credit-label { font-size: 12px; }
.footer-credit strong { font-size: 15px; }
.footer-credit a { font-size: 13px; }
.footer-bottom { padding-top: 15px; font-size: 12px; }

.auth-screen {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 16% 12%, #d3b66b38 0, transparent 28rem),
    radial-gradient(ellipse at 90% 90%, #7fa18a30 0, transparent 32rem),
    linear-gradient(135deg, rgb(13 48 37 / 72%), rgb(25 78 53 / 68%) 62%, rgb(18 60 43 / 76%)),
    url("../images/chorale.jpg") center 48% / cover no-repeat;
  background-color: #10382c;
}
.auth-screen::before, .auth-screen::after {
  position: absolute;
  width: 310px;
  height: 310px;
  border: 1px solid #e2ca7e2b;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.auth-screen::before { top: -145px; right: -100px; box-shadow: 0 0 0 28px #ffffff08, 0 0 0 58px #ffffff06; }
.auth-screen::after { bottom: -190px; left: -100px; box-shadow: 0 0 0 28px #ffffff08, 0 0 0 58px #ffffff06; }
.auth-card {
  position: relative;
  z-index: 1;
  width: min(500px, 100%);
  border: 1px solid #e6d79d;
  border-radius: 24px;
  background: linear-gradient(150deg, #fff, #fcfdf9);
  padding: 38px 40px 28px;
  box-shadow: 0 30px 100px #071c1466, 0 0 0 8px #ffffff0c;
}
.auth-logo {
  width: 112px;
  height: 112px;
  margin-bottom: 22px;
  border: 3px solid #d6c17c;
  box-shadow: 0 8px 24px #173d321c;
}
.auth-card .eyebrow { margin-bottom: 12px; }
.auth-card h1 { margin-bottom: 10px; font-size: 31px; }
.auth-card .page-subtitle { margin-bottom: 25px; color: #69766d; font-size: 15px; }
.auth-tabs { gap: 5px; margin-bottom: 22px; border: 1px solid #e6ebe3; border-radius: 12px; background: #f1f4ef; padding: 5px; }
.auth-tab { min-height: 46px; border-radius: 9px; color: #59675e; font-size: 14px; }
.auth-tab.active { color: #1c4a35; box-shadow: 0 2px 8px #173d321a; }
#auth-form { gap: 17px; }
.auth-card .form-field { gap: 8px; }
.auth-card .form-field label { color: #405449; font-size: 14px; }
.auth-card .field { height: 52px; padding-inline: 15px; font-size: 15px; }
.auth-submit { min-height: 52px; margin-top: 3px; font-size: 15px; }
.auth-forgot { color: #426f50; font-size: 14px; }
.auth-message { border: 1px solid #dceade; border-radius: 10px; padding: 12px 14px; font-size: 13px; }
.auth-footnote { margin-top: 22px; color: #78847a; font-size: 12px; }
.auth-footnote a { color: #315f41; }

@media (max-width: 1050px) {
  .sidebar { width: 238px; }
  .main-area { margin-left: 238px; }
  .topbar { padding-inline: 30px; }
  .page-content { padding-inline: 30px; }
  .stats-grid { gap: 14px; }
}

@media (max-width: 760px) {
  .sidebar { width: min(300px, 86vw); }
  .main-area { margin-left: 0; }
  .topbar { height: 68px; gap: 12px; padding-inline: 16px; }
  .mobile-menu { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #e0e9df; border-radius: 12px; background: #fff; font-size: 22px; }
  .breadcrumb { gap: 8px; font-size: 13px; }
  .topbar-right { gap: 9px; }
  .avatar { width: 39px; height: 39px; }
  .page-content { padding: 31px 20px calc(112px + env(safe-area-inset-bottom)); }
  .page-heading { gap: 17px; margin-bottom: 25px; }
  h1 { font-size: 32px; }
  .page-subtitle { font-size: 15px; }
  .stats-grid { gap: 12px; margin-bottom: 24px; }
  .stat-card { min-height: 128px; padding: 17px; }
  .stat-top { font-size: 14px; }
  .stat-value { font-size: 30px; }
  .welcome-panel { min-height: 175px; padding: 26px; }
  .welcome-panel h2 { font-size: 25px; }
  .welcome-panel p { font-size: 14px; }
  .welcome-motif { font-size: 74px; }
  .category-grid { gap: 12px; }
  .category-card { min-height: 142px; padding: 17px; }
  .category-name { font-size: 15px; }
  .mobile-action-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 15;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 9px;
    border-top: 1px solid #e1e9df;
    background: #fffffff2;
    padding: 11px 15px calc(11px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 28px #173d3210;
    backdrop-filter: blur(14px);
  }
  .mobile-action-bar .btn { min-height: 49px; }
  .footer-inner { padding: 25px 20px calc(112px + env(safe-area-inset-bottom)); }
  .footer-main { gap: 19px; }
  .footer-bottom { gap: 7px; }
  .modal-backdrop { align-items: end; padding: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .modal { width: 100%; max-height: calc(100dvh - 16px); border-radius: 20px 20px 12px 12px; }
  .modal-head { position: sticky; top: 0; z-index: 1; background: #fff; }
  .modal-actions { position: sticky; bottom: -28px; margin: 25px -20px -28px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fffffff2; }
  .toast-region { right: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); left: 12px; }
}

@media (max-width: 480px) {
  .page-content { padding-right: 15px; padding-left: 15px; }
  .breadcrumb { font-size: 12px; }
  .topbar { gap: 9px; }
  .mobile-menu { flex: 0 0 40px; width: 40px; height: 40px; }
  .avatar { width: 36px; height: 36px; font-size: 13px; }
  .topbar-profile { gap: 7px; }
  .topbar-profile-copy > strong { max-width: 105px; font-size: 11px; }
  .topbar-profile-detail { gap: 4px; }
  .topbar-profile-detail .local-status { display: none; }
  .topbar-profile-voice { max-width: 96px; font-size: 10px; }
  h1 { font-size: 29px; }
  .eyebrow { font-size: 11px; letter-spacing: 1.25px; }
  .page-subtitle { font-size: 14px; }
  .page-heading .btn { width: 100%; }
  .stats-grid { gap: 10px; }
  .stat-card { min-height: 118px; padding: 14px; }
  .stat-top { gap: 6px; font-size: 12px; }
  .stat-icon { width: 32px; height: 32px; flex: 0 0 32px; font-size: 17px; }
  .stat-value { font-size: 28px; }
  .welcome-panel { min-height: 0; padding: 23px 20px; }
  .welcome-panel h2 { font-size: 23px; }
  .welcome-panel p { font-size: 13px; }
  .welcome-motif { display: none; }
  .section-header { align-items: flex-start; flex-direction: column; gap: 8px; padding: 18px; }
  .section-header h2 { font-size: 19px; }
  .song-list { padding-inline: 17px; }
  .song-row { gap: 12px; padding: 15px 0; }
  .song-art { width: 44px; height: 44px; flex-basis: 44px; }
  .song-title { font-size: 14px; }
  .song-meta { font-size: 12px; }
  .song-actions { gap: 3px; }
  .song-actions .btn-small { display: none; }
  .library-toolbar { gap: 9px; padding: 14px; }
  .search-wrap { flex-basis: 100%; }
  .select-field { min-width: 0; flex: 1 1 140px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .category-card { min-height: 135px; padding: 15px; }
  .category-name { font-size: 14px; }
  .category-total { font-size: 12px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .song-table { min-width: 790px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .modal-head, .modal-body { padding-inline: 20px; }
  .modal-head h2 { font-size: 21px; }
  .modal-actions .btn { flex: 1; padding-inline: 10px; }
  .notice { align-items: flex-start; flex-direction: column; }
  .mobile-action-bar { gap: 7px; padding-inline: 10px; }
  .mobile-action-bar .btn { gap: 5px; padding-inline: 7px; font-size: 12px; }
  .auth-screen { padding: 18px 14px; }
  .auth-card { border-radius: 20px; padding: 29px 22px 23px; }
  .auth-logo { width: 96px; height: 96px; }
  .auth-card h1 { font-size: 27px; }
  .auth-card .page-subtitle { font-size: 14px; }
  .footer-inner { padding-right: 15px; padding-left: 15px; }
  .footer-parish { gap: 12px; }
  .footer-parish-copy strong { font-size: 18px; }
}

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

.public-presentation { min-height: 100vh; background: #f7f8f5; }
.presentation-header { display: flex; max-width: 1320px; min-height: 88px; align-items: center; justify-content: space-between; gap: 20px; margin: 0 auto; padding: 14px 38px; }
.presentation-brand { display: inline-flex; align-items: center; gap: 13px; color: #203b2d; text-decoration: none; }
.presentation-brand img { width: 54px; height: 54px; border: 2px solid #d7c27c; border-radius: 50%; background: #fff; object-fit: cover; }
.presentation-brand span { display: grid; gap: 4px; }
.presentation-brand strong { font: 600 17px "Playfair Display", serif; }
.presentation-brand small { color: #718076; font-size: 12px; }
.presentation-login-link { min-height: 44px; border-radius: 10px; font-size: 14px; text-decoration: none; }
.presentation-main { max-width: 1320px; margin: 0 auto; padding: 10px 38px 60px; }
.presentation-hero { position: relative; display: flex; min-height: 430px; align-items: center; overflow: hidden; border: 1px solid #d4c27f; border-radius: 27px; background: linear-gradient(90deg, #12362feF 0%, #174638df 48%, #173e32b0 100%), url("../images/chorale.jpg") center 44% / cover; padding: 58px clamp(28px, 7vw, 90px); color: #fff; box-shadow: 0 24px 60px #183c2c1c; }
.presentation-hero-copy { position: relative; z-index: 1; max-width: 690px; }
.presentation-hero .eyebrow { color: #e0c878; }
.presentation-hero h1 { max-width: 650px; margin-bottom: 17px; color: #fff; font-size: clamp(38px, 5vw, 64px); line-height: 1.08; }
.presentation-hero-copy > p:not(.eyebrow) { max-width: 590px; margin-bottom: 27px; color: #e0e9e2; font-size: 17px; line-height: 1.8; }
.btn-gold { border-color: #dfc779; background: #dfc779; color: #263c2d; text-decoration: none; }
.btn-gold:hover { border-color: #f0d98f; background: #f0d98f; }
.presentation-hero-mark { position: absolute; right: 8%; bottom: -66px; color: #dfc77924; font: 300 330px "Playfair Display", serif; line-height: 1; }
.presentation-intro { max-width: 750px; margin: 68px auto 55px; text-align: center; }
.presentation-intro h2, .presentation-section-heading h2 { margin-bottom: 12px; color: #203b2d; font: 600 clamp(26px, 3vw, 36px) "Playfair Display", serif; }
.presentation-intro > p:last-child { margin: 0; color: #6e7c71; font-size: 16px; line-height: 1.8; }
.presentation-team { border: 1px solid #e0e7dc; border-radius: 23px; background: linear-gradient(145deg, #fff, #fbfcf8); padding: clamp(22px, 4vw, 42px); box-shadow: 0 18px 55px #193b2a0d; }
.presentation-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 25px; }
.presentation-section-heading .eyebrow { margin-bottom: 7px; }
.presentation-section-heading h2 { margin-bottom: 0; }
.presentation-team-note { border: 1px solid #e8dfbf; border-radius: 30px; background: #fbf7e9; padding: 9px 14px; color: #77633a; font-size: 12px; font-weight: 600; }
.presentation-president, .presentation-leader { display: flex; align-items: center; gap: 16px; border: 1px solid #e5ebe2; border-radius: 16px; background: #fff; padding: 17px 19px; }
.presentation-president { min-height: 105px; border-color: #e6d9ae; background: linear-gradient(110deg, #fffdf6, #fff); }
.presentation-person-mark { display: grid; width: 55px; height: 55px; flex: 0 0 55px; place-items: center; border: 1px solid #d8c480; border-radius: 17px; background: linear-gradient(145deg, #f9f4e4, #efe8cf); color: #786130; font: 600 17px "Playfair Display", serif; }
.presentation-role { display: block; margin-bottom: 5px; color: #8a7440; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.presentation-president h3, .presentation-leader h3 { margin: 0; color: #294332; font: 600 19px "Playfair Display", serif; }
.presentation-note { margin-left: auto; color: #78857a; font-size: 13px; }
.presentation-leaders-title { margin: 30px 0 14px; color: #405448; font-size: 14px; }
.presentation-leaders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.presentation-leader { min-height: 92px; padding: 13px; }
.presentation-leader .presentation-person-mark { width: 47px; height: 47px; flex-basis: 47px; border-radius: 14px; font-size: 14px; }
.presentation-leader .presentation-role { font-size: 9px; letter-spacing: .55px; }
.presentation-leader h3 { font-size: 15px; line-height: 1.35; }
.presentation-footer { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid #e7ebe5; padding: 22px max(38px, calc((100vw - 1244px) / 2)); color: #748076; font-size: 12px; }

@media (max-width: 760px) {
  .presentation-header { min-height: 76px; padding: 12px 20px; }
  .presentation-main { padding: 8px 20px 40px; }
  .presentation-hero { min-height: 390px; border-radius: 21px; padding: 38px 28px; }
  .presentation-hero-copy > p:not(.eyebrow) { font-size: 15px; }
  .presentation-hero-mark { right: -20px; bottom: -49px; font-size: 250px; }
  .presentation-intro { margin: 50px auto 40px; }
  .presentation-leaders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .presentation-footer { padding: 20px; }
}

@media (max-width: 480px) {
  .presentation-header { align-items: flex-start; gap: 12px; padding: 14px; }
  .presentation-brand { gap: 9px; }
  .presentation-brand img { width: 44px; height: 44px; }
  .presentation-brand strong { font-size: 14px; }
  .presentation-brand small { font-size: 10px; }
  .presentation-login-link { min-height: 40px; gap: 5px; padding: 0 10px; font-size: 11px; white-space: nowrap; }
  .presentation-main { padding: 5px 14px 30px; }
  .presentation-hero { min-height: 400px; align-items: flex-end; padding: 30px 22px; }
  .presentation-hero h1 { font-size: 39px; }
  .presentation-hero-copy > p:not(.eyebrow) { font-size: 14px; line-height: 1.7; }
  .presentation-hero-mark { right: -30px; top: -44px; bottom: auto; font-size: 190px; }
  .presentation-intro { margin: 40px auto 32px; }
  .presentation-intro h2 { font-size: 27px; }
  .presentation-intro > p:last-child { font-size: 14px; }
  .presentation-team { border-radius: 18px; padding: 19px 15px; }
  .presentation-section-heading { align-items: flex-start; flex-direction: column; }
  .presentation-team-note { font-size: 11px; }
  .presentation-president { align-items: flex-start; flex-wrap: wrap; gap: 12px; padding: 14px; }
  .presentation-president .presentation-note { width: 100%; margin-left: 67px; }
  .presentation-president h3 { font-size: 17px; }
  .presentation-leaders { grid-template-columns: 1fr; gap: 9px; }
  .presentation-leader { min-height: 80px; }
  .presentation-footer { flex-direction: column; gap: 6px; padding: 17px 20px; font-size: 11px; }
}

/* Navigation and vocal-part controls */
.sidebar {
  width: 280px;
  padding: 25px 19px 18px;
  background:
    radial-gradient(ellipse at 50% -10%, #d5bd7830, transparent 26rem),
    linear-gradient(165deg, #1b503c, #103629 76%);
  box-shadow: 14px 0 42px #0d2a1d17;
}
.brand { gap: 9px; padding-bottom: 25px; }
.brand-logo { width: 104px; height: 104px; }
.brand-identity { gap: 5px; }
.brand-name { font-size: 18px; }
.sidebar-label {
  margin: 0 5px 13px;
  border-bottom: 1px solid #ffffff22;
  padding: 0 8px 12px;
  color: #c5d6c9;
  font-size: 11px;
  letter-spacing: 1.65px;
}
.nav-list { gap: 6px; }
.nav-link {
  position: relative;
  min-height: 51px;
  gap: 11px;
  border-radius: 13px;
  padding: 8px 11px;
  color: #d8e5dc;
  font-size: 14px;
  font-weight: 600;
}
.nav-link:not(.backup-link) .nav-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border: 1px solid #ffffff13;
  border-radius: 11px;
  background: #ffffff0b;
  color: #ddc67f;
  font-size: 19px;
}
.nav-link:hover { border-color: #ffffff20; background: #ffffff12; }
.nav-link.active {
  border-color: #dec77d66;
  background: linear-gradient(110deg, #ffffff20, #ffffff0b);
  box-shadow: inset 3px 0 #e4cb7b, 0 7px 20px #09261b27;
  color: #fff;
}
.nav-link.active .nav-icon { border-color: #d9c17455; background: #e5ca7521; color: #f2d982; }
.nav-count { border: 1px solid #ffffff1c; background: #ffffff16; font-size: 12px; }
.sidebar-bottom { border-top: 1px solid #ffffff20; padding-top: 12px; }
.local-note { margin-top: 5px; }
.backup-link { min-height: 43px; border-radius: 11px; color: #d1ded5; }
.backup-link .nav-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border: 1px solid #ffffff13;
  border-radius: 11px;
  background: #ffffff0b;
  color: #ddc67f;
}
.backup-link .nav-icon svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.backup-link:hover { background: #ffffff12; color: #fff; }
.sidebar-version { margin-bottom: 0; color: #a8bdb0; }
.main-area { margin-left: 280px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 76px;
  border-bottom: 1px solid #dfe8de;
  background: #ffffffed;
  box-shadow: 0 7px 24px #173d320a;
  backdrop-filter: blur(16px);
}
.breadcrumb > span:first-child {
  border: 1px solid #e4eade;
  border-radius: 9px;
  background: #f5f8f2;
  padding: 5px 10px;
  color: #47634f;
  font-weight: 600;
}
.breadcrumb strong {
  border-radius: 9px;
  background: #edf4eb;
  padding: 6px 11px;
  color: #234c35;
  font-weight: 700;
}
.local-status {
  border: 1px solid #dfe9df;
  border-radius: 30px;
  background: #f8faf6;
  padding: 5px 10px;
  color: #48624f;
  font-size: 11px;
}
.local-status span { box-shadow: 0 0 0 4px #4f9a691c; }
.topbar-profile { display: flex; min-width: 0; align-items: center; gap: 11px; }
.topbar-profile-copy { display: grid; min-width: 0; justify-items: end; gap: 5px; }
.topbar-profile-copy > strong { max-width: 190px; overflow: hidden; color: #294334; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.topbar-profile-detail { display: flex; align-items: center; gap: 7px; }
.topbar-profile-voice { max-width: 105px; overflow: hidden; color: #778178; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  box-shadow: 0 3px 12px #8b73351c;
  letter-spacing: .04em;
}
.avatar.admin { border-color: #b99a56; background: linear-gradient(145deg, #efe4bf, #d9c17f); color: #503f1c; }
.mobile-menu {
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #dce6db;
  border-radius: 13px;
  background: linear-gradient(145deg, #fff, #f5f8f2);
  box-shadow: 0 3px 10px #173d320d;
}
.mobile-menu:hover { border-color: #b5cbb7; background: #edf4eb; }
.mobile-action-bar .btn.active {
  border-color: #b9cfba;
  background: #eaf2e8;
  color: #1d5136;
  box-shadow: inset 0 0 0 1px #d2e2d1;
}

.common-files, .voice-files { gap: 12px; }
.common-files .voice-file-inputs { grid-template-columns: 1fr; }
.common-files h3, .voice-files h3 {
  margin: 0 0 4px;
  color: #284a36;
  font: 600 17px "Playfair Display", serif;
}
.voice-file-inputs { display: grid; grid-template-columns: 1fr; gap: 13px; }
.common-files .voice-file-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.voice-files-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.voice-file-card {
  min-width: 0;
  margin: 0;
  border: 1px solid #dce7dc;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f8faf6);
  padding: 14px;
  box-shadow: 0 5px 16px #173d3209;
}
.voice-file-card legend {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e8ddbc;
  border-radius: 30px;
  background: #fbf6e7;
  padding: 5px 11px;
  color: #715b2d;
  font-size: 14px;
  font-weight: 700;
}
.voice-file-card legend span { color: #98783b; }
.voice-file-card .form-field { min-width: 0; }
.voice-file-card .file-input { padding: 10px; }
.voice-file-card .field-hint { overflow-wrap: anywhere; }

.detail-files { display: grid; gap: 13px; margin: 19px 0; }
.voice-media-card {
  min-width: 0;
  border: 1px solid #dfe8dc;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #fafbf8);
  padding: 16px;
}
.voice-media-card > h3 {
  margin: 0 0 12px;
  color: #284b36;
  font: 600 18px "Playfair Display", serif;
}
.voice-media-item { display: grid; gap: 10px; padding-top: 11px; }
.voice-media-item + .voice-media-item { margin-top: 12px; border-top: 1px solid #e9eee6; }
.voice-media-name { overflow-wrap: anywhere; color: #54665a; font-size: 14px; font-weight: 600; }
.voice-media-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.voice-media-item audio { width: 100%; min-height: 42px; }
.detail-lyrics-heading { margin: 22px 0 10px; color: #294934; font: 600 19px "Playfair Display", serif; }

@media (max-width: 1050px) {
  .sidebar { width: 244px; }
  .main-area { margin-left: 244px; }
}

@media (max-width: 760px) {
  .sidebar {
    width: min(310px, 88vw);
    border-right: 1px solid #d6c47f48;
    box-shadow: 22px 0 70px #091e1660;
  }
  .main-area { margin-left: 0; }
  .topbar { height: 68px; }
  .breadcrumb > span:first-child { display: none; }
  .breadcrumb .crumb-separator { display: none; }
  .breadcrumb strong { background: transparent; padding: 0; color: #244b37; }
  .mobile-action-bar .btn.active { border-color: #c5d6c4; }
}

@media (max-width: 480px) {
  .common-files .voice-file-inputs, .voice-files-grid { grid-template-columns: 1fr; }
  .voice-file-card { padding: 12px; }
  .voice-media-card { padding: 13px; }
  .voice-media-actions .btn { flex: 1 1 auto; }
  .category-choice-grid { grid-template-columns: 1fr; }
}

.program-search-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
  border: 1px solid #dfe8dc;
  border-radius: 16px;
  background: #ffffffdf;
  padding: 17px 20px;
  box-shadow: var(--surface-shadow);
}
.program-search-card .search-wrap { flex: 1 1 320px; }
.program-search-card .field { background: #fff; }
.program-count, .program-section-count, .program-step-count {
  flex: 0 0 auto;
  border: 1px solid #e7ddb9;
  border-radius: 30px;
  background: #fbf7e9;
  padding: 7px 13px;
  color: #705b2e;
  font-size: 13px;
  font-weight: 700;
}
.program-section { margin: 0 0 36px; }
.program-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 17px;
}
.program-section-heading .eyebrow { margin-bottom: 3px; }
.program-section-heading h2 { margin: 0; color: #244b37; font: 600 25px "Playfair Display", serif; }
.mass-program-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.mass-program-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #dce7dc;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff 0%, #fbfcf8 100%);
  padding: 22px;
  box-shadow: var(--surface-shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mass-program-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(#c9ad5d, #548a62);
  content: "";
}
.mass-program-card:hover { transform: translateY(-3px); border-color: #c7d8c6; box-shadow: 0 18px 38px #173d3218; }
.mass-program-date { display: flex; align-items: center; gap: 12px; }
.mass-program-date > span { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #e7ddb9; border-radius: 13px; background: #faf6e7; color: #9b7b37; font-size: 20px; }
.mass-program-date div { display: grid; gap: 2px; }
.mass-program-date strong { color: #47614d; font-size: 13px; font-weight: 700; text-transform: capitalize; }
.mass-program-date div span { color: #8a7950; font-size: 12px; }
.mass-program-card > h3 { margin: 17px 0 5px; color: #244632; font: 600 22px "Playfair Display", serif; }
.mass-program-meta { margin: 0; color: #68776d; font-size: 14px; }
.mass-program-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mass-program-summary span { border: 1px solid #e3ebe1; border-radius: 30px; background: #f5f8f3; padding: 5px 10px; color: #526659; font-size: 12px; font-weight: 600; }
.mass-program-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 18px; border-top: 1px solid #edf0ea; padding-top: 13px; }
.program-editor { max-width: 850px; }
.program-editor-steps { display: grid; gap: 11px; margin-top: 30px; }
.program-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.program-editor-heading h3 { margin: 0 0 5px; color: #274a35; font: 600 23px "Playfair Display", serif; }
.program-editor-heading .field-hint { margin: 0; }
.program-step-card { border: 1px solid #e0e8dd; border-radius: 14px; background: linear-gradient(145deg, #fff, #fafbf8); padding: 13px 15px; }
.program-step-card.is-hidden { background: #f3f5f1; }
.program-step-toggle { display: flex; align-items: center; gap: 11px; color: #314a39; font-size: 14px; font-weight: 700; cursor: pointer; }
.program-step-toggle input { width: 18px; height: 18px; accent-color: #285a3c; }
.program-step-number { display: grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; border: 1px solid #e4d9b5; border-radius: 9px; background: #faf6e8; color: #8a7137; font-size: 13px; }
.program-step-content { display: grid; gap: 10px; margin: 12px 0 2px 39px; }
.choose-program-song { justify-self: start; border-style: dashed; }
.program-selected-song { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border: 1px solid #dce9dc; border-radius: 12px; background: #f4f8f2; padding: 10px; }
.program-selected-icon, .program-song-option-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 10px; background: #e8f0e6; color: #3b7048; font-size: 18px; }
.program-selected-copy { display: grid; min-width: 120px; flex: 1 1 120px; gap: 3px; }
.program-selected-copy strong { overflow: hidden; color: #2b4935; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.program-selected-copy > span { overflow: hidden; color: #718076; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.replace-program-song { justify-self: start; padding: 2px 4px; }
.program-note-field > span { color: #56685b; font-size: 13px; font-weight: 600; }
.program-note-field .textarea-field { min-height: 68px; font-size: 14px; }
.optional-label { color: #879188; font-size: 12px; font-weight: 400; }
.program-hidden-note { margin: 9px 0 0 40px; color: #7d887f; font-size: 13px; }
.program-picker .search-wrap { display: block; margin-bottom: 17px; }
.program-song-options { display: grid; gap: 9px; max-height: min(55vh, 480px); overflow: auto; }
.program-song-option { display: flex; align-items: flex-start; gap: 11px; border: 1px solid #e1e9df; border-radius: 13px; background: #fff; padding: 12px; }
.program-song-option-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.program-song-option-copy > strong { color: #294b36; font-size: 15px; }
.program-song-option-copy > span { color: #748077; font-size: 12px; }
.program-song-option-copy p { margin: 5px 0 0; color: #66756b; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.program-song-option .btn { flex: 0 0 auto; }
.program-song-preview { display: grid; gap: 13px; }
.program-preview-author { margin: 0; color: #6b786e; font-size: 14px; }
.program-preview-lyrics h3 { margin: 0 0 8px; color: #294934; font: 600 19px "Playfair Display", serif; }
.program-preview-media { display: grid; gap: 10px; }
.program-preview-media-item { display: grid; justify-items: start; gap: 9px; border: 1px solid #dfe8dc; border-radius: 13px; background: #fafbf8; padding: 13px; }
.program-preview-media-item strong { color: #435a49; font-size: 13px; overflow-wrap: anywhere; }
.program-preview-media-item audio { width: 100%; }
.program-print-content { max-width: 740px; margin-inline: auto; }
.print-program-header { border-bottom: 2px solid #d8c27e; padding-bottom: 18px; }
.print-program-header > .eyebrow { margin-bottom: 7px; }
.print-program-header h2 { margin: 0 0 10px; color: #1d4532; font: 600 29px "Playfair Display", serif; }
.print-program-header p { margin: 5px 0; color: #53645a; font-size: 14px; }
.print-program-general-notes { margin-top: 17px; border: 1px solid #e7ddb9; border-radius: 12px; background: #fcf8eb; padding: 13px 15px; }
.print-program-general-notes h3 { margin: 0 0 5px; color: #68572f; font-size: 14px; }
.print-program-general-notes p { margin: 0; color: #665d48; font-size: 14px; white-space: pre-wrap; }
.print-program-steps { display: grid; gap: 0; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: mass-step; }
.print-program-step { display: grid; grid-template-columns: 30px minmax(150px, .8fr) minmax(0, 1.2fr); gap: 6px 12px; align-items: baseline; border-bottom: 1px solid #e9ede6; padding: 12px 3px; counter-increment: mass-step; }
.print-program-step::before { grid-row: span 2; color: #aa8d44; font-size: 13px; font-weight: 700; content: counter(mass-step, decimal-leading-zero); }
.print-program-step-name { color: #45584a; font-size: 14px; font-weight: 600; }
.print-program-song { color: #203f2d; font-size: 15px; font-weight: 700; }
.print-program-unspecified { color: #a0a8a1; }
.print-program-note { grid-column: 2 / -1; color: #748076; font-size: 13px; font-style: italic; white-space: pre-wrap; }

@media (max-width: 760px) {
  .program-search-card { align-items: stretch; flex-direction: column; gap: 10px; padding: 14px; }
  .program-count { align-self: flex-start; }
  .mass-program-grid { grid-template-columns: 1fr; gap: 12px; }
  .program-section-heading h2 { font-size: 22px; }
  .program-step-content { margin-left: 0; }
  .program-hidden-note { margin-left: 0; }
}

@media (max-width: 480px) {
  .mass-program-card { padding: 17px; }
  .mass-program-card > h3 { font-size: 20px; }
  .program-editor-heading { align-items: flex-start; }
  .program-step-card { padding: 11px; }
  .program-selected-song { gap: 7px; padding: 8px; }
  .program-selected-song > .text-link { font-size: 12px; }
  .program-song-option { flex-wrap: wrap; }
  .program-song-option .btn { margin-left: auto; }
  .print-program-step { grid-template-columns: 24px minmax(0, 1fr); }
  .print-program-step::before { grid-row: span 3; }
  .print-program-song, .print-program-note { grid-column: 2; }
}

@media (max-width: 760px) {
  .topbar { min-width: 0; justify-content: flex-start; gap: 11px; }
  .breadcrumb { min-width: 0; flex: 1 1 auto; overflow: hidden; }
  .breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-right { min-width: 0; flex: 0 0 auto; margin-left: auto; }
  .topbar-profile { min-width: 0; gap: 0; }
  .topbar-profile-copy { display: none; }
  .topbar-profile > .avatar { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 2px solid #fff; outline: 1px solid #d7c27c; border-radius: 50%; background: linear-gradient(145deg, #f7f1dd, #e9dfc2); color: #34523e; font-size: 15px; box-shadow: 0 3px 12px #173d321b; }
}

@media (max-width: 390px) {
  .topbar { gap: 8px; padding-inline: 12px; }
  .mobile-menu { width: 39px; height: 39px; }
  .topbar > .mobile-menu { flex: 0 0 39px; }
  .topbar-profile > .avatar { width: 39px; height: 39px; flex-basis: 39px; }
  .breadcrumb { font-size: 12px; }
}

@media print {
  @page { margin: 16mm; }
  body.printing-program, body.printing-program * { visibility: hidden !important; }
  body.printing-program #modal-backdrop,
  body.printing-program #modal-backdrop * { visibility: visible !important; }
  body.printing-program #modal-backdrop {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    overflow: visible !important;
    background: #fff !important;
    padding: 0 !important;
  }
  body.printing-program .modal {
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  body.printing-program .modal-head,
  body.printing-program .no-print { display: none !important; }
  body.printing-program .modal-body { padding: 0 !important; }
  body.printing-program .print-program-header,
  body.printing-program .print-program-general-notes,
  body.printing-program .print-program-step { break-inside: avoid; }
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes overlay-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-enter {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.page-content.page-transition { animation: page-enter .32s cubic-bezier(.2, .7, .25, 1) both; }
.modal-backdrop:not([hidden]) { animation: overlay-enter .2s ease-out both; }
.modal { transform-origin: center; animation: modal-enter .26s cubic-bezier(.2, .7, .25, 1) both; }
.btn, .icon-button {
  transition: transform .18s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn:active, .icon-button:active { transform: scale(.97); }
.stat-card, .voice-file-card, .program-step-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stat-card:hover, .voice-file-card:hover, .program-step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px #173d3212;
}
.song-row { transition: background-color .18s ease; }
.song-row:hover { background: #f9fbf8; }

@media (max-width: 760px) {
  body { font-size: 16px; line-height: 1.6; }
  .page-content { padding: 25px 20px calc(104px + env(safe-area-inset-bottom)); }
  .page-heading { gap: 14px; margin-bottom: 22px; }
  .page-heading h1, h1 { font-size: clamp(30px, 7vw, 36px); line-height: 1.12; }
  .eyebrow { font-size: 12px; letter-spacing: 1.2px; }
  .page-subtitle { font-size: 16px; line-height: 1.65; }
  .nav-link { font-size: 15px; }
  .local-note strong { font-size: 14px; }
  .local-note p, .sidebar-version { font-size: 12px; }
  .btn { font-size: 14px; }
  .btn-small { min-height: 38px; font-size: 13px; }
  .stat-card { min-height: 122px; padding: 16px; }
  .stat-top { font-size: 14px; line-height: 1.4; }
  .stat-icon { width: 35px; height: 35px; flex-basis: 35px; }
  .stat-value { font-size: 31px; }
  .welcome-panel { padding: 25px; }
  .welcome-panel h2 { font-size: 25px; line-height: 1.2; }
  .welcome-panel p { font-size: 15px; line-height: 1.7; }
  .section-header h2, .program-section-heading h2 { font-size: 22px; }
  .song-title, .table-title { font-size: 16px; }
  .song-meta { font-size: 14px; line-height: 1.5; }
  .search-wrap .field, .field, .select-field, .textarea-field { font-size: 16px; }
  .category-name { font-size: 15px; line-height: 1.4; }
  .category-total { font-size: 14px; }
  .category-section-heading { font-size: 22px; line-height: 1.3; }
  .empty-state h3 { font-size: 22px; }
  .empty-state p, .notice p { font-size: 15px; line-height: 1.65; }
  .notice strong { font-size: 15px; }
  .form-field label, .category-fieldset legend { font-size: 15px; }
  .field-hint, .optional-label { font-size: 13px; line-height: 1.5; }
  .category-choice { min-height: 46px; }
  .category-choice span { font-size: 14px; }
  .program-step-toggle { font-size: 15px; }
  .program-selected-copy strong, .program-song-option-copy > strong { font-size: 16px; }
  .program-selected-copy > span, .program-song-option-copy > span { font-size: 14px; }
  .program-song-option-copy p, .mass-program-meta { font-size: 15px; line-height: 1.55; }
  .mobile-action-bar .btn { font-size: 13px; }
  .footer-kicker, .footer-credit-label { font-size: 11px; }
  .footer-location, .footer-bottom { font-size: 13px; }
  .footer-credit strong { font-size: 15px; }
  .footer-credit a { font-size: 14px; }
  .presentation-header {
    position: relative;
    z-index: 2;
    min-height: 78px;
    border-bottom: 1px solid #e6eadf;
    background: #ffffffed;
    box-shadow: 0 5px 18px #173d3208;
    backdrop-filter: blur(14px);
  }
  .presentation-brand strong { font-size: 16px; }
  .presentation-brand small { font-size: 12px; }
  .presentation-login-link { min-height: 46px; font-size: 14px; }
  .presentation-main { padding: 18px 20px 42px; }
  .presentation-hero {
    min-height: 445px;
    align-items: flex-end;
    border: 1px solid #d5c37d;
    border-radius: 25px;
    background:
      radial-gradient(ellipse at 90% 15%, #e1c9782e, transparent 16rem),
      linear-gradient(180deg, #10372bc4 0%, #143e31d9 46%, #103629f5 100%),
      url("../images/chorale.jpg") center 37% / cover;
    padding: 34px clamp(24px, 7vw, 42px);
    box-shadow: 0 24px 50px #123b2c26, inset 0 0 0 5px #ffffff0c;
  }
  .presentation-hero-copy { max-width: 570px; }
  .presentation-hero .eyebrow {
    display: inline-flex;
    border: 1px solid #e4cb7b66;
    border-radius: 40px;
    background: #09281f4d;
    padding: 8px 12px;
    color: #f1d982;
    font-size: 11px;
    letter-spacing: 1px;
  }
  .presentation-hero h1 { max-width: 470px; font-size: clamp(40px, 10vw, 49px); line-height: 1.04; }
  .presentation-hero-copy > p:not(.eyebrow) { max-width: 470px; font-size: 16px; line-height: 1.7; }
  .presentation-hero .btn-gold { min-height: 50px; border-radius: 12px; padding-inline: 18px; font-size: 15px; }
  .presentation-hero-mark { right: 4px; top: 13px; bottom: auto; color: #e7d18a22; font-size: 172px; }
  .presentation-intro { max-width: 560px; margin: 45px auto 35px; border: 1px solid #e5e9dc; border-radius: 21px; background: linear-gradient(145deg, #fff, #f7f8f1); padding: 25px 22px; box-shadow: 0 12px 32px #173d320b; }
  .presentation-intro .eyebrow { margin-bottom: 10px; }
  .presentation-intro h2 { font-size: 29px; line-height: 1.2; }
  .presentation-intro > p:last-child { font-size: 16px; line-height: 1.7; }
  .presentation-team { border-radius: 23px; padding: 25px 21px; box-shadow: 0 18px 42px #173d3210; }
  .presentation-section-heading h2 { font-size: 30px; }
  .presentation-team-note { font-size: 13px; }
  .presentation-president { min-height: 112px; padding: 17px; }
  .presentation-person-mark { width: 59px; height: 59px; flex-basis: 59px; border-radius: 18px; font-size: 19px; }
  .presentation-role { font-size: 12px; }
  .presentation-president h3 { font-size: 21px; }
  .presentation-note { font-size: 14px; }
  .presentation-leaders-title { font-size: 16px; }
  .presentation-leader { min-height: 88px; border-radius: 15px; padding: 14px; }
  .presentation-leader .presentation-person-mark { width: 50px; height: 50px; flex-basis: 50px; font-size: 15px; }
  .presentation-leader .presentation-role { font-size: 11px; letter-spacing: .5px; }
  .presentation-leader h3 { font-size: 16px; line-height: 1.4; }
  .presentation-footer { font-size: 13px; }
}

@media (max-width: 480px) {
  .page-content { padding-right: 15px; padding-left: 15px; }
  .breadcrumb { font-size: 12px; }
  .topbar-profile-copy > strong { font-size: 13px; }
  .topbar-profile-voice { font-size: 12px; }
  .stat-top { font-size: 13px; }
  .stat-card { min-height: 116px; }
  .welcome-panel h2 { font-size: 23px; }
  .section-header, .song-list { padding-inline: 16px; }
  .song-actions .btn-small { display: none; }
  .mobile-action-bar { gap: 6px; padding-right: 10px; padding-left: 10px; }
  .mobile-action-bar .btn { gap: 5px; min-height: 48px; padding-inline: 5px; font-size: 13px; }
  .presentation-header { align-items: center; gap: 8px; padding: 12px 13px; }
  .presentation-brand { min-width: 0; gap: 8px; }
  .presentation-brand img { width: 45px; height: 45px; }
  .presentation-brand strong { font-size: 14px; }
  .presentation-brand small { font-size: 11px; }
  .presentation-login-link { min-height: 42px; gap: 4px; padding-inline: 10px; font-size: 12px; }
  .presentation-main { padding: 13px 14px 32px; }
  .presentation-hero { min-height: 455px; border-radius: 22px; padding: 27px 21px; }
  .presentation-hero h1 { font-size: clamp(39px, 11vw, 46px); }
  .presentation-hero-copy > p:not(.eyebrow) { font-size: 16px; }
  .presentation-hero-mark { right: 0; top: 27px; font-size: 148px; }
  .presentation-intro { margin: 34px auto 28px; padding: 23px 19px; }
  .presentation-intro h2 { font-size: 27px; }
  .presentation-intro > p:last-child { font-size: 15px; }
  .presentation-team { padding: 22px 16px; }
  .presentation-section-heading h2 { font-size: 28px; }
  .presentation-team-note { font-size: 12px; }
  .presentation-president { padding: 15px; }
  .presentation-president h3 { font-size: 19px; }
  .presentation-president .presentation-note { margin-left: 71px; font-size: 13px; }
  .presentation-leader { min-height: 86px; }
  .presentation-leader h3 { font-size: 16px; }
  .presentation-footer { font-size: 12px; }
}

@media (max-width: 760px) {
  .program-print-content .modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .program-print-content .modal-actions [data-action="print-program"] {
    grid-row: 1;
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
  }
}
