@font-face { font-family: 'Fell'; src: url('/fonts/im-fell-english-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Fell'; font-style: italic; src: url('/fonts/im-fell-english-latin-400-italic.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree-latin.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }

:root {
  --night: #120a07;      /* confessional walnut in the dark */
  --walnut: #2a1910;
  --grain: #3b2518;
  --amber: #f0a63a;      /* candle light, the Father's eyes */
  --amber-hi: #ffc773;
  --blood: #d7362b;      /* a red candle */
  --vellum: #ecdcbc;     /* the absolution paper */
  --ink: #2b1a10;
  --ash: #b4a08d;
  --serif: 'Fell', 'Songti SC', 'STSong', 'Noto Serif SC', Georgia, serif;
  --sans: 'Figtree', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--night); color: var(--vellum); scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--amber-hi); outline-offset: 3px; }


/* ---------- top bar ---------- */
.top { position: absolute; z-index: 5; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px clamp(18px, 4vw, 56px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--vellum); text-decoration: none; font: 400 22px/1 var(--serif); letter-spacing: .01em; }
.brand img { border-radius: 50%; box-shadow: 0 0 0 1px #6b4a2c, 0 0 18px #f0a63a55; }
.top-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); font-size: 15px; }
.top-links a { color: #d8c6a8; text-decoration: none; text-shadow: 0 1px 10px #000, 0 0 2px #000; }
.top-links a:hover { color: var(--vellum); }
.lang { min-width: 40px; height: 34px; border: 1px solid #6b4a2c; background: #1d110bcc; border-radius: 999px; cursor: pointer; font-weight: 600; }
.lang:hover { border-color: var(--amber); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: max(700px, 100svh); display: grid; grid-template-columns: minmax(0, 600px) 1fr; grid-template-rows: 1fr auto; padding: 92px clamp(18px, 4vw, 56px) 0; overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%; }
.hero-art::after { content: ''; position: absolute; inset: 0; background:
  linear-gradient(90deg, var(--night) 0%, #120a07e6 26%, #120a0700 52%),
  linear-gradient(0deg, var(--night) 0%, #120a07cc 14%, #120a0700 34%); }

.hero-copy { align-self: center; padding-bottom: 24px; }
h1 { font: 400 clamp(46px, 5.8vw, 86px)/.98 var(--serif); margin: 0 0 18px; letter-spacing: -.012em; color: #f6e8cc; text-wrap: balance; }
html[lang^="zh"] h1 { white-space: pre-line; font-weight: 700; letter-spacing: .02em; line-height: 1.12; font-size: clamp(40px, 5.2vw, 74px); }
.lede { font-size: clamp(17px, 1.35vw, 19px); color: #d8c6a8; max-width: 33em; margin: 0 0 24px; }

/* the booth: a slot in the confessional wood */
.booth { background: linear-gradient(180deg, #2c1a10f2, #1a0f09f2); border: 1px solid #5c3d24; border-radius: 14px; padding: 14px; box-shadow: inset 0 1px 0 #ffffff12, 0 24px 60px #00000080; max-width: 560px; }
.mode { display: inline-flex; padding: 3px; background: #120a07; border-radius: 9px; margin-bottom: 12px; border: 1px solid #3d2617; }
.mode button { border: 0; background: none; padding: 7px 14px; border-radius: 7px; color: var(--ash); cursor: pointer; font-size: 14px; }
.mode button.on { background: var(--grain); color: var(--vellum); box-shadow: inset 0 1px 0 #ffffff14; }
.slot { display: block; }
.slot input, .slot textarea { width: 100%; background: #0d0705; border: 1px solid #4a2f1c; border-radius: 9px; padding: 15px 16px; font-size: 17px; color: #f6e8cc; resize: vertical; }
.slot input { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 16px; }
.slot input::placeholder, .slot textarea::placeholder { color: #7d6650; }
.slot input:focus, .slot textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px #f0a63a2e; }
.confess { margin-top: 12px; width: 100%; border: 0; border-radius: 9px; padding: 16px; cursor: pointer; font: 400 24px/1 var(--serif); color: #2a1206;
  background: linear-gradient(180deg, var(--amber-hi), var(--amber) 60%, #d4861f); box-shadow: 0 0 0 1px #ffd99a66 inset, 0 10px 30px #f0a63a40; transition: transform .12s, box-shadow .2s; }
html[lang^="zh"] .confess { font: 700 20px/1 var(--sans); letter-spacing: .08em; }
.confess:hover { box-shadow: 0 0 0 1px #ffe2ad inset, 0 12px 40px #f0a63a70; }
.confess:active { transform: translateY(1px); }
.confess:disabled { cursor: progress; filter: saturate(.6); font-size: 18px; }
.fine { margin: 10px 2px 0; font-size: 13px; color: #9b8670; }

.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0; margin: 20px 0 0; max-width: 560px; }
.steps li { counter-increment: s; font-size: 14px; color: var(--ash); line-height: 1.4; }
.steps b { display: block; font: 400 20px/1.1 var(--serif); color: var(--vellum); margin-bottom: 4px; }
.steps b::before { content: counter(s) '. '; color: var(--amber); }
html[lang^="zh"] .steps b { font: 700 17px/1.2 var(--sans); }

/* the absolution writ: the one loud thing */
.writ { grid-column: 2; align-self: end; justify-self: end; margin: 0 1vw 28px 0; width: min(350px, 100%); padding: 22px 22px 18px; color: var(--ink);
  background: radial-gradient(120% 90% at 30% 10%, #f6ead0, var(--vellum) 55%, #d9c296); border-radius: 4px;
  box-shadow: 0 1px 0 #fff8 inset, 0 30px 70px #000c, 0 0 0 1px #a98a5b; transform: rotate(2.4deg); position: relative; }
.writ::before { content: ''; position: absolute; inset: 7px; border: 1px solid #8f6f43; border-radius: 2px; pointer-events: none; }
.writ-head { font: italic 400 25px/1.1 var(--serif); text-align: center; margin-bottom: 14px; color: #3a2212; }
html[lang^="zh"] .writ-head { font: 700 24px/1.2 var(--serif); letter-spacing: .3em; }
.writ dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 14px; line-height: 1.35; }
.writ dt { font: 400 15px/1.35 var(--serif); color: #7a5634; }
html[lang^="zh"] .writ dt { font: 600 13px/1.5 var(--sans); }
.writ dd { margin: 0; }
.writ dd.loss { font: 700 22px/1 var(--sans); color: #a8211a; letter-spacing: -.01em; }
.writ-word { font: italic 400 17px/1.3 var(--serif); margin: 14px 0 10px; color: #3a2212; }
.writ-foot { display: flex; align-items: center; justify-content: space-between; }
.sig { font: italic 400 26px/1 var(--serif); color: #4a2a14; transform: rotate(-3deg); }
.seal { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; color: #ffb3a1;
  background: radial-gradient(circle at 35% 30%, #e0503f, #a51e17 55%, #6d0f0b); box-shadow: 0 3px 8px #0007, inset 0 -3px 6px #0005, inset 0 2px 4px #fff3;
  transform: scale(1.6) rotate(-20deg); opacity: 0; }
.seal svg { width: 34px; fill: #ffb3a1; }
.writ.stamped .seal { animation: stamp .5s cubic-bezier(.3, 1.6, .5, 1) .25s forwards; }
@keyframes stamp { to { opacity: 1; transform: scale(1) rotate(-12deg); } }
.share { display: block; margin-top: 14px; text-align: center; font-size: 14px; font-weight: 600; color: var(--vellum); background: #1c110b; padding: 10px; border-radius: 6px; text-decoration: none; }
.share:hover { background: #000; }

/* live strip along the bottom of the first screen */
.live { grid-column: 1 / -1; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 0 clamp(20px, 3vw, 44px); border-top: 1px solid #3d2617; padding: 16px 0 20px; }
.live .k { display: block; font-size: 12.5px; color: #9b8670; letter-spacing: .02em; }
.live .v { font: 700 28px/1.1 var(--sans); letter-spacing: -.01em; color: #f6e8cc; font-variant-numeric: tabular-nums; }
.tally .v { color: var(--amber-hi); }
.sinner .v { font-size: 18px; font-weight: 600; }
.sinner em { font: 600 15px var(--sans); color: #ff7a6b; font-style: normal; margin-left: 6px; }
.ticker { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tick-track { display: flex; gap: 34px; width: max-content; animation: tick 50s linear infinite; font-size: 14px; color: var(--ash); white-space: nowrap; }
.tick-track i { font-style: normal; color: #ff7a6b; font-weight: 600; margin-right: 4px; }
.tick-track .patrol i::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: var(--amber); transform: rotate(45deg) translateY(-2px); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- wall ---------- */
.wall { padding: 70px clamp(18px, 4vw, 56px) 60px; background: linear-gradient(180deg, var(--night), #170d08); }
.wall-head { max-width: 760px; margin-bottom: 30px; }
.wall h2 { font: 400 clamp(34px, 4vw, 52px)/1 var(--serif); margin: 0 0 12px; color: #f6e8cc; }
html[lang^="zh"] .wall h2 { font-weight: 700; }
.wall-head p { color: var(--ash); margin: 0; }
.slips { columns: 4 260px; column-gap: 16px; }
.slip { break-inside: avoid; margin: 0 0 16px; padding: 16px 16px 14px; border-radius: 10px; background: #21140d; border: 1px solid #3d2617; }
.slip header { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: #8e7a66; margin-bottom: 8px; }
.tag { padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.signed .tag { background: #f0a63a22; color: var(--amber-hi); }
.unverified .tag { background: #ffffff0d; color: #a8957f; }
.patrol .tag { background: #d7362b26; color: #ff8a7c; }
.slip .amt { font: 700 20px/1.2 var(--sans); color: #ff7a6b; margin: 0 0 6px; white-space: pre; }
.slip .roast { font: italic 400 18px/1.35 var(--serif); color: #e9d8b8; margin: 0; }
html[lang^="zh"] .slip .roast { font: 400 15.5px/1.6 var(--sans); font-style: normal; }
.slip footer { margin-top: 10px; font: 13px ui-monospace, Menlo, monospace; color: #8e7a66; }
.patrol { border-color: #5a2a1c; background: linear-gradient(180deg, #2a140d, #21140d); }
.claim { border: 1px dashed #b5523f; background: none; color: #ffb09f; padding: 6px 10px; border-radius: 6px; cursor: pointer; font: 600 13px var(--sans); }
.claim:hover { background: #d7362b22; }

.foot { padding: 34px clamp(18px, 4vw, 56px) 50px; border-top: 1px solid #2c1b11; color: #8e7a66; font-size: 13px; display: grid; gap: 4px; justify-items: start; }
.foot img { border-radius: 50%; margin-bottom: 8px; opacity: .85; }
.foot p { margin: 0; max-width: 70em; }
.foot-x { margin-top: 3px; }
.foot-x a { color: #c9a97a; text-decoration: none; border-bottom: 1px solid rgba(201,169,122,.4); }
.foot-x a:hover { color: #f0c98d; }


/* the Father's answer, in place of the booth */
.answer { background: linear-gradient(180deg, #2c1a10f2, #1a0f09f2); border: 1px solid #6b4a2c; border-radius: 14px; padding: 18px 18px 14px; box-shadow: inset 0 1px 0 #ffffff12, 0 24px 60px #00000080; max-width: 560px; }
.answer-k { margin: 0 0 6px; font-size: 13px; color: var(--amber); font-weight: 600; }
.roast { margin: 0 0 12px; font: italic 400 clamp(20px, 1.7vw, 24px)/1.32 var(--serif); color: #f6e8cc; }
.roast:lang(zh), html[lang^="zh"] .roast:not(:lang(en)) { font: 400 18px/1.65 var(--sans); }
.answer-note { margin: 0 0 14px; font-size: 13.5px; color: #b9a58e; }
.answer-note.bad, .fine.bad { color: #ff9b8c; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.act { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border-radius: 9px; border: 1px solid #6b4a2c; background: #120a07; color: var(--vellum); font: 600 14.5px var(--sans); text-decoration: none; cursor: pointer; }
.act:hover { border-color: var(--amber); }
.act.primary { border: 0; color: #2a1206; background: linear-gradient(180deg, var(--amber-hi), var(--amber) 60%, #d4861f); }
.act:disabled { cursor: progress; filter: saturate(.6); }
.again { margin-top: 12px; background: none; border: 0; padding: 4px 0; color: #9b8670; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.confess.busy { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { filter: brightness(.82); } }

.writ-kind { position: absolute; top: -12px; left: 18px; padding: 3px 10px; border-radius: 999px; font: 600 12px var(--sans); background: #2b1a10; color: var(--amber-hi); box-shadow: 0 2px 8px #0006; }
.writ-kind.patrol { background: #5a1a12; color: #ffb3a1; }
.writ-kind.sample, .writ-kind.unverified { background: #3a2c22; color: #cdb99f; }
.live .sub { display: block; font-size: 12.5px; color: #8e7a66; margin-top: 2px; }
#week.empty { color: #9b8670; font-size: 17px; }
.slips .empty { color: var(--ash); }
.slip .confession { font: 400 15px/1.45 var(--sans); color: #cbb79c; margin: 0 0 6px; }
.slip .roast { font-size: 17px; margin: 0; }
.claim-err { margin: 6px 0 0; font: 12.5px var(--sans); color: #ff9b8c; }

/* the fund */
.fund { padding: 64px clamp(18px, 4vw, 56px); border-top: 1px solid #2c1b11; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px 56px; align-items: start; background: radial-gradient(70% 90% at 90% 0%, #3a150d55, transparent), #140b07; }
.fund h2 { font: 400 clamp(32px, 3.6vw, 48px)/1 var(--serif); margin: 0 0 14px; color: #f6e8cc; }
html[lang^="zh"] .fund h2 { font-weight: 700; }
.fund-copy p { color: var(--ash); margin: 0 0 10px; max-width: 34em; }
.fund-status { color: var(--amber-hi) !important; font-weight: 600; }
.split { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px; }
.split div { background: #21140d; border: 1px solid #3d2617; border-radius: 10px; padding: 16px; }
.split b { display: block; font: 700 40px/1 var(--sans); letter-spacing: -.02em; color: var(--amber-hi); margin-bottom: 8px; }
.split div:first-child b { color: #ff7a6b; }
.split span { font-size: 14px; color: #cbb79c; line-height: 1.4; }
.fund-copy { grid-column: 1; grid-row: 1; }
.split { grid-column: 1; grid-row: 2; }
.queue { grid-column: 2; grid-row: 1 / span 3; background: #1b100a; border: 1px solid #3d2617; border-radius: 12px; padding: 18px 18px 10px; align-self: stretch; }
.queue h3 { margin: 0 0 4px; font: 400 26px/1.1 var(--serif); color: #f6e8cc; }
html[lang^="zh"] .queue h3 { font: 700 20px/1.3 var(--sans); }
.queue-sub { margin: 0 0 12px; font-size: 13.5px; color: #9b8670; }
.queue ol { list-style: none; margin: 0; padding: 0; }
.queue li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid #2c1b11; font-size: 14px; }
.queue .who { font-family: ui-monospace, Menlo, monospace; color: #cbb79c; }
.queue .what { color: #ff8a7c; }
.queue b { font: 700 18px var(--sans); color: var(--amber-hi); }
.rules { grid-column: 1; grid-row: 3; margin: 0; padding: 0 0 0 18px; color: #cbb79c; font-size: 14.5px; line-height: 1.7; }

/* ---------- phone ---------- */
@media (max-width: 820px) {
  .top { padding-top: 8px; }
  .booth { padding: 10px; }
  .mode { margin-bottom: 8px; }
  .slot input { padding: 13px 14px; }
  .confess { margin-top: 8px; padding: 14px; }
  .top-links a { display: none; }
  .hero { display: block; padding: 0 0 0; min-height: 0; }
  .hero-art { position: relative; height: 44svh; min-height: 300px; }
  .hero-art img { object-position: 50% 22%; }
  .hero-art::after { background: linear-gradient(0deg, var(--night) 2%, #120a07b3 26%, #120a0700 55%), linear-gradient(180deg, #120a07aa, #120a0700 22%); }
  .hero-copy { margin-top: -96px; padding: 0 18px 10px; position: relative; }
  h1 { font-size: clamp(40px, 11.4vw, 56px); margin-bottom: 12px; }
  html[lang^="zh"] h1 { font-size: clamp(36px, 10.5vw, 50px); }
  .lede { font-size: 15.5px; line-height: 1.5; margin-bottom: 16px; }
  .steps { gap: 12px; }
  .steps li { font-size: 13px; }
  .steps b { font-size: 17px; }
  .writ { margin: 34px auto 30px; transform: rotate(1.5deg); width: min(360px, calc(100% - 44px)); }
  .live { grid-template-columns: 1fr 1fr; gap: 14px 16px; padding: 18px; margin: 0; }
  .live .v { font-size: 25px; }
  .sinner .v { font-size: 17px; }
  .sinner em { display: block; margin: 2px 0 0; }
  .ticker { grid-column: 1 / -1; }
  .wall { padding-top: 46px; }
  .fund { grid-template-columns: 1fr; }
  .rules, .fund-copy, .split, .queue { grid-column: 1; grid-row: auto; }
  .split { grid-template-columns: 1fr; gap: 8px; }
  .split div { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
  .split b { font-size: 30px; margin: 0; min-width: 64px; }
  .split span { font-size: 14px; }
  .answer { padding: 14px; }
  .act { flex: 1 1 auto; }
  .top { top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tick-track { animation: none; }
  .seal { opacity: 1; transform: rotate(-12deg); }
  .writ.stamped .seal { animation: none; }
}
html[lang^="zh"] .slot input::placeholder { font-family: var(--sans); }
