/* Bebas Neue (SIL OFL 1.1, web/fonts/BebasNeue-OFL.txt), served from this site */
@font-face { font-family: "Bebas Neue"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/bebas-neue-latin-400-normal.woff2") format("woff2"); }
/* FRM-01..04 "Frame" page style (Maker › UI theme › Page style; default). Dark grid with cross marks, a full-bleed title
   screen with a menu bar along the bottom, condensed display type, a terminal wipe between pages and parts that rise in.
   Everything is scoped to body:not([data-pstyle=classic]), so Classic keeps the old look. */
:root { --fr-disp: "Bebas Neue", "Chakra Petch", "Noto Sans Thai", sans-serif; --fr-ease: cubic-bezier(.165, .84, .44, 1);
  --fr-grid: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 96px 96px,
             linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 96px 96px;
  --fr-cross: radial-gradient(circle, rgba(255,255,255,.16) 1px, transparent 1.6px) -48px -48px / 96px 96px; }
#login .lg-gridfx, #login .lg-hud, #login .lg-hero, #login .lg-bar { display: none; }

/* ---------------------------------------------------------------- login: title screen */
body:not([data-pstyle=classic]) #login { display: block; background-color: #000; background-size: cover; background-position: center; overflow: hidden; }
body:not([data-pstyle=classic]) #login > .keyart { position: absolute; inset: 0; z-index: 0; }
body:not([data-pstyle=classic]) #login.has-art::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(0,0,0,.05), rgba(0,0,0,.65) 75%), linear-gradient(transparent 55%, rgba(0,0,0,.85)); }
body:not([data-pstyle=classic]) #login #lg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
body:not([data-pstyle=classic]) #login .lg-gridfx { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--fr-cross), var(--fr-grid); opacity: .7; }
body:not([data-pstyle=classic]) #login .lg-hud { display: flex; position: absolute; top: 0; left: 0; right: 0; z-index: 3; justify-content: center; gap: 28px;
  padding: 18px 24px; font: 12px "Share Tech Mono", monospace; letter-spacing: .25em; color: rgba(255,255,255,.55); }
body:not([data-pstyle=classic]) #login .lg-hud span + span { border-left: 1px solid rgba(255,255,255,.25); padding-left: 28px; }

body:not([data-pstyle=classic]) #login .lg-hero { display: block; position: absolute; left: 0; right: 0; top: 50%; z-index: 2; transform: translateY(-58%);
  text-align: center; cursor: pointer; transition: opacity .5s, transform .6s var(--fr-ease); padding: 0 16px; }
.lg-catch { margin: 0 0 6px; font: 300 clamp(15px, 1.7vw, 24px) "Noto Sans Thai", sans-serif; letter-spacing: .45em; color: #e8e8e8; min-height: 1em; opacity: 0; }
.lg-big { margin: 0; font: 400 clamp(68px, 12vw, 184px)/.9 var(--fr-disp); letter-spacing: .03em; color: #f4f4f4; text-shadow: 0 6px 40px rgba(0,0,0,.6); opacity: 0; }
.lg-sub { margin: 6px 0 0; font: 400 clamp(18px, 2.3vw, 34px) var(--fr-disp); letter-spacing: .75em; text-indent: .75em; color: #d8d8d8; min-height: 1em; opacity: 0; }
.lg-sub:not(:empty)::before, .lg-sub:not(:empty)::after { content: ""; display: inline-block; width: 6vw; max-width: 90px; height: 1px; margin: 0 1.2em; vertical-align: .35em; background: rgba(255,255,255,.4); }
.lg-press { margin-top: 5vh; font: 13px "Share Tech Mono", monospace; letter-spacing: .5em; color: rgba(255,255,255,.7); opacity: 0; }
#login.lg-intro .lg-big { animation: fr-fade 1s ease-in forwards; }
#login.lg-intro .lg-catch { animation: fr-rise2 1.4s var(--fr-ease) 1s forwards; }
#login.lg-intro .lg-sub { animation: fr-fade 1s ease-in 1.5s forwards; }
#login.lg-intro .lg-press { animation: fr-fade .6s ease 2.4s forwards, fr-blink 1.6s ease-in-out 3s infinite; }
#login:not(.lg-intro) .lg-big, #login:not(.lg-intro) .lg-catch, #login:not(.lg-intro) .lg-sub, #login:not(.lg-intro) .lg-press { opacity: 1; }
body:not([data-pstyle=classic]) #login.lg-open .lg-hero { opacity: .14; transform: translateY(-112%) scale(.82); }
body:not([data-pstyle=classic]) #login.lg-open .lg-press { visibility: hidden; }

/* the menu bar along the bottom */
body:not([data-pstyle=classic]) #login .lg-bar { display: flex; position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; justify-content: center; gap: clamp(28px, 6vw, 96px);
  height: 64px; align-items: center; background: #0a0a0a; border-top: 1px solid #1f1f1f; }
.lg-bar a { position: relative; font: 400 24px var(--fr-disp); letter-spacing: .06em; color: #f0f0f0; text-decoration: none; padding: 6px 2px; }
.lg-bar a.hidden { display: none; }
.lg-bar a::before { content: ""; position: absolute; left: 50%; right: 50%; top: -13px; height: 3px; background: var(--accent); transition: left .25s var(--fr-ease), right .25s var(--fr-ease); }
.lg-bar a:hover::before, .lg-bar a.on::before { left: 0; right: 0; }
.lg-bar a:hover, .lg-bar a.on { color: #fff; }

/* the login panel: opens above the bar */
body:not([data-pstyle=classic]) #login > .lg-side { position: absolute; z-index: 5; left: 50%; bottom: 84px; width: min(420px, 92vw); max-height: calc(100vh - 170px);
  transform: translate(-50%, 18px); opacity: 0; visibility: hidden; transition: opacity .35s, transform .45s var(--fr-ease), visibility 0s .45s;
  background: rgba(6,6,6,.94); backdrop-filter: blur(8px); border: 1px solid #2a2a2a; padding: 22px 22px 14px; gap: 12px; }
body:not([data-pstyle=classic]) #login.lg-open > .lg-side { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .35s, transform .45s var(--fr-ease); }
body:not([data-pstyle=classic]) #login > .lg-side::before, body:not([data-pstyle=classic]) #login > .lg-side::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--accent); pointer-events: none; }
body:not([data-pstyle=classic]) #login > .lg-side::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
body:not([data-pstyle=classic]) #login > .lg-side::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
body:not([data-pstyle=classic]) #login .lg-logo { display: none; }
body:not([data-pstyle=classic]) #login .lg-side .card { background: transparent; border: 0; padding: 0; box-shadow: none; }
body:not([data-pstyle=classic]) #login[data-panel=news] #lg-form, body:not([data-pstyle=classic]) #login[data-panel=news] #lg-setup { display: none; }
body:not([data-pstyle=classic]) #login[data-panel=login] #lg-news { display: none; }
body:not([data-pstyle=classic]) #login #lg-go, body:not([data-pstyle=classic]) #login #su-go { font: 400 22px var(--fr-disp); letter-spacing: .12em; border-radius: 0; }
body:not([data-pstyle=classic]) #login .lg-version { font: 11px "Share Tech Mono", monospace; letter-spacing: .2em; }

/* ---------------------------------------------------------------- pages: grid, display type, rise */
body:not([data-pstyle=classic]) .page, body:not([data-pstyle=classic]) #lobby { background: var(--fr-cross), var(--fr-grid), #121212; background-attachment: local; }
body:not([data-pstyle=classic]) .pg-head { background: rgba(8,8,8,.94); border-bottom: 1px solid #262626; padding: 12px 22px; }
body:not([data-pstyle=classic]) .pg-head > b { font: 400 32px/1 var(--fr-disp); letter-spacing: .08em; color: #f2f2f2; min-width: 6ch; }
body:not([data-pstyle=classic]) .pg-head > b::before { content: "_ > "; font: 18px "Share Tech Mono", monospace; letter-spacing: 0; color: var(--accent); vertical-align: .35em; }
body:not([data-pstyle=classic]) .pg-back { font: 400 18px var(--fr-disp); letter-spacing: .08em; background: transparent; border: 1px solid #333; border-radius: 0; }
body:not([data-pstyle=classic]) .fr-rise .pg-head { animation: fr-rise2 .9s var(--fr-ease) both; }
body:not([data-pstyle=classic]) .fr-r { opacity: 0; transform: translateY(2rem); transition: opacity .8s ease var(--fr-d, 0ms), transform 1s var(--fr-ease) var(--fr-d, 0ms); }
body:not([data-pstyle=classic]) .fr-r.fr-in { opacity: 1; transform: none; }

/* the header in a room: condensed menu with the bar above the item you point at */
body:not([data-pstyle=classic]) #app > header { background: #0a0a0a; border-bottom: 1px solid #1f1f1f; }
body:not([data-pstyle=classic]) #app > header .brand { font: 400 24px var(--fr-disp); letter-spacing: .08em; }
body:not([data-pstyle=classic]) #app > header > button { position: relative; background: transparent; border: 0; border-radius: 0;
  font: 400 17px var(--fr-disp); letter-spacing: .07em; text-transform: uppercase; color: #e6e6e6; padding: 4px 8px; }
body:not([data-pstyle=classic]) #app > header > button::before { content: ""; position: absolute; left: 50%; right: 50%; top: -5px; height: 2px; background: var(--accent); transition: left .2s var(--fr-ease), right .2s var(--fr-ease); }
body:not([data-pstyle=classic]) #app > header > button:hover::before { left: 4px; right: 4px; }

/* ---------------------------------------------------------------- page change: terminal wipe */
#page-fade.fr { animation: fr-wipe .8s ease both; background: #050505; display: grid; place-items: center; }
#page-fade .pf-line { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: fr-scan .7s ease-in-out both; }
#page-fade .pf-term { font: 400 clamp(30px, 4vw, 54px) var(--fr-disp); letter-spacing: .08em; color: #f2f2f2; }
#page-fade .pf-cur { color: #9a9a9a; animation: fr-blink .5s steps(1) infinite; }
#page-fade .pf-gt { color: #9a9a9a; margin-right: .2em; }

@keyframes fr-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fr-rise2 { from { transform: translateY(1.5rem); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fr-blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
@keyframes fr-wipe { 0% { opacity: 0; } 22% { opacity: 1; } 62% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fr-scan { from { top: 0; opacity: 0; } 15% { opacity: 1; } to { top: 100%; opacity: 0; } }

@media (max-width: 760px) {
  body:not([data-pstyle=classic]) #login .lg-bar { gap: 22px; height: 56px; }
  .lg-bar a { font-size: 20px; }
  body:not([data-pstyle=classic]) #login .lg-hud { font-size: 10px; gap: 12px; }
  body:not([data-pstyle=classic]) #login > .lg-side { bottom: 70px; max-height: calc(100vh - 120px); }
  body:not([data-pstyle=classic]) .pg-head > b { font-size: 26px; }
}
body.reduce-motion #login .lg-big, body.reduce-motion #login .lg-catch, body.reduce-motion #login .lg-sub, body.reduce-motion #login .lg-press { animation: none !important; opacity: 1; }
body.reduce-motion .fr-r { opacity: 1 !important; transform: none !important; transition: none !important; }
body.reduce-motion .fr-rise .pg-head { animation: none !important; }

/* LGN-08: login sound — speaker button + volume, bottom right (both page styles) */
#lg-sound { position: absolute; right: 18px; bottom: 76px; z-index: 6; display: flex; align-items: center; gap: 8px; }
#lg-sound.hidden { display: none; }
#lg-sound .lg-snd { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.6); color: #fff; font-size: 16px; cursor: pointer; }
#lg-sound input { width: 0; opacity: 0; transition: width .25s, opacity .25s; accent-color: var(--accent); }
#lg-sound:hover input, #lg-sound:focus-within input { width: 110px; opacity: 1; }
body[data-pstyle=classic] #lg-sound { bottom: 18px; }
