/* wolfmoot.com — the app's night sky, cards and table, on the web. Colours and sizes follow apps/mobile/src/theme/tokens.ts. */

@font-face { font-family: "Fraunces"; src: url(/fonts/fraunces-600.ttf) format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/fonts/fraunces-500i.ttf) format("truetype"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Lora"; src: url(/fonts/lora-600.ttf) format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url(/fonts/lora-500i.ttf) format("truetype"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "El Messiri"; src: url(/fonts/elmessiri-600.ttf) format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Markazi Text"; src: url(/fonts/markazi-500.ttf) format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --ink950: #030409; --ink900: #070A1A; --ink800: #0D1433; --ink700: #141B40; --ink600: #1B2552;
  --moon: #F5E9C9; --cream: #FFF8E8; --text: #EEF0FF; --muted: #B4BBE2; --faint: #8F98C8;
  --gold: #F2C14E; --gold-soft: #F7D682; --gold-ink: #1A1206;
  --ember: #FF7A45; --ember-soft: #FF9A6E; --sky: #8FD0FF; --violet: #C8B4FF; --mint: #9BE3B7; --rose: #FF9DBB;
  --bark: #2B1D12; --burnt: #B5470F;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --latin: "Fraunces", Georgia, "Times New Roman", serif;
  --display: var(--latin); --display-weight: 600; --tracking: -0.01em;
  --script: var(--latin); --script-style: italic;
  --caps: 0.2em;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.4, .5, 1);
}
/* Each writing system gets the fonts the app gives it. */
:lang(ru) { --display: "Lora", Georgia, serif; --script: "Lora", Georgia, serif; }
:lang(ar) { --display: "El Messiri", "Geeza Pro", "Segoe UI", serif; --script: "Markazi Text", "Geeza Pro", serif; --script-style: normal; --body: "Segoe UI", "Geeza Pro", Tahoma, system-ui, sans-serif; --tracking: 0; --caps: 0; }
:lang(zh), :lang(ja), :lang(ko) { --display: var(--body); --display-weight: 700; --script: var(--body); --script-style: normal; --tracking: 0; --caps: 0.08em; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--ink950); color: var(--text); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--tracking); line-height: 1.14; color: var(--cream); text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.icon { flex: none; }

/* Moving between pages: one sky fades into the next. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }
.vt { view-transition-name: wordmark; }

.wordmark { font-family: var(--latin); font-weight: 600; font-size: 1.4rem; letter-spacing: -0.02em; color: var(--cream); text-decoration: none; white-space: nowrap; }
.wordmark span { color: var(--gold); }
a:has(> .wordmark) { text-decoration: none; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px/1.2 var(--body); letter-spacing: var(--caps); text-transform: uppercase; color: var(--gold); }

/* ------------------------------------------------------------------ sky */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(#18204A 0%, #0A0E24 52%, #030409 100%);
  --dawn: 0; --day: 0; --stars: 1; --moon-o: 1; --moon-y: 0; --sun-o: 0; --sun-y: 1; }
.sky .l { position: absolute; inset: 0; }
.sky .dawn { background: linear-gradient(#2A2350, #7A4A6E 52%, #E08A5B); opacity: var(--dawn); }
.sky .day { background: linear-gradient(#6FA8DC, #B7D4EA 55%, #F1E3C2); opacity: var(--day); }
.stars { position: absolute; inset: 0; opacity: var(--stars); }
.star { position: absolute; width: var(--r); height: var(--r); border-radius: 50%; background: var(--moon); opacity: var(--o); }
.star.tw { animation: twinkle var(--t) ease-in-out var(--dl) infinite; }
@keyframes twinkle { 50% { opacity: calc(var(--o) * .25); transform: scale(.7); } }
.shooting { position: absolute; top: 16%; left: 62%; width: 130px; height: 1.5px; border-radius: 2px; background: linear-gradient(90deg, rgba(245, 233, 201, 0), var(--moon)); opacity: 0; transform: rotate(-24deg) translateX(0); animation: shoot 11s ease-in 3s infinite; }
@keyframes shoot { 0%, 92% { opacity: 0; transform: rotate(-24deg) translateX(0); } 94% { opacity: .9; } 100% { opacity: 0; transform: rotate(-24deg) translateX(-46vw); } }
.moon { position: absolute; top: clamp(84px, 13vh, 150px); inset-inline-end: clamp(18px, 8vw, 150px); width: clamp(64px, 8vw, 108px); aspect-ratio: 1; opacity: var(--moon-o); transform: translateY(calc(var(--moon-y) * 46vh)) rotate(-24deg); }
.moon::before { content: ""; position: absolute; inset: -70%; border-radius: 50%; background: radial-gradient(closest-side, rgba(245, 233, 201, .17), rgba(245, 233, 201, 0)); }
.moon svg { position: relative; width: 100%; height: 100%; }
.sun { position: absolute; top: clamp(90px, 15vh, 170px); inset-inline-start: clamp(14px, 4vw, 80px); width: clamp(70px, 9vw, 120px); aspect-ratio: 1; opacity: var(--sun-o); transform: translateY(calc(var(--sun-y) * 62vh)); }
.sun::before { content: ""; position: absolute; inset: -60%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 231, 163, .5), rgba(255, 231, 163, 0)); }
.sun i { position: absolute; inset: 14%; border-radius: 50%; background: #FFD36E; box-shadow: 0 0 0 10px rgba(255, 231, 163, .35); }

/* ------------------------------------------------------------------ top bar */
.top { position: fixed; inset: 12px 0 auto 0; z-index: 30; width: min(1120px, calc(100% - 24px)); margin-inline: auto; display: flex; align-items: center; gap: clamp(10px, 3vw, 28px); padding: 9px 10px 9px 20px; padding-inline: 20px 10px; border-radius: 999px; background: rgba(7, 10, 26, .62); border: 1px solid rgba(174, 182, 224, .16); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.top nav { display: flex; gap: clamp(10px, 2.4vw, 26px); margin-inline-start: auto; }
.top nav a { font: 500 .93rem/1 var(--body); color: var(--muted); text-decoration: none; padding: 8px 2px; transition: color .2s; white-space: nowrap; }
.top nav a:hover { color: var(--cream); }
.progress { position: absolute; inset-inline: 26px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--gold); transform: scaleX(var(--p, 0)); transform-origin: left; opacity: .9; }
[dir="rtl"] .progress { transform-origin: right; }
.lang { position: relative; }
.lang summary { list-style: none; display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer; font: 500 .9rem/1 var(--body); color: var(--cream); background: rgba(245, 233, 201, .1); border: 1px solid rgba(245, 233, 201, .22); transition: background .2s; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: rgba(245, 233, 201, .18); }
.lang[open] summary .icon:last-child { transform: rotate(180deg); }
.lang ul { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); margin: 0; padding: 8px; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; min-width: 260px; border-radius: 20px; background: rgba(13, 20, 51, .97); border: 1px solid rgba(174, 182, 224, .2); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); animation: drop .22s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.lang ul a { display: block; padding: 10px 14px; border-radius: 12px; text-decoration: none; font: 500 .95rem/1.2 var(--body); color: var(--text); }
.lang ul a:hover { background: rgba(174, 182, 224, .12); }
.lang ul a[aria-current] { color: var(--gold); background: rgba(242, 193, 78, .1); }

/* ------------------------------------------------------------------ scenes */
.scene { position: relative; min-height: 100svh; display: grid; place-items: center; padding: clamp(96px, 13vh, 150px) clamp(20px, 5vw, 56px) clamp(56px, 9vh, 110px); }
.wrap { width: 100%; max-width: 1080px; opacity: var(--v, 1); transform: translateY(calc((1 - var(--v, 1)) * 34px)); }
.wrap.narrow { max-width: 760px; display: grid; justify-items: center; gap: 26px; text-align: center; }
.wrap.wide { max-width: none; display: grid; justify-items: center; gap: 22px; text-align: center; }
.two .wrap { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(28px, 6vw, 96px); }
.two.swap .art { order: 2; }
.copy { display: grid; gap: 16px; justify-items: start; max-width: 31rem; }
.copy p:not(.kicker), .aside, .lede { color: #C9CEEA; font-size: 1.1rem; }
.aside { max-width: 36rem; }
@media (max-width: 860px) {
  .two .wrap { grid-template-columns: 1fr; gap: 34px; }
  .two.swap .art { order: 0; }
  .copy { justify-items: center; text-align: center; margin-inline: auto; }
}
/* Without scripts, or when motion is reduced, each scene carries its own sky. */
html:not(.live) .sky .l, html:not(.live) .sky .sun { display: none; }
html:not(.live) .scene[data-sky="dawn"] { background: linear-gradient(#2A2350, #7A4A6E 52%, #E08A5B); }
html:not(.live) .scene[data-sky="day"] { background: linear-gradient(#6FA8DC, #B7D4EA 55%, #F1E3C2); }

/* The day is bright: ink on paper. */
.day h2 { color: #1C1730; }
.day .copy p:not(.kicker) { color: #3A3350; }
.day .kicker { color: #7A3A08; }
[data-sky="dawn"] .kicker { color: #FFE2B8; }
[data-sky="dawn"] .copy p:not(.kicker) { color: #F1E4E2; }

/* ------------------------------------------------------------------ cards */
.card { position: relative; display: block; padding: 0; border: 0; background: none; color: inherit; perspective: 1100px; border-radius: 18px; box-shadow: 0 16px 36px rgba(0, 0, 0, .5); -webkit-tap-highlight-color: transparent; }
button.card { cursor: pointer; }
.flip { position: relative; display: block; width: 100%; height: 100%; border-radius: inherit; transform-style: preserve-3d; transition: transform .62s var(--ease); }
.card.up > .flip { transform: rotateY(180deg); }
.back, .face { position: absolute; inset: 0; display: block; border-radius: inherit; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.back { display: grid; place-items: center; align-content: center; gap: 8%; background: linear-gradient(155deg, #1F2A5E, #121A3D); border: 1px solid rgba(242, 193, 78, .25); }
.back .inset { position: absolute; inset: 6%; border-radius: 12px; border: 1px solid rgba(242, 193, 78, .22); }
.back .seal { width: 58%; height: auto; }
.seal-name { font: 600 .68rem/1 var(--body); letter-spacing: .3em; color: var(--moon); padding-inline-start: .3em; }
.face { transform: rotateY(180deg); background: var(--ink900); border: 1.5px solid rgba(242, 193, 78, .7); }
.face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.face .frame { position: absolute; inset: 8px; border-radius: 12px; border: 1px solid rgba(242, 193, 78, .42); pointer-events: none; }
.face-text { position: absolute; inset-inline: 0; bottom: 0; display: grid; gap: 3px; padding: 42% 13% 10%; text-align: start; background: linear-gradient(rgba(5, 7, 18, 0), rgba(5, 7, 18, .88) 52%, rgba(5, 7, 18, .97)); }
.face-text strong { font: var(--display-weight) 1.12rem/1.15 var(--display); color: var(--cream); }
.face-power { font-size: .72rem; line-height: 1.35; color: #D4D8F0; }
.face-caption { font-size: .78rem; line-height: 1.35; color: var(--gold-soft); }
/* A card that leans toward the pointer, with a glint of moonlight. */
[data-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); }
[data-tilt].tilting { transition: transform .08s linear; }
[data-tilt]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 248, 232, .22), rgba(255, 248, 232, 0) 55%); opacity: 0; transition: opacity .3s; }
[data-tilt].tilting::after { opacity: 1; }

/* ------------------------------------------------------------------ hero */
.hero .wrap { display: grid; justify-items: center; gap: 16px; text-align: center; }
.hand { --ch: clamp(200px, 32vh, 330px); position: relative; width: calc(var(--ch) * .743 * 1.95); height: calc(var(--ch) * 1.08); margin-bottom: 6px; animation: bob 5.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-7px); } }
.hand .glow { position: absolute; left: 50%; top: 50%; width: 100%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: rgba(245, 233, 201, .07); box-shadow: 0 0 80px 30px rgba(245, 233, 201, .08); }
.hand .card { position: absolute; left: 50%; top: 50%; border-radius: calc(var(--ch) * .07); }
.hand .side { width: calc(var(--ch) * .743 * .86); height: calc(var(--ch) * .86); translate: -50% -50%; transition: transform 1s var(--spring) .25s; }
.hand .mid { width: calc(var(--ch) * .743); height: var(--ch); translate: -50% -52%; z-index: 2; }
.ready .hand .side-l, html:not(.js) .hand .side-l { transform: translate(calc(var(--ch) * -.27), calc(var(--ch) * .05)) rotate(-13deg); }
.ready .hand .side-r, html:not(.js) .hand .side-r { transform: translate(calc(var(--ch) * .27), calc(var(--ch) * .05)) rotate(13deg); }
/* The middle card waits face down until the hand is dealt. */
.js:not(.dealt) .hand .mid > .flip { transform: none; }
.hero h1 { line-height: 1; }
.wordmark.xl { font-size: clamp(3rem, 9vw, 5.4rem); text-shadow: 0 3px 14px rgba(3, 4, 9, .9); }
.tagline { display: flex; align-items: center; justify-content: center; gap: 9px; font: 600 12px/1.2 var(--body); letter-spacing: var(--caps); text-transform: uppercase; color: var(--gold-soft); }
.tagline .rule { width: 44px; height: 1px; background: rgba(242, 193, 78, .45); }
.hero-title { font: var(--script-style) 500 clamp(1.35rem, 3.2vw, 2.1rem)/1.25 var(--script); color: var(--cream); max-width: 22ch; text-wrap: balance; margin-top: 6px; }
.lede { max-width: 34rem; }
.soon { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 .95rem/1.2 var(--body); color: var(--gold-soft); background: rgba(242, 193, 78, .1); border: 1px solid rgba(242, 193, 78, .4); }
.hint { display: grid; justify-items: center; gap: 2px; margin-top: 14px; font: 500 .82rem/1 var(--body); color: var(--muted); text-decoration: none; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(8px); } }
/* Arriving: the night settles, then the hand is dealt. */
.js .hero .wrap > :not(.hand) { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js.ready .hero .wrap > :not(.hand) { opacity: 1; transform: none; }
.hero .wrap > :nth-child(2) { transition-delay: .5s; } .hero .wrap > :nth-child(3) { transition-delay: .62s; } .hero .wrap > :nth-child(4) { transition-delay: .74s; }
.hero .wrap > :nth-child(5) { transition-delay: .86s; } .hero .wrap > :nth-child(6) { transition-delay: .98s; } .hero .wrap > :nth-child(7) { transition-delay: 1.3s; }

/* ------------------------------------------------------------------ the fan of role cards */
.fan { --cw: clamp(118px, 15vw, 178px); position: relative; height: calc(var(--cw) * 1.9); }
.fan .card { position: absolute; left: 50%; top: 50%; width: var(--cw); aspect-ratio: 600 / 796; translate: -50% -50%; z-index: calc(10 - var(--a)); transition: transform .8s var(--spring) calc(var(--i) * 70ms); }
.fan.in .card, html:not(.js) .fan .card { transform: translateX(calc(var(--s) * var(--cw) * .47)) translateY(calc(var(--a) * var(--cw) * .07)) rotate(calc(var(--s) * 9deg)); }
.fan .card > .flip { transition-delay: calc(.4s + var(--i) * .13s); }
.fan.in .card:not(.down) > .flip, html:not(.js) .fan .card > .flip { transform: rotateY(180deg); }
.fan .card.down > .flip, .fan .card.touched > .flip { transition-delay: 0s; }
.fan.in .card:hover, .fan.in .card:focus-visible { transform: translateX(calc(var(--s) * var(--cw) * .47)) translateY(calc(var(--cw) * -.1)) scale(1.1); z-index: 20; transition-delay: 0s; transition-duration: .35s; }
.fan .face-text strong { font-size: clamp(.74rem, calc(var(--cw) * .105), 1.12rem); }
.fan .face-power { font-size: clamp(.56rem, calc(var(--cw) * .064), .72rem); }
@media (max-width: 520px) { .fan { --cw: 27vw; } .fan .face-power { display: none; } .fan .face-text { padding-bottom: 14%; } }

/* ------------------------------------------------------------------ the table at night */
.table { --hue: var(--ember-soft); position: relative; width: min(100%, 470px); aspect-ratio: 1; margin-inline: auto; }
.table[data-hue="sky"] { --hue: var(--sky); } .table[data-hue="mint"] { --hue: var(--mint); } .table[data-hue="gold"] { --hue: var(--gold); }
.ring { position: absolute; inset: 7%; border-radius: 50%; border: 2px dotted rgba(174, 182, 224, .42); }
.call { position: absolute; inset: 23%; display: grid; place-items: center; align-content: center; gap: 8px; padding: 7%; border-radius: 30%; text-align: center; background: rgba(9, 13, 34, .84); border: 1px solid rgba(242, 193, 78, .22); }
.sign { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--hue); border: 1.5px solid var(--hue); background: color-mix(in srgb, var(--hue) 12%, transparent); box-shadow: 0 0 20px color-mix(in srgb, var(--hue) 32%, transparent); transition: color .5s, border-color .5s, box-shadow .5s, background .5s; }
.sign .icon { display: none; }
.table[data-sign="claw"] .s-claw, .table[data-sign="eye"] .s-eye, .table[data-sign="flask"] .s-flask, .table[data-sign="sun"] .s-sun { display: block; }
.call-title { font: var(--display-weight) clamp(.95rem, 2.3vw, 1.2rem)/1.2 var(--display); color: var(--cream); }
.call-say { font: var(--script-style) 500 clamp(.74rem, 1.7vw, .88rem)/1.4 var(--script); color: var(--muted); }
.call > * { transition: opacity .3s; }
.table.changing .call-title, .table.changing .call-say { opacity: 0; }
.seat { position: absolute; width: 14.5%; translate: -50% -50%; display: grid; justify-items: center; gap: 5px; transition: opacity .6s; }
.seat .av { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--c); color: var(--ink900); font: 600 clamp(.85rem, 2.5vw, 1.15rem)/1 var(--body); transition: box-shadow .5s, transform .5s var(--spring); }
.seat .nm { font: 500 .74rem/1 var(--body); color: var(--text); white-space: nowrap; }
.seat .role { position: absolute; inset-inline-end: -8%; top: 38%; width: 38%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--ink900); border: 1.5px solid var(--gold); color: var(--gold); }
.seat[data-pack] .role { border-color: var(--ember); color: var(--ember); }
.seat .mark { position: absolute; inset-inline-start: -8%; top: -8%; width: 40%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--ember-soft); color: var(--ink900); scale: 0; transition: scale .4s var(--spring); }
.seat .mark .icon { display: none; }
.seat.m-claw .mark, .seat.m-eye .mark { scale: 1; }
.seat.m-claw .i-claw, .seat.m-eye .i-eye { display: block; }
.seat.m-eye .mark { background: var(--sky); }
.seat .grave { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(6, 9, 24, .62); color: var(--moon); opacity: 0; transition: opacity .6s; }
.seat.dead .grave { opacity: 1; }
.seat.dead .nm { text-decoration: line-through; color: var(--faint); }
.table.night .seat:not(.awake) { opacity: .45; }
.table.night .seat.m-claw, .table.night .seat.m-eye { opacity: .9; }
.seat.awake .av { box-shadow: 0 0 0 3px var(--hue), 0 0 26px 5px color-mix(in srgb, var(--hue) 55%, transparent); transform: scale(1.07); }

/* ------------------------------------------------------------------ dawn: a card is turned over */
.reveal { width: min(64vw, 270px); aspect-ratio: 600 / 796; margin-inline: auto; border-radius: 22px; }
.reveal.in > .flip, html:not(.js) .reveal > .flip { transform: rotateY(180deg); transition-delay: .35s; }
.reveal .face-text strong { font-size: 1.5rem; }
.reveal .face-caption { font-size: .9rem; }

/* ------------------------------------------------------------------ day: the vote */
.vote { width: min(100%, 410px); margin-inline: auto; display: grid; gap: 16px; padding: 24px; border-radius: 26px; color: var(--bark); background: rgba(255, 250, 240, .88); border: 1px solid rgba(107, 84, 64, .2); box-shadow: 0 26px 54px rgba(60, 40, 20, .2); text-align: start; }
.vote-head { display: flex; align-items: center; gap: 10px; color: var(--burnt); }
.vote-head strong { font: var(--display-weight) 1.2rem/1.2 var(--display); color: var(--bark); }
.vote-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 6px 12px; }
.vote-row .av { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--c); color: var(--ink900); font: 600 .95rem/1 var(--body); }
.vote-row .nm { font: 600 1rem/1 var(--body); }
.vote-row b { font: 700 1.05rem/1 var(--body); font-variant-numeric: tabular-nums; }
.vote-row .bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: rgba(43, 29, 18, .14); overflow: hidden; }
.vote-row .bar i { display: block; width: var(--w); height: 100%; border-radius: 4px; background: var(--burnt); transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease) calc(.2s + var(--i) * .16s); }
[dir="rtl"] .vote-row .bar i { transform-origin: right; }
.vote.in .bar i, html:not(.js) .vote .bar i { transform: scaleX(1); }

/* ------------------------------------------------------------------ who wins, two ways to play */
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; max-width: 580px; }
.side-card { display: grid; justify-items: center; align-content: start; gap: 14px; padding: 18px; border-radius: 22px; background: rgba(16, 22, 58, .72); border: 1px solid color-mix(in srgb, var(--tint) 42%, transparent); transition: transform .35s var(--ease), box-shadow .35s; }
.side-card:hover { transform: translateY(-5px); box-shadow: 0 18px 44px color-mix(in srgb, var(--tint) 18%, transparent); }
.side-card img { width: min(100%, 160px); aspect-ratio: 600 / 796; object-fit: cover; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--tint) 60%, transparent); }
.side-card p { font: 600 1rem/1.4 var(--body); color: var(--cream); }
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: 100%; text-align: start; }
.way { position: relative; display: grid; align-content: start; gap: 12px; padding: 28px; border-radius: 26px; background: rgba(16, 22, 58, .72); border: 1px solid rgba(174, 182, 224, .16); overflow: hidden; transition: transform .35s var(--ease), border-color .35s; }
.way::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -30%), color-mix(in srgb, var(--tint) 16%, transparent), transparent 60%); opacity: 0; transition: opacity .35s; }
.way:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--tint) 55%, transparent); }
.way:hover::before { opacity: 1; }
.way-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: var(--tint); background: color-mix(in srgb, var(--tint) 14%, transparent); }
.way p { color: #C9CEEA; }
@media (max-width: 700px) { .ways { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ every role, passing by */
.roles { padding-inline: 0; }
.roles h2, .roles .aside { padding-inline: 20px; }
.marquee { width: 100%; overflow: hidden; direction: ltr; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.track { display: flex; width: max-content; padding-block: 8px; animation: slide 80s linear infinite; }
.again { display: contents; }
.marquee.rev .track { animation-direction: reverse; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.mini { flex: none; width: clamp(104px, 11vw, 138px); margin: 0 14px 0 0; display: grid; gap: 8px; justify-items: center; transition: transform .3s var(--ease); }
.mini:hover { transform: translateY(-6px) scale(1.04); }
.mini img { width: 100%; aspect-ratio: 600 / 796; object-fit: cover; border-radius: 12px; border: 1.5px solid rgba(242, 193, 78, .5); box-shadow: 0 10px 22px rgba(0, 0, 0, .45); background: var(--ink800); }
.mini figcaption { font: 500 .8rem/1.2 var(--body); color: var(--muted); text-align: center; }

/* ------------------------------------------------------------------ the end: the moon rises over the village */
.end { padding-bottom: 0; overflow: hidden; align-content: center; }
.end::before { content: ""; position: absolute; inset: auto 0 0 0; height: 70%; pointer-events: none; background: radial-gradient(ellipse 70% 100% at 50% 100%, rgba(52, 66, 138, .55), rgba(52, 66, 138, 0) 70%); opacity: var(--v, 1); }
.end .wrap { position: relative; z-index: 2; padding-bottom: clamp(250px, 44vh, 420px); }
.big { font-size: clamp(2.4rem, 7vw, 4.6rem); }
.rising { position: absolute; left: 50%; bottom: clamp(40px, 9vh, 120px); width: clamp(170px, 26vw, 300px); aspect-ratio: 1; border-radius: 50%; translate: -50% calc((1 - var(--v, 1)) * 62%); background: radial-gradient(circle at 38% 36%, #FFF8E8, #F5E9C9 55%, #E2D3A8); box-shadow: 0 0 90px 30px rgba(245, 233, 201, .16); }
.village { position: absolute; z-index: 1; inset-inline: 0; bottom: 0; width: 100%; height: clamp(130px, 24vh, 240px); }
.village .window { animation: lamp 5s ease-in-out infinite; }
.village .window:nth-of-type(2n) { animation-delay: -2.2s; }
@keyframes lamp { 50% { opacity: .55; } }

.foot { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding: 26px clamp(20px, 5vw, 56px) 34px; background: #04060F; color: var(--faint); font-size: .9rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot p a { color: var(--muted); text-decoration: none; }
.foot p a:hover { color: var(--cream); }
.foot nav a:hover { color: var(--cream); text-decoration: underline; }

/* ------------------------------------------------------------------ account pages */
.account { display: grid; }
.panel { width: min(100% - 32px, 440px); margin: auto; padding: 34px 0 28px; display: grid; gap: 20px; justify-items: center; }
.panel .home .wordmark { font-size: 1.8rem; }
.sheet { width: 100%; display: grid; gap: 16px; justify-items: center; padding: 30px 24px 26px; border-radius: 28px; text-align: center; background: rgba(13, 20, 51, .78); border: 1px solid rgba(174, 182, 224, .18); box-shadow: 0 30px 70px rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.sheet h1 { font-size: 1.75rem; }
.sheet p { color: var(--muted); }
.sheet p.strong { color: var(--cream); font-weight: 500; }
.emblem { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(155deg, #1F2A5E, #121A3D); border: 1px solid rgba(242, 193, 78, .3); box-shadow: 0 0 44px rgba(245, 233, 201, .12); }
.emblem .seal { width: 76%; }
.state { width: 100%; display: grid; gap: 16px; justify-items: center; }
.state[hidden], [hidden] { display: none !important; }
.field { width: 100%; display: grid; gap: 7px; text-align: start; }
.field > span:first-child { font: 600 .9rem/1.2 var(--body); color: var(--text); }
.input { position: relative; display: block; }
.input input { width: 100%; min-height: 56px; padding: 0 16px; padding-inline-end: 58px; border-radius: 16px; font: 500 1.02rem/1 var(--body); color: var(--cream); background: rgba(7, 10, 26, .75); border: 1.5px solid rgba(174, 182, 224, .28); transition: border-color .2s, box-shadow .2s; }
.input input::placeholder { color: var(--faint); font-weight: 400; }
.input input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(242, 193, 78, .16); }
.input input.bad { border-color: var(--ember-soft); }
.peek { position: absolute; inset-inline-end: 6px; top: 50%; translate: 0 -50%; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--gold-soft); cursor: pointer; }
.peek .icon:last-child, .peek.on .icon:first-child { display: none; }
.peek.on .icon:last-child { display: block; }
.peek:hover { background: rgba(242, 193, 78, .1); }
.field-error, .problem { font: 500 .92rem/1.4 var(--body); color: var(--ember-soft); text-align: start; }
.problem { width: 100%; text-align: center; }
.btn { width: 100%; min-height: 60px; display: grid; place-items: center; padding: 0 22px; border: 0; border-radius: 20px; font: 700 1.05rem/1.2 var(--body); color: var(--gold-ink); text-decoration: none; cursor: pointer; background: linear-gradient(180deg, #F7D682, #F2C14E); box-shadow: 0 10px 26px rgba(242, 193, 78, .3); transition: transform .15s, box-shadow .2s, opacity .2s; }
.btn:hover { box-shadow: 0 12px 32px rgba(242, 193, 78, .42); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: progress; }
.badge { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; color: var(--mint); background: rgba(124, 224, 184, .12); animation: pop .5s var(--spring) both; }
.badge.warn { color: var(--moon); background: rgba(245, 233, 201, .1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.panel-foot { display: flex; gap: 22px; font-size: .9rem; }
.panel-foot a { color: var(--faint); text-decoration: none; }
.panel-foot a:hover { color: var(--cream); text-decoration: underline; }

/* ------------------------------------------------------------------ plain pages */
.prose { width: min(100% - 40px, 720px); margin: 0 auto; padding: 120px 0 72px; }
.prose h1 { font-size: clamp(2.1rem, 5vw, 3rem); margin-bottom: 10px; }
.prose h2 { font-size: 1.4rem; margin: 38px 0 12px; }
.prose p, .prose li { color: #D3D7F0; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-inline-start: 22px; display: grid; gap: 8px; }
.prose a { color: var(--gold-soft); }
.prose strong { color: var(--cream); font-weight: 600; }
.prose .updated { color: var(--faint); font-size: .92rem; }
.prose .lead { font-size: 1.14rem; color: var(--text); }
.callout { padding: 16px 18px; border-radius: 16px; background: rgba(242, 193, 78, .08); border: 1px solid rgba(242, 193, 78, .3); }
.plain .foot { margin-top: 20px; }

/* ------------------------------------------------------------------ small screens, still screens */
@media (max-width: 700px) {
  .top { padding-inline: 16px 8px; }
  .top nav { display: none; }
  .plain .top nav { display: flex; overflow-x: auto; }
  .lang { margin-inline-start: auto; }
  .lang summary span { display: none; }
  .lang ul { min-width: 240px; }
  .sides { gap: 10px; }
  .side-card { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .rising { translate: -50% 0; }
}
