/* 瑞读圣经 · 本地预览样式（老人友好、手机优先） */
:root {
  --brand: #8B1A1A;
  --brand-soft: #a83232;
  --bg: #faf7f4;
  --card: #ffffff;
  --text: #2c2420;
  --muted: #6b5e56;
  --line: #e8ddd4;
  --accent-bg: #f5ebe6;
  --ok: #2d6a4f;
  --radius: 12px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.1rem 3rem;
}
header.site {
  background: var(--brand);
  color: #fff;
  padding: 1rem 1.1rem;
}
header.site .inner { max-width: 720px; margin: 0 auto; }
header.site a { color: #fff; }
header.site h1 {
  margin: 0.2rem 0 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
header.site .tag {
  opacity: 0.9;
  font-size: 0.92rem;
}
.crumb {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0.9rem 0 1rem;
}
.crumb a { color: var(--muted); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(80,40,20,0.04);
}
.lead {
  font-size: 1.05rem;
  color: var(--text);
}
.muted { color: var(--muted); }
.badge {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--brand);
  vertical-align: middle;
  margin-left: 0.35rem;
}
.badge.ok {
  background: #e7f5ee;
  color: var(--ok);
}
.badge.draft {
  background: #fff3cd;
  color: #856404;
}
.search-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.search-row input {
  flex: 1 1 12rem;
  min-height: 2.6rem;
  font-size: 1.05rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
}
.search-row button {
  min-height: 2.6rem;
  padding: 0.45rem 1rem;
  font-size: 1.05rem;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
}
.search-hint { font-size: 0.9rem; margin-top: 0.5rem; }
.book-grid, .chap-grid, .verse-list {
  display: grid;
  gap: 0.55rem;
}
.book-grid {
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
}
.chap-grid {
  grid-template-columns: repeat(auto-fill, minmax(3.6rem, 1fr));
}
.book-grid a, .chap-grid a, .verse-list a, .verse-list .item {
  display: block;
  text-align: center;
  padding: 0.65rem 0.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
}
.book-grid a.current, .chap-grid a.current {
  border-color: var(--brand);
  background: var(--accent-bg);
  color: var(--brand);
  font-weight: 700;
}
.book-grid a.dim {
  opacity: 0.55;
  pointer-events: none;
}
.verse-list {
  grid-template-columns: 1fr;
}
.verse-list a, .verse-list .item {
  text-align: left;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.verse-list .num {
  flex: 0 0 2.2rem;
  color: var(--brand);
  font-weight: 700;
}
.verse-list .body { flex: 1; }
.verse-list .meta { margin-top: 0.25rem; }
h2.sec {
  font-size: 1.15rem;
  color: var(--brand);
  margin: 1.4rem 0 0.7rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--line);
}
.verse-hero {
  font-size: 1.28rem;
  line-height: 1.75;
  font-weight: 600;
  color: var(--text);
  padding: 0.3rem 0;
}
.step {
  margin-bottom: 1.15rem;
}
.step h2 {
  margin: 0 0 0.45rem;
  font-size: 1.12rem;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.step h2 .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
}
.step p { margin: 0.4rem 0; }
.quote-line {
  background: var(--accent-bg);
  border-left: 4px solid var(--brand);
  padding: 0.9rem 1rem;
  border-radius: 0 10px 10px 0;
  font-size: 1.12rem;
  font-weight: 600;
}
.nav-prev-next {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.nav-prev-next a, .nav-prev-next span {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 1rem;
}
.nav-prev-next span.disabled {
  color: #aaa;
  background: #f0ebe7;
}
footer.site {
  max-width: 720px;
  margin: 2rem auto 1rem;
  padding: 0 1.1rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}
.draft-note {
  font-size: 0.9rem;
  background: #fff8e6;
  border: 1px solid #f0e0a8;
  color: #6b5a20;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* ——— 微读式卷/章/节选择器 ——— */
body.picker-page {
  background: #fff;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px var(--line);
}
.picker-header {
  background: #fff;
  color: var(--text);
  padding: 0.85rem 1rem 0.55rem;
  text-align: center;
  border-bottom: 1px solid #f0ebe7;
}
.picker-header h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.picker-sub {
  margin-top: 0.15rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.picker-sub .edition {
  color: var(--brand);
  font-weight: 600;
}
.picker-sub .dot { margin: 0 0.25rem; opacity: 0.5; }
.picker-tabs {
  display: flex;
  justify-content: center;
  gap: 2.4rem;
  padding: 0.55rem 1rem 0;
  border-bottom: 1px solid #eee;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
}
.picker-tabs .tab {
  appearance: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1.05rem;
  color: #888;
  padding: 0.45rem 0.35rem 0.55rem;
  cursor: pointer;
  position: relative;
  font-weight: 500;
}
.picker-tabs .tab.active {
  color: var(--brand);
  font-weight: 700;
}
.picker-tabs .tab.active::after {
  content: "";
  position: absolute;
  left: 0.1rem;
  right: 0.1rem;
  bottom: 0;
  height: 3px;
  background: var(--brand);
  border-radius: 2px 2px 0 0;
}
.picker-main {
  flex: 1;
  padding: 0.75rem 0.55rem 1.5rem;
  overflow-y: auto;
}
.panel { display: none; }
.panel.active { display: block; }
.testament-label {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.55rem 0.4rem 0.35rem;
  font-weight: 600;
}
.book-cells, .num-cells {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.cell {
  appearance: none;
  background: #fff;
  border: none;
  border-right: 1px solid #f3eeea;
  border-bottom: 1px solid #f3eeea;
  font-family: inherit;
  cursor: pointer;
  padding: 0.85rem 0.25rem;
  min-height: 3.6rem;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.book-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
}
.book-cell .abbr {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  color: #222;
}
.book-cell .name {
  font-size: 0.72rem;
  color: #999;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.book-cell.selected .abbr,
.book-cell.selected .name,
.num-cell.selected {
  color: var(--brand);
}
.book-cell.selected .abbr { font-weight: 800; }
.book-cell.selected .name { color: var(--brand); opacity: 0.9; }
.num-cell {
  font-size: 1.15rem;
  font-weight: 600;
  min-height: 3.2rem;
}
.num-cell.selected {
  font-weight: 800;
}
.empty-hint {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}
.picker-footer {
  text-align: center;
  font-size: 0.78rem;
  color: #aaa;
  padding: 0.75rem 1rem 1.25rem;
}

/* verse shell */
.verse-shell .verse-hero { margin: 0; }
.verse-shell .placeholder-steps .step h2 { opacity: 0.85; }
.verse-shell .todo {
  color: var(--muted);
  font-size: 0.98rem;
}

/* ——— 章内选节条 + 今日一句分享（v36，无悬浮球） ——— */
.verse-strip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem 0.9rem;
  margin-bottom: 1rem;
}
.verse-strip-label {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.verse-strip-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.verse-num {
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 0.98rem;
  text-decoration: none;
}
a.verse-num:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.verse-num.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 700;
}
.rui-share-bar { margin-top: 0.85rem; }
.rui-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.rui-share-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  min-height: 2.6rem;
  padding: 0.45rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
a.rui-share-btn { color: var(--text); }
.rui-share-btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.rui-share-btn:active { transform: translateY(1px); }
.share-status {
  min-height: 1.4em;
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.share-status.ok { color: var(--ok); }
.share-status.err { color: #a33; }
.rui-share-preview {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
}
.rui-share-preview img {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0.5rem auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #faf7f4;
  -webkit-touch-callout: default;
  user-select: auto;
}
.rui-share-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

/* Public: never show editorial draft banners (pack may still contain them) */
.draft-note,
.badge.draft,
.badge.draft-note { display: none !important; }


/* ——— 解经进度色标（有解经 = soft teal；未标色 = 素灰） ——— */
:root {
  --exegesis: #1f7a6b;
  --exegesis-soft: #e6f4f1;
  --exegesis-ring: #3a9a8a;
}
.coverage-banner {
  margin: 0;
  padding: 0.55rem 1rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #3d5a54;
  background: linear-gradient(180deg, #f2faf8 0%, #eef7f5 100%);
  border-bottom: 1px solid #d5ebe6;
  text-align: center;
}
.book-cell.has-exegesis {
  background: var(--exegesis-soft);
}
.book-cell.has-exegesis .abbr {
  color: var(--exegesis);
  font-weight: 800;
}
.book-cell.has-exegesis .name {
  color: #4a7a70;
}
.book-cell.has-exegesis.selected .abbr,
.book-cell.has-exegesis.selected .name {
  color: var(--brand);
}
.num-cell.has-exegesis {
  color: var(--exegesis);
  font-weight: 800;
  background: var(--exegesis-soft);
  box-shadow: inset 0 0 0 1.5px var(--exegesis-ring);
}
.num-cell.has-exegesis.selected {
  color: #fff;
  background: var(--exegesis);
  box-shadow: inset 0 0 0 1.5px var(--exegesis);
}
/* verse page strip markers */
.verse-num.has-exegesis {
  border-color: var(--exegesis-ring);
  color: var(--exegesis);
  background: var(--exegesis-soft);
  font-weight: 700;
}
.verse-num.has-exegesis.current {
  background: var(--exegesis);
  border-color: var(--exegesis);
  color: #fff;
}
.coverage-empty-note {
  font-size: 0.92rem;
  color: #6b5e56;
  background: #f7f3ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  margin: 0.75rem 0 1rem;
}


/* 回主站 */
.site-home-row { margin-bottom: 0.35rem; }
a.site-home {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}
header.site a.site-home { color: #fff; opacity: 0.95; }
header.site a.site-home:hover { opacity: 1; text-decoration: underline; }
.picker-header a.site-home { color: var(--brand); }
.picker-footer a { color: var(--brand); }
footer.site a { color: inherit; text-decoration: underline; }


/* ——— 瑞读页内朗读 + 字号工具条（v369，不依赖主站 footer） ——— */
body.rui-has-tools {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}
body.picker-page.rui-has-tools {
  padding-bottom: calc(4.2rem + env(safe-area-inset-bottom, 0px));
}
#rui-tools {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  box-sizing: border-box;
  background: rgba(251, 248, 243, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 12px rgba(80, 40, 20, 0.08);
  padding: 0.45rem 0.55rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: saturate(1.05) blur(4px);
  -webkit-backdrop-filter: saturate(1.05) blur(4px);
}
.rui-tools-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
  justify-content: space-between;
}
.rui-tools-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.rui-tools-lb {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0 0.15rem;
  white-space: nowrap;
}
.rui-fs-cur {
  font-size: 0.85rem;
  color: var(--brand);
  font-weight: 600;
  min-width: 2.4rem;
  white-space: nowrap;
}
.rui-tools-btn {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  min-height: 2.55rem;
  min-width: 2.55rem;
  margin: 0;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
}
.rui-tools-btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.rui-tools-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.rui-tools-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.rui-tools-tip {
  max-width: 720px;
  margin: 0.4rem auto 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #6b5a20;
  background: #fff8e8;
  border: 1px solid #e6d4a8;
  border-radius: 8px;
}
@media (max-width: 420px) {
  .rui-tools-btn { padding: 0 0.55rem; font-size: 0.95rem; min-height: 2.4rem; }
  .rui-tools-btn.primary { flex: 1 1 auto; }
}
