:root {
  --ink: #15231d;
  --muted: #66726b;
  --paper: #f7f4ed;
  --surface: #fffdf8;
  --line: #dcd8ce;
  --green: #245c43;
  --green-dark: #143d2b;
  --gold: #c99745;
  --draft: #7a6f5e;
  --published: #28744e;
  --danger: #9d382f;
  --shadow: 0 18px 50px rgba(28, 47, 38, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 76px);
  border-bottom: 1px solid rgba(21, 35, 29, .12);
  background: rgba(247, 244, 237, .92);
  backdrop-filter: blur(10px);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand span:last-child { display: grid; }
.brand strong { font-size: 1.08rem; letter-spacing: .01em; }
.brand small { color: var(--muted); font-size: .76rem; }
.brand-logo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; background: var(--green); color: #fff;
  font: 700 .8rem/1 Georgia, serif; letter-spacing: .08em;
}
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.quiet-link { font-size: .88rem; color: var(--muted); text-underline-offset: 4px; }

.eyebrow { margin: 0 0 14px; color: var(--gold); font-weight: 750; letter-spacing: .16em; text-transform: uppercase; font-size: .72rem; }
.search { position: relative; z-index: 1; display: flex; max-width: 690px; padding: 7px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.search input { min-width: 0; flex: 1; border: 0; padding: 13px 16px; background: transparent; outline: 0; }
.search button, .primary-button {
  border: 0; border-radius: 8px; padding: 12px 22px; color: #fff; background: var(--green); font-weight: 700; cursor: pointer;
}
.search button:hover, .primary-button:hover { background: var(--green-dark); }
.catalog-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: end; gap: 10px; margin-bottom: 12px; }
.catalog-search { max-width: none; flex: 1; }
.catalog-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.catalog-filters select { min-width: 170px; border: 1px solid var(--line); border-radius: 8px; padding: 11px 30px 11px 10px; color: var(--ink); background: #fff; }
.catalog-sort { display: grid; gap: 5px; }
.catalog-sort label { color: var(--muted); font-size: .75rem; font-weight: 700; }
.catalog-sort select { min-width: 165px; border: 1px solid var(--line); border-radius: 8px; padding: 11px 30px 11px 10px; color: var(--ink); background: #fff; }

.catalog-section { max-width: 1220px; margin: 0 auto; padding: 42px clamp(20px, 5vw, 64px) 70px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font: 500 clamp(2rem, 4vw, 3.4rem)/1 Georgia, serif; }
.text-button { border: 0; padding: 4px; color: var(--green); background: transparent; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.status-message { padding: 18px 0; color: var(--muted); }
.status-message.error { color: var(--danger); }
.sermon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.catalog-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 30px; color: var(--muted); font-size: .88rem; }
.page-size-control, .page-nav { display: flex; align-items: center; gap: 10px; }
.catalog-pagination select { border: 1px solid var(--line); border-radius: 8px; padding: 9px 28px 9px 9px; color: var(--ink); background: #fff; }
.catalog-pagination button { padding: 9px 13px; }
.catalog-pagination button:disabled { opacity: .45; }
.sermon-card {
  display: flex; min-height: 335px; flex-direction: column; padding: 22px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  overflow: hidden;
  box-shadow: 0 2px 0 rgba(21,35,29,.02); transition: transform .2s ease, box-shadow .2s ease;
}
.sermon-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-thumbnail-button { width: calc(100% + 44px); height: 165px; margin: -22px -22px 18px; overflow: hidden; border: 0; border-radius: 15px 15px 0 0; padding: 0; background: #fff; cursor: pointer; }
.card-thumbnail-button:focus-visible, .card-title-button:focus-visible { outline: 3px solid rgba(36,92,67,.35); outline-offset: 3px; }
.card-thumbnail { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.sermon-card .date { color: var(--muted); font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; }
.sermon-card h3 { margin: 18px 0 10px; font: 500 1.65rem/1.12 Georgia, serif; }
.card-title-button { border: 0; padding: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.card-title-button:hover { color: var(--green); }
.sermon-card .meta { margin: 0; color: var(--muted); line-height: 1.6; }
.preacher-link { padding: 0; border: 0; color: var(--green); background: transparent; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.preacher-link:hover { color: var(--ink); }
.series-link { padding: 0; border: 0; color: var(--green); background: transparent; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.series-link:hover { color: var(--ink); }
.sermon-card .topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tag { padding: 5px 9px; border: 0; border-radius: 99px; color: var(--green); background: #e9f0eb; font-size: .72rem; cursor: pointer; }
.tag:hover { background: #d9e8dd; }

.sermon-dialog { width: min(680px, calc(100% - 28px)); border: 0; border-radius: 18px; padding: 0; color: var(--ink); background: var(--surface); box-shadow: 0 30px 100px rgba(0,0,0,.3); }
.sermon-dialog::backdrop { background: rgba(9, 25, 18, .72); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; top: 14px; right: 17px; border: 0; color: var(--muted); background: transparent; font-size: 2rem; cursor: pointer; }
.detail { padding: clamp(30px, 6vw, 56px); }
.detail-thumbnail { display: block; width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto 24px; border-radius: 12px; object-fit: contain; background: #fff; }
.detail h2 { margin: 8px 40px 12px 0; font: 500 clamp(2rem, 6vw, 3.5rem)/1 Georgia, serif; }
.detail-meta { color: var(--muted); line-height: 1.7; }
.detail-preacher { padding: 0; border: 0; color: var(--green); background: transparent; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.detail-preacher:hover { color: var(--ink); }
.detail-description { margin: 26px 0; white-space: pre-line; line-height: 1.75; }
.microfeed-playback audio { width: 100%; margin-top: 2px; }
.detail-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.detail-share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.share-options { display: flex; flex-wrap: wrap; gap: 6px; }
.share-options button, .share-options a { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--green-dark); background: var(--surface); font-size: .78rem; text-decoration: none; cursor: pointer; }
.share-options button:hover, .share-options a:hover { border-color: var(--green); background: #e9f0eb; }
.share-feedback { color: var(--muted); font-size: .76rem; }
.links-label { flex-basis: 100%; margin: 0; color: var(--muted); font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.related-links { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.detail-links a { color: var(--green); font-weight: 700; text-underline-offset: 4px; }
.site-footer { display: flex; justify-content: center; gap: 20px; padding: 36px clamp(20px, 5vw, 76px); color: rgba(255,255,255,.68); background: #102f23; font-size: .84rem; text-align: center; }
.site-footer p { margin: 0 0 10px; }
.site-footer-links { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }
.site-footer-links a { color: inherit; text-underline-offset: 3px; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Panel editorial */
.admin-body { background: #f2f1ec; }
.admin-header { position: sticky; top: 0; z-index: 10; }
.admin-shell { max-width: 1460px; margin: 0 auto; padding: 36px clamp(16px, 4vw, 54px) 80px; }
.admin-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin-bottom: 28px; }
.split-button { position: relative; display: inline-flex; }
.split-button .split-main { border-radius: 8px 0 0 8px; }
.split-button .split-toggle { width: 38px; padding: 12px 8px; margin-left: 1px; border-radius: 0 8px 8px 0; }
.split-menu { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; min-width: 220px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.split-menu button { width: 100%; border: 0; border-radius: 5px; padding: 9px 10px; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.split-menu button:hover { background: #e9f0eb; }
.logout-icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; font-size: 1.45rem; line-height: 1; }
.logout-icon-button svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; transform: translateX(-3px); }
.admin-toolbar h1 { margin: 0; font: 500 clamp(2rem, 4vw, 3rem)/1 Georgia, serif; }
.button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.secondary-button, .danger-button {
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 16px; color: var(--ink); background: var(--surface); font-weight: 650; cursor: pointer;
}
.danger-button { color: var(--danger); }
button:disabled { cursor: not-allowed; opacity: .45; }
.button-row button.is-loading::after { content: ""; display: inline-block; width: .75em; height: .75em; margin-left: .55em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -.1em; animation: button-spin .7s linear infinite; }
@keyframes button-spin { to { transform: rotate(360deg); } }
.user-pill { color: var(--muted); font-size: .84rem; }
.workbench { display: grid; grid-template-columns: minmax(0, .8fr) minmax(660px, 1.2fr); gap: 24px; align-items: start; }
.queue, .editor-panel, .auth-card { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 8px 25px rgba(31,43,36,.05); }
.queue { padding: 22px; }
.admin-filters { display: grid; gap: 16px; margin-bottom: 24px; }
.status-tabs { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; border-bottom: 1px solid var(--line); }
.status-tab { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; border: 0; border-bottom: 3px solid transparent; padding: 9px 4px 11px; color: var(--muted); background: transparent; font-size: .82rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.status-tab:hover, .status-tab.active { border-bottom-color: var(--green); color: var(--green-dark); }
.admin-search-row { display: flex; gap: 10px; }
.admin-search-row input { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; color: var(--ink); background: #fff; outline: 0; }
.admin-search-row input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(36,92,67,.1); }
.queue-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 11px; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.count { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; color: var(--muted); background: #eeece5; font-size: .74rem; }
.queue-list { display: grid; gap: 8px; }
.queue-item { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 14px; border: 1px solid transparent; border-radius: 9px; color: inherit; background: #f8f6f0; text-align: left; cursor: pointer; }
.queue-item:hover, .queue-item.active { border-color: #aabcae; background: #f3f7f3; }
.queue-item strong { display: block; margin-bottom: 4px; }
.queue-item small { color: var(--muted); }
.status-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--draft); }
.status-dot.published { background: var(--published); }
.empty-queue { color: var(--muted); font-size: .88rem; }
.queue-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; color: var(--muted); font-size: .84rem; }
.editor-panel { position: sticky; top: 106px; min-width: 0; overflow-x: hidden; padding: 24px; }
.editor-empty { padding: 54px 16px; color: var(--muted); text-align: center; }
.editor-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 20px; }
.editor-heading h2 { margin: 0; font: 500 1.75rem/1 Georgia, serif; }
.state-badge { padding: 6px 9px; border-radius: 99px; color: #fff; background: var(--draft); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.state-badge.published { background: var(--published); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 15px; min-width: 0; }
.form-grid > * { min-width: 0; }
.field { display: grid; align-content: start; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--muted); font-size: .78rem; font-weight: 700; }
.required-note { grid-column: 1 / -1; margin: 0 0 -4px; color: var(--muted); font-size: .75rem; }
.required-mark { color: var(--danger); font-weight: 800; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; color: var(--ink); background: #fff; outline: 0; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(36,92,67,.1); }
.field textarea { resize: vertical; min-height: 95px; }
.field-help { color: var(--muted); font-size: .75rem; }
.field select[multiple] { min-height: 108px; padding: 6px; }
.tag-picker { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; min-height: 42px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tag-picker:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(36,92,67,.1); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-picker > input { min-width: 150px; flex: 1; border: 0; padding: 5px 3px; color: var(--ink); background: transparent; outline: 0; }
.selected-tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; color: var(--green-dark); background: #e9f0eb; font-size: .78rem; }
.selected-tag button { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; color: var(--green-dark); background: transparent; cursor: pointer; line-height: 1; }
.selected-tag button:hover { color: #fff; background: var(--green); }
.tag-suggestions { position: absolute; z-index: 10; top: calc(100% + 5px); left: 0; right: 0; display: grid; max-height: 190px; overflow-y: auto; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.tag-suggestions button { border: 0; padding: 8px 10px; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.tag-suggestions button:hover { border-radius: 5px; background: #e9f0eb; }
.image-upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.file-picker { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; max-width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; cursor: pointer; }
.file-picker:hover { border-color: var(--green); background: #f7fbf8; }
.file-picker span { color: var(--green); font-weight: 700; }
.file-picker small { display: block; overflow: hidden; color: var(--muted); line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.image-preview-frame { width: 180px; height: 180px; margin-top: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.image-preview-frame .image-preview { display: block; width: 100%; height: 100%; max-width: none; max-height: none; border: 0; border-radius: 0; object-fit: contain; background: #fff; transform: scale(1.02); }
.image-restore { justify-self: start; margin-top: 4px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: .76rem; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.image-restore:hover { color: var(--green); }
.audio-box { margin: 18px 0; padding: 15px; border: 1px dashed #b8b5aa; border-radius: 10px; background: #faf9f5; }
.audio-box p { margin: 0 0 10px; color: var(--muted); font-size: .84rem; }
.audio-box audio { width: 100%; }
.editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.editor-publish-actions { margin-left: auto; }
.icon-button { width: 40px; height: 40px; padding: 0 !important; font-size: 0; }
.icon-button::before { content: "🗑"; font-size: 1rem; line-height: 1; }
.editor-notice { margin-top: 16px; }
.taxonomy-dialog { width: min(720px, calc(100% - 32px)); padding: 28px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--paper); }
.taxonomy-dialog::backdrop { background: rgba(20, 26, 22, .42); }
.taxonomy-dialog h2 { margin: 0 0 18px; font: 500 1.7rem/1 Georgia, serif; }
.taxonomy-form { display: grid; gap: 7px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.taxonomy-form label { color: var(--muted); font-size: .78rem; font-weight: 700; }
.taxonomy-form-row { display: flex; gap: 8px; }
.taxonomy-form-row input { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; }
.taxonomy-image-field { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.taxonomy-image-field .image-preview { margin-top: 0; }
.taxonomy-form small { color: var(--muted); }
.taxonomy-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.taxonomy-row small { color: var(--muted); }
.taxonomy-row > span:last-child { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.danger-text { color: var(--danger); }
.auth-wrap { min-height: calc(100vh - 83px); display: grid; place-items: center; padding: 30px 16px; }
.auth-card { width: min(460px, 100%); padding: 30px; }
.auth-card h1 { margin: 0 0 8px; font: 500 2.2rem/1 Georgia, serif; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); line-height: 1.6; }
.auth-card form { display: grid; gap: 15px; }
.auth-switch { margin-top: 20px; font-size: .84rem; }
.notice { margin: 14px 0; padding: 11px 13px; border-radius: 8px; color: var(--green-dark); background: #e7f1ea; font-size: .84rem; }
.notice.error { color: #76251f; background: #f7e6e4; }
.verification-status { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; color: var(--green-dark); background: #e7f1ea; font-size: .8rem; }
.verification-status.error { color: #76251f; background: #f7e6e4; }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: .75rem; }
.passage-control { position: relative; min-width: 0; }
.passage-control input { width: 100%; }
.field input.input-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(157,56,47,.12); }
.readonly-link { display: block; overflow-wrap: anywhere; color: var(--green-dark); font-size: .88rem; }
.readonly-link.pending { color: var(--muted); text-decoration: none; pointer-events: none; }
.publication-status { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.publication-status h3 { margin: 0 0 10px; color: var(--muted); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.publication-field { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 7px; }
.publication-field label { flex: 0 0 auto; }
.publication-field .readonly-link { min-width: 0; }
.progress { height: 5px; margin-top: 10px; border-radius: 99px; overflow: hidden; background: #e1ded6; }
.progress > span { display: block; width: 0; height: 100%; background: var(--green); transition: width .2s; }

@media (min-width: 1300px) {
  .queue, .editor-panel { max-height: calc(100vh - 170px); overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 1199px) and (min-width: 601px) {
  .catalog-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .catalog-search { grid-column: 1 / -1; }
  .catalog-filters { grid-column: 1; }
  .catalog-filters select { min-width: 0; flex: 1 1 150px; }
  .catalog-sort { grid-column: 2; }
  #clear-search { grid-column: 1 / -1; justify-self: end; }
}
@media (max-width: 1299px) {
  .sermon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench { grid-template-columns: 1fr; }
  .editor-panel { display: none; }
  body.editor-open { overflow: hidden; }
  body.editor-open::after { position: fixed; z-index: 20; inset: 84px 0 0; content: ""; background: rgba(21, 35, 29, .48); }
  .editor-panel.is-open { position: fixed; z-index: 30; inset: 84px 0 0; display: block; overflow-y: auto; overflow-x: hidden; border-radius: 0; padding: 22px; box-shadow: 0 18px 60px rgba(28, 47, 38, .24); }
}
@media (max-width: 999px) and (min-width: 601px) {
  .admin-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
  .admin-header .header-actions { display: contents; }
  .admin-header #session-actions { grid-column: 2; grid-row: 1; align-self: center; }
  .admin-header #admin-actions { display: flex; grid-column: 1 / -1; grid-row: 2; width: 100%; flex-wrap: nowrap; justify-content: flex-start; gap: 8px; }
  .admin-header #admin-actions .split-button { flex: 0 1 auto; }
}
@media (max-width: 745px) and (min-width: 601px) {
  .catalog-toolbar { grid-template-columns: 1fr; }
  .catalog-filters, .catalog-sort, #clear-search { grid-column: 1; }
  .catalog-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-filters select { min-width: 0; width: 100%; }
  .catalog-sort { width: 100%; }
  .catalog-sort select { width: 100%; }
  #clear-search { justify-self: start; }
}
@media (max-width: 600px) {
  .sermon-dialog { width: calc(100% - 20px); max-height: calc(100vh - 20px); overflow-y: auto; border-radius: 14px; }
  .dialog-close { top: 8px; right: 10px; font-size: 1.7rem; }
  .detail { padding: 22px 18px 20px; }
  .detail-thumbnail { width: min(100%, 210px); margin-bottom: 14px; border-radius: 9px; }
  .detail h2 { margin-top: 5px; margin-bottom: 8px; font-size: clamp(1.65rem, 8vw, 2.2rem); }
  .detail-meta { line-height: 1.45; }
  .detail-description { margin: 16px 0; line-height: 1.5; }
  .detail-links { gap: 9px; margin-top: 14px; }
  .related-links { margin-top: 14px; padding-top: 14px; }
  .detail-share { margin-top: 14px; padding-top: 12px; }
  .site-header { min-height: 72px; padding: 13px 16px; }
  .admin-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; }
  .admin-header .brand { min-width: 0; grid-column: 1; grid-row: 1; }
  .admin-header .header-actions { display: contents; }
  .admin-header #session-actions { grid-column: 2; grid-row: 1; align-self: center; }
  .admin-header #admin-actions { display: grid; grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 6px; }
  .admin-header #admin-actions .split-button { display: flex; grid-column: 1 / -1; width: 100%; }
  .admin-header #admin-actions .split-main { min-width: 0; flex: 1; }
  .search { display: grid; gap: 4px; }
  .catalog-toolbar { grid-template-columns: 1fr; gap: 8px; }
  .catalog-search, .catalog-filters, .catalog-sort, #clear-search { grid-column: auto; }
  .catalog-filters { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .catalog-filters select, .catalog-sort select { width: 100%; min-width: 0; }
  .catalog-sort { gap: 5px; }
  .sermon-grid { grid-template-columns: 1fr; }
  .catalog-pagination { flex-direction: column; gap: 10px; }
  .page-nav { width: 100%; justify-content: center; }
  .site-footer { flex-direction: column; }
  .site-footer p { margin: 0; }
  .header-actions { align-items: flex-end; gap: 8px; }
  .header-actions .user-pill { display: none; }
  .header-actions #admin-actions { gap: 6px; }
  .header-actions .secondary-button { padding: 10px 11px; }
  .admin-search-row { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .editor-panel { display: none; }
  body.editor-open::after { inset: 72px 0 0; }
  .editor-panel.is-open { inset: 72px 0 0; padding: 18px; }
  .editor-actions { align-items: stretch; flex-direction: column; }
  .editor-publish-actions { margin-left: 0; }
  .taxonomy-form-row { align-items: stretch; flex-direction: column; }
  .taxonomy-row { align-items: flex-start; flex-direction: column; }
}
