/* =====================================================================
   EASELPS STYLE (dark) - shared by index.html, download.html, store.html
   Change colors with the variables in :root below.
   ===================================================================== */

:root {
  --bg:        #0a0c12;   /* page background */
  --side:      #10131d;   /* sidebar and topbar */
  --panel:     #151a28;   /* cards and panels */
  --panel-2:   #1d2335;   /* items inside panels */
  --border:    #373c4f;   /* panel outlines */
  --border-hi: #5b627a;   /* hover / active outlines */
  --text:      #ffffff;
  --muted:     #9aa3b8;
  --good:      #34d399;
  --bad:       #f87171;
  --accent:    #8f9dff;
  --radius:    10px;
  --side-w:    240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }

body {
  font-family: "Nunito", "Segoe UI", Verdana, sans-serif;
  font-weight: 700;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.panel {
  background: var(--panel);
  border: 3px solid var(--border);
  border-radius: var(--radius);
}

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  gap: 14px;
  padding: 12px;
  min-height: 100vh;
}

.sidebar-backdrop {
  display: none;
}

.sidebar {
  background: var(--side);
  position: sticky;
  top: 12px;
  align-self: start;
  height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  overflow-y: auto;
}

/* Proportional 3:1 box so the square 1:1 logo.png never clips horizontally at any width */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 1;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}
.brand img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(0.96);
  display: block;
}

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 2px solid transparent;
  font-size: 14px;
  cursor: pointer;
}
.nav a:hover { background: rgba(255,255,255,.05); }
.nav a { transition: border-color .2s, background .2s, box-shadow .2s; }
.nav a.active {
  border-color: var(--border-hi);
  background: rgba(255,255,255,.08);
  box-shadow: 0 0 14px rgba(120,150,255,.35), inset 0 0 10px rgba(120,150,255,.12);
}
.nav a.soon { opacity: .45; pointer-events: none; }
.nav img { width: 20px; height: 20px; object-fit: contain; }
.nav .soon-tag {
  margin-left: auto; font-size: 10px; padding: 2px 8px;
  border-radius: 999px; background: rgba(255,255,255,.1);
}

.main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ---------- Top-Right World Lock Wallet Bar (synced with D:/GTPS) ---------- */
.hidden { display: none !important; }

.wl-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  /* stays at the top while scrolling so the WL / PWL balance is always visible */
  position: sticky;
  top: 0;
  z-index: 14;              /* above content, below the phone menu bar (15) and the open sidebar (20) */
  padding: 8px 0;
  margin: -8px 0;           /* same spot as before when not stuck */
  background: var(--bg);
  box-shadow: 0 10px 14px -12px rgba(0, 0, 0, .8);
}
.wl-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.wl-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--side);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  transition: border-color .15s ease, filter .15s ease;
}
button.wl-pill:hover, .wl-bal-pill:hover {
  border-color: var(--border-hi);
  filter: brightness(1.1);
}
.wl-bal-pill {
  cursor: pointer;
  background: var(--panel);
}
.wl-pwl-pill {
  cursor: pointer;
  border-color: rgba(251, 191, 36, 0.5);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), var(--panel));
}
.wl-lbl { color: var(--muted); font-weight: 700; }
.wl-val { color: var(--good); font-weight: 800; font-size: 14px; }
.wl-pwl-val { color: #fbbf24; }
.wl-unit { color: var(--text); font-weight: 800; }
.wl-pwl-unit { color: #fde68a; }
.wl-rate-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 2px;
}
.wl-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  image-rendering: pixelated;
}
.wl-inline-ic {
  width: 15px;
  height: 15px;
  object-fit: contain;
  image-rendering: pixelated;
  vertical-align: -2px;
}
.store-price-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  margin-left: 2px;
}
.wl-btn-login {
  background: var(--accent);
  color: #0d1030;
  border-color: transparent;
}
.wl-btn-logout {
  background: var(--panel-2);
  color: var(--muted);
}
.wl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bad);
  display: inline-block;
}
.wl-dot.ok { background: var(--good); }
.wl-dot.bad { background: var(--bad); }

/* Wallet Dialogs */
.wl-dialog { width: min(440px, calc(100vw - 24px)); }
.wl-dialog-body { gap: 12px; }
.wl-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wl-tab {
  padding: 8px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--panel-2);
  font-weight: 800;
  font-size: 13px;
}
.wl-tab.on {
  background: var(--accent);
  color: #0d1030;
  border-color: var(--accent);
}
.wl-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.wl-field { display: flex; flex-direction: column; gap: 5px; }
.wl-field label { font-size: 12px; color: var(--muted); }
.wl-input {
  width: 100%;
  background: var(--side);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
}
.wl-input:focus { outline: none; border-color: var(--accent); }
.wl-pin {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-family: monospace;
  font-weight: 800;
}
.wl-err { color: var(--bad); font-size: 12.5px; min-height: 16px; }
.wl-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--side);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.wl-small-lbl { display: block; font-size: 11px; color: var(--muted); }
.wl-code-val { font-size: 24px; letter-spacing: 4px; color: #fbbf24; font-family: monospace; }
.wl-timer-val { font-size: 18px; color: var(--good); }
.wl-growid-val { font-size: 15px; color: var(--good); }
.wl-avail-val { font-size: 15px; color: var(--good); display: block; }
.wl-avail-pwl { font-size: 15px; color: #fbbf24; display: block; }
.wl-btn-refresh { width: 100%; justify-content: center; border-radius: 8px; padding: 8px; }
.wl-cmd {
  display: block;
  margin-top: 4px;
  color: #fbbf24;
  font-size: 13px;
  word-break: break-all;
}
.wl-quick-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wl-quick-row .wl-pill { justify-content: center; border-radius: 8px; padding: 7px 6px; font-size: 11.5px; }
.wl-btn-danger { background: var(--bad); color: #1f0707; }

/* Store purchase confirmation */
.wl-buy-name { font-size: 18px; color: var(--text); overflow-wrap: anywhere; margin-top: -6px; }
.wl-buy-gets { margin: 0; padding-left: 20px; font-size: 13px; color: var(--text); line-height: 1.6; }
.wl-buy-gets[hidden], .wl-buy-warn[hidden], .wl-code-box[hidden] { display: none; }
.wl-buy-warn {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, .1);
  border: 2px solid rgba(251, 191, 36, .35);
  border-radius: 8px;
  padding: 8px 12px;
}
.wl-buy-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
.wl-buy-actions > * { min-height: 44px; }
.wl-buy-cancel { justify-content: center; border-radius: 8px; }
#wlBuyConfirm:disabled { opacity: .5; cursor: progress; }

/* Log out confirmation: a small dialog */
.wl-logout-dialog { width: min(400px, calc(100vw - 24px)); }

/* Connected character pop-up */
.wl-acct-user { font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.wl-acct-bals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wl-acct-bals .wl-avail-val, .wl-acct-bals .wl-avail-pwl { font-size: 18px; display: flex; align-items: center; gap: 6px; }
.wl-acct-unlink { color: var(--bad); border-color: var(--bad); }
.wl-acct-confirm { display: flex; flex-direction: column; gap: 10px; }
.wl-buy-actions[hidden], .wl-acct-confirm[hidden] { display: none; }
#wlAcctUnlinkYes:disabled { opacity: .5; cursor: progress; }
@media (max-width: 420px) { .wl-acct-bals { grid-template-columns: 1fr; } }

.wl-toast {
  /* top center, just under the sticky wallet bar (--snap-top: its height, + the menu bar on phones) */
  position: fixed;
  top: var(--snap-top, 62px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(640px, calc(100vw - 32px));
  z-index: 99;
  background: var(--side);
  border: 2px solid var(--good);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,.55);
  animation: toast-in .22s cubic-bezier(.2, .8, .2, 1);
}
.wl-toast.err { border-color: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .wl-toast { animation: none; } }

/* Mobile-only top bar (hidden on desktop) */
.mobile-bar {
  display: none;
}

.menu-btn {
  background: var(--panel-2);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1;
}

.content { display: flex; flex-direction: column; gap: 48px; min-width: 0; flex: 1; }
/* ---------- full-screen sections (js: pickActive) ----------
   One long page with free scrolling, but every section (data-route) is at least one
   screen tall, and the menu links land exactly on a section's top.
   --snap-top = what stays above a section: the sticky wallet bar (+ the sticky menu bar on phones). */
:root { --snap-top: 62px; }   /* wallet bar (50px) + gap */
html { scroll-padding-top: var(--snap-top); }
[data-route] { min-height: calc(100dvh - var(--snap-top) - 12px); }
/* Home sits under the wallet bar: going to it means the very top of the page */
[data-route="home"] { scroll-margin-top: 100vh; min-height: 0; }
/* panel sections fill their screen; their content sits in the middle instead of leaving a gap below */
.block[data-route] { display: flex; flex-direction: column; justify-content: center; }
/* Home is the banner: it fills the first screen below the wallet bar */
.banner-wrap .banner { aspect-ratio: auto; height: clamp(300px, calc(100dvh - 90px), 900px); }
@media (max-width: 860px) {
  :root { --snap-top: 128px; }   /* sticky menu bar (8px + 58px) + sticky wallet row (50px) + gap */
  .banner-wrap .banner { height: clamp(260px, calc(100dvh - 150px), 760px); }
  /* the wallet bar sticks right under the menu bar, as one row that scrolls sideways */
  .wl-topbar { top: 66px; }
  .wl-pills { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .wl-pills::-webkit-scrollbar { display: none; }
  .wl-pills > * { flex: none; }
}
@media (max-width: 480px) {
  .wl-topbar { top: 62px; }   /* the menu bar is 54px tall here */
  :root { --snap-top: 124px; }
}
.block h2.section-title { font-size: 20px; }
#store { display: flex; flex-direction: column; gap: 24px; }

/* ---------- banner (click to open news) ---------- */
.banner {
  position: relative;
  overflow: hidden;
  aspect-ratio: 21 / 8;
  min-height: 200px;
  background: #06080d;
  cursor: pointer;
  transition: border-color .15s ease;
}
.banner:hover { border-color: var(--border-hi); }
.banner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.banner-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,8,13,.85), rgba(6,8,13,.05) 60%); pointer-events: none; }
.banner-text { position: absolute; left: 22px; bottom: 18px; right: 22px; max-width: 640px; pointer-events: none; }
.banner-text h1 { font-size: clamp(20px, 3.2vw, 34px); font-weight: 800; line-height: 1.15; }
.banner-text p { color: var(--muted); font-size: clamp(13px, 1.6vw, 16px); margin-top: 4px; }
.banner-count {
  position: absolute; right: 14px; top: 14px;
  font-size: 12px; background: rgba(6,8,13,.7);
  padding: 4px 9px; border-radius: 999px; pointer-events: none;
}

/* ---------- blocks ---------- */
.block { padding: 26px 28px 30px; }
.block h2 { font-size: 17px; margin-bottom: 14px; }
.block .lead { color: var(--muted); font-size: 14px; margin: -6px 0 16px; font-weight: 600; }

/* ---------- activity list ---------- */
.activities { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.activity {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 150px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--panel-2);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.activity::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,8,13,.9), rgba(6,8,13,.1) 70%); }
.activity > * { position: relative; }
.activity:hover { transform: translateY(-3px); border-color: var(--accent); }
.activity h3 { font-size: 18px; font-weight: 800; }
.activity p { font-size: 13px; color: var(--muted); }
.activity .badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
  background: var(--accent); color: #0d1030;
}

.empty { color: var(--muted); font-size: 14px; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 6px 0 14px; margin-top: -16px; }

/* ---------- download page: one card per device ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dl-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  min-width: 0;
  background: var(--panel-2);
  border: 2px solid var(--border);
  border-radius: 14px;
  font-size: 20px; font-weight: 800;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.dl-btn:hover { transform: translateY(-2px); border-color: var(--border-hi); box-shadow: 0 0 14px rgba(120,150,255,.25); }
.dl-btn { width: 100%; text-align: left; color: inherit; font-family: inherit; cursor: pointer; }
.dl-btn .soon-tag { margin-left: auto; font-size: 11px; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.1); }
.dl-icon { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; }
.dl-icon svg { width: 100%; height: 100%; object-fit: contain; }
.dl-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.dl-icon-dot { border-radius: 50%; color: #fff; font-size: 18px; font-weight: 800; }
.dl-card {
  background: var(--panel-2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.dl-card h3 { font-size: 22px; font-weight: 800; }
.dl-card p { flex: 1; font-size: 13px; color: var(--muted); font-weight: 600; }
.btn {
  display: block; text-align: center;
  background: var(--accent); color: #0d1030;
  border-radius: 8px; padding: 11px 18px;
  font-size: 14px; font-weight: 800;
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.disabled { background: var(--border); color: var(--muted); pointer-events: none; }

/* ---------- store page ----------
   Each section in js/store-config.js has its own banner(s) + item block. */
.store-banners { display: flex; flex-direction: column; gap: 12px; }
.store-sections { display: flex; flex-direction: column; gap: 36px; }
.store-section-group { display: flex; flex-direction: column; gap: 10px; }
.store-banners:empty, .store-sections:empty { display: none; }

.store-banner {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ratio, 3 / 1);   /* the banner keeps its picture's shape: no height cap, nothing cropped */
  background-color: var(--panel-2);
  background-size: cover;
  background-position: center;
  transition: border-color .15s ease;
}
a.store-banner:hover { border-color: var(--border-hi); }

.store-grid {
  display: grid;
  grid-template-columns: repeat(var(--store-cols, 5), minmax(0, 1fr));
  gap: 10px;
}
.store-item {
  display: flex; flex-direction: column;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-2);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.store-item:hover { transform: translateY(-3px); border-color: var(--accent); }

.store-art {
  position: relative;
  aspect-ratio: 3 / 2;
  max-height: 135px;
  background-color: var(--panel-2);
  background-size: cover;
  background-position: center;
}
.store-art::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(6,8,13,.65), rgba(6,8,13,0) 50%);
}
.store-art.has-image::before {
  display: none;
}
.store-name {
  position: absolute; top: 8px; left: 8px; right: 8px; z-index: 1;
  text-align: center;
  font-size: clamp(12px, 1.15vw, 15px); font-weight: 800; line-height: 1.15;
  text-shadow: 0 2px 0 #06080d, 0 0 8px rgba(6,8,13,.9);
}
.store-badge {
  position: absolute; right: 6px; bottom: 6px; z-index: 1;
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
  background: var(--accent); color: #0d1030;
}
.store-price {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 10px;
  background: var(--bar, rgba(255,255,255,.05));
  border-top: 2px solid var(--border);
  font-size: clamp(13px, 1.1vw, 15px); font-weight: 800;
}
.store-price img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  image-rendering: pixelated;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}

/* ---------- store item info dialog ---------- */
.item-dialog {
  width: min(460px, calc(100vw - 24px));
}
.item-dialog-body {
  gap: 12px;
}
.item-dialog-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 180px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background-color: var(--panel-2);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.item-dialog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-2);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
}
.item-dialog-label {
  font-size: 13px;
  color: var(--muted);
}
.item-dialog-price {
  border-top: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 15px;
}
.item-dialog-info span {
  margin-top: 6px;
  line-height: 1.5;
  color: var(--text);
}
.item-dialog-btn {
  margin-top: 2px;
}

/* ---------- news dialog ---------- */
.news {
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  width: min(640px, calc(100vw - 24px));
  max-height: min(80vh, 640px);
  padding: 0;
  margin: auto;
  overflow: hidden;
}
.news[open] { display: flex; flex-direction: column; }
.news::backdrop { background: rgba(3,4,8,.78); }
.news-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 2px solid var(--border);
}
.news-head h2 { font-size: 17px; }
.news-close {
  background: none; border: 2px solid var(--border);
  border-radius: 999px; padding: 3px 14px; font-size: 12px;
}
.news-close:hover { border-color: var(--border-hi); }
.news-body { overflow-y: auto; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.feed-item {
  background: var(--panel-2);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}
.feed-date { font-size: 12px; color: var(--muted); }
.feed-item strong { display: block; font-size: 15px; margin-top: 2px; }
.feed-item span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; white-space: pre-line; }

/* ---------- responsive (tablet & mobile) ---------- */
@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 10px;
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--side);
    padding: 8px 12px;
    height: 58px;
    overflow: hidden;
    position: sticky;      /* stays at the top while scrolling */
    top: 8px;
    z-index: 15;           /* above content, below the open sidebar (20) */
    box-shadow: 0 6px 16px rgba(0,0,0,.35);
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 135px;
    height: 44px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .mobile-brand img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(3, 4, 8, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  .sidebar-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    top: 10px;
    left: 10px;
    bottom: 10px;
    width: min(260px, 80vw);
    height: auto;
    transform: translateX(-110%);
    visibility: hidden;
    transition: transform .2s ease, visibility 0s linear .2s;
  }
  .sidebar.open { transform: none; visibility: visible; transition-delay: 0s; }

  .main { gap: 12px; }
  .content { gap: 28px; }
  html { scroll-padding-top: var(--snap-top); }   /* sticky menu + wallet bars must not cover focus / anchors */
  .banner { aspect-ratio: 16 / 9; min-height: 175px; }
  .banner-text { left: 16px; right: 16px; bottom: 14px; }
  .banner-text h1 { font-size: clamp(18px, 4.8vw, 26px); }
  .banner-text p { font-size: 13px; }
  .banner-count { top: 10px; right: 10px; font-size: 11px; padding: 3px 8px; }

  .block { padding: 14px 16px 16px; }
  .block h2 { font-size: 16px; margin-bottom: 12px; }
  .activities { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
  .dl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dl-btn { padding: 14px 18px; font-size: 18px; }
  .activity { min-height: 135px; padding: 12px 14px; }
  .dl-card { padding: 16px; }
  .dl-card h3 { font-size: 19px; }

  /* store: 3 columns on tablet, compact banner */
  .store-banners, .store-sections { gap: 10px; }
  .store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}

@media (max-width: 600px) {
  .dl-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .layout { padding: 8px; gap: 10px; }
  .mobile-bar { height: 54px; padding: 6px 10px; }
  .mobile-brand { width: 120px; height: 40px; }
  .banner { aspect-ratio: 16 / 10; min-height: 155px; }
  .banner-text { left: 12px; right: 12px; bottom: 12px; }
  .banner-text h1 { font-size: 18px; }
  .banner-text p { font-size: 12px; margin-top: 2px; }
  .activities { grid-template-columns: 1fr; }
  .activity { min-height: 125px; }
  .news { width: calc(100vw - 16px); max-height: 85vh; }
  .news-head { padding: 12px 14px; }
  .news-body { padding: 12px 14px 14px; }

  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .store-art { max-height: 95px; }
  .store-name { top: 6px; left: 6px; right: 6px; font-size: 12px; }
  .store-price { padding: 5px 8px; gap: 5px; font-size: 13px; }
  .store-price img { width: 16px; height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- news page: list of dev updates ---------- */
.updates { display: flex; flex-direction: column; gap: 16px; position: relative; padding-left: 22px; }
.updates::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.update {
  position: relative;
  background: var(--panel-2);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px 18px;
}
.update::before {
  content: ""; position: absolute; left: -23px; top: 22px;
  box-sizing: border-box; width: 12px; height: 12px; border-radius: 50%;
  background: var(--side); border: 2px solid var(--border-hi);
}
.update.progress::before { background: #e0a93b; border-color: #e0a93b; box-shadow: 0 0 10px rgba(224,169,59,.6); }
.update.released::before { background: #4cc38a; border-color: #4cc38a; }
.update-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.update-status {
  font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 999px;
  background: rgba(255,255,255,.1);
}
.update.progress .update-status { background: rgba(224,169,59,.2); color: #f0c56a; }
.update.released .update-status { background: rgba(76,195,138,.2); color: #6fd8a6; }
.update-date { font-size: 12px; color: var(--muted); }
.update h3 { font-size: 16px; margin-bottom: 4px; }
.update p { font-size: 14px; color: var(--muted); font-weight: 600; white-space: pre-line; }


/* ---------- download pop-up ---------- */
.dl-dialog {
  border: 3px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  width: min(420px, calc(100vw - 24px));
  padding: 0;
  margin: auto;
}
.dl-dialog::backdrop { background: rgba(3,4,8,.78); }
.dl-dialog { max-height: calc(100vh - 24px); overflow-y: auto; }
.pop-heading { text-align: left; font-size: 15px; color: #ff6b6b; margin-bottom: -6px; }
.dl-pop { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 16px; align-items: stretch; text-align: center; }
.dl-pop h3 { font-size: 20px; }
.pop-steps { text-align: left; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; font-weight: 700; }
.pop-steps li::marker { color: var(--muted); font-weight: 800; }
.pop-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pop-steps .pop-row { justify-content: flex-start; }
.pop-btn {
  display: inline-block; padding: 10px 16px;
  background: var(--panel-2); color: var(--text);
  border: 2px solid var(--border); border-radius: 8px;
  font-size: 14px; font-weight: 800; font-family: inherit; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.pop-btn:hover { border-color: var(--border-hi); }
.pop-btn.done { background: #1f6b46; border-color: #4cc38a; }
.pop-btn:disabled { opacity: .5; cursor: not-allowed; }
.pop-close {
  align-self: center; padding: 10px 26px;
  background: #d6293e; color: #fff; border: 0; border-radius: 8px;
  font-size: 14px; font-weight: 800; font-family: inherit; cursor: pointer;
}
.pop-close:hover { background: #ea3a50; }
.pop-steps .pop-row { margin-top: 6px; }
.pop-link { color: #ff6b6b; text-decoration: underline; font-weight: 800; }
.pop-steps code { font-family: Consolas, monospace; font-size: 13px; background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 4px; word-break: break-all; }

/* ---------- community section ---------- */
.community { text-align: center; }
.community h2.section-title { font-size: 26px; margin-bottom: 6px; }
.community .lead { margin: 0 0 20px; }
.com-tabs {
  display: inline-flex; gap: 6px; padding: 6px;
  background: var(--panel-2); border: 2px solid var(--border); border-radius: 14px;
  margin-bottom: 22px; max-width: 100%;
  align-self: center;   /* the section is a flex column: keep the bar as wide as its tabs, centered */
}
.com-tab {
  padding: 9px 18px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 800; font-family: inherit; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.com-tab:hover { color: var(--text); }
.com-tab.on { color: #fff; }
.com-panel {
  --com-color: #5865f2;
  display: grid; grid-template-columns: 1fr minmax(240px, 380px); gap: 28px; align-items: center;
  text-align: left;
  background: var(--panel-2); border: 2px solid var(--border); border-radius: 16px;
  padding: 28px 30px;
}
.com-left h3 { font-size: 24px; margin-bottom: 12px; }
.com-accent { color: var(--com-color); text-decoration: underline; text-underline-offset: 4px; }
.com-text { color: var(--muted); font-weight: 700; margin-bottom: 16px; }
.com-join {
  display: inline-block; padding: 11px 22px; border-radius: 10px;
  background: var(--com-color); color: #fff; font-weight: 800; font-size: 15px;
  border: 2px solid rgba(255,255,255,.2);
  transition: transform .15s ease, box-shadow .15s ease;
}
.com-join:hover { transform: translateY(-2px); box-shadow: 0 0 14px rgba(255,255,255,.2); }
.com-extra { color: var(--muted); font-size: 14px; font-weight: 600; margin-top: 16px; }
.com-card { border-radius: 12px; overflow: hidden; background: #1e1f22; border: 2px solid var(--border); }
.com-card-head { background: var(--com-color); color: #fff; font-size: 20px; font-weight: 800; padding: 18px 20px; }
.com-card-body { padding: 26px 20px; font-size: 15px; font-weight: 700; color: #c7c9d1; min-height: 110px; }
@media (max-width: 760px) {
  .com-panel { grid-template-columns: 1fr; padding: 20px 18px; gap: 18px; }
  .community h2.section-title { font-size: 22px; }
  .com-tab { padding: 9px 12px; }
}
.com-ic { display: inline-flex; width: 20px; height: 20px; flex: none; }
.com-ic svg, .com-ic img { width: 100%; height: 100%; object-fit: contain; }
.com-tab { display: inline-flex; align-items: center; gap: 8px; }
.com-join { display: inline-flex; align-items: center; gap: 8px; }
.com-card-head { display: flex; align-items: center; gap: 10px; }
.com-card-head .com-ic { width: 26px; height: 26px; }
@media (max-width: 480px) { .com-tab .com-ic { width: 16px; height: 16px; } }


/* =====================================================================
   POLISH PASS (accessibility, touch targets, consistent states)
   ===================================================================== */
.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; }
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 1000;
  background: var(--accent); color: #0d1030; font-weight: 800;
  padding: 10px 16px; border-radius: 8px; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }
#main:focus { outline: none; }

/* touch targets >= 44px */
.nav a { min-height: 44px; }
.menu-btn { min-height: 44px; padding: 10px 14px; }
.com-tab { min-height: 44px; }
.pop-btn { min-height: 44px; }
.pop-close { min-height: 44px; }
.news-close { min-height: 44px; }
.btn { min-height: 44px; }

/* one consistent keyboard focus ring */
.nav a:focus-visible, .dl-btn:focus-visible, .com-tab:focus-visible, .pop-btn:focus-visible,
.pop-close:focus-visible, .com-join:focus-visible, .menu-btn:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.com-panel:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* sidebar current page: also shown with a bar (not color/glow alone) */
.nav a.active { position: relative; }
.nav a.active::before {
  content: ""; position: absolute; left: -2px; top: 10px; bottom: 10px; width: 4px;
  border-radius: 4px; background: var(--accent);
}

/* press feedback */
.dl-btn:active, .com-join:active, .pop-btn:active, .activity:active, .store-item:active { transform: scale(.98); }

/* banner pause / play */
.banner-wrap { position: relative; }
.banner-pause {
  position: absolute; left: 12px; top: 12px; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); background: rgba(10,12,18,.7); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: border-color .15s ease, background .15s ease;
}
.banner-pause:hover { border-color: #fff; background: rgba(10,12,18,.9); }
.banner-pause:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.banner-pause::before {            /* pause icon */
  content: ""; width: 12px; height: 14px;
  border-left: 4px solid currentColor; border-right: 4px solid currentColor;
}
.banner-pause.paused::before {     /* play icon */
  width: 0; height: 0; border: 0;
  border-left: 13px solid currentColor; border-top: 8px solid transparent; border-bottom: 8px solid transparent;
  margin-left: 3px;
}

/* phones: comfortable section padding and readable body size */
@media (max-width: 600px) {
  .block { padding: 18px 16px 20px; }
  .block h2 { font-size: 18px; }
  .com-text, .com-extra, .update p, .block .lead { font-size: 15px; }
  .banner-pause { left: 8px; top: 8px; }
}


/* ---------- news: show more ---------- */
.update[hidden] { display: none; }
.news-more {
  align-self: center; margin-top: 16px; min-height: 44px; padding: 10px 22px;
  background: var(--panel-2); color: var(--text); font-weight: 800; font-family: inherit;
  border: 2px solid var(--border); border-radius: 10px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.news-more:hover { border-color: var(--border-hi); background: rgba(255,255,255,.06); }
.news-more:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#news .block, #news { text-align: left; }
#news { display: flex; flex-direction: column; }

/* ---------- limited-time items ---------- */
.store-timer {
  position: absolute; left: 6px; bottom: 6px; z-index: 2;
  background: rgba(10,12,18,.82); color: #ffd36a; border: 1px solid rgba(255,211,106,.45);
  border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 800;
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.item-dialog-timer {
  text-align: center; font-weight: 800; color: #ffd36a; font-variant-numeric: tabular-nums;
  background: rgba(255,211,106,.1); border: 1px solid rgba(255,211,106,.35);
  border-radius: 10px; padding: 8px 12px;
}

/* =====================================================================
   BLUE THEME (toggle in the top bar; same colors as EASEL Market "blue")
   Night stays the default :root palette at the top of this file.
   ===================================================================== */
html[data-theme="blue"] {
  --bg:        #1b4560;
  --side:      #173f5a;
  --panel:     #1f5f84;   /* white text >= 6:1 */
  --panel-2:   #2a6f96;
  --border:    #ffffff;
  --border-hi: #ffd24a;
  --text:      #ffffff;
  --muted:     #dbeef8;
  --good:      #3ddc84;
  --bad:       #ff6b6b;
  --accent:    #ffd24a;
  --scroll-track: #173f5a;
  --scroll-thumb: #4a9ccb;
}
html[data-theme="blue"] .btn { color: #1b2a3a; }
html[data-theme="blue"] .nav a.active { box-shadow: 0 0 14px rgba(255,210,74,.35), inset 0 0 10px rgba(255,210,74,.12); }

.wl-theme-btn { cursor: pointer; }
.wl-theme-ic {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  box-shadow: inset -4px -2px 0 0 currentColor;          /* crescent moon (switch to Night) */
}
html:not([data-theme="blue"]) .wl-theme-ic { box-shadow: none; background: #4a9ccb; border: 2px solid #fff; }   /* blue dot (switch to Blue) */

/* =====================================================================
   SCROLLING
   - themed scrollbar (Firefox: scrollbar-color, Chromium/Safari: ::-webkit-scrollbar)
   - reading-progress bar along the top edge (CSS scroll-driven animation; browsers
     without it simply show no bar, and it is off for prefers-reduced-motion)
   ===================================================================== */
:root { --scroll-track: #0d1018; --scroll-thumb: #2c3350; }
html { scrollbar-color: var(--scroll-thumb) var(--scroll-track); scrollbar-width: thin; overscroll-behavior-y: none; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; border: 3px solid var(--scroll-track); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::-webkit-scrollbar-corner { background: var(--scroll-track); }
.sidebar { scrollbar-width: none; }                      /* the sidebar scrolls but shows no bar */
.sidebar::-webkit-scrollbar { display: none; }
.updates, .news-body, .item-dialog-body { scrollbar-width: thin; }

@supports (animation-timeline: scroll()) {
  body::before {
    content: ""; position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 50;
    background: linear-gradient(90deg, var(--accent), var(--good));
    transform-origin: 0 50%;
    animation: page-progress linear both;
    animation-timeline: scroll(root block);
    pointer-events: none;
  }
  @keyframes page-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}
