/* 奔跑吧！得勝者！ — quiet, welcoming reading space */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;600;700;800&family=Noto+Serif+TC:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'ChenYuLuoYan';
  src: url('./assets/ChenYuluoyan-ui.woff') format('woff'),
       url('./assets/ChenYuluoyan-2.0-Thin.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'SilverPixel';
  src: url('./assets/Silver.woff') format('woff'),
       url('./assets/Silver.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  size-adjust: 160%;
}

:root {
  --accent: #34715a;
  --accent-rgb: 52, 113, 90;
  --accent-soft: color-mix(in srgb, var(--accent) 10%, #fff);
  --accent-muted: color-mix(in srgb, var(--accent) 24%, #fff);
  --bg: #f7f6f1;
  --surface: #fffefa;
  --surface-raised: #fff;
  --surface-muted: #f2f3ed;
  --text: #293b32;
  --text-secondary: #768078;
  --border: #e4e9df;
  --shadow: 0 8px 35px rgba(39, 57, 43, .035);
  --radius: 20px;
  --sidebar-width: 190px;
  --serif: 'Noto Serif TC', 'Songti TC', 'PMingLiU', Georgia, serif;
  --sans: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: #111;
  --surface: #1b1b1b;
  --surface-raised: #242424;
  --surface-muted: #2c2c2c;
  --text: #f6f6f6;
  --text-secondary: #c5c5c5;
  --border: #3b3b3b;
  --accent-soft: #2b2b2b;
  --accent-muted: #4a4a4a;
  --shadow: 0 8px 35px rgba(0, 0, 0, .09);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 3px; }
button { border: 0; background: none; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img, svg { max-width: 100%; vertical-align: middle; }
svg { flex-shrink: 0; }
input, select, textarea { width: 100%; min-height: 44px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); color: var(--text); outline: none; transition: border-color .18s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 98px; resize: vertical; }
input[type='checkbox'], input[type='radio'] { width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: var(--accent); }
input[type='color'] { height: 44px; padding: 5px; }
h1, h2, h3, h4, p { margin-top: 0; }
h2 { font-size: 21px; line-height: 1.45; letter-spacing: .02em; margin-bottom: 12px; }
h3 { font-size: 16px; line-height: 1.5; margin-bottom: 8px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
small { font-size: 12px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar-width); padding: 35px 22px 24px; border-right: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 68%, transparent); backdrop-filter: blur(20px) saturate(135%); -webkit-backdrop-filter: blur(20px) saturate(135%); display: flex; flex-direction: column; }
[data-theme='dark'] .sidebar { background: color-mix(in srgb, var(--surface) 74%, transparent); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--accent); margin: 0 0 45px 8px; text-decoration: none; }
.brand-icon { width: 43px; height: 43px; display: grid; place-items: center; background: var(--accent-soft); border-radius: 13px; }
.brand-icon svg { width: 27px; height: 27px; }
.brand-title, .brand strong { font-family: var(--serif); font-size: 17px; letter-spacing: .02em; line-height: 1.5; font-weight: 700; }
.brand-subtitle, .brand small { display: block; margin-top: 2px; color: var(--text-secondary); font-size: 9px; letter-spacing: .12em; line-height: 1.6; }
.nav-list, .sidebar nav { display: grid; gap: 7px; }
.nav-item { min-height: 47px; width: 100%; display: flex; align-items: center; gap: 13px; padding: 11px 14px; border-radius: 11px; color: var(--text-secondary); font-weight: 500; text-decoration: none; text-align: left; transition: background .18s, color .18s; }
.nav-item:hover { background: var(--surface-muted); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item .count { margin-left: auto; font-size: 11px; padding: 1px 7px; background: var(--surface-raised); border-radius: 20px; }
.sidebar-bottom { margin-top: auto; padding: 25px 10px 0; color: var(--text-secondary); font-size: 11px; line-height: 1.9; }
.sidebar-bottom .mini-caption { color: var(--accent); font-family: var(--serif); font-size: 12px; }
.sidebar-verse { border-left: 2px solid var(--accent-muted); padding-left: 11px; margin-bottom: 22px; }
.main { margin-left: var(--sidebar-width); max-width: 1390px; padding: 0 40px 60px; }
.topbar { min-height: 81px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar-left { display: flex; align-items: center; gap: 9px; color: var(--text-secondary); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: 0; }
.topbar > .theme-toggle { margin-left: auto; }
.topbar .chip { font-size: 11px; }
.avatar { width: 35px; height: 35px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.avatar.small { width: 29px; height: 29px; font-size: 11px; }
.avatar.large { width: 54px; height: 54px; font-size: 21px; }
.profile, .profile-row { display: flex; align-items: center; gap: 9px; }
.profile { border-radius: 30px; padding: 4px 7px 4px 4px; min-height: 44px; }
.profile-name { font-size: 12px; font-weight: 600; }
.hero { position: relative; overflow: hidden; margin: 5px -10px 28px; padding: 35px 25px 36px; background: radial-gradient(ellipse at 72% 0%, var(--accent-soft) 0%, transparent 65%); }
.hero::after { content: ''; pointer-events: none; position: absolute; inset: auto 0 0; height: 60px; background: linear-gradient(transparent, var(--bg)); }
.hero > * { position: relative; z-index: 1; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .13em; line-height: 1.8; text-transform: uppercase; margin-bottom: 10px; }
.hero-title { color: var(--text); font-family: var(--serif); font-size: clamp(29px, 3.1vw, 40px); font-weight: 700; line-height: 1.4; letter-spacing: .035em; margin-bottom: 13px; }
.hero-subtitle { color: var(--text-secondary); font-size: 14px; line-height: 1.9; margin: 0; max-width: 600px; }
.hero-subtitle strong { color: var(--accent); font-weight: 500; }
.hero-decoration { position: absolute; right: 60px; top: 26px; color: var(--accent); opacity: .11; width: 125px; height: 125px; transform: rotate(-8deg); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 25px; align-items: start; }
.main-column, .side-column { min-width: 0; }
.side-column { display: grid; gap: 20px; }
.card { min-width: 0; padding: 25px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.side-column .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.card-head h2, .card-head h3, .card-head p { margin: 0; }
.card-head .card-label { display: flex; align-items: center; gap: 8px; }
.card-label svg { color: var(--accent); }
.card-head .eyebrow { margin-bottom: 3px; }
.card-head h2 { font-size: 20px; }
.card-head h3 { font-size: 15px; }
.muted { color: var(--text-secondary); }
.small { font-size: 12px; }
.caption { color: var(--text-secondary); font-size: 11px; line-height: 1.8; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 16px; }
.chip, .badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 20px; min-height: 26px; padding: 4px 10px; font-size: 11px; line-height: 1.5; font-weight: 500; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.chip.neutral { background: var(--surface-muted); color: var(--text-secondary); }
.chip.gold { background: #f9f0d9; color: #a28c49; }
.chip.blue { background: #e9f0f8; color: #668caf; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border: 1px solid transparent; border-radius: 10px; font-weight: 500; text-decoration: none; line-height: 1.4; font-size: 13px; transition: transform .16s, background .16s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary, button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #111); }
.button.secondary { border-color: var(--border); background: var(--surface); color: var(--text-secondary); }
.button.soft { background: var(--accent-soft); color: var(--accent); }
.button.full { width: 100%; }
.button.small { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.button.danger { color: #ba625b; border-color: color-mix(in srgb, #ba625b 30%, var(--border)); }
.icon-btn { min-width: 38px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--text-secondary); transition: background .15s, color .15s; }
.icon-btn:hover, .icon-btn.active { background: var(--accent-soft); color: var(--accent); }
.icon-btn.liked { color: #c77579; background: #f7eeee; }
.link-button { color: var(--accent); font-size: 12px; min-height: 35px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 0; }
.segmented { padding: 4px; display: inline-flex; align-items: center; gap: 3px; background: var(--surface-muted); border-radius: 9px; flex-wrap: wrap; }
.segmented button { min-height: 31px; padding: 6px 11px; border-radius: 7px; color: var(--text-secondary); font-size: 11px; font-weight: 500; }
.segmented button.active { background: var(--surface-raised); color: var(--accent); box-shadow: 0 1px 4px rgba(30, 48, 37, .07); }
.tabs { display: flex; gap: 17px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs button { padding: 13px 0; min-height: 44px; font-size: 13px; color: var(--text-secondary); border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 0; }
.stat { text-align: center; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat strong { display: block; color: var(--accent); font-family: Georgia, serif; font-size: 26px; font-weight: 500; line-height: 1.35; }
.stat span, .stat small { color: var(--text-secondary); font-size: 11px; }
.stat .unit { font-family: var(--sans); font-size: 12px; margin-left: 2px; }
.progress-summary { padding-top: 2px; }
.progress-summary .spread { font-size: 11px; }
.progress-summary .progress-track { margin: 10px 0; }
.progress-track { height: 7px; border-radius: 30px; background: var(--surface-muted); position: relative; min-width: 0; }
.progress-fill { height: 100%; background: var(--accent); border-radius: inherit; min-width: 0; transition: width .45s ease; }
.progress-fill.blue, .progress-fill.sprint, .progress-fill.ahead { background: #789fc5; }
.progress-fill.green, .progress-fill.run, .progress-fill.ontrack { background: #77a98b; }
.progress-fill.yellow, .progress-fill.sit, .progress-fill.behind { background: #d8b861; }
.progress-fill.red, .progress-fill.lie, .progress-fill.rest { background: #cf8682; }
.runner { position: absolute; bottom: 0; width: 35px; height: 35px; transform: translateX(-50%); z-index: 2; transition: left .45s ease; }
.runner svg { display: block; width: 35px; height: 35px; overflow: visible; }
.bubble { position: absolute; left: 50%; bottom: 42px; transform: translateX(-50%); padding: 6px 9px; width: max-content; max-width: 138px; font-size: 10px; line-height: 1.6; background: var(--surface-raised); border: 1px solid var(--border); box-shadow: 0 3px 12px rgba(24, 45, 31, .04); border-radius: 9px; color: var(--text-secondary); }
.bubble::after { content: ''; position: absolute; width: 7px; height: 7px; background: var(--surface-raised); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transform: rotate(45deg); bottom: -5px; left: calc(50% - 4px); }
.mini-companion { display: flex; align-items: center; gap: 9px; margin: 17px 0; }
.mini-companion-info { min-width: 0; flex: 1; }
.mini-companion-info strong { display: block; font-weight: 500; font-size: 12px; }
.mini-companion-info small { color: var(--text-secondary); font-size: 10px; }
.mini-companion .progress-track { width: 75px; height: 4px; }
.reading-header { margin-bottom: 19px; }
.reading-header h2 { font-family: var(--serif); font-size: 24px; margin-bottom: 5px; }
.reading-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--text-secondary); font-size: 11px; }
.reader-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; margin-bottom: 22px; }
.reader-toolbar .flex { gap: 5px; }
.book-tools { display: grid; gap: 7px; margin-bottom: 25px; }
.book-tool { min-height: 42px; padding: 10px 12px; background: var(--surface-muted); border-radius: 9px; display: flex; align-items: center; gap: 9px; text-align: left; color: var(--text-secondary); font-size: 12px; }
.book-tool .chevron { margin-left: auto; }
.verse-card { position: relative; border-bottom: 1px solid var(--border); padding: 21px 0 18px; scroll-margin-top: 20px; }
.verse-card:last-child { border-bottom: none; }
.verse-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.verse-ref { color: var(--accent); font-size: 12px; font-weight: 700; line-height: 1.5; }
.verse-text { font-family: var(--serif); font-size: 18px; line-height: 2.05; letter-spacing: .025em; color: var(--text); overflow-wrap: anywhere; margin: 0 0 11px; }
.verse-text.en { font-family: Georgia, 'Times New Roman', serif; font-size: 18px; line-height: 1.8; letter-spacing: 0; }
.verse-text sup { color: var(--accent); font-family: var(--sans); font-size: 9px; margin-left: 2px; cursor: pointer; }
.verse-number { font-family: var(--sans); display: inline-block; font-size: 11px; color: var(--text-secondary); width: 25px; vertical-align: 3px; }
.verse-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 9px; color: var(--text-secondary); font-size: 11px; }
.verse-actions button { min-height: 35px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 7px; font-size: 11px; }
.verse-actions button:hover, .verse-actions button.active { color: var(--accent); background: var(--accent-soft); }
.verse-actions .icon-btn { min-width: 34px; }
.note-controls, .xref-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--text-secondary); font-size: 11px; padding: 8px 0; }
.note-controls { border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent); }
.note-controls label, .xref-controls label, .control-label { margin-right: 5px; }
.square, .circle { width: 29px; height: 29px; min-height: 29px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); font-family: var(--sans); font-size: 11px; transition: background .15s; }
.square { border-radius: 5px; }
.circle { border-radius: 50%; }
.square:hover, .circle:hover, .square.active, .circle.active { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-muted); }
.expand-all { font-size: 10px; min-height: 30px; padding: 4px 8px; }
.expansion { overflow: hidden; margin: 11px 0; padding: 16px 17px 7px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 10px; font-size: 13px; line-height: 1.9; animation: expand-in .2s ease-out; overflow-wrap: anywhere; }
.expansion .verse-text { font-size: 16px; line-height: 1.9; margin: 4px 0 12px; }
.expansion .note-number, .expansion .xref-letter { color: var(--accent); font-weight: 700; margin-right: 8px; }
.expansion p { margin-bottom: 12px; }
.expansion h3 { color: var(--accent); font-size: 13px; }
.expansion ul { padding-left: 18px; }
.expansion img { display: block; height: auto; margin: 12px auto; }
.collapse { display: flex; align-items: center; justify-content: center; min-height: 34px; width: 40px; color: var(--text-secondary); font-size: 19px; margin: 0 auto; border-radius: 8px; }
.collapse:hover { color: var(--accent); background: var(--accent-soft); }
.outline-heading { font-family: var(--serif); color: var(--accent); line-height: 1.75; padding: 14px 0 6px; margin: 18px 0 1px; font-size: 15px; font-weight: 600; }
.outline-heading.level-1 { font-size: 19px; padding-bottom: 10px; border-bottom: 1px solid var(--accent-muted); }
.outline-heading.level-2 { font-size: 17px; }
.outline-heading.level-3 { padding-left: 16px; }
.outline-heading.level-4 { padding-left: 30px; font-size: 14px; }
.outline-item { margin: 9px 0; line-height: 1.9; }
.finish-reading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; padding: 22px 0 0; margin-top: 13px; border-top: 1px solid var(--border); }
.completion-check { display: flex; align-items: center; gap: 9px; font-weight: 500; color: var(--accent); font-size: 13px; }
.completion-note { font-size: 11px; color: var(--text-secondary); }
.highlight-tools { display: inline-flex; align-items: center; gap: 5px; padding: 6px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 5px 20px rgba(25, 45, 32, .1); }
.swatch { width: 27px; height: 27px; border-radius: 50%; border: 2px solid transparent; }
.swatch.active { border-color: var(--text); }
.highlight-yellow, mark[data-color='yellow'] { background: #fff0a8; color: inherit; border-radius: 2px; }
.highlight-green, mark[data-color='green'] { background: #d9edcc; color: inherit; border-radius: 2px; }
.highlight-orange, mark[data-color='orange'] { background: #f8d4af; color: inherit; border-radius: 2px; }
.highlight-blue, mark[data-color='blue'] { background: #d4e5f4; color: inherit; border-radius: 2px; }
[data-theme='dark'] mark, [data-theme='dark'] .highlight-yellow, [data-theme='dark'] .highlight-green, [data-theme='dark'] .highlight-orange, [data-theme='dark'] .highlight-blue { color: #293b32; }
.comment { border-bottom: 1px solid var(--border); padding: 17px 0; }
.comment:last-child { border-bottom: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.comment-name { font-size: 12px; font-weight: 500; }
.comment-date { font-size: 10px; color: var(--text-secondary); margin-left: auto; }
.comment-body { font-size: 13px; line-height: 1.85; margin-bottom: 5px; overflow-wrap: anywhere; }
.comment-footer { display: flex; justify-content: flex-end; }
.like-button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; font-size: 11px; color: var(--text-secondary); }
.like-button.liked { color: #c77579; }
.composer { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.composer textarea { font-size: 12px; min-height: 83px; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.checkbox-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); }
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { font-size: 12px; font-weight: 500; }
.field .hint { font-size: 11px; color: var(--text-secondary); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.plan-option { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 20px 18px; min-height: 113px; border: 1px solid var(--border); background: var(--surface); border-radius: 13px; text-align: left; transition: border-color .18s, background .18s; }
.plan-option strong { font-size: 15px; font-weight: 600; }
.plan-option span { color: var(--text-secondary); font-size: 11px; }
.plan-option svg { color: var(--accent); margin-bottom: 4px; }
.plan-option.active { border-color: var(--accent); background: var(--accent-soft); }
.plan-option.active::after { content: '✓'; position: absolute; right: 13px; top: 11px; color: var(--accent); font-size: 14px; font-weight: 700; }
.plan-summary { display: flex; align-items: center; gap: 13px; padding: 18px; background: var(--accent-soft); border-radius: 12px; color: var(--accent); }
.plan-summary p { margin: 0; font-size: 12px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.weekday { text-align: center; padding: 6px 0 10px; color: var(--text-secondary); font-size: 11px; }
.day-cell { min-height: 72px; padding: 9px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-align: left; font-size: 12px; }
.day-cell small { color: var(--text-secondary); font-size: 9px; }
.day-cell.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.day-cell.done { background: var(--accent-soft); }
.day-cell.done::after { content: '✓'; color: var(--accent); font-size: 10px; margin-left: auto; }
.day-cell.empty { border: 0; background: transparent; }
.day-cell.today { box-shadow: inset 0 0 0 1px var(--accent); }
.empty { text-align: center; padding: 42px 20px; color: var(--text-secondary); }
.empty svg { color: var(--accent-muted); margin-bottom: 16px; width: 40px; height: 40px; }
.empty h3 { color: var(--text); font-size: 16px; margin-bottom: 7px; }
.empty p { font-size: 12px; max-width: 350px; margin: 0 auto 18px; line-height: 1.9; }
.empty-state { padding: 30px 0; color: var(--text-secondary); font-size: 12px; text-align: center; }
.race-controls { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 20px; margin-bottom: 22px; }
.race-controls .field { margin: 0; min-width: 150px; }
.race-card { border-bottom: 1px solid var(--border); padding: 25px 0 28px; }
.race-card:last-child { border-bottom: 0; }
.race-person { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.race-person-info { flex: 1; min-width: 0; }
.race-person-info strong { display: block; font-size: 13px; font-weight: 500; }
.race-person-info small { color: var(--text-secondary); font-size: 10px; }
.race-status { font-size: 10px; color: var(--text-secondary); }
.race-lane { display: flex; align-items: center; gap: 15px; padding-top: 40px; margin-left: 45px; }
.race-lane .progress-track { flex: 1; height: 7px; }
.race-percent { width: 43px; text-align: right; color: var(--text-secondary); font-family: Georgia, serif; font-size: 15px; white-space: nowrap; }
.race-legend { display: flex; flex-wrap: wrap; gap: 13px; font-size: 10px; color: var(--text-secondary); margin: 20px 0; }
.legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; }
.search-form { display: flex; gap: 9px; margin-bottom: 12px; }
.search-form input { flex: 1; min-width: 0; }
.search-form .button { flex-shrink: 0; }
.search-options { display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 0 15px; }
.search-result { padding: 20px 0; border-bottom: 1px solid var(--border); }
.search-result .verse-text { font-size: 16px; }
.search-match { background: var(--accent-muted); padding: 1px 2px; border-radius: 2px; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.list-toolbar select { width: auto; min-width: 142px; font-size: 12px; }
.saved-item { padding: 20px 0; border-bottom: 1px solid var(--border); }
.saved-item:last-child { border-bottom: 0; }
.saved-item .verse-text { font-size: 16px; }
.saved-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-secondary); font-size: 10px; }
.dialog, dialog { width: min(620px, calc(100vw - 36px)); max-height: calc(100dvh - 50px); overflow-y: auto; border: 1px solid var(--border); border-radius: 22px; padding: 28px; background: var(--surface); color: var(--text); box-shadow: 0 24px 100px rgba(19, 42, 28, .2); }
dialog::backdrop { background: rgba(21, 39, 28, .28); backdrop-filter: blur(5px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.dialog-head h2 { margin: 0; font-family: var(--serif); }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--border); }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(21, 39, 28, .28); backdrop-filter: blur(5px); }
.modal-backdrop .dialog { max-height: calc(100dvh - 36px); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 0; border-bottom: 1px solid var(--border); }
.setting-row label { font-size: 13px; }
.setting-row .hint { display: block; font-size: 10px; color: var(--text-secondary); }
.setting-row select { max-width: 175px; font-size: 12px; }
.setting-row input[type='color'] { width: 60px; }
.toast { position: fixed; z-index: 200; left: calc(50% + var(--sidebar-width) / 2); bottom: 28px; transform: translateX(-50%); max-width: min(460px, calc(100vw - 36px)); padding: 13px 20px; background: var(--text); color: var(--bg); border-radius: 12px; box-shadow: 0 8px 25px rgba(25, 40, 30, .12); font-size: 12px; line-height: 1.6; animation: toast-in .2s ease-out; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 220px; color: var(--text-secondary); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.mobile-nav { display: none; }
.demo-banner { font-size: 10px; color: var(--text-secondary); margin-top: 15px; padding-top: 10px; border-top: 1px solid var(--border); }
.notice { padding: 12px 15px; border-radius: 10px; background: var(--surface-muted); font-size: 12px; line-height: 1.8; color: var(--text-secondary); }
.notice.success { color: var(--accent); background: var(--accent-soft); }
.notice.warning { color: #9a8143; background: #faf2de; }
.error { color: #b86660; font-size: 12px; }
.verse-anchor { scroll-margin-top: 15px; }

/* Concrete app surfaces and source controls. */
.brand > span { display: grid; font-family: var(--serif); font-size: 13px; line-height: 1.5; letter-spacing: .03em; }
.brand > span strong { display: block; font-size: 18px; }
.sidebar-label { margin: -17px 0 22px 10px; font-size: 9px; letter-spacing: .055em; color: var(--text-secondary); }
.sidebar-footer { margin-top: auto; padding: 20px 7px 0; }
.sidebar-footer p { margin: 10px 0 15px; color: var(--text-secondary); font-size: 10px; }
.sidebar-footer .button { width: 100%; font-size: 11px; min-height: 39px; padding-left: 10px; padding-right: 10px; }
.topbar > .muted { font-size: 11px; letter-spacing: .06em; }
.topbar select { width: 116px; min-height: 36px; padding: 7px 10px; border-color: transparent; background: transparent; font-size: 11px; }
.topbar .profile { min-height: 37px; font-size: 11px; padding: 7px 11px; }
.topbar .profile svg { width: 17px; height: 17px; }
.site-footer { text-align: center; margin: 38px 0 0; padding: 18px 0 0; font-size: 10px; line-height: 1.8; color: var(--text-secondary); border-top: 1px solid var(--border); }
.reading-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.reading-header > div { min-width: 0; }
.reading-header p { margin: 7px 0 0; font-size: 12px; }
.reading-header > .button { flex-shrink: 0; }
.reading-header > select { width: auto; max-width: 205px; font-size: 12px; }
.reader-toolbar input[type='date'] { width: 150px; min-height: 36px; padding: 7px 10px; font-size: 11px; background: transparent; }
.reader-toolbar > .chip { margin-left: auto; }
.reader-column { min-width: 0; }
.reader-column #verses { padding: 10px 25px 17px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.book-context { display: grid; gap: 15px; margin-bottom: 20px; }
.book-card { padding: 19px 22px 13px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.book-card h3 { font-size: 13px; font-weight: 600; margin-bottom: 9px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::marker { display: none; content: ''; }
.book-card > details > summary { display: flex; align-items: center; gap: 9px; padding: 9px 0; min-height: 39px; font-size: 12px; color: var(--text-secondary); }
.book-card > details > summary:hover { color: var(--accent); }
.book-card > details > summary svg { width: 16px; height: 16px; }
.book-card > details > summary svg:last-child { margin-left: auto; transition: transform .2s; }
.book-card > details[open] > summary svg:last-child { transform: rotate(180deg); }
.book-card .expansion { margin-top: 4px; }
.chapter-heading { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--accent); letter-spacing: .045em; padding: 22px 0 13px; margin: 0; border-bottom: 1px solid var(--border); }
.chapter-heading:not(:first-child) { margin-top: 15px; }
.verse-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 3px; }
.verse-top .icon-btn { width: 35px; min-height: 35px; }
.verse-top .icon-btn svg { width: 17px; height: 17px; }
.english, .verse-text.english { font-family: Georgia, 'Times New Roman', serif; letter-spacing: 0; line-height: 1.85; }
.verse-text.english { font-size: 18px; }
.source-prose { white-space: pre-line; overflow-wrap: anywhere; }
.expansion.source-prose { white-space: pre-line; }
.expansion h4 { font-size: 12px; font-weight: 600; color: var(--accent); margin: 4px 0 8px; }
.expansion .english { font-size: 14px; line-height: 1.85; }
.book-card .expansion > .english { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.outline-heading { padding: 9px 0 7px; margin: 14px 0 3px; }
.outline-item { padding-left: calc(var(--level, 0) * 8px); font-family: var(--serif); line-height: 1.9; margin: 8px 0; }
.outline-heading .outline-item { margin: 0; }
.notes, .xrefs { margin-top: 3px; }
.xrefs:not(:first-child) { border-top: 1px solid var(--border); }
.note-controls { border-bottom: none; }
.note-controls > span, .xref-controls > span { margin-right: 3px; }
.square, .circle { position: relative; }
.square small, .circle small { position: absolute; right: 2px; bottom: 1px; font-size: 6px; line-height: 1; opacity: .8; }
.inline-note { position: relative; }
.inline-note:not([open]) > summary { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.inline-note[open] > summary, .inline-note > summary:focus-visible { position: static; width: auto; height: auto; padding: 6px 1px 0; margin: 5px 0 -3px; clip: auto; color: var(--accent); font-size: 11px; font-weight: 600; }
.inline-note > summary:focus-visible { border-radius: 4px; }
.inline-note .expansion { margin-top: 9px; }
.life-study > summary, .verse-wall > summary { min-height: 37px; display: flex; align-items: center; gap: 7px; padding: 7px 0; color: var(--text-secondary); font-size: 11px; }
.life-study > summary:hover, .verse-wall > summary:hover { color: var(--accent); }
.life-study > summary > span, .verse-wall > summary > span { margin-left: auto; font-size: 10px; }
.life-study > summary::after, .verse-wall > summary::after { content: '⌄'; font-size: 14px; margin-left: 2px; line-height: 1; }
.life-study[open] > summary::after, .verse-wall[open] > summary::after { transform: rotate(180deg); }
.life-study { margin-top: 6px; padding-top: 4px; border-top: 1px solid var(--border); }
.verse-wall .expansion { padding-top: 10px; }
.text-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 33px; padding: 5px 6px; font-size: 11px; line-height: 1.5; color: var(--text-secondary); border-radius: 6px; }
.text-btn:hover, .text-btn.active { color: var(--accent); background: var(--accent-soft); }
.comment-actions .text-btn.active { color: #be7279; background: #f5e9eb; }
.ref-link { padding: 4px 6px; margin: 0 2px 2px 0; min-height: 33px; font-size: 12px; color: var(--accent); border-bottom: 1px solid var(--accent-muted); text-align: left; line-height: 1.7; }
.ref-link:hover { background: var(--accent-soft); border-radius: 5px; }
.xref-targets { line-height: 2; }
.xref-passage { padding: 15px 12px 5px; margin: 8px 0 15px; background: var(--surface); border-left: 2px solid var(--accent-muted); border-radius: 0 8px 8px 0; }
.xref-verse strong { color: var(--accent); font-size: 11px; font-weight: 600; }
.xref-passage .verse-text { font-size: 16px; line-height: 1.95; }
.highlight-tools { gap: 6px; padding: 5px 7px; box-shadow: none; border-color: var(--border); background: var(--surface); border-radius: 8px; }
.highlight-tools .icon-btn { min-height: 27px; min-width: 27px; width: 27px; padding: 0; }
.highlight-color { flex-shrink: 0; width: 18px; height: 18px; min-height: 18px !important; border-radius: 50% !important; padding: 0 !important; border: 1px solid rgba(45, 62, 48, .055); }
.highlight-color:hover { outline: 2px solid var(--accent-muted); outline-offset: 2px; }
.highlight-color.yellow { background: #eed58d; }
.highlight-color.green { background: #b7d6a4; }
.highlight-color.orange { background: #e8b688; }
.highlight-color.blue { background: #a9c8e1; }
.highlight-color.pink { background: #e4b4c5; }
mark.yellow { background: #fff0a8; color: #293b32; border-radius: 2px; }
mark.green { background: #d9edcc; color: #293b32; border-radius: 2px; }
mark.orange { background: #f8d4af; color: #293b32; border-radius: 2px; }
mark.blue { background: #d4e5f4; color: #293b32; border-radius: 2px; }
mark.pink { background: #f3d7e2; color: #293b32; border-radius: 2px; }
.reading-aside { min-width: 0; display: grid; gap: 20px; }
.reading-aside .card + .card { margin-top: 0; }
.journey-percent { color: var(--accent); font-family: Georgia, serif; font-size: 64px; line-height: 1; height: 64.5px; margin-bottom: 12px; white-space: nowrap; overflow: hidden; }
.journey-percent small { font-family: var(--sans); font-size: 20px; line-height: 1; margin-left: 4px; vertical-align: baseline; }
.journey-card > .eyebrow { font-size: 13.667px; }
.journey-progress { --progress-color: #65a27b; width: 100%; }
.journey-track { width: 100%; height: 22px; padding: 4px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--border) 80%, var(--text-secondary)); border-radius: 20px; background: var(--surface-muted); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .13), 0 1px 0 rgba(255, 255, 255, .7); }
.journey-fill { height: 100%; min-width: 0; max-width: 100%; border-radius: 20px; background: var(--progress-color); box-shadow: inset 0 1px 2px rgba(255, 255, 255, .3), 0 1px 3px rgba(0, 0, 0, .16); transition: width .4s ease; }
.journey-blocks { display: none; }
[data-theme='dark'] .journey-track { border-color: #3d3d3d; background: #242424; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .08); }
.journey-card .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 24px; padding-bottom: 20px; }
.journey-card .stat strong { font-size: 25px; }
.journey-card p { font-size: 10px; text-align: center; margin: 0 0 16px; }
.journey-card .button { font-size: 11px; }
.companion-callout { text-align: center; }
.runner-illustration { width: 55px; height: 55px; display: grid; place-items: center; background: #f6f0db; border-radius: 50%; margin: 0 auto 17px; }
.runner-illustration svg { width: 33px; height: 33px; position: static; transform: none; }
.companion-callout h3 { font-size: 14px; }
.companion-callout p { font-size: 11px; line-height: 1.9; margin-bottom: 16px; }
.companion-callout .button { font-size: 11px; }
.reading-tip { display: flex; align-items: flex-start; gap: 9px; padding: 0 10px; color: var(--text-secondary); font-size: 10px; line-height: 1.9; }
.reading-tip svg { width: 15px; height: 15px; margin-top: 3px; color: var(--accent); }
.reading-tip p { margin: 0; }
.completion-card { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--accent-soft); border-color: var(--accent-muted); }
.completion-card > div { min-width: 0; }
.completion-card > div > svg { color: var(--accent); margin-bottom: 12px; width: 25px; height: 25px; }
.completion-card h3 { font-size: 14px; margin-bottom: 5px; }
.completion-card p { font-size: 11px; line-height: 1.8; margin: 0; }
.completion-card .button { flex-shrink: 0; font-size: 11px; }
.daily-response .card-head > svg { color: var(--accent-muted); }
.daily-response > p { font-size: 11px; line-height: 1.9; }
.daily-response h3 { font-family: var(--serif); font-size: 19px; }
.demo-caption { color: var(--text-secondary); font-size: 10px; line-height: 1.8; margin-bottom: 11px; }
.comment-head > strong { font-size: 12px; font-weight: 600; }
.comment-head time { margin-left: auto; color: var(--text-secondary); font-size: 9px; }
.comment > p { font-size: 13px; line-height: 1.9; margin-bottom: 8px; }
.comment-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.composer-footer label { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-secondary); }
.composer > small { display: block; font-size: 9px; margin-top: 13px; line-height: 1.9; }
.empty.compact { padding: 18px 5px; font-size: 11px; }
.load-more { text-align: center; margin-top: 20px; }
.load-more p { margin-bottom: 12px; font-size: 11px; }
.plan-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.plan-option { cursor: pointer; padding: 17px 15px; min-height: 93px; }
.plan-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.plan-option:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.plan-option:has(input:checked)::after { content: '✓'; position: absolute; right: 12px; top: 10px; color: var(--accent); font-size: 14px; font-weight: 700; }
.plan-option:has(input:focus-visible) { outline: 3px solid var(--accent-muted); outline-offset: 3px; }
.scope-options { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; padding: 0; margin: 0 0 22px; border: 0; }
.scope-options legend { padding: 0 0 10px; font-size: 12px; font-weight: 500; }
.plan-kind-options, .plan-config-panel { padding: 0; margin: 18px 0; border: 0; min-width: 0; }
.plan-kind-options { display: flex; flex-wrap: wrap; gap: 10px; }
.plan-kind-options legend, .plan-config-panel > legend { padding: 0 0 10px; font-size: 14px; }
.plan-kind { display: flex; align-items: center; justify-content: center; gap: 7px; flex: 1; min-width: 140px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.plan-kind:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.plan-kind input { flex-shrink: 0; }
.plan-config-panel .plan-options { margin-top: 6px; }
.pauline-packages .plan-option strong { padding-right: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.pauline-packages .plan-option span { line-height: 1.65; overflow-wrap: anywhere; }
.pauline-durations { justify-content: space-between; gap: 8px; }
.pauline-durations label { display: flex; align-items: center; gap: 6px; min-height: 44px; }
.scope-options label { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; }
.plan-summary { display: block; margin-bottom: 24px; }
.plan-summary .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 5px 0 22px; }
.plan-summary .stat strong { font-size: 24px; }
.plan-summary > p { color: var(--text-secondary); font-size: 11px; line-height: 1.9; }
.calendar { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 10px; }
.day-cell { min-height: 127px; padding: 13px 12px; gap: 6px; font-size: 11px; transition: border-color .15s, background .15s; }
.day-cell:hover { border-color: var(--accent-muted); background: var(--accent-soft); }
.day-cell .day-number { font-weight: 600; color: var(--accent); }
.day-cell time { color: var(--text-secondary); font-size: 10px; }
.day-cell strong { font-weight: 500; font-size: 11px; line-height: 1.75; overflow-wrap: anywhere; }
.day-cell small { color: var(--text-secondary); font-size: 9px; margin-top: auto; }
.day-cell.done::after { content: none; }
.race-filters { display: flex; align-items: flex-end; gap: 18px; padding: 19px 23px; }
.race-filters > label { display: grid; gap: 7px; font-size: 11px; width: 160px; }
.race-filters select { font-size: 12px; min-height: 40px; }
.race-filters > .chip { margin-left: auto; margin-bottom: 6px; }
.race-card { padding: 24px; margin-bottom: 15px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.race-card:last-child { border: 1px solid var(--border); }
.race-card .profile-row { gap: 11px; }
.race-card .profile-row > div:nth-child(2) { min-width: 0; }
.race-card .profile-row strong { font-weight: 500; font-size: 13px; }
.race-card .profile-row .chip { min-height: 19px; padding: 2px 6px; font-size: 8px; margin-left: 3px; }
.race-card .profile-row p { margin: 4px 0 0; font-size: 10px; line-height: 1.6; }
.status-label { margin-left: auto; font-size: 10px; white-space: nowrap; }
.race-lane { margin-left: 44px; padding-top: 56px; padding-bottom: 7px; }
.race-track { position: relative; flex: 1; min-width: 0; height: 7px; border-radius: 15px; background: var(--surface-muted); }
.race-fill { height: 100%; border-radius: inherit; transition: width .4s ease; }
.race-track .runner { width: 34px; height: 34px; bottom: 0; }
.race-track .runner > svg { width: 34px; height: 34px; }
.race-track .bubble { bottom: 39px; max-width: 145px; border-radius: 8px; padding: 5px 9px; font-size: 10px; }
.race-track .runner.edge-start .bubble { left: -8px; transform: none; }
.race-track .runner.edge-end .bubble { left: auto; right: -8px; transform: none; }
.race-track .runner.edge-start .bubble::after { left: 21px; }
.race-track .runner.edge-end .bubble::after { left: auto; right: 21px; }
.race-list { margin-bottom: 22px; }
.race-percent { font-weight: 500; font-size: 14px; width: 48px; }
.bubble-input { display: flex; align-items: center; gap: 10px; }
.bubble-input input { flex: 1; min-width: 0; }
#bubble-count { white-space: nowrap; color: var(--text-secondary); font-size: 11px; }
.bubble-input .button { flex-shrink: 0; }
.search-input { display: flex; align-items: center; gap: 10px; }
.search-input > svg { color: var(--text-secondary); width: 18px; height: 18px; }
.search-input input { flex: 1; min-width: 0; border-color: transparent; border-bottom-color: var(--border); border-radius: 0; background: transparent; padding-left: 1px; }
.search-option { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-secondary); margin: 18px 0 13px; }
#search-form + p { font-size: 10px; }
#search-results { margin-top: 25px; }
#search-results > .muted { font-size: 11px; }
.search-result .source-prose { font-family: var(--serif); font-size: 15px; line-height: 1.9; }
.search-result p { margin-bottom: 10px; }
.search-result .english { font-size: 15px; }
.collection-card time { font-size: 10px; }
.collection-card .ref-link { font-size: 12px; border-bottom: 0; padding-left: 0; }
.collection-card .verse-text { font-size: 17px; }
.dialog-close { position: absolute; right: 15px; top: 15px; }
dialog { position: relative; padding-top: 35px; }
dialog > h2 { padding-right: 27px; font-family: var(--serif); font-size: 24px; }
dialog > p, dialog form > p { font-size: 12px; line-height: 1.8; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.title-scripture { padding: 16px 0 10px; border-bottom: 1px solid var(--border); }
.title-scripture .verse-text { color: var(--text-secondary); font-size: 15px; line-height: 1.85; margin-bottom: 9px; }
.title-head { color: var(--text-secondary); font-family: var(--serif); font-size: 13px; font-weight: 500; margin-bottom: 9px; }

@keyframes expand-in { from { opacity: .35; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 7px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (min-width: 1500px) {
  .main { padding-left: 58px; padding-right: 58px; }
  .content-grid { grid-template-columns: minmax(0, 1fr) 315px; gap: 28px; }
}
@media (max-width: 1180px) {
  :root { --sidebar-width: 190px; }
  .sidebar { padding-left: 15px; padding-right: 15px; }
  .main { padding-left: 27px; padding-right: 27px; }
  .content-grid { grid-template-columns: minmax(0, 1fr) 255px; gap: 18px; }
  .card { padding: 21px; }
  .brand { margin-left: 5px; gap: 8px; }
  .brand-title, .brand strong { font-size: 15px; }
  .hero { padding-left: 18px; }
}
@media (max-width: 980px) {
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-decoration { right: 20px; }
  .hero-subtitle { max-width: 420px; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 0px; --radius: 16px; }
  html { scrollbar-gutter: auto; }
  body { font-size: 13px; }
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 0 20px 100px; }
  .topbar { min-height: 65px; gap: 8px; }
  .topbar-left { font-size: 10px; }
  .topbar-actions { gap: 5px; }
  .topbar .segmented { display: none; }
  .topbar .profile-name { display: none; }
  .topbar .profile { padding-right: 2px; }
  .topbar .chip { min-height: 23px; padding: 3px 7px; font-size: 9px; }
  .hero { margin: 0 -10px 20px; padding: 28px 12px 32px; }
  .hero-title { font-size: 30px; margin-bottom: 12px; }
  .hero-subtitle { font-size: 12px; max-width: 94%; }
  .eyebrow { font-size: 9px; letter-spacing: .1em; margin-bottom: 8px; }
  .hero-decoration { width: 90px; height: 90px; right: 4px; top: 0; opacity: .07; }
  .content-grid { gap: 18px; }
  .card { padding: 21px; }
  .card-head { margin-bottom: 17px; }
  .card-head h2 { font-size: 19px; }
  .card-head h3 { font-size: 14px; }
  .side-column { gap: 16px; }
  .side-column .card { padding: 18px; }
  .mobile-nav { position: fixed; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); z-index: 50; inset: auto 0 0; padding: 8px 7px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(15px); border-top: 1px solid var(--border); box-shadow: 0 -3px 18px rgba(25, 40, 30, .03); }
  .mobile-nav button, .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 46px; padding: 3px 1px; border-radius: 9px; text-decoration: none; color: var(--text-secondary); font-size: 9px; line-height: 1.5; }
  .mobile-nav svg { width: 19px; height: 19px; }
  .mobile-nav .active { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); left: 50%; }
  .reading-header h2 { font-size: 21px; }
  .reader-toolbar { flex-wrap: wrap; padding: 10px 0; gap: 8px; }
  .verse-text { font-size: 18px; line-height: 2.05; }
  .verse-card { padding-top: 18px; }
  .verse-actions { gap: 3px; }
  .verse-actions button { padding: 6px; }
  .note-controls, .xref-controls { padding: 8px 0; }
  .square, .circle { width: 31px; height: 31px; min-height: 31px; }
  .verse-heading .icon-btn { width: 38px; height: 38px; }
  .expansion { padding-left: 12px; padding-right: 12px; font-size: 12px; }
  .outline-heading { font-size: 14px; }
  .outline-heading.level-1 { font-size: 17px; }
  .outline-heading.level-2 { font-size: 15px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .plan-option { min-height: 112px; padding: 16px 15px; }
  .plan-option strong { font-size: 14px; }
  .plan-option span { font-size: 10px; }
  .day-cell { min-height: 65px; padding: 7px 5px; }
  .calendar { gap: 5px; }
  .day-cell small { font-size: 8px; }
  .dialog, dialog { padding: 22px; border-radius: 17px; }
  .dialog-head h2 { font-size: 20px; }
  .dialog-footer { flex-wrap: wrap; }
  .setting-row { flex-wrap: wrap; gap: 10px; }
  .race-lane { margin-left: 15px; gap: 10px; }
  .race-percent { width: 38px; font-size: 14px; }
  .bubble { max-width: 115px; font-size: 9px; }
  .comment-date { font-size: 9px; }
  .field { margin-bottom: 15px; }
}
@media (max-width: 430px) {
  .main { padding-left: 14px; padding-right: 14px; }
  .card { padding: 18px; }
  .card-head { gap: 7px; }
  .side-column { grid-template-columns: minmax(0, 1fr); }
  .hero-title { font-size: 28px; letter-spacing: .01em; }
  .hero-subtitle { font-size: 11px; line-height: 1.9; }
  .hero { padding-top: 24px; }
  .topbar-left { max-width: 170px; gap: 5px; }
  .topbar-left span { white-space: nowrap; }
  .card-head .chip { padding: 4px 7px; font-size: 9px; }
  .reader-toolbar .segmented button { padding: 6px 8px; font-size: 10px; }
  .grid-2 { gap: 12px; }
  .day-cell { min-height: 56px; font-size: 11px; }
  .day-cell small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .calendar { gap: 3px; }
  .calendar-head { gap: 8px; }
  .calendar-head h3 { font-size: 14px; }
  .calendar-head .button { padding: 7px 10px; }
  .finish-reading { align-items: flex-start; }
  .finish-reading .button { width: 100%; }
  .search-form .button { padding-left: 11px; padding-right: 11px; }
  .search-form .button svg { display: none; }
  .race-controls { gap: 12px; }
  .race-controls .field { flex: 1; min-width: 125px; }
  .race-person-info small { font-size: 9px; }
  .race-status { font-size: 9px; }
  .stat strong { font-size: 24px; }
  .comment-head { gap: 6px; }
  .composer-footer { flex-wrap: wrap; }
  .list-toolbar select { width: 100%; }
}
@media (max-width: 350px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .card { padding: 15px; }
  .hero-title { font-size: 26px; }
  .verse-text { font-size: 17px; }
  .topbar-left { max-width: 155px; font-size: 9px; }
  .mobile-nav button, .mobile-nav a { font-size: 8px; }
  .reading-header h2 { font-size: 19px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .reading-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading-tip { grid-column: 1 / -1; }
  .reading-header { align-items: flex-start; }
  .completion-card { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .hero { margin-top: 5px; }
  .topbar { flex-wrap: nowrap; }
  .topbar > .muted { font-size: 10px; letter-spacing: .02em; flex-shrink: 0; }
  .topbar select { width: 105px; padding-right: 4px; padding-left: 7px; font-size: 10px; }
  .topbar .profile { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 9px; gap: 5px; }
  .topbar .profile svg { width: 14px; height: 14px; }
  .reading-header { gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
  .reading-header p { font-size: 11px; }
  .reading-header > .button { min-height: 36px; font-size: 11px; padding: 8px 11px; }
  .reader-toolbar { margin-bottom: 18px; }
  .reader-toolbar input[type='date'] { width: 141px; }
  .reader-toolbar > .chip { font-size: 9px; padding: 4px 8px; }
  .reader-column #verses { padding: 6px 20px 12px; }
  .book-card { padding: 16px 19px 10px; }
  .book-context { gap: 12px; margin-bottom: 17px; }
  .chapter-heading { font-size: 17px; padding-top: 20px; }
  .verse-text.english { font-size: 17px; }
  .verse-top { margin-bottom: 5px; }
  .highlight-tools { gap: 7px; padding: 5px 6px; }
  .highlight-color { width: 20px; height: 20px; }
  .verse-actions .highlight-tools .icon-btn { width: 29px; height: 29px; min-width: 29px; min-height: 29px; }
  .reading-aside { gap: 16px; }
  .reading-aside .card { padding: 18px; }
  .journey-percent { font-size: clamp(56px, 15vw, 64px); }
  .journey-card .stat strong { font-size: 23px; }
  .journey-card .stat span { font-size: 10px; }
  .completion-card { margin-top: 18px; gap: 18px; }
  .completion-card > div > svg { margin-bottom: 8px; }
  .completion-card .button { width: 100%; }
  .daily-response h3 { font-size: 18px; }
  .daily-response .eyebrow { font-size: 8px; }
  .daily-response > p { font-size: 10px; }
  .composer-footer .button { font-size: 11px; padding-left: 12px; padding-right: 12px; }
  .plan-summary .stats { gap: 7px; }
  .plan-summary .stat strong { font-size: 21px; }
  .plan-summary .stat span { font-size: 9px; }
  .plan-summary > p { font-size: 10px; }
  .calendar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .day-cell { min-height: 125px; padding: 11px 10px; gap: 5px; }
  .day-cell small { font-size: 9px; }
  .race-filters { padding: 17px; gap: 12px; flex-wrap: wrap; }
  .race-filters > label { flex: 1; min-width: 110px; }
  .race-filters > .chip { margin-left: 0; margin-bottom: 0; font-size: 9px; }
  .race-card { padding: 19px; }
  .race-card .profile-row p { font-size: 9px; }
  .race-card .profile-row strong { font-size: 12px; }
  .race-card .status-label { font-size: 9px; }
  .race-lane { margin-left: 8px; padding-top: 55px; }
  .race-percent { width: 41px; font-size: 13px; }
  .race-track .bubble { font-size: 9px; max-width: 132px; }
  .race-legend { line-height: 1.8; gap: 7px 12px; }
  .bubble-input { gap: 7px; flex-wrap: wrap; }
  .bubble-input input { flex-basis: calc(100% - 45px); }
  .bubble-input .button { width: 100%; margin-top: 4px; font-size: 12px; }
  .search-input { gap: 7px; }
  .search-input > svg { width: 16px; }
  .search-input input { font-size: 12px; padding-left: 0; }
  .search-input .button { min-height: 38px; padding: 8px 12px; font-size: 11px; }
  .search-option { font-size: 10px; gap: 6px; align-items: flex-start; line-height: 1.8; }
  .search-option input { margin-top: 1px; }
  .collection-card .card-head { flex-wrap: wrap; gap: 6px; }
  .collection-card time { font-size: 9px; }
  .dialog-close { right: 10px; top: 10px; }
  dialog { padding-top: 31px; }
  dialog > h2 { font-size: 21px; }
  .title-scripture .verse-text { font-size: 14px; }
}
@media (max-width: 430px) {
  .topbar-actions { gap: 3px; }
  .topbar select { width: 89px; }
  .topbar .profile { max-width: 105px; font-size: 10px; padding-left: 7px; padding-right: 7px; }
  .topbar .profile svg { display: none; }
  .topbar .icon-btn { min-width: 32px; min-height: 35px; }
  .topbar .icon-btn svg { width: 17px; height: 17px; }
  .reader-column #verses { padding-left: 17px; padding-right: 17px; }
  .book-card { padding-left: 17px; padding-right: 17px; }
  .reading-aside { grid-template-columns: minmax(0, 1fr); }
  .journey-card .stats { padding-bottom: 14px; }
  .companion-callout .runner-illustration { width: 49px; height: 49px; }
  .reading-header > .button { padding-left: 10px; padding-right: 10px; }
  .reader-toolbar > .chip { margin-left: 0; }
  .calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .day-cell { min-height: 126px; padding: 12px; }
  .day-cell small { white-space: normal; }
  .plan-summary .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 17px; }
  .plan-summary .stat:nth-child(3) { border-left: none; }
  .race-card { padding: 17px 15px; }
  .race-card .profile-row { gap: 8px; flex-wrap: wrap; }
  .race-card .profile-row .avatar { width: 32px; height: 32px; font-size: 11px; }
  .race-card .profile-row > div:nth-child(2) { flex: 1; }
  .race-card .profile-row .status-label { padding-left: 40px; margin-left: 0; width: 100%; margin-top: -4px; }
  .race-track .bubble { max-width: 115px; }
  .race-lane { padding-top: 51px; margin-left: 5px; gap: 9px; }
  .race-percent { width: 39px; font-size: 12px; }
  .comment-head { flex-wrap: wrap; }
  .comment-head time { font-size: 8px; }
  .composer-footer { flex-wrap: nowrap; gap: 7px; }
  .composer-footer label { font-size: 10px; gap: 5px; white-space: nowrap; }
  .composer-footer .button { font-size: 10px; gap: 5px; padding-left: 10px; padding-right: 10px; }
  .scope-options { gap: 14px; }
  .scope-options label { font-size: 11px; }
  .plan-option strong { font-size: 13px; }
  .plan-option span { font-size: 10px; line-height: 1.7; }
  .site-footer { font-size: 9px; }
}
@media (max-width: 350px) {
  .topbar > .muted { font-size: 9px; }
  .topbar .profile { max-width: 91px; font-size: 9px; }
  .topbar select { width: 85px; font-size: 9px; }
  .reader-column #verses { padding-left: 15px; padding-right: 15px; }
  .verse-text.english { font-size: 16px; }
  .plan-options { gap: 9px; }
  .plan-option { padding: 14px 11px; }
  .day-cell { padding-left: 10px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (any-pointer: coarse) {
  .icon-btn, .verse-heading .icon-btn, .verse-actions .icon-btn, .square, .circle { min-width: 44px; min-height: 44px; width: 44px; height: 44px; }
  .segmented button, .verse-actions button, .expand-all, .collapse, .link-button, .like-button { min-height: 44px; }
  .square { border-radius: 7px; }
}

/* DEMO 0.2: quieter desktop header and selection-based reading tools. */
.sidebar-toggle { position: static; flex: 0 0 32px; width: 32px; min-width: 32px; min-height: 39px; color: var(--text-secondary); border-radius: 8px; }
.sidebar-toggle:hover { color: var(--text); background: var(--surface-muted); }
.sidebar-toggle svg { width: 17px; height: 17px; }
.sidebar-footer-actions { display: flex; align-items: center; justify-content: center; gap: 7px; }
.sidebar-footer-actions > .button { flex: 1 1 auto; width: auto; min-width: 0; padding-left: 7px; padding-right: 7px; }
.reading-header-actions { display: flex; flex-direction: column; align-items: center; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.reading-header-actions .button { font-size: 12px; min-height: 38px; }
.reading-header-actions .segmented { flex-wrap: nowrap; }
.reading-header-actions .segmented button { min-width: 30px; }
.reading-title-block { min-width: 0; }
.reading-header h2.daily-scripture { margin-bottom: 5px; }
.daily-scripture > .chinese, .daily-scripture > .english { display: block; overflow-wrap: anywhere; }
.daily-scripture > .english { font-family: Georgia, 'Times New Roman', serif; letter-spacing: 0; }
.daily-scripture > .chinese + .english, .daily-scripture > .english + .chinese { margin-top: 8px; }
:is(.verse-text, .title-scripture) .scripture-marker { margin: 0; padding: 0; border: 0; white-space: nowrap; }
:is(.verse-text, .title-scripture) sup.scripture-marker { font-family: var(--sans); font-size: .56em; line-height: 0; vertical-align: super; color: var(--accent); }
:is(.verse-text, .title-scripture) .scripture-marker-button { display: inline; width: auto; height: auto; min-width: 0; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: inherit; font: inherit; line-height: inherit; letter-spacing: 0; vertical-align: baseline; text-align: inherit; }
:is(.verse-text, .title-scripture) .scripture-marker-button:hover { text-decoration: underline; text-underline-offset: 2px; }
:is(.verse-text, .title-scripture) .scripture-marker-button:focus-visible { outline: 2px solid var(--accent-muted); outline-offset: 2px; border-radius: 1px; }
:is(.verse-text, .title-scripture) span.scripture-marker.baseline { font-family: inherit; font-size: inherit; line-height: inherit; vertical-align: baseline; position: static; top: auto; color: inherit; }
:is(.verse-text, .title-scripture) span.scripture-marker.baseline > .scripture-marker-button { font-family: inherit; font-size: inherit; line-height: inherit; vertical-align: baseline; }
.verse-resources { padding-top: 8px; margin-top: 6px; animation: expand-in .18s ease-out; }
.verse-resources[hidden] { display: none !important; }
.selection-toolbar { position: fixed; z-index: 140; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; max-width: calc(100vw - 24px); min-height: 46px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-raised); color: var(--text); box-shadow: 0 5px 25px rgba(0, 0, 0, .14); transform: translateX(-50%); }
.selection-toolbar .highlight-tools { padding: 2px 5px; gap: 8px; border: 0; border-radius: 0; background: transparent; }
.selection-toolbar .highlight-color { width: 22px; height: 22px; }
.selection-toolbar .icon-btn { min-width: 31px; min-height: 31px; border-radius: 7px; }
.selection-toolbar .text-btn { min-height: 31px; border-left: 1px solid var(--border); padding-left: 10px; padding-right: 4px; border-radius: 0; color: var(--text); }
.selection-toolbar .text-btn svg { width: 15px; height: 15px; }
.selection-toolbar[hidden] { display: none !important; }
.citation-link { display: inline; width: auto; height: auto; min-width: 0; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: inherit; font: inherit; line-height: inherit; letter-spacing: inherit; vertical-align: baseline; white-space: normal; text-align: inherit; text-decoration: underline; text-decoration-color: var(--accent-muted); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.citation-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.citation-link:focus-visible { outline: 2px solid var(--accent-muted); outline-offset: 2px; border-radius: 2px; }
.citation-bar { position: fixed; z-index: 120; right: 22px; bottom: 22px; width: min(560px, calc(100vw - 32px)); max-height: 65vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: var(--surface-raised); color: var(--text); box-shadow: 0 12px 55px rgba(0, 0, 0, .18); }
.citation-bar[hidden] { display: none !important; }
.citation-bar-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 56px; padding: 10px 15px 10px 20px; border-bottom: 1px solid var(--border); }
.citation-bar-head > :is(h2, h3, strong) { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.6; }
.citation-bar-head .icon-btn { min-width: 34px; min-height: 34px; width: 34px; height: 34px; }
#citation-content { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 17px 20px 20px; line-height: 1.9; }
#citation-content .verse-text { font-size: 16px; line-height: 1.9; margin: 5px 0 13px; }
#citation-content .verse-ref { font-size: 11px; }
#citation-content .xref-verse + .xref-verse { padding-top: 13px; border-top: 1px solid var(--border); }
#citation-content > .muted { font-size: 12px; }
.reflection-preview { overflow: hidden; }
.reflection-preview .card-head { margin-bottom: 12px; }
.reflection-preview .reflection-item { font-size: 14px; padding: 14px 0; }
.reflection-preview .reflection-item > p { font-size: 14px; margin-bottom: 5px; line-height: 1.85; }
.reflection-preview .comment-head strong { font-size: 12px; }
.reflection-preview .comment-head time { font-size: 8px; }
.reflection-preview .feathered { position: relative; max-height: 86px; overflow: hidden; margin-bottom: -9px; }
.reflection-preview .feathered::after { content: ''; position: absolute; pointer-events: none; inset: 20px -4px -1px; background: linear-gradient(transparent 0%, var(--bg) 96%); }
.reflection-preview > .text-btn { margin-top: 15px; }
.topbar #read-date { width: 130px; flex-shrink: 0; padding: 7px 6px; min-height: 37px; font-size: 12px; background: transparent; }
.topbar #read-date::-webkit-datetime-edit { padding: 0; }
.topbar #read-date::-webkit-calendar-picker-indicator { width: 14px; height: 14px; margin: 0 0 0 4px; padding: 0; opacity: .8; cursor: pointer; }
[data-theme='dark'] .eyebrow,
[data-theme='dark'] .hero-subtitle strong,
[data-theme='dark'] .brand,
[data-theme='dark'] .verse-ref,
[data-theme='dark'] :is(.verse-text, .title-scripture) sup.scripture-marker,
[data-theme='dark'] .chapter-heading,
[data-theme='dark'] .outline-heading,
[data-theme='dark'] .outline-item,
[data-theme='dark'] .note-number,
[data-theme='dark'] .xref-letter,
[data-theme='dark'] .inline-note[open] > summary,
[data-theme='dark'] .expansion h3,
[data-theme='dark'] .expansion h4,
[data-theme='dark'] .journey-percent,
[data-theme='dark'] .stat strong,
[data-theme='dark'] .day-number,
[data-theme='dark'] .ref-link,
[data-theme='dark'] .xref-verse strong { color: var(--text); }
[data-theme='dark'] .nav-item.active,
[data-theme='dark'] .segmented button.active,
[data-theme='dark'] .icon-btn.active,
[data-theme='dark'] .square.active,
[data-theme='dark'] .circle.active,
[data-theme='dark'] .text-btn.active { color: #fff; background: #383838; }
[data-theme='dark'] .chip:not(.gold):not(.blue),
[data-theme='dark'] .button.soft,
[data-theme='dark'] .notice.success,
[data-theme='dark'] .completion-check { color: #eee; }
[data-theme='dark'] .button.secondary { color: #eee; }
[data-theme='dark'] .day-cell.selected { color: #fff; }
[data-theme='dark'] .runner-illustration { background: #31302b; }
[data-theme='dark'] .comment-actions .text-btn.active,
[data-theme='dark'] .icon-btn.liked { color: #efa5b1; background: #3b2b2f; }
[data-theme='dark'] .citation-link:hover { color: #fff; }

@media (min-width: 761px) {
  .sidebar { padding: 35px 14px 24px; transition: width .2s ease, padding .2s ease; }
  .sidebar .brand { gap: 9px; margin-left: 6px; }
  .sidebar .brand > img { width: 33px; height: 33px; }
  .sidebar .brand > span { font-size: 12px; }
  .sidebar .brand > span strong { font-size: 17px; }
  .sidebar .nav-item { gap: 12px; padding-left: 12px; padding-right: 10px; font-size: 13px; }
  .sidebar .sidebar-label { font-size: 10.667px; margin-left: 7px; }
  body { background-image: linear-gradient(to bottom, color-mix(in srgb, var(--accent) 10%, var(--bg)) 0, color-mix(in srgb, var(--accent) 4%, var(--bg)) 125px, var(--bg) 280px); background-position: top left; background-size: 100% 280px; background-repeat: no-repeat; }
  [data-theme='dark'] body { background-image: linear-gradient(to bottom, #242424 0, #191919 125px, #111 280px); }
  .main { transition: margin-left .2s ease; background-color: transparent; background-image: none; }
  .topbar { min-height: 56px; }
  .topbar select { width: 86px; padding-left: 7px; padding-right: 7px; }
  .topbar #language[data-language='zh'] { width: 64px; }
  .topbar #language[data-language='en'] { width: 82px; }
  .hero { margin-top: 0; margin-bottom: 18px; padding-top: 7px; padding-bottom: 15px; background: transparent; }
  .hero .eyebrow { margin-bottom: 4px; font-size: 10px; }
  .hero-title { font-family: 'ChenYuLuoYan', var(--serif); font-size: clamp(53px, 4.6vw, 64px); font-weight: 400; line-height: 1.1; letter-spacing: .01em; margin-bottom: 6px; }
  .hero-subtitle { font-size: 13px; line-height: 1.8; }
  .hero::after { display: none; background: none; }
  .reading-header { align-items: center; gap: 18px; margin-bottom: 18px; }
  .reading-header .reading-title-block > .eyebrow { font-size: 13.667px; letter-spacing: .055em; margin-bottom: 8px; }
  .reading-header .reading-range { font-size: 14.667px; line-height: 1.8; margin-top: 5px; }
  .reading-header .daily-scripture { font-size: 23px; }
  .reading-header .reading-title-block { flex: 1; }
  .reading-header .daily-scripture > .chinese,
  .reading-header .daily-scripture > .english { font-size: 22px; line-height: 1.6; font-weight: 500; }
  .book-card h3 { font-size: 18.333px; line-height: 1.7; margin-bottom: 8px; }
  .app-shell.sidebar-collapsed { --sidebar-width: 64px; }
  .sidebar-collapsed .sidebar { padding: 25px 8px 24px; }
  .sidebar-collapsed .brand { justify-content: center; margin: 0 0 34px; }
  .sidebar-collapsed .brand > span, .sidebar-collapsed .sidebar-label, .sidebar-collapsed .nav-item > span, .sidebar-collapsed .sidebar-footer > .chip, .sidebar-collapsed .sidebar-footer > p { display: none; }
  .sidebar-collapsed .brand > img { width: 31px; height: 31px; }
  .sidebar-collapsed .sidebar-toggle { position: static; flex-basis: auto; width: 44px; min-width: 44px; height: 42px; min-height: 42px; }
  .sidebar-collapsed .nav-item { justify-content: center; padding: 0; min-height: 44px; width: 46px; }
  .sidebar-collapsed .sidebar nav { gap: 10px; }
  .sidebar-collapsed .sidebar-footer { padding: 15px 0 0; }
  .sidebar-collapsed .sidebar-footer-actions { flex-direction: column; gap: 10px; }
  .sidebar-collapsed .sidebar-footer .button { width: 44px; min-height: 42px; padding: 0; font-size: 0; gap: 0; }
  .sidebar-collapsed .sidebar-footer .button > svg { width: 18px; height: 18px; }
  body:has(.sidebar-collapsed) #toast { left: calc(50% + 32px); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .reading-header { flex-wrap: wrap; }
  .reading-header-actions { margin-left: auto; }
}
@media (max-width: 760px) {
  .sidebar-toggle { display: none; }
  .topbar #read-date { width: 124px; min-height: 36px; padding: 6px; font-size: 11px; }
  .topbar-actions { flex: 1 1 auto; min-width: 0; }
  .topbar .profile { min-width: 0; flex: 1 1 auto; }
  .reading-header-actions { gap: 8px; flex-wrap: wrap; }
  .reading-header-actions .button { min-height: 36px; font-size: 11px; padding: 8px 11px; }
  .reading-header-actions .segmented button { min-height: 31px; font-size: 11px; }
  .selection-toolbar { min-height: 43px; gap: 0; padding: 5px 7px; }
  .selection-toolbar .highlight-tools { gap: 8px; padding: 2px 5px 2px 0; }
  .selection-toolbar .highlight-color { width: 21px; height: 21px; }
  .selection-toolbar .text-btn { font-size: 10px; padding-left: 8px; }
  .citation-bar { left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); width: auto; max-height: 65vh; border-radius: 15px; }
  .citation-bar-head { min-height: 52px; padding: 7px 10px 7px 16px; }
  .citation-bar-head > :is(h2, h3, strong) { font-size: 13px; }
  .citation-bar-head .icon-btn { min-width: 40px; min-height: 40px; width: 40px; height: 40px; }
  #citation-content { padding: 14px 16px 17px; }
  #citation-content .verse-text { font-size: 15px; }
}
@media (max-width: 430px) {
  .topbar #read-date { width: 124px; font-size: 11px; }
  .topbar select { width: 76px; flex-shrink: 0; }
  .topbar .profile { max-width: 94px; }
  .topbar .topbar-actions { gap: 2px; }
}
@media (max-width: 350px) {
  .topbar #read-date { width: 116px; padding-left: 5px; padding-right: 5px; font-size: 11px; }
  .topbar select { width: 70px; padding-left: 3px; font-size: 9px; }
  .topbar .profile { max-width: 82px; padding-left: 6px; padding-right: 6px; }
  .topbar .icon-btn { min-width: 30px; }
}

/* Reader refinement: a clearer bookmark and a quiet companion margin. */
.bookmark-toggle.active, .bookmark-toggle.active:hover { color: #b76f72; background: transparent; box-shadow: none; }
.bookmark-toggle.active svg { fill: currentColor; stroke: currentColor; }
[data-theme='dark'] .bookmark-toggle.active, [data-theme='dark'] .bookmark-toggle.active:hover { color: #cf9698; background: transparent; }
.reading-aside { gap: 0; }
.reading-aside > :is(.journey-card, .companion-callout, .reflection-preview) { padding: 20px 8px 26px; background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.reading-aside > .companion-callout, .reading-aside > .reflection-preview { padding-top: 27px; }
.reading-aside > .reflection-preview { margin-bottom: 20px; }
.reading-aside .reading-tip { padding: 14px 8px 0; }
@media (min-width: 981px) {
  .content-grid:has(.reading-aside) { grid-template-columns: minmax(0, 1fr) 236px; }
}
@media (max-width: 980px) and (min-width: 431px) {
  .reading-aside { gap: 16px; }
}

/* Focus keeps the original Scripture face and offers one visible exit. */
.chapter-bar { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.chapter-bar:not(:first-child) { margin-top: 15px; }
.chapter-bar > .chapter-heading { flex: 1; min-width: 0; border-bottom: 0; margin: 0; }
.chapter-bar > .button { flex-shrink: 0; min-height: 34px; padding: 7px 10px; font-size: 11px; gap: 6px; }
.chapter-bar > .button svg { width: 15px; height: 15px; }
.focus-exit { display: none; }
.app-shell.focus-mode .sidebar,
.app-shell.focus-mode .topbar,
.app-shell.focus-mode .hero,
.app-shell.focus-mode .site-footer,
.app-shell.focus-mode .mobile-nav,
.app-shell.focus-mode .reading-header,
.app-shell.focus-mode .reading-aside,
.app-shell.focus-mode .book-context,
.app-shell.focus-mode .daily-response,
.app-shell.focus-mode .completion-card,
.app-shell.focus-mode .reader-return,
.app-shell.focus-mode #content > .notice { display: none !important; }
.app-shell.focus-mode .main { margin: 0 auto; width: 100%; max-width: 1050px; min-height: 100vh; padding: 68px 24px 55px; background-color: transparent; background-image: none; }
.app-shell.focus-mode .content-grid { display: block; }
.app-shell.focus-mode #reading-pane { max-width: 920px; margin: 0 auto; }
.app-shell.focus-mode .chapter-bar, .app-shell.focus-mode #reading-pane { scroll-margin-top: 68px; }
.app-shell.focus-mode #verses { padding: 16px 20px; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.app-shell.focus-mode .chapter-bar > .button, .app-shell.focus-mode .chapter-bar > .focus-toggle { display: none; }
.app-shell.focus-mode .load-more { padding: 18px; border: 0; background: transparent; box-shadow: none; }
.app-shell.focus-mode .focus-exit { position: fixed; z-index: 65; top: 15px; right: 20px; display: inline-flex; min-height: 40px; padding: 9px 13px; gap: 7px; font-size: 12px; background: var(--surface); box-shadow: 0 3px 16px rgba(0, 0, 0, .035); }
body:has(.app-shell.focus-mode) #toast { left: 50%; }
@media (max-width: 760px) {
  .chapter-bar { gap: 8px; }
  .chapter-bar > .button { padding: 6px 8px; font-size: 10px; }
  .chapter-bar > .button svg { width: 14px; height: 14px; }
  .app-shell.focus-mode .main { padding: 63px 12px 35px; }
  .app-shell.focus-mode #verses { padding: 10px 7px; }
  .app-shell.focus-mode .chapter-bar, .app-shell.focus-mode #reading-pane { scroll-margin-top: 60px; }
  .app-shell.focus-mode .focus-exit { top: 12px; right: 13px; min-height: 39px; padding: 8px 11px; font-size: 11px; }
}

/* Silver is an optional UI face; Scripture/source containers retain their fonts. */
[data-style='pixel'] { --pixel-grid-line: color-mix(in srgb, var(--accent) 9%, transparent); }
[data-theme='dark'][data-style='pixel'] { --pixel-grid-line: rgba(255, 255, 255, .06); }
[data-style='pixel'] body { background-image: linear-gradient(to bottom, color-mix(in srgb, var(--accent) 10%, transparent), transparent 280px), linear-gradient(to right, var(--pixel-grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--pixel-grid-line) 1px, transparent 1px); background-position: 0 0; background-size: 100% 280px, 48px 48px, 48px 48px; background-repeat: no-repeat, repeat, repeat; }
[data-theme='dark'][data-style='pixel'] body { background-image: linear-gradient(to bottom, rgba(255, 255, 255, .07), transparent 280px), linear-gradient(to right, var(--pixel-grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--pixel-grid-line) 1px, transparent 1px); }
[data-style='pixel'] .main { background-color: transparent; background-image: none; }
[data-style='pixel'] :is(.ui-title, .hero-title, .brand > span, .brand strong, .sidebar-label, .nav-item > span, .journey-percent, .journey-percent small, .journey-card .stats .stat strong):not(#reading-pane, #reading-pane *, .verse-text, .verse-text *, .source-prose, .source-prose *, .daily-scripture, .daily-scripture *, .inline-note, .inline-note *, .expansion, .expansion *, .citation-bar, .citation-bar *, .highlight-excerpt, .highlight-excerpt *) { font-family: 'SilverPixel', var(--sans); font-synthesis: none; }
[data-style='pixel'] .journey-percent { font-size: 84px; line-height: 1; height: 64.5px; padding-top: 11.5px; }
[data-style='pixel'] .hero { padding-top: 22px; overflow: visible; }
[data-style='pixel'] .hero-title { line-height: 1.5; letter-spacing: .025em; }
[data-style='pixel'] .journey-track { height: auto; min-height: 0; padding: 3px; border: 2px solid var(--text-secondary); border-radius: 0; background: transparent; box-shadow: none; }
[data-style='pixel'] .journey-fill { display: none; }
[data-style='pixel'] .journey-blocks { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 3px; min-width: 0; }
[data-style='pixel'] .journey-block { min-width: 0; aspect-ratio: 1; background: linear-gradient(to right, var(--progress-color) 0, var(--progress-color) var(--block-fill, 0%), transparent var(--block-fill, 0%), transparent 100%); border-radius: 0; }
[data-style='pixel'] .reflection-preview .feathered::after { background: linear-gradient(transparent 0%, var(--bg) 96%); }
@media (max-width: 760px) {
  [data-style='pixel'] .journey-percent { font-size: clamp(72px, 20vw, 84px); }
}
@media (max-width: 520px) {
  .reading-aside > .journey-card { grid-column: 1 / -1; }
}

/* Saved journeys share a compact switcher without merging their progress. */
.saved-plans { display: grid; gap: 14px; margin: 22px 0; }
.saved-plan { padding: 17px; border: 1px solid var(--border); border-radius: 12px; }
.saved-plan.selected { border-color: var(--accent-muted); background: var(--accent-soft); }
.saved-plan-head, .saved-plan-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.saved-plan-head h3 { margin: 0; font-size: 16px; }
.saved-plan > p { font-size: 12px; margin: 9px 0 14px; }
.saved-plan-foot { margin-top: 14px; font-size: 12px; }
.saved-plan-foot .button { font-size: 12px; min-height: 36px; padding: 8px 11px; }
#bubble-form > small { display: block; margin-top: 12px; line-height: 1.8; }
@media (max-width: 430px) {
  .saved-plan { padding: 14px; }
  .saved-plan-head h3 { font-size: 14px; }
  .saved-plan-foot .button { width: 100%; }
}

/* Together: shorter rows, a shared progress track, and quiet glass messages. */
.race-filters { flex-wrap: wrap; gap: 14px 18px; }
.race-filter-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-left: auto; min-width: 125px; max-width: 100%; }
.race-filter-actions > .button { width: 100%; min-height: 40px; white-space: normal; }
.race-filter-actions .focus-toggle[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
[data-style='pixel'] .reading-header .race-heading.ui-title { padding-top: 6px; line-height: 1.5; overflow: visible; }
.race-filters > .race-compact-toggle { display: flex; align-items: center; align-self: flex-end; gap: 8px; width: auto; min-height: 40px; margin-left: auto; font-size: 12px; cursor: pointer; }
.race-filters > .race-compact-toggle input { flex-shrink: 0; }
.race-filters > .chip { margin-left: 0; }
.race-card { --runner-size: 50px; position: relative; isolation: isolate; padding: 12px 16px; margin-bottom: 10px; min-height: 128px; overflow: visible; }
.race-card:has(.runner-animal) { --runner-size: 75px; }
.race-card.has-bubble { min-height: 140px; }
.race-card .profile-row { gap: 10px; margin: 0; min-height: 32px; flex-wrap: nowrap; align-items: center; }
.race-card .profile-row .avatar { width: 32px; height: 32px; font-size: 12px; }
.race-card .race-identity { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 12px; }
.race-card .profile-row .race-name { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0; font-size: 14px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.race-card .profile-row .race-meta { margin: 0; font-size: 10.5px; line-height: 1.5; color: var(--text-secondary); overflow-wrap: anywhere; }
.race-card .profile-row .race-name .chip { margin-left: 0; }
.race-card .profile-row .status-label { flex: 0 0 auto; width: auto; padding: 0; margin: 0 0 0 auto; font-size: 16.667px; line-height: 1.35; }
.race-card .race-lane { margin-left: 42px; padding: var(--runner-size) 0 0; gap: 12px; }
.race-card.has-bubble .race-lane { padding-top: calc(var(--runner-size) + 10px); }
.race-track.journey-progress { position: relative; flex: 1; width: auto; min-width: 0; height: auto; overflow: visible; border-radius: 0; background: none; }
.race-track .runner { width: var(--runner-size); height: var(--runner-size); bottom: 100%; z-index: 2; pointer-events: none; }
.race-track .runner.runner-animal { --runner-size: 75px; }
.race-track .runner > svg,
.race-track .runner .race-avatar { display: block; width: var(--runner-size); height: var(--runner-size); max-width: none; overflow: hidden; }
.race-track .bubble { --bubble-surface: color-mix(in srgb, var(--surface-raised) 62%, transparent); bottom: calc(var(--runner-size) + 4px); max-width: min(200px, calc(100vw - 76px)); padding: 5px 9px; border-radius: 10px; border-color: color-mix(in srgb, var(--border) 75%, transparent); background: var(--bubble-surface); color: var(--text); font-size: 14.5px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; backdrop-filter: blur(10px) saturate(125%); -webkit-backdrop-filter: blur(10px) saturate(125%); box-shadow: 0 3px 14px rgba(24, 45, 31, .08); }
[data-theme='dark'] .race-track .bubble { --bubble-surface: color-mix(in srgb, var(--surface-raised) 76%, transparent); box-shadow: 0 3px 14px rgba(0, 0, 0, .2); }
.race-track .bubble::after { background: var(--bubble-surface); border-color: color-mix(in srgb, var(--border) 75%, transparent); }
.race-track .runner.edge-start .bubble { left: -2px; transform: none; }
.race-track .runner.edge-end .bubble { left: auto; right: -2px; transform: none; }
.race-track .runner.edge-start .bubble::after { left: calc(var(--runner-size) / 2 - 2px); }
.race-track .runner.edge-end .bubble::after { left: auto; right: calc(var(--runner-size) / 2 - 2px); }
.race-card .race-metrics { flex: 0 0 180px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-self: center; gap: 10px; min-width: 0; }
.race-card .race-metric { min-width: 0; text-align: right; }
.race-card .race-metric-label { display: block; font-size: 11px; line-height: 1.4; color: var(--text-secondary); overflow-wrap: anywhere; }
.race-card .race-percent { display: block; width: auto; font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1.35; }
[data-style='pixel'] .race-card .race-percent { font-family: 'SilverPixel', var(--sans); font-synthesis: none; font-size: 22px; padding-top: .22em; line-height: 1; }
.race-card.race-compact { min-height: 80px; padding-top: 14px; padding-bottom: 14px; }
.race-card.race-compact .profile-row { min-height: 0; }
.race-card.race-compact .race-lane { margin-left: 0; padding-top: 8px; }
.race-card.race-compact :is(.avatar, .race-meta, .status-label, .runner, .bubble) { display: none; }
.race-legend { margin: 15px 0 0; gap: 9px 18px; font-size: 11px; line-height: 1.8; }
.race-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.race-legend :is(.race-legend-dot, .dot) { display: inline-block; flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

/* The 20 data cells retain precise fills; the mask adds fixed square pixels
   across wide lanes without making the track taller or adding a second gap. */
[data-style='pixel'] .race-track .journey-blocks { gap: 0; height: 12px; -webkit-mask-image: repeating-linear-gradient(to right, #000 0 12px, transparent 12px 15px); mask-image: repeating-linear-gradient(to right, #000 0 12px, transparent 12px 15px); }
[data-style='pixel'] .race-track .journey-block { height: 12px; aspect-ratio: auto; }

@media (max-width: 760px) {
  .race-card { padding-left: 14px; padding-right: 14px; }
  .race-card .profile-row { gap: 8px; }
  .race-card .race-identity { gap: 2px 8px; }
  .race-card .race-lane { margin-left: 40px; gap: 8px; flex-wrap: wrap; }
  .race-card .race-track.journey-progress { flex-basis: 100%; }
  .race-card .race-metrics { flex: 0 1 210px; margin-left: auto; gap: 14px; }
  .race-card .race-percent { width: auto; font-size: 16px; }
  .race-filters > .race-compact-toggle { margin-left: 0; flex: 0 0 auto; }
  .race-filter-actions { flex: 0 1 auto; }
}
@media (max-width: 430px) {
  .race-card .profile-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; }
  .race-card .profile-row .avatar { grid-column: 1; grid-row: 1 / 3; }
  .race-card .race-identity { display: contents; }
  .race-card .profile-row .race-name { grid-column: 2; grid-row: 1; font-size: 13px; }
  .race-card .profile-row .race-meta { grid-column: 2 / -1; grid-row: 2; font-size: 10px; }
  .race-card .profile-row .status-label { grid-column: 3; grid-row: 1; font-size: 16.667px; }
  .race-card.has-bubble .race-lane { padding-top: calc(var(--runner-size) + 10px); }
  .race-card .race-lane { margin-left: 40px; }
  .race-track .bubble { font-size: 14px; }
  .race-card.race-compact .profile-row { display: flex; }
  .race-card.race-compact .race-identity { display: flex; }
  .race-card.race-compact .race-lane { margin-left: 0; }
}
/* The large artwork is a background for the page's opening content.
   Keep it below the text without increasing the compact hero's height. */
.main { position: relative; isolation: isolate; }
.hero { overflow: visible; background: transparent; }
.hero::after { display: none; }
.hero-title-row { position: static; z-index: auto; isolation: auto; display: flex; align-items: flex-end; min-height: 90px; margin-bottom: 4px; }
.hero-title-row > .hero-title { position: relative; z-index: 1; min-width: 0; width: fit-content; max-width: 100%; margin: 0; transform: translateY(9px); }
.hero-art { position: absolute; z-index: -1; right: 25px; top: -20px; display: block; width: 70%; aspect-ratio: 1911 / 823; opacity: .32; pointer-events: none; user-select: none; -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 56%, rgba(0, 0, 0, .65) 74%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, #000 56%, rgba(0, 0, 0, .65) 74%, transparent 100%); }
.hero-art > img { position: absolute; left: 0; top: 0; display: block; width: 100%; max-width: none; height: auto; }
.hero-art > .hero-art-pixel { display: none; }
[data-theme='dark'] .hero-art-standard { filter: invert(1); }
[data-style='pixel'] .hero-art { aspect-ratio: 1910 / 823; opacity: .26; }
[data-style='pixel'] .hero-art > .hero-art-standard { display: none; }
[data-style='pixel'] .hero-art > .hero-art-pixel { display: block; image-rendering: pixelated; }
/* Only phone headings soften the artwork, lightly and with feathered edges.
   Subtitles, small labels, and journey figures stay free of blur shields. */
.hero-subtitle { width: fit-content; }
.reading-header > div:first-child > :is(h2, p, .eyebrow) { width: fit-content; max-width: 100%; }
.hero-title, .hero-subtitle, .reading-header > div:first-child > :is(h2, p, .eyebrow), .journey-card > .eyebrow { position: relative; z-index: 1; }
.hero-title::before,
.reading-header > div:first-child > h2::before {
  content: none;
  position: absolute;
  z-index: -1;
  inset: -16px -20px;
  pointer-events: none;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  --blur-feather-y: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .2) 5px, rgba(0, 0, 0, .65) 11px, #000 16px, #000 calc(100% - 16px), rgba(0, 0, 0, .65) calc(100% - 11px), rgba(0, 0, 0, .2) calc(100% - 5px), transparent);
  --blur-feather-x: linear-gradient(to right, transparent, rgba(0, 0, 0, .2) 6px, rgba(0, 0, 0, .65) 13px, #000 20px, #000 calc(100% - 20px), rgba(0, 0, 0, .65) calc(100% - 13px), rgba(0, 0, 0, .2) calc(100% - 6px), transparent);
  -webkit-mask-image: var(--blur-feather-y), var(--blur-feather-x);
  mask-image: var(--blur-feather-y), var(--blur-feather-x);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.reading-pane { scroll-margin-top: 18px; }
.chapter-pager-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.companion-callout .runner-illustration { width: 78px; height: 78px; margin-bottom: 12px; background: transparent; border-radius: 0; }
.companion-callout .runner-illustration > .race-avatar { width: 66px; height: 66px; max-width: none; }
[data-theme='dark'] .companion-callout .runner-illustration { background: transparent; }
.completion-card { flex-wrap: wrap; gap: 16px 20px; }
.completion-card > div { flex: 1 1 250px; }
.completion-card .completion-heading { font-size: 18px; line-height: 1.5; }
.completion-card .completion-hint { font-size: 13.667px; line-height: 1.8; }
.completion-card .completion-toggle { flex: 0 1 auto; min-height: 46px; max-width: 100%; padding: 12px 18px; font-size: 13.667px; white-space: normal; text-align: center; }
.scripture-highlight, .note-highlight { cursor: pointer; user-select: text; }
.scripture-highlight:focus-visible, .note-highlight:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.highlight-excerpt { font-family: var(--serif); font-size: 17px; font-weight: 400; line-height: 2.05; letter-spacing: .025em; color: var(--text); overflow-wrap: anywhere; white-space: pre-line; margin: 0 0 11px; }
.highlight-excerpt.english { font-family: Georgia, 'Times New Roman', serif; line-height: 1.85; letter-spacing: 0; }
.selection-toolbar .highlight-tools { flex: 0 0 auto; }
@media (max-width: 760px) {
  .hero { padding-top: 16px; padding-bottom: 18px; }
  .hero-title-row { min-height: 58px; margin-bottom: 4px; }
  .hero-title::before, .reading-header > div:first-child > h2::before { content: ''; inset: 0 -20px; }
  .hero-art { right: 12px; top: 0; width: 85%; opacity: .22; }
  [data-style='pixel'] .hero { padding-top: 22px; }
  [data-style='pixel'] .hero-art { opacity: .2; }
  .completion-card .completion-toggle { flex-basis: 100%; width: 100%; }
}
@media (max-width: 430px) {
  .hero-title-row { min-height: 56px; }
}

/* Phone controls stay compact, readable, and reachable without changing
   the desktop reader. Six destinations are visible; settings is next. */
@media (max-width: 760px) {
  .topbar { display: flex; gap: 6px; }
  .topbar #read-date { width: 124px; min-width: 0; }
  .topbar .topbar-actions { display: flex; align-items: center; gap: 4px; width: auto; flex: 0 1 auto; min-width: 0; margin-left: 0; }
  .topbar .icon-btn[data-action='theme'] { justify-self: center; width: 32px; min-width: 32px; padding: 0; }
  .topbar #language { min-width: 0; padding-left: 3px; padding-right: 3px; text-align: right; text-align-last: right; font-size: 11px; }
  .topbar #language[data-language='zh'] { width: 54px; }
  .topbar #language[data-language='en'] { width: 68px; }
  .topbar #language[data-language='both'] { width: 78px; }
  .topbar .profile { width: auto; min-width: 0; max-width: none; flex: 0 1 auto; padding-left: 6px; padding-right: 6px; font-size: 10px; }

  .hero-title-row { min-height: 60px; overflow: visible; }
  .hero-title-row > .hero-title { font-family: 'ChenYuLuoYan', var(--serif); font-size: clamp(44px, 11vw, 56px); font-weight: 400; line-height: 1.35; letter-spacing: .01em; overflow: visible; }
  [data-style='pixel'] .hero-title-row > .hero-title { font-family: 'SilverPixel', var(--sans); font-size: clamp(32px, 8vw, 42px); line-height: 1.8; padding-top: 6px; padding-bottom: 2px; letter-spacing: .025em; }

  .reading-header .reading-title-block { flex: 1 1 100%; min-width: 0; }
  .reading-header-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; width: 100%; min-width: 0; }
  .reading-header-actions > .button { width: 100%; min-height: 38px; padding: 8px; }
  .reading-header-actions > .segmented { display: flex; min-width: 0; min-height: 38px; padding: 3px; gap: 2px; }
  .reading-header-actions .segmented button { min-width: 28px; min-height: 30px; padding: 5px 6px; }
  .reading-header-actions .segmented button[data-action='today'] { flex: 1; }

  .mobile-nav { display: block; inset: auto 0 0; width: 100%; max-width: 100vw; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); transform: translateY(0); transition: transform .18s ease; }
  .mobile-nav-track { display: flex; width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mobile-nav-track::-webkit-scrollbar { display: none; }
  .mobile-nav-track > :is(button, a) { flex: 0 0 calc(100% / 6); width: calc(100% / 6); min-width: 0; min-height: 48px; padding: 3px 1px; font-size: 11.667px; scroll-snap-align: start; }
  .mobile-nav-track > :is(button, a) > span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-nav.nav-hidden { transform: translateY(100%); pointer-events: none; }
  .mobile-nav:has(:focus-visible) { transform: translateY(0); pointer-events: auto; }

  .race-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px 8px; padding: 14px; }
  .race-filters > label { grid-template-rows: 1fr 40px; align-self: stretch; width: auto; min-width: 0; gap: 5px; font-size: 11.5px; }
  .race-filters select { width: 100%; min-width: 0; min-height: 40px; padding: 6px; font-size: 11.5px; }
  .race-filter-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; min-width: 0; margin-left: 0; }
  .race-filter-actions > .button { min-width: 0; min-height: 38px; padding: 8px 6px; font-size: 11px; gap: 6px; }
  .race-card .profile-row :is(.race-meta, .status-label) { display: none; }

  .reading-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 14px 12px; }
  .reading-aside > .journey-card { grid-column: 1 / -1; padding-top: 12px; padding-bottom: 18px; }
  .journey-card .stats { padding-top: 12px; padding-bottom: 10px; gap: 10px; }
  .journey-card .stat strong { margin-bottom: 4px; font-size: 28.333px; line-height: 1.2; }
  .journey-card .stat span { display: block; font-size: 15.333px; line-height: 1.45; }
  .journey-card > p { font-size: 15.333px; line-height: 1.5; margin-bottom: 10px; }
  .reading-aside > :is(.companion-callout, .reflection-preview) { display: flex; flex-direction: column; align-self: stretch; min-width: 0; padding: 16px 0 0; margin-bottom: 0; border-bottom: 0; }
  .companion-callout > .button { margin-top: auto; }
  .reflection-preview > .text-btn { margin-top: auto; align-self: flex-start; text-align: left; }
  .reading-aside > .reading-tip { grid-column: 1 / -1; }
}
@media (max-width: 430px) {
  .topbar .profile { display: block; }
  .race-card .profile-row { grid-template-columns: 32px minmax(0, 1fr); }
  .race-card .profile-row .avatar { grid-row: 1; }
}
@media (max-width: 350px) {
  .topbar { gap: 4px; }
  .topbar .topbar-actions { gap: 2px; }
  .mobile-nav-track > :is(button, a) { font-size: 10.667px; }
}

/* Silver's large native descender leaves its ink high in the line box.
   Correct only the requested UI roles, keeping every source text untouched. */
[data-style='pixel'] .hero-title-row > .hero-title { line-height: 1.4; padding-top: .12em; padding-bottom: 0; transform: translateY(.24em); }
[data-style='pixel'] .reading-header h2.daily-scripture,
[data-style='pixel'] .daily-scripture > :is(.chinese, .english) { font-family: 'SilverPixel', var(--sans); font-synthesis: none; font-weight: 400; letter-spacing: .025em; line-height: 1.5; }
[data-style='pixel'] .reading-header h2.daily-scripture { padding-top: .38em; margin-top: 0; margin-bottom: 0; }
[data-style='pixel'] .daily-scripture > :is(.chinese, .english) { font-size: inherit; }
[data-style='pixel'] :is(.reading-header, .daily-response) .ui-title { padding-top: .4em; line-height: 1.5; overflow: visible; }
[data-style='pixel'] .reading-header .race-heading.ui-title { padding-top: .4em; }
[data-style='pixel'] :is(.plan-summary, .journey-card) .stat strong,
[data-style='pixel'] .journey-card .stat span { font-family: 'SilverPixel', var(--sans); font-synthesis: none; }
[data-style='pixel'] .plan-summary .stat strong { line-height: 1.05; padding-top: .28em; margin-bottom: -.18em; }
[data-style='pixel'] .journey-card .stat strong { line-height: 1; padding-top: .28em; margin-bottom: -.25em; }
[data-style='pixel'] .journey-card .stat span { display: block; line-height: 1.4; padding-top: .25em; }
.companion-callout > .button,
.reflection-preview > .reflection-action { min-height: 44px; padding: 9px 10px; font-size: 11px; line-height: 1.4; gap: 6px; white-space: normal; text-align: center; }
.companion-callout > .button > svg,
.reflection-preview > .reflection-action > svg { width: 15px; height: 15px; }
@media (max-width: 760px) {
  .reflection-preview > .reflection-action { margin-top: auto; align-self: stretch; }
  .topbar .profile-label { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 760px) and (orientation: portrait) {
  /* Equal side columns keep the theme icon at the viewport's true centre. */
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); gap: 4px; }
  .topbar #read-date { justify-self: start; width: 112px; max-width: 100%; min-width: 0; padding: 5px 3px; font-size: 11px; text-align: left; }
  .topbar #read-date::-webkit-calendar-picker-indicator { margin-left: 2px; }
  .topbar > .theme-toggle { justify-self: center; width: 32px; min-width: 32px; margin-left: 0; }
  .topbar .topbar-actions { justify-self: end; justify-content: flex-end; width: auto; max-width: 100%; min-width: 0; gap: 3px; }
  .topbar #language { flex: 0 0 auto; }
  .topbar .profile { display: flex; flex: 0 1 auto; width: auto; max-width: 100%; min-width: 0; padding: 5px 4px; gap: 4px; overflow: hidden; }
  .topbar .profile-label { flex: 0 1 auto; }
  .companion-callout > h3 { order: 0; font-size: 14px; line-height: 1.5; margin: 0 0 12px; }
  .companion-callout > p { order: 1; margin-bottom: 12px; }
  .companion-callout > .runner-illustration { order: 2; margin: 0 auto 12px; }
  .companion-callout > .button { order: 3; }
  .reflection-preview .card-head h3 { font-size: 14px; line-height: 1.5; }
  .companion-callout > .button,
  .reflection-preview > .reflection-action { height: 48px; min-height: 48px; padding: 6px 8px; gap: 5px; }
  .app-shell:has(#language[data-language='both']) .companion-callout > .button,
  .app-shell:has(#language[data-language='both']) .reflection-preview > .reflection-action { height: 64px; min-height: 64px; }
}
@media (max-width: 350px) and (orientation: portrait) {
  .topbar #read-date { width: 108px; font-size: 10.5px; }
  .topbar #language { font-size: 10px; }
  .topbar #language[data-language='zh'] { width: 50px; }
  .topbar #language[data-language='en'] { width: 62px; }
  .topbar #language[data-language='both'] { width: 72px; }
}

/* A phone in landscape can use the sidebar without losing its lower links.
   Every section keeps its height so the whole column can scroll naturally. */
@media (min-width: 761px) and (max-height: 600px) and (any-pointer: coarse) {
  .sidebar { inset: 0 auto auto 0; height: 100vh; height: 100dvh; max-height: 100dvh; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
  .sidebar > * { flex-shrink: 0; }
}
@media print {
  .sidebar, .topbar, .mobile-nav, .side-column, .verse-actions, .note-controls, .xref-controls, .book-tools, .finish-reading, .toast, .composer, .citation-bar, .selection-toolbar, .hero-art { display: none !important; }
  .hero-title::before, .hero-subtitle::before, .reading-header > div:first-child > :is(h2, p, .eyebrow)::before, .journey-card > .eyebrow::before { display: none; }
  .main { margin: 0; padding: 0; background-image: none; }
  .card { border: 0; padding: 0; box-shadow: none; }
  .hero { padding: 0; margin: 0 0 25px; background: none; }
  .content-grid { display: block; }
  .verse-card { break-inside: avoid; }
}
