/* OurBeam — shared styles */
:root {
  --ink: #030806;
  --ink-2: #06120c;
  --ink-3: #0a1c13;
  --panel: #0c1a13;
  --panel-2: #12251b;
  --line: rgba(190, 255, 220, .13);
  --line-strong: rgba(190, 255, 220, .26);
  --beam: #39f58a;
  --beam-2: #b4ff4a;
  --beam-deep: #0c9c57;
  --text: #f1fff7;
  --muted: #a9c4b5;
  --faint: #7f9c8c;
  --pop: #ffd24a;
  --coral: #ff6d5a;
  --sky: #63d8ff;
  --violet: #b49bff;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius-xl: clamp(28px, 5vw, 72px);
  --radius-lg: clamp(20px, 3vw, 44px);
  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; background: var(--ink); overflow-x: clip; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 clamp(16px, 1.2vw, 18px)/1.55 var(--body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--beam-2); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link {
  position: fixed; top: 10px; left: 50%; transform: translate(-50%, -200%); z-index: 100;
  background: var(--beam); color: #03140b; padding: 10px 18px; border-radius: 999px; font-weight: 700;
}
.skip-link:focus { transform: translate(-50%, 0); }

/* Ambient background */
.sky {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(90vw 60vh at 50% -10%, rgba(30, 190, 110, .34), transparent 70%),
    linear-gradient(180deg, #04100a 0%, #020604 70%);
}
#dust { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Display type */
.display {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.035em;
  line-height: .98;
}
.h-xl { font-size: clamp(2.35rem, 6.6vw, 6.1rem); }
.h-lg { font-size: clamp(1.8rem, 3.5vw, 3.35rem); }
.h-md { font-size: clamp(1.35rem, 2.2vw, 2rem); }
.grad-text {
  background: linear-gradient(95deg, var(--beam) 5%, var(--beam-2) 60%, #efffb0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.5; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  border: 0; border-radius: 16px;
  font-weight: 650; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease-out), box-shadow .25s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--beam); color: #03140b; }
.btn-primary:hover { background: #63ffa6; box-shadow: 0 10px 44px rgba(57, 245, 138, .45); }
.btn-ghost { background: rgba(255, 255, 255, .07); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, .13); }
.btn-lg { min-height: 64px; padding: 18px 34px; font-size: 1.14rem; border-radius: 20px; }
.btn svg { width: 1.25em; height: 1.25em; flex: none; }

/* Navigation */
.nav {
  position: fixed; top: 14px; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 0 var(--gutter); pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-left { justify-self: start; }
.nav-main { justify-self: center; }
.nav-auth { justify-self: end; }
.nav-pill {
  display: flex; align-items: center; gap: 4px; height: 50px; padding: 0 6px;
  background: #000;
  border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line), 0 12px 34px rgba(0, 0, 0, .35);
}
.brand { display: inline-flex; align-items: center; gap: 9px; padding: 0 14px 0 8px; font: 800 1rem var(--display); letter-spacing: -.03em; text-decoration: none; }
.brand svg { width: 32px; height: 32px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 8px 14px; border-radius: 9px; text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--muted);
  transition: color .2s, background .2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .08); }
.nav-links .menu-rooms, .nav-links .menu-login { display: none; }
.rbtn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 9px; text-decoration: none; font-size: .93rem; font-weight: 600; color: var(--text); background: rgba(255, 255, 255, .08); white-space: nowrap; transition: background .2s; }
.rbtn:hover { background: rgba(255, 255, 255, .16); }
.rbtn svg { width: 16px; height: 16px; flex: none; color: var(--beam); }
.nav-discord { display: inline-flex; align-items: center; gap: 8px; height: 38px; margin-left: 4px; padding: 0 15px; border-radius: 9px; background: #5865f2; color: #fff; text-decoration: none; font-size: .93rem; font-weight: 650; white-space: nowrap; transition: background .2s; }
.nav-discord:hover { background: #4752c4; }
.nav-discord svg { width: 18px; height: 18px; flex: none; }
.lang { position: relative; margin-left: 2px; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; font-size: .9rem; font-weight: 650; letter-spacing: .02em; transition: background .2s; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .17); }
.lang-btn svg { width: 17px; height: 17px; flex: none; }
.lang-menu { position: absolute; top: calc(100% + 14px); right: -6px; z-index: 2; min-width: 172px; margin: 0; padding: 6px; list-style: none; background: #0a1510; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line-strong), 0 18px 44px rgba(0, 0, 0, .55); }
.lang-menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); text-align: left; font-weight: 550; }
.lang-menu button:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.lang-menu button[aria-current="true"] { color: var(--beam); }
.lang-menu button[aria-current="true"]::after { content: "\2713"; }
.login { padding: 8px 14px; text-decoration: none; font-size: .95rem; font-weight: 550; border-radius: 9px; }
.login:hover { background: rgba(255, 255, 255, .08); }
.signup { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; background: var(--beam); color: #03140b; text-decoration: none; font-size: .95rem; font-weight: 700; border-radius: 9px; white-space: nowrap; transition: background .2s, box-shadow .2s; }
.signup:hover { background: #63ffa6; box-shadow: 0 6px 26px rgba(57, 245, 138, .45); }
.nav-toggle { display: none; width: 38px; height: 38px; background: rgba(255, 255, 255, .08); border: 0; border-radius: 9px; place-items: center; }
.nav-toggle svg { width: 20px; height: 20px; }
@media (max-width: 1260px) {
  .nav { display: flex; justify-content: space-between; }
  .nav-left { display: none; }
  .nav-links {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0; min-width: 250px;
    flex-direction: column; align-items: stretch; padding: 10px;
    background: rgba(8, 20, 14, .97); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line), 0 18px 44px rgba(0, 0, 0, .5);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .2s var(--ease-out);
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 13px 16px; font-size: 1.05rem; }
  .nav-links .menu-rooms { display: block; }
  .nav-toggle { display: grid; }
}
@media (max-width: 860px) { .login { display: none; } .nav-links .menu-login { display: block; } }
@media (max-width: 560px) {
  .brand { padding-right: 4px; }
  .nav-discord span { display: none; }
  .nav-discord { padding: 0 10px; }
  .signup { padding: 0 14px; }
  .lang-menu { left: -6px; right: auto; }
}

/* Footer */
.footer {
  position: relative; overflow: hidden; margin-top: clamp(60px, 9vw, 120px);
  padding: clamp(48px, 7vw, 90px) var(--gutter) 28px;
  background: linear-gradient(180deg, rgba(10, 30, 20, .8), #020604);
  border-top: 1px solid var(--line);
}
.footer-grid { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 36px; }
.footer h2 { font: 700 .82rem var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--beam); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer li a { color: var(--muted); text-decoration: none; }
.footer li a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer-about { max-width: 34ch; color: var(--muted); margin-top: 12px; }
.footer .brand { padding-left: 0; font-size: 1.15rem; }
.wordmark {
  display: block; margin: clamp(36px, 6vw, 70px) auto 0; max-width: 1320px; text-align: center;
  font: 900 clamp(3rem, 16.2vw, 15rem)/.86 var(--display); letter-spacing: -.06em;
  background: linear-gradient(180deg, rgba(57, 245, 138, .55), rgba(57, 245, 138, .02) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none;
}
.footer-base { max-width: 1320px; margin: 16px auto 0; color: var(--faint); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-col-brand { grid-column: 1 / -1; } }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(38px) scale(.985); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }

/* Character animation */
.char { overflow: visible; }
.char .eyelid { transform-box: fill-box; transform-origin: center; animation: blink 5.2s infinite; animation-delay: var(--d, 0s); }
.char .bob { animation: bob 3.6s ease-in-out infinite; animation-delay: var(--d, 0s); transform-origin: 50% 100%; transform-box: fill-box; }
.char.talking .mouth { transform-box: fill-box; transform-origin: center; animation: talk .36s ease-in-out infinite alternate; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.06); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3.5%) rotate(1.2deg); } }
@keyframes talk { from { transform: scaleY(.45); } to { transform: scaleY(1.2); } }

/* Interior pages */
.page { padding: clamp(48px, 7vw, 96px) var(--gutter) 0; }
.page-head { max-width: 1040px; margin: 0 auto clamp(36px, 5vw, 64px); text-align: center; }
.page-head .lede { max-width: 60ch; margin: 22px auto 0; }
.eyebrow { display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px; background: rgba(57, 245, 138, .13); color: var(--beam); font-weight: 650; font-size: .88rem; letter-spacing: .03em; }

/* Long-form legal text */
.prose-wrap { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); align-items: start; }
.toc { position: sticky; top: 24px; padding: 18px; background: rgba(12, 26, 19, .7); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.toc h2 { font: 700 .78rem var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .93rem; line-height: 1.3; }
.toc a:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.prose { padding: clamp(24px, 4vw, 52px); background: rgba(10, 22, 16, .78); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line); }
.prose h2 { font: 700 clamp(1.2rem, 1.8vw, 1.5rem)/1.2 var(--display); letter-spacing: -.02em; margin: 2.2em 0 .7em; scroll-margin-top: 100px; }
.prose h2:first-of-type { margin-top: .9em; }
.prose p, .prose ul { color: #cfe2d7; margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }
.prose a { color: var(--beam); }
.prose strong { color: var(--text); }
.meta { color: var(--faint); font-size: .95rem; }
.legal-note { margin-top: 12px; color: var(--beam); font-size: .95rem; font-weight: 600; }
@media (max-width: 860px) { .prose-wrap { grid-template-columns: 1fr; } .toc { position: static; } }

/* FAQ */
.faq-wrap { max-width: 900px; margin: 0 auto; }
.faq-group { margin-bottom: clamp(32px, 5vw, 54px); }
.faq-group > h2 { font: 700 clamp(1.1rem, 1.7vw, 1.4rem) var(--display); letter-spacing: -.02em; margin: 0 0 14px 6px; color: var(--beam); }
.faq { background: rgba(12, 26, 19, .78); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 10px; transition: background .2s, box-shadow .2s; }
.faq[open] { background: rgba(19, 44, 31, .85); box-shadow: inset 0 0 0 1px var(--line-strong); }
.faq summary { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 20px 24px; font-weight: 650; font-size: 1.08rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 13px; height: 13px; border-right: 2.5px solid var(--beam); border-bottom: 2.5px solid var(--beam); transform: rotate(45deg) translate(-2px, -2px); transition: transform .3s var(--ease-out); }
.faq[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq p { padding: 0 24px 22px; color: #cfe2d7; }
.faq a { color: var(--beam); }

/* About */
.about-hero { position: relative; max-width: 1240px; margin: 0 auto; padding: clamp(28px, 5vw, 64px); border-radius: var(--radius-xl); background: linear-gradient(150deg, rgba(57, 245, 138, .22), rgba(10, 30, 20, .5) 55%); box-shadow: inset 0 0 0 1px var(--line); display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 60px); align-items: center; }
.about-hero h2 { margin-bottom: 18px; }
.about-hero p + p { margin-top: 1em; }
.about-hero p { color: #d3e7dc; }
.about-cast { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; }
.value-grid { max-width: 1240px; margin: clamp(20px, 3vw, 32px) auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px); }
.value { padding: clamp(24px, 3vw, 38px); border-radius: var(--radius-lg); background: rgba(12, 26, 19, .8); box-shadow: inset 0 0 0 1px var(--line); }
.value svg { width: 74px; height: 74px; margin-bottom: 20px; }
.value h3 { font: 700 1.2rem/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 10px; }
.value p { color: var(--muted); }
.page-cta { max-width: 1240px; margin: clamp(20px, 3vw, 32px) auto 0; padding: clamp(32px, 5vw, 62px); border-radius: var(--radius-lg); text-align: center; background: linear-gradient(120deg, var(--beam-deep), #0a4f30 60%, #0b2f20); }
.page-cta p { margin: 14px auto 24px; max-width: 48ch; color: #dcfbe9; }
@media (max-width: 860px) {
  .about-hero, .value-grid { grid-template-columns: 1fr; }
}

/* Auth */
.auth-body { min-height: 100vh; min-height: 100dvh; }
.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
.auth-form-side { display: flex; flex-direction: column; justify-content: center; padding: 96px clamp(16px, 6vw, 96px) 40px; }
.auth-card { width: 100%; max-width: 440px; margin: 0 auto; }
.auth-card h1 { font: 800 clamp(1.8rem, 3vw, 2.7rem)/1.02 var(--display); letter-spacing: -.035em; text-transform: uppercase; }
.auth-card > p { color: var(--muted); margin: 14px 0 26px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; font-size: .94rem; margin-bottom: 7px; }
.input-wrap { position: relative; }
.field input {
  width: 100%; height: 54px; padding: 0 16px; background: rgba(255, 255, 255, .055); border: 0; border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line-strong); transition: box-shadow .2s, background .2s;
  font-size: 1rem;
}
.field input:focus { outline: none; background: rgba(57, 245, 138, .07); box-shadow: inset 0 0 0 2px var(--beam); }
.field.has-error input { box-shadow: inset 0 0 0 2px var(--coral); }
.field .err { display: none; color: #ff9a8c; font-size: .88rem; margin-top: 6px; }
.field.has-error .err { display: block; }
.pw-toggle { position: absolute; top: 7px; right: 7px; height: 40px; padding: 0 12px; background: transparent; border: 0; border-radius: 10px; color: var(--muted); font-size: .88rem; font-weight: 600; }
.pw-toggle:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.field .pw-input { padding-right: 76px; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 9px; }
.strength i { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); transition: background .25s; }
.strength[data-score="1"] i:nth-child(-n+1) { background: var(--coral); }
.strength[data-score="2"] i:nth-child(-n+2) { background: var(--pop); }
.strength[data-score="3"] i:nth-child(-n+3) { background: var(--beam-2); }
.strength[data-score="4"] i { background: var(--beam); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; font-size: .94rem; color: var(--muted); }
.check input { flex: none; width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--beam); }
.check a, .auth-switch a, .auth-row a { color: var(--beam); }
.check.has-error { color: #ff9a8c; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -2px 0 18px; font-size: .94rem; flex-wrap: wrap; }
.auth-row .check { margin: 0; }
.auth-card .btn { width: 100%; }
.auth-switch { margin-top: 20px; text-align: center; color: var(--muted); }
.notice { display: none; margin-top: 14px; padding: 12px 15px; border-radius: 12px; background: rgba(255, 210, 74, .12); box-shadow: inset 0 0 0 1px rgba(255, 210, 74, .35); color: #ffe7a1; font-size: .94rem; }
.notice.show { display: block; }
.auth-art { position: relative; overflow: hidden; margin: 12px 12px 12px 0; border-radius: var(--radius-lg); background: linear-gradient(160deg, #0c3a25, #06140d 60%); display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(20px, 3vw, 44px); }
.auth-art .art-beam { position: absolute; top: -10%; left: 50%; width: 130%; height: 90%; transform: translateX(-50%); background: conic-gradient(from 160deg at 50% 0, transparent 0 8deg, rgba(90, 255, 165, .3) 20deg, transparent 40deg); }
.auth-art .art-screen { position: relative; margin-bottom: auto; margin-top: clamp(50px, 7vw, 80px); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px var(--line-strong); }
.auth-art canvas { width: 100%; aspect-ratio: 16 / 9; }
.auth-art .art-cast { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-items: end; margin-top: 24px; }
.auth-art blockquote { position: relative; margin: 0 0 18px; font: 800 clamp(1.3rem, 2.3vw, 2.1rem)/1.06 var(--display); text-transform: uppercase; letter-spacing: -.03em; }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 60px var(--gutter) 60px; }
.notfound svg { width: 190px; margin: 0 auto 26px; }
.notfound p { color: var(--muted); margin: 18px auto 28px; max-width: 42ch; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* OB logo and flags */
.mark { display: inline-block; font: 900 1em/1 var(--display); letter-spacing: -.02em; padding-right: .02em; background: linear-gradient(135deg, #1fd16f 0%, #7dff9c 55%, #d6ffb0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand { padding: 0 12px 0 10px; }
.logo { display: inline-flex; align-items: flex-start; line-height: 1; }
.logo .tv { font: 900 .46em/1 var(--display); letter-spacing: .03em; margin: .08em 0 0 .12em; color: #fff; }
.brand .logo { font-size: 1.12rem; }
.brand .logo .tv, .home-link .logo .tv { font-size: .56rem; }
.footer .brand .logo { font-size: 1.5rem; }
.footer .brand .logo .tv { font-size: .63rem; }
.app-bar .logo { font-size: 1em; margin-right: 2px; }
.taskbar .logo { font-size: clamp(12px, 1.4vw, 16px); }
.app-bar .logo .tv, .taskbar .logo .tv { display: none; }
.footer .brand { padding-left: 0; }
.flag { width: 22px; height: 15px; flex: none; border-radius: 3px; }
.lang-flag { display: inline-flex; }
.lang-btn { gap: 8px; }
.lang-menu button { justify-content: flex-start; gap: 11px; }
.lang-menu button::after { margin-left: auto; }
@media (max-width: 560px) { .lang-code { display: none; } .lang-btn { padding: 0 10px; } }

/* Top bar: round on top, smaller and flatter after scrolling */
.nav { animation: nav-in .7s var(--ease-out) both; transition: top .45s var(--ease-out), padding .45s var(--ease-out), background .45s, border-radius .45s var(--ease-out), box-shadow .45s; }
@keyframes nav-in { from { opacity: 0; transform: translateY(-18px); } }
.nav-pill { transition: height .4s var(--ease-out), border-radius .4s var(--ease-out), background .4s, box-shadow .4s, padding .4s var(--ease-out); }
.nav-pill .rbtn, .nav-pill .nav-discord, .nav-pill .lang-btn, .nav-pill .signup, .nav-pill .nav-toggle, .nav-pill .login, .nav-links a {
  transition: height .4s var(--ease-out), border-radius .4s var(--ease-out), padding .4s var(--ease-out), font-size .4s var(--ease-out), background .2s, color .2s;
}
.brand .logo { transition: font-size .4s var(--ease-out); }
.nav.scrolled { top: 8px; }
.nav.scrolled .nav-pill { height: 42px; border-radius: 12px; background: #000; box-shadow: inset 0 0 0 1px var(--line), 0 8px 22px rgba(0, 0, 0, .4); }
.nav.scrolled .brand .logo { font-size: 1rem; }
.nav.scrolled .rbtn, .nav.scrolled .nav-discord, .nav.scrolled .lang-btn, .nav.scrolled .signup, .nav.scrolled .nav-toggle { height: 32px; border-radius: 9px; font-size: .86rem; }
.nav.scrolled .rbtn, .nav.scrolled .nav-discord { padding: 0 12px; }
.nav.scrolled .nav-toggle { width: 32px; }
.nav.scrolled .signup { padding: 0 14px; }
.nav.scrolled .nav-links a, .nav.scrolled .login { padding: 5px 11px; border-radius: 9px; font-size: .88rem; }
.nav.scrolled .lang-menu { top: calc(100% + 10px); }
@media (max-width: 1260px) { .nav.scrolled .nav-links { top: calc(100% + 8px); } }
@media (prefers-reduced-motion: reduce) { .nav { animation: none; } }

/* small home link on pages without the top bar */
.home-link { position: fixed; top: 16px; left: var(--gutter); z-index: 50; display: inline-flex; padding: 6px 8px; border-radius: 12px; text-decoration: none; transition: background .2s; }
.home-link:hover { background: rgba(255, 255, 255, .08); }
.home-link .logo { font-size: 1.2rem; }

/* a different look for sign up */
.auth-art.art-blue { background: linear-gradient(160deg, #0b2a4a, #060f1c 60%); }
.auth-art.art-blue .art-beam { background: conic-gradient(from 160deg at 50% 0, transparent 0 8deg, rgba(99, 216, 255, .3) 20deg, transparent 40deg); }

/* accounts */
.notice.ok { background: rgba(57, 245, 138, .12); box-shadow: inset 0 0 0 1px rgba(57, 245, 138, .4); color: #c8ffe0; }
.account-name { max-width: 150px; padding: 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; font-weight: 600; }
.logout { height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .1); color: var(--text); font-size: .93rem; font-weight: 650; white-space: nowrap; transition: height .4s var(--ease-out), background .2s; }
.logout:hover { background: rgba(255, 255, 255, .18); }
.logout:disabled { opacity: .6; cursor: default; }
.nav.scrolled .logout { height: 32px; font-size: .86rem; }
@media (max-width: 560px) { .account-name { display: none; } }

/* avatars: a character on a coloured circle */
.av { position: relative; display: inline-block; flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--c, #1c6e5c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); transition: width .4s var(--ease-out), height .4s var(--ease-out); }
.av [data-char] { position: absolute; left: 50%; bottom: -14%; width: 90%; transform: translateX(-50%); }
.account-link { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 6px; border-radius: 9px; text-decoration: none; transition: background .2s, height .4s var(--ease-out); }
.account-link:hover { background: rgba(255, 255, 255, .09); }
.account-link .account-name { padding: 0; }
.nav.scrolled .account-link { height: 32px; }
.nav.scrolled .av { width: 26px; height: 26px; }

/* account menu in the top bar */
.nav-auth { position: relative; }
.account-link { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.account-link[aria-expanded="true"] { background: rgba(255, 255, 255, .1); }
.account-caret { width: 7px; height: 7px; margin: 0 2px 3px 2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s var(--ease-out); }
.account-link[aria-expanded="true"] .account-caret { transform: rotate(225deg) translate(-2px, -2px); }
.account-menu { position: absolute; top: calc(100% + 12px); right: 0; z-index: 3; min-width: 230px; padding: 6px; background: #0a1510; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line-strong), 0 18px 44px rgba(0, 0, 0, .55); }
.nav.scrolled .account-menu { top: calc(100% + 10px); }
.account-menu[hidden] { display: none; }
.am-head { margin-bottom: 6px; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); }
.am-head b { display: block; font-size: 1rem; word-break: break-word; }
.am-head span { display: block; margin-top: 2px; color: var(--faint); font-size: .85rem; word-break: break-all; }
.account-menu a, .account-menu button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 600 .95rem var(--body); text-align: left; text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.account-menu a:hover, .account-menu button:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.account-menu svg { width: 18px; height: 18px; flex: none; }
.account-menu .am-out:hover { color: #ff9a8c; }
@media (max-width: 560px) { .account-menu { position: fixed; top: 70px; right: var(--gutter); left: var(--gutter); } .nav.scrolled .account-menu { top: 58px; } }
/* small phones: keep the whole top bar inside the screen; Discord moves into the menu */
.nav-links .menu-discord { display: none; }
@media (max-width: 480px) {
  .nav-discord { display: none; }
  .nav-links .menu-discord { display: block; }
}
@media (max-width: 400px) {
  .nav { gap: 6px; }
  .nav-pill { padding: 0 4px; gap: 2px; }
  .brand { padding: 0 6px 0 6px; }
  .brand .logo { font-size: 1rem; }
  .lang-btn { padding: 0 9px; }
  .signup { padding: 0 12px; }
}