:root {
  --night: #120C2B;
  --deep: #0E0922;
  --royal: #24185A;
  --royal2: #2F2270;
  --line: rgba(227, 184, 92, 0.28);
  --gold: #E3B85C;
  --gold-deep: #B8862F;
  --ivory: #FBF6EA;
  --muted: #C9BFE6;
  --soft: #DCD4F0;
  --sky: #8EC5FF;
  --danger: #FF9C8A;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 18px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--ivory); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
a { color: var(--gold); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: 540px; margin: 0 auto; min-height: 100dvh; position: relative; padding: calc(env(safe-area-inset-top) + 20px) 18px calc(env(safe-area-inset-bottom) + 96px); }
.app.bare { padding-bottom: 32px; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 22px; letter-spacing: .06em; }
.brand b { color: var(--gold); font-weight: 700; }
.eyebrow { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.eyebrow.gold { color: var(--gold); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; line-height: 1.08; }
h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
p { margin: 0; line-height: 1.55; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.gold { color: var(--gold); }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.tight { gap: 8px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.scripture { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; color: var(--soft); }
.scripture cite { display: block; font-style: normal; font-family: var(--sans); font-size: 12px; color: var(--muted); margin-top: 6px; letter-spacing: .04em; }

.card { background: var(--royal); border-radius: var(--r); padding: 16px; }
.card.line { background: transparent; border: 1px solid var(--line); }
.card.goldc { background: var(--gold); color: var(--night); }
.card.goldc .muted, .card.goldc .eyebrow, .card.goldc .meta { color: #3b2a07; }
.card.goldc .btn { border-color: var(--night); color: var(--night); }
.card.goldc .btn.primary { background: var(--night); color: var(--gold); }
.card.goldc .bar i { background: var(--night); }
.card.sky { background: rgba(142, 197, 255, .08); border: 1px solid rgba(142, 197, 255, .32); }
a.card { display: block; text-decoration: none; color: inherit; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--gold); background: transparent; color: var(--gold); font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--gold); color: var(--night); }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 13.5px; }
.btn.ghost { border-color: rgba(201, 191, 230, .35); color: var(--soft); }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn[disabled] { opacity: .5; cursor: default; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(227, 184, 92, .5); background: transparent; cursor: pointer; font-size: 14px; }
.chip.on { background: var(--gold); color: var(--night); border-color: var(--gold); font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; border: 1px solid rgba(201, 191, 230, .35); border-radius: 999px; padding: 4px 10px; color: var(--soft); }
.pill.live { border-color: rgba(142, 197, 255, .6); color: var(--sky); font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 0 rgba(142, 197, 255, .6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(142, 197, 255, .6); } 70% { box-shadow: 0 0 0 10px rgba(142, 197, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(142, 197, 255, 0); } }

label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input.in, select.in, textarea.in { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid rgba(201, 191, 230, .3); background: #1A1240; padding: 12px 14px; font-size: 15px; color: var(--ivory); }
textarea.in { min-height: 110px; resize: vertical; line-height: 1.5; }
input.in:focus, select.in:focus, textarea.in:focus, .btn:focus-visible, .chip:focus-visible, .tab:focus-visible, .hourbtn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--soft); min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--gold); }

.selah { display: flex; gap: 12px; align-items: flex-start; }
.selah .av { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--gold); color: var(--gold); font-family: var(--serif); font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.selah .bubble { background: var(--royal); border-radius: 4px 18px 18px 18px; padding: 12px 14px; font-size: 14.5px; line-height: 1.55; }

.hours { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hourbtn { min-height: 56px; border-radius: 12px; border: 1px solid rgba(201, 191, 230, .25); background: #1C1442; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; }
.hourbtn .t { font-size: 14px; font-weight: 700; }
.hourbtn .s { font-size: 11px; color: var(--muted); }
.hourbtn.sug { border: 2px solid var(--gold); }
.hourbtn.on { background: var(--gold); color: var(--night); border-color: var(--gold); }
.hourbtn.on .s { color: #3b2a07; }
.hourbtn.work { opacity: .55; }

.dial { position: relative; width: min(300px, 82vw); aspect-ratio: 1; margin: 4px auto 0; }
.dial svg { width: 100%; height: 100%; }
.dial .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; pointer-events: none; }

.ring { position: relative; width: min(310px, 84vw); aspect-ratio: 1; margin: 0 auto; }
.ring .seat { position: absolute; width: 10%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; background: var(--royal2); border: 1px solid rgba(227, 184, 92, .5); }
.ring .seat.me { background: var(--gold); color: var(--night); }
.ring .seat.open { background: transparent; border: 1.5px dashed var(--gold); color: var(--gold); }
.ring .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; }
.stat .n { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--gold); line-height: 1.1; }
.stat .l { font-size: 11.5px; color: var(--muted); }

.moves { display: flex; gap: 4px; }
.moves span { flex: 1; height: 5px; border-radius: 3px; background: rgba(201, 191, 230, .22); }
.moves span.done { background: var(--gold-deep); }
.moves span.now { background: var(--gold); }
details.mv { border: 1px solid var(--line); border-radius: var(--r); padding: 0 16px; }
details.mv[open] { background: rgba(36, 24, 90, .55); }
details.mv summary { list-style: none; cursor: pointer; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; }
details.mv summary::-webkit-details-marker { display: none; }
details.mv .body { padding: 0 0 16px; display: flex; flex-direction: column; gap: 12px; }
.lyrics { white-space: pre-line; font-family: var(--serif); font-size: 21px; line-height: 1.35; }
.verse-n { color: var(--gold); font-size: 12px; margin-right: 6px; font-family: var(--sans); font-style: normal; }
.psalm p { font-family: var(--serif); font-size: 19px; line-height: 1.45; margin-bottom: 8px; }

.faces { display: flex; flex-wrap: wrap; gap: 6px; }
.face { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px; background: var(--royal2); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.face.me { background: var(--gold); color: var(--night); }

.vial { display: flex; flex-direction: column; gap: 8px; }
.vial .meta { font-size: 12px; color: var(--muted); }
.bar { display: flex; gap: 3px; }
.bar i { width: 18px; height: 5px; border-radius: 3px; background: var(--gold); display: block; }

.seg { display: flex; background: #1C1442; border-radius: 12px; padding: 4px; }
.seg button { flex: 1; min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--royal2); color: var(--ivory); font-weight: 700; }

.wave { display: flex; flex-direction: column; }
.wave .z { display: flex; align-items: center; gap: 12px; min-height: 38px; }
.wave .t { width: 48px; text-align: right; font-size: 12px; color: #9C92C2; }
.wave .ln { width: 16px; align-self: stretch; display: flex; flex-direction: column; align-items: center; }
.wave .ln i { flex: 1; width: 2px; background: rgba(227, 184, 92, .4); }
.wave .ln b { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--gold); background: var(--deep); flex-shrink: 0; }
.wave .z.me .ln b { width: 16px; height: 16px; background: var(--gold); }
.wave .z.me .p { color: var(--gold); font-weight: 700; }
.wave .z:first-child .ln i:first-child, .wave .z:last-child .ln i:last-child { background: transparent; }

.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-line; }
.msg.me { align-self: flex-end; background: var(--gold); color: var(--night); border-radius: 16px 16px 4px 16px; }
.msg.selah { display: block; align-self: flex-start; background: var(--royal); border-radius: 4px 16px 16px 16px; }

nav.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 540px; display: flex; justify-content: space-around; padding: 6px 6px calc(env(safe-area-inset-bottom) + 8px); background: rgba(14, 9, 34, .96); border-top: 1px solid rgba(227, 184, 92, .2); backdrop-filter: blur(8px); z-index: 20; }
.tab { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); text-decoration: none; border-radius: 12px; }
.tab.on { color: var(--gold); }
.tab svg { width: 22px; height: 22px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 84px); background: var(--ivory); color: var(--night); padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; z-index: 50; max-width: 90vw; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.banner { font-size: 12.5px; color: var(--night); background: var(--gold); border-radius: 12px; padding: 8px 12px; }
.banner.demo { background: rgba(142, 197, 255, .12); color: var(--sky); border: 1px solid rgba(142, 197, 255, .35); }
.skel { height: 70px; border-radius: var(--r); background: linear-gradient(90deg, #1C1442, #24185A, #1C1442); background-size: 200% 100%; animation: sk 1.4s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.err { color: var(--danger); font-size: 13.5px; }
.hr { height: 1px; background: rgba(201, 191, 230, .15); }
ol.tenets { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; color: var(--soft); font-size: 14.5px; }

@media print {
  nav.tabs, .noprint { display: none !important; }
  body, html { background: #fff; color: #111; }
  .app { max-width: none; padding: 0; }
  .card, .card.line { background: #fff; border: 1px solid #ccc; color: #111; }
  .muted, .soft, .scripture { color: #333; }
}
@media (prefers-reduced-motion: reduce) { .dot, .skel { animation: none; } }

/* Flags and nations */
.flag { display: inline-block; vertical-align: -2px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); flex-shrink: 0; }
.flag.big { border-radius: 3px; }
.ring .seat { overflow: hidden; }
.ring .seat img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ring .seat.me { box-shadow: 0 0 0 3px var(--gold); }
.flagwall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fw { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; background: rgba(18, 12, 43, .45); text-decoration: none; color: var(--ivory); text-align: center; min-height: 44px; }
.fw span { font-size: 11.5px; line-height: 1.2; color: var(--soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw b { font-family: var(--serif); font-size: 18px; color: var(--gold); line-height: 1; }
.join { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--soft); padding: 4px 0; }
.join b { color: var(--ivory); font-weight: 500; }
.nations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nation { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-width: 0; }
.nation .grow > div:first-child { overflow: hidden; text-overflow: ellipsis; }
.pill.new { border-color: var(--gold); color: var(--gold); padding: 1px 7px; font-size: 10.5px; }
.face { gap: 5px; }
@media (max-width: 360px) { .nations { grid-template-columns: minmax(0, 1fr); } }

/* World map of praise */
.mapwrap { border-radius: var(--r); overflow: hidden; background: #0B0720; border: 1px solid var(--line); margin: 0 -6px; }
.worldmap { width: 100%; height: auto; display: block; }
.mapcard { display: flex; flex-direction: column; gap: 8px; }
.mapcard .worldmap { border-radius: 12px; }
.worldmap .hasn, .worldmap [data-act] { cursor: pointer; }
.worldmap .hasn:hover { filter: brightness(1.15); }
.worldmap .medot { stroke: #FBF6EA; stroke-width: 1.6; }
.worldmap .rising .spark { animation: c24rise 2.6s ease-out infinite; opacity: 0; }
.worldmap .rising .ring { animation: c24ring 2.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes c24rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-46px); opacity: 0; } }
@keyframes c24ring { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }
.maplegend { gap: 14px; justify-content: center; }
.maplegend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.lg.gold { background: #E3B85C; }
.lg.rise { background: #FFE9A8; box-shadow: 0 0 0 3px rgba(255, 233, 168, .3); }
.lg.night { background: rgba(5, 3, 16, .8); border: 1px solid rgba(201, 191, 230, .4); border-radius: 3px; }
button.pill { background: transparent; cursor: pointer; min-height: 36px; font: inherit; font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .worldmap .rising .spark, .worldmap .rising .ring { animation: none; opacity: .8; } }

/* Council chart: seats held in each hour (single series, so no legend; the title names it) */
.cbars { display: flex; align-items: flex-end; gap: 2px; height: 150px; padding: 0 0 20px; position: relative; border-bottom: 1px solid rgba(201, 191, 230, .2); }
.cb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; outline: none; }
.cbv { background: var(--gold); border-radius: 4px 4px 0 0; min-height: 0; }
.cbv.none { height: 3px !important; background: rgba(255, 156, 138, .55); border-radius: 2px; }
.cb:hover .cbv, .cb:focus .cbv { background: #F3D58E; }
.cbl { position: absolute; bottom: -18px; left: 0; font-size: 10px; color: var(--muted); white-space: nowrap; }
.ctable { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.ctable th, .ctable td { text-align: left; padding: 6px 4px; border-bottom: 1px solid rgba(201, 191, 230, .12); }
.ctable th { color: var(--muted); font-weight: 500; }
a.card.line.row, a.card.goldc.row { display: flex; }

/* BUILD-05 · The Living Altar */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #07041A; border: 1px solid var(--line); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-wrap { position: relative; }
.player-open { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; }
.player.loop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px 22px; text-align: center;
  background: radial-gradient(ellipse at 50% 85%, rgba(227, 184, 92, .28), rgba(36, 24, 90, .55) 45%, #0B0720 80%); }
.player.loop .flame { width: 46px; height: auto; flex-shrink: 0; }
.lp-text { font-family: var(--serif); font-size: clamp(18px, 4.4vw, 26px); line-height: 1.32; color: var(--ivory); max-width: 34ch; opacity: 0; }
.lp-text.lyric { white-space: pre-line; font-size: clamp(16px, 3.8vw, 22px); }
.lp-text.in { animation: lpin 1.1s ease forwards; }
@keyframes lpin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.flame .f1 { transform-origin: 50% 90%; animation: flick 2.4s ease-in-out infinite; }
.flame .f2 { transform-origin: 50% 90%; animation: flick 1.7s ease-in-out infinite reverse; }
@keyframes flick { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(.96, 1.05) skewX(1.5deg); } 60% { transform: scale(1.03, .97) skewX(-1.5deg); } }
.pill.onair { border-color: #FF8A7A; color: #FFD1C9; background: rgba(255, 90, 70, .14); }
.pill.onair .dot { background: #FF6B57; }
.altarcard { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; background: linear-gradient(135deg, #2F2270, #24185A 60%, #3A2A1A); }
.ac-flame { width: 34px; flex-shrink: 0; }
.ac-flame .flame { width: 34px; height: auto; }
.watchrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(201, 191, 230, .1); min-height: 48px; }
.watchrow:last-child { border-bottom: 0; }
.watchrow .wt { width: 112px; flex-shrink: 0; font-size: 12.5px; color: var(--muted); }
.watchrow.now { background: rgba(227, 184, 92, .1); margin: 0 -10px; padding: 8px 10px; border-radius: 10px; }
.watchrow.now .wt { color: var(--gold); font-weight: 700; }
.wave .relay { color: var(--sky); margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.wave .z.lead .p { color: var(--gold); font-weight: 700; }
.wave .z.lead .ln b { background: #FF6B57; border-color: #FF6B57; }
.lg.altar { background: #FFE9A8; box-shadow: 0 0 0 3px rgba(142, 197, 255, .5); }
.worldmap .altarmark .beam { animation: c24ring 2.2s ease-out infinite; transform-box: fill-box; transform-origin: center; opacity: 0; }
.worldmap .altarmark .b2 { animation-delay: 1.1s; }
.worldmap .altarmark:not(.live) .beam { animation-duration: 4s; }
.cstation { padding: 4px 0; }
.chip[aria-pressed="true"], .chip.on { border-color: var(--gold); }

/* Church TV mode: full screen for a sanctuary projector */
.app.tvmode { max-width: none; padding: 0; min-height: 100dvh; background: #07041A; }
.tv { display: grid; grid-template-columns: minmax(0, 1fr) clamp(260px, 26vw, 400px); min-height: 100dvh; }
.tv-main { display: flex; align-items: center; justify-content: center; padding: 2vw; background: #050312; }
.tv-main .player, .tv-main .player-wrap { width: 100%; max-height: calc(100dvh - 4vw); }
.tv-main .player { border-radius: 14px; }
.tv-main .lp-text { font-size: clamp(22px, 3.2vw, 54px); max-width: 30ch; }
.tv-main .lp-text.lyric { font-size: clamp(20px, 2.6vw, 44px); }
.tv-main .player.loop .flame { width: clamp(46px, 5vw, 90px); }
.tv-side { padding: 3vh 2vw; display: flex; flex-direction: column; gap: 3vh; background: linear-gradient(180deg, #1A1240, #120C2B); border-left: 1px solid var(--line); overflow: hidden; }
.tv-side .brand { font-size: clamp(22px, 2vw, 34px); }
.tv-clock { font-family: var(--serif); font-size: clamp(34px, 4vw, 72px); font-weight: 700; color: var(--gold); line-height: 1; }
.tv-flags { display: flex; flex-wrap: wrap; gap: 8px; }
.tv-side .scripture { font-size: clamp(17px, 1.5vw, 26px); margin-top: auto; }
.tv-join { border-top: 1px solid var(--line); padding-top: 2vh; }
.tv-url { font-family: var(--serif); font-size: clamp(22px, 2vw, 36px); font-weight: 700; word-break: break-all; }
.tv-ctl { position: fixed; top: 12px; left: 12px; display: flex; gap: 8px; opacity: .15; transition: opacity .3s; z-index: 5; }
.tv-ctl:hover, .tv-ctl:focus-within { opacity: 1; }
@media (max-width: 760px), (orientation: portrait) {
  .tv { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .tv-side { border-left: 0; border-top: 1px solid var(--line); }
  .tv-ctl { opacity: 1; position: static; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { .flame .f1, .flame .f2, .lp-text.in, .worldmap .altarmark .beam { animation: none; opacity: 1; } }
.check input[type=radio], .check input[type=checkbox] { flex-shrink: 0; width: 18px; height: 18px; }
@media (max-width: 420px) { .watchrow .wt { width: 92px; } }

/* BUILD-05b · giving and the altar chat */
.givebox { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.givebox .btn { align-self: flex-start; }
.achat { max-height: 300px; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 4px; overscroll-behavior: contain; }
.am { display: flex; gap: 8px; align-items: flex-start; padding: 6px 4px; border-radius: 10px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.am .flag { margin-top: 3px; }
.am b { color: var(--gold); font-weight: 700; }
.am.mine { background: rgba(227, 184, 92, .08); }
.am-act { display: flex; gap: 12px; margin-top: 2px; opacity: 0; transition: opacity .2s; }
.am:hover .am-act, .am:focus-within .am-act { opacity: 1; }
@media (hover: none) { .am-act { opacity: .7; } }
.linkbtn { background: none; border: 0; padding: 4px 0; min-height: 28px; color: var(--muted); font-size: 11.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.tv-give { border-top: 1px solid var(--line); padding-top: 2vh; }
.altar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.altar-actions .btn { width: 100%; }
.altar-actions > :only-child, .altar-actions > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 560px) { .player.loop { aspect-ratio: auto; min-height: 56vw; padding: 16px 16px 18px; } }

/* BUILD-06 · the golden censer, salvation, giving */
.censercard { display: flex; gap: 14px; align-items: center; background: linear-gradient(160deg, #2F2270, #1C1442); }
.censer-big { width: 64px; flex-shrink: 0; }
.censer-svg { width: 100%; height: auto; overflow: visible; }
.censer-svg .smoke { opacity: .55; animation: incense 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom; }
.censer-svg .s2 { animation-delay: .9s; } .censer-svg .s3 { animation-delay: 1.8s; }
@keyframes incense { 0% { transform: translateY(6px) scaleY(.7); opacity: 0; } 30% { opacity: .7; } 100% { transform: translateY(-14px) scaleY(1.15); opacity: 0; } }
.censercard.offered .censer-svg .smoke { animation-duration: 1.8s; stroke: #FBE7B0; }
.censerline { gap: 12px; }
.censer-mini { width: 34px; flex-shrink: 0; }
.prayer { font-family: var(--serif); font-size: 21px; line-height: 1.45; }
.altarcall { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px rgba(227, 184, 92, .35); } }
.tv-call { background: var(--gold); color: var(--night); border-radius: 14px; padding: 2vh 1.4vw; }
.tv-call-t { font-family: var(--serif); font-weight: 700; font-size: clamp(24px, 2.4vw, 42px); line-height: 1.1; }
.lg.fall { background: #FF9C6B; box-shadow: 0 0 0 3px rgba(255, 156, 107, .3); }
.worldmap .falling .ember { animation: c24fall 2.8s ease-in infinite; opacity: 0; }
@keyframes c24fall { 0% { transform: translateY(-40px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .censer-svg .smoke, .altarcall, .worldmap .falling .ember { animation: none; opacity: .7; } }

/* BUILD-07 · churches and the Growth dashboard */
nav.tabs .tab { font-size: 10.5px; min-width: 0; }
.tip { position: fixed; z-index: 60; display: none; background: var(--ivory); color: var(--night); font-size: 12.5px; font-weight: 500; padding: 6px 10px; border-radius: 8px; pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); max-width: 240px; }
.qrrow { align-items: flex-start; gap: 12px; }
.qr { width: 104px; flex-shrink: 0; background: #fff; border-radius: 10px; padding: 4px; }
.qr:empty { display: none; }
.qr svg { width: 100%; height: auto; display: block; }
.qr.big { width: min(70vw, 300px); margin: 10px auto; padding: 8px; }
.poster h1 { font-size: 34px; }
@media print { .poster { color: #111; } .poster .brand b { color: #B8862F; } }
.growth .stat .dl { margin-top: 4px; }
.up { color: #9FE3B4; font-weight: 700; } .down { color: var(--danger); font-weight: 700; }
.gbars { display: flex; align-items: flex-end; gap: 2px; height: 130px; padding-bottom: 20px; position: relative; border-bottom: 1px solid rgba(201, 191, 230, .2); }
.gb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; outline: none; min-width: 0; }
.gbv { background: var(--gold); border-radius: 3px 3px 0 0; }
.gbv.zero { height: 2px !important; background: rgba(201, 191, 230, .18); }
.gb:hover .gbv, .gb:focus .gbv { background: #F3D58E; }
.gbl { position: absolute; bottom: -18px; left: 0; font-size: 10px; color: var(--muted); white-space: nowrap; }
.gline { width: 100%; height: auto; display: block; }
.gline circle[data-tip] { cursor: crosshair; }
.goal, .frow { display: flex; flex-direction: column; gap: 5px; }
.gtrack { height: 8px; border-radius: 4px; background: rgba(201, 191, 230, .14); overflow: hidden; }
.gfill { height: 100%; background: var(--gold); border-radius: 4px; }
.tablewrap { overflow-x: auto; margin: 0 -4px; }
.gtable th .linkbtn { color: var(--muted); font-size: 12px; text-decoration: none; padding: 0; }
.gtable th .linkbtn.on { color: var(--gold); text-decoration: underline; }
.gtable td { white-space: nowrap; }

/* BUILD-09 · the Attunement Compass and the Storehouse */
.compass-hero { display: flex; gap: 14px; align-items: center; }
.compass-hero .compass-svg { width: 70px; flex-shrink: 0; }
.compass-svg .needle { transform-origin: 50px 50px; animation: needle 6s ease-in-out infinite; }
@keyframes needle { 0%, 100% { transform: rotate(-14deg); } 40% { transform: rotate(9deg); } 70% { transform: rotate(-4deg); } }
.compass-mini { width: 34px; flex-shrink: 0; }
.compass-mini .compass-svg { width: 34px; height: auto; }
.quick { gap: 10px; padding: 12px; min-width: 0; }
.ctest { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(201, 191, 230, .18); }
.ctest .cmark { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.ctest.aligned .cmark { background: rgba(159, 227, 180, .18); color: #9FE3B4; }
.ctest.misaligned .cmark { background: rgba(255, 156, 138, .18); color: var(--danger); }
.ctest.unclear .cmark { background: rgba(201, 191, 230, .16); color: var(--muted); }
.card.errc { background: rgba(255, 156, 138, .1); border: 1px solid rgba(255, 156, 138, .45); }
.needsteps { display: flex; gap: 4px; }
.needsteps .ns { flex: 1; display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--muted); }
.needsteps .ns i { display: block; height: 5px; border-radius: 3px; background: rgba(201, 191, 230, .16); }
.needsteps .ns.done i { background: var(--gold); }
.needsteps .ns.now i { background: linear-gradient(90deg, var(--gold), rgba(227, 184, 92, .3)); }
.needsteps .ns.now span { color: var(--gold); font-weight: 700; }
.urgentcard { box-shadow: inset 3px 0 0 #FF6B57; }
@media (prefers-reduced-motion: reduce) { .compass-svg .needle { animation: none; } }
.refchip { display: inline-block; margin: 8px 6px 0 0; padding: 4px 10px; min-height: 30px; border-radius: 999px; border: 1px solid rgba(227, 184, 92, .5); background: rgba(227, 184, 92, .1); color: var(--gold); font-size: 12px; cursor: pointer; }
.reader p { margin-bottom: 10px; }
.reader p.hl { background: rgba(227, 184, 92, .14); border-radius: 8px; padding: 4px 8px; margin-left: -8px; margin-right: -8px; }
.refrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; white-space: normal; }
.refrow .refchip { margin: 0; }
