:root {
  color-scheme: light dark;
  --bg: #f4f1ea;
  --bg-elevated: #ffffff;
  --accent: #b2783c;
  --accent-soft: rgba(178, 120, 60, 0.12);
  --text-main: #2b2620;
  --text-muted: #7b6b5a;
  --border-soft: rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.08);
  --radius: 14px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #fdfaf4 0, #f3eee5 50%, #e8e0d4 100%);
  color: var(--text-main);
}

body {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

#app {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.testament-toggle {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.testament-btn {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  transition: background 0.18s ease, color 0.18s ease, transform 0.08s ease;
}

.testament-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 3px 10px rgba(178, 120, 60, 0.35);
  transform: translateY(-1px);
}

.testament-btn:active {
  transform: translateY(0);
}

.book-chapter {
  display: flex;
  gap: 6px;
}

.book-chapter select {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  padding: 8px 14px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

.content {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 1.7fr;
  gap: 8px;
  min-height: 0;
}

.books-panel,
.reader-panel {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.books-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  overflow-y: auto;
  padding-right: 3px;
}

.book-pill {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.3;
  background: rgba(246, 241, 233, 0.9);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.book-pill span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-pill small {
  font-size: 11px;
  color: var(--text-muted);
}

.book-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(178, 120, 60, 0.35);
}

.book-pill:active {
  transform: scale(0.98);
}

.reader-panel {
  gap: 4px;
}

.chapter-header {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 4px 2px 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.verses {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 2px;
}

.verse {
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 4px;
  padding: 4px 6px;
  border-radius: 8px;
}

.verse-number {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-right: 4px;
}

/* Scrollbars */
.books-list::-webkit-scrollbar,
.verses::-webkit-scrollbar {
  width: 4px;
}

.books-list::-webkit-scrollbar-thumb,
.verses::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 999px;
}

/* Small phones */
@media (max-width: 380px) {
  .content {
    grid-template-columns: 1fr;
    grid-template-rows: 0.95fr 1.3fr;
  }
}

