@font-face {
  font-family: Source Serif;
  src: url('./source-serif.ttf') format('truetype');
  font-display: swap;
}
:root {
  color-scheme: dark;
  --paper: #000;
  --panel: #0e1110;
  --raised: #161b17;
  --ink: #f1f3ee;
  --muted: #a3ada5;
  --line: #273228;
  --accent: #04e800;
  --accent-visible: #04e800;
  --accent-ink: #001500;
  --serif: 'Source Serif', Georgia, serif;
  --reader-font: var(--serif);
  --reader-size: 25px;
  --reader-space: 1.46;
  --reader-margin: 26px;
  --reader-weight: 400;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
:root.light {
  color-scheme: light;
  --paper: #faf6ed;
  --panel: #f2ebdc;
  --raised: #e8e1d2;
  --ink: #262219;
  --muted: #635c4f;
  --line: #d0c7b7;
}
:root.soft-dark { --paper: #0e1110; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 44px;
  padding: .55em .9em;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
  touch-action: manipulation;
}
button:hover:not(:disabled), .button:hover { border-color: var(--accent-visible); }
button:disabled { opacity: .55; cursor: default; }
button.quiet { border-color: transparent; background: transparent; }
button.primary, .button.primary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }
:focus-visible { outline: 2px solid var(--accent-visible); outline-offset: 3px; }
a { color: var(--accent-visible); }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
.stars { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.light .stars { visibility: hidden; }
.brand { display: inline-flex; align-items: center; gap: .55em; font-size: 1.07rem; font-weight: 750; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 9px; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: .65em; }
.sharing { padding: var(--safe-top) max(24px, var(--safe-right)) var(--safe-bottom) max(24px, var(--safe-left)); }
.share-wrap { width: min(100%, 1120px); margin: auto; position: relative; }
.share-header { min-height: 76px; display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid #263228; }
.share-header-link { color: var(--ink); text-decoration: none; font-size: .9rem; }
.share-header-link span { color: var(--accent-visible); }
.hero { display: grid; grid-template-columns: 1fr .96fr; align-items: center; gap: clamp(30px, 5vw, 70px); padding: clamp(58px, 8vw, 110px) 0 clamp(55px, 8vw, 105px); }
.hero-copy { display: grid; justify-items: start; gap: 21px; }
.hero-icon { border: 1px solid #22362a; border-radius: 21px; box-shadow: 0 0 65px #14bd1c24; }
.hero h1 { font: 600 clamp(3.4rem, 8vw, 7rem)/.93 var(--serif); letter-spacing: -.065em; }
.hero-copy p { color: #c0ccc1; font-size: clamp(1.02rem, 2vw, 1.23rem); max-width: 31em; line-height: 1.55; }
.hero-copy .hero-meta { color: var(--muted); font-size: .85rem; }
.hero-meta span { padding-inline: .4em; }
.hero-photos { display: grid; grid-template: 1fr / 1fr; justify-items: center; align-items: center; isolation: isolate; }
.hero-photos img { grid-area: 1 / 1; width: 49%; height: auto; border-radius: 23px; border: 1px solid #405746; box-shadow: 0 18px 50px #000a; }
.hero-photo-main { transform: translateX(-24%) rotate(-5deg); z-index: 1; }
.hero-photo-secondary { transform: translate(50%, -4%) rotate(9deg); opacity: .82; }
.installation, .previews { padding-block: 34px 45px; border-top: 1px solid #263228; }
.sharing h2 { font: 600 clamp(1.9rem, 4vw, 2.75rem)/1.12 var(--serif); letter-spacing: -.04em; }
.installation > p, .device-panel p { margin-block: 10px 15px; line-height: 1.55; color: var(--muted); }
.device-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin: 24px 0 0; }
.device-buttons [aria-pressed='true'] { color: var(--accent-visible); border-color: var(--accent-visible); }
.device-panel { margin-top: 10px; border: 1px solid var(--line); background: #101512dc; border-radius: 18px; padding: 18px; }
.steps { padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; list-style: none; }
.steps li { display: grid; justify-items: start; align-content: start; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.steps li span:last-child { color: var(--muted); line-height: 1.4; }
.step-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 9px; background: #1c3521; color: var(--accent-visible); font-size: 1.4rem; }
details { margin-top: 18px; }
summary { cursor: pointer; width: fit-content; color: var(--ink); }
.text-link { display: inline-block; padding: .5rem; }
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(9px, 2.5vw, 25px); margin-top: 24px; }
.preview-grid figure { margin: 0; }
.preview-grid img { border-radius: 15px; width: 100%; border: 1px solid var(--line); }
figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.sharing footer { border-top: 1px solid var(--line); padding-block: 22px; display: flex; gap: 12px 26px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.privacy-copy { max-width: 670px; padding-block: 40px; line-height: 1.55; }
.privacy-copy h1 { font: 600 3.2rem/1 var(--serif); margin-bottom: .5rem; }
.privacy-copy h2 { margin-top: .5rem; }
.application { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.app-header, .app-nav { display: flex; flex: 0 0 auto; align-items: center; z-index: 2; background: var(--paper); position: relative; }
.app-header { justify-content: space-between; border-bottom: 1px solid var(--line); padding: max(6px, var(--safe-top)) max(12px, var(--safe-right)) 6px max(12px, var(--safe-left)); }
.app-header .brand { background: transparent; border: none; padding: 2px; min-height: 44px; }
.header-actions { display: flex; align-items: center; gap: .25rem; }
.search-icon { font-size: 1.3em; line-height: 1; }
.app-nav { justify-content: center; border-top: 1px solid var(--line); padding: 3px max(4px, var(--safe-right)) max(3px, var(--safe-bottom)) max(4px, var(--safe-left)); }
.app-nav button { border: 0; background: transparent; display: flex; flex-direction: column; gap: 0; flex: 1 1 0; max-width: 135px; min-width: 0; padding: 4px 2px; font-size: .75rem; color: var(--muted); }
.app-nav button span { font-size: 1.28rem; line-height: 1.15; }
.app-nav .bookmark-icon { width: 13px; height: 16px; margin: 4px 0 3px; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 73%, 0 100%); }
.app-nav button[aria-current='page'] { color: var(--accent-visible); }
.main-view { flex: 1; min-height: 0; position: relative; display: grid; overflow: hidden; }
.page { overflow: auto; min-height: 0; width: 100%; padding: clamp(20px, 5vw, 40px) max(clamp(15px, 4vw, 28px), var(--safe-right)) 34px max(clamp(15px, 4vw, 28px), var(--safe-left)); }
.page > * { width: min(100%, 720px); margin-inline: auto; }
.page h1 { font: 600 clamp(2.12rem, 6vw, 3.75rem)/1.06 var(--serif); letter-spacing: -.055em; margin-bottom: 14px; }
.page h2 { font: 600 1.58rem/1.15 var(--serif); margin-block: 12px; }
.page section, .card { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: var(--panel); margin-block: 11px; }
.page section:first-of-type h2 { margin-top: 0; }
.page p, .card p { color: var(--muted); line-height: 1.5; }
.daily-quote { font: 1.25rem/1.5 var(--serif); color: var(--ink) !important; margin: .55rem 0 .85rem; }
.muted { color: var(--muted); }
.reading-progress { display: grid; gap: .5rem; }
.reading-progress button { width: 100%; justify-content: space-between; text-align: start; }
.reading-progress button span { text-align: end; color: var(--muted); flex-shrink: 0; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 7px; }
.tile-grid button.complete { background: var(--raised); color: var(--accent-visible); border-color: var(--accent-visible); }
.tile-grid button.partial { border-style: dashed; }
progress { width: 100%; accent-color: var(--accent-visible); min-height: 14px; }
.progress-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-block: 12px; }
.progress-head h1, .progress-head h2 { margin: 0; }
.stack { display: grid; gap: 10px; }
.inline-list { display: flex; flex-wrap: wrap; gap: 7px; margin-block: 10px; }
#reader-view { display: flex; flex-direction: column; min-height: 0; }
.reader-tools { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 3px max(8px, var(--safe-right)) 3px max(8px, var(--safe-left)); border-bottom: 1px solid var(--line); background: var(--paper); z-index: 1; }
.reading-actions { display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.reader-tools button { padding-inline: .65em; }
#location { text-align: left; font-weight: 700; flex-shrink: 1; min-width: 0; overflow-wrap: anywhere; }
#play { min-width: 45px; }
.reader-tools #speed { transition: opacity .18s; }
.autoscrolling .reader-tools #speed { opacity: .72; }
.application:has(.autoscrolling) .app-header { display: none; }
.autoscrolling .reader-tools { padding-top: max(3px, var(--safe-top)); }
.reader-scroll { min-height: 0; flex: 1; height: 100%; overflow: auto; overscroll-behavior-y: contain; overflow-anchor: none; position: relative; }
.chapter { width: min(100%, 790px); margin-inline: auto; padding: 24px max(var(--reader-margin), var(--safe-right)) 14px max(var(--reader-margin), var(--safe-left)); }
.chapter h2 { font: 600 2rem/1.2 var(--serif); margin-bottom: 16px; }
.chapter h3 { font: italic 1.08rem/1.3 var(--serif); color: var(--muted); white-space: pre-line; margin: 14px 0 8px; }
.verse { font: var(--reader-weight) var(--reader-size)/var(--reader-space) var(--reader-font); display: block; padding-block: 1px; white-space: pre-line; overflow-wrap: break-word; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.verse b { color: var(--accent-visible); font-family: system-ui, sans-serif; font-size: .54em; vertical-align: super; margin-right: .45em; font-weight: 650; }
.verse.poetry { padding-inline-start: .75em; }
.verse-mark { color: var(--accent-visible); font: .55em system-ui; margin-inline-start: .6em; vertical-align: super; }
.reader-end { padding: 24px; text-align: center; color: var(--muted); }
.initial-state { justify-self: center; align-self: start; padding: 30px 20px; color: var(--muted); }
dialog { position: fixed; inset: auto 0 max(var(--keyboard-offset, 0px), var(--safe-bottom)); width: min(calc(100% - 12px), 600px); max-height: min(calc(var(--visual-height, 100dvh) * .85), 790px); overflow: auto; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px max(17px, var(--safe-bottom)); box-shadow: 0 15px 70px #0009; }
dialog::backdrop { background: #000a; }
.sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sheet-heading h2 { font: 600 1.58rem/1.15 var(--serif); }
#close-sheet { min-width: 44px; font-size: 1.35rem; }
label.control { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(100px, 1.2fr); align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; }
label.control > span { overflow-wrap: anywhere; }
input:not([type='range'],[type='checkbox'],[type='color']), textarea, select { width: 100%; padding: 9px 10px; min-height: 44px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 9px; font-size: max(16px, 1rem); }
input[type='range'], input[type='checkbox'] { accent-color: var(--accent-visible); }
input[type='checkbox'] { width: 21px; height: 21px; justify-self: end; margin-right: 8px; }
input[type='color'] { width: 100%; min-height: 44px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; }
textarea { resize: vertical; min-height: 92px; }
.setting-group { display: grid; gap: 5px; }
.setting-group > h2 { margin-block: 0 7px; }
.rgb-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rgb-controls label { color: var(--muted); font-size: .8rem; }
.rgb-controls input { margin-top: 4px; padding-inline: 5px !important; }
.notice { color: var(--ink); background: var(--raised); border: 1px solid var(--line); position: fixed; z-index: 3; inset: auto 12px calc(68px + var(--safe-bottom)); width: fit-content; max-width: calc(100% - 24px); margin: auto; padding: 11px 15px; border-radius: 12px; box-shadow: 0 4px 18px #0005; }
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; gap: 45px; padding-block: 46px 58px; }
  .hero-photos { width: min(100%, 410px); margin-inline: auto; }
  .hero-photos img { width: 47%; border-radius: 16px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 365px) {
  .reader-tools button { padding-inline: .4em; }
  .sharing { padding-inline: max(14px, var(--safe-left)); }
  .app-header .brand { font-size: 1rem; }
}
@media (min-height: 690px) and (min-width: 650px) {
  :root:not(.keyboard-open) dialog { inset: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; scroll-behavior: auto !important; } }
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { transition-duration: 0s !important; }
