/* ===========================================================
   ARK & THRONE: design system
   Parchment and cream, walnut brown, burnished gold. Quiet, reverent, warm.
   =========================================================== */
:root {
  --cream: #fbf7ef;
  --parchment: #f4ecdd;
  --linen: #ede2cd;
  --card: #fffdf8;
  --ink: #2a1f16;
  --ink-2: #4b3a2c;
  --muted: #8a7562;
  --walnut: #4a3222;
  --brown: #6b4a2f;
  --brown-2: #8b6440;
  --gold: #b8893b;
  --gold-2: #d6ae62;
  --gold-soft: rgba(184, 137, 59, .14);
  --line: rgba(74, 50, 34, .13);
  --line-2: rgba(74, 50, 34, .22);
  --good: #4f7a46;
  --good-soft: rgba(79, 122, 70, .12);
  --bad: #a3442e;
  --bad-soft: rgba(163, 68, 46, .1);
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 28px -12px rgba(60, 40, 20, .18);
  --shadow-lg: 0 2px 6px rgba(60, 40, 20, .07), 0 24px 60px -20px rgba(60, 40, 20, .3);
  --radius: 14px;
  --radius-lg: 22px;
  --display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --serif: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --top-h: 62px;
  --tab-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0; background: var(--cream); color: var(--ink); font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
  background-image: radial-gradient(1200px 600px at 85% -10%, rgba(214, 174, 98, .16), transparent 60%), radial-gradient(900px 500px at -10% 30%, rgba(139, 100, 64, .07), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--brown); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--walnut); }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; color: var(--walnut); line-height: 1.12; margin: 0 0 .45em; letter-spacing: -.005em; }
h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 500; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 500; }
h3 { font-size: 23px; }
h4 { font-size: 19px; }
p { margin: 0 0 1em; }
::selection { background: rgba(214, 174, 98, .4); }
.sc { font-variant: small-caps; letter-spacing: .02em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.center { text-align: center; }
.err { color: var(--bad); font-size: 14.5px; min-height: 1.3em; }
.eyebrow { font: 600 12px/1.4 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); max-width: 680px; line-height: 1.6; }
.rule { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); margin: 56px 0; }
.ornament { display: flex; align-items: center; gap: 14px; color: var(--gold); margin: 28px 0; }
.ornament::before, .ornament::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2)); }
.ornament::after { transform: scaleX(-1); }
.spacer { height: 26px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.page { padding: 40px 0 90px; animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .page { animation: none; } }

/* ---------------- buttons, inputs ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1 var(--body); padding: 13px 20px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--walnut); cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, background .2s; min-height: 44px; }
.btn:hover { background: #fff; box-shadow: var(--shadow); color: var(--walnut); }
.btn:active { transform: translateY(1px); }
.btn.gold { background: linear-gradient(180deg, #c99a48, #a87a2f); border-color: #9a6e28; color: #fffaf0; box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 6px 18px -8px rgba(150, 100, 30, .7); }
.btn.gold:hover { background: linear-gradient(180deg, #d2a552, #b0832f); color: #fff; }
.btn.brown { background: var(--walnut); border-color: var(--walnut); color: var(--cream); }
.btn.brown:hover { background: #3c2819; color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(74, 50, 34, .06); box-shadow: none; }
.btn.sm { padding: 9px 14px; font-size: 13.5px; min-height: 36px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.input, select.input, textarea.input { width: 100%; font: 400 16px/1.5 var(--body); color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
textarea.input { resize: vertical; min-height: 110px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--brown); margin-top: 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: rgba(255,255,255,.6); text-decoration: none; }
.chip.gold { color: #8a6223; border-color: rgba(184, 137, 59, .45); background: var(--gold-soft); }
.chip.good { color: var(--good); border-color: rgba(79, 122, 70, .4); background: var(--good-soft); }
.chip.bad { color: var(--bad); border-color: rgba(163, 68, 46, .35); background: var(--bad-soft); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 20px; }
.tabs button, .tabs a { font: 600 14px var(--body); padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.7); color: var(--ink-2); cursor: pointer; text-decoration: none; }
.tabs .on { background: var(--walnut); border-color: var(--walnut); color: var(--cream); }

/* ---------------- cards, panels ---------------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); }
.panel.tint { background: linear-gradient(180deg, #fffaf0, #f8efdf); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g4, .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .25s ease, border-color .2s; overflow: hidden; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(184, 137, 59, .4); color: var(--ink); }
.card h3 { margin: 6px 0 6px; }
.card p { color: var(--ink-2); font-size: 15px; margin: 0; }
.card .tag { font: 600 11.5px var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.card .go { margin-top: auto; padding-top: 14px; color: var(--gold); font-weight: 700; }
.card .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--brown); margin-bottom: 8px; }
.card .ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat-row > div { background: var(--card); padding: 18px 16px; text-align: center; }
.stat-row b { display: block; font: 600 30px/1.1 var(--display); color: var(--walnut); }
.stat-row span { font-size: 12.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
@media (max-width: 620px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.progress { height: 8px; border-radius: 99px; background: var(--linen); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brown-2), var(--gold-2)); border-radius: inherit; transition: width .6s ease; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }

/* ---------------- top bar & tab bar ---------------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 18px 0; display: flex; align-items: center; gap: 14px; background: rgba(251, 247, 239, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--walnut); flex: none; }
.brand svg { width: 34px; height: 34px; }
.brand-word { font: 600 21px/1 var(--display); letter-spacing: .02em; white-space: nowrap; }
.brand-word i { font-style: italic; color: var(--gold); font-weight: 500; }
.topnav { display: flex; gap: 2px; margin-left: 10px; flex-wrap: nowrap; overflow: hidden; }
.topnav a { font: 600 14px var(--body); color: var(--ink-2); text-decoration: none; padding: 8px 11px; border-radius: 9px; white-space: nowrap; position: relative; }
.topnav a:hover { background: rgba(74, 50, 34, .06); color: var(--walnut); }
.topnav a.active { color: var(--walnut); }
.topnav a.active::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--gold); }
.topright { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.lvlpill { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--walnut); font: 600 13px var(--body); padding: 4px 4px 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; }
.lvlpill .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--walnut); color: var(--cream); font: 600 14px var(--body); position: relative; }
.lvlpill .av svg { position: absolute; inset: -3px; width: 36px; height: 36px; transform: rotate(-90deg); }
.nbadge { display: inline-block; min-width: 17px; height: 17px; padding: 0 5px; margin-left: 5px; border-radius: 999px; background: var(--bad); color: #fff; font: 700 10.5px/17px var(--body); text-align: center; vertical-align: 2px; font-style: normal; }
.nbadge[hidden] { display: none; }
.tabbar { display: none; }
@media (max-width: 1080px) { .topnav a.nav-opt { display: none; } }
@media (max-width: 880px) {
  :root { --top-h: 56px; }
  .topnav { display: none; }
  .brand-word { font-size: 19px; }
  .lvlpill .lv { display: none; }
  .lvlpill { padding: 3px; }
  .tabbar { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(251, 247, 239, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font: 600 10.5px var(--body); text-decoration: none; }
  .tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.active { color: var(--walnut); }
  .tabbar a.active svg { color: var(--gold); }
  .tabbar .nbadge { position: absolute; top: 6px; left: 56%; margin: 0; }
}
@media (max-width: 370px) { .tabbar a { font-size: 9.5px; } }
#app { position: relative; min-height: 100vh; padding-top: calc(var(--top-h) + var(--safe-t)); outline: none; }
@media (max-width: 880px) { #app { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 10px); } }

/* ---------------- loading: the ark & crown draw themselves ---------------- */
#intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: radial-gradient(800px 500px at 50% 45%, #fffaf0, #f2e7d3 70%, #e8d9bd); transition: opacity .7s ease, visibility .7s; }
#intro.done { opacity: 0; visibility: hidden; pointer-events: none; }
#intro .in { text-align: center; padding: 20px; }
#intro svg.mark { width: 128px; height: 128px; }
#intro .mark path, #intro .mark line { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.5s ease forwards; }
#intro .mark .crown { animation-delay: .55s; }
#intro .glow { position: absolute; left: 50%; top: 45%; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; background: radial-gradient(circle, rgba(214, 174, 98, .35), transparent 62%); opacity: 0; animation: glow 2.6s ease .9s forwards; pointer-events: none; }
#intro .t { font: 500 clamp(34px, 7vw, 54px)/1 var(--display); color: var(--walnut); letter-spacing: .04em; margin-top: 14px; opacity: 0; animation: fadeup .9s ease 1.05s forwards; }
#intro .t i { color: var(--gold); }
#intro .v { font: italic 400 clamp(15px, 2.4vw, 18px)/1.5 var(--serif); color: var(--ink-2); max-width: 460px; margin: 14px auto 0; opacity: 0; animation: fadeup .9s ease 1.5s forwards; }
#intro .v span { display: block; font: 600 11px var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-top: 8px; font-style: normal; }
#intro .skip { position: absolute; right: 18px; bottom: calc(18px + var(--safe-b)); font: 600 13px var(--body); color: var(--muted); background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes glow { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; } 100% { opacity: .7; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { #intro * { animation-duration: .01s !important; animation-delay: 0s !important; } }

/* ---------------- home ---------------- */
.hero { position: relative; padding: 70px 0 50px; overflow: hidden; }
.hero h1 em { font-style: italic; color: var(--brown-2); }
.hero .mark-bg { position: absolute; right: -60px; top: 10px; width: 520px; opacity: .09; pointer-events: none; }
@media (max-width: 880px) { .hero .mark-bg { width: 340px; right: -110px; top: 40px; } .hero { padding: 44px 0 34px; } }
.votd { position: relative; background: linear-gradient(180deg, #fffaf0, #f6ecda); border: 1px solid rgba(184, 137, 59, .3); border-radius: var(--radius-lg); padding: 28px 30px; box-shadow: var(--shadow); }
.votd blockquote { margin: 0; font: italic 400 clamp(20px, 2.6vw, 26px)/1.5 var(--serif); color: var(--walnut); }
.votd cite { display: block; margin-top: 12px; font: 600 12px var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-style: normal; }
.parts { counter-reset: part; display: grid; gap: 10px; }
.parts li { list-style: none; display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.parts li b { font: 500 30px/1 var(--display); color: var(--gold); }
.parts li h4 { margin: 0 0 3px; }
.parts li p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------------- scripture blocks ---------------- */
figure.verse { margin: 26px 0; padding: 20px 24px 16px; background: linear-gradient(180deg, #fffaf0, #f7eedd); border: 1px solid rgba(184, 137, 59, .28); border-left: 3px solid var(--gold); border-radius: 4px 16px 16px 4px; }
figure.verse blockquote { margin: 0; font: 400 19px/1.65 var(--serif); color: var(--ink); }
figure.verse sup { font: 700 11px var(--body); color: var(--gold); margin-right: 4px; vertical-align: 5px; }
figure.verse figcaption { margin-top: 10px; font: 600 12.5px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--brown-2); }
figure.verse figcaption span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.reflink { color: var(--brown); text-decoration: underline dotted rgba(107, 74, 47, .5); text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
.pop { position: fixed; z-index: 120; max-width: min(420px, calc(100vw - 24px)); background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-lg); font: 400 16px/1.6 var(--serif); }
.pop b { display: block; font: 600 12px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.pop .row { margin-top: 10px; }

/* ---------------- reader (lessons, devotionals) ---------------- */
.reader { padding: 34px 0 100px; }
.prose { font: 400 19px/1.75 var(--serif); color: var(--ink); }
.prose h2 { font-size: 30px; margin: 1.6em 0 .5em; }
.prose h3 { font-size: 24px; margin: 1.4em 0 .4em; }
.prose p { margin: 0 0 1.05em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose strong { color: var(--walnut); }
.prose blockquote:not(figure blockquote) { margin: 1.2em 0; padding-left: 18px; border-left: 3px solid var(--line-2); color: var(--ink-2); font-style: italic; }
.prose hr { border: 0; height: 1px; background: var(--line-2); margin: 2em 0; }
.prose table { border-collapse: collapse; width: 100%; font: 15px var(--body); }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
@media (max-width: 620px) { .prose { font-size: 18px; } figure.verse blockquote { font-size: 18px; } figure.verse { padding: 16px 18px 13px; } }
.lesson-title { font-size: clamp(36px, 6vw, 54px); margin-bottom: 8px; }
.memcard { display: flex; gap: 18px; align-items: flex-start; background: var(--walnut); color: var(--cream); border-radius: var(--radius-lg); padding: 22px 24px; margin: 22px 0 30px; box-shadow: var(--shadow-lg); }
.memcard .lbl { font: 600 11px var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 6px; }
.memcard blockquote { margin: 0; font: italic 400 19px/1.55 var(--serif); color: #fffaf0; }
.memcard cite { display: block; font: 600 12.5px var(--body); color: var(--gold-2); margin-top: 8px; font-style: normal; letter-spacing: .08em; }
.memcard .btn { background: rgba(255,255,255,.08); color: #fffaf0; border-color: rgba(255,255,255,.25); }
.memcard .btn:hover { background: rgba(255,255,255,.16); }
.readbox { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 26px; font-size: 14.5px; color: var(--ink-2); }
.think { background: var(--parchment); border-radius: var(--radius-lg); padding: 6px 26px 14px; margin-top: 34px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.lesson-club { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 30px; padding: 18px 20px; }
@media (max-width: 620px) { .lesson-club { flex-direction: column; align-items: flex-start; } }

/* ---------------- journey map ---------------- */
.part-head { display: flex; align-items: baseline; gap: 14px; margin: 46px 0 14px; }
.part-head b { font: 500 46px/1 var(--display); color: var(--gold); }
.part-head h2 { margin: 0; }
.part-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.unit { background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(60,40,20,.05); overflow: hidden; }
.unit-head { width: 100%; display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; background: none; border: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.unit-num { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--parchment); color: var(--brown); font: 600 17px var(--display); border: 1px solid var(--line-2); }
.unit.passed .unit-num { background: var(--good); color: #fff; border-color: var(--good); }
.unit.locked { opacity: .62; }
.unit.locked .unit-num { background: transparent; }
.unit-title { font: 600 20px/1.2 var(--display); color: var(--walnut); }
.unit-meta { font-size: 13px; color: var(--muted); }
.unit-body { display: none; padding: 0 18px 18px 78px; }
.unit.open .unit-body { display: block; }
.unit-body ol { margin: 0 0 14px; padding: 0; list-style: none; }
.unit-body li a, .unit-body li span { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 15px; }
.unit-body li a:hover { background: var(--parchment); }
.unit-body li .ck { color: var(--good); font-weight: 700; }
.unit-body li .mn { color: var(--muted); font-size: 13px; white-space: nowrap; }
@media (max-width: 620px) { .unit-body { padding: 0 12px 14px; } .unit-head { grid-template-columns: 42px 1fr; } .unit-head .chev { display: none; } }

/* ---------------- tests ---------------- */
.q { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin-bottom: 14px; }
.q-num { font: 600 12px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.q-text { font: 500 18px/1.5 var(--serif); margin-bottom: 12px; }
.opt { display: block; width: 100%; text-align: left; font: 400 16px/1.45 var(--body); color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; min-height: 46px; }
.opt:hover { border-color: var(--gold); }
.opt.sel { border-color: var(--brown); background: var(--gold-soft); box-shadow: 0 0 0 2px rgba(107, 74, 47, .25); }
.opt.right { border-color: var(--good); background: var(--good-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.why { font-size: 15px; color: var(--ink-2); background: var(--parchment); border-radius: 10px; padding: 10px 12px; margin-top: 6px; }
.sticky-submit { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); margin-top: 18px; z-index: 5; }
@media (min-width: 881px) { .sticky-submit { bottom: 16px; } }
.score-big { font: 500 82px/1 var(--display); margin: 6px 0; }
.cert { max-width: 820px; margin: 0 auto; background: #fffdf6; border: 10px double rgba(184, 137, 59, .55); padding: 54px 40px; text-align: center; box-shadow: var(--shadow-lg); }
.cert h1 { font-size: clamp(34px, 6vw, 56px); }
.cert .nm { font: italic 500 clamp(32px, 6vw, 52px)/1.1 var(--display); color: var(--brown); border-bottom: 1px solid var(--line-2); display: inline-block; padding: 0 30px 8px; margin: 10px 0 18px; }
@media print { .topbar, .tabbar, .noprint, #toast { display: none !important; } #app { padding: 0; } body { background: #fff; } .cert { box-shadow: none; } }

/* ---------------- Bible reader ---------------- */
.bible-bar { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 20; background: rgba(251, 247, 239, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 10px 0; }
.bible-bar .row { flex-wrap: nowrap; gap: 8px; }
.bible-bar select { width: auto; flex: 1; min-width: 0; padding: 10px 12px; font-size: 15px; }
.bible-bar .num { flex: 0 0 86px; }
.bible-text { font: 400 20px/1.85 var(--serif); color: var(--ink); max-width: 720px; margin: 0 auto; padding: 26px 20px 100px; }
.bible-text h2 { text-align: center; font-size: 40px; margin-bottom: 4px; }
.bible-text .ch-sub { text-align: center; color: var(--muted); font: 600 12px var(--body); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 26px; }
.bible-text .v { cursor: pointer; border-radius: 4px; transition: background .2s; }
.bible-text .v:hover { background: rgba(214, 174, 98, .14); }
.bible-text .v.hl { background: rgba(214, 174, 98, .3); }
.bible-text .v.sel { background: rgba(107, 74, 47, .12); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.bible-text sup { font: 700 11px var(--body); color: var(--gold); margin: 0 3px 0 6px; vertical-align: 6px; }
.bible-text .v:first-child sup { margin-left: 0; }
.bible-pager { display: flex; justify-content: space-between; gap: 10px; max-width: 720px; margin: 0 auto; padding: 0 20px 40px; }
.vsheet { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 12px); z-index: 60; background: var(--walnut); color: var(--cream); border-radius: 16px; padding: 10px; display: flex; gap: 6px; box-shadow: var(--shadow-lg); flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 20px); }
@media (min-width: 881px) { .vsheet { bottom: 20px; } }
.vsheet button { font: 600 13.5px var(--body); background: rgba(255,255,255,.1); color: #fffaf0; border: 0; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.vsheet button:hover { background: rgba(255,255,255,.2); }
.results li { padding: 12px 0; border-bottom: 1px solid var(--line); list-style: none; }
.results li a { font-weight: 700; text-decoration: none; }
.results mark { background: rgba(214, 174, 98, .35); padding: 0 2px; border-radius: 3px; }

/* ---------------- memorize ---------------- */
.vcard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; box-shadow: 0 1px 2px rgba(60,40,20,.05); }
.vcard .ref { font: 600 18px var(--display); color: var(--walnut); }
.vcard .tx { font: 400 15.5px/1.55 var(--serif); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard .st { margin-left: auto; flex: none; }
.drill { text-align: center; }
.drill .big { font: 400 clamp(21px, 3vw, 27px)/1.65 var(--serif); color: var(--ink); max-width: 720px; margin: 10px auto 22px; }
.drill .ref { font: 600 13px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.drill .blank { display: inline-block; min-width: 2.2em; border-bottom: 2px solid var(--gold); color: transparent; margin: 0 2px; cursor: pointer; border-radius: 2px; }
.drill .blank.show { color: var(--brown); background: var(--gold-soft); }
.drill .fl { color: var(--brown); font-weight: 600; letter-spacing: .02em; }
.wordbank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px auto; max-width: 720px; }
.wordbank button { font: 500 16px var(--serif); background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; cursor: pointer; color: var(--ink); }
.wordbank button.used { opacity: .25; pointer-events: none; }
.wordbank button.bad { border-color: var(--bad); background: var(--bad-soft); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.built { min-height: 60px; font: 400 21px/1.7 var(--serif); padding: 14px; border: 1px dashed var(--line-2); border-radius: 14px; max-width: 720px; margin: 0 auto; text-align: left; background: rgba(255,255,255,.6); }
.diff span { padding: 0 1px; }
.diff .miss { color: var(--bad); text-decoration: underline wavy rgba(163, 68, 46, .5); }
.diff .hit { color: var(--good); }

/* ---------------- throne (AI) ---------------- */
.throne-hero { text-align: center; padding: 20px 0 10px; }
.throne-hero svg { width: 74px; height: 74px; color: var(--gold); }
.composer { background: var(--card); border: 1px solid var(--line-2); border-radius: 22px; padding: 14px; box-shadow: var(--shadow); }
.composer textarea { border: 0; box-shadow: none !important; padding: 8px; font-size: 17px; min-height: 120px; background: transparent; }
.composer .row { justify-content: space-between; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; justify-content: center; }
.suggest button { font: 500 13.5px var(--body); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.7); color: var(--ink-2); cursor: pointer; }
.crisis { background: #fff4ef; border: 1px solid rgba(163, 68, 46, .4); border-radius: 18px; padding: 18px 20px; margin: 20px 0; color: var(--ink); }
.crisis h4 { color: var(--bad); margin-bottom: 6px; font-family: var(--body); font-size: 17px; }
.crisis a { color: var(--bad); font-weight: 700; }
.prayerbox { background: var(--walnut); color: #fffaf0; border-radius: var(--radius-lg); padding: 24px 26px; margin: 26px 0; font: italic 400 18.5px/1.65 var(--serif); }
.prayerbox .lbl { font: 600 11px var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 8px; font-style: normal; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--gold-soft); color: var(--brown); display: grid; place-items: center; font: 700 14px var(--body); }
.chat { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.msg { max-width: 92%; }
.msg.me { align-self: flex-end; background: var(--walnut); color: #fffaf0; border-radius: 18px 18px 4px 18px; padding: 12px 16px; font-size: 16px; white-space: pre-wrap; }
.msg.t { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 16px 20px; box-shadow: var(--shadow); }
.msg.t .who { font: 600 12px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.msg.t .prose { font-size: 17.5px; }
.msg.t figure.verse { margin: 14px 0; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 4px; animation: bob 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 50% { transform: translateY(-5px); opacity: .5; } }
.rating-head { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.score-ring { width: 120px; height: 120px; position: relative; }
.score-ring svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.score-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 600 44px var(--display); color: var(--walnut); }
.score-ring b small { font-size: 16px; color: var(--muted); }
.cat { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cat .bars { display: flex; gap: 3px; margin-top: 4px; }
.cat .bars i { width: 22px; height: 7px; border-radius: 3px; background: var(--linen); }
.cat .bars i.on { background: var(--brown-2); }
.cat .bars.l4 i.on, .cat .bars.l5 i.on { background: var(--bad); }
@media (max-width: 620px) { .cat { grid-template-columns: 1fr; gap: 4px; } .rating-head { grid-template-columns: 1fr; text-align: center; } .score-ring { margin: 0 auto; } }

/* ---------------- church ---------------- */
.church { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.church:last-child { border-bottom: 0; }
.church h4 { margin: 0 0 3px; font-size: 21px; }
.church .meta { font-size: 14px; color: var(--muted); }
.church .row { margin-top: 10px; gap: 8px; }
.video { position: relative; aspect-ratio: 16 / 9; background: #1c140d; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .lite { position: absolute; inset: 0; display: grid; place-items: center; background-size: cover; background-position: center; cursor: pointer; border: 0; width: 100%; }
.video .lite::after { content: ''; width: 72px; height: 72px; border-radius: 50%; background: rgba(42, 31, 22, .78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fffaf0'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/34px no-repeat; box-shadow: 0 0 0 6px rgba(255,255,255,.15); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------------- music & shop ---------------- */
.song { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.song .thumb { aspect-ratio: 16/9; border-radius: 10px; background: var(--linen) center/cover; position: relative; cursor: pointer; border: 0; padding: 0; }
.song .thumb::after { content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 20px; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.song b { display: block; font: 600 17px var(--display); color: var(--walnut); }
.song .note { font-size: 13.5px; color: var(--muted); }
.product { display: flex; flex-direction: column; }
.product .art { aspect-ratio: 4 / 3; border-radius: 14px; background: var(--parchment); display: grid; place-items: center; margin-bottom: 14px; overflow: hidden; }
.product .art svg { width: 64%; height: 64%; }
.product ul { padding-left: 18px; margin: 8px 0 14px; color: var(--ink-2); font-size: 14.5px; }
.product .price { font-weight: 700; color: var(--brown); font-size: 14px; }
.disclosure { font-size: 13px; color: var(--muted); margin-top: 30px; }

/* ---------------- leaderboard & levels ---------------- */
.lb { width: 100%; border-collapse: collapse; }
.lb td { padding: 11px 8px; border-bottom: 1px solid var(--line); font-size: 15px; }
.lb td.rk { width: 44px; font: 600 18px var(--display); color: var(--gold); text-align: center; }
.lb tr.me td { background: var(--gold-soft); }
.lb td.val { text-align: right; font-weight: 700; color: var(--walnut); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.podium > div { text-align: center; padding: 16px 10px; border-radius: 16px; background: var(--parchment); }
.podium b { display: block; font: 600 30px var(--display); color: var(--gold); }
.chal { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.chal .ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--parchment); color: var(--brown); font-weight: 700; }
.chal.done .ic { background: var(--good); color: #fff; }
.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.levels > div { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.levels > div.on { border-color: var(--gold); background: var(--gold-soft); }
.levels > div.past { opacity: .6; }
.levels b { display: block; font: 600 18px var(--display); color: var(--walnut); }

/* ---------------- games ---------------- */
.game-wrap { max-width: 720px; margin: 0 auto; }
.sortlist { list-style: none; padding: 0; margin: 0; }
.sortlist li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 8px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; font: 500 17px var(--serif); user-select: none; touch-action: none; }
.sortlist li.drag { box-shadow: var(--shadow-lg); border-color: var(--gold); position: relative; z-index: 3; }
.sortlist li .h { color: var(--muted); cursor: grab; font-size: 18px; }
.sortlist li.ok { border-color: var(--good); background: var(--good-soft); }
.sortlist li.no { border-color: var(--bad); background: var(--bad-soft); }
.sortlist li .mv { margin-left: auto; display: flex; gap: 4px; }
.sortlist li .mv button { border: 1px solid var(--line-2); background: #fff; border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; color: var(--brown); }
.hud { display: flex; justify-content: space-between; gap: 10px; font: 600 14px var(--body); color: var(--ink-2); margin-bottom: 14px; }
.hud b { color: var(--walnut); font-size: 20px; font-family: var(--display); }

/* ---------------- auth, misc ---------------- */
.auth-box { max-width: 440px; margin: 0 auto; }
.locked-note { text-align: center; padding: 70px 20px; }
.locked-note .seal { width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center; border: 1px solid rgba(184, 137, 59, .5); background: var(--gold-soft); color: var(--brown); }
.locked-note .seal svg { width: 40px; height: 40px; }
.modal-back { position: fixed; inset: 0; z-index: 150; background: rgba(42, 31, 22, .45); display: grid; place-items: center; padding: 18px; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; } }
.modal { background: var(--cream); border-radius: 24px; max-width: 480px; width: 100%; padding: 30px 28px 24px; box-shadow: var(--shadow-lg); position: relative; max-height: calc(100vh - 36px); overflow: auto; }
.modal .x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(74,50,34,.07); color: var(--brown); font-size: 22px; cursor: pointer; }
#toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 18px); transform: translate(-50%, 20px); z-index: 300; background: var(--walnut); color: #fffaf0; padding: 12px 18px; border-radius: 14px; font-size: 15px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .3s ease; max-width: calc(100vw - 30px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 881px) { #toast { bottom: 28px; } }
.ptoast { position: fixed; right: 18px; top: calc(var(--top-h) + var(--safe-t) + 12px); z-index: 300; background: linear-gradient(180deg, #c99a48, #a87a2f); color: #fff; font: 700 14px var(--body); padding: 9px 14px; border-radius: 999px; box-shadow: var(--shadow-lg); animation: ptoast 2.4s ease forwards; pointer-events: none; }
@keyframes ptoast { 0% { opacity: 0; transform: translateY(-8px); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
.footer { border-top: 1px solid var(--line); padding: 34px 0 40px; color: var(--muted); font-size: 14px; margin-top: 30px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--ink-2); text-decoration: none; margin-right: 14px; }
.more-list a { display: flex; align-items: center; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 17px; }
.more-list a span.d { display: block; font-size: 13.5px; color: var(--muted); }
.more-list .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--brown); flex: none; }
.more-list .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
table.admin { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin td, table.admin th { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }

.cl-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.cl-main { min-width: 0; }
.cl-side { display: grid; gap: 14px; }
.cl-sidecard { padding: 18px; }
.cl-sidecard .eyebrow { margin-bottom: 12px; }
.cl-upcoming-m { display: none; }
@media (max-width: 960px) {
  .cl-wrap { grid-template-columns: minmax(0, 1fr); }
  .cl-side { display: none; }
  .cl-upcoming-m { display: block; padding: 0; margin: 0 0 14px; }
  .cl-upcoming-m summary { padding: 14px 16px; cursor: pointer; color: var(--gold); font-weight: 600; font-size: 14px; list-style: none; }
  .cl-upcoming-m summary::-webkit-details-marker { display: none; }
  .cl-upcoming-m[open] summary { border-bottom: 1px solid var(--line); }
  .cl-upcoming-m .cl-ev { padding: 12px 16px; }
}

.cl-av { flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; text-decoration: none; font-size: 15px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.cl-badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: 1px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.cl-badge.l1 { color: var(--brown); border-color: rgba(156,200,255,.35); }
.cl-badge.l2 { color: #c7a6ff; border-color: rgba(199,166,255,.4); }
.cl-badge.l3 { color: #fffaf0; background: linear-gradient(90deg, var(--gold), #fff0d2); border-color: transparent; }
.cl-badge.staff { color: var(--gold); border-color: rgba(184,137,59,.5); }

.cl-chans { display: flex; gap: 8px; overflow-x: auto; margin: 18px -20px 16px; padding: 2px 20px 6px; scrollbar-width: none; }
.cl-chans::-webkit-scrollbar { display: none; }
.cl-chan { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-decoration: none; background: #fff; }
.cl-chan:hover { color: var(--walnut); border-color: rgba(74,50,34,.3); }
.cl-chan.on { color: #fffaf0; background: var(--walnut); border-color: var(--walnut); }

.cl-compose { padding: 16px; margin-bottom: 16px; }
.cl-ta { width: 100%; min-height: 84px; resize: vertical; font: inherit; line-height: 1.5; }
.cl-prev { position: relative; align-items: center; gap: 10px; margin-top: 10px; }
.cl-prev img { max-height: 120px; max-width: 200px; border-radius: 10px; border: 1px solid var(--line); }
.cl-x { border: 0; background: rgba(0,0,0,.6); color: var(--walnut); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }
.cl-prev .cl-x { position: absolute; top: -8px; left: 190px; }
.cl-ref .chip .cl-x { width: 18px; height: 18px; font-size: 13px; background: rgba(255,255,255,.08); }

.cl-feed { display: grid; gap: 14px; }
.cl-post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px 8px; box-shadow: var(--shadow); }
.cl-post.pinned { border-color: rgba(184,137,59,.4); box-shadow: 0 0 0 1px rgba(184,137,59,.12), 0 10px 40px -20px rgba(184,137,59,.35); }
.cl-post.hidden-post { opacity: .6; border-style: dashed; }
.cl-head { display: flex; gap: 12px; align-items: flex-start; }
.cl-who { flex: 1; min-width: 0; line-height: 1.35; }
.cl-who .small a { text-decoration: none; }
.cl-name { color: var(--walnut); font-weight: 700; text-decoration: none; }
.cl-name:hover { text-decoration: underline; }
.cl-menu { position: relative; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; padding: 2px 6px; border-radius: 8px; cursor: pointer; }
.cl-menu:hover { color: var(--walnut); background: rgba(74,50,34,.06); }
.cl-pop { position: absolute; right: 0; top: 30px; z-index: 30; min-width: 170px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: var(--shadow-lg); }
.cl-pop button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--ink); font: 500 14px var(--body); padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.cl-pop button:hover { background: rgba(74,50,34,.06); }
.cl-ref { margin: 10px 0 0; }
.cl-ref .chip { text-decoration: none; }
.cl-body { margin-top: 10px; color: var(--ink); font-size: 15.5px; line-height: 1.6; overflow-wrap: anywhere; }
.cl-body.clamp { display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }
.cl-body a { color: var(--brown); }
.cl-img { display: block; width: 100%; margin: 12px 0 0; padding: 0; border: 0; background: var(--parchment); border-radius: 14px; overflow: hidden; cursor: zoom-in; }
.cl-img img { display: block; width: 100%; max-height: 560px; object-fit: contain; }
.cl-actions { display: flex; gap: 4px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 4px; }
.cl-act { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font: 600 14px var(--body); padding: 9px 12px; border-radius: 10px; cursor: pointer; text-decoration: none; min-height: 40px; }
.cl-act:hover { color: var(--walnut); background: rgba(74,50,34,.05); }
.cl-act.on { color: var(--gold); }
.cl-act.pop { animation: clpop .35s ease; }
@keyframes clpop { 40% { transform: scale(1.25); } }
.cl-act:last-child { margin-left: auto; }
@media (max-width: 480px) { .cl-act-label { display: none; } .cl-post { padding: 14px 14px 6px; border-radius: 18px; } .cl-chans { margin-left: -20px; } }

.cl-ev { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.cl-ev:first-of-type { border-top: 0; }
.cl-ev-date { flex: none; width: 46px; text-align: center; border: 1px solid rgba(184,137,59,.3); border-radius: 10px; padding: 5px 0; color: var(--gold); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; }
.cl-ev-date b { display: block; font-size: 18px; color: var(--walnut); letter-spacing: 0; }
.cl-ev-title { font-weight: 600; font-size: 14.5px; color: var(--walnut); }
.cl-ev a { text-decoration: none; }

.cl-comment { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.cl-comment:first-child { border-top: 0; }
.cl-cbody { flex: 1; min-width: 0; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.cl-cbody .cl-badge { font-size: 9.5px; }
.cl-link { border: 0; background: none; color: var(--muted); font: 600 12.5px var(--body); padding: 4px 0; cursor: pointer; }
.cl-link:hover { color: var(--walnut); }

.cl-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(42,31,22,.94); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.cl-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.cl-lightbox button { position: absolute; top: calc(14px + var(--safe-t)); right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(0,0,0,.6); color: var(--walnut); font-size: 24px; cursor: pointer; }

.cl-dot { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #fffaf0; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; margin-left: 4px; }
.cl-actrow { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.cl-actrow:hover { background: rgba(74,50,34,.04); }
.cl-actrow.unread { background: rgba(184,137,59,.09); }
.cl-ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-profile .stats { margin-bottom: 0; }
@media (max-width: 520px) { .cl-profile .stats { grid-template-columns: repeat(2, 1fr) !important; } }
.lesson-club { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 34px; padding: 18px 20px; }
@media (max-width: 640px) { .lesson-club { flex-direction: column; align-items: flex-start; } }
@media (max-width: 560px) {
  .cl-compose { padding: 12px; }
  .cl-compose > .row > .cl-av { display: none; }
  .cl-compose .row[style*="space-between"] { flex-wrap: nowrap; gap: 8px; }
  .cl-compose .row[style*="space-between"] > .row { flex: 1; min-width: 0; flex-wrap: nowrap; }
  .cl-compose #c-ch { flex: 1; min-width: 0; }
  .cl-compose .btn.sm { padding-left: 12px; padding-right: 12px; }
}
#cm-body { flex: 1; min-width: 0; }

/* ---------------- Club (light) ---------------- */
.cl-badge.l0, .cl-badge.l1, .cl-badge.l2 { color: var(--ink-2); }
.cl-badge.l3, .cl-badge.l4, .cl-badge.l5 { color: var(--brown); border-color: rgba(107,74,47,.35); background: rgba(107,74,47,.06); }
.cl-badge.l6, .cl-badge.l7, .cl-badge.l8 { color: #8a6223; border-color: rgba(184,137,59,.5); background: var(--gold-soft); }
.cl-badge.l9, .cl-badge.l10, .cl-badge.l11 { color: #fffaf0; background: linear-gradient(90deg, var(--walnut), var(--brown-2)); border-color: transparent; }
.cl-badge.staff { color: #fffaf0; background: var(--gold); border-color: var(--gold); }
.cl-lightbox button { color: #fff; }
@media (max-width: 560px) {
  .cl-compose { padding: 12px; }
  .cl-compose > .row > .cl-av { display: none; }
  .cl-compose .row[style*="space-between"] { flex-wrap: nowrap; gap: 8px; }
  .cl-compose .row[style*="space-between"] > .row { flex: 1; min-width: 0; flex-wrap: nowrap; }
  .cl-compose #c-ch { flex: 1; min-width: 0; }
}
.hide-sm { }
@media (max-width: 560px) { .hide-sm { display: none; } }
#out { scroll-margin-top: calc(var(--top-h) + 20px); } .msg { scroll-margin-top: calc(var(--top-h) + 20px); scroll-margin-bottom: 160px; }
