@font-face { font-family: "Special Elite"; src: url("fonts/SpecialElite-Regular.ttf") format("truetype"); font-display: swap; }
:root {
  --tabs-bg: rgba(250, 250, 247, 0.94);
  --seg: #E8E5DD;
  --scale: 1;
  color-scheme: light;
  --paper: #FAFAF7;
  --card: #FFFFFF;
  --ink: #16130F;
  --muted: #67645E;
  --line: #E4E2DC;
  --clay: #16130F;          /* accent text on light = black */
  --clay-soft: #FFF3B0;
  --yellow: #FFD60A;        /* brand yellow from the Meet JESUS logo */
  --type: "American Typewriter", "Courier Prime", "Courier New", Courier, monospace;
  --logo: "Special Elite", "American Typewriter", "Courier New", monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabs-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); }
body { font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }

#app { max-width: 560px; margin: 0 auto; min-height: 100%; position: relative; }
#view { padding: calc(var(--safe-top) + 20px) 20px calc(var(--tabs-h) + var(--safe-bottom) + 32px); outline: none; }

/* Tabs */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center;
  background: var(--tabs-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
}
#tabs .inner { display: flex; width: 100%; max-width: 560px; height: var(--tabs-h); }
#tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); letter-spacing: .01em; }
#tabs button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#tabs button[aria-current="page"] { color: var(--ink); font-weight: 600; }
#tabs button[aria-current="page"] svg { stroke-width: 2; }

/* Type */
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.eyebrow.clay { color: var(--clay); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 26px; line-height: 1.15; }
h3 { font-size: 19px; line-height: 1.25; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.brand { font-size: 11px; letter-spacing: .22em; font-weight: 700; }
.brand span { color: var(--clay); }
.backbtn { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); padding: 6px 0; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.card.ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.card.ink .muted { color: #B9B1A3; }
.card.clay { background: var(--clay); color: #FFF8F2; border-color: var(--clay); }
.card.tap { display: block; width: 100%; text-align: left; transition: transform .12s ease; }
.card.tap:active { transform: scale(.985); }
.list { display: flex; flex-direction: column; gap: 12px; }

.verse-text { font-family: var(--serif); font-size: 23px; line-height: 1.35; }
.verse-ref { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; margin-top: 14px; }
blockquote { margin: 0; padding-left: 14px; border-left: 2px solid var(--clay); font-family: var(--serif); font-size: 18px; line-height: 1.45; }
blockquote cite { display: block; margin-top: 8px; font-family: var(--sans); font-style: normal; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 16px; background: var(--ink); color: var(--paper); }
.btn.block { display: flex; width: 100%; }
.btn.clay { background: var(--clay); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.light { background: #FAFAF7; color: #000; }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn:active { opacity: .85; }
.link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Progress */
.bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--clay); border-radius: 4px; }
.dots { display: flex; gap: 6px; }
.dots i { flex: 1; height: 3px; border-radius: 3px; background: var(--line); }
.dots i.on { background: var(--ink); }

/* Gospel flow */
.flow { min-height: calc(100vh - var(--tabs-h) - 120px); display: flex; flex-direction: column; }
.flow .content { flex: 1; padding-top: 28px; }
.flow h1 { font-size: 36px; margin: 10px 0 18px; }
.flow .body { font-size: 18px; line-height: 1.55; }
.flow .nav { display: flex; gap: 10px; margin-top: 28px; }
.flow .nav .btn { flex: 1; }
.prayer { font-family: var(--serif); font-size: 20px; line-height: 1.5; }

/* Chapters / days */
.item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.item:last-child { border-bottom: 0; }
.num { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 14px; font-weight: 600; background: var(--card); }
.num.done { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.num.current { border-color: var(--clay); color: var(--clay); }
.item .t { font-weight: 600; }
.item .s { font-size: 14px; color: var(--muted); }
.chev { margin-left: auto; color: var(--muted); }

.reader { font-family: var(--serif); font-size: 19px; line-height: 1.65; }
.reader sup { font-family: var(--sans); font-size: 11px; color: var(--clay); font-weight: 700; margin-right: 3px; }

/* Books */
.book { display: flex; gap: 16px; }
.spine { width: 54px; height: 78px; flex: none; border-radius: 4px 8px 8px 4px; background: var(--ink); color: var(--paper); display: flex; align-items: flex-end; padding: 6px; font-family: var(--serif); font-size: 10px; line-height: 1.1; box-shadow: inset 4px 0 0 rgba(255,255,255,.12); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--clay); background: var(--clay-soft); padding: 3px 8px; border-radius: 999px; }

/* Journal */
textarea { width: 100%; min-height: 130px; resize: vertical; font: inherit; font-size: 17px; line-height: 1.5; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; outline: none; }
textarea:focus { border-color: var(--ink); }
.seg { display: flex; background: var(--seg); padding: 3px; border-radius: 999px; }
.seg button { flex: 1; padding: 8px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.entry .date { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.entry .text { margin: 6px 0 12px; white-space: pre-wrap; font-size: 16px; }
.entry.answered .text { color: var(--muted); }
.pill { font-size: 12px; font-weight: 700; color: #2F6B45; background: #DCEBDF; padding: 3px 9px; border-radius: 999px; }
.actions { display: flex; gap: 16px; font-size: 14px; }
.actions button { color: var(--muted); font-weight: 600; }

/* Settings */
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.switch { width: 52px; height: 32px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--clay); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
input[type="time"] { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }

#toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-bottom) + 16px); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 20; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.fade { animation: fade .28s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade { animation: none; } }

/* v2: encounter, prayer room, library */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 .card { padding: 16px; }
.field { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none; }
.field:focus { border-color: var(--ink); }
select.field { padding: 8px 12px; }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #E0563A; margin-right: 8px; vertical-align: 1px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(224,86,58,.55); } 50% { box-shadow: 0 0 0 6px rgba(224,86,58,0); } }
.bigcount { font-family: var(--serif); font-size: 72px; line-height: 1; margin-top: 12px; font-weight: 600; }
.slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.slot { border: 1px solid var(--line); border-radius: 10px; padding: 7px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--paper); }
.slot span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.slot b { font-size: 12px; color: var(--muted); font-weight: 600; }
.slot.on { background: var(--clay-soft); border-color: #E4C3B2; }
.slot.on b { color: var(--clay); }
.slot.me { background: var(--ink); border-color: var(--ink); }
.slot.me span, .slot.me b { color: var(--paper); }
.spine.free { background: var(--clay); }
.timer { font-family: var(--serif); font-size: 56px; font-weight: 600; }
.btn[disabled] { opacity: .7; cursor: default; }

/* Brand: Meet JESUS — yellow typewriter on black */
.logo { font-family: var(--logo); font-weight: 400; font-size: 18px; letter-spacing: .02em; color: var(--yellow); background: #000; padding: 7px 12px; border-radius: 6px; white-space: nowrap; }
.logo.sm { font-size: 14px; padding: 5px 9px; }
.brand span { color: var(--yellow); background: #000; padding: 0 2px; }
.eyebrow, .verse-ref, blockquote cite, .tag, .bigcount + p { font-family: var(--type); letter-spacing: .06em; }
.card.clay { background: var(--yellow); color: #000; border-color: var(--yellow); }
.btn.clay { background: var(--yellow); color: #000; }
.card.ink { background: #000; border-color: #000; }
.card.ink .eyebrow { color: var(--yellow) !important; }
.card.ink .btn.clay { background: var(--yellow); color: #000; }
.bar > i { background: #000; }
.card.ink .bar > i { background: var(--yellow); }
blockquote { border-left: 3px solid var(--yellow); }
.tag { color: #000; background: var(--yellow); }
.spine { background: #000; color: var(--yellow); font-family: var(--type); }
.spine.free { background: var(--yellow); color: #000; }
.num.current { border-color: #000; box-shadow: inset 0 0 0 2px var(--yellow); }
.reader sup { color: #8A7300; }
.switch[aria-checked="true"] { background: #000; }
.switch[aria-checked="true"]::after { background: var(--yellow); }
.slot.on { background: var(--clay-soft); border-color: #F2DC6B; }
.slot.on b { color: #000; }
.slot.me b { color: var(--yellow); }
.bigcount { color: var(--yellow); font-family: var(--type); }
#toast { background: #000; color: var(--yellow); font-family: var(--type); }
::selection { background: var(--yellow); color: #000; }
.slot.me, .slot.on.me { background: #000; border-color: #000; }
.slot.me span, .slot.me b { color: var(--yellow); }
.brand span { background: none; color: inherit; padding: 0; }

/* Right-to-left languages (Arabic, Hebrew, Persian, Urdu…) */
blockquote { border-left: 0; border-inline-start: 3px solid var(--yellow); padding-left: 0; padding-inline-start: 14px; }
[dir="rtl"] .chev svg, [dir="rtl"] .backbtn svg { transform: scaleX(-1); }
[dir="rtl"] .switch[aria-checked="true"]::after { transform: translateX(-20px); }
[dir="rtl"] .switch::after { left: auto; right: 3px; }


/* ---------- Dark mode ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0B0B0A; --card: #171614; --ink: #F5F3EE; --muted: #A9A49A; --line: #2C2A26;
  --clay: #F5F3EE; --clay-soft: #3A3205; --seg: #24221F; --tabs-bg: rgba(11, 11, 10, 0.94);
}
:root[data-theme="dark"] .card.ink { background: #000; border-color: var(--line); color: #F5F3EE; }
:root[data-theme="dark"] .card.ink .muted { color: #B9B4AA; }
:root[data-theme="dark"] .slot.on { border-color: #6B5A00; }
:root[data-theme="dark"] .slot.me, :root[data-theme="dark"] .slot.on.me { background: var(--yellow); border-color: var(--yellow); }
:root[data-theme="dark"] .slot.me span, :root[data-theme="dark"] .slot.me b { color: #000; }
:root[data-theme="dark"] .pill { color: #9BE0B0; background: #173322; }
:root[data-theme="dark"] .reader sup { color: var(--yellow); }
:root[data-theme="dark"] .bar > i { background: var(--yellow); }
:root[data-theme="dark"] .switch[aria-checked="true"] { background: var(--yellow); }
:root[data-theme="dark"] .switch[aria-checked="true"]::after { background: #000; }
:root[data-theme="dark"] #toast { border: 1px solid #3A3833; }
:root[data-theme="dark"] .spine { box-shadow: inset 4px 0 0 rgba(255,255,255,.12), 0 0 0 1px var(--line); }

/* ---------- Accessibility ---------- */
#view { zoom: var(--scale); }                      /* in-app text size setting */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; box-shadow: 0 0 0 5px #000; border-radius: 8px; }
:root[data-theme="dark"] :focus-visible { box-shadow: 0 0 0 5px #000; }
.btn.sm { min-height: 44px; }
.link, .actions button, .backbtn { min-height: 44px; display: inline-flex; align-items: center; }
.seg button { min-height: 40px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--yellow); color: #000; padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: calc(var(--safe-top) + 8px); }
@media (prefers-contrast: more) {
  :root { --muted: #3F3C37; --line: #8A867E; }
  :root[data-theme="dark"] { --muted: #D6D2C9; --line: #6D6A63; }
  .card { border-width: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
:root.reduce-motion *, :root.reduce-motion *::before, :root.reduce-motion *::after { animation: none !important; transition: none !important; }
@media (forced-colors: active) { .switch, .slot, .card, .btn { border: 1px solid CanvasText; } }

/* ---------- Community ---------- */
.post { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.post-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 12px 14px; }
.who { display: flex; align-items: center; gap: 10px; text-align: start; min-width: 0; min-height: 44px; }
.who .nm { display: block; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .sub { display: block; font-size: 13px; color: var(--muted); }
.iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--muted); flex: none; }
.iconbtn svg, .act svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn svg circle { fill: currentColor; stroke: none; }
.post-img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--line); }
.post-b { padding: 12px 16px 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-b.big { font-family: var(--serif); font-size: 19px; line-height: 1.45; padding-top: 0; }
.post-a { display: flex; gap: 4px; padding: 4px 6px 8px; }
.act { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 14px; }
.act.on { color: #E0443A; }
.act.on svg { fill: currentColor; }
.av { display: inline-grid; place-items: center; flex: none; border-radius: 50%; object-fit: cover; background: var(--seg); color: var(--ink); font-weight: 700; font-family: var(--type); }
.av.org { background: #000; color: var(--yellow); border-radius: 30%; }
.vbadge { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-inline-start: 5px; border-radius: 50%; background: var(--yellow); color: #000; font-size: 11px; font-weight: 900; vertical-align: 2px; }
.kind { display: inline-block; margin-inline-start: 6px; font-family: var(--type); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--paper); padding: 2px 7px; border-radius: 4px; }
.edate { width: 56px; height: 62px; flex: none; border-radius: 12px; background: #000; color: var(--yellow); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--type); }
.edate span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.edate b { font-size: 24px; line-height: 1; }
.ev { display: flex !important; gap: 14px; align-items: center; }
.ev-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev-b .t { font-weight: 700; }
.ev-b .s { font-size: 13px; color: var(--muted); }
.prof { text-align: center; display: flex; flex-direction: column; align-items: center; }
.prof .av { font-size: 36px; }
.counts { display: flex; gap: 22px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.counts b { color: var(--ink); font-size: 16px; }
.cmt { display: flex; gap: 10px; align-items: flex-start; }
.cmt p { margin-top: 2px; overflow-wrap: anywhere; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lbl { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.lbl .field, .lbl textarea { font-weight: 400; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--yellow); flex: none; }
.link.inl { display: inline; min-height: 0; color: inherit; overflow-wrap: anywhere; }
.prev { position: relative; }
.prev img { width: 100%; border-radius: 14px; display: block; }
.prev .btn { position: absolute; top: 10px; inset-inline-end: 10px; }
.sheet-wrap { position: fixed; inset: 0; z-index: 40; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: var(--card); border-radius: 20px 20px 0 0; padding: 10px 16px calc(16px + var(--safe-bottom)); display: flex; flex-direction: column; animation: up .2s ease; }
.sheet-i { min-height: 54px; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--line); }
.sheet-i:last-child { border-bottom: 0; color: var(--muted); }
.sheet-i.danger { color: #D2412E; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
input[type="datetime-local"], input[type="date"] { min-height: 48px; }

/* Scripts that must not be letter-spaced or uppercased (Arabic joins letters; CJK/Indic/Ethiopic don't use case) */
:lang(ar) *, :lang(am) *, :lang(hi) *, :lang(zh) *, :lang(ja) *, :lang(ko) * { letter-spacing: 0 !important; text-transform: none !important; }
:lang(ar) body { font-family: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(ar) .verse-text, :lang(ar) blockquote, :lang(ar) .prayer, :lang(ar) .post-b.big { font-family: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", serif; line-height: 1.5; }
:lang(hi) h1, :lang(hi) h2, :lang(hi) h3, :lang(hi) .verse-text, :lang(hi) blockquote, :lang(hi) .prayer { font-family: "Kohinoor Devanagari", "Noto Serif Devanagari", "Noto Sans Devanagari", sans-serif; line-height: 1.45; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(zh) .verse-text, :lang(zh) blockquote, :lang(zh) .prayer { font-family: "Songti SC", "Noto Serif SC", "PingFang SC", serif; }
:lang(am) h1, :lang(am) h2, :lang(am) h3, :lang(am) .verse-text, :lang(am) blockquote, :lang(am) .prayer { font-family: "Kefa", "Noto Serif Ethiopic", "Noto Sans Ethiopic", "Abyssinica SIL", serif; line-height: 1.5; }
[dir="rtl"] .logo, [dir="rtl"] .brand { direction: ltr; unicode-bidi: isolate; }

:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .verse-text, :lang(ja) blockquote, :lang(ja) .prayer { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; }
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3, :lang(ko) .verse-text, :lang(ko) blockquote, :lang(ko) .prayer { font-family: "Apple SD Gothic Neo", "Noto Serif KR", "Nanum Myeongjo", serif; word-break: keep-all; }
:lang(ko) body { word-break: keep-all; overflow-wrap: anywhere; }

/* ===== v3: TM, salvation check, counter, chat, audio ===== */
.brand .tm { font-size: .55em; margin-inline-start: 1px; vertical-align: super; letter-spacing: 0; font-weight: 600; }
.answer { text-align: start; font-weight: 600; font-size: 17px; min-height: 56px; }
.answer:hover, .answer:focus-visible { border-color: var(--yellow, #FFD60A); }
.yescount { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.bigcount { font-family: var(--logo, inherit); font-size: 40px; line-height: 1.1; color: var(--ink-strong, inherit); }
.listen { flex: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #E5484D; flex: none; display: inline-block; }
.dot[hidden] { display: none; }
.bubbles { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 12px; }
.bubble { max-width: 82%; align-self: flex-start; background: var(--card, #f4f1ea); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 10px 14px; }
.bubble p { white-space: pre-wrap; word-break: break-word; }
.bubble.me { align-self: flex-end; background: #FFD60A; color: #111; border-color: transparent; border-radius: 18px 18px 6px 18px; }
.bubble.sys { max-width: 100%; align-self: stretch; background: #111; color: #fff; border: 0; border-radius: 16px; }
.bubble.sys b { color: #FFD60A; display: block; margin-bottom: 6px; }
.bubble img { display: block; max-width: 100%; border-radius: 12px; margin-bottom: 6px; }
.bubble .who-n { display: block; font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.bubble .when { display: block; font-size: 11px; opacity: .65; margin-top: 4px; }
.bubble .tag { display: inline-block; margin-bottom: 4px; }
.link.inl { font-size: 11px; padding: 0; min-height: 0; }
.composer { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; align-items: flex-end; gap: 8px; padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; }
.composer textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 10px 12px; resize: none; border: 0; background: transparent; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin-top: 12px; }
.bars span { flex: 1; min-height: 2px; background: #FFD60A; border-radius: 4px 4px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.mini { position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 8px;
  background: #111; color: #fff; border-radius: 16px; padding: 6px 6px 6px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 560px; margin: 0 auto; }
.mini .mini-t { flex: 1; min-width: 0; text-align: start; color: inherit; display: flex; flex-direction: column; }
.mini .mini-t b, .mini .mini-t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .mini-t span { font-size: 12px; opacity: .75; }
.mini .iconbtn { color: #FFD60A; font-size: 16px; }
.item[aria-current="true"] .t { font-weight: 800; }

/* ===== Experience layer ===== */
.opening { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px; text-align: center; transition: opacity .6s ease; overflow: hidden; }
.opening.out { opacity: 0; pointer-events: none; }
.opening .light { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.opening > *:not(.light) { position: relative; z-index: 1; }
.op-word { font-size: 34px; padding: 10px 18px; min-height: 64px; min-width: 40px; box-shadow: 0 0 60px rgba(255,214,10,.35); }
.op-word::after { content: "▌"; margin-inline-start: 2px; animation: blink 1s steps(1) infinite; }
.op-word.cursor-off::after { content: ""; }
@keyframes blink { 50% { opacity: 0; } }
.op-line { margin-top: 34px; font-family: var(--serif); font-size: 26px; line-height: 1.35; max-width: 340px; min-height: 2.8em; opacity: 0; transform: translateY(8px); transition: opacity .7s ease, transform .7s ease; }
.op-line.in { opacity: 1; transform: none; }
.op-line small { font-family: var(--sans); font-size: 13px; letter-spacing: .14em; color: #FFD60A; }
.op-cta { width: 100%; max-width: 340px; margin-top: 10px; opacity: 0; transition: opacity .6s; display: grid; gap: 14px; }
.op-cta.in { opacity: 1; }
.op-name { display: grid; gap: 8px; text-align: start; font-weight: 600; }
.op-name .field { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.op-name small { color: #aaa; font-weight: 400; }
.op-skip { position: absolute !important; bottom: calc(28px + env(safe-area-inset-bottom)); color: #bbb; }
.celebrate h1 { color: #fff; margin-top: 18px; font-size: 34px; }
.celebrate .btn { margin-top: 30px; min-width: 200px; }
.cel-cross { font-size: 72px; color: #FFD60A; text-shadow: 0 0 40px rgba(255,214,10,.8); animation: rise 1.2s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { transform: translateY(30px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.feel h3 { margin: 0; }
.feel-row { display: flex; gap: 8px; overflow-x: auto; margin: 14px -20px -4px; padding: 0 20px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.feel-row::-webkit-scrollbar { display: none; }
.feel-chip { flex: none; scroll-snap-align: start; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; min-height: 44px; }
.feel-chip:active { transform: scale(.96); }
blockquote.big { font-size: 26px; line-height: 1.35; }

.streak { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.streak .flame { width: 46px; height: 46px; border-radius: 14px; background: #111; color: #FFD60A; display: grid; place-items: center; font-size: 22px; box-shadow: 0 0 24px rgba(255,214,10,.35); flex: none; }
.weekdots { display: flex; gap: 6px; margin-top: 6px; }
.weekdots i { width: 18px; height: 6px; border-radius: 4px; background: var(--line); }
.weekdots i.on { background: #FFD60A; }
.weekdots i.today { outline: 2px solid var(--ink); outline-offset: 1px; }

.studio { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.6); display: grid; place-items: end center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.studio-in { width: 100%; max-width: 520px; background: var(--paper); color: var(--ink); border-radius: 24px 24px 0 0; padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 14px; max-height: 96vh; overflow: auto; }
.studio canvas { width: min(62vw, 300px); height: auto; aspect-ratio: 9/16; margin: 0 auto; display: block; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.swatches { display: flex; gap: 10px; justify-content: center; }
.sw { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); }
.sw[aria-pressed="true"] { outline: 3px solid #FFD60A; outline-offset: 2px; }
.sw-ink { background: #0B0B0B; } .sw-gold { background: #FFD60A; } .sw-dawn { background: linear-gradient(#1B1035, #B4436C, #FFC15E); }
.sw-night { background: radial-gradient(circle at 50% 80%, #6b5a10, #050A1A 60%); } .sw-paper { background: #F4EFE4; }

.orb-wrap { display: grid; place-items: center; height: 180px; margin-top: 18px; }
.orb { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #FFF3B0, #FFD60A 45%, rgba(255,214,10,.15) 70%);
  box-shadow: 0 0 60px rgba(255,214,10,.55); animation: breathe 10s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.7); opacity: .75; } 50% { transform: scale(1.15); opacity: 1; } }
.breath-label { text-align: center; font-family: var(--serif); font-size: 20px; margin-top: 6px; }
.amb[aria-pressed="true"] { background: #111; color: #FFD60A; border-color: #111; }

.card, .btn, .feel-chip, .item { transition: transform .15s ease, box-shadow .2s ease; }
.card.tap:active, .btn:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) { .orb, .op-word::after, .cel-cross { animation: none !important; } .op-line, .op-cta, .opening { transition: none !important; } }
html.reduce-motion .orb, html.reduce-motion .cel-cross { animation: none !important; }
