:root {
  --bg-paper: #faf6ee;
  --bg-surface: #fffdf8;
  --bg-elevated: #f3ede0;
  --bg-spotlight: #fffcf5;
  --rule-margin: #e8e0cf;
  --rule-strong: #d5c9b2;
  --ink-primary: #1f1c18;
  --ink-secondary: #5c5347;
  --ink-muted: #756a5b;
  --accent-indigo: #1d3f78;
  --accent-crimson: #9b2c2c;
  --accent-gold: #8a6212;
  --accent-forest: #2c5e3b;
  --shadow-soft: 0 4px 18px rgba(31, 28, 24, 0.06);
  --shadow-modal: 0 18px 48px rgba(20, 17, 13, 0.18);

  --font-serif: "Newsreader", Georgia, "Palatino Linotype", "Book Antiqua", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --scripture-font-scale: 1;
}

html[data-theme="sepia"] {
  --bg-paper: #f2e6cf;
  --bg-surface: #f7eedb;
  --bg-elevated: #eadbc0;
  --bg-spotlight: #f9f1e1;
  --rule-margin: #dac7a6;
  --rule-strong: #c3ac85;
  --ink-primary: #2b2117;
  --ink-secondary: #5d4c3b;
  --ink-muted: #85725e;
  --accent-indigo: #294a73;
  --accent-crimson: #8f2a24;
  --accent-gold: #9c6a14;
  --accent-forest: #295736;
  --shadow-soft: 0 4px 18px rgba(43, 33, 23, 0.07);
  --shadow-modal: 0 18px 48px rgba(34, 24, 15, 0.2);
}

html[data-theme="dark"] {
  --bg-paper: #161412;
  --bg-surface: #1d1a17;
  --bg-elevated: #26221d;
  --bg-spotlight: #211e1a;
  --rule-margin: #302b25;
  --rule-strong: #453e35;
  --ink-primary: #ebe3d4;
  --ink-secondary: #b9ae9c;
  --ink-muted: #8b8173;
  --accent-indigo: #79a8e8;
  --accent-crimson: #e87878;
  --accent-gold: #e2b24a;
  --accent-forest: #74bd89;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-modal: 0 20px 54px rgba(0, 0, 0, 0.6);
}

html[data-theme="amber"] {
  --bg-paper: #110d09;
  --bg-surface: #18120c;
  --bg-elevated: #221a12;
  --bg-spotlight: #1c150e;
  --rule-margin: #302419;
  --rule-strong: #473626;
  --ink-primary: #e8c996;
  --ink-secondary: #b89b6d;
  --ink-muted: #87704d;
  --accent-indigo: #8ab0e0;
  --accent-crimson: #e07b68;
  --accent-gold: #e6b355;
  --accent-forest: #7eb885;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.45);
  --shadow-modal: 0 20px 54px rgba(0, 0, 0, 0.7);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-paper);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.mobile-only {
  display: none;
}

/* App Shell */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Front-Door Welcome Screen */
.welcome-gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 12% 18%, rgba(43, 76, 126, 0.06), transparent 44%),
    radial-gradient(circle at 86% 80%, rgba(176, 125, 26, 0.07), transparent 46%),
    var(--bg-paper);
}

.welcome-topbar {
  padding: 18px 28px 10px;
}

.welcome-topbar-inner {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.welcome-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 28px 44px;
}

.welcome-grid {
  max-width: 1120px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 44px;
  align-items: center;
}

.welcome-copy {
  min-width: 0;
}

.welcome-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-indigo);
  margin-bottom: 10px;
}

.welcome-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 3.8vw, 3.35rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--ink-primary);
}

.welcome-lead {
  font-size: 0.98rem;
  line-height: 1.62;
  color: var(--ink-secondary);
  max-width: 52ch;
  margin: 0 0 22px;
}

.welcome-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  border-top: 1px solid var(--rule-margin);
}

.welcome-features li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-margin);
}

.welcome-features strong {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.welcome-features span {
  font-size: 0.83rem;
  line-height: 1.45;
  color: var(--ink-secondary);
}

.welcome-auth-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.btn-google-signin {
  min-width: 240px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid var(--rule-strong);
  background: var(--ink-primary);
  color: var(--bg-paper);
  font-family: var(--font-sans);
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, filter 0.15s ease, opacity 0.15s ease;
}

.btn-google-signin:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-google-signin:disabled {
  opacity: 0.65;
  cursor: wait;
}

.google-g {
  width: 19px;
  height: 19px;
  background: #ffffff;
  border-radius: 50%;
  padding: 2px;
  flex-shrink: 0;
}

.welcome-status {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  max-width: 52ch;
}

.welcome-status.denied {
  color: var(--accent-crimson);
  font-weight: 500;
  background: rgba(155, 44, 44, 0.08);
  border: 1px solid rgba(155, 44, 44, 0.25);
  padding: 9px 12px;
  border-radius: 8px;
}

/* Specimen Study Page */
.welcome-specimen {
  min-width: 0;
}

.specimen-page {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  box-shadow:
    0 1px 0 var(--rule-margin),
    6px 6px 0 -1px var(--bg-elevated),
    6px 6px 0 0 var(--rule-margin),
    var(--shadow-modal);
  overflow: hidden;
}

.specimen-margin-rule {
  width: 22px;
  flex-shrink: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 27px,
    var(--rule-margin) 27px,
    var(--rule-margin) 28px
  );
  border-right: 2px solid var(--accent-crimson);
  opacity: 0.55;
}

.specimen-body {
  flex: 1;
  padding: 22px 24px 20px;
  min-width: 0;
}

.specimen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-secondary);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--rule-margin);
}

.specimen-pill {
  color: var(--accent-indigo);
  background: var(--bg-elevated);
  border: 1px solid var(--rule-margin);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
}

.specimen-canvas {
  position: relative;
  padding-right: 42px;
}

.specimen-arc-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent-indigo);
  pointer-events: none;
}

.specimen-prior {
  font-family: var(--font-serif);
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--ink-secondary);
  opacity: 0.78;
  margin: 0 0 12px;
}

.specimen-spotlight {
  border-left: 3px solid var(--accent-indigo);
  background: var(--bg-spotlight);
  padding: 10px 12px 10px 14px;
  border-radius: 0 8px 8px 0;
}

.specimen-verse {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.68;
  color: var(--ink-primary);
  margin: 0 0 8px;
}

.specimen-verse:last-child {
  margin-bottom: 0;
}

.specimen-vnum {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent-indigo);
  background: var(--bg-elevated);
  border: 1px solid var(--rule-margin);
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 5px;
  vertical-align: 1px;
}

.spec-hl {
  color: inherit;
  border-radius: 3px;
  padding: 1px 3px;
}

.spec-contrast { background: rgba(210, 184, 232, 0.45); }
.spec-gospel { background: rgba(169, 205, 240, 0.48); }
.spec-promise { background: rgba(242, 214, 117, 0.48); }

html[data-theme="dark"] .spec-contrast,
html[data-theme="amber"] .spec-contrast { background: rgba(136, 98, 178, 0.36); }
html[data-theme="dark"] .spec-gospel,
html[data-theme="amber"] .spec-gospel { background: rgba(64, 122, 186, 0.36); }
html[data-theme="dark"] .spec-promise,
html[data-theme="amber"] .spec-promise { background: rgba(196, 158, 42, 0.34); }

.specimen-ring-wrap {
  position: relative;
  display: inline-block;
  padding: 0 6px;
}

.specimen-ring-svg {
  position: absolute;
  inset: -2px -3px;
  width: calc(100% + 6px);
  height: calc(100% + 4px);
  color: var(--accent-gold);
  pointer-events: none;
}

.specimen-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--bg-paper);
  border: 1px solid var(--rule-margin);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.specimen-note-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-indigo);
}

@media (max-width: 920px) {
  .welcome-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 620px;
  }
}

@media (max-width: 600px) {
  .welcome-topbar {
    padding: 14px 16px 8px;
  }
  .welcome-stage {
    padding: 12px 16px 32px;
  }
  .specimen-margin-rule {
    width: 12px;
  }
  .specimen-body {
    padding: 16px 16px 14px;
  }
  .specimen-canvas {
    padding-right: 0;
  }
  .specimen-arc-svg {
    display: none;
  }
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--rule-margin);
  flex-wrap: wrap;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.beta-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-secondary);
  margin-left: 4px;
  vertical-align: middle;
}

.series-picker-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.series-picker-wrap #seriesSelect {
  min-width: 0;
  max-width: 100%;
}

select, input[type="text"], input[type="date"], input[type="number"], textarea {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--ink-primary);
  background: var(--bg-paper);
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  padding: 6px 10px;
  outline: none;
  transition: border-color 0.15s ease;
}

select:focus, input:focus, textarea:focus {
  border-color: var(--accent-indigo);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.84rem;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--rule-strong);
  background: var(--bg-surface);
  color: var(--ink-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.btn:hover:not(:disabled) {
  background: var(--bg-elevated);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm { padding: 5px 10px; font-size: 0.82rem; }
.btn-xs { padding: 4px 8px; font-size: 0.76rem; }

.btn-primary {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
  color: #fffdf8;
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
  background: var(--accent-indigo);
}

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--rule-strong);
}

.btn-ghost {
  background: transparent;
  border-color: var(--rule-margin);
}

.btn-danger-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--accent-crimson);
}
.btn-danger-ghost:hover:not(:disabled) {
  background: rgba(155, 44, 44, 0.1);
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--rule-margin);
  background: var(--bg-paper);
  color: var(--ink-secondary);
  font-size: 0.76rem;
  cursor: pointer;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-muted);
}
.sync-dot.synced { background: var(--accent-forest); }
.sync-dot.syncing { background: var(--accent-gold); }
.sync-dot.offline-queued { background: var(--accent-gold); }
.sync-dot.error { background: var(--accent-crimson); }

/* Tier 2: Weekly Sunday Sessions Bar */
.weeks-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 18px;
  background: var(--bg-paper);
  border-bottom: 1px solid var(--rule-margin);
  flex-wrap: wrap;
}

.weeks-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.week-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--rule-margin);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}

.week-tab.active {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
  color: #fffdf8;
  font-weight: 600;
}

.week-tab-range {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.85;
}

.weeks-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Week Details Collapsible Panel */
.week-details-panel {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--rule-margin);
  padding: 12px 18px;
}

.week-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  max-width: 1120px;
}

.week-details-grid label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.75rem;
  color: var(--ink-secondary);
  font-weight: 500;
}

.week-details-grid label.span-2 {
  grid-column: span 2;
}

.week-details-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

/* Markup Toolbar */
.markup-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--rule-strong);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  overflow-x: auto;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-paper);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--rule-margin);
}

.tool-btn {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.tool-btn.active {
  background: var(--ink-primary);
  color: var(--bg-paper);
}

.tool-suboptions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.swatch-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.swatch-btn.active {
  border-color: var(--ink-primary);
  transform: scale(1.12);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: var(--bg-paper);
  color: var(--ink-primary);
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

.tag-chip.active {
  border-color: var(--ink-primary);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--ink-primary);
}

.tag-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.tool-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.pill-toggle {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: var(--bg-paper);
  color: var(--ink-secondary);
  font-size: 0.76rem;
  cursor: pointer;
  white-space: nowrap;
}

.pill-toggle.active {
  border-color: var(--accent-indigo);
  background: rgba(43, 76, 126, 0.12);
  color: var(--ink-primary);
}

.tool-banner {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--rule-strong);
  padding: 6px 18px;
  font-size: 0.82rem;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Main Workspace Layout */
.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 365px;
  align-items: start;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
}

.workspace.focus-mode {
  grid-template-columns: 1fr;
}

.workspace.focus-mode .margin-pane {
  display: none;
}

.passage-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.font-size-group {
  display: inline-flex;
  gap: 2px;
}

.logos-link {
  text-decoration: none;
}

.scripture-pane {
  padding: 20px 26px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.passage-header {
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-margin);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.passage-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.15;
}

.passage-subtitle {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

/* Unified Zero-Drift Scripture Column */
.scripture-column {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--bg-surface);
  border: 1px solid var(--rule-margin);
  border-radius: 12px;
  padding: 26px 76px 32px 26px; /* Right gutter reserved for Phrase Arcs */
  box-shadow: var(--shadow-soft);
  touch-action: pan-y;
  user-select: text;
}

.scripture-column[data-ink-touch="draw"] {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.scripture-column[data-tool="highlight"],
.scripture-column[data-tool="wrap"],
.scripture-column[data-tool="arc"] {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.scripture-column[data-span-dragging="true"] {
  touch-action: none;
}

.annotations-overlay-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  overflow: visible;
}

.annotations-overlay-svg .arc-hit-group {
  pointer-events: auto;
  cursor: pointer;
}

.annotations-overlay-svg .arc-hit-group.arc-selected .arc-visible-path {
  stroke-dasharray: none;
}

.scripture-column[data-tool="eraser"] .annotations-overlay-svg .wrap-hit-path {
  pointer-events: auto;
  cursor: pointer;
}

.arc-banner-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.arc-banner-swatches {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.verses-container {
  position: relative;
  z-index: 2;
}

/* Chiasm / structure brackets: a left gutter opens only when the session has some */
.scripture-column.has-chiasm { padding-left: calc(18px + var(--chiasm-gutter, 40px)); }
.app-shell.phone-mode .scripture-column.has-chiasm { padding-left: calc(6px + var(--chiasm-gutter, 34px)); }
.annotations-overlay-svg .chiasm-hit { pointer-events: none; }
.scripture-column[data-tool="chiasm"] .annotations-overlay-svg .chiasm-hit,
.scripture-column[data-tool="select"] .annotations-overlay-svg .chiasm-hit { pointer-events: auto; cursor: pointer; }
.scripture-column[data-tool="chiasm"] { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.scripture-column[data-tool="chiasm"] .verse-row { cursor: pointer; }
.scripture-column.has-chiasm .spotlight-frame { margin-left: 0; margin-right: 0; }
.verse-row.chiasm-pending { box-shadow: inset 3px 0 0 var(--accent-indigo); background: rgba(43, 76, 126, 0.09); }
.chiasm-banner { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.chiasm-banner-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chiasm-chip { border: 1.5px solid currentColor; border-radius: 999px; background: var(--bg-surface); padding: 2px 9px; font-family: var(--font-sans); font-size: 0.78rem; font-weight: 700; cursor: pointer; line-height: 1.5; }
.chiasm-chip small { font-weight: 400; color: var(--ink-muted); margin-left: 3px; }
.chiasm-chip.chiasm-chip-suggest { border-style: dashed; }
.chiasm-title-btn { font-weight: 700; }

/* Fold / Spotlight Groups */
.slice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  margin: 4px 0 12px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px dashed var(--rule-strong);
  font-size: 0.79rem;
  color: var(--ink-secondary);
}

.spotlight-frame {
  position: relative;
  background: var(--bg-spotlight);
  padding: 12px 12px 12px 16px;
  margin: 12px -12px 14px -16px;
  border-radius: 10px;
}

.spotlight-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-indigo);
  margin-bottom: 8px;
}

.section-heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--ink-secondary);
  margin: 14px 0 6px;
}

/* Verse Row & Per-Verse Zero-Drift SVG Ink Layer */
.verse-row {
  position: relative;
  padding: 8px 6px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  transition: opacity 0.18s ease, background-color 0.18s ease;
}

.verse-row.verse-prior,
.verse-row.verse-upcoming {
  opacity: 0.54;
}

.verse-row.verse-prior:hover,
.verse-row.verse-prior.verse-unfolded {
  opacity: 0.94;
}

.verse-row.verse-collapsed {
  display: none;
}

.verse-row.verse-focused {
  background: rgba(43, 76, 126, 0.06);
}

.verse-row.verse-pulse {
  animation: versePulse 1.3s ease;
}

@keyframes versePulse {
  0% { background: rgba(176, 125, 26, 0.28); }
  100% { background: transparent; }
}

.verse-content {
  position: relative;
  z-index: 2;
  font-family: var(--font-serif);
  font-size: calc(1.24rem * var(--scripture-font-scale, 1));
  line-height: 1.82;
  color: var(--ink-primary);
}

.verse-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent-indigo);
  background: var(--bg-elevated);
  border: 1px solid var(--rule-margin);
  border-radius: 5px;
  padding: 1px 6px;
  margin-right: 7px;
  vertical-align: 2px;
  cursor: pointer;
}

.verse-badge.has-note::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
}

.word-token {
  display: inline;
  padding: 2px 1px;
  border-radius: 3px;
  cursor: inherit;
  transition: background-color 0.12s ease;
}

.word-token.token-pending {
  outline: 2px dashed var(--accent-indigo);
  background: rgba(43, 76, 126, 0.14);
}

.word-token.token-holding {
  outline: 2px dotted var(--accent-gold);
  background: rgba(176, 125, 26, 0.22);
}

.word-token.token-pulse {
  background: rgba(176, 125, 26, 0.35) !important;
}

.verse-ink-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}

.scripture-column[data-ink-hidden="true"] .verse-ink-svg {
  display: none;
}

/* Faint markup: arcs, circles/boxes and ink fade to thin dashed lines so the words stay readable.
   Editing tools (arc / wrap / eraser / pen) bring them back to full strength. Chiasm lines live in
   the margin and are left alone. */
.scripture-column[data-markup-faint="true"]:not([data-tool="arc"]):not([data-tool="wrap"]):not([data-tool="eraser"]) .arc-hit-group,
.scripture-column[data-markup-faint="true"]:not([data-tool="arc"]):not([data-tool="wrap"]):not([data-tool="eraser"]) path[data-wrap-id] {
  opacity: 0.4;
}
.scripture-column[data-markup-faint="true"]:not([data-tool="arc"]):not([data-tool="wrap"]):not([data-tool="eraser"]) .arc-visible-path,
.scripture-column[data-markup-faint="true"]:not([data-tool="arc"]):not([data-tool="wrap"]):not([data-tool="eraser"]) path[data-wrap-id]:not(.wrap-hit-path) {
  stroke-width: 1.4px;
  stroke-dasharray: 3 4;
}
.scripture-column[data-markup-faint="true"]:not([data-tool="pen"]):not([data-tool="eraser"]) .verse-ink-svg {
  opacity: 0.35;
}

.collapsed-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.collapsed-verse-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--rule-margin);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  cursor: pointer;
}

.collapsed-verse-chip:hover {
  border-color: var(--accent-indigo);
  color: var(--ink-primary);
}

/* Right Margin Notes Pane */
.margin-pane {
  position: sticky;
  top: 52px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  background: var(--bg-surface);
  border-left: 1px solid var(--rule-margin);
  padding: 14px 16px 32px;
}

.pane-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--rule-margin);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.pane-tab {
  flex: 1;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 500;
  padding: 6px 6px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.pane-tab.active {
  background: var(--bg-elevated);
  border-color: var(--rule-margin);
  color: var(--ink-primary);
  font-weight: 600;
}

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

.focused-verse-box {
  background: var(--bg-paper);
  border: 1px solid var(--rule-margin);
  border-radius: 9px;
  padding: 12px;
  margin-bottom: 14px;
}

.focused-verse-box h4 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: var(--accent-indigo);
}

.focused-verse-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-secondary);
  margin: 0 0 8px;
  border-left: 2px solid var(--rule-strong);
  padding-left: 8px;
}

.focused-verse-box textarea {
  width: 100%;
  resize: vertical;
}

.notes-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 8px;
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 400;
  cursor: pointer;
}

.notes-list, .connections-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-card, .conn-card {
  background: var(--bg-paper);
  border: 1px solid var(--rule-margin);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.83rem;
  cursor: pointer;
}

.note-card:hover, .conn-card:hover {
  border-color: var(--accent-indigo);
}

.note-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.note-ref {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-indigo);
}

.week-chip {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--ink-secondary);
}

.series-notes-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.series-notes-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.sermon-week-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  margin-bottom: 10px;
  background: var(--bg-paper);
  border: 1px solid var(--rule-margin);
  border-radius: 8px;
}

.sermon-week-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-indigo);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-with-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.outline-quick-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.summary-pre {
  white-space: pre-wrap;
  margin: 4px 0 8px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.55;
}

.connections-section h4 {
  margin: 10px 0 6px;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Modals */
dialog.modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 96vw;
  color: var(--ink-primary);
}

dialog.modal::backdrop {
  background: rgba(20, 17, 13, 0.55);
  backdrop-filter: blur(2px);
}

.modal-card {
  width: 560px;
  max-width: 94vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}

.modal-card.modal-lg { width: 740px; }
.modal-card.modal-xl { width: 920px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule-margin);
}

.modal-header h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.28rem;
}

.modal-subtitle {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--rule-margin);
}

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.form-row label, .full-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-secondary);
}

.form-row label.grow { flex: 1; min-width: 200px; }
.form-row label.narrow { width: 84px; }
.full-label { width: 100%; margin-bottom: 10px; }

.passage-source-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.source-tab {
  flex: 1;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--rule-margin);
  background: var(--bg-paper);
  color: var(--ink-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

.source-tab.active {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
  color: #fffdf8;
}

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

.passage-preview-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--bg-paper);
  border: 1px solid var(--rule-margin);
  max-height: 220px;
  overflow-y: auto;
  font-family: var(--font-serif);
  font-size: 0.96rem;
}

/* Summary Sheet */
.summary-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-paper);
  border: 1px solid var(--rule-margin);
  border-radius: 9px;
  margin-bottom: 14px;
}

.summary-scope-group, .summary-export-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-radio, .inline-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  cursor: pointer;
}

.summary-sheet {
  background: var(--bg-paper);
  border: 1px solid var(--rule-margin);
  border-radius: 10px;
  padding: 22px 24px;
}

.summary-sheet h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 0 0 4px;
}

.summary-sheet h4 {
  margin: 16px 0 6px;
  font-size: 0.9rem;
  color: var(--accent-indigo);
  border-bottom: 1px solid var(--rule-margin);
  padding-bottom: 3px;
}

.summary-snapshot-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--rule-margin);
  margin: 8px 0;
}

.memo-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.code-preview {
  background: var(--bg-paper);
  border: 1px solid var(--rule-margin);
  border-radius: 8px;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  max-height: 180px;
  overflow: auto;
  margin-top: 10px;
}

.divider {
  border: none;
  border-top: 1px solid var(--rule-margin);
  margin: 16px 0;
}

.hint-text, .empty-hint {
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

/* "Last week" recap card above the passage */
.last-week-recap {
  margin: 8px 0 10px;
  padding: 8px 12px;
  border: 1px solid var(--rule-margin);
  border-left: 3px solid var(--accent-gold);
  border-radius: 8px;
  background: var(--bg-elevated);
  font-size: 0.85rem;
  color: var(--ink-secondary);
}
.last-week-recap .recap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.last-week-recap .recap-title {
  font-weight: 600;
  color: var(--ink-primary);
  min-width: 0;
}
.last-week-recap .recap-line { margin: 4px 0 0; overflow-wrap: anywhere; }
.last-week-recap .recap-line strong { color: var(--ink-primary); font-weight: 600; }

/* Restore points list (Sync & Backup modal) */
.restore-points-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 0.8rem; }
.restore-points-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--rule-margin);
}
.restore-points-list .rp-when { color: var(--ink-primary); }
.restore-points-list .rp-meta { color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* Cloud space meter (Sync & Backup modal) */
.cloud-space-meter {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--rule-margin);
  overflow: hidden;
  margin: 6px 0 10px;
}
.cloud-space-fill {
  height: 100%;
  width: 1%;
  background: var(--accent-forest);
  transition: width 0.3s ease;
}
.cloud-space-meter[data-level="75"] .cloud-space-fill { background: var(--accent-gold); }
.cloud-space-meter[data-level="90"] .cloud-space-fill,
.cloud-space-meter[data-level="100"] .cloud-space-fill { background: var(--accent-crimson); }
.cloud-space-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
}
.cloud-space-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  border-bottom: 1px dashed var(--rule-margin);
}
.cloud-space-name { color: var(--ink-primary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-space-size { color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Toast */
.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 24px);
  background: var(--ink-primary);
  color: var(--bg-paper);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  box-shadow: var(--shadow-modal);
}

.toast[popover] {
  top: auto;
  right: auto;
  bottom: 18px;
  left: 50%;
  margin: 0;
  border: none;
  overflow: visible;
  width: auto;
  height: auto;
}

/* Guide live preview: let the A-/A+ controls on the parent actually resize the text */
.guide-specimen-verses .guide-mini-verse {
  font-size: inherit;
}

/* Phone Mode: keep the sticky markup toolbar below the sticky phone top bar */
.app-shell.phone-mode .markup-toolbar {
  top: calc(46px + env(safe-area-inset-top, 0px));
}

.toast-action-btn {
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 3px 10px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .toast {
    bottom: calc(74px + env(safe-area-inset-bottom));
  }
}

/* Responsive Tablet Portrait & Phone */
@media (max-width: 980px) {
  .mobile-only {
    display: inline-flex;
  }

  .desktop-only {
    display: none !important;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .scripture-pane {
    padding: 14px 12px 84px;
  }

  .scripture-column {
    padding: 18px 54px 24px 16px;
  }

  .verse-content {
    font-size: calc(1.12rem * var(--scripture-font-scale, 1));
    line-height: 1.78;
  }

  .margin-pane {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: 62vh;
    z-index: 50;
    border-left: none;
    border-top: 1px solid var(--rule-strong);
    border-radius: 16px 16px 0 0;
    box-shadow: var(--shadow-modal);
    transform: translateY(105%);
    transition: transform 0.22s ease;
  }

  .margin-pane.open {
    transform: translateY(0);
  }

  .drawer-mobile-handle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--rule-margin);
  }
}

@media (max-width: 600px) {
  .topbar, .weeks-bar, .markup-toolbar {
    padding: 8px 12px;
  }
  .week-details-grid label.span-2 {
    grid-column: span 1;
  }
  .scripture-column {
    padding: 14px 44px 20px 12px;
  }
}

/* Print / Save-to-PDF Stylesheet */
@media print {
  .no-print {
    display: none !important;
  }
  body, html {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .workspace {
    display: block;
  }
  .scripture-column {
    box-shadow: none;
    border: none;
    max-width: 100%;
    padding: 0 40px 0 0;
  }
  .verse-prior, .verse-upcoming {
    opacity: 0.78 !important;
  }
  dialog.modal[open] {
    position: static;
    width: 100%;
    max-width: 100%;
  }
  .modal-card {
    box-shadow: none;
    border: none;
    width: 100%;
    max-height: none;
    /* flex + overflow:hidden clipped multi-page summaries after page 1 */
    display: block;
    overflow: visible;
  }
  .modal-body {
    overflow: visible !important;
    max-height: none !important;
  }
  dialog.modal::backdrop {
    display: none;
  }
  /* Printing from an open dialog (Summary → Print / PDF) prints only the dialog */
  body:has(dialog.modal[open]) #appShell,
  body:has(dialog.modal[open]) #welcomeGate {
    display: none !important;
  }
  /* Dark / Amber themes: print with ink on paper, not pale text on white */
  :root,
  html[data-theme] {
    --bg-paper: #ffffff;
    --bg-surface: #ffffff;
    --bg-elevated: #f4f4f4;
    --bg-spotlight: #ffffff;
    --rule-margin: #dddddd;
    --rule-strong: #bbbbbb;
    --ink-primary: #111111;
    --ink-secondary: #444444;
    --ink-muted: #666666;
    --accent-indigo: #1d3f78;
    --accent-crimson: #9b2c2c;
    --accent-gold: #8a6212;
    --accent-forest: #2c5e3b;
  }
}

/* ============================================================================
 * Full Screen Mode (Whole-Experience Full Width & Native Fullscreen Theme Fix)
 * ============================================================================ */

html:fullscreen,
html:-webkit-full-screen {
  background: var(--bg-paper);
  color: var(--ink-primary);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

html::backdrop,
html::-webkit-backdrop {
  background: var(--bg-paper);
}

.app-shell.is-fullscreen .workspace {
  max-width: 100%;
}

@media (min-width: 981px) {
  .app-shell.is-fullscreen .workspace {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
  }
  .app-shell.is-fullscreen .workspace.focus-mode {
    grid-template-columns: 1fr;
  }
}

.app-shell.is-fullscreen .passage-header,
.app-shell.is-fullscreen .scripture-column {
  max-width: 960px;
}

.app-shell.is-fullscreen .scripture-pane {
  padding: 16px 24px 56px;
}

#btnFullScreen[aria-pressed="true"] {
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
  background: rgba(43, 76, 126, 0.12);
  font-weight: 600;
}

/* ============================================================================
 * Phone Mode (One-Handed Navigation & Full-Height Typing)
 * ============================================================================ */

.phone-topbar,
.phone-bottom-dock,
.phone-verse-quickbar {
  display: none;
}

.phone-topbar .phone-done-btn.hidden {
  display: none;
}

.app-shell.phone-mode {
  padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
}

.app-shell.phone-mode.phone-keyboard-open {
  padding-bottom: 12px;
}

.app-shell.phone-mode .phone-topbar {
  position: sticky;
  top: 0;
  z-index: 42;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  padding: max(6px, env(safe-area-inset-top)) 10px 6px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--rule-margin);
}

.app-shell.phone-mode.is-fullscreen .phone-topbar {
  padding: 10px 20px 6px;
}

.app-shell.phone-mode.is-fullscreen .phone-topbar-left {
  max-width: calc(50% - 20px);
}

.phone-topbar-left {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-topbar-title {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 3px 6px 3px 2px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.phone-topbar-title[aria-expanded="true"] {
  background: rgba(43, 76, 126, 0.12);
  border-color: var(--accent-indigo);
}

.phone-top-passage {
  max-width: 100%;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-top-week-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

.phone-top-week {
  max-width: 100%;
  font-size: 0.72rem;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-top-caret {
  font-size: 0.7rem;
  color: var(--ink-secondary);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.phone-topbar-title[aria-expanded="true"] .phone-top-caret {
  transform: rotate(180deg);
  color: var(--accent-indigo);
}

.app-shell.phone-mode .phone-topbar .phone-add-week-btn {
  flex-shrink: 0;
  min-width: 34px;
  min-height: 34px;
  padding: 0 9px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
}

.phone-topbar-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.app-shell.phone-mode .phone-topbar .btn[aria-pressed="true"] {
  background: rgba(43, 76, 126, 0.14);
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
  font-weight: 600;
}

.app-shell.phone-mode:not(.phone-show-menu) .topbar {
  display: none;
}

.app-shell.phone-mode.phone-show-menu .topbar {
  padding: 10px 12px;
  gap: 8px;
}

.app-shell.phone-mode.phone-show-menu .series-picker-wrap {
  width: 100%;
  flex-wrap: wrap;
}

.app-shell.phone-mode.phone-show-menu #seriesSelect {
  flex: 1;
  min-width: 150px;
}

.app-shell.phone-mode:not(.phone-show-tools) .markup-toolbar,
.app-shell.phone-mode:not(.phone-show-tools) .tool-banner:not(.arc-banner-urgent) {
  display: none;
}

.app-shell.phone-mode .weeks-bar {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 6px 10px;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
}

.app-shell.phone-mode .weeks-tabs {
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
}

.app-shell.phone-mode .weeks-actions {
  display: none;
}

.app-shell.phone-mode.phone-view-verses .weeks-bar,
.app-shell.phone-mode.phone-view-series .weeks-bar {
  display: none;
}

.app-shell.phone-mode .workspace {
  display: block;
  grid-template-columns: 1fr;
  max-width: 720px;
  margin: 0 auto;
  min-height: calc(100vh - 114px);
}

.app-shell.phone-mode #btnOpenMobileDrawer,
.app-shell.phone-mode #btnFocusMode,
.app-shell.phone-mode .drawer-mobile-handle {
  display: none !important;
}

.app-shell.phone-mode .scripture-pane {
  display: none;
  padding: 10px 10px 24px;
}

.app-shell.phone-mode.phone-view-passage .scripture-pane {
  display: block;
}

.app-shell.phone-mode .passage-title-block {
  display: none;
}

.app-shell.phone-mode .passage-header {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.app-shell.phone-mode .passage-header-actions {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  padding-bottom: 2px;
}

.app-shell.phone-mode .scripture-column {
  padding: 14px 22px 22px 14px;
  border-radius: 10px;
}

.app-shell.phone-mode .margin-pane {
  display: none;
  position: static;
  transform: none;
  height: auto;
  min-height: calc(100vh - 122px);
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 12px 12px 28px;
}

.app-shell.phone-mode.phone-view-sermon .margin-pane,
.app-shell.phone-mode.phone-view-verses .margin-pane,
.app-shell.phone-mode.phone-view-series .margin-pane {
  display: block;
}

.app-shell.phone-mode .sermon-week-banner {
  display: none;
}

.app-shell.phone-mode .pane-tabs {
  display: none;
}

.app-shell.phone-mode.phone-view-series .pane-tabs {
  display: flex;
  margin-bottom: 10px;
}

.app-shell.phone-mode.phone-view-series .pane-tab[data-pane="verse-notes"],
.app-shell.phone-mode.phone-view-series .pane-tab[data-pane="sermon-notes"] {
  display: none;
}

.app-shell.phone-mode .phone-verse-quickbar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 10px;
  margin-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.phone-vchip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--rule-margin);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.phone-vchip.has-note {
  border-color: var(--accent-indigo);
  color: var(--ink-primary);
}

.phone-vchip.active {
  background: var(--accent-indigo);
  border-color: var(--accent-indigo);
  color: #ffffff;
}

.app-shell.phone-mode textarea,
.app-shell.phone-mode input[type="text"],
.app-shell.phone-mode select {
  font-size: 16px;
  line-height: 1.5;
}

.app-shell.phone-mode #focusedNoteInput {
  min-height: 180px;
}

.app-shell.phone-mode #wkSermonOutline {
  min-height: 205px;
}

.app-shell.phone-mode #wkSermonNotes {
  min-height: 235px;
}

.app-shell.phone-mode .series-notes-form textarea {
  min-height: 130px;
}

.app-shell.phone-mode .phone-topbar .btn,
.app-shell.phone-mode .outline-quick-btns .btn {
  min-height: 36px;
  padding: 6px 11px;
}

.app-shell.phone-mode .phone-bottom-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 48;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-surface);
  border-top: 1px solid var(--rule-strong);
  padding: 4px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
}

.phone-dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: 4px 2px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.phone-dock-icon {
  font-size: 1.05rem;
  line-height: 1.1;
}

.phone-dock-btn.active {
  background: rgba(43, 76, 126, 0.14);
  color: var(--accent-indigo);
  font-weight: 700;
}

.app-shell.phone-mode.phone-keyboard-open .phone-bottom-dock {
  display: none;
}

.app-shell.phone-mode.is-fullscreen .workspace {
  display: block;
  max-width: 100%;
}

/* ============================================================================
 * Interactive Welcome Guide & Tool Wizard
 * ============================================================================ */

.guide-modal-card {
  width: 780px;
}

.guide-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-modal-footer {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.guide-footer-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-step-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: visible;
  padding-bottom: 2px;
  flex-shrink: 0;
}

.guide-step-pills::-webkit-scrollbar {
  display: none;
}

.guide-pill {
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--rule-margin);
  background: var(--bg-paper);
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.guide-pill:hover {
  background: var(--bg-elevated);
  color: var(--ink-primary);
}

.guide-pill.active {
  background: color-mix(in srgb, var(--accent-indigo) 16%, var(--bg-surface));
  border-color: var(--accent-indigo);
  color: var(--ink-primary);
  font-weight: 600;
}

.guide-step-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.guide-step-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.18rem;
  color: var(--ink-primary);
}

.guide-step-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.guide-demo-card {
  background: var(--bg-paper);
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.guide-demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.guide-demo-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--rule-margin);
  color: var(--accent-indigo);
}

.guide-demo-stage {
  min-height: 112px;
}

.guide-demo-caption {
  font-size: 0.78rem;
  color: var(--ink-secondary);
  border-top: 1px dashed var(--rule-margin);
  padding-top: 7px;
}

/* Preview specimens inside stage */
.guide-specimen {
  background: var(--bg-surface);
  border: 1px solid var(--rule-margin);
  border-radius: 10px;
  padding: 12px 14px;
  position: relative;
}

.guide-specimen[data-demo-theme="light"] {
  background: #fffdf8;
  color: #1f1c18;
  border-color: #e8e0cf;
}
.guide-specimen[data-demo-theme="sepia"] {
  background: #f7eedb;
  color: #2b2117;
  border-color: #dac7a6;
}
.guide-specimen[data-demo-theme="dark"] {
  background: #1d1a17;
  color: #ebe3d4;
  border-color: #302b25;
}
.guide-specimen[data-demo-theme="amber"] {
  background: #18120c;
  color: #e8c996;
  border-color: #302419;
}

.guide-specimen-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.guide-meta-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
}

.guide-meta-pill.accent {
  border-color: var(--accent-gold);
  color: var(--ink-primary);
}

.guide-specimen-verses {
  font-family: var(--font-serif);
  line-height: 1.72;
}

.guide-specimen-verses mark {
  color: inherit;
  padding: 1px 3px;
  border-radius: 4px;
}

.guide-inline-wrap {
  display: inline-block;
  padding: 0 5px;
  border: 2px solid var(--accent-gold);
  border-radius: 999px;
}

.guide-mini-verse {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.65;
  padding: 5px 8px;
  border-radius: 7px;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.guide-mini-verse:last-child {
  margin-bottom: 0;
}

.guide-mini-verse.spotlight {
  background: var(--bg-spotlight);
}

.guide-mini-verse.dimmed {
  opacity: 0.56;
  background: var(--bg-elevated);
}

.guide-mini-verse.unfolded {
  background: var(--bg-paper);
  border-left: 3px solid var(--accent-indigo);
}

.guide-mini-verse.appended-glow {
  border-left: 3px solid var(--accent-forest);
}

.guide-vnum {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-indigo);
  margin-right: 6px;
}

.guide-vnum-note {
  color: var(--accent-gold);
}

.guide-week-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.guide-week-chip {
  font-size: 0.74rem;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--rule-margin);
  background: var(--bg-paper);
  color: var(--ink-secondary);
}

.guide-week-chip.active {
  border-color: var(--accent-indigo);
  background: color-mix(in srgb, var(--accent-indigo) 14%, var(--bg-surface));
  color: var(--ink-primary);
  font-weight: 600;
}

.guide-week-chip.added {
  border-color: var(--accent-forest);
  color: var(--accent-forest);
  font-weight: 600;
}

.guide-chip-fold, .guide-badge-mini {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--rule-strong);
  color: var(--accent-indigo);
}

/* Interactive highlight sandbox */
.guide-sandbox-verse {
  font-family: var(--font-serif);
  font-size: 1.04rem;
  line-height: 1.85;
  margin-bottom: 10px;
}

.guide-sandbox-tokens {
  display: inline;
}

.guide-sandbox-word {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 1px 4px;
  margin: 0 1px;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.guide-sandbox-word:hover {
  box-shadow: inset 0 -2px 0 var(--accent-indigo);
}

.guide-tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--rule-margin);
}

.guide-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--rule-margin);
  background: var(--bg-paper);
  color: var(--ink-primary);
  font-size: 0.74rem;
  cursor: pointer;
}

.guide-tag-pill.active {
  border-color: var(--accent-indigo);
  background: color-mix(in srgb, var(--accent-indigo) 14%, var(--bg-surface));
  font-weight: 600;
}

.guide-tag-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

/* Step 3: Circles & Phrase Arcs */
.guide-phrase-svg-wrap {
  position: relative;
  display: inline-block;
  padding: 0 5px;
}

.guide-phrase-svg {
  position: absolute;
  inset: -2px -3px;
  width: calc(100% + 6px);
  height: calc(100% + 4px);
  pointer-events: none;
}

.guide-arc-stage {
  padding-right: 84px;
}

.guide-arc-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.guide-arc-anchor {
  padding: 1px 4px;
  border-radius: 4px;
}

.guide-arc-anchor.active-anchor {
  border-bottom: 2px solid var(--accent-indigo);
  background: color-mix(in srgb, var(--accent-indigo) 14%, transparent);
}

.guide-arc-edge-pill {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: var(--bg-paper);
}

/* Step 4: Animated ink strip + interactive scratchpad */
.guide-step4-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-anim-slot {
  background: var(--bg-surface);
  border: 1px solid var(--rule-margin);
  border-radius: 9px;
  padding: 8px 12px;
}

.guide-anim-verse-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-anim-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.guide-anim-text-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  padding: 4px 0;
}

.guide-anim-verse {
  font-family: var(--font-serif);
  font-size: 0.96rem;
}

.guide-anim-ink-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.guide-anim-pill {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--rule-margin);
  color: var(--accent-indigo);
}

.guide-scratchpad-wrap {
  background: var(--bg-surface);
  border: 1px dashed var(--rule-strong);
  border-radius: 10px;
  padding: 8px 12px;
}

.guide-scratchpad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.guide-scratchpad-canvas {
  position: relative;
  height: 92px;
  border-radius: 8px;
  background: var(--bg-spotlight);
  border: 1px solid var(--rule-margin);
  overflow: hidden;
}

.guide-scratchpad-underlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink-muted);
  opacity: 0.62;
  user-select: none;
  pointer-events: none;
}

.guide-scratchpad {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
  transition: opacity 0.16s ease;
}

.guide-scratchpad.ink-hidden {
  opacity: 0.12;
}

/* Step 5: Split-pane preview */
.guide-split-preview {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 10px;
}

.guide-split-preview.focus-collapsed {
  grid-template-columns: 1.55fr 0.45fr;
}

.guide-split-left, .guide-split-right {
  background: var(--bg-surface);
  border: 1px solid var(--rule-margin);
  border-radius: 9px;
  padding: 10px;
}

.guide-split-right.dimmed-drawer {
  opacity: 0.78;
  border-style: dashed;
}

.guide-split-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.guide-logos-chip {
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--rule-strong);
  color: var(--accent-indigo);
}

.guide-pane-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guide-pane-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-indigo);
}

.guide-pane-text {
  margin: 0;
  font-size: 0.79rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.guide-conn-row {
  font-size: 0.78rem;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--bg-paper);
  border: 1px solid var(--rule-margin);
}

/* Step Controls */
.guide-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.guide-choice-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.guide-choice-label {
  font-size: 0.73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
}

.guide-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.guide-choice-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid var(--rule-strong);
  background: var(--bg-paper);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.guide-choice-btn:hover {
  background: var(--bg-elevated);
}

.guide-choice-btn.selected {
  background: color-mix(in srgb, var(--accent-indigo) 16%, var(--bg-surface));
  border-color: var(--accent-indigo);
  font-weight: 600;
}

.guide-theme-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  display: inline-block;
}

/* How-To & Try Box */
.guide-howto-box {
  background: var(--bg-elevated);
  border: 1px solid var(--rule-margin);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.guide-howto-copy {
  flex: 1;
  min-width: 240px;
  font-size: 0.81rem;
  color: var(--ink-secondary);
  line-height: 1.48;
}

.guide-howto-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Step 6: Feature Cards Grid */
.guide-features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.guide-feature-card {
  background: var(--bg-paper);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.guide-feature-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.guide-feature-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.guide-feature-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-primary);
}

.guide-feature-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--rule-margin);
  color: var(--accent-indigo);
  white-space: nowrap;
}

.guide-feature-desc {
  margin: 0;
  font-size: 0.79rem;
  color: var(--ink-secondary);
  line-height: 1.44;
}

/* Animations */
@keyframes guideStrokeDraw {
  from { stroke-dasharray: 220; stroke-dashoffset: 220; }
  to { stroke-dasharray: 220; stroke-dashoffset: 0; }
}

.guide-anim-stroke {
  animation: guideStrokeDraw 0.65s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .guide-anim-stroke {
    animation: none;
  }
}

html[data-theme="dark"] .btn-primary,
html[data-theme="amber"] .btn-primary,
html[data-theme="dark"] .week-tab.active,
html[data-theme="amber"] .week-tab.active,
html[data-theme="dark"] .phone-vchip.active,
html[data-theme="amber"] .phone-vchip.active {
  color: #12100e;
  font-weight: 600;
}

@media (max-width: 640px) {
  .guide-modal-body {
    padding: 12px 14px;
  }
  .guide-step-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    min-height: 42px;
    align-items: center;
  }
  .guide-pill {
    min-height: 36px;
  }
  .guide-choice-btn {
    min-height: 36px;
    font-size: 0.78rem;
  }
  .guide-split-preview,
  .guide-split-preview.focus-collapsed,
  .guide-features-grid {
    grid-template-columns: 1fr;
  }
  .guide-feature-card:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .guide-arc-stage {
    padding-right: 54px;
    padding-bottom: 32px;
  }
  .guide-arc-edge-pill {
    top: auto;
    bottom: 6px;
    right: 10px;
    transform: none;
  }
}

/* ===== Quick Bible side drawer (Desktop, Tablet & Phone) ===== */
.bible-handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: fixed;
  right: 0;
  top: 46%;
  z-index: 46;
  padding: 10px 6px;
  border: 1px solid var(--rule-strong);
  border-right: none;
  border-radius: 12px 0 0 12px;
  background: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-soft);
  font-size: 1.1rem;
  opacity: 0.88;
  cursor: pointer;
}
.bible-handle:hover { opacity: 1; background: var(--bg-elevated); }
.bible-handle-label { font-size: 0.62rem; font-family: var(--font-sans); letter-spacing: 0.04em; }
.app-shell.phone-mode.phone-keyboard-open .bible-handle { display: none; }
/* Phones: sit the tab in thumb reach, just above the toast / bottom-dock zone (~66px dock + ~44px toast) */
.app-shell.phone-mode .bible-handle {
  top: auto;
  bottom: calc(132px + env(safe-area-inset-bottom, 0px));
}
.app-shell.bible-drawer-open .bible-handle {
  opacity: 0;
  pointer-events: none;
}
.bible-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 17, 13, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.bible-backdrop.open { opacity: 1; pointer-events: auto; }
.app-shell:not(.phone-mode) {
  transition: padding-right 0.22s ease;
}
.app-shell:not(.phone-mode) .bible-backdrop {
  display: none;
  pointer-events: none;
}
.app-shell:not(.phone-mode) .bible-drawer {
  width: min(42vw, 460px);
  box-shadow: -8px 0 28px rgba(20, 17, 13, 0.14);
}
.app-shell:not(.phone-mode).bible-drawer-open {
  padding-right: min(42vw, 460px);
}
@media (max-width: 1480px) {
  .app-shell:not(.phone-mode).bible-drawer-open .workspace:not(.focus-mode) {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}
@media (max-width: 1220px) {
  .app-shell:not(.phone-mode).bible-drawer-open .workspace {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 981px) and (max-width: 1220px) {
  .app-shell:not(.phone-mode).bible-drawer-open .workspace .margin-pane {
    display: none;
  }
}
.app-shell.bible-drawer-open .scripture-column[data-tool="select"] .verse-row {
  cursor: pointer;
}
.app-shell.bible-drawer-open .scripture-column[data-tool="select"] .verse-row:hover {
  background: rgba(43, 76, 126, 0.055);
}
.app-shell.bible-drawer-open .verse-row.verse-focused {
  background: rgba(43, 76, 126, 0.09);
  box-shadow: inset 3px 0 0 var(--accent-indigo);
}
@keyframes bdLinkPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(176, 125, 26, 0.65);
    border-color: var(--accent-gold);
    background: rgba(242, 214, 117, 0.25);
  }
  100% {
    box-shadow: 0 0 0 6px rgba(176, 125, 26, 0);
  }
}
.bd-link-target-wrap select.bd-link-pulse {
  animation: bdLinkPulse 0.65s ease-out;
}
.bible-drawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(92vw, 480px);
  z-index: 61;
  background: var(--bg-paper);
  color: var(--ink-primary);
  border-left: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-modal);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.22s ease, visibility 0s linear 0.22s;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.bible-drawer.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.22s ease;
}
.bd-sheet-grip,
.bd-layout-toggle {
  display: none;
}
.app-shell.phone-mode .bd-layout-toggle {
  display: inline-flex;
}
.app-shell.phone-mode .bible-drawer.bd-mode-bottom .bd-sheet-grip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  padding: 7px 12px 4px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  touch-action: none;
  flex-shrink: 0;
}
.bd-sheet-pill {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--rule-strong);
}
.bd-sheet-grip-label {
  font-family: var(--font-sans);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}
.app-shell.phone-mode.bible-drawer-bottom .bible-backdrop {
  display: none;
  pointer-events: none;
}
.app-shell.phone-mode .bible-drawer.bd-mode-bottom {
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(var(--bd-split, 0.48) * 100vh);
  height: calc(var(--bd-split, 0.48) * 100dvh);
  min-height: 220px;
  max-height: 88vh;
  max-height: 88dvh;
  border-left: none;
  border-top: 1px solid var(--rule-strong);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 30px rgba(20, 17, 13, 0.18);
  padding-top: 0;
  transform: translateY(100%);
  transition: transform 0.22s ease, height 0.22s ease, visibility 0s linear 0.22s;
}
.app-shell.phone-mode .bible-drawer.bd-mode-bottom.open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.22s ease, height 0.22s ease;
}
.app-shell.phone-mode .bible-drawer.bd-mode-bottom.bd-expanded {
  height: 84vh;
  height: 84dvh;
}
.app-shell.phone-mode .bible-drawer.bd-mode-bottom .bd-header {
  padding: 2px 12px 6px;
}
.app-shell.phone-mode.bible-drawer-open.bible-drawer-bottom {
  padding-bottom: calc((var(--bd-split, 0.48) + 0.04) * 100vh + env(safe-area-inset-bottom, 0px));
  padding-bottom: calc((var(--bd-split, 0.48) + 0.04) * 100dvh + env(safe-area-inset-bottom, 0px));
}
.app-shell.phone-mode.bible-drawer-open.bible-drawer-bottom .bible-handle {
  opacity: 0.92;
  pointer-events: auto;
  top: 22%;
  bottom: auto;
  z-index: 62;
}
.app-shell.phone-mode.bible-drawer-open.bible-drawer-bottom.bible-drawer-expanded .bible-handle {
  top: 56px;
}
.app-shell.phone-mode.phone-keyboard-open .bible-drawer.bd-mode-bottom.open {
  min-height: 210px;
}
.bible-drawer.dragging,
.bible-backdrop.dragging {
  transition: none !important;
}
.bd-header, .bd-nav { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 12px; }
.bd-form { display: flex; gap: 6px; padding: 0 12px 6px; }
.bd-form input { flex: 1; min-width: 0; font-size: 16px; }
.bd-form select { font-size: 16px; }
.bd-nav { justify-content: flex-start; padding-top: 2px; padding-bottom: 4px; flex-wrap: wrap; }
.bd-sel-status { margin-left: auto; font-family: var(--font-sans); font-size: 0.72rem; color: var(--ink-muted); }
.bd-link-bar { display: flex; gap: 8px; align-items: center; padding: 6px 12px; background: var(--bg-elevated); border-top: 1px solid var(--rule-margin); border-bottom: 1px solid var(--rule-margin); }
.bd-link-target-wrap { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; font-family: var(--font-sans); font-size: 0.74rem; color: var(--ink-secondary); }
.bd-link-target-wrap span { white-space: nowrap; }
.bd-link-target-wrap select { flex: 1; min-width: 0; font-size: 0.8rem; }
.bd-recents { display: flex; gap: 6px; overflow-x: auto; padding: 6px 12px; }
.bd-chip { flex: 0 0 auto; border: 1px solid var(--rule-strong); background: var(--bg-surface); color: var(--ink-secondary); border-radius: 999px; padding: 4px 10px; font-size: 0.8rem; cursor: pointer; }
.bd-status { margin: 0; padding: 0 12px; min-height: 1.2em; font-size: 0.85rem; color: var(--ink-muted); }
.bd-status.bd-error { color: var(--accent-crimson); }
.bd-body { flex: 1; overflow-y: auto; padding: 4px 14px 14px; font-family: var(--font-serif); font-size: calc(1.05rem * var(--scripture-font-scale)); line-height: 1.65; -webkit-overflow-scrolling: touch; user-select: text; }
.bd-body p { margin: 0 0 0.7em; }
.bd-verse { cursor: pointer; border-radius: 4px; padding: 1px 3px; transition: background 0.12s ease; }
.bd-verse:hover { background: rgba(176, 125, 26, 0.11); }
.bd-verse.selected { background: rgba(242, 214, 117, 0.42); box-shadow: inset 2px 0 0 var(--accent-gold); }
html[data-theme="dark"] .bd-verse.selected,
html[data-theme="amber"] .bd-verse.selected { background: rgba(196, 158, 42, 0.28); }
.bd-ref { font-size: 1.05rem; margin: 6px 0 8px; }
.bd-trans { font-family: var(--font-sans); font-size: 0.7rem; color: var(--ink-muted); border: 1px solid var(--rule-strong); border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.bd-heading { font-family: var(--font-sans); font-size: 0.85rem; color: var(--ink-secondary); margin: 12px 0 4px; }
.bd-vn { font-family: var(--font-sans); font-size: 0.65em; color: var(--accent-gold); margin-right: 3px; font-weight: 600; }
/* Phone reading mode: once a passage is loaded, the lookup chrome collapses into one slim bar
   so the split sheet is mostly Scripture. Tap the reference to search again. */
.bd-compact-bar { display: none; }
.bd-inline-attribution { margin: 18px 0 6px; padding-top: 8px; border-top: 1px solid var(--rule-margin); font-size: 0.68rem; line-height: 1.35; color: var(--ink-muted); }
.app-shell.phone-mode .bible-drawer.bd-reading .bd-compact-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 6px;
  max-height: 60px;
  flex-shrink: 0;
  overflow: hidden;
  transition: max-height 0.18s ease, opacity 0.18s ease, padding 0.18s ease;
}
.app-shell.phone-mode .bible-drawer.bd-reading.bd-bar-hidden .bd-compact-bar {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .app-shell.phone-mode .bible-drawer.bd-reading .bd-compact-bar { transition: none; }
}
.bd-compact-ref {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--rule-margin);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.bd-compact-ref > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-compact-edit { color: var(--ink-muted); font-weight: 400; }
.bd-compact-bar .btn.disabled { opacity: 0.4; pointer-events: none; }
/* Link mode (opened from "+ Cross-Ref"): one-tap link replaces Logos in the slim bar */
.bd-compact-link { display: none; white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.bible-drawer.bd-link-mode .bd-compact-link { display: inline-flex; }
.bible-drawer.bd-link-mode #bibleCompactLogos { display: none; }
.bd-compact-link.bd-linked { background: var(--bg-surface); color: var(--ink-primary); border: 1px solid var(--rule-margin); }
.app-shell.phone-mode .bible-drawer.bd-reading .bd-header,
.app-shell.phone-mode .bible-drawer.bd-reading .bd-form,
.app-shell.phone-mode .bible-drawer.bd-reading .bd-recents,
.app-shell.phone-mode .bible-drawer.bd-reading .bd-status:empty,
.app-shell.phone-mode .bible-drawer.bd-reading .bd-body > .bd-ref {
  display: none;
}
/* Selection tools only appear while verses are selected */
.app-shell.phone-mode .bible-drawer.bd-reading:not(.bd-has-selection) .bd-nav,
.app-shell.phone-mode .bible-drawer.bd-reading:not(.bd-has-selection) .bd-link-bar {
  display: none;
}
.app-shell.phone-mode .bible-drawer.bd-reading .bd-nav #biblePrevChapter,
.app-shell.phone-mode .bible-drawer.bd-reading .bd-nav #bibleNextChapter {
  display: none;
}

.bd-footer { padding: 8px 14px; font-size: 0.68rem; line-height: 1.35; color: var(--ink-muted); border-top: 1px solid var(--rule-margin); }
.bd-footer a, .esv-attribution a { color: var(--accent-indigo); text-decoration: underline; }
.bd-badge { font-family: var(--font-sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--accent-indigo); border: 1px solid var(--rule-strong); background: var(--bg-surface); border-radius: 999px; padding: 3px 9px; }
.bd-header .btn.disabled { opacity: 0.4; pointer-events: none; }
.session-xrefs-bar, .verse-xrefs, .focused-xrefs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.session-xrefs-bar { margin: 4px 0 10px; font-family: var(--font-sans); font-size: 0.74rem; color: var(--ink-secondary); }
.verse-xrefs { margin-top: 6px; position: relative; z-index: 3; }
.focused-xrefs { margin-top: 8px; }
.sermon-xrefs { margin-top: 14px; }
.sermon-xref-list { display: flex; flex-direction: column; gap: 6px; }
.sermon-xref-row { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px; border: 1px solid var(--rule-margin); border-radius: 8px; background: var(--bg-surface); }
.sermon-xref-src { flex: 0 0 auto; min-width: 64px; font-family: var(--font-sans); font-size: 0.74rem; font-weight: 600; color: var(--ink-muted); }
.sermon-xref-row .xref-pill { flex: 1 1 auto; min-width: 0; justify-content: flex-start; padding: 5px 10px; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sermon-xref-row .logos-link { flex: 0 0 auto; }
.xref-pill { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--rule-strong); background: var(--bg-surface); color: var(--accent-indigo); border-radius: 999px; padding: 2px 9px; font-family: var(--font-sans); font-size: 0.72rem; font-weight: 500; cursor: pointer; line-height: 1.4; }
.xref-pill:hover { background: var(--bg-elevated); border-color: var(--accent-indigo); }
.xref-pill-wrap { display: inline-flex; align-items: center; gap: 2px; }
.xref-pill-del { border: none; background: transparent; color: var(--ink-muted); cursor: pointer; font-size: 0.72rem; padding: 2px 4px; border-radius: 999px; }
.xref-pill-del:hover { color: var(--accent-crimson); }
.esv-attribution { margin-top: 14px; padding: 10px 12px; font-size: 0.72rem; line-height: 1.45; color: var(--ink-muted); border-top: 1px solid var(--rule-margin); }
.range-load-row { display: flex; gap: 6px; align-items: center; }
.range-load-row input { flex: 1; min-width: 0; }
.esv-pill-field { display: flex; flex-direction: column; gap: 5px; justify-content: flex-end; font-size: 0.78rem; color: var(--ink-secondary); }
.esv-loading-box { padding: 20px 16px; border: 1px dashed var(--rule-strong); border-radius: 10px; background: var(--bg-surface); color: var(--ink-secondary); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* Series Review modal */
.series-review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.series-review-item {
  border: 1px solid var(--rule-margin);
  border-left: 3px solid var(--rule-margin);
  border-radius: 8px;
  padding: 8px 12px 10px;
  background: var(--bg-elevated);
}
.series-review-item.is-active { border-left-color: var(--accent-indigo); }
.series-review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.series-review-head:hover .series-review-label,
.series-review-head:focus-visible .series-review-label { text-decoration: underline; }
.series-review-label { font-weight: 600; color: var(--ink-primary); }
.series-review-meta { font-size: 0.78rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.series-review-byline { font-size: 0.8rem; color: var(--ink-secondary); margin-top: 2px; overflow-wrap: anywhere; }
.series-review-item dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 0.85rem; }
.series-review-item dt { color: var(--ink-muted); font-size: 0.75rem; padding-top: 2px; }
.series-review-item dd { margin: 0; color: var(--ink-primary); overflow-wrap: anywhere; }
.series-review-item dd.is-empty { color: var(--ink-muted); font-style: italic; }
@media (max-width: 520px) {
  .series-review-item dl { grid-template-columns: 1fr; gap: 0; }
  .series-review-item dt { padding-top: 6px; }
}

/* Share into Sermonize modal */
#shareText { width: 100%; box-sizing: border-box; resize: vertical; }

/* Local test mode badge (localhost ?devgate only) */
.local-test-banner {
  position: fixed;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-crimson);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0.85;
}
@media (max-width: 768px) {
  .local-test-banner { top: 2px; bottom: auto; font-size: 0.6rem; }
}

/* Study Notes (v0.3.31): one box per Sunday, collapsed to a link while empty */
.study-notes-open { align-self: flex-start; color: var(--ink-secondary); }
.study-notes-field textarea { min-height: 7rem; }
.week-tab-study {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-indigo);
  flex: none;
}
.series-review-item dd.series-review-study {
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink-secondary);
}

/* Search all notes (v0.3.34) */
.search-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--rule-margin);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--ink-primary);
}
.search-results { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.search-series-head { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); margin-top: 8px; }
.search-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--rule-margin);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.search-result:hover,
.search-result:focus-visible { border-color: var(--accent-indigo); outline: none; }
.search-result-where { font-size: 0.78rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.search-result-field { font-size: 0.72rem; color: var(--ink-secondary); text-align: right; }
.search-result-snippet { grid-column: 1 / -1; font-size: 0.88rem; color: var(--ink-primary); overflow-wrap: anywhere; }
.search-result-snippet mark { background: rgba(242, 214, 117, 0.6); color: inherit; border-radius: 2px; padding: 0 1px; }
html[data-theme="dark"] .search-result-snippet mark { background: rgba(196, 158, 42, 0.45); }
.search-flash { animation: search-flash 1.6s ease-out; }
@keyframes search-flash {
  0%, 30% { box-shadow: 0 0 0 3px rgba(226, 178, 74, 0.75); }
  100% { box-shadow: 0 0 0 3px rgba(226, 178, 74, 0); }
}

/* Highlights across the series (v0.3.34) */
.highlights-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hl-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--rule-margin);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.hl-filter-chip span { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.hl-filter-chip.is-on { border-color: var(--accent-indigo); color: var(--ink-primary); font-weight: 600; }
.hl-filter-chip i,
.hl-group h3 i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.hl-group { margin-bottom: 14px; }
.hl-group h3 { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; margin: 0 0 6px; color: var(--ink-primary); }
.hl-group h3 span { color: var(--ink-muted); font-weight: 400; font-size: 0.8rem; }
.hl-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hl-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--rule-margin);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hl-item:hover,
.hl-item:focus-visible { border-color: var(--accent-indigo); outline: none; }
.hl-item-ref { font-weight: 600; font-size: 0.85rem; color: var(--ink-primary); }
.hl-item-week { font-size: 0.75rem; color: var(--ink-muted); text-align: right; }
.hl-item-words { grid-column: 1 / -1; font-size: 0.85rem; color: var(--ink-primary); background: var(--hl); border-radius: 3px; padding: 1px 4px; justify-self: start; }
html[data-theme="dark"] .hl-item-words { background: none; border-left: 3px solid var(--rule-margin); }
