/* Concordia Games site styles. One dark, midnight-blue look; gold is reserved for coins, stars and the main action. */
@font-face {
  font-family: 'WLCoin';
  src: url('/fonts/wlcoin.woff?v=202610261423') format('woff');
  unicode-range: U+A4;
  font-display: block;
}

:root {
  /* Layout: sticky top bar (VIP levels open from it); lobby = featured-game hero, a perks strip (signed out) and a
     square-tile grid (4 across, 2 on phones), with the daily leaderboard on the right (behind a button on phones);
     game view = info rail beside a centred, phone-width game. */
  color-scheme: dark;
  --night: #060d1c;
  --deep: #0a1730;
  --raised: #0f2140;
  --line: #1b3054;
  --line-2: #284372;
  --ink: #edf1fa;
  --mute: #93a6c8;
  --faint: #6a7fa4;
  --gold: #f0c35a;
  --gold-hi: #ffe29a;
  --gold-lo: #c48a22;
  --on-gold: #1c1300;
  --ok: #45d39b;
  --bad: #ff7a85;
  --f-display: 'WLCoin', 'Bodoni Moda', 'Didot', 'Bodoni 72', 'Bodoni MT', Georgia, serif;
  --f-ui: 'WLCoin', 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bar-h: 64px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
html { background: var(--night); }
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font: 400 16px/1.5 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  background-color: var(--night);
  background-image:
    radial-gradient(1100px 520px at 50% -160px, rgba(70, 120, 210, .20), transparent 70%),
    radial-gradient(1px 1px at 23px 41px, rgba(220, 230, 255, .55), transparent),
    radial-gradient(1px 1px at 131px 97px, rgba(220, 230, 255, .35), transparent),
    radial-gradient(1.4px 1.4px at 77px 151px, rgba(255, 226, 154, .5), transparent),
    radial-gradient(1px 1px at 171px 13px, rgba(220, 230, 255, .3), transparent);
  background-size: auto, 190px 190px, 190px 190px, 190px 190px, 190px 190px;
  background-attachment: fixed;
}
/* paints the phone's status-bar band above the sticky top bar */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 31; background: var(--night); }
body.modal-open { overflow: hidden; }
a { color: inherit; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* the plain text of a page that search engines read before the scripts run (see server/seo.js); the site replaces it as soon
   as it starts, so players with scripts never see it. Without scripts it shows (the <noscript> style in index.html). */
.seed { display: none; max-width: 720px; margin: 0 auto; padding: 8px 0 24px; }
.seed h1 { font: 600 clamp(34px, 7vw, 56px)/1 var(--f-display); margin: 0 0 14px; }
.seed h2 { font: 600 24px/1.2 var(--f-display); margin: 26px 0 10px; }
.seed p, .seed li { color: var(--mute); }
.seed a { color: var(--gold); }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: rgba(6, 13, 28, .84);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  height: var(--bar-h);
  max-width: 1240px;
  margin: 0 auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  display: flex;
  align-items: center;
  gap: 22px;
}
.bar-back {
  display: none; place-items: center; width: 40px; height: 40px; flex: none; margin-right: -8px;
  border: 1px solid var(--line-2); border-radius: 11px; background: none; color: var(--ink); cursor: pointer;
}
.bar-back svg { width: 20px; height: 20px; }
/* the logo: the CG mark on small screens, the full "Concordia Games" wordmark where there is room for it */
.brand { display: flex; align-items: center; color: var(--ink); text-decoration: none; flex: none; border-radius: 10px; }
.brand:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.brand-cg { display: block; height: 34px; width: auto; flex: none; }
.brand-full { display: none; height: 26px; width: auto; flex: none; }
@media (min-width: 1021px) {
  .topbar .brand-cg { display: none; }
  .topbar .brand-full { display: block; }
}
.account { margin-left: auto; display: flex; align-items: center; gap: 10px; position: relative; min-width: 0; }

/* free-coins button with its countdown dial */
.claim {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 4px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--deep); color: var(--mute);
  cursor: pointer; font: inherit; flex: none;
}
.claim[aria-disabled="true"] { cursor: default; }
.dial { position: relative; width: 36px; height: 36px; display: grid; place-items: center; flex: none; }
.dial svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.dial-track { fill: none; stroke: var(--line-2); stroke-width: 3; }
.dial-fill { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .9s linear; }
.dial-coin { font: 17px/1 'WLCoin', serif; color: var(--gold); }
.claim-text { display: flex; flex-direction: column; line-height: 1.08; text-align: left; }
.claim-text b { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.claim-text small { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
.claim.ready {
  border-color: rgba(240, 195, 90, .75);
  background: linear-gradient(180deg, rgba(240, 195, 90, .2), rgba(240, 195, 90, .06));
  animation: claimGlow 2.4s ease-in-out infinite;
}
.claim.ready .claim-text b, .claim.ready .claim-text small { color: var(--gold-hi); }
.claim.ready:hover { background: linear-gradient(180deg, rgba(240, 195, 90, .3), rgba(240, 195, 90, .1)); }
.claim.busy { opacity: .7; pointer-events: none; }
@keyframes claimGlow { 50% { box-shadow: 0 0 0 4px rgba(240, 195, 90, .1), 0 0 22px rgba(240, 195, 90, .35); } }

.wallet {
  display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px 0 14px; border-radius: 999px;
  background: var(--raised); border: 1px solid var(--line-2); font-weight: 800; font-size: 17px;
  font-variant-numeric: tabular-nums; white-space: nowrap; flex: none;
}
.wallet-coin { font: 19px/1 'WLCoin', serif; color: var(--gold); }
.wallet.up { animation: walletUp 1s ease-out; }
@keyframes walletUp {
  20% { border-color: var(--ok); box-shadow: 0 0 0 4px rgba(69, 211, 155, .2); }
  100% { border-color: var(--line-2); box-shadow: 0 0 0 0 rgba(69, 211, 155, 0); }
}

.me { display: flex; align-items: center; gap: 6px; height: 58px; padding: 0 4px 0 0; background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: 14px; flex: none; }
.me:hover .me-text b { color: var(--gold-hi); }
.me-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; min-width: 0; }
.me-text b { font-size: 14px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { font-size: 12px; color: var(--gold); font-weight: 600; }
.chev { width: 12px; height: 12px; color: var(--mute); flex: none; }

/* avatar with the six VIP stars on an arc underneath */
.vip { position: relative; display: inline-block; width: var(--w); height: var(--h); flex: none; vertical-align: middle; }
.vip > .avatar { position: absolute; left: 50%; top: var(--top); transform: translateX(-50%); display: block; }
.vip-stars { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.vip-star {
  fill: #3d5a8c; stroke: var(--night); stroke-width: 1.4; stroke-linejoin: round; paint-order: stroke;
  transform-box: fill-box; transform-origin: center;
}
.vip-star.lit { fill: var(--gold); filter: drop-shadow(0 0 2.5px rgba(240, 195, 90, .85)); }
.vip-max .vip-star.lit { animation: shimmer 3s ease-in-out infinite; animation-delay: calc(var(--i) * .3s); }
.vip-star.pop { animation: starPop 1s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes shimmer { 50% { fill: #fff6d8; filter: drop-shadow(0 0 5px rgba(255, 226, 154, 1)); } }
@keyframes starPop { 0% { transform: scale(.2); } 55% { transform: scale(1.9); } 100% { transform: scale(1); } }

/* account menu */
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(340px, calc(100vw - 32px)); z-index: 40;
  background: var(--deep); border: 1px solid var(--line-2); border-radius: 18px; padding: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.menu-head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 12px; }
.menu-id { min-width: 0; }
.menu-id b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-id span { display: block; font-size: 13px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vipbox { padding: 12px 14px; border-radius: 14px; background: var(--night); border: 1px solid var(--line); }
.vipbox-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; color: var(--mute); }
.tier-label { font: italic 600 19px/1.1 'Bodoni Moda', Georgia, serif; color: var(--gold-hi); }
.vipbox p { margin: 0; font-size: 13px; color: var(--mute); }
.vipbox .xp-rule { margin-top: 6px; font-size: 12px; color: var(--faint); }
.meter { height: 8px; border-radius: 99px; background: rgba(147, 166, 200, .15); overflow: hidden; margin: 8px 0 6px; }
.meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); min-width: 6px; }
.menu-items { display: flex; flex-direction: column; margin-top: 8px; }
.menu-items button {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 10px; border: 0; border-radius: 10px;
  background: none; color: var(--ink); font: 600 15px var(--f-ui); cursor: pointer; text-align: left;
}
.menu-items button:hover, .menu-items button:focus-visible { background: rgba(147, 166, 200, .1); }
.menu-items svg { width: 18px; height: 18px; color: var(--mute); flex: none; }

/* maintenance notice under the top bar (games paused from the back office) */
.notice { border-bottom: 1px solid rgba(240, 195, 90, .35); background: linear-gradient(180deg, rgba(240, 195, 90, .16), rgba(240, 195, 90, .07)); }
.notice[hidden] { display: none; }
body { --notice-h: 0px; }
body.is-maintenance { --notice-h: 52px; } /* the game stage gets shorter so it still fits the screen under the notice */
.notice-in {
  max-width: 1240px; margin: 0 auto; padding: 10px var(--gutter-r) 10px var(--gutter-l);
  display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 14.5px;
}
.notice-in p { margin: 0; min-width: 0; }
.notice-in b { color: var(--gold-hi); margin-right: 6px; }
.notice-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(240, 195, 90, .16); color: var(--gold); }
.notice-ic svg { width: 18px; height: 18px; }
.tile-play.paused { background: var(--raised); color: var(--gold-hi); border: 1px solid rgba(240, 195, 90, .5); padding: 6px 12px; }
.locked-copy .btn svg { width: 18px; height: 18px; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font: 700 15px/1 var(--f-ui); cursor: pointer;
  text-decoration: none; white-space: nowrap; color: var(--ink); background: none;
}
.btn-gold {
  background: linear-gradient(180deg, #ffe08e, #e4a93c); color: var(--on-gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 6px 20px rgba(240, 195, 90, .22);
}
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost { border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--mute); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }

/* ---------------- page ---------------- */
.wrap {
  display: block; max-width: 1240px; margin: 0 auto;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: 28px 64px;
  outline: none;
}

/* hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center;
  padding: 40px; border-radius: 26px; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(70, 120, 210, .2), transparent 55%),
    linear-gradient(180deg, var(--deep), #081327);
  border: 1px solid var(--line);
}
.hero-copy { min-width: 0; }
.kicker {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
}
.kicker svg { width: 14px; height: 14px; }
.hero-title { font: 600 clamp(48px, 7.4vw, 92px)/.92 var(--f-display); letter-spacing: -.02em; margin: 0 0 18px; }
.lede { font-size: 18px; color: var(--mute); max-width: 44ch; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art {
  display: block; padding: 0; border: 0; background: none; cursor: pointer; width: 100%; max-width: 440px; aspect-ratio: 1;
  justify-self: end; border-radius: 22px; overflow: hidden; transition: transform .35s cubic-bezier(.2, .7, .2, 1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(226, 189, 91, .28);
}
.hero-art svg { display: block; width: 100%; height: 100%; }
.hero-art:hover { transform: translateY(-4px) rotate(-.5deg); }
.art-sweep { animation: sweep 8s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }

/* perks (signed out only) */
.strip { margin-top: 18px; }
.perks {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
}
.perks li { display: flex; gap: 14px; align-items: center; padding: 18px 20px; background: var(--deep); min-width: 0; }
.perk-ic {
  flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(240, 195, 90, .1); color: var(--gold); font: 23px/1 'WLCoin', serif;
}
.perk-ic svg { width: 22px; height: 22px; }
.perk-text { min-width: 0; }
.perk-text b { display: block; font-size: 16px; }
.perk-text span { display: block; color: var(--mute); font-size: 14px; }
/* games grid */
.games { margin-top: 48px; }
.games-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.games-head h2 { font: 600 38px/1 var(--f-display); margin: 0; letter-spacing: -.01em; }
.games-head p { margin: 0; color: var(--mute); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tile {
  position: relative; display: block; aspect-ratio: 1; max-width: 100%; border-radius: 20px; overflow: hidden; isolation: isolate;
  background: var(--deep); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.tile-art { position: absolute; inset: 0; }
.tile-art svg { display: block; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.tile::after { content: ""; position: absolute; inset: 38% 0 0; z-index: 1; background: linear-gradient(180deg, transparent, rgba(4, 9, 20, .94) 72%); }
.tile-info { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2; display: flex; flex-direction: column; gap: 3px; }
.tile-info b { font: 600 26px/1.02 var(--f-display); }
.tile-info small { font-size: 13px; color: var(--mute); letter-spacing: .02em; }
.tile-play {
  position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; align-items: center; gap: 6px;
  padding: 7px 13px 7px 10px; border-radius: 999px; background: var(--gold); color: var(--on-gold);
  font-weight: 800; font-size: 13px; opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .25s;
}
.tile-play svg { width: 12px; height: 12px; }
.tile.live:hover, .tile.live:focus-visible { border-color: rgba(240, 195, 90, .65); transform: translateY(-4px); box-shadow: 0 20px 44px rgba(0, 0, 0, .5); }
.tile.live:hover .tile-art svg { transform: scale(1.06); }
.tile.live:hover .tile-play, .tile.live:focus-visible .tile-play { opacity: 1; transform: none; }
.tile.soon .tile-info b { color: var(--mute); }
@media (hover: none) { .tile-play { opacity: 1; transform: none; } }

/* lobby: main column with the daily leaderboard on the right */
.lobby { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 26px; align-items: start; }
.lobby-main { min-width: 0; }
.lobby-side { position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + 18px); min-width: 0; }

/* daily leaderboard */
.lb { padding: 18px 16px 16px; border-radius: 22px; background: var(--deep); border: 1px solid var(--line); }
.lb.in-modal { padding: 0; border: 0; background: none; }
.lb-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lb-title { margin: 0; font: 600 25px/1.05 var(--f-display); }
.lb-prizes { margin: 6px 0 0; font-size: 13.5px; color: var(--mute); }
.lb-prizes b { color: var(--gold-hi); font-weight: 800; }
.lb-cup { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: rgba(240, 195, 90, .12); color: var(--gold); }
.lb-cup svg { width: 24px; height: 24px; }
.lb-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 14px 0 8px; background: var(--night); border: 1px solid var(--line); border-radius: 12px; }
.lb-tabs button { height: 34px; border: 0; border-radius: 9px; background: none; color: var(--mute); font: 700 13px var(--f-ui); cursor: pointer; }
.lb-tabs button[aria-selected="true"] { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.lb-clock { margin: 0 0 8px; min-height: 18px; font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; text-align: center; }
.lb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lb-row {
  display: grid; grid-template-columns: 24px auto minmax(0, 1fr) auto 40px; gap: 7px; align-items: center;
  padding: 3px 8px; border-radius: 11px; font-size: 14px;
}
.lb-row .vip { margin-top: 1px; }
.lb-rank { text-align: center; font-weight: 800; color: var(--faint); font-variant-numeric: tabular-nums; }
.lb-row.top .lb-rank {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: #1c1300;
}
.lb-row.t1 .lb-rank { background: linear-gradient(135deg, #ffe9a3, #d29a2a); }
.lb-row.t2 .lb-rank { background: linear-gradient(135deg, #f4f6fa, #98a2b2); }
.lb-row.t3 .lb-rank { background: linear-gradient(135deg, #f6bd8c, #a35d2c); }
.lb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb-name em { margin-left: 6px; padding: 1px 6px; border-radius: 99px; background: var(--gold); color: var(--on-gold); font: 800 10px var(--f-ui); font-style: normal; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }
.lb-xp { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-prize { text-align: right; font-weight: 800; font-size: 13px; color: var(--gold-hi); white-space: nowrap; }
.lb-row.top { background: rgba(240, 195, 90, .06); }
.lb-row.you { box-shadow: inset 0 0 0 1px rgba(240, 195, 90, .65); }
.lb-empty { margin: 14px 0; text-align: center; color: var(--mute); font-size: 14px; }
.lb-me { margin: 10px 0 0; text-align: center; font-size: 14px; color: var(--mute); }
.lb-me b { color: var(--ink); }
.lb-me .btn { width: 100%; }
.lb-note { margin: 12px 0 0; font-size: 12px; color: var(--faint); line-height: 1.45; }
.lb-open {
  display: none; width: 100%; margin-top: 14px; align-items: center; gap: 12px; padding: 12px 14px; text-align: left;
  border-radius: 18px; border: 1px solid var(--line); background: var(--deep); color: var(--ink); cursor: pointer; font: inherit;
}
.lb-open-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-open-text b { font-size: 16px; }
.lb-open-text small { font-size: 13px; color: var(--mute); }
.lb-open-text small b { font-size: 13px; color: var(--gold-hi); }
.lb-open-go { flex: none; padding: 8px 14px; border-radius: 10px; background: var(--gold); color: var(--on-gold); font-weight: 800; font-size: 13px; }

/* VIP levels panel in the top bar */
.vip-wrap { position: relative; flex: none; }
.vip-btn {
  display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px 0 12px; border-radius: 11px;
  border: 1px solid var(--line-2); background: none; color: var(--ink); font: 600 14px var(--f-ui); cursor: pointer;
}
.vip-btn > svg:first-child { width: 16px; height: 16px; color: var(--gold); }
.vip-chev { width: 14px; height: 14px; color: var(--mute); transition: transform .2s; }
.vip-btn[aria-expanded="true"] { border-color: rgba(240, 195, 90, .6); }
.vip-btn[aria-expanded="true"] .vip-chev { transform: rotate(180deg); }
.vip-panel {
  position: absolute; left: 0; top: calc(100% + 12px); z-index: 40; width: 360px; padding: 16px;
  background: var(--deep); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.vp-title { font: 600 22px/1.1 var(--f-display); }
.vp-head p { margin: 6px 0 0; font-size: 13px; color: var(--mute); }
.vp-head .vp-you { color: var(--ink); }
.vp-you b { color: var(--gold-hi); }
.vp-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.vp-row { display: flex; align-items: center; gap: 12px; padding: 4px 10px 4px 6px; border-radius: 12px; }
.vp-row.is-you { background: rgba(240, 195, 90, .1); box-shadow: inset 0 0 0 1px rgba(240, 195, 90, .55); }
.vp-name { flex: 1; font: italic 600 18px/1.1 'Bodoni Moda', 'Didot', Georgia, serif; }
.vp-xp { font-weight: 700; font-size: 14px; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.tier-you {
  padding: 2px 8px; border-radius: 999px; background: var(--gold); color: var(--on-gold);
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}

/* ---------------- game view ---------------- */
.on-play .foot { display: none; }
.on-play .wrap { padding-block: 18px 18px; }
.play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px) minmax(0, 1fr); gap: 34px; align-items: start; }
.play-info {
  grid-column: 1; justify-self: end; width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: calc(var(--bar-h) + 24px);
}
.back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px;
  border: 1px solid var(--line-2); border-radius: 11px; background: none; color: var(--ink); font: 600 14px var(--f-ui); cursor: pointer;
}
.back:hover { border-color: var(--mute); }
.back svg { width: 18px; height: 18px; }
.play-title h1 { font: 600 48px/1 var(--f-display); margin: 0 0 10px; letter-spacing: -.01em; }
.play-title p { margin: 0; color: var(--mute); }
.stage {
  grid-column: 2; position: relative;
  height: calc(100vh - var(--bar-h) - 36px - var(--notice-h) - env(safe-area-inset-top, 0px));
  height: calc(100dvh - var(--bar-h) - 36px - var(--notice-h) - env(safe-area-inset-top, 0px));
  min-height: 560px; max-height: 940px; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line); background: #050a14; box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.game-frame { display: block; width: 100%; height: 100%; border: 0; background: #050a14; opacity: 0; transition: opacity .25s; }
.stage.ready .game-frame { opacity: 1; }
.stage-msg {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center; color: var(--mute); font-size: 15px;
}
.stage.ready .stage-msg { display: none; }
.stage-msg b { color: var(--ink); font-size: 17px; }
.stage-msg .btn { margin-top: 6px; }
.stage-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--gold); animation: spin 1s linear infinite; }
.stage.failed .stage-spin { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.locked { height: 100%; display: flex; flex-direction: column; }
.locked-art { flex: 1 1 auto; min-height: 0; }
.locked-art svg { display: block; width: 100%; height: 100%; opacity: .55; }
.locked-copy { padding: 22px; background: var(--deep); border-top: 1px solid var(--line); }
.locked-copy h2 { font: 600 28px/1.1 var(--f-display); margin: 0 0 8px; }
.locked-copy p { color: var(--mute); margin: 0 0 16px; }

/* ---------------- modal, forms ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top, 0px)); padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(2, 6, 14, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeIn .18s ease-out;
}
.modal-card {
  position: relative; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--deep); border: 1px solid var(--line-2); border-radius: 22px; padding: 26px 24px 24px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6); animation: popIn .24s cubic-bezier(.2, .9, .3, 1.2);
}
.modal-card.wide { width: min(660px, 100%); }
.modal-card > h2 { font: 600 30px/1.1 var(--f-display); margin: 0 0 18px; padding-right: 40px; }
.modal-x {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line-2); background: none; color: var(--mute); display: grid; place-items: center; cursor: pointer;
}
.modal-x svg { width: 16px; height: 16px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--night); border: 1px solid var(--line); border-radius: 13px; }
.tabs button { height: 40px; border: 0; border-radius: 9px; background: none; color: var(--mute); font: 700 14px var(--f-ui); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form-lede { margin: 0; color: var(--mute); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span:first-child { font-size: 13px; font-weight: 700; color: var(--mute); }
.field small { font-size: 12.5px; color: var(--faint); }
.field input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--night); color: var(--ink); font: 500 16px var(--f-ui);
}
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240, 195, 90, .18); }
.pw { position: relative; display: block; }
.pw input { padding-right: 74px; }
.pw-toggle { position: absolute; right: 6px; top: 7px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--mute); font: 700 13px var(--f-ui); cursor: pointer; }
.pw-toggle:hover { color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mute); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--gold); flex: none; }
.form-error { margin: 0; padding: 10px 12px; border-radius: 11px; background: rgba(255, 122, 133, .1); border: 1px solid rgba(255, 122, 133, .4); color: #ffc7cc; font-size: 14px; }
.form-note { margin: 0; font-size: 12.5px; color: var(--faint); text-align: center; }
.muted { color: var(--mute); }
.small { font-size: 13px; }

/* profile */
.profile { display: flex; flex-direction: column; gap: 18px; }
.pf-top { display: flex; align-items: center; gap: 14px; }
.pf-vip b { display: block; font: italic 600 22px/1.1 'Bodoni Moda', Georgia, serif; color: var(--gold-hi); }
.pf-vip span { color: var(--mute); font-size: 14px; }
.pick { border: 0; padding: 0; margin: 0; min-width: 0; }
.pick legend { font-size: 13px; font-weight: 700; color: var(--mute); margin-bottom: 8px; padding: 0; }
.swatches, .emblems { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.swatch {
  aspect-ratio: 1; width: 100%; max-width: 46px; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
  background: linear-gradient(135deg, var(--a), var(--b)); padding: 0;
}
.emblem { width: 100%; max-width: 46px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; line-height: 0; }
.emblem svg { width: 100%; height: auto; }
.swatch[aria-pressed="true"], .emblem[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240, 195, 90, .25); }
.pf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.pf-stats div { padding: 10px 12px; border-radius: 12px; background: var(--night); border: 1px solid var(--line); min-width: 0; }
.pf-stats dt { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.pf-stats dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* coin history */
.ledger-wrap { overflow: auto; max-height: min(60vh, 520px); border: 1px solid var(--line); border-radius: 13px; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ledger th {
  position: sticky; top: 0; background: var(--raised); text-align: left; padding: 10px 12px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.ledger td { padding: 10px 12px; border-top: 1px solid var(--line); white-space: nowrap; }
.ledger .n { text-align: right; }
.ledger .pos { color: var(--ok); font-weight: 700; }
.ledger .neg { color: var(--mute); }
.ledger-foot { margin: 10px 0 0; }

/* toasts and flying coins */
#toasts {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px); pointer-events: none;
}
.toast {
  pointer-events: auto; padding: 12px 16px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line-2);
  color: var(--ink); font-size: 14.5px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); animation: toastIn .3s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.ok { border-color: rgba(69, 211, 155, .55); }
.toast.err { border-color: rgba(255, 122, 133, .6); }
.toast.level { border-color: rgba(240, 195, 90, .75); background: linear-gradient(180deg, #1a2648, var(--raised)); }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.toast-vip { display: flex; align-items: center; gap: 10px; }
.toast-vip b { display: block; color: var(--gold-hi); }
.toast-vip small { color: var(--mute); font-size: 13px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
.fly-coin {
  position: fixed; left: 0; top: 0; margin: -11px 0 0 -9px; z-index: 80; pointer-events: none;
  font: 22px/1 'WLCoin', serif; color: var(--gold); text-shadow: 0 0 10px rgba(240, 195, 90, .8);
}

/* footer */
.foot { border-top: 1px solid var(--line); background: rgba(4, 9, 20, .6); }
.foot-in {
  max-width: 1240px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  padding-block: 30px calc(30px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between;
}
.foot-brand { display: flex; align-items: center; }
.foot-brand .brand-full { display: block; height: 20px; }
.foot p { margin: 0; color: var(--faint); font-size: 13.5px; max-width: 72ch; }
.foot-small { font-size: 12.5px; }

/* ---------------- smaller screens ---------------- */
@media (max-width: 1100px) {
  .lobby { grid-template-columns: minmax(0, 1fr); }
  .lobby-side { display: none; }
  .lb-open { display: flex; }
}
@media (max-width: 1020px) {
  .play { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .play-info { grid-column: 1; position: static; max-width: none; flex-direction: row; align-items: center; gap: 12px; justify-self: stretch; }
  .play-title p { display: none; }
  .play-title h1 { font-size: 26px; margin: 0; }
  .back { padding: 0 10px; }
  .back span { display: none; }
  .stage {
    grid-column: 1; width: 100%; max-width: 520px; justify-self: center; min-height: 500px; border-radius: 16px;
    height: calc(100vh - var(--bar-h) - 90px - var(--notice-h) - env(safe-area-inset-top, 0px));
    height: calc(100dvh - var(--bar-h) - 90px - var(--notice-h) - env(safe-area-inset-top, 0px));
  }
  .me-text, .chev { display: none; }
  .on-play .bar-back { display: grid; }
  .on-play .play-info { display: none; }
  .on-play .wrap { padding-block: 8px; }
  .on-play .stage {
    height: calc(100vh - var(--bar-h) - 16px - var(--notice-h) - env(safe-area-inset-top, 0px));
    height: calc(100dvh - var(--bar-h) - 16px - var(--notice-h) - env(safe-area-inset-top, 0px));
    min-height: 480px;
  }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile-info { left: 12px; right: 12px; bottom: 10px; }
  .tile-info b { font-size: 21px; }
  .tile-info small { font-size: 12px; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 22px; border-radius: 22px; }
  .hero-art { order: -1; max-width: none; aspect-ratio: 16 / 9; justify-self: stretch; border-radius: 16px; }
  .perks { grid-template-columns: minmax(0, 1fr); }
  .lede { font-size: 17px; }
}
@media (max-width: 780px) {
  .vip-btn { width: 38px; padding: 0; justify-content: center; }
  .vip-btn-text, .vip-chev { display: none; }
}
@media (max-width: 640px) {
  :root { --bar-h: 60px; }
  .vip-panel {
    position: fixed; left: var(--gutter-l); right: var(--gutter-r); width: auto;
    top: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + 8px);
    max-height: calc(100vh - var(--bar-h) - 24px); overflow-y: auto;
  }
  .hero-title { margin-bottom: 12px; }
  .tile-play { display: none; }
  .topbar-in { gap: 10px; }
  .hide-sm { display: none; }
  .account { gap: 6px; }
  .brand-cg { height: 32px; }
  .claim { padding: 0 10px 0 3px; height: 40px; gap: 6px; }
  .dial { width: 32px; height: 32px; }
  .wallet { height: 40px; padding: 0 12px 0 10px; font-size: 15.5px; }
  .account.out .btn { height: 38px; padding: 0 12px; font-size: 14px; }
  .wrap { padding-block: 16px 48px; }
  .games { margin-top: 34px; }
  .games-head h2 { font-size: 30px; }
  .hero-title { font-size: 48px; }
}
@media (max-width: 480px) {
  .topbar-in { gap: 8px; }
  .account { gap: 5px; }
  .claim-text small { display: none; }
  .pf-stats { grid-template-columns: minmax(0, 1fr); }
}

/* When the top bar cannot hold everything (a small phone, a long balance, the claim countdown), app.js (fitBar) marks it
   data-tight="1", "1 2", "1 2 3"... and the least important pieces go, in this order. They come back when there is room. */
.topbar[data-tight~="1"] .claim:not(.ready) { padding: 0 3px; }
.topbar[data-tight~="1"] .claim:not(.ready) .claim-text { display: none; }   /* the countdown ring stays, the numbers go */
.topbar[data-tight~="2"] .vip-wrap { display: none; }                          /* the VIP list is also in the account menu */
.topbar[data-tight~="3"] .wallet-coin { display: none; }
.topbar[data-tight~="3"] .wallet { padding: 0 12px; }
.topbar[data-tight~="4"] .me .vip { width: 34px; height: 34px; }               /* the avatar without its row of stars */
.topbar[data-tight~="4"] .me .vip-stars { display: none; }
.topbar[data-tight~="5"] .wallet { font-size: 14px; padding: 0 9px; }
.on-play .topbar[data-tight~="5"] .brand { display: none; }                    /* the back arrow already leads home */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .art-sweep { display: none; }
}

