/* ZAZA World: RuneScape layout, ZAZA navy/gold/electric-blue palette, pixel UI font. */
:root {
  --navy-950: #030a2c;
  --navy-900: #06124f;
  --navy-800: #0a1a6b;
  --stone: #1c2750;
  --stone-2: #243263;
  --stone-3: #2e3d74;
  --edge-dark: #070b1c;
  --edge-light: #4a5c98;
  --gold: #ffd23f;
  --gold-2: #e8b52a;
  --gold-dark: #8a6410;
  --blue: #1d4bff;
  --cyan: #7fd4ff;
  --text: #f1ecd8;
  --muted: #a9b3d6;
  --rs-yellow: #ffff00;
  --rs-orange: #ff981f;
  --green: #5fe86f;
  --red: #ff5d5d;
  --ui-font: "Jersey 10", ui-monospace, monospace;
  --display: "Titan One", "Arial Black", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1533; color: var(--text); font-family: var(--ui-font); }
body { -webkit-font-smoothing: antialiased; overscroll-behavior: none; font-variant-ligatures: none; font-synthesis: none; letter-spacing: 0.02em; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
/* One scrollbar style everywhere (popups, chat, side panel, title): gold thumb on a navy track. */
* { scrollbar-width: thin; scrollbar-color: var(--gold-2) rgba(3, 10, 44, 0.85); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(3, 10, 44, 0.85); border-radius: 8px; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #ffe066, var(--gold-2)); border-radius: 8px; border: 2px solid rgba(3, 10, 44, 0.85); }
::-webkit-scrollbar-thumb:hover { background: #ffe066; }
::-webkit-scrollbar-corner { background: transparent; }
kbd { font-family: var(--ui-font); font-size: 14px; padding: 1px 6px; border-radius: 4px; background: #0d1638; border: 1px solid #3b4c80; border-bottom-width: 2px; color: #e8e2cc; }

#game {
  position: fixed; inset: 0; width: 100%; height: 100%; display: block;
  image-rendering: pixelated; image-rendering: crisp-edges;
  touch-action: none; outline: none; cursor: default;
}

/* ---------------------------------------------------------------- stone panels */
.stonebox, .side, .chatbox, .hud-panel, .modal, .ctx {
  background: linear-gradient(180deg, var(--stone-2), var(--stone));
  border: 2px solid var(--edge-dark);
  box-shadow: inset 0 0 0 1px var(--edge-light), inset 0 0 0 3px #141d40, 0 6px 18px rgba(0, 0, 0, 0.45);
  border-radius: 6px;
}

.hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.hud > * { pointer-events: auto; }
.hud-tl, .hud-tr, .area-banner { pointer-events: none; }
.hud-tl a, .hud-tl button, .hud-tr button, .hud-tr canvas { pointer-events: auto; }

/* ---------------------------------------------------------------- top left */
.hud-tl { position: absolute; left: 12px; top: 10px; z-index: 7; display: flex; flex-direction: column; gap: 6px; max-width: min(240px, calc(100vw - 300px)); }
.title-row { display: flex; align-items: center; gap: 10px; }
.brand-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 999px;
  background: var(--navy-900); border: 2px solid var(--gold); color: var(--gold); text-decoration: none;
  font-family: var(--display); font-size: 15px; letter-spacing: 0.02em; box-shadow: 0 3px 0 #000a2e;
}
.brand-pill:hover { background: var(--navy-800); }
.world-name { font-family: var(--display); font-size: 18px; color: #fff; text-shadow: 2px 2px 0 #000a2e, -1px -1px 0 #000a2e, 1px -1px 0 #000a2e, -1px 1px 0 #000a2e; letter-spacing: 0.03em; }
.chip { font-family: var(--ui-font); font-size: 13px; font-weight: 700; color: var(--navy-900); background: var(--gold); padding: 2px 6px; border-radius: 4px; vertical-align: 3px; margin-left: 4px; text-shadow: none; }
.hover-text {
  min-height: 20px; font-size: 18px; font-weight: 600; color: #fff;
  text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000, 1px 0 0 #000;
}
.hover-text .t-npc { color: var(--rs-yellow); }
.hover-text .t-obj { color: #62e8ff; }
.hover-text .t-player, .ctx .t-player { color: #fff; }
.hover-text .t-more { color: #fff; font-weight: 400; }

/* ---------------------------------------------------------------- left panel: $ZAZA market cap + your wallet, one card */
.hud-panel { position: absolute; left: 12px; top: 48px; width: 264px; display: flex; flex-direction: column; overflow: visible; transition: width 0.18s ease, transform 0.18s ease; }
.hud-panel.holder { box-shadow: inset 0 0 0 1px var(--gold), inset 0 0 0 3px #141d40, 0 6px 18px rgba(0, 0, 0, 0.45); }
.hud-panel-head {
  display: flex; align-items: center; gap: 8px; padding: 6px 7px 6px 9px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(29, 75, 255, 0.32), rgba(29, 75, 255, 0.08)); border-bottom: 1px solid rgba(255, 210, 63, 0.28);
}
/* One title bar: coin, the ZAZA WORLD wordmark and a small PREVIEW tag, then the minimize button. */
.panel-world { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 17px; line-height: 1; color: #fff; white-space: nowrap; text-shadow: 2px 2px 0 #000a2e; letter-spacing: 0.02em; }
.panel-world b { font-weight: 400; color: var(--gold); }
.panel-coin { flex: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: 0 0 0 2px #000a2e, 0 0 10px rgba(255, 210, 63, 0.55); }
/* Minimize: the same dark "–" tab button as the chat's; "+" when minimized. */
.hud-minimize {
  flex: none; width: 32px; height: 28px; padding: 0 0 2px; display: grid; place-items: center;
  font: 600 16px var(--ui-font); color: var(--muted); background: #141d40; border: 1px solid #000; border-radius: 5px; cursor: pointer;
}
.hud-minimize:hover { color: #fff; }
.hm-mini { display: none; align-items: center; gap: 6px; white-space: nowrap; }
.hm-mini img { border-radius: 50%; flex: none; }
.hm-mini b { font-family: var(--display); font-weight: 400; font-size: 16px; color: #fff; }
.hm-mini em { font-style: normal; font-weight: 700; font-size: 13px; }
.hm-mini em.up { color: var(--green); } .hm-mini em.down { color: var(--red); }
.hud-panel.is-minimized { width: auto; }
.hud-panel.is-minimized .hud-panel-head { gap: 10px; padding: 5px 5px 5px 8px; border: 0; border-radius: 4px; cursor: pointer; }
.hud-panel.is-minimized .panel-world,
.hud-panel.is-minimized .zaza-card, .hud-panel.is-minimized .wallet-card { display: none; }
.hud-panel.is-minimized .hm-mini { display: inline-flex; }
.zaza-card { display: flex; flex-direction: column; align-items: stretch; gap: 7px; padding: 8px 11px 10px 9px; width: 100%; text-align: left; cursor: pointer; background: none; border: 0; }
.zaza-top { display: flex; gap: 10px; align-items: center; }
.zaza-live { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font: 700 12px var(--ui-font); font-style: normal; letter-spacing: 0.1em; color: #ff8a80; text-shadow: none; }
.zaza-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff5d5d; box-shadow: 0 0 0 3px rgba(255, 93, 93, 0.25); animation: blink 1.6s infinite; }
/* Market-cap chart (inline SVG) and ZAZA's level bar. */
.zaza-chart, .mc-chart { position: relative; display: block; border-radius: 6px; background: rgba(3, 10, 44, 0.55); box-shadow: inset 0 0 0 1px #0b1022; overflow: hidden; --r: 6px; }
.zaza-chart { height: 46px; }
.zaza-chart:empty { display: none; }
.zaza-chart svg, .mc-chart svg { position: absolute; left: 0; top: 0; bottom: 0; right: var(--r); width: calc(100% - var(--r)); height: 100%; }
.mc-dot { position: absolute; right: var(--r); width: 7px; height: 7px; border-radius: 50%; background: #ffd23f; transform: translate(50%, -50%); box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.3); animation: blink 1.6s infinite; }
.ax { position: absolute; font-size: 12px; color: var(--muted); pointer-events: none; white-space: nowrap; padding: 0 4px; border-radius: 3px; background: rgba(3, 10, 44, 0.75); }
.ax.rg { left: 4px; top: 3px; }
.ax.hi { left: 8px; top: 5px; } .ax.lo { left: 8px; bottom: 5px; } .ax.span { right: 14px; bottom: 5px; }
.zaza-lv { display: flex; flex-direction: column; gap: 3px; }
.zaza-lv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.zaza-lv-row b { font-family: var(--display); font-weight: 400; font-size: 15px; color: var(--gold); }
.zaza-lv-row small { font-size: 13px; color: var(--muted); }
.zaza-card:hover { background: rgba(255, 255, 255, 0.04); }
/* ZAZA's portrait sits in a ring that fills with his progress to the next level. */
.zaza-portrait { flex: none; width: 60px; height: 60px; padding: 3px; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--lv, 0) * 1turn), #1b2350 0); box-shadow: 0 0 0 2px #000a2e, 0 0 12px rgba(255, 210, 63, 0.3); }
.zaza-portrait > span { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #3a66ff, var(--navy-900)); box-shadow: inset 0 0 0 2px #000a2e; }
.zaza-portrait img { width: 64px; height: 64px; image-rendering: pixelated; margin-top: 4px; }
.zaza-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.zaza-name { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 21px; color: var(--gold); line-height: 1; text-shadow: 2px 2px 0 #000a2e; }
.zaza-name b { font: 700 14px var(--ui-font); color: var(--navy-900); background: linear-gradient(180deg, #ffe066, var(--gold-2)); border: 1px solid #000a2e; border-radius: 4px; padding: 1px 5px 2px; text-shadow: none; }
.zaza-stage { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); }
/* Market-cap mode: a big live number. */
.zaza-card.mc .zaza-xp { font-size: 15px; color: var(--muted); display: flex; align-items: baseline; gap: 8px; }
.zaza-card.mc .zaza-xp b { font-family: var(--display); font-weight: 400; font-size: 24px; color: #fff; line-height: 1.05; }
.zaza-xp i, .stat b.up, .stat b.down { font-style: normal; font-weight: 700; }
.zaza-xp i.up, .stat b.up { color: var(--green); }
.zaza-xp i.down, .stat b.down { color: var(--red); }
.bar { display: block; height: 8px; border-radius: 4px; background: #0a102a; border: 1px solid #000; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb020, var(--gold), #fff3a0); transition: width 0.5s; }
.zaza-xp { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- wallet section (read-only holder view) */
.wallet-card { display: flex; flex-direction: column; gap: 5px; padding: 9px 10px 10px; border-top: 1px solid #0b1022; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); background: rgba(3, 10, 44, 0.28); }
.wallet-card > small { font-size: 14px; color: var(--muted); line-height: 1.25; text-align: center; }
.wallet-connect {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 6px 10px; border-radius: 999px;
  background: linear-gradient(180deg, #ffe066, var(--gold-2)); color: var(--navy-900); border: 2px solid #3a2a00;
  font-family: var(--display); font-size: 16px; box-shadow: inset 0 0 0 1px #fff3b0, 0 3px 0 var(--gold-dark);
}
.wallet-connect:hover { filter: brightness(1.06); }
.wallet-connect img { width: 22px; height: 22px; image-rendering: pixelated; }
.wallet-top { display: flex; align-items: center; gap: 4px; }
.wallet-head { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; padding: 0; background: none; border: 0; text-align: left; }
.wallet-coin { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--gold); background: var(--navy-800); }
.wallet-head span { min-width: 0; flex: 1; }
.wallet-head b { display: flex; align-items: center; gap: 5px; font-size: 18px; color: #fff; white-space: nowrap; min-width: 0; }
.wallet-head b .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wallet-head b em { flex: none; }
.wallet-head em { font-style: normal; font-size: 12px; padding: 1px 5px; vertical-align: 0; margin-left: 0; }
.wallet-head small { display: block; font-size: 13px; color: var(--muted); }
.wallet-icon { flex: none; width: 28px; height: 28px; padding: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.06); border: 1px solid #0b1022; color: var(--muted); font-size: 14px; }
.wallet-icon:hover { color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.wallet-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: baseline; column-gap: 6px; padding: 3px 2px; font-size: 16px; }
.wallet-row + .wallet-row { border-top: 1px dashed rgba(169, 179, 214, 0.18); }
.wallet-row > span { color: var(--muted); font-size: 14px; }
.wallet-row b { color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-row small { font-size: 14px; color: #dfe6ff; white-space: nowrap; text-align: right; }
/* Buy tiles: glossy buttons with the token / card icon on top. */
.wallet-buys-h { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-family: var(--display); font-size: 12px; line-height: 1; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); text-shadow: 1px 1px 0 #000a2e; }
.wallet-buys-h::before, .wallet-buys-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 210, 63, 0), rgba(255, 210, 63, 0.45)); }
.wallet-buys-h::after { background: linear-gradient(90deg, rgba(255, 210, 63, 0.45), rgba(255, 210, 63, 0)); }
.wallet-buys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-bottom: 3px; }
.wallet-buys button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; height: 58px; padding: 6px 2px 5px;
  border-radius: 10px; border: 2px solid #0b1022; color: var(--navy-900); overflow: hidden; cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 3px 0 #0b1022;
  transition: transform 0.08s ease, filter 0.12s ease, box-shadow 0.08s ease;
}
.wallet-buys button::before { content: ""; position: absolute; left: 5px; right: 5px; top: 3px; height: 45%; border-radius: 7px 7px 14px 14px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0)); pointer-events: none; }
.wallet-buys button:hover { transform: translateY(-1px); filter: brightness(1.08) saturate(1.1); }
.wallet-buys button:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.2), 0 1px 0 #0b1022; }
.wallet-buys img { position: relative; width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(0, 10, 46, 0.35)); }
.wallet-buys b { position: relative; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-weight: 400; font-size: 14px; line-height: 1; letter-spacing: 0.02em; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); }
.wb-zaza img { border-radius: 50%; }
.wb-packs img { width: 30px; height: 30px; margin: -2px 0; }
.wb-zaza { background: linear-gradient(180deg, #9dffbd 0%, #45cc75 55%, #2b9d55 100%); }
.wb-cards { background: linear-gradient(180deg, #b4efff 0%, #56b8ff 55%, #2d82e2 100%); }
.wb-packs { background: linear-gradient(180deg, #ffd690 0%, #ff9f35 55%, #e8700a 100%); }
.link-btn { background: none; border: 0; color: var(--cyan); text-decoration: underline; font-size: 17px; }

/* ---------------------------------------------------------------- top right: minimap + orbs */
.hud-tr { position: absolute; right: 12px; top: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.minimap-wrap { position: relative; width: 230px; height: 176px; }
#minimap {
  position: absolute; right: 4px; top: 4px; width: 152px; height: 152px; border-radius: 50%;
  border: 3px solid var(--edge-dark); box-shadow: 0 0 0 3px var(--gold-2), 0 0 0 5px var(--edge-dark), 0 6px 18px rgba(0, 0, 0, 0.5);
  cursor: pointer; image-rendering: pixelated; background: #10204a;
}
.compass {
  position: absolute; right: 136px; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle, #f4ecd4, #c9b98a); border: 2px solid var(--edge-dark); box-shadow: 0 0 0 2px var(--gold-2);
  display: grid; place-items: center; font-family: var(--display); font-size: 13px; color: #b8302a;
}
.orb {
  position: absolute; min-width: 50px; height: 34px; border-radius: 17px; padding: 0 3px 0 9px; display: flex; flex-direction: row-reverse; align-items: center; gap: 4px;
  background: linear-gradient(180deg, #2a3668, #151d42); border: 2px solid var(--edge-dark); box-shadow: inset 0 0 0 1px var(--edge-light), 0 3px 8px rgba(0, 0, 0, 0.4);
}
.orb:hover { box-shadow: inset 0 0 0 1px var(--gold), 0 3px 8px rgba(0, 0, 0, 0.4); }
.orb-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #4a5c98, #10183a); border: 1px solid #000; font-size: 16px; flex: none; }
.orb-icon img { width: 18px; height: 18px; image-rendering: pixelated; }
.orb-val { font-size: 16px; font-weight: 700; color: var(--green); text-shadow: 1px 1px 0 #000; min-width: 18px; text-align: left; }
.orb-run { left: 0; top: 30px; }
.orb-run.on .orb-icon { background: radial-gradient(circle at 40% 35%, #ffe066, #b88a10); }
.orb-sparks { left: 0; top: 66px; }
.orb-sparks .orb-val { color: #fff27a; }
.orb-cards { left: 0; top: 102px; }
.orb-cards .orb-val { color: var(--gold); }
.orb-map { left: 30px; top: 140px; min-width: 36px; padding: 0 4px; }
/* Sparks switched off: close the gap it leaves. */
.no-sparks .orb-cards { top: 66px; }
.no-sparks .orb-map { left: 14px; top: 104px; }
.no-sparks .minimap-wrap { height: 164px; }

/* ---------------------------------------------------------------- banners */
.area-banner {
  position: absolute; left: 50%; top: 14px; transform: translate(-50%, -140%); opacity: 0; visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.18s ease, visibility 0s linear 0.32s;
  padding: 8px 26px 9px; text-align: center; min-width: 240px;
  background: linear-gradient(180deg, #a8744a, #7a4f2c); border: 3px solid #3a2616; border-radius: 6px;
  box-shadow: inset 0 0 0 2px #c8945e, 0 6px 16px rgba(0, 0, 0, 0.45);
}
.area-banner.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition-delay: 0s; }
.area-banner b { display: block; font-family: var(--display); font-size: 22px; color: #fff6e0; text-shadow: 2px 2px 0 #3a2616; }
.area-banner small { display: block; font-size: 16px; color: #ffe6b0; }

/* ---------------------------------------------------------------- chatbox (the social heart of the preview) */
.chatbox { position: absolute; right: 12px; bottom: 12px; width: min(480px, calc(100vw - 300px)); height: clamp(260px, calc(100vh - 230px), 480px); display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(36, 50, 99, 0.93), rgba(24, 34, 72, 0.95)); }
.chat-tabs { display: flex; gap: 2px; padding: 4px 4px 0; border-bottom: 2px solid var(--edge-dark); }
.chat-tabs button { flex: 1; padding: 4px 2px 5px; font-size: 16px; font-weight: 600; color: var(--muted); background: #141d40; border: 1px solid #000; border-bottom: 0; border-radius: 5px 5px 0 0; white-space: nowrap; }
.chat-tabs button.active { color: #fff; background: var(--stone-3); box-shadow: inset 0 2px 0 var(--gold); }
.chat-tabs button:hover:not(.active) { color: #fff; }
.chat-tabs .chat-toggle { flex: 0 0 32px; }
.chat-tabs .chat-side-tabs { flex: 0 0 auto; display: flex; gap: 2px; padding: 0; border-bottom: 0; margin-left: auto; }
.chat-tabs .chat-side-tabs button {
  flex: 0 0 34px; width: 34px; height: 29px; display: grid; place-items: center; padding: 0;
  background: #141d40; border: 1px solid #000; border-bottom: 0; border-radius: 5px 5px 0 0;
}
.chat-tabs .chat-side-tabs button img { width: 22px; height: 22px; image-rendering: pixelated; }
.chat-tabs .chat-side-tabs button.active { background: linear-gradient(180deg, #7a2a2a, #4a1a1a); box-shadow: inset 0 2px 0 var(--gold); }
.chat-tabs .chat-side-tabs button:hover:not(.active) { background: var(--stone-3); }
.chat-status { font-size: 15px; color: #7dffa0; white-space: nowrap; }
.chat-log { flex: 1; overflow-y: auto; padding: 6px 12px; font-size: 19px; line-height: 1.35; }
.chat-log p { margin: 0 0 1px; overflow-wrap: anywhere; }
.chat-log .m-game { color: #ece6d2; }
.chat-log .m-quest { color: var(--rs-orange); }
.chat-log .m-npc { color: #b4ec7a; }
.chat-log .m-public b { color: #fff; }
.chat-log .m-public span { color: var(--cyan); }
.chat-log .m-public b.holder-name { color: var(--gold); }
.chat-log .m-system { color: #c9a8ff; }
.chat-log .chat-empty { color: var(--muted); font-size: 16px; text-align: center; padding: 18px 10px; }
.chat-av { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: -5px; margin-right: 5px; border: 1px solid var(--gold); background: var(--navy-800); }
.holder-name i { font-style: normal; font-size: 13px; color: var(--navy-900); background: var(--gold); border-radius: 3px; padding: 0 3px; margin-left: 4px; vertical-align: 2px; }
.chat-input { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 8px; padding: 6px 8px 8px; border-top: 1px solid #0b1022; background: rgba(3, 10, 44, 0.45); border-radius: 0 0 4px 4px; }
.chat-input label { font-weight: 700; font-size: 18px; color: #fff; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.chat-input input { min-width: 0; padding: 6px 10px; border-radius: 6px; background: #0a1440; border: 2px solid #3b4c80; outline: 0; color: var(--cyan); font: 19px var(--ui-font); }
.chat-input input:focus { border-color: var(--gold); }
.chat-input input::placeholder { color: #6a78a8; }
.chat-tools { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-emotes { display: flex; gap: 3px; }
.chat-emotes button { width: 32px; height: 32px; padding: 0; border-radius: 6px; background: #141d40; border: 1px solid #000; font-size: 16px; line-height: 1; }
.chat-emotes button:hover { box-shadow: inset 0 0 0 1px var(--gold); background: var(--stone-3); }
.chat-send { padding: 6px 16px; border-radius: 6px; background: linear-gradient(180deg, #ffe066, var(--gold-2)); color: var(--navy-900); border: 2px solid #3a2a00; font-family: var(--display); font-size: 16px; box-shadow: inset 0 0 0 1px #fff3b0; }
.chat-send:hover { filter: brightness(1.06); }
.chat-open { position: absolute; right: 12px; bottom: 12px; padding: 8px 14px; border-radius: 8px; background: var(--stone-2); border: 2px solid var(--edge-dark); box-shadow: inset 0 0 0 1px var(--edge-light); font-weight: 700; font-size: 18px; }

/* RuneScape-style dialogue: it takes over the chatbox. */
.dialog { position: absolute; inset: 0; display: flex; gap: 12px; align-items: center; padding: 10px 16px; background: linear-gradient(180deg, #f4ead0, #e4d4a8); border-radius: 4px; color: #2a1e10; cursor: pointer; }
.dialog canvas { width: 120px; height: 132px; image-rendering: pixelated; flex: none; background: radial-gradient(circle at 50% 40%, #fff8e0, #d8c48a); border: 2px solid #8a6a3a; border-radius: 6px; }
.dialog-body { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.dialog-name { font-family: var(--display); font-size: 20px; color: #8a1a10; }
.dialog-name small { font-family: var(--ui-font); font-size: 14px; color: #6a5a3a; margin-left: 6px; }
.dialog-text { font-size: 21px; font-weight: 600; line-height: 1.3; min-height: 3.9em; max-width: 560px; }
.dialog-next { background: none; border: 0; color: #1d3ab8; font-weight: 700; font-size: 17px; padding: 0; }
.dialog-next:hover { color: #0a1a8a; text-decoration: underline; }

/* ---------------------------------------------------------------- side panel */
.side { position: absolute; left: 12px; bottom: 12px; width: 252px; height: 356px; display: flex; flex-direction: column; }
.side-tabs { display: flex; gap: 2px; padding: 4px 4px 0; border-bottom: 2px solid var(--edge-dark); }
.side-tabs button { flex: 1; height: 34px; display: grid; place-items: center; background: #141d40; border: 1px solid #000; border-bottom: 0; border-radius: 5px 5px 0 0; padding: 0; }
.side-tabs button img { width: 24px; height: 24px; image-rendering: pixelated; }
.side-tabs button.active { background: linear-gradient(180deg, #7a2a2a, #4a1a1a); box-shadow: inset 0 2px 0 var(--gold); }
.side-tabs button:hover:not(.active) { background: var(--stone-3); }
.side-body { flex: 1; overflow-y: auto; padding: 8px; }
/* Collapsed until a tab is picked, so the world and the chat get the room. */
.side:not(.open) { height: auto; }
/* Desktop: the tab icons stay put at the bottom; the panel opens above them. */
#side { flex-direction: column-reverse; }
#side .side-tabs { padding: 0 4px 4px; border-bottom: 0; border-top: 2px solid var(--edge-dark); }
#side .side-tabs button { border: 1px solid #000; border-top: 0; border-radius: 0 0 5px 5px; }
#side .side-tabs button.active { box-shadow: inset 0 -2px 0 var(--gold); }
#side:not(.open) .side-tabs { padding: 4px; border-top: 0; }
#side:not(.open) .side-tabs button { border-top: 1px solid #000; border-radius: 5px; }
.side:not(.open) .side-body { display: none; }
.side:not(.open) .side-tabs { border-bottom: 0; padding-bottom: 4px; }
.side:not(.open) .side-tabs button { border-bottom: 1px solid #000; border-radius: 5px; }
/* Phones only: the tabs move to the chat bar, so the open panel carries its own close button. */
.side-close { display: none; position: absolute; top: 6px; right: 6px; z-index: 2; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid var(--gold); background: #141d40; color: #fff; font-size: 16px; line-height: 1; box-shadow: 0 2px 0 #000; }
.side-close:hover { background: #7a2a2a; }
.pane-title { font-family: var(--display); font-size: 18px; color: var(--gold); margin: 0 0 6px; display: flex; justify-content: space-between; align-items: baseline; }
.pane-title small { font-family: var(--ui-font); font-size: 14px; color: var(--muted); }
.pane-note { font-size: 14px; color: var(--muted); line-height: 1.35; margin: 8px 0 0; }



.cardex { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cardex .card { aspect-ratio: 63 / 88; border-radius: 4px; border: 1px solid #000; display: grid; place-items: center; background: #0a102a; overflow: hidden; padding: 0; }
.cardex .card img { width: 100%; height: 100%; display: block; }
.cardex .card:hover { box-shadow: 0 0 0 2px var(--gold); }
.cardex .card.missing { color: #3b4c80; font-family: var(--display); font-size: 20px; background: repeating-linear-gradient(45deg, #0d1535, #0d1535 4px, #111b42 4px, #111b42 8px); }

.emotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.emotes button, .btn {
  padding: 8px 6px; border-radius: 6px; font-weight: 700; font-size: 17px; color: #fff;
  background: linear-gradient(180deg, #34457e, #1f2b58); border: 2px solid var(--edge-dark); box-shadow: inset 0 0 0 1px var(--edge-light);
}
.emotes button:hover, .btn:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.btn-gold { background: linear-gradient(180deg, #ffe066, var(--gold-2)); color: var(--navy-900); box-shadow: inset 0 0 0 1px #fff3b0, 0 3px 0 var(--gold-dark); border-color: #3a2a00; }
.btn-gold:hover { box-shadow: inset 0 0 0 1px #fff, 0 3px 0 var(--gold-dark); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.settings { display: flex; flex-direction: column; gap: 8px; font-size: 17px; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; background: rgba(8, 12, 32, 0.35); }
.toggle input { width: 18px; height: 18px; accent-color: var(--gold); }
.zoom-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; border-radius: 5px; background: rgba(8, 12, 32, 0.35); }
.zoom-row button { min-width: 32px; height: 28px; padding: 0 8px; font-size: 16px; }
.hats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 4px; border-radius: 6px; background: rgba(8, 12, 32, 0.45); border: 1px solid #000; }
.hat img { width: 32px; height: 32px; image-rendering: pixelated; }
.hat span { font-size: 15px; font-weight: 700; }
.hat small { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.1; }
.hat:hover:not([disabled]) { box-shadow: inset 0 0 0 1px var(--gold); }
.hat.on { box-shadow: inset 0 0 0 2px var(--gold); background: rgba(255, 210, 63, 0.1); }
.hat[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------------------------------------------------------------- context menu (RuneScape "Choose Option") */
.ctx { position: fixed; z-index: 30; min-width: 170px; padding: 0 0 3px; border-radius: 2px; background: #5d5447; border: 1px solid #000; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); font-size: 18px; font-weight: 600; }
.ctx-head { background: #000; color: #5d5447; padding: 2px 6px; font-weight: 700; }
.ctx button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 2px 8px; color: #fff; white-space: nowrap; text-shadow: 1px 1px 0 #000; }
.ctx button:hover, .ctx button:focus { color: var(--rs-yellow); outline: none; background: rgba(0, 0, 0, 0.18); }
.ctx .t-npc { color: var(--rs-yellow); }
.ctx .t-obj { color: #62e8ff; }

/* ---------------------------------------------------------------- player card (hover or click a player) */
.player-card {
  position: fixed; left: 0; top: 0; z-index: 15; width: 262px; padding: 10px 12px; border-radius: 10px; pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 34, 133, 0.97), rgba(6, 18, 79, 0.97)); border: 2px solid #000a2e;
  box-shadow: 0 0 0 2px var(--edge-light), 0 10px 24px rgba(0, 0, 0, 0.5);
}
.player-card.holder { box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(255, 210, 63, 0.3), 0 10px 24px rgba(0, 0, 0, 0.5); }
.player-card.pinned { pointer-events: auto; }
.pc-top { display: flex; gap: 10px; align-items: center; }
.pc-av { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--gold); background: var(--navy-800); }
.pc-av.pixel { image-rendering: pixelated; border-radius: 10px; border-color: var(--edge-light); background: radial-gradient(circle at 50% 40%, #3a66ff, var(--navy-900)); }
.pc-id { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pc-id b { max-width: 172px; font-family: var(--display); font-weight: 400; font-size: 19px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-id .chip { margin-left: 0; font-size: 12px; }
.chip.guest { background: var(--stone-3); color: #fff; }
.pc-id small { font-size: 13px; color: var(--muted); }
.pc-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 3px 8px; border-radius: 5px; background: rgba(3, 10, 44, 0.55); font-size: 16px; }
.pc-row span { color: var(--muted); }
.pc-row b { color: var(--gold); }
.pc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pc-tags span { font-size: 13px; color: var(--cyan); border: 1px solid #1d4bff; border-radius: 4px; padding: 1px 6px; }
.pc-note { font-size: 15px; color: var(--muted); margin: 8px 0 0; line-height: 1.3; }
.pc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pc-actions .btn { padding: 5px 9px; font-size: 15px; }

/* ---------------------------------------------------------------- modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(3, 8, 30, 0.55); display: grid; place-items: center; padding: 16px; }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px 22px 18px; }
.modal-x { position: absolute; right: 10px; top: 8px; width: 30px; height: 30px; border-radius: 6px; background: #7a2a2a; border: 2px solid #000; font-weight: 700; }
.modal h2 { font-family: var(--display); font-weight: 400; color: var(--gold); font-size: 24px; margin: 0 0 4px; }
.modal .sub { color: var(--muted); font-size: 17px; margin: 0 0 12px; }
.modal p { font-size: 18px; line-height: 1.45; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.stat { padding: 10px; border-radius: 6px; background: rgba(8, 12, 32, 0.45); border: 1px solid #000; }
.stat small { display: block; font-size: 14px; color: var(--muted); }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 21px; color: #fff; margin-top: 2px; }
.stat b.gold { color: var(--gold); }
.live-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; color: #fff; background: #b8302a; border-radius: 4px; padding: 2px 7px; vertical-align: 3px; margin-left: 6px; }
.live-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
.demo-tag { display: inline-block; font-size: 14px; font-weight: 700; color: var(--navy-900); background: var(--cyan); border-radius: 4px; padding: 2px 7px; vertical-align: 3px; margin-left: 6px; }
@keyframes blink { 50% { opacity: 0.2; } }
.board { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.board-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; border-radius: 6px; background: rgba(8, 12, 32, 0.45); color: inherit; font: inherit; font-size: 18px; text-align: left; cursor: pointer; transition: background 0.12s, box-shadow 0.12s; }
.board-row:hover, .board-row:focus-visible { background: rgba(29, 75, 255, 0.35); box-shadow: inset 0 0 0 1px var(--cyan); outline: none; }
.board .rank { flex: none; width: 26px; font-family: var(--display); color: var(--gold); text-align: center; }
.board img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1px solid #000; background: #0a1a6b; }
.board .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .val { white-space: nowrap; text-align: right; line-height: 1.05; }
.board .val b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--gold); }
.board .val small { display: block; font-size: 15px; color: #dfe6ff; }
.board .nm .tier-ico { width: 16px; height: 16px; margin-right: 6px; }

/* ---------------------------------------------------------------- live multiplayer */
.mini-legend { display: flex; gap: 10px; padding: 3px 9px; border-radius: 8px; background: rgba(6, 12, 40, 0.8); font-size: 14px; color: #dfe6ff; pointer-events: auto; }
.mini-legend span { display: inline-flex; align-items: center; gap: 4px; }
.mini-legend i { flex: none; border: 1px solid #1b1424; }
.mini-legend .lg-you { width: 7px; height: 7px; background: #fff; box-shadow: 0 0 0 1.5px #5fd0ff; }
.mini-legend .lg-player { width: 6px; height: 6px; border-radius: 50%; background: #ffffff; }
.mini-legend .lg-holder { width: 8px; height: 8px; background: #ffd23f; transform: rotate(45deg); margin: 0 2px; }
.mini-legend span:last-child { color: var(--gold); font-weight: 700; }
.chat-status.on { color: #7dffa0; }
/* Players online: a live pill next to the world name, and a line on the title screen. */
.online-wrap { position: relative; display: inline-flex; pointer-events: auto; }
/* The players-online dropdown under the counter (desktop). */
.online-drop {
  position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); width: 300px; max-height: min(60vh, 460px); overflow-y: auto;
  padding: 10px; border-radius: 12px; background: linear-gradient(180deg, var(--stone-2), var(--stone)); border: 2px solid var(--edge-dark);
  box-shadow: inset 0 0 0 1px var(--edge-light), 0 10px 26px rgba(0, 0, 0, 0.5); pointer-events: auto; text-align: left;
}
.online-drop .drop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px; }
.online-drop .drop-head b { font-family: var(--display); font-weight: 400; font-size: 16px; color: #7dffa0; }
.online-drop .drop-head small { font-size: 13px; color: var(--muted); }
.online-drop .online-list { margin-top: 8px; gap: 6px; }
.online-drop .online-player { padding: 6px 8px; }
.online-drop .online-player img { width: 32px; height: 32px; }
.online-player img.pixel { border-radius: 8px; object-fit: contain; background: radial-gradient(circle at 50% 40%, #3a66ff, var(--navy-900)); }
.online-player.me { box-shadow: inset 0 0 0 1px #5fd0ff; }
.online-player small { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.online-player small .tier-ico { width: 13px; height: 13px; }
/* Desktop: the online counter sits at the top centre; the area banner drops in just below it.
   The ZAZA box takes the top-left corner, with the hover text ("Walk here") just to its right. */
@media (min-width: 761px) {
  .hud-panel { top: 12px; }
  .hud-tl { left: 288px; top: 14px; max-width: max(150px, calc(50vw - 350px)); }
  .hud-tl .online-wrap { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 8; }
  .area-banner { top: 50px; }
}
.online-faces { display: none; }
.online-faces .face { position: relative; width: 32px; height: 32px; margin-left: -6px; padding: 0; border-radius: 50%; border: 2px solid var(--tc); background: var(--navy-800); box-shadow: 0 0 8px var(--tc), 0 2px 0 #000a2e; }
.online-faces .face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.online-faces .face.top { width: 36px; height: 36px; }
.online-faces .face em { position: absolute; right: -6px; bottom: -5px; font-style: normal; font-size: 11px; font-weight: 700; padding: 0 3px; border-radius: 4px; color: var(--navy-900); background: var(--tc); border: 1px solid #1b1424; }
.online-faces .face:hover { transform: translateY(-2px); z-index: 1; }
.online-faces .face-more { margin-left: 6px; font-size: 14px; font-weight: 700; color: #fff; text-shadow: 0 1px 0 #000; }
.online-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(6, 12, 40, 0.85); border: 1.5px solid #37a862; color: #fff; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.online-pill b { color: #7dffa0; font-size: 17px; }
.online-pill i, .title-online i { width: 8px; height: 8px; border-radius: 50%; background: #5fe86f; box-shadow: 0 0 0 3px rgba(95, 232, 111, 0.25); animation: blink 1.6s infinite; }
.online-list { display: grid; gap: 8px; margin-top: 12px; }
.online-player {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; text-align: left;
  border-radius: 8px; border: 2px solid #0b1022; background: rgba(8, 18, 70, 0.9); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.online-player.holder { border-color: var(--tc); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 10px color-mix(in srgb, var(--tc) 35%, transparent); }
.online-player:hover { border-color: var(--gold); }
.online-player img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--tc); background: var(--navy-800); image-rendering: pixelated; flex: none; }
.online-player span { min-width: 0; display: grid; gap: 2px; }
.online-player b { font-size: 17px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-player small { color: var(--muted); font-size: 14px; }
.title-online { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px; font-size: 17px; color: #dfe6ff; }
.title-online b { color: #7dffa0; font-size: 19px; }
.chat-status.wait { color: var(--gold); }
.chat-status.off { color: var(--muted); }
.dm-chip { margin-right: auto; padding: 3px 9px; border-radius: 999px; background: rgba(255, 159, 208, 0.15); border: 1px solid #ff9fd0; color: #ffb8dc; font-size: 14px; font-weight: 700; }
.chat-log .m-private { color: #ffb8dc; }
.chat-log .m-private b { color: #ff9fd0; }
.chat-log [data-peer] { cursor: pointer; }
.chat-log [data-peer]:hover { text-decoration: underline; }
.ch-tag { font-style: normal; font-size: 12px; font-weight: 700; padding: 0 5px; margin-right: 5px; border-radius: 3px; vertical-align: 2px; }
.ch-holders { background: var(--gold); color: var(--navy-900); }
.ch-vault { background: var(--cyan); color: var(--navy-900); }
.wallet-verify { width: 100%; padding: 5px 8px; border-radius: 6px; font-size: 14px; font-weight: 700; color: var(--navy-900); background: linear-gradient(180deg, #ffe066, var(--gold-2)); border: 2px solid #3a2a00; text-align: center; }
.wallet-verify.ok { background: rgba(95, 232, 111, 0.12); border-color: rgba(95, 232, 111, 0.5); color: #7dffa0; }
.badge-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin: 0 0 10px; border-radius: 10px; background: rgba(3, 10, 44, 0.55); border: 1px solid #1d2f8a; font-size: 16px; }
.badge-box span { flex: 1; min-width: 200px; }

/* First finders, moderation. */
.first-finder { padding: 8px 10px; border-radius: 8px; background: rgba(255, 210, 63, 0.12); border: 1px solid rgba(255, 210, 63, 0.5); font-size: 16px !important; }
.first-finder b { color: var(--gold); }
.cardex .card { position: relative; }
.cardex .card.first::after { content: "🏆"; position: absolute; right: -2px; top: -4px; font-size: 14px; filter: drop-shadow(0 1px 0 #000); }
.ff-title { margin: 12px 0 4px; font-family: var(--display); font-weight: 400; font-size: 15px; color: var(--gold); }
.ff-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ff-list li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 6px; border-radius: 4px; background: rgba(3, 10, 44, 0.45); }
.ff-list li.me { box-shadow: inset 0 0 0 1px var(--gold); }
.ff-list span { color: var(--muted); } .ff-list b { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-admin { align-items: center; padding-top: 6px; border-top: 1px dashed rgba(255, 93, 93, 0.4); }
.pc-admin span { font-size: 12px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.05em; }
.report-reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }

/* Power line popup: the multisig charge as a segmented battery. */
.power-box { padding: 14px 16px 12px; margin: 6px 0 12px; border-radius: 12px; border: 2px solid var(--gold); background: radial-gradient(ellipse at 15% 0%, rgba(255, 210, 63, 0.18), transparent 60%), linear-gradient(180deg, #0d2285, var(--navy-900)); box-shadow: 0 0 20px rgba(255, 210, 63, 0.25); }
.power-head { display: flex; align-items: baseline; gap: 10px; }
.power-head b { font-family: var(--display); font-weight: 400; font-size: 36px; color: var(--gold); text-shadow: 0 3px 0 #8a6410; }
.power-head span { font-size: 17px; color: #dfe6ff; }
.power-head em { margin-left: auto; font-style: normal; font-family: var(--display); font-size: 22px; color: #fff; }
.power-bar { position: relative; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 10px 14px 6px 0; padding: 5px; border-radius: 8px; background: #050a1e; border: 2px solid #1b1424; box-shadow: inset 0 0 0 1px #3b4c80; }
.power-bar i { height: 26px; border-radius: 3px; background: linear-gradient(90deg, #ffd23f var(--f), #14203f var(--f)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25); }
.power-bar .power-tip { position: absolute; right: -12px; top: 50%; width: 8px; height: 16px; transform: translateY(-50%); border-radius: 0 3px 3px 0; background: #3b4c80; border: 2px solid #1b1424; border-left: 0; }
.power-box p { margin: 6px 0 0; font-size: 16px; color: #dfe6ff; }

/* Vault popup: the site's vault.js charge flow, styled for the World. */
.vault-charge-title { margin-top: 16px; }
.wv { font-size: 17px; line-height: 1.4; }
.wv p { font-size: 17px; margin: 0 0 10px; }
.wv strong { color: #fff; }
.wv .muted { color: var(--muted); }
.wv a { color: var(--gold); }
.wv .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.wv .btn-yellow { background: linear-gradient(180deg, #ffe066, var(--gold-2)); color: var(--navy-900); border: 2px solid #3a2a00; box-shadow: inset 0 0 0 1px #fff3b0, 0 3px 0 var(--gold-dark); }
.wv .btn-yellow:hover:not([disabled]) { filter: brightness(1.06); }
.wv .btn-outline { background: transparent; border: 2px solid #3b4c80; color: #fff; box-shadow: none; }
.wv .btn-sm { padding: 7px 12px; font-size: 16px; }
.wv .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.wv .vault-charge-button { width: 100%; padding: 12px; font-family: var(--display); font-size: 20px; font-weight: 400; margin: 4px 0 2px; }
.wv .link-button { background: none; border: 0; padding: 0; color: var(--cyan); text-decoration: underline; font: inherit; }
.wv .vault-caps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 12px; }
.wv .vault-caps button { padding: 8px 12px; border-radius: 8px; background: #141d40; border: 2px solid #3b4c80; color: #fff; font-weight: 700; font-size: 16px; }
.wv .vault-caps button[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 210, 63, 0.15); color: var(--gold); }
.wv .vault-caps .vault-cap-max { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1px; font-family: var(--display); font-weight: 400; font-size: 18px; }
.wv .vault-cap-max small { font-family: var(--ui-font); font-size: 14px; color: var(--muted); }
.wv .vault-caps-or { width: 100%; font-size: 15px; color: var(--muted); }
.wv .vault-caps input { width: 110px; padding: 8px 10px; border-radius: 8px; border: 2px solid #3b4c80; background: #0a1440; color: #fff; font: 16px var(--ui-font); }
.wv .vault-caps input:focus { outline: none; border-color: var(--gold); }
.wv .vault-flag { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 152, 31, 0.12); border: 1px solid rgba(255, 152, 31, 0.5); }
.wv .vault-flag strong { display: block; color: #ffc070; font-size: 16px; }
.wv .vault-flag p { font-size: 15px; margin: 4px 0 0; }
.wv .vault-expect { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(3, 10, 44, 0.55); border: 1px solid #1d2f8a; font-size: 15px; }
.wv .vault-expect .label { display: block; margin-bottom: 4px; font-weight: 700; color: var(--cyan); }
.wv .vault-expect ul { margin: 0; padding-left: 18px; }
.wv .vault-expect li { margin: 3px 0; }
.wv .vault-expect p { font-size: 15px; margin: 6px 0 0; }
.wv .vault-me { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.wv .vault-me div { padding: 10px; border-radius: 8px; background: rgba(3, 10, 44, 0.45); border: 1px solid #000; }
.wv .vault-me dt { font-size: 14px; color: var(--muted); }
.wv .vault-me dd { margin: 2px 0 0; font-family: var(--display); font-size: 20px; color: var(--gold); }
.wv .vault-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wv .vault-msg { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); }
.wv .vault-msg.is-error { color: #ffb0a0; background: rgba(255, 93, 93, 0.1); }
.wv .vault-msg.is-ok { color: #7dffa0; }
.wv .vault-test-banner { padding: 8px 10px; border-radius: 8px; background: rgba(127, 212, 255, 0.12); }

/* ZAZA popup: big chart, level progress and the level ladder. */
.mc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.modal h2 .h2-coin { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--gold); vertical-align: -6px; margin-right: 8px; box-shadow: 0 2px 0 #000a2e; }
.mc-head .mc-coin { width: 30px; height: 30px; border-radius: 50%; align-self: center; border: 2px solid var(--gold); }
.mc-head b { font-family: var(--display); font-weight: 400; font-size: 34px; color: var(--gold); }
.mc-head i { font-style: normal; font-weight: 700; font-size: 18px; }
.mc-head i.up { color: var(--green); } .mc-head i.down { color: var(--red); }
.mc-head small { font-size: 15px; color: var(--muted); }
.mc-chart { height: 170px; margin: 8px 0 12px; --r: 10px; }
.mc-chart .ax { font-size: 14px; }
.lv-box { padding: 10px 12px; border-radius: 8px; background: rgba(3, 10, 44, 0.45); margin-bottom: 10px; }
.lv-box .bar { height: 12px; margin-top: 6px; }
.lv-box .zaza-lv-row b { font-size: 18px; } .lv-box .zaza-lv-row small { font-size: 15px; }
.lv-box .zaza-lv-row b { color: var(--lc, var(--gold)); }
.lv-box .bar > span { background: linear-gradient(90deg, var(--lc, #ffb020), var(--lc2, var(--gold))); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
/* Level ladder: each tile has its level's colour (--lc). Reached = bright with a tick, current = glowing gold with
   its own progress bar, not reached yet = faded with a padlock. */
.lv-ladder { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 6px; }
.lv-ladder li {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 11px 4px 9px; border-radius: 10px; text-align: center;
  background: linear-gradient(180deg, rgba(40, 60, 170, 0.45), rgba(3, 10, 44, 0.7));
  background: linear-gradient(180deg, color-mix(in srgb, var(--lc, #ffd23f) 16%, #0c1650), #070d33);
  border: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 0 #000a2e;
  transition: opacity 0.2s, transform 0.15s;
}
.lv-ladder li:not(.evo)::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--lc); box-shadow: 0 0 8px var(--lc); }
.lv-ladder li:not(.evo) b { color: var(--lc); text-shadow: 0 2px 0 #000a2e; }
.lv-ladder li.locked:not(.evo) { opacity: 0.55; filter: saturate(0.45); }
.lv-ladder li:not(.evo) b { white-space: nowrap; }
.lv-ladder li.locked:not(.evo)::before { box-shadow: none; }
.lv-ladder li.now:not(.evo) {
  border-color: var(--gold); background: linear-gradient(180deg, rgba(255, 210, 63, 0.32), rgba(255, 210, 63, 0.07) 70%, rgba(7, 13, 51, 0.9));
  box-shadow: 0 0 0 2px var(--gold), 0 0 16px rgba(255, 210, 63, 0.45), 0 2px 0 #000a2e; animation: lv-glow 2.4s ease-in-out infinite;
}
@keyframes lv-glow { 50% { box-shadow: 0 0 0 2px var(--gold), 0 0 26px rgba(255, 210, 63, 0.7), 0 2px 0 #000a2e; } }
.lv-tag { position: absolute; right: -5px; top: -6px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1px solid #000; font-style: normal; font-size: 10px; font-weight: 800; line-height: 1; box-shadow: 0 2px 0 #000a2e; }
.lv-tag.ok { background: var(--green); color: #062b10; }
.lv-tag.lock { background: #1a2466; color: #c9d0f0; }
.lv-now { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 2px 7px; border-radius: 6px; font-style: normal; font-family: var(--display); font-size: 11px; line-height: 1.1; letter-spacing: 0.06em; color: #2a1a00; background: linear-gradient(180deg, #fff3a0, var(--gold)); border: 1px solid #000; box-shadow: 0 2px 0 #000a2e; white-space: nowrap; }
.lv-mini { display: block; width: 82%; height: 5px; margin-top: 5px; border-radius: 3px; background: rgba(3, 10, 44, 0.85); border: 1px solid #000; overflow: hidden; }
.lv-mini > span { display: block; height: 100%; background: linear-gradient(90deg, #ffb020, var(--gold), #fff3a0); }
/* Level 11: the evolution, a "Who's that Pokémon?" showpiece with a rotating rainbow border. */
@property --evo-ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.lv-ladder li.evo {
  grid-column: 1 / -1; position: relative; overflow: hidden; display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 14px;
  padding: 14px 16px; text-align: left; border: 3px solid transparent; border-radius: 12px;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 210, 63, 0.25), transparent 60%) padding-box,
    linear-gradient(135deg, #1a0f4a, #0d2285 55%, #3a0f5a) padding-box,
    conic-gradient(from var(--evo-ang), #ff6ad0, #ffe36a, #6affc8, #6ab4ff, #c06aff, #ff6ad0) border-box;
  box-shadow: 0 0 22px rgba(255, 210, 63, 0.45), 0 0 44px rgba(192, 106, 255, 0.25);
  animation: evo-spin 4s linear infinite;
}
@keyframes evo-spin { to { --evo-ang: 360deg; } }
.evo-sil { position: relative; width: 88px; height: 88px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(255, 246, 200, 0.9), rgba(255, 210, 63, 0.35) 45%, transparent 70%); animation: evo-pulse 2.4s ease-in-out infinite; }
.evo-sil img { width: 80px; height: auto; image-rendering: pixelated; filter: brightness(0) drop-shadow(0 0 2px #fff) drop-shadow(0 0 8px #ffd23f); }
.evo-sil em { position: absolute; font-style: normal; font-family: var(--display); font-size: 40px; color: #fff; text-shadow: 0 3px 0 #8a6410, 0 0 14px #ffd23f; animation: bob 2s ease-in-out infinite; }
@keyframes evo-pulse { 50% { transform: scale(1.06); filter: brightness(1.2); } }
.evo-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lv-ladder li.evo .evo-body b { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.05; background: linear-gradient(90deg, #fff6c8, #ffd23f, #ff9fd0, #7fd4ff, #ffd23f); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: evo-text 3s linear infinite; text-shadow: none; }
@keyframes evo-text { to { background-position: 200% 0; } }
.lv-ladder li.evo .evo-body > span { font-size: 17px; color: #fff; font-weight: 700; }
.lv-ladder li.evo .evo-body small { font-size: 14px; color: #dfe6ff; }
.evo-bar { display: block; height: 8px; margin-top: 4px; border-radius: 4px; background: rgba(3, 10, 44, 0.8); border: 1px solid #000; overflow: hidden; }
.evo-bar span { display: block; height: 100%; background: linear-gradient(90deg, #ff6ad0, #ffe36a, #6affc8, #6ab4ff); }
.evo-spark { position: absolute; width: 10px; height: 10px; pointer-events: none; background: radial-gradient(circle, #fff 0 20%, transparent 22%), linear-gradient(#fff, #fff) center / 2px 100% no-repeat, linear-gradient(#fff, #fff) center / 100% 2px no-repeat; opacity: 0; animation: evo-twinkle 2.2s ease-in-out infinite; }
.evo-spark.s1 { left: 18%; top: 12%; } .evo-spark.s2 { left: 62%; top: 18%; animation-delay: 0.6s; }
.evo-spark.s3 { left: 84%; top: 62%; animation-delay: 1.2s; } .evo-spark.s4 { left: 8%; top: 74%; animation-delay: 1.7s; }
@keyframes evo-twinkle { 0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
/* ZAZA's round portrait in the popup title (same as the HUD card). */
/* ZAZA popup title: portrait, text and LIVE tag on one centred line. */
.modal h2.zaza-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-right: 36px; }
.modal h2.zaza-title .h2-zaza { margin-right: 0; vertical-align: 0; flex: none; }
.modal h2.zaza-title .live-tag { margin-left: 0; vertical-align: 0; }
.modal h2 .h2-zaza { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-right: 8px; vertical-align: -10px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 40% 35%, #3a66ff, var(--navy-900)); border: 2px solid var(--gold); box-shadow: 0 2px 0 #000a2e; }
.modal h2 .h2-zaza img { width: 46px; height: auto; margin-top: 4px; image-rendering: pixelated; }

.lv-ladder b { font-family: var(--display); font-weight: 400; font-size: 15px; color: var(--gold); }
.lv-ladder span { font-size: 15px; color: #fff; }
.lv-ladder small { font-size: 13px; color: var(--muted); }

/* Holder tiers: seven ranks, each with its own badge. */
.tier-ico { width: 1em; height: 1em; vertical-align: -0.14em; flex: none; }
.tier-chip {
  display: inline-flex; align-items: center; gap: 3px; font-family: var(--ui-font); font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  padding: 1px 6px 1px 4px; border-radius: 4px; color: var(--tc); background: rgba(3, 10, 44, 0.75); border: 1px solid var(--tc); white-space: nowrap; vertical-align: 3px;
}
.modal h2 .tier-chip { font-size: 14px; vertical-align: 5px; margin-left: 6px; }
/* Buy panel: SOL -> $ZAZA / $CARDS through Jupiter, approved in the player's wallet. */
.modal h2.buy-title { display: flex; align-items: center; gap: 10px; padding-right: 36px; }
.buy-title img { width: 34px; height: 34px; border-radius: 50%; object-fit: contain; background: var(--navy-900); border: 2px solid var(--gold); padding: 2px; }
.buy-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 8px; }
.buy-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px; border-radius: 6px; font-size: 17px; font-weight: 700; color: var(--muted); background: rgba(8, 12, 32, 0.45); border: 2px solid #1d2f8a; }
.buy-tabs button img { width: 20px; height: 20px; border-radius: 50%; object-fit: contain; }
.buy-tabs button.on { color: var(--navy-900); background: linear-gradient(180deg, #ffe066, var(--gold-2)); border-color: #3a2a00; }
.buy-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 10px; }
.buy-chips button { padding: 3px 10px; border-radius: 6px; font-size: 15px; font-weight: 700; color: var(--text); background: #0d1638; border: 1px solid #3b4c80; }
.buy-chips button:hover { border-color: var(--gold); color: var(--gold); }
.buy-chips small { margin-left: auto; font-size: 14px; color: var(--muted); }
.buy-quote { padding: 10px 12px; border-radius: 8px; font-size: 17px; background: rgba(3, 10, 44, 0.55); border: 1px solid #1d2f8a; }
.buy-quote b { color: var(--gold); font-size: 19px; }
.buy-quote span { color: #dfe6ff; }
.buy-quote small { display: block; margin-top: 3px; font-size: 14px; color: var(--muted); }
.buy-quote.warn small { color: #ffb35c; }
.buy-msg { margin-top: 8px; padding: 8px 12px; border-radius: 8px; font-size: 16px; background: rgba(95, 140, 255, 0.12); border: 1px solid rgba(95, 140, 255, 0.45); }
.buy-msg.ok { background: rgba(95, 232, 111, 0.12); border-color: rgba(95, 232, 111, 0.5); color: #7dffa0; }
.buy-msg.err { background: rgba(255, 90, 90, 0.12); border-color: rgba(255, 90, 90, 0.5); color: #ffb0b0; }
.buy-msg a { color: var(--cyan); }
.chat-log .holder-name .tier-ico { margin-left: 4px; }
.tier-next { font-size: 17px !important; margin: 0 0 8px; }
.tier-next b { color: var(--gold); }
.tier-ladder { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.tier-ladder li { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 6px; background: rgba(3, 10, 44, 0.45); }
.tier-ladder li .tier-ico { width: 22px; height: 22px; margin-bottom: 2px; }
.tier-ladder li b { color: var(--tc); font-size: 13px; }
.tier-ladder li small { color: var(--muted); font-size: 12px; }
.tier-ladder li.now { box-shadow: inset 0 0 0 2px var(--tc); background: rgba(255, 255, 255, 0.06); }
.board .vault-mark { color: var(--cyan); font-size: 14px; margin-left: 6px; }
.board .board-row.you { box-shadow: inset 0 0 0 2px var(--gold); }
.holder-top { margin: 4px 36px 4px 0; }
.holder-top .pc-av { width: clamp(56px, 16vw, 72px); height: clamp(56px, 16vw, 72px); }
.holder-top .pc-id b { max-width: 100%; font-size: clamp(18px, 5.2vw, 26px); }
.holder-top .pc-id small { font-size: 15px; }
.flex-total {
  text-align: center; padding: 14px 12px 12px; margin: 10px 0 12px; border-radius: 10px; border: 2px solid var(--gold);
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 210, 63, 0.28), transparent 70%), linear-gradient(180deg, #0d2285, var(--navy-900));
  box-shadow: 0 4px 0 var(--gold-dark), 0 10px 26px rgba(0, 0, 0, 0.35);
}
.flex-total small { display: block; font-size: 15px; font-weight: 700; color: var(--cyan); letter-spacing: 0.08em; text-transform: uppercase; }
.flex-total b { display: block; font-family: var(--display); font-weight: 400; font-size: 48px; line-height: 1.1; margin: 4px 0 2px; color: var(--gold); text-shadow: 0 3px 0 #8a6410, 0 6px 0 #000a2e; }
.flex-total span { font-size: 18px; color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.actions .btn, .actions a.btn { text-decoration: none; display: inline-block; }
.worldmap { width: 100%; image-rendering: pixelated; border-radius: 6px; border: 2px solid #000; cursor: crosshair; display: block; }
.map-wrap { position: relative; }
.map-label { position: absolute; transform: translate(-50%, -50%); font-family: var(--display); font-size: 16px; color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; pointer-events: none; white-space: nowrap; }

/* Quest complete: the classic scroll. */
.scroll { background: linear-gradient(180deg, #f4ead0, #e2d0a0); color: #2a1e10; border: 3px solid #6a4a22; border-radius: 10px; padding: 20px; text-align: center; box-shadow: inset 0 0 0 2px #fff6dc; }
.scroll h2 { color: #8a1a10; }
.scroll .qname { font-family: var(--display); font-size: 20px; color: #1d3ab8; margin: 4px 0 10px; }
.scroll ul { list-style: none; padding: 0; margin: 10px 0; font-weight: 700; font-size: 19px; }
.scroll li { padding: 2px 0; }
.scroll .qp-big { display: inline-grid; place-items: center; width: 64px; height: 64px; }
.scroll .qp-big img { width: 56px; height: 56px; image-rendering: pixelated; }

/* Card reveal: flash, then flip. */
.flash { position: fixed; inset: 0; z-index: 40; background: #fff; animation: flash 0.9s ease-out forwards; pointer-events: none; }
@keyframes flash { 0% { opacity: 0; } 10% { opacity: 1; } 22% { opacity: 0.1; } 34% { opacity: 1; } 100% { opacity: 0; } }
.reveal { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; justify-content: center; }
.flip { width: 190px; height: 265px; perspective: 800px; flex: none; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: flipit 1s 0.4s cubic-bezier(0.3, 0.8, 0.3, 1) forwards; }
.flip-inner > * { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 10px; overflow: hidden; }
.flip-inner img { width: 100%; height: 100%; image-rendering: pixelated; }
.card-front { transform: rotateY(180deg); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.card-front img { image-rendering: auto; }
.card-front .sample { font-family: var(--display); font-size: 16px; background: #b8302a; color: #fff; padding: 3px 8px; border-radius: 4px; transform: rotate(-6deg); }
.card-front .num { font-family: var(--display); font-size: 44px; color: var(--navy-900); margin: 10px 0 4px; }
.card-front .rar { font-weight: 700; font-size: 17px; }
.card-front small { font-size: 14px; margin-top: 8px; }
@keyframes flipit { to { transform: rotateY(180deg); } }
.reveal-copy { flex: 1; min-width: 220px; }
.find-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 17px; line-height: 1.3; }
.find-steps b { color: var(--gold); }
.tut-preview { margin-top: 12px; }
.tut-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cards-preview { width: 100%; margin-top: 10px; font-size: 16px; }

/* ---------------------------------------------------------------- tutorial (opens on every visit) */
.tut { text-align: center; }
.tut-kicker { margin: 0 0 2px !important; font-size: 15px !important; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); }
.tut h2 { font-size: 27px; margin-bottom: 8px; }
.tut > p { max-width: 560px; margin: 8px auto; }
.tut-fan { position: relative; height: 158px; margin: 10px auto 4px; max-width: 520px; }
.fan-card {
  position: absolute; left: 50%; top: 8px; width: 72px; height: 100px; margin-left: -36px; border-radius: 5px; overflow: hidden;
  transform-origin: 50% 260%; transform: rotate(var(--a)); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  animation: fanin 0.6s var(--d) cubic-bezier(0.2, 0.9, 0.3, 1.2) backwards;
}
.fan-card img { width: 100%; height: 100%; display: block; }
.fan-card:nth-child(odd) img { animation: glint 3.2s calc(var(--d) * 4) infinite; }
.fan-card.found::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 30px; color: #fff; background: rgba(55, 168, 98, 0.55); }
@keyframes fanin { from { transform: rotate(0deg) translateY(40px); opacity: 0; } }
@keyframes glint { 0%, 88%, 100% { filter: none; } 92% { filter: brightness(1.7) drop-shadow(0 0 6px #fff6a0); } }
.tut-progress { display: flex; align-items: center; gap: 10px; max-width: 320px; margin: 10px auto 0; font-size: 17px; color: var(--muted); }
.tut-progress b { color: var(--gold); font-size: 20px; }
.tut-progress .bar { flex: 1; }
.tut-compare { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 12px 0 6px; }
.tut-demo { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tut-demo img { width: 112px; height: 156px; border-radius: 6px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
.tut-demo figcaption { font-size: 15px; font-weight: 700; color: var(--muted); }
.tut-real { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tut-real figcaption { font-size: 15px; font-weight: 700; color: var(--gold); }
.slab {
  width: 128px; padding: 6px 7px 9px; border-radius: 8px; display: flex; flex-direction: column; gap: 5px;
  background: linear-gradient(135deg, #f4f6fa, #b8c0cc 45%, #eef1f6 60%, #9aa4b4); border: 2px solid #5a6474;
  box-shadow: 0 0 26px rgba(255, 210, 63, 0.45), 0 8px 18px rgba(0, 0, 0, 0.45); animation: bob 2.6s ease-in-out infinite;
}
.slab-label { display: flex; flex-direction: column; align-items: center; padding: 2px 4px; border-radius: 3px; background: #fff; border: 2px solid #c8302a; line-height: 1.05; }
.slab-label b { font-size: 12px; color: #1b1424; letter-spacing: 0.02em; }
.slab-label small { font-size: 11px; color: #5a5a6a; }
.slab img { width: 100%; aspect-ratio: 600 / 825; border-radius: 4px; box-shadow: 0 0 0 2px #2a2a32; background: #ffd23f; display: block; }
.tut-card { position: relative; width: 112px; height: 156px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 3px solid #1b1424; }
.tut-card b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.tut-card small { font-size: 14px; }
.tut-card .stamp { position: absolute; top: 10px; font-family: var(--display); font-size: 13px; padding: 2px 8px; border-radius: 4px; transform: rotate(-6deg); }
.tut-card.demo { background: linear-gradient(160deg, #3a4a7a, #1c2750); color: #c8d0ec; }
.tut-card.demo .stamp { background: #b8302a; color: #fff; }
.tut-card.real { background: linear-gradient(160deg, #fff6d0, var(--gold) 45%, #e8a020); color: #1b1424; box-shadow: 0 0 24px rgba(255, 210, 63, 0.55); animation: bob 2.6s ease-in-out infinite; }
.tut-card.real .stamp { background: var(--navy-900); color: var(--gold); }
.tut-arrow { font-size: 30px; color: var(--gold); }
.tut-list { list-style: none; margin: 12px auto 0; padding: 0; max-width: 560px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.tut-list li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 10px; border-radius: 8px; background: rgba(3, 10, 44, 0.5); font-size: 18px; line-height: 1.3; }
.tut-list i { font-style: normal; flex: none; width: 26px; text-align: center; }
.tut-list b { color: var(--gold); font-weight: 700; }
.tut-callout { display: flex; gap: 12px; align-items: center; max-width: 560px; margin: 12px auto 0; padding: 10px 12px; border-radius: 10px; text-align: left; font-size: 18px; line-height: 1.3; background: rgba(255, 210, 63, 0.12); border: 2px solid var(--gold); }
.tut-callout img { border-radius: 50%; flex: none; }
.tut-callout b { color: var(--gold); }
.tut-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.tut-dots { display: flex; gap: 6px; }
.tut-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3b4c80; }
.tut-dots i.on { background: var(--gold); }
.tut-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tut-btns .tut-never { background: transparent; box-shadow: none; opacity: 0.85; }
.tut-btns .tut-never:hover { opacity: 1; }

/* ---------------------------------------------------------------- holder customisation */
.holder-tag { background: var(--gold); }
.style-grid { display: flex; gap: 16px; align-items: flex-start; margin: 10px 0 4px; }
.style-grid canvas { width: 144px; height: 180px; flex: none; image-rendering: pixelated; border-radius: 12px; background: radial-gradient(circle at 50% 70%, #7cc35a 0 40%, #5a9e44 60%, transparent 62%), rgba(3, 10, 44, 0.55); border: 2px solid #1d2f8a; }
.style-rows { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.style-row { display: flex; align-items: center; gap: 10px; }
.style-row > span { width: 58px; flex: none; font-size: 16px; color: var(--muted); }
.toggle-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; }
.toggle-inline input { width: 18px; height: 18px; accent-color: var(--gold); }

/* ---------------------------------------------------------------- title screen */
.title { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(6, 18, 79, 0.25), rgba(3, 10, 44, 0.75)); overflow-y: auto; }
.title-card {
  flex: none; margin-block: auto; width: min(520px, 100%); text-align: center; padding: 24px 26px 18px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(10, 26, 107, 0.93), rgba(6, 18, 79, 0.96)); border: 3px solid var(--gold);
  box-shadow: 0 0 0 4px #000a2e, 0 20px 60px rgba(0, 0, 0, 0.6);
}
.title-card { position: relative; }
.title-zaza { position: absolute; right: -58px; top: -64px; width: 150px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 6px 0 rgba(0, 10, 46, 0.6)); animation: bob 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.title-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); font-weight: 700; }
.title h1 { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 9vw, 72px); line-height: 1; margin: 10px 0 6px; color: var(--gold); text-shadow: 0 4px 0 #8a6410, 0 8px 0 #000a2e, 0 0 30px rgba(255, 210, 63, 0.35); letter-spacing: 0.02em; }
.title h1 span { color: #fff; text-shadow: 0 4px 0 #1d4bff, 0 8px 0 #000a2e; }
.tagline { margin: 6px 0 14px; font-size: 19px; color: #dfe6ff; }
.title-teaser {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 9px 12px; border-radius: 10px; text-align: left;
  background: rgba(255, 210, 63, 0.12); border: 2px solid rgba(255, 210, 63, 0.55); color: #fff6d0; font-size: 18px; line-height: 1.25;
}
.teaser-cards { position: relative; flex: none; width: 92px; height: 78px; }
.teaser-cards i, .teaser-cards img { position: absolute; left: 27px; top: 2px; width: 38px; height: 53px; border-radius: 3px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45); transform-origin: 50% 150%; }
.teaser-cards i { background: linear-gradient(160deg, #1d4bff, #0a1a6b); border: 2px solid var(--gold); }
.teaser-cards > :nth-child(1) { transform: rotate(-20deg); }
.teaser-cards > :nth-child(3) { transform: rotate(20deg); }
.teaser-cards > :nth-child(2) { z-index: 1; top: 0; }
.name-row { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.name-row label { font-size: 15px; color: var(--muted); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.name-row input { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 8px; border: 2px solid #3b4c80; background: #06124f; color: #fff; font: 21px var(--ui-font); }
.name-row input:focus { outline: none; border-color: var(--gold); }
/* Chargers-only entry gate on the title screen: a pixel padlock that fills with vault energy, then springs open. */
.title-gate { margin: 0 0 12px; padding: 12px 14px 10px; border-radius: 12px; text-align: left; font-size: 16px; line-height: 1.35; color: #ffe6b0; background: linear-gradient(180deg, rgba(255, 152, 31, 0.16), rgba(255, 152, 31, 0.06)); border: 2px solid rgba(255, 152, 31, 0.6); }
.title-gate a { color: var(--gold); font-weight: 700; }
.gate-head { display: flex; align-items: center; gap: 14px; }
.gate-head > div { display: grid; gap: 2px; min-width: 0; }
.gate-head em { font-style: normal; font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #ff981f; }
.gate-head strong { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.1; text-wrap: balance; color: var(--gold); text-shadow: 0 2px 0 #000a2e; }
.gate-head span { color: #fff; font-size: 16px; }
.gate-note { margin: 10px 0 0; font-size: 15px; color: #ffe6b0; }
.gate-lock { flex: none; width: 56px; height: 80px; overflow: visible; filter: drop-shadow(0 3px 0 rgba(0, 10, 46, 0.7)); animation: lock-tug 3.6s ease-in-out infinite; transform-origin: 50% 90%; }
.gate-shackle rect { fill: #c7d0f5; } .gate-shackle rect.hi { fill: #fff; }
.gate-rim { fill: #050b2e; }
.gate-body { fill: #22358f; }
.gate-fill { fill: var(--gold); transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(var(--charge, 0)); animation: gate-fill 1s ease-out; }
.gate-shine { fill: rgba(255, 255, 255, 0.3); }
.gate-bolt { fill: #050b2e; }
@keyframes gate-fill { from { transform: scaleY(var(--from, 0)); } }
@keyframes lock-tug { 0%, 84%, 100% { transform: none; } 88% { transform: rotate(-7deg); } 92% { transform: rotate(6deg); } 96% { transform: rotate(-3deg); } }
.title-gate.ok { color: #c8ffd4; background: linear-gradient(180deg, rgba(95, 232, 111, 0.16), rgba(95, 232, 111, 0.05)); border-color: rgba(95, 232, 111, 0.6); }
.title-gate.ok em { color: var(--green); }
.title-gate.ok .gate-lock { animation: none; filter: drop-shadow(0 3px 0 rgba(0, 10, 46, 0.7)) drop-shadow(0 0 10px rgba(255, 210, 63, 0.75)); }
.title-gate.ok .gate-shackle { transform: translateY(-4px); }
.title-gate.opening .gate-shackle { animation: shackle-pop 0.8s cubic-bezier(0.3, 1.7, 0.5, 1); }
.title-gate.opening .gate-lock { animation: lock-flash 1s ease-out; }
@keyframes shackle-pop { 0%, 25% { transform: none; } 100% { transform: translateY(-4px); } }
@keyframes lock-flash { 0%, 20% { filter: drop-shadow(0 0 0 transparent); } 45% { filter: drop-shadow(0 0 22px #fff) drop-shadow(0 0 12px var(--gold)); } }
.title-gate ul { list-style: none; margin: 10px 0 6px; padding: 0; display: grid; gap: 5px; }
.title-gate li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 9px; border-radius: 8px; background: rgba(3, 10, 44, 0.55); }
.title-gate li i { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: 14px; font-weight: 700; color: #ffe6b0; background: rgba(255, 152, 31, 0.25); }
.title-gate li.ok i { color: #000a2e; background: var(--green); } .title-gate li.no i { color: #fff; background: var(--red); }
.title-gate li span { color: #fff; font-weight: 700; }
.title-gate li a { margin-left: auto; font-size: 15px; }
.title-gate small { display: block; font-size: 14px; color: var(--muted); }
.title-gate.nudge { animation: gate-nudge 0.5s ease; box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.6); }
.title-gate.nudge .gate-lock { animation: lock-tug 0.5s ease-in-out; animation-delay: -3.1s; }
@keyframes gate-nudge { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.play-btn .gate-lock.mini { width: 15px; height: 22px; margin-right: 9px; vertical-align: -3px; filter: none; animation: none; }
.gate-lock.mini .gate-shackle rect, .gate-lock.mini .gate-body { fill: var(--navy-900); }
.gate-lock.mini .gate-rim, .gate-lock.mini .gate-fill, .gate-lock.mini .gate-shine { display: none; }
.gate-lock.mini .gate-bolt { fill: var(--gold); }
/* Read-only wallet login on the title screen. */
.login { margin: 0 0 12px; text-align: left; }
.login-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 12px;
  background: rgba(3, 10, 44, 0.6); border: 2px solid var(--gold); color: #fff; font-family: var(--display); font-size: 18px;
}
.login-btn img { border-radius: 50%; }
.login-btn small { font-family: var(--ui-font); font-size: 15px; color: var(--cyan); }
.login-btn:hover { background: rgba(29, 75, 255, 0.35); }
.login-card { padding: 10px 12px; border-radius: 12px; background: rgba(3, 10, 44, 0.6); border: 2px solid var(--gold); box-shadow: 0 0 18px rgba(255, 210, 63, 0.2); }
.login-top { display: flex; align-items: center; gap: 10px; }
.login-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--gold); background: var(--navy-800); }
.login-id { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.login-id b { max-width: 100%; font-family: var(--display); font-weight: 400; font-size: 19px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-id small { font-size: 14px; color: var(--muted); }
.login-top .link-btn { font-size: 15px; flex: none; }
.login-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.login-stats span { min-width: 0; padding: 6px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); }
.login-stats small { display: block; font-size: 13px; color: var(--muted); }
.login-stats b { display: block; font-size: 16px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-wait { margin: 8px 0 0; font-size: 16px; color: var(--muted); }
.login-saved { display: block; margin-top: 8px; font-size: 14px; color: #7dffa0; }
.login-msg { margin: 8px 0 0; font-size: 16px; color: #ffb0a0; line-height: 1.35; }
.login-msg a { color: var(--gold); }
/* phones: open ZAZA World in Phantom's own browser */
.login-msg.help { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; color: var(--text); background: rgba(171, 159, 242, 0.12); border: 1px solid rgba(171, 159, 242, 0.5); }
.login-msg.help b { color: #fff; }
.login-msg .ph-open { display: block; padding: 10px 14px; border-radius: 12px; text-align: center; text-decoration: none; font-family: var(--display); font-size: 18px; color: #fff; background: linear-gradient(180deg, #ab9ff2, #7c6bd8); box-shadow: 0 3px 0 #4a3aa8; }
.login-msg small { font-size: 14px; color: var(--muted); }
.login-msg .ph-copy { margin: 0 2px; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--gold); background: none; color: var(--gold); font: inherit; cursor: pointer; }
.title-note b { color: #fff; }
.swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.swatches button { width: 26px; height: 26px; border-radius: 6px; border: 2px solid #000; padding: 0; }
.swatches button.sel { box-shadow: 0 0 0 2px var(--gold); }
.swatches button.none { background: #141d40; color: var(--muted); font-size: 13px; line-height: 1; }
.play-btn { width: 100%; padding: 13px 20px; border-radius: 999px; border: 3px solid #000a2e; background: linear-gradient(180deg, #ffe066, var(--gold-2)); color: var(--navy-900); font-family: var(--display); font-size: 22px; box-shadow: 0 5px 0 var(--gold-dark), 0 8px 20px rgba(0, 0, 0, 0.4); }
.play-btn:hover:not([disabled]) { filter: brightness(1.06); }
.play-btn:active:not([disabled]) { transform: translateY(3px); box-shadow: 0 2px 0 var(--gold-dark); }
.play-btn[disabled] { opacity: 0.7; cursor: progress; }
#newCharBtn { margin-top: 8px; }
.title-note { font-size: 15px; color: var(--muted); margin: 12px 0 0; line-height: 1.4; }
.load-error { color: #ffb0a0; font-size: 17px; }
.title-controls { margin-top: 16px; font-size: 16px; color: #dfe6ff; white-space: nowrap; text-shadow: 1px 1px 0 #000; }
.noscript { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 30px; text-align: center; background: var(--navy-900); color: #fff; font: 18px/1.5 system-ui, sans-serif; }
.noscript a { color: var(--gold); }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1100px) {
  .chatbox { width: min(440px, calc(100vw - 290px)); }
}
@media (max-height: 720px) and (min-width: 761px) {
  .side { height: 300px; }
  .wallet-card > small { display: none; }
}
@media (max-width: 760px) {
  .hud-tl { left: auto; right: 14px; top: 156px; max-width: 150px; align-items: flex-end; }
  .title-row { gap: 0; }
  .hover-text { display: none; }
  .hud-panel { top: 8px; left: 8px; width: 200px; }
  .hud-panel-head { gap: 5px; padding: 6px 9px 4px; cursor: pointer; }
  /* Phones: the header is just "ZAZA WORLD"; tapping it opens or collapses the box. */
  .panel-coin { display: none; }
  .hud-panel.is-minimized .hm-mini { display: none; }
  .hud-panel .panel-world { margin-left: 0; font-size: 14px; }
  .hud-panel.is-minimized .panel-world { display: flex; }
  .hud-panel.is-minimized .hud-panel-head { padding: 4px 4px 4px 10px; }
  .hud-minimize { width: 28px; height: 24px; font-size: 15px; }
  .zaza-card { padding: 4px 9px 4px 5px; gap: 5px; }
  .zaza-portrait { width: 40px; height: 40px; padding: 2px; }
  .zaza-portrait img { width: 42px; height: 42px; }
  .zaza-xp { display: none; }
  .zaza-card.mc .zaza-xp { display: flex; }
  .zaza-card.mc .zaza-xp b { font-size: 17px; }
  .zaza-card.mc .zaza-stage { display: none; }
  .zaza-name { font-size: 18px; }
  .zaza-name b { font-size: 13px; padding: 1px 4px; }
  .zaza-live { font-size: 11px; padding: 1px 4px; }
  .hud-tr { right: 8px; top: 8px; }
  .minimap-wrap { width: 168px; height: 134px; }
  #minimap { width: 100px; height: 100px; }
  .compass { right: 86px; width: 22px; height: 22px; font-size: 11px; }
  .orb { min-width: 40px; height: 28px; padding: 0 2px 0 6px; }
  .orb-icon { width: 20px; height: 20px; }
  .orb-icon img { width: 14px; height: 14px; }
  .orb-val { font-size: 13px; }
  .minimap-wrap { height: 134px; }
  .no-sparks .orb-cards { top: 38px; } .no-sparks .orb-map { top: 72px; left: 20px; }
  .no-sparks .minimap-wrap { height: 112px; }
  .mini-legend { font-size: 11px; gap: 5px; padding: 2px 6px; }
  .orb-run { top: 6px; left: 0; } .orb-sparks { top: 36px; left: 0; } .orb-cards { top: 68px; left: 0; } .orb-map { top: 102px; left: 40px; min-width: 30px; }
  .wallet-card { padding: 6px 8px; gap: 3px; }
  .wallet-card > small { display: none; }
  .wallet-connect { font-size: 13px; padding: 4px 8px; }
  .wallet-buys { gap: 4px; }
  .wallet-buys button { height: 46px; gap: 3px; padding: 4px 1px; border-radius: 8px; }
  .wallet-buys img { width: 20px; height: 20px; }
  .wb-packs img { width: 24px; height: 24px; }
  .wallet-buys b { font-size: 11px; }
  .wallet-buys-h { font-size: 11px; }
  .wallet-connect img { width: 18px; height: 18px; }
  .wallet-coin { width: 28px; height: 28px; }
  .wallet-head b { font-size: 16px; }
  .wallet-head em { display: none; }
  .zaza-chart { height: 26px; }
  .zaza-lv-row b { font-size: 13px; }
  .bar { height: 6px; }
  .zaza-lv-row small { display: none; }
  .tier-ladder { grid-template-columns: repeat(4, 1fr); }
  .lv-ladder { gap: 11px 4px; }
  .lv-ladder li { padding: 8px 2px 6px; }
  .lv-ladder li:not(.evo)::before { left: 8px; right: 8px; }
  .lv-tag { width: 14px; height: 14px; right: -4px; top: -5px; font-size: 8px; }
  .lv-tag.lock svg { width: 7px; height: 9px; }
  .lv-ladder li:not(.evo) b { font-size: 11px; letter-spacing: -0.02em; }
  .lv-now { font-size: 9px; padding: 1px 5px; top: -8px; }
  .lv-ladder b { font-size: 12px; } .lv-ladder span { font-size: 11px; } .lv-ladder small { font-size: 10px; }
  .modal h2.zaza-title { font-size: 20px; gap: 7px; flex-wrap: nowrap; white-space: nowrap; }
  .modal h2.zaza-title .h2-zaza { width: 34px; height: 34px; }
  .modal h2.zaza-title .h2-zaza img { width: 40px; }
  .modal h2.zaza-title .live-tag { font-size: 12px; padding: 2px 6px; }
  .lv-ladder li.evo { grid-template-columns: 62px 1fr; gap: 10px; padding: 10px; }
  .evo-sil { width: 62px; height: 62px; } .evo-sil img { width: 56px; } .evo-sil em { font-size: 30px; }
  .lv-ladder li.evo .evo-body b { font-size: 18px; } .lv-ladder li.evo .evo-body > span { font-size: 14px; } .lv-ladder li.evo .evo-body small { font-size: 12px; }
  .mc-chart { height: 130px; }
  .wallet-row { font-size: 14px; grid-template-columns: 50px minmax(0, 1fr); padding: 1px 0; }
  .wallet-row small { display: none; }
  .wallet-icon { width: 24px; height: 24px; }
  .player-card { width: 214px; }
  .side { left: 8px; right: 8px; bottom: 212px; width: auto; height: auto; max-height: calc(100vh - 220px); }
  .side .side-body { display: none; max-height: calc(46vh - 40px); }
  .side:not(.open) { display: none; } /* phones: the tabs live in the chat bar (ui.js moves them) */
  .side.open { display: flex; z-index: 8; } /* over the "N online" pill (.hud-tl), which sits on the same corner */
  .side.open .side-body { display: block; max-height: calc(100vh - 230px); }
  .side.open .side-close { display: grid; place-items: center; }
  .side.open .side-body > :first-child { padding-right: 40px; }
  .chatbox { left: 8px; right: 8px; bottom: 8px; width: auto; height: 196px; }
  .chat-tabs [data-chat="holders"], .chat-tabs [data-chat="vip"], .chat-tools, .chat-input label { display: none; }
  .chat-input { grid-template-columns: minmax(0, 1fr) auto; }
  .chat-log { font-size: 17px; padding: 4px 8px; }
  .chat-input input { font-size: 17px; padding: 4px 8px; }
  .chat-send { padding: 4px 10px; font-size: 14px; }
  .chat-open { left: auto; right: 8px; bottom: 8px; }
  .area-banner { top: auto; bottom: 214px; min-width: 180px; max-width: calc(100vw - 24px); padding: 6px 16px 7px; z-index: 6; transform: translate(-50%, 190%); }
  .area-banner.show { transform: translate(-50%, 0); }
  .area-banner b { font-size: 17px; }
  .area-banner small { font-size: 14px; }
  .dialog canvas { width: 60px; height: 66px; }
  .dialog-text { font-size: 17px; }
  .title-controls { display: none; }
  .title-zaza { width: 92px; right: -12px; top: -40px; }
  .title-teaser { font-size: 16px; }
  .tut-fan { height: 124px; }
  .fan-card { width: 54px; height: 75px; margin-left: -27px; }
  .tut-demo img, .tut-card { width: 92px; height: 128px; }
  .slab { width: 104px; }
  .tut h2 { font-size: 21px; }
  .style-grid { flex-direction: column; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .title-zaza, .tut-card.real, .slab, .fan-card, .fan-card img, .lv-ladder li.evo, .lv-ladder li.now, .evo-sil, .evo-sil em, .evo-body b, .evo-spark { animation: none; }
  .flash, .flip-inner { animation-duration: 0.01s; }
  .area-banner { transition: none; }
}

/* ---------------------------------------------------------------- adventure: shared bits */
.ri { width: 24px; height: 24px; image-rendering: pixelated; vertical-align: middle; flex: none; }
.ri.big { width: 40px; height: 40px; }
.rbar { display: block; height: 7px; border-radius: 4px; background: #0a102a; border: 1px solid #000; overflow: hidden; }
.rbar > span { display: block; height: 100%; background: linear-gradient(180deg, #7ef08a, #3cb44b); transition: width 0.25s ease; }
.rbar.mid > span { background: linear-gradient(180deg, #ffe066, #e8b52a); }
.rbar.low > span { background: linear-gradient(180deg, #ff8a80, #d83a3a); }
.rbar.xp > span { background: linear-gradient(180deg, #9fe0ff, #3a8ad8); }
.sample-tag { display: inline-block; font-size: 13px; font-weight: 700; color: #fff; background: #b8302a; border-radius: 4px; padding: 1px 6px; letter-spacing: 0.04em; vertical-align: 2px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Mining progress, above the chat on desktop. */
.gather-bar { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(6, 12, 40, 0.92); border: 2px solid var(--edge-dark); box-shadow: inset 0 0 0 1px var(--edge-light); font-size: 16px; min-width: 260px; }
.gather-bar > span:first-child { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.gather-bar .rbar { flex: 1; min-width: 70px; }
.gather-bar .rbar > span { background: linear-gradient(180deg, #ffe066, #e8b52a); transition: width 0.2s linear; }
.gather-bar button { background: #141d40; border: 1px solid #000; border-radius: 5px; color: var(--muted); padding: 1px 7px; }

/* A guardian found you. */
.lease-card { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); z-index: 7; width: min(430px, calc(100vw - 24px)); padding: 12px 14px; }
.lease-top { display: flex; gap: 12px; align-items: center; }
.lease-pic { width: 84px; height: 84px; image-rendering: pixelated; object-fit: contain; flex: none; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5)); }
.lease-card .kicker { color: var(--rs-orange); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.lease-card h3 { font-family: var(--display); font-weight: 400; color: var(--gold); font-size: 22px; margin: 0 0 2px; }
.lease-card p { margin: 2px 0; font-size: 15px; line-height: 1.3; }
.lease-card .rec { color: var(--cyan); }
.lease-card .terms { margin: 8px 0; padding: 6px 8px; border-radius: 6px; background: rgba(3, 10, 44, 0.6); color: #dfe6ff; font-size: 14px; }
.lease-card .party { list-style: none; margin: 0 0 8px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.lease-card .party li { padding: 1px 8px; border-radius: 999px; background: #141d40; border: 1px solid #3b4c80; }
.lease-card select { font: inherit; font-size: 15px; background: #0d1638; color: var(--text); border: 1px solid #3b4c80; border-radius: 6px; padding: 5px 6px; }
.lease-card .wait { color: var(--muted); font-size: 15px; }
.lease-card .expires { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }

/* Invitations: duels, parties and squads. */
.invites { position: absolute; right: 12px; top: 200px; z-index: 8; display: grid; gap: 8px; width: min(320px, calc(100vw - 24px)); pointer-events: none; }
.invite { pointer-events: auto; padding: 10px 12px; animation: inv-in 0.25s ease; }
.invite b { color: var(--gold); font-size: 16px; }
.invite p { margin: 4px 0 8px; font-size: 14px; line-height: 1.3; color: #dfe6ff; }
.invite small { color: var(--muted); margin-left: auto; }
@keyframes inv-in { from { transform: translateX(30px); opacity: 0; } }

/* ---------------------------------------------------------------- battles: first-person scene + Pokémon-style boxes */
.battle { position: fixed; inset: 0; z-index: 30; overflow: hidden; background: #030a2c; }
.bt-scene { position: absolute; left: 0; top: 0; image-rendering: pixelated; image-rendering: crisp-edges; }
.battle::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 90px rgba(3, 10, 44, 0.55); }
/* GBA-style info boxes. */
.bt-foes { position: absolute; left: 16px; top: 16px; z-index: 2; display: grid; gap: 6px; width: min(300px, 46vw); }
/* Your box sits top-right, across from the foe's, so both hands stay in view; teammates stack under it. */
.bt-me { position: absolute; right: 16px; top: 16px; z-index: 2; width: min(320px, 46vw); }
.bt-allies { position: absolute; right: 16px; top: 128px; z-index: 2; display: grid; gap: 6px; width: min(240px, 36vw); }
.gba { position: relative; padding: 7px 12px 8px; border-radius: 10px 10px 10px 2px; background: linear-gradient(180deg, #fbf8e8, #ebe3c4); color: #1b1424; border: 3px solid #2a2a3a; box-shadow: 0 4px 0 rgba(3, 10, 44, 0.6), inset 0 0 0 2px #fff; }
.gba.big { border-radius: 10px 10px 2px 10px; }
/* Each fighter's picture sits at the left of its box: profile picture, class avatar or creature portrait. */
.gba.pic { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; }
.gba-main { min-width: 0; }
.gba-pic { width: 44px; height: 44px; border: 2px solid #2a2a3a; border-radius: 8px; background: radial-gradient(circle at 50% 40%, #fffbe8, #d9cfa3); object-fit: cover; box-shadow: inset 0 0 0 2px #fff; }
.gba-pic.px { object-fit: contain; image-rendering: pixelated; }
.gba.big .gba-pic { width: 58px; height: 58px; }
@media (max-width: 560px) { .gba-pic { width: 34px; height: 34px; } .gba.big .gba-pic { width: 42px; height: 42px; } }
.gba.down { opacity: 0.6; filter: grayscale(0.6); }
.gba-top { display: flex; align-items: baseline; gap: 8px; }
.gba-top b { font-size: 19px; letter-spacing: 0.04em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gba-top span { margin-left: auto; font-size: 16px; color: #3a3a4a; }
.gba-top .rdy { font-style: normal; color: #2a9a3a; font-weight: 700; } .gba-top .rdy.wait { color: #8a8a9a; }
.gba-hp { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.gba-hp em { font-style: normal; font-weight: 700; font-size: 13px; color: #ffcf40; background: #3a3a4a; border-radius: 4px; padding: 0 5px; }
.gba-bar { flex: 1; height: 8px; border-radius: 5px; background: #3a3a4a; border: 2px solid #3a3a4a; overflow: hidden; }
.gba-bar > span { display: block; height: 100%; background: linear-gradient(180deg, #7ef08a, #28b848); transition: width 0.45s ease; }
.gba-bar.mid > span { background: linear-gradient(180deg, #ffe066, #e8b52a); }
.gba-bar.low > span { background: linear-gradient(180deg, #ff8a80, #d83a3a); }
.gba-num { text-align: right; font-size: 17px; margin-top: 2px; }
.gba .pips { display: flex; gap: 3px; margin-top: 3px; }
.gba .pips i { width: 9px; height: 9px; border-radius: 2px; background: #cfc6a4; border: 1px solid #8a8266; }
.gba .pips i.on { background: #ffd23f; border-color: #8a6410; }
.gba-st { margin-top: 3px; display: flex; gap: 3px; }
.gba-st .st { font-style: normal; font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 3px; background: #3a3a4a; color: #fff; }
.gba-st .st.ex { background: #ff981f; color: #1b1424; } .gba-st .st.sh { background: #ffe066; color: #1b1424; } .gba-st .st.ra { background: #ff5d5d; }
.gba.hit { animation: gba-hit 0.4s ease; }
@keyframes gba-hit { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-2px); } }
.bt-intent { margin: 0; padding: 3px 8px; border-radius: 6px; background: rgba(27, 20, 36, 0.8); color: #ffb347; font-size: 15px; font-weight: 700; animation: blink 0.9s infinite; }
/* Bottom bar: the message box and the command menu. */
.bt-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; grid-template-columns: 1fr minmax(300px, 40%); gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(3, 10, 44, 0), rgba(3, 10, 44, 0.75) 30%); }
.bt-msg { position: relative; min-height: 104px; padding: 14px 18px; border-radius: 10px; background: #1c2750; border: 3px solid #fbf8e8; box-shadow: 0 0 0 3px #1b1424, inset 0 0 0 2px #0a102a; }
.bt-msg p { margin: 0; font-size: 22px; line-height: 1.3; color: #fff; text-shadow: 2px 2px 0 #0a102a; }
.bt-timer { position: absolute; left: 14px; right: 14px; bottom: 8px; height: 5px; border-radius: 3px; background: #0a102a; overflow: hidden; }
.bt-timer i { display: block; height: 100%; background: linear-gradient(90deg, #ff981f, #ffd23f); transition: width 0.2s linear; }
.bt-menu { display: grid; gap: 8px; align-content: stretch; min-height: 104px; }
.bt-menu.main { grid-template-columns: 1fr 1fr; }
.bt-menu.list { grid-template-columns: 1fr; max-height: 38vh; overflow-y: auto; }
.bt-menu button { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; text-align: left; padding: 8px 12px 8px 26px; border-radius: 8px; background: linear-gradient(180deg, #fbf8e8, #ebe3c4); color: #1b1424; border: 3px solid #2a2a3a; box-shadow: 0 3px 0 rgba(3, 10, 44, 0.6); }
.bt-menu button img { width: 28px; height: 28px; image-rendering: pixelated; }
.bt-menu button b { font-size: 20px; letter-spacing: 0.04em; }
.bt-menu button span { color: #8a6410; font-weight: 700; }
.bt-menu button small { grid-column: 2 / -1; color: #4a4a5a; font-size: 14px; line-height: 1.2; }
.bt-menu button::before { content: "▶"; position: absolute; left: 9px; top: 50%; transform: translateY(-50%); font-size: 12px; color: transparent; }
.bt-menu button:hover:not([disabled])::before, .bt-menu button:focus-visible::before, .bt-menu button:focus::before { color: #d83a3a; }
.bt-menu button:hover:not([disabled]), .bt-menu button:focus { outline: none; border-color: #d83a3a; }
.bt-menu button[disabled] { opacity: 0.45; cursor: not-allowed; }
.bt-menu button.back { background: #1c2750; color: #fff; border-color: #fbf8e8; }
.bt-menu button.go { background: linear-gradient(180deg, #ffe066, var(--gold-2)); }
/* Damage numbers and the result banner. */
.bt-pops { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.bt-pop { position: absolute; transform: translate(-50%, -100%); font-family: var(--display); font-size: 34px; color: #fff; text-shadow: 3px 3px 0 #1b1424, 0 0 12px rgba(255, 80, 80, 0.8); animation: bt-pop 1.05s ease-out forwards; }
.bt-pop.me { color: #ff8a80; }
@keyframes bt-pop { 0% { transform: translate(-50%, -60%) scale(0.6); opacity: 0; } 15% { transform: translate(-50%, -100%) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, -190%) scale(1); opacity: 0; } }
.bt-banner { position: absolute; left: 0; right: 0; top: 30%; z-index: 4; text-align: center; pointer-events: none; animation: bt-banner 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); }
.bt-banner b { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 9vw, 96px); color: var(--gold); text-shadow: 5px 5px 0 #1b1424, 0 0 40px rgba(255, 210, 63, 0.6); letter-spacing: 0.04em; }
.battle.lost .bt-banner b { color: #d41f28; font-size: clamp(38px, 7vw, 84px); letter-spacing: 0.08em; text-shadow: 4px 4px 0 #1b0204, 0 0 40px rgba(255, 20, 30, 0.7); animation: fallen 2.4s ease-out; }
@keyframes fallen { from { opacity: 0; letter-spacing: 0.4em; filter: blur(3px); } 60% { opacity: 1; } }
@keyframes bt-banner { from { transform: scale(2.2); opacity: 0; } }
/* Fight juice: the title card, words slammed on screen, bigger hits, HP that drains, a menu that snaps in */
.bt-vs { position: absolute; left: 0; right: 0; top: 30%; z-index: 4; pointer-events: none; display: grid; justify-items: center; gap: 2px; padding: 10px 0 14px; background: linear-gradient(90deg, transparent, rgba(3, 10, 44, 0.88) 18%, rgba(3, 10, 44, 0.88) 82%, transparent); border-block: 3px solid var(--gold); animation: bt-vs 2s cubic-bezier(0.2, 0.9, 0.3, 1) forwards; }
.bt-vs small { font-family: var(--display); font-size: clamp(14px, 2.2vw, 20px); letter-spacing: 0.3em; color: var(--gold); }
.bt-vs b { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 6vw, 64px); line-height: 1.05; color: #fff; text-shadow: 4px 4px 0 #1b1424; letter-spacing: 0.04em; text-transform: uppercase; text-align: center; padding: 0 16px; }
.bt-vs.guardian { border-color: #d41f28; } .bt-vs.guardian small { color: #ff5a5a; }
@keyframes bt-vs { 0% { transform: translateX(-110%) skewX(-12deg); } 16% { transform: translateX(3%) skewX(-4deg); } 22%, 78% { transform: none; opacity: 1; } 100% { transform: translateX(110%) skewX(12deg); opacity: 0; } }
.bt-stamp { position: absolute; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 400; font-size: 30px; white-space: nowrap; pointer-events: none; color: #fff; text-shadow: 3px 3px 0 #1b1424, -2px -2px 0 #1b1424, 2px -2px 0 #1b1424, -2px 2px 0 #1b1424; animation: bt-stamp 1.2s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; }
.bt-stamp.ko { font-size: clamp(64px, 14vw, 150px); color: var(--gold); text-shadow: 6px 6px 0 #1b1424, -3px -3px 0 #1b1424, 3px -3px 0 #1b1424, -3px 3px 0 #1b1424, 0 0 50px rgba(255, 80, 40, 0.8); animation: bt-ko 1.9s cubic-bezier(0.2, 1.5, 0.4, 1) forwards; }
.bt-stamp.block, .bt-stamp.break { color: #9fe0ff; } .bt-stamp.interrupt { color: var(--gold); } .bt-stamp.guarded { color: #7ef08a; font-size: 24px; }
@keyframes bt-stamp { 0% { transform: translate(-50%, -50%) scale(2.4) rotate(-8deg); opacity: 0; } 14% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); opacity: 1; } 75% { transform: translate(-50%, -60%) rotate(-4deg); opacity: 1; } 100% { transform: translate(-50%, -85%) scale(0.9) rotate(-4deg); opacity: 0; } }
@keyframes bt-ko { 0% { transform: translate(-50%, -50%) scale(4) rotate(-14deg); opacity: 0; } 12% { transform: translate(-50%, -50%) scale(0.92) rotate(-6deg); opacity: 1; } 18% { transform: translate(-50%, -50%) scale(1.06) rotate(-6deg); } 24%, 80% { transform: translate(-50%, -50%) rotate(-6deg); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.1) rotate(-6deg); opacity: 0; } }
.bt-pop.big { font-size: 46px; color: #ffe066; }
.bt-pop.huge { font-size: 60px; color: #ffb347; text-shadow: 4px 4px 0 #1b1424, 0 0 18px rgba(255, 120, 40, 0.9); }
.bt-pop.me.big, .bt-pop.me.huge { color: #ff5a5a; }
.gba-bar { position: relative; }
.gba-bar > span { position: relative; transition: width 0.3s ease-out; }
.gba-bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: #fff6c8; transition: width 0.5s ease-in 0.4s; }
.bt-menu button { animation: bt-in 0.28s cubic-bezier(0.2, 1.5, 0.4, 1) backwards; }
.bt-menu button:nth-child(2) { animation-delay: 0.04s; } .bt-menu button:nth-child(3) { animation-delay: 0.08s; } .bt-menu button:nth-child(4) { animation-delay: 0.12s; }
@keyframes bt-in { from { transform: translateY(14px) scale(0.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bt-vs, .bt-stamp, .bt-stamp.ko { animation-name: bt-fade; } .bt-menu button { animation: none; } }
@keyframes bt-fade { 0% { opacity: 0; } 10%, 80% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 760px) {
  .bt-bar { grid-template-columns: 1fr; gap: 6px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .bt-msg { min-height: 48px; padding: 8px 12px 12px; border-width: 2px; }
  .bt-msg p { font-size: 17px; }
  .bt-timer { bottom: 5px; height: 4px; }
  .bt-menu { min-height: 0; gap: 6px; }
  .bt-menu button { padding: 5px 8px 5px 20px; border-width: 2px; gap: 6px; }
  .bt-menu button b { font-size: 16px; }
  .bt-menu button img { width: 20px; height: 20px; }
  .bt-menu button small { font-size: 12px; }
  .bt-foes { left: 8px; top: 8px; width: 60vw; }
  .bt-me { right: 8px; top: 68px; width: 60vw; }
  .bt-allies { right: 8px; top: 150px; width: 44vw; }
  .gba-top b { font-size: 16px; }
  .gba-num { font-size: 15px; }
  .bt-stamp { font-size: 22px; } .bt-stamp.guarded { font-size: 18px; }
  .bt-pop.big { font-size: 34px; } .bt-pop.huge { font-size: 44px; }
}

/* ---------------------------------------------------------------- the Forge, classes, rankings */
.bag { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.bag > span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 4px; border-radius: 6px; background: rgba(3, 10, 44, 0.6); border: 1px solid #2e3d74; font-size: 15px; }
.bag > span small { color: var(--muted); font-size: 12px; }
.recipes { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.recipes li { display: flex; gap: 10px; align-items: center; padding: 7px 9px; border-radius: 8px; background: rgba(3, 10, 44, 0.55); border: 1px solid #2e3d74; }
.recipes li.other { opacity: 0.6; }
.recipes li > div { flex: 1; min-width: 0; }
.recipes li b { font-size: 17px; color: #fff; }
.recipes li small { color: var(--muted); font-size: 13px; }
.recipes .need { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 3px; font-size: 14px; }
.recipes .need span { display: inline-flex; align-items: center; gap: 2px; }
.recipes .need .ri { width: 20px; height: 20px; }
.recipes .need .ok { color: var(--green); } .recipes .need .no { color: #ff8a80; }
/* Class cards: avatar, name + role badge, four strength bars, the matchup, the buttons. */
.class-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.class-card {
  position: relative; display: grid; gap: 8px; align-content: start; padding: 10px 12px 12px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cc, #7fd4ff) 14%, #101a55), #070d33 60%);
  border: 2px solid #2e3d74; box-shadow: 0 3px 0 #000a2e;
}
.class-card { transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.class-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--cc); box-shadow: 0 0 10px var(--cc); }
.class-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--cc) 70%, #2e3d74); box-shadow: 0 0 22px color-mix(in srgb, var(--cc) 35%, transparent), 0 6px 0 #000a2e; }
.class-card.current { border-color: var(--gold); box-shadow: 0 0 0 1px #000, 0 0 18px rgba(255, 210, 63, 0.35), 0 3px 0 #000a2e; }
.class-card.focus { box-shadow: 0 0 0 2px var(--cyan), 0 0 18px rgba(127, 212, 255, 0.35); }
.class-card h3 { font-family: var(--display); font-weight: 400; color: var(--gold); margin: 0; font-size: 22px; line-height: 1; }
.cc-head { display: grid; gap: 3px; }
/* Role badge: class-coloured pill with a light sweep. */
.cc-role {
  position: relative; overflow: hidden; justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 8px; border-radius: 999px;
  font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; text-shadow: 0 0 8px var(--cc), 0 1px 0 #000;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cc) 45%, #0a102a), color-mix(in srgb, var(--cc) 18%, #070d33));
  border: 1px solid var(--cc); box-shadow: 0 0 12px color-mix(in srgb, var(--cc) 45%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.cc-role svg { width: 13px; height: 13px; color: var(--cc); filter: drop-shadow(0 0 3px var(--cc)); }
.cc-role::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%); transform: translateX(-120%); animation: cc-sweep 4.5s ease-in-out infinite; }
@keyframes cc-sweep { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.cc-you { position: absolute; top: 8px; right: 8px; padding: 2px 7px; border-radius: 6px; font-family: var(--display); font-size: 11px; letter-spacing: 0.05em; color: #2a1a00; background: linear-gradient(180deg, #fff3a0, var(--gold)); border: 1px solid #000; }
.cc-stats { display: grid; gap: 5px; }
.cc-stat { display: grid; grid-template-columns: 14px 72px 1fr; align-items: center; gap: 6px; font-size: 16px; }
.cc-ico { display: grid; place-items: center; color: var(--sc); }
.cc-ico svg { width: 13px; height: 13px; }
.cc-lbl { color: #dfe6ff; font-weight: 700; }
.cc-pips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.cc-pips i { height: 8px; border-radius: 2px; background: #0a102a; border: 1px solid #000; }
.cc-pips i.on { background: var(--sc); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.cc-vs { display: flex; align-items: center; gap: 6px; font-size: 16px; color: var(--muted); }
.cc-vs img { width: 21px; height: 24px; image-rendering: auto; }
.cc-vs b { color: #fff; }
.cc-actions { margin-top: 2px; }
.cc-actions .btn { flex: 1; justify-content: center; }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.rank-grid .rank { padding: 8px 10px; border-radius: 8px; background: rgba(3, 10, 44, 0.55); border: 1px solid #2e3d74; }
.rank-grid .rank h3 { margin: 0 0 4px; font-size: 17px; color: var(--gold); }
.rank-grid .rank ol { margin: 0; padding-left: 22px; display: grid; gap: 3px; font-size: 15px; }
.rank-grid .rank li { display: flex; gap: 6px; align-items: center; }
.rank-grid .rank .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.rank-grid .rank .nm .ri { width: 18px; height: 18px; }
.rank-grid .rank small { color: var(--muted); }

/* ---------------------------------------------------------------- Adventure and Squad tabs */
.mode { font-size: 11px; padding: 1px 6px; border-radius: 4px; font-family: var(--ui-font); }
.mode.live { background: #b8302a; color: #fff; }
.mode.solo { background: var(--cyan); color: var(--navy-900); }
.adv-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.adv-head .ri { width: 40px; height: 40px; }
.adv-head > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.adv-head b { font-size: 17px; }
.adv-head small { color: var(--muted); font-size: 13px; }
.adv-stats { display: flex; gap: 6px; align-items: center; margin: 4px 0 6px; }
.adv-stats span { display: grid; text-align: center; padding: 2px 6px; border-radius: 6px; background: rgba(3, 10, 44, 0.6); min-width: 46px; }
.adv-stats small { color: var(--muted); font-size: 11px; }
.adv-stats b { font-size: 16px; }
.adv-stats .btn { margin-left: auto; padding: 4px 8px; font-size: 14px; }
.slot { display: flex; gap: 6px; align-items: center; margin: 3px 0; padding: 4px 6px; border-radius: 6px; background: rgba(3, 10, 44, 0.5); }
.slot > div { flex: 1; min-width: 0; display: grid; }
.slot small { color: var(--muted); font-size: 12px; }
.slot b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot select { max-width: 92px; font: inherit; font-size: 13px; background: #0d1638; color: var(--text); border: 1px solid #3b4c80; border-radius: 5px; }
.sub-title { margin: 8px 0 4px; font-size: 14px; color: var(--gold); letter-spacing: 0.06em; text-transform: uppercase; }
.prof { display: grid; grid-template-columns: 68px 22px 1fr; gap: 6px; align-items: center; font-size: 14px; margin: 2px 0; }
.prof b { color: #fff; text-align: right; }
.holder-note { border-left: 3px solid var(--gold); padding-left: 6px; }
.adv-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.adv-actions .btn { font-size: 14px; padding: 5px 8px; }
.field { display: grid; gap: 3px; margin: 6px 0; font-size: 14px; color: var(--muted); }
.field input { font: inherit; font-size: 16px; padding: 5px 8px; border-radius: 6px; border: 1px solid #3b4c80; background: #0d1638; color: var(--text); }
.sq-members { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; }
.sq-members li { display: flex; justify-content: space-between; padding: 4px 8px; border-radius: 6px; background: rgba(3, 10, 44, 0.5); font-size: 15px; }

@media (max-width: 760px) {
  .gather-bar { bottom: auto; top: 150px; min-width: 0; width: calc(100vw - 24px); }
  .lease-card { top: 52px; }
  .lease-pic { width: 60px; height: 60px; }
  .invites { top: auto; bottom: 150px; right: 8px; }
}
.share-img { width: 100%; border-radius: 8px; border: 2px solid var(--edge-dark); display: block; margin: 4px 0 8px; }
.share-x[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
.field textarea { font: inherit; font-size: 15px; padding: 6px 8px; border-radius: 6px; border: 1px solid #3b4c80; background: #0d1638; color: var(--text); resize: vertical; }

/* ---------------------------------------------------------------- companion page (no map) */
html:has(> body.companion) { overflow: auto; height: auto; }
body.companion { overflow: visible; height: auto; background: radial-gradient(ellipse at top, #0a1a6b, #030a2c 70%) fixed; min-height: 100vh; }
.cp-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(3, 10, 44, 0.92); border-bottom: 2px solid var(--gold); }
.cp-head img { border-radius: 50%; }
.cp-head h1 { flex: 1; margin: 0; font-family: var(--display); font-weight: 400; color: var(--gold); font-size: 22px; }
.cp-head h1 span { color: #fff; }
.cp-head h1 small { font-family: var(--ui-font); font-size: 15px; color: var(--muted); margin-left: 6px; }
.cp-main { width: min(760px, 100%); margin: 0 auto; padding: 14px 16px 30px; display: grid; gap: 12px; }
.cp-card { padding: 14px 16px; }
.cp-card h2 { font-family: var(--display); font-weight: 400; color: var(--gold); margin: 0 0 8px; font-size: 21px; display: flex; gap: 8px; align-items: baseline; }
.cp-card h2 small { font-family: var(--ui-font); font-size: 14px; color: var(--muted); }
.cp-cardex { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cp-slot { margin: 0; display: grid; gap: 3px; text-align: center; font-size: 13px; color: var(--muted); }
.cp-slot img { width: 100%; border-radius: 6px; }
.cp-slot.missing span { display: grid; place-items: center; aspect-ratio: 5 / 7; border-radius: 6px; border: 2px dashed #3b4c80; color: #3b4c80; font-size: 28px; font-family: var(--display); }
.cp-foot a { color: var(--cyan); }
.class-art { position: relative; display: grid; place-items: center; margin: -2px -4px 0; padding: 6px 0 2px; border-radius: 8px; background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, 0.12), transparent 70%); }
.class-art img { width: 168px; max-width: 100%; height: auto; image-rendering: auto; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.45)); }
.cls-warrior .class-art { background: radial-gradient(circle at 50% 60%, rgba(255, 110, 80, 0.28), transparent 70%); }
.cls-mage .class-art { background: radial-gradient(circle at 50% 60%, rgba(190, 130, 255, 0.28), transparent 70%); }
.cls-guardian .class-art { background: radial-gradient(circle at 50% 60%, rgba(120, 230, 140, 0.25), transparent 70%); }
/* Class cards only: a pulsing aura behind the avatar and a slow float, each card a beat apart. */
.class-card .class-art::before { content: ""; position: absolute; left: 50%; top: 58%; width: 150px; height: 150px; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, color-mix(in srgb, var(--cc) 45%, transparent), transparent 68%); animation: cc-aura 3.2s ease-in-out infinite; pointer-events: none; }
.class-card .class-art img { position: relative; animation: cc-float 3.2s ease-in-out infinite; }
.class-card:nth-child(2) .class-art::before, .class-card:nth-child(2) .class-art img { animation-delay: -1.1s; }
.class-card:nth-child(3) .class-art::before, .class-card:nth-child(3) .class-art img { animation-delay: -2.2s; }
.class-card:hover .class-art img { filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.45)) drop-shadow(0 0 10px var(--cc)); }
@keyframes cc-aura { 50% { transform: translate(-50%, -50%) scale(1.14); opacity: 0.6; } }
@keyframes cc-float { 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) {
  .class-card .class-art::before, .class-card .class-art img, .cc-role::after { animation: none; }
  .class-card, .class-card:hover { transition: none; transform: none; }
}
.adv-head .adv-avatar { width: 56px; height: 64px; image-rendering: auto; flex: none; }

/* Docs popup: the /docs/ site in a big in-game window (ⓘ side tab). Full screen on phones. */
.modal.modal-docs { width: min(1240px, 100%) !important; height: calc(100dvh - 32px); max-height: none; display: flex; flex-direction: column; padding: 12px; overflow: hidden; }
.modal-docs > #modalBody { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.modal-docs .docs-bar { display: flex; align-items: center; gap: 12px; padding-right: 40px; min-height: 30px; }
.modal-docs .docs-bar h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 22px; }
.modal-docs .docs-bar h2 img { width: 26px; height: 26px; image-rendering: pixelated; }
.modal-docs .docs-open { margin-left: auto; padding: 3px 12px; font-size: 16px; text-decoration: none; }
.modal-docs .docs-frame { flex: 1; width: 100%; min-height: 0; border: 2px solid #000; border-radius: 8px; background: #030a2c; box-shadow: inset 0 0 0 1px #2c3b78; }
@media (max-width: 760px) {
  .modal.modal-docs { position: fixed; inset: 0; height: 100dvh; border-radius: 0; padding: 8px 8px max(8px, env(safe-area-inset-bottom)); }
  .modal-docs .docs-bar h2 { font-size: 19px; }
  .modal-docs .docs-open { font-size: 15px; }
}

/* ---------------------------------------------------------------- update ready (ui.js showUpdate) */
.update-note {
  position: fixed; left: 50%; top: max(10px, env(safe-area-inset-top)); transform: translateX(-50%); z-index: 30;
  padding: 7px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; max-width: calc(100vw - 24px);
  background: var(--navy-900); border: 2px solid var(--gold); color: var(--text); box-shadow: 0 3px 0 #000a2e, 0 8px 20px rgba(0, 0, 0, 0.45);
  font-family: var(--ui-font); font-size: 17px;
}
.update-note b { font-family: var(--display); font-weight: 400; color: var(--gold); }
.update-note:hover { background: var(--navy-800); }
.update-note .un-short { display: none; }
/* Phones: the free corner under the ZAZA WORLD header, short text (the minimap and buttons fill the top right). */
@media (max-width: 760px) {
  .update-note { left: 10px; transform: none; top: 52px; padding: 5px 12px; font-size: 15px; }
  .update-note .un-long { display: none; }
  .update-note .un-short { display: inline; }
}
