:root {
  --page-bg: #f7f3ee;
  --panel-bg: rgba(255, 252, 247, 0.88);
  --card-bg: #fffdfa;
  --border-soft: #e7dfd3;
  --text-main: #2a241f;
  --text-muted: #7b7268;
  --accent: #8f5f3d;
  --accent-soft: #efe4d7;
  --shadow-soft: 0 18px 45px rgba(79, 58, 37, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(231, 214, 193, 0.45), transparent 28%),
    linear-gradient(180deg, #fbf8f4 0%, var(--page-bg) 100%);
  color: var(--text-main);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.reader-shell {
  min-height: 100vh;
  padding: 24px;
}

.reader-layout {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.reader-sidebar,
.reader-content {
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.reader-sidebar {
  position: sticky;
  top: 24px;
  padding: 22px;
}

.reader-content {
  padding: 28px;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 700;
}

.h3-like {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.reader-title {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  margin: 0 0 10px;
  font-weight: 700;
}

.reader-subtitle {
  color: var(--text-muted);
  margin: 0;
  max-width: 52rem;
  font-size: 1rem;
}

.status-line,
.soft-note,
.state-copy {
  color: var(--text-muted);
}

.toolbar-stack,
.control-group {
  margin-bottom: 18px;
}

.control-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.reader-select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  padding: 0.75rem 0.9rem;
  background-color: rgba(255, 255, 255, 0.82);
  color: var(--text-main);
  font: inherit;
}

.reader-select:focus,
.action-button:focus,
.chapter-button:focus {
  outline: none;
  border-color: #d3b99d;
  box-shadow: 0 0 0 0.2rem rgba(143, 95, 61, 0.12);
}

.control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.soft-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 10px;
}

.chapter-button {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: #fffdf9;
  color: var(--text-main);
  padding: 10px 0;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.chapter-button:hover {
  transform: translateY(-1px);
  border-color: #ccb196;
  background: #fff8f0;
}

.chapter-button.active {
  background: var(--accent);
  color: #fffaf4;
  border-color: var(--accent);
  box-shadow: 0 10px 25px rgba(143, 95, 61, 0.22);
}

.reader-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

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

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  padding: 0 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.action-button:hover {
  transform: translateY(-1px);
}

.action-button.primary {
  width: 100%;
  background: var(--accent);
  border-color: var(--accent);
  color: #fffaf4;
}

.action-button.secondary {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-main);
}

.action-button.dark {
  background: #2f2721;
  border-color: #2f2721;
  color: #fffaf4;
}

.action-button:disabled,
.chapter-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.reading-card {
  background: var(--card-bg);
  border: 1px solid rgba(231, 223, 211, 0.95);
  border-radius: 24px;
  padding: 28px;
}

.verse-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid rgba(231, 223, 211, 0.75);
}

.verse-row:first-child {
  border-top: none;
  padding-top: 0;
}

.verse-number {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.8;
}

.verse-text {
  font-size: 1.1rem;
  line-height: 1.9;
  white-space: pre-wrap;
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}

.state-title {
  margin: 0 0 10px;
  color: var(--text-main);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(143, 95, 61, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.9s linear infinite;
}

.hidden {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 992px) {
  .reader-header {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
  }
}

@media (max-width: 991px) {
  .reader-layout {
    grid-template-columns: 1fr;
  }

  .reader-sidebar {
    position: static;
  }
}

@media (max-width: 575px) {
  .reader-shell {
    padding: 14px;
  }

  .reader-content,
  .reader-sidebar,
  .reading-card {
    border-radius: 18px;
  }

  .reader-content,
  .reader-sidebar {
    padding: 18px;
  }

  .reading-card {
    padding: 20px;
  }

  .verse-row {
    grid-template-columns: 38px 1fr;
    gap: 12px;
  }

  .verse-text {
    font-size: 1rem;
    line-height: 1.75;
  }
}
