/* ==========================================================================
   St. Gregory of Tatev — Book of Questions (Գիրք հարցմանց)
   Modern Illuminated Scripture Reader
   ========================================================================== */

@font-face {
  font-family: 'Arian Grqi';
  src: url('fonts/Arian_Grqi_U.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Armenian:wght@400;500;600&family=Noto+Serif+Armenian:wght@400;500;600;700&family=Noto+Serif:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* --- Theme Tokens --- */
:root,
[data-theme="parchment"] {
  --bg-primary: #faf4e8;
  --bg-secondary: #f2ead7;
  --bg-surface: #fdfaf2;
  --bg-surface-translucent: rgba(250, 244, 232, 0.9);
  --border-color: #e3d6bc;
  --border-subtle: #ece2cc;

  --text-primary: #261d15;
  --text-secondary: #635547;
  --text-muted: #948472;

  --accent-color: #8a241b;
  --accent-hover: #6e1a13;
  --accent-bg: rgba(138, 36, 27, 0.08);
  --gold-accent: #b58932;

  --highlight-bg: rgba(214, 167, 68, 0.24);
  --highlight-hover: rgba(214, 167, 68, 0.12);
  --highlight-pulse: rgba(214, 167, 68, 0.48);
  --highlight-underline: #b88424;

  --bubble-bg: #261d15;
  --bubble-text: #faf4e8;
  --bubble-hover: rgba(250, 244, 232, 0.14);
  --bubble-divider: rgba(250, 244, 232, 0.18);

  --note-scripture: #b58932;
  --note-scripture-bg: rgba(181, 137, 50, 0.12);
  --note-history: #8a241b;
  --note-history-bg: rgba(138, 36, 27, 0.1);
  --note-theology: #3b4d7a;
  --note-theology-bg: rgba(59, 77, 122, 0.1);
  --note-funfact: #3b6b4f;
  --note-funfact-bg: rgba(59, 107, 79, 0.1);

  --shadow-sm: 0 1px 3px rgba(38, 29, 21, 0.06);
  --shadow-md: 0 6px 20px rgba(38, 29, 21, 0.1);
  --shadow-bubble: 0 10px 28px rgba(24, 17, 11, 0.28), 0 2px 6px rgba(24, 17, 11, 0.16);
}

[data-theme="light"] {
  --bg-primary: #fcfbfa;
  --bg-secondary: #f4f3ef;
  --bg-surface: #ffffff;
  --bg-surface-translucent: rgba(252, 251, 250, 0.92);
  --border-color: #e5e2dc;
  --border-subtle: #eeece7;

  --text-primary: #1a1816;
  --text-secondary: #57534e;
  --text-muted: #8a837c;

  --accent-color: #7c2d12;
  --accent-hover: #5c1f0a;
  --accent-bg: rgba(124, 45, 18, 0.07);
  --gold-accent: #b45309;

  --highlight-bg: rgba(245, 196, 81, 0.26);
  --highlight-hover: rgba(245, 196, 81, 0.13);
  --highlight-pulse: rgba(245, 196, 81, 0.5);
  --highlight-underline: #d97706;

  --bubble-bg: #1c1917;
  --bubble-text: #fafaf9;
  --bubble-hover: rgba(255, 255, 255, 0.14);
  --bubble-divider: rgba(255, 255, 255, 0.18);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-bubble: 0 10px 28px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
  --bg-primary: #13110e;
  --bg-secondary: #191612;
  --bg-surface: #201c17;
  --bg-surface-translucent: rgba(19, 17, 14, 0.92);
  --border-color: #2e2922;
  --border-subtle: #25211b;

  --text-primary: #e8dfd1;
  --text-secondary: #a89d8e;
  --text-muted: #706659;

  --accent-color: #d49b4b;
  --accent-hover: #e4b269;
  --accent-bg: rgba(212, 155, 75, 0.12);
  --gold-accent: #d49b4b;

  --highlight-bg: rgba(212, 155, 75, 0.2);
  --highlight-hover: rgba(212, 155, 75, 0.1);
  --highlight-pulse: rgba(212, 155, 75, 0.4);
  --highlight-underline: #d49b4b;

  --bubble-bg: #e8dfd1;
  --bubble-text: #181410;
  --bubble-hover: rgba(24, 20, 16, 0.1);
  --bubble-divider: rgba(24, 20, 16, 0.16);

  --note-scripture: #d49b4b;
  --note-scripture-bg: rgba(212, 155, 75, 0.14);
  --note-history: #d96b60;
  --note-history-bg: rgba(217, 107, 96, 0.14);
  --note-theology: #7b96d4;
  --note-theology-bg: rgba(123, 150, 212, 0.14);
  --note-funfact: #6ab087;
  --note-funfact-bg: rgba(106, 176, 135, 0.14);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-bubble: 0 10px 30px rgba(0, 0, 0, 0.55);
}

/* --- Font Family Modes --- */
:root,
[data-font="arian"] {
  --font-reading: 'Arian Grqi', 'Noto Serif Armenian', Georgia, serif;
  --reading-line-height: 1.92;
}

[data-font="modern"] {
  --font-reading: 'Noto Serif Armenian', Georgia, 'Times New Roman', serif;
  --reading-line-height: 1.84;
}

:root {
  --font-ui: 'Noto Sans Armenian', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-translation: 'Noto Serif', 'Noto Serif Armenian', Georgia, 'Times New Roman', serif;
  --reader-font-size: 20px;
  --reader-max-width: 680px;
  --parallel-cols: 1;
  --sidebar-width: 320px;
  --header-height: 56px;
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* --- App Shell --- */
.reader-app {
  --header-actual-height: var(--header-height);
  --header-offset: 0px;
  --header-visible-height: calc(var(--header-actual-height) + var(--header-offset));
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* --- Top Header --- */
.reader-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-surface-translucent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 35;
  transform: translateY(var(--header-offset));
  will-change: transform;
}

.reader-header.is-offscreen {
  pointer-events: none;
}

.reader-header-main {
  height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  justify-self: stretch;
}

.header-center {
  justify-self: center;
  width: min(32vw, 380px);
  min-width: 140px;
}

.header-search-bar {
  width: 100%;
  height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.header-search-bar:hover {
  border-color: var(--accent-color);
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.icon-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.header-branding {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.book-title-btn {
  flex: 0 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
}

.book-title {
  font-family: var(--font-reading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sep {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.current-chapter-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  justify-self: end;
}

/* Segmented control (also used by the footnotes language switch) */
.segmented-control {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.seg-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.active {
  background-color: var(--bg-surface);
  color: var(--accent-color);
  box-shadow: var(--shadow-sm);
}

.lang-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-controls.hidden,
.lang-select-wrap.hidden {
  display: none;
}

.lang-select-wrap {
  position: relative;
  display: inline-flex;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  height: 34px;
  width: auto;
  max-width: 100%;
  padding: 0 26px 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-secondary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8275' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.lang-select:hover {
  border-color: var(--accent-color);
}

.lang-select:focus-visible {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 22%, transparent);
}

.parallel-toggle-btn {
  border: 1px solid transparent;
}

.parallel-toggle-btn.active {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--accent-color);
  box-shadow: var(--shadow-sm);
}

.col-close-btn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.col-close-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transform: scale(1.06);
}

.col-close-btn:active {
  transform: scale(0.94);
}

/* --- UI Language & Settings Dropdowns --- */
.ui-lang-menu-wrap,
.settings-menu-wrap {
  position: relative;
}

.ui-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 148px;
  padding: 6px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
}

.ui-lang-option {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ui-lang-option:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.ui-lang-option.active {
  background-color: var(--accent-bg);
  color: var(--accent-color);
  font-weight: 600;
}

.ui-lang-option.active::after {
  content: '✓';
  font-size: 0.8rem;
}

.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  padding: 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 60;
}

.settings-dropdown.hidden {
  display: none;
}

.settings-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* --- Main Workspace --- */
.main-wrapper {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
}

/* --- Table of Contents Sidebar --- */
.toc-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding-top: var(--header-visible-height);
  transition: margin-left 0.25s cubic-bezier(0.22, 1, 0.36, 1), transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 25;
}

.toc-sidebar.collapsed {
  margin-left: calc(-1 * var(--sidebar-width));
}

[data-cols="2"] .toc-sidebar {
  position: fixed;
  top: var(--header-visible-height);
  bottom: 0;
  left: 0;
  margin-left: 0;
  padding-top: 0;
  box-shadow: var(--shadow-bubble);
  z-index: 30;
}

[data-cols="2"] .toc-sidebar.collapsed {
  margin-left: 0;
  transform: translateX(-100%);
}

.toc-search-box {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text-muted);
  transition: border-color 0.15s ease;
}

.search-input-wrapper:focus-within {
  border-color: var(--accent-color);
}

.toc-search-input {
  width: 100%;
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  color: var(--text-primary);
}

.toc-search-input::placeholder {
  color: var(--text-muted);
}

.toc-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 24px;
}

.toc-group {
  margin-bottom: 4px;
}

.toc-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

.toc-group-header:hover {
  background-color: rgba(128, 128, 128, 0.08);
}

.toc-chevron {
  transition: transform 0.2s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

.toc-group.collapsed .toc-chevron {
  transform: rotate(-90deg);
}

.toc-group.collapsed .toc-sublist {
  display: none;
}

.toc-sublist {
  padding-left: 6px;
  margin-top: 2px;
}

.toc-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.81rem;
  line-height: 1.45;
  color: var(--text-secondary);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.toc-item.level-3 {
  padding-left: 20px;
  font-size: 0.78rem;
}

.toc-item:hover {
  background-color: rgba(128, 128, 128, 0.08);
  color: var(--text-primary);
}

.toc-item.active {
  background-color: var(--accent-bg);
  color: var(--accent-color);
  font-weight: 600;
}

.chapter-number {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.toc-item.active .chapter-number {
  color: var(--accent-color);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: var(--header-visible-height) 0 0 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.sidebar-backdrop.visible {
  display: block;
}

/* --- Reading Pane --- */
.reading-pane {
  flex: 1;
  overflow-y: auto;
  position: relative;
  padding: calc(var(--header-actual-height) + 40px) 28px 120px;
  scroll-behavior: smooth;
}

[data-cols="2"] .reading-pane {
  padding-top: calc(var(--header-actual-height) + 20px);
}

.reading-content-container {
  max-width: var(--reader-max-width);
  margin: 0 auto;
  transition: max-width 0.25s ease;
}

[data-cols="2"] .reading-content-container {
  max-width: 1120px;
}

[data-cols="3"] .reading-content-container {
  max-width: 1440px;
}

[data-cols="4"] .reading-content-container {
  max-width: 1680px;
}

.loading-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.ornament {
  font-size: 1.25rem;
  color: var(--gold-accent);
  margin-bottom: 12px;
  opacity: 0.85;
}

/* --- Chapter Typography (Old Scripture Vibe) --- */
.chapter-header {
  text-align: center;
  padding-bottom: 28px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.chapter-header::after {
  content: '✦';
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--bg-primary);
  padding: 0 12px;
  color: var(--gold-accent);
  font-size: 0.9rem;
}

.chapter-volume-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.chapter-volume-label.is-link {
  text-decoration: none;
}

.chapter-volume-label.is-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.chapter-title {
  font-family: var(--font-reading);
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  font-weight: 600;
  line-height: 1.38;
  color: var(--accent-color);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.book-body {
  font-family: var(--font-reading);
  font-size: var(--reader-font-size);
  line-height: var(--reading-line-height);
  color: var(--text-primary);
  text-align: left;
  hyphens: auto;
}

.book-paragraph {
  margin-bottom: 1.45em;
  text-indent: 1.5em;
}

.book-paragraph:first-of-type {
  text-indent: 0;
}

/* --- Parallel Reading Columns --- */
.parallel-title-row {
  display: grid;
  grid-template-columns: repeat(var(--parallel-cols), minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 24px;
  text-align: left;
}

.parallel-title-cell {
  min-width: 0;
}

.parallel-title-cell + .parallel-title-cell {
  border-left: 1px solid var(--border-subtle);
  padding-left: 24px;
}

.parallel-title-cell .chapter-title {
  margin-bottom: 0;
}

.chapter-title[lang="en"],
.chapter-title[lang="ru"],
.chapter-title[lang="es"] {
  font-family: var(--font-translation);
}

.parallel-col-headers {
  border-top: 1px solid var(--border-subtle);
  padding: 8px 28px 10px;
}

.parallel-col-headers.hidden {
  display: none;
}

.parallel-col-headers-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(var(--parallel-cols), minmax(0, 1fr));
  gap: 28px;
}

.parallel-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.parallel-col-header .lang-select {
  flex: 0 1 auto;
  min-width: 0;
  text-overflow: ellipsis;
}

.parallel-row {
  display: grid;
  grid-template-columns: repeat(var(--parallel-cols), minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 1.5em;
  align-items: start;
}

.parallel-cell {
  min-width: 0;
}

.parallel-cell .book-paragraph {
  margin-bottom: 0;
  text-indent: 0;
}

.parallel-cell + .parallel-cell {
  border-left: 1px solid var(--border-subtle);
  padding-left: 24px;
}

.parallel-lang-badge {
  display: none;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 4px;
}

.translation-text {
  font-family: var(--font-translation);
  font-size: calc(var(--reader-font-size) * 0.94);
  line-height: 1.78;
}

.parallel-disclaimers {
  display: grid;
  grid-template-columns: repeat(var(--parallel-cols), minmax(0, 1fr));
  gap: 28px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-color);
}

.translation-disclaimer {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--text-muted);
}

[data-cols="2"] .parallel-disclaimers .translation-disclaimer + .translation-disclaimer,
[data-cols="3"] .parallel-disclaimers .translation-disclaimer + .translation-disclaimer,
[data-cols="4"] .parallel-disclaimers .translation-disclaimer + .translation-disclaimer {
  border-left: 1px solid var(--border-subtle);
  padding-left: 24px;
}

.drop-cap {
  font-size: 2.65em;
  line-height: 0.85;
  float: left;
  padding-right: 0.16em;
  padding-top: 0.08em;
  color: var(--accent-color);
  font-weight: 600;
}

/* --- Sentence Highlighting --- */
.reader-sentence {
  cursor: pointer;
  border-radius: 3px;
  padding: 1px 0;
  transition: background-color 0.16s ease;
}

.reader-sentence:hover {
  background-color: var(--highlight-hover);
}

.reader-sentence.is-selected {
  background-color: var(--highlight-bg);
  box-shadow: inset 0 -1.5px 0 var(--highlight-underline);
}

.reader-sentence.is-shared-target {
  animation: scripturePulse 2.2s ease-out;
}

@keyframes scripturePulse {
  0% { background-color: var(--highlight-pulse); }
  100% { background-color: var(--highlight-bg); }
}

/* --- Fixed Side Chapter Navigation Arrows --- */
.side-nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: left 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.side-nav-prev {
  left: 14px;
}

@media (min-width: 860px) {
  [data-cols="1"] .toc-sidebar:not(.collapsed) ~ .side-nav-prev {
    left: calc(var(--sidebar-width) + 14px);
  }
}

.side-nav-next {
  right: 14px;
}

.side-nav-btn:hover:not(:disabled) {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-50%) scale(1.06);
  box-shadow: var(--shadow-md);
}

.side-nav-btn:active:not(:disabled) {
  transform: translateY(-50%) scale(0.96);
}

.side-nav-btn:disabled {
  opacity: 0.28;
  cursor: default;
  pointer-events: none;
}

.side-nav-btn.hidden {
  display: none;
}

/* --- Compact Floating Tools Bubble --- */
.tools-bubble {
  position: absolute;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background-color: var(--bubble-bg);
  color: var(--bubble-text);
  border-radius: 9999px;
  box-shadow: var(--shadow-bubble);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(0.96);
  transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.tools-bubble.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.tools-bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
}

.tools-bubble.arrow-bottom::after {
  top: 100%;
  border-top-color: var(--bubble-bg);
}

.tools-bubble.arrow-top::after {
  bottom: 100%;
  border-bottom-color: var(--bubble-bg);
}

.bubble-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--bubble-text);
  transition: background-color 0.14s ease;
  white-space: nowrap;
}

.bubble-btn:hover {
  background-color: var(--bubble-hover);
}

.bubble-divider {
  width: 1px;
  height: 16px;
  background-color: var(--bubble-divider);
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background-color: var(--bubble-bg);
  color: var(--bubble-text);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Footnotes Panel --- */
.notes-toggle-btn {
  position: relative;
}

.notes-toggle-btn.active {
  background-color: var(--accent-bg);
  color: var(--accent-color);
}

.notes-count-badge {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 9999px;
  background-color: var(--accent-color);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 15px;
  text-align: center;
}

.notes-count-badge.hidden {
  display: none;
}

.notes-backdrop {
  display: none;
  position: fixed;
  inset: var(--header-visible-height) 0 0 0;
  background: rgba(18, 14, 10, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 28;
}

.notes-backdrop.visible {
  display: block;
}

.notes-panel {
  position: fixed;
  top: var(--header-visible-height);
  bottom: 0;
  right: 0;
  width: 45vw;
  max-width: 960px;
  background-color: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-bubble);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 30;
}

.notes-panel.collapsed {
  transform: translateX(100%);
}

.notes-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 8px;
}

.notes-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
}

.notes-panel-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 9999px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.notes-panel-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notes-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notes-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.note-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 3.5px solid var(--border-color);
  border-radius: 8px;
  padding: 11px 12px;
  box-shadow: var(--shadow-sm);
}

.note-card[data-type="scripture"] {
  border-left-color: var(--note-scripture);
}

.note-card[data-type="church_history"] {
  border-left-color: var(--note-history);
}

.note-card[data-type="theology"] {
  border-left-color: var(--note-theology);
}

.note-card[data-type="fun_fact"] {
  border-left-color: var(--note-funfact);
}

.note-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.note-type-pill {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 9999px;
}

.note-card[data-type="scripture"] .note-type-pill {
  background-color: var(--note-scripture-bg);
  color: var(--note-scripture);
}

.note-card[data-type="church_history"] .note-type-pill {
  background-color: var(--note-history-bg);
  color: var(--note-history);
}

.note-card[data-type="theology"] .note-type-pill {
  background-color: var(--note-theology-bg);
  color: var(--note-theology);
}

.note-card[data-type="fun_fact"] .note-type-pill {
  background-color: var(--note-funfact-bg);
  color: var(--note-funfact);
}

.note-ref-pill {
  font-size: 0.69rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 9999px;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.note-card-title {
  font-family: var(--font-translation);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.38;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.note-card-body {
  font-family: var(--font-ui);
  font-size: 0.81rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.notes-panel-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--text-muted);
}

/* --- Global FTS5 Search Modal --- */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(18, 14, 10, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 16px 24px;
}

.search-modal-overlay.hidden {
  display: none;
}

.search-modal-card {
  width: 100%;
  max-width: 820px;
  max-height: calc(100vh - 96px);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-bubble);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-modal-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
}

.search-modal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.search-modal-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-ui);
  font-size: 0.96rem;
  color: var(--text-primary);
}

.search-scope-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.search-scope-pills.hidden,
.scope-pill.hidden {
  display: none;
}

.scope-pill {
  font-size: 0.74rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 9999px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.scope-pill.active {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.search-modal-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.search-books-sidebar {
  flex: 0 0 30%;
  width: 30%;
  border-right: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
  overflow-y: auto;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-book-item {
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.83rem;
  line-height: 1.35;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}

.search-book-item:hover:not(:disabled) {
  background-color: var(--bg-surface);
}

.search-book-item.active {
  background-color: var(--accent-bg);
  border-color: var(--accent-color);
  color: var(--accent-color);
  font-weight: 600;
}

.search-book-item.is-empty {
  color: var(--text-muted);
  opacity: 0.45;
}

.search-book-item:disabled {
  cursor: not-allowed;
}

.search-book-item.active.is-empty {
  border-color: var(--border-color);
  background-color: var(--bg-surface);
}

.search-book-name {
  min-width: 0;
  flex: 1;
}

.search-book-count {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 9999px;
  background-color: var(--bg-surface);
  color: var(--text-secondary);
}

.search-book-item.active .search-book-count {
  background-color: var(--accent-color);
  color: #fff;
}

.search-book-item.is-empty .search-book-count {
  background-color: transparent;
  color: var(--text-muted);
}

.search-results-list {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-book-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}

@media (max-width: 640px) {
  .search-modal-body {
    flex-direction: column;
  }

  .search-books-sidebar {
    width: 100%;
    flex: 0 0 auto;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px;
    gap: 6px;
  }

  .search-book-item {
    width: auto;
    flex: 0 0 auto;
    max-width: 210px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }
}

.search-empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-result-item {
  display: block;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  background-color: var(--bg-primary);
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.search-result-item:hover {
  border-color: var(--accent-color);
  background-color: var(--bg-surface);
}

.search-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.search-result-badge {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 9999px;
  background-color: var(--accent-bg);
  color: var(--accent-color);
}

.search-result-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-snippet {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.search-result-snippet mark {
  background-color: var(--highlight-bg);
  color: var(--text-primary);
  padding: 0 2px;
  border-radius: 2px;
}

mark.search-hit {
  background-color: var(--highlight-bg);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
  box-shadow: inset 0 -1.5px 0 var(--highlight-underline);
}

mark.search-hit.is-primary {
  box-shadow: 0 0 0 2px var(--highlight-underline);
}

/* --- Custom Scrollbars --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Responsive --- */
@media (max-width: 859px) {
  .toc-sidebar {
    position: fixed;
    top: var(--header-visible-height);
    bottom: 0;
    left: 0;
    margin-left: 0;
    padding-top: 0;
    box-shadow: var(--shadow-md);
  }

  .toc-sidebar.collapsed {
    margin-left: 0;
    transform: translateX(-100%);
  }

  .notes-panel {
    width: 88vw;
  }

  .brand-sep,
  .current-chapter-title {
    display: none;
  }

  .reading-pane {
    padding: calc(var(--header-actual-height) + 28px) 18px 100px;
  }

  .parallel-col-headers {
    padding: 8px 18px 10px;
  }

  .parallel-col-headers-inner {
    gap: 16px;
  }

  .parallel-row,
  .parallel-title-row,
  .parallel-disclaimers {
    gap: 16px;
  }

  .parallel-cell + .parallel-cell,
  .parallel-title-cell + .parallel-title-cell,
  .parallel-disclaimers .translation-disclaimer + .translation-disclaimer {
    padding-left: 16px;
  }
}

@media (max-width: 599px), (max-width: 859px) and (orientation: portrait) {
  .parallel-toggle-btn {
    display: none;
  }
}

@media (max-width: 560px) {
  .reader-header-main {
    padding: 0 10px;
    gap: 8px;
  }

  .header-center {
    width: auto;
    min-width: 84px;
  }

  .seg-btn {
    padding: 0 7px;
    font-size: 0.72rem;
  }

  .book-body {
    text-align: left;
  }
}

/* --- Multi-Book Library Index --- */
.book-title-btn {
  background: none;
  border: none;
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: 6px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.book-title-btn:hover:not(:disabled) {
  background-color: var(--accent-bg);
  color: var(--accent-color);
}

.book-title-btn:disabled {
  cursor: default;
  pointer-events: none;
}

.reading-content-container:has(.library-view) {
  max-width: 1120px;
}

.library-view {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 12px 56px;
}

.library-header {
  text-align: center;
  margin-bottom: 36px;
}

.library-ornament {
  color: var(--gold-accent);
  font-size: 1.35rem;
  margin-bottom: 10px;
  letter-spacing: 0.25em;
}

.library-title {
  font-family: var(--font-display, 'Arian Grqi', 'Noto Serif Armenian', serif);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.library-subtitle {
  font-size: 0.96rem;
  color: var(--text-secondary);
  margin: 0;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.book-tile {
  width: 100%;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.book-tile:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 4px;
}

.book-tile-cover-wrap {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.book-tile-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-tile-title {
  font-family: var(--font-display, 'Arian Grqi', 'Noto Serif Armenian', serif);
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 14px 0 0;
  line-height: 1.38;
  transition: color 0.18s ease;
}

.book-tile:hover .book-tile-cover-wrap {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.1);
}

.book-tile:hover .book-tile-title {
  color: var(--accent-color);
}

.chapter-subhead {
  font-family: var(--font-reading);
  font-size: 1.18em;
  font-weight: 600;
  color: var(--accent-color);
  margin: 1.8em 0 0.75em;
  padding-top: 0.9em;
  border-top: 1px solid var(--border-subtle);
  line-height: 1.45;
}

.chapter-subhead:first-child,
.chapter-subhead[data-pid="0"] {
  margin-top: 0.4em;
  padding-top: 0;
  border-top: none;
}

.chapter-subheading {
  font-family: var(--font-reading);
  font-size: 1.04em;
  font-weight: 600;
  color: var(--accent-color);
  margin: 0.6em 0 1em;
  line-height: 1.45;
}

.chapter-subhead[lang="en"],
.chapter-subhead[lang="ru"],
.chapter-subhead[lang="es"],
.chapter-subheading[lang="en"],
.chapter-subheading[lang="ru"],
.chapter-subheading[lang="es"] {
  font-family: var(--font-translation);
}

.parallel-cell .chapter-subhead,
.parallel-cell .chapter-subheading {
  margin-bottom: 0;
}

.parallel-cell .chapter-subhead[data-pid="0"],
.parallel-cell .chapter-subheading[data-pid="0"] {
  margin-top: 0;
}

@media (max-width: 820px) {
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }

  .book-tile-title {
    font-size: 0.96rem;
    margin-top: 10px;
  }
}

/* --- Suggest Improvement Modal --- */
.suggest-modal-card {
  max-width: 600px;
}

.suggest-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.suggest-modal-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.suggest-modal-title {
  margin: 0;
  font-family: var(--font-reading);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text-primary);
}

.suggest-modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.suggest-modal-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggest-quote-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-color);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggest-quote-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.suggest-lang-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-color);
  background: var(--accent-bg);
  padding: 2px 7px;
  border-radius: 5px;
}

.suggest-chapter-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggest-quote-text {
  margin: 0;
  font-family: var(--font-reading);
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-primary);
  max-height: 140px;
  overflow-y: auto;
}

.suggest-direct-link {
  font-size: 0.76rem;
  color: var(--accent-color);
  word-break: break-all;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.suggest-field-label {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.suggest-textarea {
  width: 100%;
  min-height: 96px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease;
}

.suggest-textarea:focus,
.suggest-input:focus {
  border-color: var(--accent-color);
}

.suggest-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.15s ease;
}

.suggest-turnstile-wrap {
  min-height: 65px;
  display: flex;
  align-items: center;
}

.suggest-turnstile-placeholder {
  width: 100%;
  padding: 12px 14px;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.suggest-status {
  font-size: 0.84rem;
  padding: 8px 10px;
  border-radius: 6px;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
}

.suggest-status.is-error {
  color: var(--accent-color);
  background-color: var(--accent-bg);
}

.suggest-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.suggest-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.suggest-btn-secondary {
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: transparent;
}

.suggest-btn-secondary:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.suggest-btn-primary {
  background-color: var(--accent-color);
  color: #fff;
}

.suggest-btn-primary:hover:not(:disabled) {
  background-color: var(--accent-hover);
}

.suggest-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
