/* PolyRealms in 3D: Five Wells' own look (smoked glass, white, lime; Bricolage Grotesque and Figtree), over a vivid world. */
@font-face { font-family: var(--f-head); src: url(/realm/fonts/BricolageGrotesque.woff2); font-weight: 200 800; }
@font-face { font-family: var(--f-body); src: url(/realm/fonts/Figtree.woff2); font-weight: 300 900; }
:root { --ink: var(--c-onSel); --lime: var(--c-sel); --mist: var(--c-hair); --line: var(--c-row); --glass: var(--c-plate); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--c-surface); color: var(--c-text); font: 500 16px/1.35 var(--f-body), system-ui, sans-serif; }
[hidden] { display: none !important; }
#cv { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
.glass { background: var(--glass); backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3); border: 1px solid var(--line); border-radius: 16px; }
.chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--c-row); font: 700 13px/1 var(--f-body); color: var(--c-text); }
button { font: inherit; color: inherit; cursor: pointer; }

/* title */
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(16px, 7vw, 120px); gap: 28px;
  background: radial-gradient(120% 90% at 85% 10%, var(--c-raised) 0%, transparent 55%), radial-gradient(90% 80% at 0% 100%, var(--c-raised) 0%, transparent 60%), var(--c-surface); }
.brand { font: 800 clamp(48px, 9vw, 120px)/.9 var(--f-head); letter-spacing: -.035em; }
.brand i { font-style: normal; color: var(--lime); }
.games { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 6px; max-width: 100%; }
.game { flex: 0 0 auto; width: min(340px, 82vw); display: flex; flex-direction: column; text-align: left; padding: 0; border-radius: 18px; overflow: hidden;
  background: var(--glass); border: 1px solid var(--line); transition: transform .15s, border-color .15s; }
.game img { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--c-surface); }
.game .gtxt { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.game .gt { font: 800 22px/1.05 var(--f-head); letter-spacing: -.01em; }
.game .gs { color: var(--mist); font-size: 14px; }
.game:hover { transform: translateY(-2px); }
.game.on { border-color: var(--lime); box-shadow: 0 0 0 2px var(--lime) inset; }
.go { align-self: flex-start; padding: 14px 34px; border: 0; border-radius: 999px; background: var(--lime); color: var(--ink); font: 800 20px/1 var(--f-head); }
.go:hover { filter: brightness(1.08); }
#err { color: var(--c-danger); font-weight: 700; min-height: 1em; }

/* loading */
#loading { justify-content: flex-end; padding-bottom: 12vh; }
#lTitle { font: 800 clamp(36px, 6vw, 72px)/.95 var(--f-head); letter-spacing: -.03em; }
#lTag { color: var(--mist); font-size: 18px; max-width: 46ch; }
.bar { width: min(520px, 100%); height: 6px; border-radius: 6px; background: var(--c-row); overflow: hidden; }
#lBar { height: 100%; width: 0; background: var(--lime); transition: width .25s; }
#lStep { font: 700 13px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--mist); }

/* in play */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#place { position: absolute; left: 16px; top: 16px; display: flex; gap: 12px; align-items: center; padding: 9px 14px; }
#place b { font: 800 18px/1 var(--f-head); }
#place .clock { font: 800 16px/1 var(--f-body); }
#camBtn { position: absolute; right: 16px; top: 16px; display: flex; gap: 10px; align-items: center; padding: 9px 14px 9px 10px; border: 1px solid var(--line); }
#camBtn .key { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--lime); color: var(--ink); font: 800 14px/1 var(--f-body); }
#camBtn span { font: 800 15px/1 var(--f-body); }
#say { position: absolute; left: 50%; bottom: 12vh; transform: translateX(-50%); padding: 12px 18px; font-weight: 700; max-width: min(640px, 90vw); text-align: center; }
@media (max-width: 600px) { #place { top: 12px; left: 12px; } #camBtn { top: auto; bottom: 16px; right: 16px; } }

/* ---- the title in the design system (2026-11-17, realm/hud/tokens.js): the pack's loading picture behind (realm/hud/loading.js sets it), the
   brand in the pack's display face, the worlds as cut plates with the accent edge on the chosen one ---- */
#title { background: linear-gradient(90deg, var(--c-scrim-hi) 0, var(--c-scrim) 45%, transparent 80%), var(--title-bg, var(--c-surface)) center / cover no-repeat; }
.brand { font-family: var(--f-head) !important; font-weight: 400; font-size: clamp(44px, 6vw, 92px); letter-spacing: var(--head-track); text-transform: var(--head-case); color: var(--c-text); text-shadow: 0 3px 18px var(--c-shadow); }
.brand i { color: var(--c-accent); }
.game { border-radius: 0; border: 0; background: var(--c-plate); clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); box-shadow: inset 0 0 0 1px var(--c-hair); }
.game.on { border: 0; box-shadow: inset 0 0 0 2px var(--c-accent); }
.game img { background: var(--c-raised); }
.game .gt { font-family: var(--f-head); font-weight: 400; font-size: 20px; letter-spacing: var(--head-track); }
.game .gs { color: var(--c-dim); font-size: 14px; }
.go { border-radius: 0; font-family: var(--f-head); font-weight: 400; letter-spacing: var(--head-track); }
#title > :not([hidden]):not(#coPanel):not(#mtPanel):not(#qPanel) { position: relative; }      /* (each row of the title its own containing block: a Synty plate drawn round a piece of a row never spreads over the whole title) */
#acRow .acEv { background: var(--c-accent) !important; color: var(--c-onSel) !important; border-radius: 0 !important; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }      /* (the live event chip in the accent, not its rules colour) */
