:root {
  --paper: #f3f1ec;
  --ink: #20201d;
  --muted: #6f6a5f;
  --line: #d9d5cc;
  --surface: #fffefa;
  --surface-strong: #fff8e6;
  --accent: #2f6f5e;
  --accent-ink: #effaf5;
  --blue: #d8e9ff;
  --green: #dff0df;
  --gold: #f7e6ae;
  --rose: #f4d8d8;
  --shadow: 0 24px 60px rgba(61, 48, 31, 0.14);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #fbfaf7 0, var(--paper) 190px);
  color: var(--ink);
}

button,
select,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px clamp(16px, 3vw, 32px);
  border-bottom: 1px solid rgba(217, 213, 204, 0.82);
  background: rgba(251, 250, 247, 0.82);
  backdrop-filter: blur(22px) saturate(1.25);
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy span,
.eyebrow,
.fine-print,
.compare-card span,
.path-pill,
.passage-heading p,
.board-header p {
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-tabs,
.panel-tabs,
.mode-actions,
.presentation-controls,
.share-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-tab,
.ghost-button,
.panel-tabs button,
.reader-controls select,
.reader-controls label,
.icon-button,
.status-pill,
.path-pill,
.reference-chip,
.primary-action,
.mode-actions button,
.presentation-controls button,
.share-options button,
.ref-list button,
.word-chips button,
.tool-button,
.color-swatch,
.pages-toolbar button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

.nav-tab,
.ghost-button,
.panel-tabs button,
.icon-button,
.primary-action,
.mode-actions button,
.presentation-controls button,
.share-options button,
.ref-list button,
.word-chips button,
.tool-button,
.pages-toolbar button {
  min-height: 38px;
  padding: 8px 12px;
}

.nav-tab.is-active,
.panel-tabs button.is-active,
.primary-action,
.presentation-controls button.is-active,
.tool-button.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.icon-button {
  width: 40px;
  height: 40px;
}

.ghost-button {
  min-height: 40px;
  padding: 8px 12px;
  justify-self: start;
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 20px;
  padding: 22px clamp(16px, 3vw, 32px) 40px;
}

.workspace.panel-closed {
  grid-template-columns: minmax(0, 1fr) 56px;
}

.mode-workspace {
  padding: 22px clamp(16px, 3vw, 32px) 44px;
}

.presenter-shell {
  display: grid;
  gap: 16px;
  max-width: 1280px;
  margin-inline: auto;
}

.study-rail,
.study-dock {
  position: sticky;
  top: 84px;
  align-self: start;
}

.study-rail {
  display: grid;
  gap: 8px;
}

.study-rail button,
.study-toggle,
.panel-close {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

.study-rail button:hover,
.panel-close:hover {
  border-color: var(--accent);
}

.study-dock {
  position: sticky;
}

.panel-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 36px;
  min-height: 36px;
  font-size: 1.25rem;
}

.home-shell {
  display: grid;
  gap: 28px;
  padding: 28px clamp(16px, 4vw, 52px) 56px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 28px;
  align-items: stretch;
  min-height: 430px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 254, 250, 0.96), rgba(239, 248, 243, 0.92)),
    radial-gradient(circle at 80% 20%, rgba(247, 230, 174, 0.55), transparent 28%);
  box-shadow: 0 30px 80px rgba(61, 48, 31, 0.12);
}

.home-hero h1 {
  font-size: clamp(4rem, 11vw, 8.5rem);
  margin-bottom: 10px;
}

.home-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.home-panel,
.home-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.88);
  box-shadow: 0 18px 52px rgba(61, 48, 31, 0.09);
}

.home-panel {
  align-self: center;
  padding: 22px;
}

.home-field-grid {
  display: grid;
  gap: 12px;
}

.home-field-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.home-field-grid select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 8px 10px;
  color: var(--ink);
}

.home-section {
  padding: clamp(18px, 3vw, 26px);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.section-heading p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.quick-grid,
.library-grid {
  display: grid;
  gap: 12px;
}

.quick-grid,
.library-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-card,
.library-card {
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.quick-card:hover,
.library-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.quick-card span,
.library-card span,
.library-card small {
  color: var(--muted);
}

.workspace.tool-select .reader-card,
.workspace.tool-select .board-editor {
  cursor: text;
}

.workspace.tool-pen .reader-card,
.workspace.tool-pen .board-editor,
.workspace.tool-pen .verse-row {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='%2320201d' d='M20.9 2.8 25.2 7.1 9.7 22.6 4.2 24.2 5.8 18.7z'/%3E%3Cpath fill='%23fffefa' d='m18.9 4.8 4.3 4.3-1.7 1.7-4.3-4.3z'/%3E%3C/svg%3E") 4 24, auto;
}

.workspace.tool-pencil .reader-card,
.workspace.tool-pencil .board-editor,
.workspace.tool-pencil .verse-row {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='%23d0a24b' d='M4 21.5 19.9 5.6l2.5 2.5L6.5 24z'/%3E%3Cpath fill='%2320201d' d='m4 21.5-.8 3.3 3.3-.8zM19.9 5.6 22.2 3.3c.5-.5 1.2-.5 1.7 0l.8.8c.5.5.5 1.2 0 1.7l-2.3 2.3z'/%3E%3C/svg%3E") 4 24, auto;
}

.workspace.tool-marker .reader-card,
.workspace.tool-marker .board-editor,
.workspace.tool-marker .verse-row {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath fill='%232f6f5e' d='m18 3 7 7-11 11H7l-2-2v-7z'/%3E%3Cpath fill='%23f7e6ae' d='M5 22h12v4H5z'/%3E%3Cpath fill='%23fffefa' d='m16.2 4.8 7 7-1.8 1.8-7-7z'/%3E%3C/svg%3E") 5 25, auto;
  user-select: text;
  -webkit-user-select: text;
}

.workspace.tool-comment .reader-card,
.workspace.tool-comment .board-editor,
.workspace.tool-comment .verse-row {
  cursor: help;
}

.workspace.tool-bookmark .reader-card,
.workspace.tool-bookmark .board-editor,
.workspace.tool-bookmark .verse-row {
  cursor: alias;
}

.workspace.tool-eraser .reader-card,
.workspace.tool-eraser .board-editor,
.workspace.tool-eraser .verse-row {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath fill='%23e9b7bd' d='m8 18 9-9 7 7-7 7h-6z'/%3E%3Cpath fill='%2320201d' d='M5 21h15v3H5z'/%3E%3Cpath fill='%23fffefa' d='m17 9 2-2 7 7-2 2z'/%3E%3C/svg%3E") 6 24, auto;
}

.reader-shell {
  min-width: 0;
}

.reader-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 16px;
}

.tool-ribbon,
.pages-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid rgba(217, 213, 204, 0.82);
  border-radius: 14px;
  background: rgba(255, 254, 250, 0.78);
  box-shadow: 0 12px 34px rgba(61, 48, 31, 0.08);
  backdrop-filter: blur(18px);
}

.tool-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.tool-button,
.highlight-selection-button,
.pages-toolbar button {
  display: grid;
  min-width: 38px;
  place-items: center;
  font-weight: 800;
}

.tool-button,
.pages-toolbar button {
  width: 38px;
  padding: 0;
}

.highlight-selection-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: #eef8f3;
  color: var(--accent);
}

.board-page-status {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.tool-button:hover,
.color-swatch:hover,
.pages-toolbar button:hover {
  transform: translateY(-1px);
}

.pages-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.color-group {
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.color-swatch {
  width: 26px;
  height: 26px;
  padding: 0;
}

.color-swatch.is-active {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.swatch-gold {
  background: var(--gold);
}

.swatch-green {
  background: var(--green);
}

.swatch-blue {
  background: var(--blue);
}

.swatch-rose {
  background: var(--rose);
}

.swatch-violet {
  background: #e5dcff;
}

.tool-hint {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.84rem;
}

.reader-controls label {
  display: grid;
  min-width: 150px;
  gap: 4px;
  padding: 7px 9px;
  color: var(--muted);
  font-size: 0.78rem;
}

.reader-controls select {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.path-pill {
  align-self: stretch;
  display: grid;
  place-items: center;
  padding: 8px 12px;
}

.reader-card,
.study-panel,
.board-view,
.presentation-mode,
.share-drawer {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(61, 48, 31, 0.12);
}

.reader-card {
  padding: clamp(18px, 4vw, 38px);
  max-width: 980px;
  margin-inline: auto;
  user-select: text;
  -webkit-user-select: text;
}

.ink-surface {
  position: relative;
}

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

.workspace.tool-pen .ink-surface,
.workspace.tool-pencil .ink-surface {
  touch-action: none;
}

.workspace.tool-marker .ink-surface,
.workspace.tool-eraser .ink-surface {
  touch-action: pan-y pinch-zoom;
}

.reader-card > :not(.ink-layer),
.board-view > :not(.ink-layer) {
  position: relative;
  z-index: 2;
}

.passage-heading,
.board-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  font-size: 1.05rem;
}

.scripture-list {
  display: grid;
  gap: 10px;
}

.verse-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.verse-row * {
  user-select: text;
  -webkit-user-select: text;
}

.verse-row .verse-tools,
.verse-row .verse-number {
  user-select: none;
  -webkit-user-select: none;
}

.verse-row:hover,
.verse-row.is-selected {
  border-color: var(--accent);
  background: #fffdf7;
}

.verse-row.is-bookmarked {
  box-shadow: inset 4px 0 0 #b17d28;
}

.verse-number {
  color: var(--accent);
  font-weight: 800;
}

.verse-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.16rem, 2vw, 1.55rem);
  line-height: 1.65;
}

.verse-tools {
  display: flex;
  gap: 6px;
  align-items: start;
  min-width: 22px;
  padding-top: 2px;
  user-select: none;
  -webkit-user-select: none;
}

.verse-indicator {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.verse-indicator svg {
  display: block;
}

.verse-indicator:hover {
  border-color: var(--line);
  background: var(--surface);
  transform: translateY(-1px);
}

.note-indicator {
  color: var(--accent);
  background: rgba(47, 111, 94, 0.08);
}

.note-indicator:hover {
  background: rgba(47, 111, 94, 0.16);
  border-color: var(--accent);
}

.bookmark-indicator {
  color: #b17d28;
  background: rgba(177, 125, 40, 0.1);
}

.bookmark-indicator:hover {
  background: rgba(177, 125, 40, 0.2);
  border-color: #b17d28;
}

.highlight-gold .verse-text {
  background: linear-gradient(transparent 58%, var(--gold) 58%);
}

.inline-highlight.highlight-gold {
  background: var(--gold);
}

.highlight-green .verse-text {
  background: linear-gradient(transparent 58%, var(--green) 58%);
}

.inline-highlight.highlight-green {
  background: var(--green);
}

.highlight-blue .verse-text {
  background: linear-gradient(transparent 58%, var(--blue) 58%);
}

.inline-highlight.highlight-blue {
  background: var(--blue);
}

.highlight-rose .verse-text {
  background: linear-gradient(transparent 58%, var(--rose) 58%);
}

.inline-highlight.highlight-rose {
  background: var(--rose);
}

.highlight-violet .verse-text {
  background: linear-gradient(transparent 58%, #e5dcff 58%);
}

.inline-highlight.highlight-violet {
  background: #e5dcff;
}

.inline-highlight {
  border-radius: 4px;
  padding: 0 2px;
}

.word-token {
  border-radius: 5px;
}

.word-token:hover {
  background: #e9f3ef;
  color: #154d3e;
}

.word-token.is-active {
  background: #dcefe8;
  color: #154d3e;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.study-panel {
  position: sticky;
  top: 84px;
  align-self: start;
  overflow: hidden;
}

.panel-tabs {
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.panel-body {
  padding: 18px;
}

.compare-stack,
.board-grid,
.presentation-mode {
  display: grid;
  gap: 14px;
}

.compare-card,
.study-card,
.selected-word-card,
.teaching-block,
.public-screen,
.private-notes,
.board-sidebar {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf0;
  padding: 14px;
}

.teaching-block {
  scroll-margin: 140px;
}

.teaching-block.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.12);
}

.teaching-block small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.board-page-label {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.board-page-label strong {
  color: var(--accent);
}

.selected-word-card {
  margin-bottom: 14px;
  background: #eef8f3;
}

.selected-word-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.selected-word-card strong {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.compare-card.is-primary {
  border-color: var(--accent);
  background: #eef8f3;
}

.compare-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.verse-popup {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px 46px;
  padding: 10px 12px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: popup-in 120ms ease-out;
}

.popup-pointer {
  position: absolute;
  top: -7px;
  left: 24px;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  background: var(--surface);
  transform: rotate(45deg);
}

.popup-reference {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 0.82rem;
  white-space: nowrap;
}

.popup-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.popup-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
  white-space: nowrap;
}

.popup-actions button:hover {
  border-color: var(--accent);
  background: #effaf5;
}

.popup-actions button.is-on {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.popup-close {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
}

.popup-close:hover {
  color: var(--ink);
  border-color: var(--ink);
}

@keyframes popup-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.phase-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px dashed var(--muted);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.board-view {
  padding: clamp(18px, 4vw, 30px);
  max-width: 1120px;
  margin-inline: auto;
}

.board-grid {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.board-editor {
  min-height: 560px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.board-map {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.board-map-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.board-map-card button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

.board-map-card > button:first-child {
  display: grid;
  gap: 2px;
  padding: 10px;
  text-align: left;
}

.board-map-card span,
.board-map-card small {
  color: var(--muted);
  font-size: 0.76rem;
}

.board-map-card.is-active > button:first-child {
  border-color: var(--accent);
  background: #eef8f3;
}

.mini-present {
  padding: 8px 10px;
  color: var(--accent);
  font-weight: 800;
}

.board-present-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 60;
  display: grid;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 32px 90px rgba(32, 32, 29, 0.24);
  overflow: auto;
  transform: translate(-50%, -50%);
}

.modal-header {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
}

.modal-header h2 {
  margin-bottom: 0;
}

.modal-header .panel-close {
  position: static;
}

.modal-preview {
  padding: clamp(18px, 4vw, 34px);
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
}

.modal-preview span {
  color: #cbbf9c;
  font-weight: 800;
}

.modal-preview h3 {
  margin: 10px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.modal-preview p {
  margin-bottom: 0;
  color: #f6efe1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.45;
}

.modal-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-options button,
.modal-options a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.board-editor * {
  user-select: text;
  -webkit-user-select: text;
}

.reference-chip {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.resource-link {
  display: inline-flex;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.presentation-mode {
  display: grid;
  gap: 18px;
  padding: clamp(16px, 3vw, 28px);
}

.mode-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.mode-header h1 {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 5vw, 4.75rem);
  line-height: 0.95;
}

.present-link {
  text-decoration: none;
  white-space: nowrap;
}

.presentation-controls {
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 254, 250, 0.72);
}

.mode-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: stretch;
}

.public-screen {
  display: grid;
  align-content: center;
  min-height: clamp(280px, 48vh, 620px);
  background: var(--ink);
  color: var(--paper);
}

.public-screen .eyebrow {
  color: #cdc4b4;
}

.public-screen p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.55;
}

.public-screen h2 {
  margin: 8px 0 0;
}

.question-preview h2 {
  max-width: 900px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1.14;
}

.blank-preview {
  place-items: center;
  text-align: center;
}

.public-compare-line {
  display: grid;
  gap: 6px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 254, 250, 0.18);
  color: #f4ead8;
}

.public-compare-line span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.45vw, 1.28rem);
  line-height: 1.4;
}

.private-notes {
  background: var(--surface-strong);
}

.private-notes p {
  font-size: 1.05rem;
  line-height: 1.55;
}

.present-page {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 48px);
  background: #141412;
  color: var(--paper);
}

.audience-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100vh - clamp(36px, 8vw, 96px));
  gap: clamp(24px, 4vw, 48px);
}

.audience-show-compare {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.audience-blank {
  grid-template-rows: auto minmax(0, 1fr);
}

.audience-top,
.audience-compare {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  color: #d8d0c2;
}

.audience-scripture {
  display: grid;
  align-content: center;
  max-width: 1180px;
  margin-inline: auto;
}

.audience-scripture span,
.audience-compare span {
  color: #cbbf9c;
  font-weight: 800;
}

.audience-scripture h1 {
  margin: 14px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 7.25rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.audience-question .audience-scripture h1 {
  max-width: 1080px;
  font-size: clamp(3rem, 6vw, 6.25rem);
}

.audience-board .audience-scripture h1 {
  font-size: clamp(3rem, 6vw, 6.5rem);
}

.audience-board .audience-scripture p {
  max-width: 980px;
  margin: 22px 0 0;
  color: #f6efe1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 2.4vw, 2.2rem);
  line-height: 1.35;
}

.audience-compare {
  max-width: 1180px;
  width: 100%;
  margin-inline: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 254, 250, 0.18);
}

.audience-compare p {
  max-width: 760px;
  margin: 0;
  color: #f6efe1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2vw, 1.8rem);
  line-height: 1.35;
}

textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.ref-list,
.word-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(32, 32, 29, 0.2);
}

.share-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(410px, 100vw);
  padding: 24px;
  border-radius: 0;
}

.share-drawer label {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.share-drawer input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
}

.share-drawer textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--surface);
}

.demo-list {
  display: grid;
  gap: 12px;
  padding-left: 22px;
  line-height: 1.45;
}

.full-width {
  width: 100%;
  margin-top: 16px;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .nav-tabs {
    grid-column: 1 / -1;
  }

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

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

  .mode-header,
  .audience-compare {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .quick-grid,
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-panel {
    position: static;
  }

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

@media (max-width: 680px) {
  .topbar {
    padding: 12px;
  }

  .brand-copy span,
  .path-pill {
    display: none;
  }

  .workspace {
    padding: 14px 12px 32px;
  }

  .home-shell {
    padding: 14px 12px 34px;
  }

  .home-hero {
    padding: 22px;
  }

  .quick-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .reader-card,
  .board-view {
    padding: 16px;
  }

  .verse-row {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .verse-tools {
    grid-column: 2;
  }

  .verse-popup {
    margin-left: 32px;
  }
}
