/* The access page (and its copies of the Terms and Privacy), on their own: the app's styles only load once a visitor
   is in. The phone's own font, Harrox's own colours (the default theme, Vincent 2026-11-10: near-black brown, the star-and-leaf wallpaper, soft gold); the titles in the front page's Cormorant
   Garamond (web/tokens.css --display), the same self-hosted files (open without a pass: gate.js OPEN_PATHS). */
@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-display: swap; src: url(/fonts/cormorant-garamond/cormorant-garamond-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 600; font-display: swap; src: url(/fonts/cormorant-garamond/cormorant-garamond-latin-600-normal.woff2) format('woff2'); }
:root {
  color-scheme: dark;
  --bg-top: #1C120B;
  --bg-bottom: #120C08;
  --text: #EFE3C8;
  --mist: #B8AC92;
  --gold: #D2B36C;
  --line: rgba(239, 227, 200, 0.14);
  --field: rgba(0, 0, 0, 0.28);
  --bad: #F0A0A0;
  --display: "Cormorant Garamond", Georgia, serif;
}
/* Every title in the book face, drawn to the phone font's letter height where it is small (shell.css's rule). */
:where(h1, h2, h3, .mark) { font-family: var(--display); letter-spacing: 0; }
:where(h2, h3) { font-size-adjust: ex-height .47; }
* { box-sizing: border-box; }
html { background: var(--bg-bottom); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-top) url(/wp/harrox.svg) center / cover fixed;
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}
/* No underlines (Payton: no underlines; site run 1, 2026-11-24, item 2: Sign in, Privacy and the email were underlined
   here): a link is told by its gold, and inside a sentence by its weight too, so it never rests on colour alone. */
a { color: var(--gold); text-decoration: none; }
:is(p, li) a { font-weight: 600; }
p { margin: 0; }

.gate {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
/* The brand, as in the app (public/icons.js brand, app.css .brand): the logo, then the name, in Harrox's own colors. */
.mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.36em;
  margin: 0 0 6px;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.mark svg { flex: none; width: 1.5em; height: 1.5em; }
/* The access page's lockup (gate.js LOCKUP: the shield, HARROX and the sword), the width of the form, over the wallpaper. */
.mark .lockup { width: 100%; height: auto; margin: 0 0 18px; }
.gate h1 { margin: 0; text-align: center; font-size: 22px; font-weight: 600; }
.lede { text-align: center; color: var(--mist); }
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(18, 12, 8, 0.86);
}
label { font-size: 13px; color: var(--mist); }
input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--field);
  color: var(--text);
  font: 16px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
input::placeholder { color: rgba(173, 160, 135, 0.6); }
input:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button {
  padding: 13px;
  border: 0;
  border-radius: 2px;
  background: var(--gold);
  color: #1A1410;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }
/* Cloudflare's human check: it takes no room while it runs quietly, and when it needs a tap its box fills the card's
   width with the card's rounded corners. */
.human { display: flex; justify-content: center; }
.human iframe { border-radius: 12px; }
.error { color: var(--bad); font-size: 14px; }
.small { text-align: center; color: var(--mist); font-size: 13px; }
/* A right code or password in a browser that blocks cookies (gate.js cookiesOff): calm, under the button, with how to
   let Harrox's cookie in. Not an error, so gold rather than red. */
.blocked { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid rgba(210, 179, 108, 0.4);
  border-radius: 12px; background: rgba(210, 179, 108, 0.07); font-size: 14px; line-height: 1.45; }
.blocked[hidden] { display: none; }
.blocked h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--gold); }
.blocked ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.blocked b { font-weight: 600; }

/* The Terms and Privacy, readable before getting in. */
.legal { width: 100%; max-width: 680px; }
.legal h1 { font-size: 26px; margin: 18px 0 8px; }
.legal h2 { font-size: 19px; margin: 26px 0 8px; }
.legal h3 { font-size: 16px; margin: 20px 0 6px; }
.legal p, .legal li { color: var(--text); }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin: 0 0 6px; }
/* Questions and answers: each question a row that opens and closes. */
.legal .faq { border-top: 1px solid var(--line); }
.legal .faq:last-of-type { border-bottom: 1px solid var(--line); }
.legal .faq summary { display: flex; align-items: center; min-height: 44px; padding: 8px 0; font-weight: 600; cursor: pointer; }
.legal .faq p { color: var(--mist); }
/* The foot of each page of words: the footer's pages, the slogan, and whose it is. */
.legalfoot { margin-top: 40px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--mist); font-size: 13px; text-align: center; }
.legalfoot nav { display: flex; flex-wrap: wrap; justify-content: center; }
.legalfoot nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--text); text-decoration: none; }
.legalfoot nav a:hover { color: var(--gold); }
.legal .legalfoot p { margin: 0 0 4px; color: var(--mist); }

/* Two ways in, one form: an access code, or a username and password for people who already have an account. */
.fields { display: flex; flex-direction: column; gap: 8px; }
.fields[hidden] { display: none; }
#loginbox input { font: 16px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: normal; text-transform: none; }
.switch { text-align: center; }
.switch[hidden], #loginbox [hidden] { display: none; }
#recoverbox input { font: 16px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: normal; text-transform: none; }
.switch button { padding: 6px 10px; background: none; color: var(--gold); font-weight: 600; }

/* Small things to tap get an area of at least 44px around them, as in the app, without moving anything: the switch
   between a code and signing in, Terms and Privacy (with a little more room around the dot between them), and the
   cookie notice's Privacy and Got it. */
:is(.switch button, .small a, .cookies a, .cookies button) { position: relative; }
.switch button::after { content: ''; position: absolute; inset: calc(50% - 23px) 0; }
.small a { margin: 0 3px; }
:is(.small a, .cookies a)::after { content: ''; position: absolute; inset: calc(50% - 23px) -7px; }
/* ...and the link itself at least 24px tall (WCAG 2.2), its extra height taken back from the line around it. */
:is(.small a, .cookies a) { display: inline-block; padding-block: 5px; margin-block: -5px; }
.cookies button::after { content: ''; position: absolute; inset: -5px 0; }

/* The cookie notice, until it's closed on this device: over the page, the front page's footer too, on a short screen. */
.cookies { position: fixed; z-index: 3; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px;
  max-width: 460px; margin: 0 auto; padding: 7px 7px 7px 14px; border: 1px solid var(--line); border-radius: 16px; background: #221C17;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .45); font-size: 12.5px; color: var(--mist); }
.cookies[hidden] { display: none; }
.cookies p { flex: 1; line-height: 1.4; }
.cookies button { flex: none; padding: 7px 14px; font-size: 14px; }
/* It never covers the form: while it shows, the page keeps room at its end for it (its height, --cookies-h, measured by
   gate.js), and an error scrolled into view stops above it. */
body:has(> .cookies:not([hidden])) { padding-bottom: calc(24px + var(--cookies-h, 120px) + env(safe-area-inset-bottom)); }
:root:has(.cookies:not([hidden])) { scroll-padding-bottom: calc(var(--cookies-h, 120px) + env(safe-area-inset-bottom)); }

/* ---- The front page (core/accounts/server/routes/gate.js frontPage; live once an owner publishes it, src/frontpage.js; Vincent, items 97
   and 99): one screen, Harrox's own warm night with embers rising through it (and a day of its own, item 201), Sign in
   at the top right, the moon crossing the sky over Harrox big in the middle with one button, and a small footer. The way
   in is a popup over it (.entry). Phone first, and every tap at least --tap (44px). */
:root { --tap: 44px; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
/* No background of its own: the sky is the page's, and it and the shades under the words sit behind everything (below). */
body.front { display: flex; flex-direction: column; justify-content: flex-start; padding: 0; background: none; }

/* The sky: a deep warm night, lighter toward the glow low down, with a day of its own (below). Over it, Harrox as a
   whole (public/wallpaper.svg, item 136), laid like a cover in .scene, the drawing's own 1600 by 1000: anchored at the
   bottom and the middle, so a small phone loses the top of the sky and a tall one the sides, never the town. It's dimmed
   (.scene::before), and the words over it sit in soft shade (below), so they read at least 4.5:1 whatever's behind
   them, at any time of day. Its stars and its lights are layers of their own, laid exactly over it
   and dimmed as it is (core/accounts/server/routes/sky.js: .night and .lit). Embers rise from the fire, at 45.75% across and 13% up the
   drawing, and a few stars twinkle. Only transforms, opacity and colours move, so a phone draws it smoothly; with Reduce
   Motion on, nothing moves: the sky holds the visitor's own time of day, the embers rest over the fire, the stars stay
   lit. */
.sky { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; container-type: size;
  background: radial-gradient(120% 55% at 50% 112%, rgba(224, 145, 90, .3), rgba(224, 110, 50, .1) 45%, transparent 72%),
    radial-gradient(90% 45% at 50% -8%, rgba(142, 155, 232, .1), transparent 70%),
    linear-gradient(180deg, #0C0907 0%, #140F0C 50%, #211710 100%); }
.scene { position: absolute; left: 50%; bottom: 0; width: max(100vw, 160vh); height: max(62.5vw, 100vh);
  width: max(100cqw, 160cqh); height: max(62.5cqw, 100cqh); transform: translateX(-50%); }
.scene::before { content: ''; position: absolute; inset: 0; background: url(/wallpaper.svg) 0 0 / 100% 100% no-repeat; opacity: .72; }
.night, .lit { position: absolute; inset: 0; }
:is(.night, .lit) > svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .72; }
.scene i { position: absolute; left: calc(45.75% + var(--dx)); bottom: 13%; width: var(--s); height: var(--s); border-radius: 50%; opacity: 0;
  background: #FFB679; box-shadow: 0 0 8px 2px rgba(255, 150, 70, .6); }
.scene b { position: absolute; width: 3px; height: 3px; border-radius: 50%; opacity: .6;
  background: #EFE3C8; box-shadow: 0 0 6px 1px rgba(239, 227, 200, .5); }
/* Until gate.js has given it its place (its data-css): never a star in the corner. */
.scene [data-css]:not([style]) { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .scene i { animation: rise var(--d) linear var(--w) infinite; animation-play-state: var(--run, running); will-change: transform, opacity; }
  .scene b { animation: twinkle var(--d) ease-in-out var(--w) infinite alternate; animation-play-state: var(--run, running); }
}
@media (prefers-reduced-motion: reduce) {
  .scene i { bottom: calc(13% + var(--y)); opacity: calc(var(--o) * .7); }
  .front { --run: paused; }
}
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: var(--o); } 60% { opacity: calc(var(--o) * .5); }
  100% { transform: translate(var(--x), calc(var(--h) * -1vh)); opacity: 0; } }
@keyframes twinkle { from { opacity: .15; } to { opacity: .72; } }

/* ---- A day and night (Vincent, item 201: "make the moon move and a day and night cycle and keep the logo on the
   moon"): night, dawn, day, dusk and night again, a whole day every four minutes (--day), from the visitor's own time
   of day. gate.js reads that from this device's clock as --phase (0 at midnight, .5 at noon) and never sends it
   anywhere; every part below runs on that one clock, so each keyframe's percent is a time of day (25% is 6:00, 75% is
   18:00). The sky lifts from its blue-black to a soft warm day (.sky::before) through dawn's and dusk's ember glow
   (.sky::after), the stars fade by day (.night), the windows, the lamp, the fire's glow and its embers soften by day
   and warm up again at dusk (.lit), and the moon and a sun cross the open sky over the words (.orbit, below). It rests
   while the page is out of sight (gate.js sets --run), and with Reduce Motion on it holds still at the visitor's own
   time. ---- */
.front { --day: 240s; }
.sky::before, .sky::after, .night, .lit, .arc, .lift, .words::before, .words::after { animation-duration: var(--day); animation-timing-function: linear;
  animation-iteration-count: infinite; animation-delay: calc(var(--phase, 0) * var(--day) * -1); animation-play-state: var(--run, running); }
.sky::before, .sky::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; }
/* The day: a golden hour in Harrox's own colours, dusty violet high up and warm amber low down, never a flat bright blue,
   and deep enough that the haze round the words reads as air rather than a shape. Dawn and dusk: an ember glow low down,
   under a plum sky. */
.sky::before { animation-name: day; background: radial-gradient(120% 60% at 50% 110%, rgba(236, 170, 104, .3), transparent 70%),
    linear-gradient(180deg, #5E5670 0%, #8A6F66 52%, #A97B57 100%); }
.sky::after { animation-name: twilight; background: radial-gradient(140% 80% at 50% 105%, rgba(246, 150, 84, .75), rgba(226, 112, 70, .35) 45%, transparent 78%),
    linear-gradient(180deg, #2B2338 0%, #5A3A4C 48%, #9A5A40 100%); }
.night { animation-name: starlight; }
.lit { animation-name: lamplight; }
@keyframes day { 0%, 22.92% { opacity: 0; } 27.08% { opacity: .35; } 33.33%, 68.75% { opacity: 1; } 75% { opacity: .5; } 79.17%, 100% { opacity: 0; } }
@keyframes twilight { 0%, 18.75% { opacity: 0; } 25% { opacity: .85; } 31.25%, 66.67% { opacity: 0; } 75% { opacity: .9; } 81.25% { opacity: .45; } 85.42%, 100% { opacity: 0; } }
@keyframes starlight { 0%, 18.75% { opacity: 1; } 27.08%, 77.08% { opacity: 0; } 85.42%, 100% { opacity: 1; } }
@keyframes lamplight { 0%, 20.83% { opacity: 1; } 25% { opacity: .6; } 33.33%, 68.75% { opacity: .3; } 75% { opacity: .6; } 81.25%, 100% { opacity: 1; } }

/* Over the sky: the top, the middle and the foot. Back to front: the sky (z-index -2), the two soft shades that keep the
   words readable (-1, below), then everything on the page. None of these three makes a stacking context of its own, so
   both shades sit under every word, Sign in and the moon, wherever they reach. */
.top, .hero, .fine { position: relative; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.signin { min-height: var(--tap); padding: 0 clamp(12px, 4.5vw, 18px); border: 1px solid rgba(239, 227, 200, .28); border-radius: 999px;
  background: rgba(14, 11, 9, .72); color: var(--text); font-size: 15px; font-weight: 600; white-space: nowrap; }
/* The top left is empty for now (Vincent, Oct 5: "in the top left just put nothing in there for now"), so Sign in keeps
   to the right on its own. */
.top .signin { margin-left: auto; }
.signin:hover { border-color: rgba(224, 145, 90, .7); }
.hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 20px 32px; text-align: center;
  overflow-x: clip; }
.words { position: relative; display: flex; flex-direction: column; align-items: center; gap: inherit; }
.hbrand { display: flex; align-items: center; margin: 0; color: var(--text); font-size: clamp(32px, 11vw, 60px); font-weight: 700; line-height: 1;
  letter-spacing: -.02em; }
.what { max-width: 30ch; color: rgba(239, 227, 200, .86); font-size: clamp(16px, 4.4vw, 20px); line-height: 1.45; text-wrap: balance; }
.pill { margin-top: 10px; min-height: 52px; max-width: 100%; padding: 0 clamp(18px, 7vw, 30px); border-radius: 999px; background: var(--text); color: #1A1410;
  font-size: clamp(15px, 4.6vw, 17px); font-weight: 600; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 0 24px rgba(224, 145, 90, .18); }
.pill:hover { background: #FFF4DF; }
.quiet { max-width: 34ch; color: var(--mist); font-size: 13px; text-wrap: balance; }
/* The words read at least 4.5:1 at any time of day, even over the fire or the brightest of the day (front.test.js works
   it out every quarter of an hour), in soft shade with no edge anywhere, never a dark pill for each line: a shade behind
   the middle, and a fade up from the foot behind the footer. Where the words are, each is as dark as the Sign in
   button's background (.72); from there it eases out to nothing. The middle's has two forms on the day's clock (below),
   and one of them is always whole, so the words never lose it:
   - .words::before, at night: a soft oval just round the words, 1.8 times as wide and 2.5 times as tall (corners at
     .685 of its radius, even dark to 70%). The night sky hides it, and the town beyond the words looks as it always
     has.
   - .words::after, by day, dawn and dusk: a haze through the words' height, seven times as wide as them and 2.2 times as
     tall (corners at .477, even dark to 51%), so on a screen it has no edge to see, only the golden sky over it and the
     town under it.
   They change places in the dark, from 2:30 to 4:30 and from 20:30 to 22:30, when neither shows. The footer's covers the
   footer evenly and fades out over the 88px above it. Each line has a soft shadow of its own too. */
.words::before, .words::after { content: ''; position: absolute; z-index: -1; pointer-events: none; }
.words::before { inset: -75% -40%; animation-name: nightshade;
  background: radial-gradient(closest-side, rgba(14, 11, 9, .72) 70%, rgba(14, 11, 9, .69) 73.75%, rgba(14, 11, 9, .61) 77.5%, rgba(14, 11, 9, .49) 81.25%,
    rgba(14, 11, 9, .36) 85%, rgba(14, 11, 9, .23) 88.75%, rgba(14, 11, 9, .11) 92.5%, rgba(14, 11, 9, .03) 96.25%, transparent); }
.words::after { inset: -60% -300%; animation-name: haze;
  background: radial-gradient(closest-side, rgba(14, 11, 9, .72) 51%, rgba(14, 11, 9, .69) 57.13%, rgba(14, 11, 9, .61) 63.25%, rgba(14, 11, 9, .49) 69.38%,
    rgba(14, 11, 9, .36) 75.5%, rgba(14, 11, 9, .23) 81.63%, rgba(14, 11, 9, .11) 87.75%, rgba(14, 11, 9, .03) 93.88%, transparent); }
@keyframes nightshade { 0%, 14.58% { opacity: 1; } 18.75%, 85.42% { opacity: 0; } 89.58%, 100% { opacity: 1; } }
@keyframes haze { 0%, 10.42% { opacity: 0; } 14.58%, 89.58% { opacity: 1; } 93.75%, 100% { opacity: 0; } }
.fine::before { content: ''; position: absolute; top: -88px; right: 0; bottom: 0; left: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(14, 11, 9, .72) calc(100% - 88px), rgba(14, 11, 9, .69) calc(100% - 77px), rgba(14, 11, 9, .61) calc(100% - 66px),
    rgba(14, 11, 9, .49) calc(100% - 55px), rgba(14, 11, 9, .36) calc(100% - 44px), rgba(14, 11, 9, .23) calc(100% - 33px), rgba(14, 11, 9, .11) calc(100% - 22px),
    rgba(14, 11, 9, .03) calc(100% - 11px), transparent); }
.hbrand, .what, .quiet, .fine nav a, .bug summary, .fine > p { text-shadow: 0 1px 2px rgba(14, 11, 9, .55), 0 0 18px rgba(14, 11, 9, .45); }
/* The middle's shade is wider than a phone: the middle clips it at the screen's sides (.hero overflow-x), so the page never
   scrolls sideways. A browser too old to clip just hides what's past the sides. */
@supports not (overflow: clip) { body.front { overflow-x: hidden; } }

/* The moon and the sun (item 201): the Harrox moon is the moon (the logo, public/icons.js mark), with a warm glow, and by day a
   plain sun crosses where it did. They keep to the open sky between the top bar and Harrox: .orbit is that room,
   whatever the screen (.hero::after takes as much again under the words, so they stay in the middle), and nothing of
   them shows outside it, so they never touch Sign in, the words or the footer. Each rises at the left, arcs over and
   sets at the right: .arc carries it across at an even pace and .lift up and down, easing as a thrown ball does, so
   together they draw the arc. Each is sized to the room it has (--size); with too little room (a phone on its side),
   they wait. The moon is up from 19:00 to 5:00, highest at midnight; the sun from 6:00 to 18:00, highest at noon. */
.orbit { position: relative; flex: 1 1 0; align-self: stretch; margin: -24px -20px 0; overflow: hidden; overflow: clip; container-type: size; }
.hero::after { content: ''; flex: 1 1 0; margin-bottom: -24px; }
.arc { --size: min(clamp(52px, 17vw, 80px), 58cqh); --high: max(10px, 7cqh); --low: max(var(--high), calc(100cqh - var(--size) - max(6px, 4cqh)));
  position: absolute; top: 0; left: 0; width: var(--size); height: var(--size); opacity: 0; }
.lift { display: block; width: 100%; height: 100%; }
.orbit .moon { display: block; width: 100%; height: 100%; opacity: .72; filter: drop-shadow(0 0 12px rgba(224, 145, 90, .3)); }
.sun { display: block; width: 100%; height: 100%; border-radius: 50%; opacity: .85;
  background: radial-gradient(closest-side, #FFF1D6 0 44%, rgba(255, 222, 164, .5) 52%, rgba(242, 166, 106, .15) 74%, transparent); }
.moonarc { animation-name: moon-x; }
.moonarc .lift { animation-name: moon-y; }
.sunarc { animation-name: sun-x; }
.sunarc .lift { animation-name: sun-y; }
@keyframes moon-x { 0%, 100% { transform: translateX(calc(50cqw - var(--size) / 2)); opacity: 1; } 18.75% { opacity: 1; }
  20.83% { transform: translateX(calc(100cqw - var(--size) / 2)); opacity: 0; } 79.17% { transform: translateX(calc(var(--size) / -2)); opacity: 0; }
  81.25% { opacity: 1; } }
@keyframes moon-y { 0%, 100% { transform: translateY(var(--high)); animation-timing-function: cubic-bezier(.33, 0, .67, .33); }
  20.83%, 79.17% { transform: translateY(var(--low)); animation-timing-function: cubic-bezier(.33, .67, .67, 1); } }
@keyframes sun-x { 0%, 25% { transform: translateX(calc(var(--size) / -2)); opacity: 0; } 27.08%, 72.92% { opacity: 1; }
  50% { transform: translateX(calc(50cqw - var(--size) / 2)); } 75%, 100% { transform: translateX(calc(100cqw - var(--size) / 2)); opacity: 0; } }
@keyframes sun-y { 0%, 25% { transform: translateY(var(--low)); animation-timing-function: cubic-bezier(.33, .67, .67, 1); }
  50% { transform: translateY(var(--high)); animation-timing-function: cubic-bezier(.33, 0, .67, .33); } 75%, 100% { transform: translateY(var(--low)); } }
@container (max-height: 64px) { .arc { display: none; } }

/* The footer: Terms, Privacy, Rules, Status and Report a bug, each its own 44px to tap, and whose it is. */
.fine { padding: 4px 16px max(12px, env(safe-area-inset-bottom)); text-align: center; color: var(--mist); font-size: 12.5px; }
.fine nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; max-width: 560px; margin: 0 auto; }
.fine > p { width: fit-content; margin: 0 auto; padding: 0 6px; }
.fine nav a, .bug summary { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); padding: 0 6px;
  color: rgba(239, 227, 200, .78); text-decoration: none; cursor: pointer; }
.fine nav a:hover, .bug summary:hover { color: var(--gold); }
.fine nav i { font-style: normal; opacity: .6; }
.bug summary { list-style: none; }
.bug summary::-webkit-details-marker { display: none; }
/* Report a bug, with no email to send it to: where it is inside Harrox, in a small card over the footer. */
.bug p { position: absolute; left: 16px; right: 16px; bottom: calc(100% - 4px); max-width: 360px; margin: 0 auto; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: #221C17; color: var(--text); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }

/* ---- The way in, in a popup over the front page (gate.js openEntry): a real dialog, with the page behind it still. On
   a phone it fits the part of the screen above the keyboard (--entry-h and --entry-top, from the visual viewport) and
   scrolls inside itself, so what's being typed stays in view. ---- */
:root:has(.entry[open]), :root:has(.entry[open]) body { overflow: hidden; }
.entry { position: fixed; z-index: 10; inset: 0; width: 100%; height: var(--entry-h, 100%); max-width: none; max-height: none; margin: 0;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); border: 0; background: transparent; color: var(--text);
  overflow-y: auto; overscroll-behavior: contain; transform: translateY(var(--entry-top, 0px)); }
.entry[open] { display: flex; }
.entry::backdrop { background: rgba(8, 6, 5, .76); }
.entrycard { position: relative; width: 100%; max-width: 400px; margin: auto; display: flex; flex-direction: column; gap: 14px;
  padding: 20px 18px 18px; border: 1px solid rgba(239, 227, 200, .14); border-radius: 22px;
  background: linear-gradient(160deg, var(--bg-top), var(--bg-bottom)); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
@media (prefers-reduced-motion: no-preference) { .entry[open] .entrycard { animation: entry-in .2s ease-out; } }
@keyframes entry-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.entryx { position: absolute; top: 6px; right: 6px; width: var(--tap); height: var(--tap); padding: 0; display: grid; place-items: center;
  border-radius: 50%; background: none; color: var(--mist); }
.entryx:hover { color: var(--text); }
.entryx .i { width: 20px; height: 20px; }
.step { display: flex; flex-direction: column; gap: 14px; }
.step[hidden] { display: none; }
.step > h2 { margin: 0 clamp(26px, 10vw, 40px); text-align: center; font-size: clamp(18px, 5.8vw, 21px); font-weight: 600; line-height: 1.3; text-wrap: balance; }
/* The card is the popup itself: the forms sit flat in it. */
.entry form { padding: 0; border: 0; background: none; }

/* Making the account, and two-step sign-in's code: the app's own fields (core/accounts/web/wayin.js), in the access page's look.
   An account with a security key gets its key's form and its code's, one showing at a time, each with its own line. */
.entry .doorcard { display: flex; flex-direction: column; gap: 12px; }
.entry .doorcard[hidden], .step > .lede[hidden] { display: none; }
.fld { display: flex; flex-direction: column; gap: 6px; color: var(--mist); font-size: 13px; }
.fld small, .uhint, .nrule { color: var(--mist); font-size: 12px; line-height: 1.4; }
.uhint { margin-top: -6px; }
:is(.uhint, .nrule).bad { color: var(--bad); }
.entry .doorcard input:not([type="checkbox"]) { font: 16px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: normal; text-transform: none; }
.entry input[aria-invalid="true"] { border-color: var(--bad); }
.pwtips { display: grid; gap: 5px; margin: -4px 0 0; padding: 0; list-style: none; color: var(--mist); font-size: 13px; }
.pwtips li { display: flex; align-items: baseline; gap: 8px; }
.pwtips li[data-tip]::before { content: ''; flex: none; width: 9px; height: 9px; border: 1.5px solid currentColor; border-radius: 50%; transform: translateY(1px); }
.pwtips li.ok { color: var(--text); }
.pwtips li.ok::before { border-color: var(--gold); background: var(--gold); }
.pwtips li.note { padding-left: 17px; }
.entry .doorcard > p { font-size: 14px; line-height: 1.45; }
.entry .muted { color: var(--mist); }
.entry .label { color: var(--mist); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.entry .error { color: var(--bad); font-size: 14px; }
.entry .error:empty { display: none; }
.agree { position: relative; display: flex; align-items: flex-start; gap: 10px; min-height: var(--tap); color: var(--text); font-size: 14px; line-height: 1.45; }
.agree input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; padding: 0; accent-color: var(--gold); }
.agree a { position: relative; white-space: nowrap; }
.agree a::after { content: ''; position: absolute; inset: -13px -4px; }
.doorlink { text-align: center; }
.doorlink button { position: relative; min-height: var(--tap); padding: 0 10px; background: none; color: var(--gold); font-weight: 600; }
/* Crisis help comes first, at the top, in Arcane's blue as in the app. Its links are 44px to tap. */
.crisis { padding: 14px 16px; border: 1px solid #8E9BE8; border-radius: 16px; background: rgba(142, 155, 232, .08); font-size: 14px; line-height: 1.45;
  scroll-margin-top: 16px; }
.crisis[hidden] { display: none; }
.crisis p + p, .crisis ul + p { margin-top: 8px; }
.crisis ul { margin: 6px 0; padding-left: 18px; }
.crisis a { position: relative; color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.crisis a::after { content: ''; position: absolute; inset: -12px -4px; }
.invited { padding: 10px 14px; border: 1px solid rgba(210, 179, 108, .35); border-radius: 14px; background: rgba(210, 179, 108, .07); font-size: 14px; line-height: 1.45; }
.invited[hidden] { display: none; }
/* Crisis help and a friend's invite sit at the top, under the ✕; with neither showing, they take no room. */
.entrynotes { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }
.entrynotes:not(:has(> :not([hidden]))) { display: none; }

/* A computer: a little more room around everything. */
@media (min-width: 760px) {
  .top { padding: 18px 28px 0; }
  .hero { gap: 18px; }
  .what { max-width: 40ch; }
  .quiet { max-width: none; }
  .entrycard { padding: 26px 26px 22px; }
  .arc { --size: min(clamp(84px, 7.5vw, 124px), 58cqh); }
}

/* The preview, for owners and admins (Server › Codes): a note across the top, saying whether it's live yet. */
.prevbar { position: relative; z-index: 2; padding: max(10px, env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid rgba(210, 179, 108, .4);
  background: rgba(23, 19, 16, .94); color: var(--gold); text-align: center; font-size: 12.5px; line-height: 20px; }
.prevbar a { display: inline-flex; align-items: center; min-height: var(--tap); margin: -12px 0 -12px 4px; padding: 0 4px; font-weight: 600; white-space: nowrap; }
.prevbar ~ .top { padding-top: 10px; }

/* Status: is Harrox up, part by part. */
.status .answer { margin: 4px 0 18px; font-size: 18px; }
.legal .parts { margin: 0 0 16px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.legal .parts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 14px 16px; }
.legal .parts li + li { border-top: 1px solid var(--line); }
.parts small { display: block; color: var(--mist); font-size: 13px; }
.state { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap; }
.state i { width: 9px; height: 9px; border-radius: 50%; background: #7BC48F; }
.state.resting i { background: #E0B85A; }

/* Where an under-18 lives (core/accounts/web/region.js): the question shows once the birth year says under 18, in the fields' look. */
.fld[hidden] { display: none; }
.entry .doorcard select { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--field);
  color: var(--text); font: 16px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.entry select[aria-invalid="true"] { border-color: var(--bad); }
