/* The look of praznuim.com (apps/web/styles/globals.css): warm paper, dark ink, gold for what you press, red only for the
   Church's own marks, serif titles, grouped rows. Right answers take the site's fasting green, wrong ones its danger orange. */
:root {
  --paper: #f4eee2;
  --raised: #fffcf6;
  --muted-paper: #ece3d1;
  --pressed: #e2d6bf;
  --ink: #2a1f17;
  --ink-muted: #665646;
  --line: rgba(90, 62, 40, 0.18);
  --edge: #e3d6c0;
  --feast: #8e1b2c;
  --tint: #735016;
  --on-tint: #ffffff;
  --tint-soft: #f1e6d0;
  --right: #3d6a35;
  --right-soft: rgba(61, 106, 53, 0.12);
  --wrong: #b23a0e;
  --wrong-soft: rgba(178, 58, 14, 0.1);
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 1rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14100c; --raised: #211a14; --muted-paper: #2d241c; --pressed: #3a2f25; --ink: #f3ebdd; --ink-muted: #b9aa94;
    --line: rgba(214, 190, 150, 0.16); --edge: rgba(214, 190, 150, 0.24); --feast: #e86a78; --tint: #d9b467; --on-tint: #1f170f;
    --tint-soft: #3a2e1e; --right: #94c483; --right-soft: rgba(148, 196, 131, 0.14); --wrong: #f0703c; --wrong-soft: rgba(240, 112, 60, 0.13);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.5 var(--sans); }
a { color: var(--tint); text-underline-offset: 0.18em; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.18; text-wrap: balance; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--tint); outline-offset: 3px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; } /* a heading focused for the screen reader, not by the hand */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-muted); }
svg.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* The bar: the site's mark, and the way back to it */
.bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: max(0.625rem, env(safe-area-inset-top)) 1.25rem 0.625rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; color: var(--ink); font: 700 1.1875rem var(--serif); text-decoration: none; }
.brand span { color: var(--ink-muted); font-weight: 400; }
.bar-link { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 2.75rem; font-size: 1.0625rem; font-weight: 600; text-decoration: none; }
main { display: grid; gap: 1.5rem; width: min(100%, 36rem); margin: 0 auto; padding: 1.25rem 1.25rem calc(6rem + env(safe-area-inset-bottom)); scroll-padding-bottom: 6rem; }
html { scroll-padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
main:focus { outline: none; }

/* Titles as on the site */
.head { display: grid; gap: 0.25rem; }
.eyebrow { color: var(--ink-muted); font-size: 1.0625rem; font-weight: 600; }
.large-title { font-size: 2.25rem; letter-spacing: -0.01em; }

/* Cards and grouped rows */
.card { display: grid; gap: 0.875rem; padding: 1.25rem; background: var(--raised); border: 1px solid var(--edge); border-radius: var(--radius); }
.card h2 { font-size: 1.5rem; }
.today { gap: 1rem; }
.today-top { display: flex; gap: 1rem; align-items: center; }
.today-top img { width: 4.5rem; height: 6rem; object-fit: cover; border-radius: 0.5rem; border: 1px solid var(--edge); }
.soon { justify-self: start; padding: 0.125rem 0.625rem; border-radius: 999px; background: var(--muted-paper); color: var(--ink-muted); font-size: 0.9375rem; font-weight: 600; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.row > .btn { flex: 1 1 10rem; }
.stack { display: grid; gap: 0.75rem; }

/* One button system: gold for the action, an outline for the other one. Pressed answers on touch-down. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 3.25rem; padding: 0.75rem 1.25rem; border: 2px solid var(--tint); border-radius: 0.875rem; background: var(--tint); color: var(--on-tint); font: 600 1.125rem/1.25 var(--sans); text-align: center; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 120ms var(--ease-out), filter 120ms; }
.btn:active { transform: scale(0.98); filter: brightness(0.92); }
.btn-secondary { background: transparent; color: var(--tint); }
.btn[disabled] { opacity: 0.55; cursor: default; transform: none; }
.link { justify-self: start; display: inline-flex; align-items: center; gap: 0.25rem; min-height: 2.75rem; font-weight: 600; }

/* Five dots: where the day's questions stand */
.dots { display: flex; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.dots li { width: 1.125rem; height: 1.125rem; border-radius: 50%; border: 2px solid var(--edge); background: transparent; }
.dots li.now { border-color: var(--tint); }
.dots li.ok { border-color: var(--right); background: var(--right); }
.dots li.no { border-color: var(--wrong); background: var(--wrong); }

/* A question */
.qtop { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.75rem; }
.qtop .count { color: var(--ink-muted); font-size: 1.0625rem; font-weight: 600; }
.back { display: inline-flex; align-items: center; gap: 0.125rem; min-height: 2.75rem; color: var(--tint); font-weight: 600; text-decoration: none; }
.icon-frame { justify-self: center; padding: 0.5rem; background: var(--raised); border: 1px solid var(--edge); border-radius: var(--radius); }
.icon-frame img { max-height: 34vh; width: auto; border-radius: 0.375rem; }
.question { font: 700 1.5rem/1.3 var(--serif); text-wrap: pretty; }
.options { display: grid; gap: 0.625rem; margin: 0; padding: 0; list-style: none; }
.option { display: flex; align-items: center; gap: 0.875rem; width: 100%; min-height: 3.75rem; padding: 0.75rem 1rem; border: 2px solid var(--edge); border-radius: var(--radius); background: var(--raised); color: var(--ink); font: 500 1.125rem/1.35 var(--sans); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 120ms var(--ease-out), background-color 200ms, border-color 200ms; }
button.option:active { transform: scale(0.985); background: var(--pressed); }
.option .letter { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--tint-soft); color: var(--tint); font-weight: 700; }
.option .text { flex: 1; }
.option .mark { display: inline-flex; align-items: center; gap: 0.25rem; flex: none; font-size: 1rem; font-weight: 700; }
.option.is-right { border-color: var(--right); background: var(--right-soft); }
.option.is-right .letter, .option.is-right .mark { color: var(--right); }
.option.is-right .letter { background: transparent; }
.option.is-wrong { border-color: var(--wrong); background: var(--wrong-soft); }
.option.is-wrong .letter, .option.is-wrong .mark { color: var(--wrong); }
.option.is-wrong .letter { background: transparent; }
.option.is-rest { color: var(--ink-muted); }

/* After the answer: the verdict and what Prăznuim says, at full contrast */
.answer-note { display: grid; gap: 0.625rem; padding: 1.125rem 1.25rem; background: var(--raised); border: 1px solid var(--edge); border-left: 4px solid var(--right); border-radius: var(--radius); animation: rise 240ms var(--ease-out); }
.answer-note.no { border-left-color: var(--wrong); }
.verdict { display: flex; align-items: center; gap: 0.5rem; font: 700 1.3125rem var(--serif); }
.verdict.ok { color: var(--right); }
.verdict.no { color: var(--wrong); }
.credit { color: var(--ink-muted); font-size: 0.9375rem; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* The action that moves on stays within reach, at the bottom */
.dock { position: fixed; inset: auto 0 0 0; z-index: 3; padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
.dock .btn { display: flex; width: min(100%, 33.5rem); margin: 0 auto; }

/* The duel's clock: a quiet gold line */
.timer { height: 0.375rem; border-radius: 999px; background: var(--muted-paper); overflow: hidden; }
.timer > i { display: block; height: 100%; background: var(--tint); transform-origin: left center; }

/* The result */
.result { display: grid; gap: 0.75rem; justify-items: start; }
.big { font: 700 3.25rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.big small { font-size: 1.5rem; color: var(--ink-muted); }
.list { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--raised); overflow: hidden; }
.list li { display: flex; gap: 0.75rem; padding: 0.875rem 1rem; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .ok { color: var(--right); }
.list .no { color: var(--wrong); }
.list b { font-weight: 600; }

/* Players in a duel */
.players { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.player { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 0.75rem; border: 1px solid var(--edge); border-radius: 0.875rem; background: var(--raised); min-width: 0; }
.avatar { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--tint-soft); color: var(--tint); font-weight: 700; }
.player .who { display: grid; min-width: 0; }
.player b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .score { font: 700 1.25rem var(--serif); font-variant-numeric: tabular-nums; }
.player .state { color: var(--ink-muted); font-size: 0.9375rem; }
.code { font: 700 2rem/1 var(--sans); letter-spacing: 0.2em; }
.share-link { overflow-wrap: anywhere; font-weight: 600; }
.field { display: grid; gap: 0.375rem; font-weight: 600; }
.input { min-height: 3.25rem; padding: 0.625rem 0.875rem; border: 2px solid var(--edge); border-radius: 0.75rem; background: var(--raised); color: var(--ink); font: 500 1.25rem var(--sans); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
