/* ─────────────────────────────────────────────────────────
   AACU Service Builder — styles
   Shared design tokens used by the UI shell AND the slide
   renderers (so preview + present mode are pixel-identical).
   ───────────────────────────────────────────────────────── */

/* ───── Fonts ───── */
@font-face {
  font-family: "CMG Sans";
  src: url("assets/fonts/CMGSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "CMG Sans";
  src: url("assets/fonts/CMGSans-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "CMG Sans";
  src: url("assets/fonts/CMGSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "CMG Sans";
  src: url("assets/fonts/CMGSans-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ───── Tokens ───── */
:root {
  /* Slide palette (matches CLI tokens 1:1) */
  --black:     #000000;
  --white:     #FFFFFF;
  --cream:     #F5EFE2;
  --softCream: #DCD2BD;
  --gold:      #C9A23B;
  --goldSoft:  #E0C46A;
  --goldDeep:  #A8861F;

  /* UI chrome (slightly different — charcoal not pure black so editor feels distinct from slide stage) */
  --ui-bg:        #0E1014;
  --ui-bg-panel:  #181B22;
  --ui-bg-input:  #22262E;
  --ui-border:    #2A2F38;
  --ui-text:      #E8E6E0;
  --ui-text-dim:  #9A9A9A;
  --ui-accent:    #C9A23B;
  --ui-accent-h:  #E0C46A;
  --ui-danger:    #D76A6A;

  /* Stage size — fixed 1920×1080, scaled via CSS transform */
  --stage-w: 1920px;
  --stage-h: 1080px;

  /* UI metrics */
  --header-h: 64px;
  --lib-w: 340px;
  --list-w: 360px;
  --list-w-thumb: 410px;   /* widens center column to fit thumbnails */
  --gap: 1px;

  --font-ui:    "CMG Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Calibri, sans-serif;
  --font-slide: "CMG Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Calibri, sans-serif;
}

/* ───── Reset ───── */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }   /* override class rules that set display:grid etc */
html, body { height: 100%; }
body {
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: var(--font-ui);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; }

/* ───── Layout ───── */
.app {
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  height: 100vh;
}

.header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 24px;
  background: var(--ui-bg-panel);
  border-bottom: 1px solid var(--ui-border);
  gap: 24px;
}

.header .brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 14px;
}
.header .brand .logo {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #1F4A78 url(assets/aacu-logo.png) center/120% no-repeat;
  background-position: center 38%;
  box-shadow: inset 0 0 0 1px var(--gold);
}
.header .brand .name { color: var(--ui-text); }
.header .brand .dot {
  color: var(--gold);
  margin: 0 6px;
}
.header .brand .meta {
  color: var(--ui-text-dim);
  font-weight: 400;
  letter-spacing: 0;
}

.header .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header .actions input[type="text"],
.header .actions select {
  width: 240px;
  padding: 8px 12px;
  background: var(--ui-bg-input);
  border: 1px solid var(--ui-border);
  color: var(--ui-text);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}
.header .actions select:focus { border-color: var(--gold); }

/* ───── Auth view (full-screen sign-in / account screen) ───── */
.auth-view {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 1100px 700px at 50% 30%, rgba(201, 162, 59, 0.10) 0%, transparent 65%),
    linear-gradient(135deg, #0F2A47 0%, #07182B 70%, #050F1E 100%);
  z-index: 600;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  overflow-y: auto;
}
.auth-card {
  width: 100%;
  max-width: 520px;
  background: var(--ui-bg-panel);
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  padding: 44px 40px;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
.auth-logo {
  width: 96px; height: 96px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: #1F4A78 url(assets/aacu-logo.png) center 38%/120% no-repeat;
  box-shadow: inset 0 0 0 2px var(--gold), 0 12px 36px rgba(201, 162, 59, 0.18);
}
.auth-title {
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-text);
  margin-bottom: 12px;
  font-weight: 700;
}
.auth-subtitle {
  color: var(--ui-text-dim);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 28px;
}
.auth-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  margin-bottom: 24px;
  text-align: left;
}
.auth-user-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold) center/cover no-repeat;
  display: grid; place-items: center;
  color: var(--black);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.auth-user-info { min-width: 0; flex: 1; }
.auth-user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ui-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.auth-user-email {
  font-size: 12px;
  color: var(--ui-text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.auth-error {
  background: rgba(215, 106, 106, 0.10);
  border: 1px solid rgba(215, 106, 106, 0.45);
  color: #F0A6A6;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 22px;
  text-align: left;
  line-height: 1.5;
}
.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
}
.btn-large {
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.auth-help {
  color: var(--ui-text-dim);
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  padding-top: 20px;
  border-top: 1px solid var(--ui-border);
}
.auth-help p { margin-bottom: 10px; }
.auth-help summary {
  cursor: pointer;
  color: var(--ui-text);
  font-weight: 600;
  padding: 6px 0;
  user-select: none;
}
.auth-help summary:hover { color: var(--gold); }
.auth-help details ul {
  list-style: none;
  padding: 0;
  margin-top: 8px;
}
.auth-help details ul li {
  padding: 6px 0;
  border-bottom: 1px solid var(--ui-border);
}
.auth-help details ul li:last-child { border-bottom: 0; }
.auth-help details ul li strong { color: var(--gold); }
.auth-help details ul li code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  background: var(--ui-bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}

/* Header "Account" pill */
.btn-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 200px;
}
.btn-account #authLabel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gold) center/cover no-repeat;
  display: grid; place-items: center;
  color: var(--black);
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

/* ───── Project picker (full-screen view) ───── */
.picker {
  position: fixed;
  inset: 0;
  background: var(--ui-bg);
  z-index: 500;
  display: flex;
  flex-direction: column;
}
.picker-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
  background: var(--ui-bg-panel);
  border-bottom: 1px solid var(--ui-border);
}
.picker-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--ui-text);
}
.picker-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px 48px 80px;
}
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}
.picker-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px;
  color: var(--ui-text-dim);
  max-width: 520px;
  margin: 0 auto;
}
.picker-empty-icon { font-size: 80px; margin-bottom: 20px; opacity: 0.55; }
.picker-empty h2 {
  color: var(--ui-text);
  font-size: 24px;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.picker-empty p {
  font-size: 15px;
  line-height: 1.6;
}
.picker-empty strong { color: var(--gold); font-weight: 700; }

/* Project card */
.project-card {
  background: var(--ui-bg-panel);
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  padding: 22px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
  position: relative;
}
.project-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(201,162,59,0.18);
}
.project-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), 0 12px 28px rgba(0,0,0,0.35);
}
.project-card .pc-badge {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--black);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.project-card .pc-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ui-text);
  letter-spacing: 0.01em;
  margin-right: 60px;   /* avoid the badge */
  word-break: break-word;
}
.project-card .pc-meta {
  display: flex;
  gap: 14px;
  color: var(--ui-text-dim);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.project-card .pc-meta .pc-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.project-card .pc-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.project-card:hover .pc-actions { opacity: 1; }
.project-card .pc-actions .icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--ui-border);
  color: var(--ui-text-dim);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.project-card .pc-actions .icon-btn:hover { color: var(--ui-text); border-color: #3A404D; background: var(--ui-bg); }
.project-card .pc-actions .icon-btn.danger:hover { color: var(--ui-danger); border-color: var(--ui-danger); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--ui-bg-input);
  border: 1px solid var(--ui-border);
  color: var(--ui-text);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.btn:hover { background: #2C313B; border-color: #3A404D; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--ui-bg), 0 0 0 4px var(--gold);
}
.icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--gold);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
}
[data-editable]:focus { outline: none; }
.btn-primary {
  background: var(--ui-accent);
  color: var(--black);
  border-color: var(--ui-accent);
  font-weight: 700;
}
.btn-primary:hover { background: var(--ui-accent-h); border-color: var(--ui-accent-h); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ui-text-dim); }
.btn-ghost:hover { color: var(--ui-text); background: var(--ui-bg-input); }

.main {
  display: grid;
  grid-template-columns: var(--lib-w) var(--list-w-thumb) 1fr;
  gap: var(--gap);
  background: var(--ui-border);
  overflow: hidden;
}

.panel {
  background: var(--ui-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ui-border);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ui-text-dim);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

/* ───── Library panel ───── */
.lib-tabs {
  display: flex;
  background: var(--ui-bg-panel);
  border-bottom: 1px solid var(--ui-border);
}
.lib-tab {
  flex: 1;
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ui-text-dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}
.lib-tab:hover { color: var(--ui-text); }
.lib-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: var(--ui-bg);
}

.lib-pane { display: none; }
.lib-pane.active { display: block; }

.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ui-text-dim);
  font-weight: 700;
}
.field select,
.field input[type="text"],
.field input[type="number"],
.field textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--ui-bg-input);
  border: 1px solid var(--ui-border);
  color: var(--ui-text);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.field select:focus,
.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.preview-box {
  background: var(--ui-bg-panel);
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.5;
  margin: 14px 0;
  max-height: 240px;
  overflow-y: auto;
}
.preview-box .lang-label {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}
.preview-box .verse-num {
  color: var(--gold);
  font-weight: 700;
  margin-right: 6px;
}
.preview-box .verse + .verse { margin-top: 6px; }
.preview-box hr {
  border: 0;
  border-top: 1px solid var(--ui-border);
  margin: 10px 0;
}

.hymn-list {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  margin: 8px 0 14px;
}
.hymn-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ui-border);
  cursor: pointer;
  transition: background 0.1s;
}
.hymn-row:last-child { border-bottom: 0; }
.hymn-row:hover { background: var(--ui-bg-input); }
.hymn-row.selected { background: rgba(201, 162, 59, 0.15); }
.hymn-row .num {
  font-weight: 700;
  color: var(--gold);
  width: 38px;
  flex-shrink: 0;
}
.hymn-row .title {
  flex: 1;
  font-size: 13px;
}
.hymn-row .author {
  color: var(--ui-text-dim);
  font-size: 11px;
}

.verse-checks {
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  padding: 8px;
  margin: 8px 0 14px;
}
.verse-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 13px;
}
.verse-checks label:hover { background: var(--ui-bg-input); border-radius: 4px; }
.verse-checks input { cursor: pointer; }

.add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.add-grid .btn { justify-content: center; padding: 14px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ───── Slide list ───── */
.slide-list { display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.slide-row {
  display: grid;
  grid-template-columns: 28px auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: var(--ui-bg-panel);
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s, background 0.12s;
  user-select: none;
}
.slide-row .row-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--black);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.slide-row .row-thumb .stage {
  pointer-events: none;
  user-select: none;
}
.slide-row.selected .row-thumb {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 0 0 2px var(--gold);
}
.slide-row .summary { min-width: 0; }
.slide-row.section-row .row-thumb { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 0 0 1px var(--goldSoft); }
.slide-row:hover { background: var(--ui-bg-input); border-color: #3A404D; }
.slide-row.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.slide-row.dragging { opacity: 0.4; }
.slide-row.drag-over { border-top: 2px solid var(--gold); }
.slide-row .idx {
  font-size: 12px;
  color: var(--ui-text-dim);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.slide-row .summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.slide-row .type {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.slide-row .title {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slide-row.section-row { background: var(--ui-bg-input); }
.slide-row .row-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.slide-row:hover .row-actions,
.slide-row.selected .row-actions { opacity: 1; }
.row-actions .icon-btn {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ui-text-dim);
  border-radius: 4px;
  cursor: pointer;
}
.row-actions .icon-btn:hover { color: var(--ui-text); background: var(--ui-bg); border-color: var(--ui-border); }
.row-actions .icon-btn.danger:hover { color: var(--ui-danger); }

.slide-list-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--ui-text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.slide-list-empty .empty-icon {
  font-size: 56px;
  opacity: 0.4;
  margin-bottom: 4px;
}
.slide-list-empty h3 {
  font-size: 16px;
  color: var(--ui-text);
  letter-spacing: 0.04em;
  font-weight: 600;
  margin: 0;
}
.slide-list-empty p {
  font-size: 13px;
  line-height: 1.5;
  max-width: 260px;
  margin: 0;
}
.slide-list-empty p strong { color: var(--gold); font-weight: 600; }
.slide-list-empty .shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 16px;
  font-size: 11px;
  color: var(--ui-text-dim);
}
.slide-list-empty .shortcuts span { display: inline-flex; align-items: center; gap: 4px; }
kbd {
  display: inline-block;
  padding: 1px 6px;
  background: var(--ui-bg-input);
  border: 1px solid var(--ui-border);
  border-radius: 4px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  color: var(--ui-text);
  margin: 0 2px;
}

/* ───── Preview pane ───── */
.preview-pane {
  display: flex;
  flex-direction: column;
  background: var(--ui-bg);
}
.preview-stage-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #06080B;
  overflow: hidden;
}
.preview-counter {
  padding: 10px 18px;
  border-top: 1px solid var(--ui-border);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ui-text-dim);
  text-align: center;
  font-weight: 700;
}
.preview-empty {
  color: var(--ui-text-dim);
  font-size: 14px;
  text-align: center;
  max-width: 400px;
}

/* ───── Slide stage (used by preview + present.html) ───── */
.stage {
  position: relative;
  width: var(--stage-w);
  height: var(--stage-h);
  background: var(--black);
  font-family: var(--font-slide);
  color: var(--white);
  overflow: hidden;
  transform-origin: top left;
  will-change: transform;
}
.stage[contenteditable="false"] {}

.stage .bg-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.stage .bg-dim {
  position: absolute;
  inset: 0;
  background: var(--black);
  opacity: 0.45;
  z-index: 1;
}
.stage > *:not(.bg-video):not(.bg-dim) {
  position: relative;
  z-index: 2;
}

/* Slide templates */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

/* Welcome */
.slide.welcome {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.slide.welcome .logo {
  width: 200px; height: 200px;
  border-radius: 50%;
  background: #1F4A78 url(assets/aacu-logo.png) center 38%/120% no-repeat;
  box-shadow: inset 0 0 0 2px var(--gold), 0 24px 60px rgba(0,0,0,0.6);
  margin-bottom: 56px;
}
.slide.welcome .church {
  font-size: 22px;
  color: var(--goldSoft);
  letter-spacing: 0.42em;
  font-weight: 700;
  margin-bottom: 40px;
}
.slide.welcome .hero {
  font-size: 220px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 0.95;
  margin-bottom: 0;
}
.slide.welcome .rule {
  width: 220px; height: 2px;
  background: var(--gold);
  margin: 28px 0;
}
.slide.welcome .subtitle {
  font-size: 34px;
  color: var(--cream);
  letter-spacing: 0.06em;
}
.slide.welcome .date {
  font-size: 22px;
  color: var(--goldSoft);
  font-weight: 700;
  letter-spacing: 0.42em;
  margin-top: 18px;
}

/* Section */
.slide.section {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 200px;
}
.slide.section .kicker {
  font-size: 22px;
  color: var(--goldSoft);
  letter-spacing: 0.42em;
  font-weight: 700;
  margin-bottom: 36px;
}
.slide.section .title {
  font-size: 160px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.06em;
  margin-bottom: 0;
}
.slide.section .rule {
  width: 220px; height: 2px;
  background: var(--gold);
  margin: 32px 0;
}
.slide.section .subtitle {
  font-size: 36px;
}
.slide.section .subtitle .sw { color: var(--softCream); font-style: italic; }
.slide.section .subtitle .sep { color: var(--gold); margin: 0 18px; }
.slide.section .subtitle .en { color: var(--cream); }

/* Hymn title */
.slide.hymn-title {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 200px;
}
.slide.hymn-title .kicker {
  font-size: 22px;
  color: var(--goldSoft);
  letter-spacing: 0.42em;
  font-weight: 700;
  margin-bottom: 28px;
}
.slide.hymn-title .number {
  font-size: 240px;
  font-weight: 700;
  color: var(--gold);
  line-height: 0.95;
}
.slide.hymn-title .rule {
  width: 220px; height: 2px;
  background: var(--gold);
  margin: 32px 0;
}
.slide.hymn-title .name {
  font-size: 58px;
  color: var(--white);
  font-weight: 400;
  line-height: 1.2;
  max-width: 1400px;
}

/* Lyric — verse tag stacked inside the centered body */
.slide.lyric {
  padding: 100px 140px 140px;
  align-items: center;
  justify-content: center;
}
.slide.lyric .body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  text-align: center;
  line-height: 1.35;
  font-size: 72px;
  max-width: 1640px;
  margin: 0 auto;
}
.slide.lyric .verse-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}
.slide.lyric .verse-tag .label {
  font-size: 16px;
  color: var(--goldSoft);
  letter-spacing: 0.42em;
  font-weight: 700;
}
.slide.lyric .verse-tag .num {
  font-size: 46px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  letter-spacing: 0.05em;
}
.slide.lyric.is-bilingual .body { gap: 28px; }
.slide.lyric .body .sw { color: var(--white); }
.slide.lyric .body .en { color: var(--cream); font-style: italic; font-size: 0.78em; }
.slide.lyric .body .divider { width: 200px; height: 1px; background: var(--gold); opacity: 0.6; }

/* List */
.slide.list {
  padding: 100px 200px;
  align-items: center;
}
.slide.list .title {
  font-size: 76px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 32px;
  text-align: center;
}
.slide.list .rule {
  width: 220px; height: 2px;
  background: var(--gold);
  margin-bottom: 56px;
}
.slide.list .items {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
  font-size: 48px;
}

/* Scripture bilingual */
.slide.scripture {
  padding: 70px 110px 90px;
}
.slide.scripture .head {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  margin-bottom: 36px;
}
.slide.scripture .head .kicker {
  font-size: 16px;
  color: var(--goldSoft);
  letter-spacing: 0.42em;
  font-weight: 700;
  margin-bottom: 10px;
}
.slide.scripture .head .refs {
  font-size: 40px;
}
.slide.scripture .head .refs .sw { color: var(--softCream); font-style: italic; }
.slide.scripture .head .refs .sep { color: var(--gold); margin: 0 22px; }
.slide.scripture .head .refs .en { color: var(--white); }
.slide.scripture .cols {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-content: start;
}
.slide.scripture .col h3 {
  font-size: 15px;
  color: var(--goldSoft);
  letter-spacing: 0.42em;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201, 162, 59, 0.4);
}
.slide.scripture .verses-stack { display: flex; flex-direction: column; gap: 18px; }
.slide.scripture .verse {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  font-size: 26px;
  line-height: 1.45;
  color: var(--cream);
}
.slide.scripture .verse.key {
  background: rgba(201, 162, 59, 0.12);
  border-left: 3px solid var(--gold);
  padding: 14px 16px 14px 14px;
  margin-left: -19px;
  color: var(--white);
  font-style: italic;
}
.slide.scripture .verse .num {
  font-size: 22px;
  color: var(--gold);
  font-weight: 700;
  text-align: right;
}

/* Pull quote */
.slide.pull-quote {
  padding: 100px 200px;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.slide.pull-quote .open-quote {
  font-size: 240px;
  color: var(--gold);
  line-height: 0.5;
  margin-bottom: 32px;
  font-weight: 700;
}
.slide.pull-quote .body {
  font-size: 64px;
  font-style: italic;
  line-height: 1.3;
  margin-bottom: 36px;
  max-width: 1500px;
}
.slide.pull-quote .rule {
  width: 100px; height: 2px;
  background: var(--gold);
  margin-bottom: 22px;
}
.slide.pull-quote .attribution {
  font-size: 20px;
  color: var(--goldSoft);
  letter-spacing: 0.42em;
  font-weight: 700;
}

/* Blessing */
.slide.blessing {
  padding: 60px 180px;
  align-items: center;
  text-align: center;
}
.slide.blessing .amen {
  font-size: 260px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}
.slide.blessing .amen .gold { color: var(--gold); }
.slide.blessing .subtitle {
  font-size: 30px;
  color: var(--goldSoft);
  font-style: italic;
  letter-spacing: 0.04em;
  margin-bottom: 36px;
}
.slide.blessing .rule {
  width: 220px; height: 2px;
  background: var(--gold);
  margin-bottom: 36px;
}
.slide.blessing .en {
  font-size: 42px;
  font-style: italic;
  margin-bottom: 28px;
  line-height: 1.35;
}
.slide.blessing .sw {
  font-size: 30px;
  font-style: italic;
  color: var(--softCream);
  line-height: 1.4;
  margin-bottom: 28px;
}
.slide.blessing .ref {
  font-size: 18px;
  color: var(--goldSoft);
  letter-spacing: 0.42em;
  font-weight: 700;
}

/* Blank */
.slide.blank {
  align-items: center;
  justify-content: center;
  padding: 100px 200px;
  text-align: center;
}
.slide.blank .body {
  font-size: 52px;
  font-weight: 400;
  color: var(--white);
  line-height: 1.4;
}

/* Footer (every slide) */
.slide .deck-footer {
  position: absolute;
  bottom: 32px;
  left: 80px; right: 80px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--softCream);
  opacity: 0.55;
  font-weight: 700;
  padding-top: 10px;
  border-top: 1px solid rgba(201, 162, 59, 0.35);
}

/* Inline-editable highlight in preview */
.preview-pane .stage [data-editable]:hover { outline: 1px dashed var(--gold); cursor: text; }
.preview-pane .stage [data-editable]:focus { outline: 2px solid var(--gold); cursor: text; }

/* ───── Loading splash ───── */
.splash {
  position: fixed;
  inset: 0;
  background: var(--ui-bg);
  display: grid;
  place-items: center;
  z-index: 9999;
  transition: opacity 0.3s;
}
.splash.hidden {
  opacity: 0;
  pointer-events: none;
}
.splash .spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--ui-border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.splash .label {
  margin-top: 18px;
  letter-spacing: 0.18em;
  color: var(--ui-text-dim);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───── Toast ───── */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ui-bg-panel);
  border: 1px solid var(--ui-border);
  color: var(--ui-text);
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 9000;
  opacity: 0;
  transition: all 0.2s;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.error { border-color: var(--ui-danger); color: var(--ui-danger); }
.toast.success { border-color: var(--gold); }

/* ───── Utilities ───── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.muted { color: var(--ui-text-dim); }
.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; }
