/* ==========================================================================
   SealFrontiers — community portal theme
   Seal Online-inspired palette: sunny sky blue, leaf green, sunshine gold,
   terracotta wood and deep ocean ink. Playful, glossy, bright daytime fantasy.
   All artwork, fonts and effects are local (offline-safe).
   ========================================================================== */

@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/baloo2-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/rubik-latin.woff2') format('woff2');
}

:root {
  --plum: #0E3A5C;
  --plum-2: #14507A;
  --plum-deep: #082A44;
  --ink: #0D2A3C;
  --ink-soft: #3E6475;
  --gold: #FFC93C;
  --gold-2: #F0A81E;
  --gold-soft: #FFE9A8;
  --cream: #FFF8EC;
  --cream-2: #FFF1D9;
  --sky: #BEE9FF;
  --sky-2: #E6F7FF;
  --coral: #FF7A6B;
  --coral-2: #E8503F;
  --mint: #6FE3A8;
  --cyan: #38BEE6;
  --leaf: #57BE4A;
  --leaf-2: #3C9E37;
  --terracotta: #DA8A34;
  --line: rgba(13, 42, 60, .12);
  --line-strong: rgba(13, 42, 60, .22);
  --shadow: 0 18px 40px rgba(11, 58, 92, .14);
  --shadow-lg: 0 30px 70px rgba(11, 58, 92, .22);
  --radius: 20px;
  --radius-sm: 13px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Rubik', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Baloo 2', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.15;
  margin: 0 0 .5rem;
  color: var(--plum);
  letter-spacing: .2px;
}
h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 800; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1rem; }
small, .small { color: var(--ink-soft); font-size: .84rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.4rem 0; }
code { font-family: Consolas, 'Cascadia Mono', monospace; }

a { color: #2A6FD4; text-decoration: none; }
a:hover { color: #1B4FA8; }

.container { width: min(1180px, 93vw); margin: 0 auto; }

/* Admin pages use the full viewport width (small gutter, no max-width); the
   account area keeps the normal reading width like the rest of the site. */
body.is-admin .container { width: calc(100% - 2rem); max-width: none; }

/* ------------------------------------------------------------------ topbar */
.topbar {
  position: sticky; top: 0; z-index: 80;
  background: rgba(255, 249, 239, .92);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(246, 196, 69, .35);
}
.topbar-inner {
  display: flex; align-items: center; gap: 1.1rem;
  min-height: 74px; flex-wrap: nowrap;
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--plum); flex-shrink: 0; }
.brand:hover { color: var(--plum); }
.brand-logo { height: 60px; width: auto; display: block; filter: drop-shadow(0 6px 10px rgba(50,16,68,.22)); }
.nav-links { display: flex; gap: .15rem; flex-wrap: wrap; margin-left: auto; }
.nav-links a {
  font-family: 'Baloo 2', sans-serif; font-weight: 700;
  padding: .42rem .78rem; border-radius: 999px; color: var(--ink);
  font-size: 1rem; transition: .16s;
}
.nav-links a:hover { color: var(--plum); background: rgba(246, 196, 69, .22); }
.nav-links a.active { color: var(--plum); background: var(--gold); box-shadow: 0 6px 14px rgba(246,196,69,.4); }
/* "Games" header dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex; align-items: center; gap: .3rem;
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1rem;
  padding: .42rem .78rem; border-radius: 999px; color: var(--ink);
  background: none; border: 0; cursor: pointer; transition: .16s;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.active .nav-dropdown-toggle { color: var(--plum); background: rgba(246,196,69,.22); }
.nav-chev { transition: transform .18s; }
.nav-dropdown.open .nav-chev { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + .4rem); left: 0; min-width: 190px;
  background: #fff; border: 1px solid rgba(50,16,68,.1); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(50,16,68,.2); padding: .35rem; z-index: 95;
  display: none;
}
/* Invisible bridge across the gap between the toggle and the menu, so moving the
   pointer down to the submenu does not drop the hover and close it. */
.nav-dropdown-menu::before {
  content: ""; position: absolute; left: 0; right: 0; top: -.45rem; height: .5rem;
}
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; padding: .55rem .7rem; border-radius: 10px;
  font-family: 'Baloo 2', sans-serif; font-weight: 700; color: var(--ink); font-size: .98rem;
}
.nav-dropdown-menu a:hover { background: rgba(246,196,69,.22); color: var(--plum); }
.nav-dropdown-menu a.active { background: var(--gold); color: var(--plum); }
.nav-actions { display: flex; align-items: center; gap: .5rem; margin-left: .6rem; }
.wallet-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .6rem; border-radius: 999px;
  background: rgba(246, 196, 69, .22); color: #fff;
  font-weight: 700; font-size: .84rem; line-height: 1; white-space: nowrap;
}
.wallet-chip img { display: block; width: 14px; height: 14px; }
/* Admin pages: cash coin and diamond balances read in black. */
body.is-admin .wallet-chip { color: #000; }
.mobile-toggle {
  display: none; margin-left: auto; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center;
}
.mobile-toggle svg { width: 28px; height: 28px; stroke: var(--plum); }
.mobile-menu { display: none; }
.mobile-menu.open { display: block; }
.mobile-menu {
  background: var(--plum); padding: .5rem 0 .9rem;
}
.mobile-menu a {
  display: block; color: var(--cream); font-family: 'Baloo 2', sans-serif; font-weight: 700;
  padding: .7rem 1.2rem; font-size: 1.05rem;
}
.mobile-menu a.active { color: var(--gold); }
.mobile-games summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.2rem; font-family: 'Baloo 2', sans-serif; font-weight: 700;
  font-size: 1.05rem; color: var(--cream); cursor: pointer; list-style: none;
}
.mobile-games summary::-webkit-details-marker { display: none; }
.mobile-games summary::after { content: '▾'; font-size: .9rem; transition: transform .18s; }
.mobile-games[open] summary::after { transform: rotate(180deg); }
.mobile-games a { padding-left: 2rem; font-size: 1rem; }

@media (max-width: 1080px) {
  .nav-links, .nav-actions { display: none; }
  .mobile-toggle { display: flex; }
}

/* -------------------------------------------------------------------- main */
.site-main { padding-bottom: 3.5rem; }
.section-pad { padding: 3.2rem 0; }

/* ---------------------------------------------------------------- page hero */
.page-hero {
  background:
    radial-gradient(600px 260px at 88% 0%, rgba(246,196,69,.35), transparent 62%),
    radial-gradient(500px 300px at 8% 100%, rgba(126,224,184,.35), transparent 60%),
    linear-gradient(180deg, var(--sky), var(--sky-2));
  border-bottom: 2px solid rgba(246, 196, 69, .3);
  padding: 2.4rem clamp(1rem, 4vw, 2.5rem);
}
/* Keep the hero's container on its natural centred width so the hero text lines
   up with the page's own .container; max-width stops it overflowing the new side
   padding where that padding is wider than the natural gutter (~≤390px). */
.page-hero > .container { max-width: 100%; }
/* Admin uses a full-width shell with a 1rem gutter; match it here so the hero
   title lines up with the dashboard/cards below it. */
body.is-admin .page-hero { padding-inline: 1rem; }
body.is-admin .page-hero > .container { width: 100%; max-width: none; }
.page-hero h1 { margin: 0; }
.page-hero .sub { color: var(--ink-soft); margin: .25rem 0 0; max-width: 60ch; }
.breadcrumb { font-size: .8rem; color: var(--ink-soft); margin-bottom: .5rem; }
.breadcrumb a { color: var(--plum); font-weight: 600; }

/* -------------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding: 2.2rem 0 5.5rem; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 420px at 78% 8%, rgba(255,231,154,.55), transparent 60%),
    radial-gradient(700px 460px at 12% 20%, rgba(126,224,184,.35), transparent 60%),
    linear-gradient(180deg, #BFE9FF 0%, var(--sky) 42%, var(--sky-2) 72%, var(--cream) 100%);
}
.hero-clouds { position: absolute; z-index: 1; opacity: .95; pointer-events: none; }
.hero-clouds.c1 { top: 8%; left: -4%; width: 460px; animation: drift 26s ease-in-out infinite; }
.hero-clouds.c2 { top: 22%; right: -6%; width: 380px; animation: drift 34s ease-in-out infinite reverse; }
.hero-island { position: absolute; z-index: 1; pointer-events: none; }
.hero-island.left { left: -30px; bottom: 90px; width: 220px; animation: bob 7s ease-in-out infinite; }
.hero-island.right { right: -20px; bottom: 130px; width: 260px; animation: bob 8s ease-in-out infinite reverse; }
.hero-inner {
  position: relative; z-index: 3; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero-mascot {
  width: clamp(150px, 24vw, 250px); height: auto;
  filter: drop-shadow(0 26px 30px rgba(27, 11, 75, .28));
  animation: bob 6s ease-in-out infinite;
}
.hero-logo { width: clamp(120px, 18vw, 170px); margin-bottom: -.4rem; filter: drop-shadow(0 14px 24px rgba(27,11,75,.25)); }
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; color: var(--plum);
  margin: .2rem 0 .3rem; line-height: 1;
  text-shadow: 0 3px 0 #fff, 0 8px 24px rgba(27, 11, 75, .18);
}
.hero-title .em {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(120, 78, 8, .35);
}
.hero-sub { color: var(--ink-soft); max-width: 56ch; font-size: 1.06rem; margin: 0 auto 1.4rem; }
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; }

.live-card {
  margin-top: 1.6rem; display: inline-flex; align-items: center; gap: .9rem;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(8px);
  border: 2px solid rgba(246, 196, 69, .55); border-radius: 999px;
  padding: .55rem 1.2rem .55rem .8rem; box-shadow: var(--shadow);
}
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 6px rgba(126,224,184,.28); }
.live-count { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--plum); }
.live-label { font-size: .78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.live-status { font-size: .78rem; font-weight: 700; color: #1E9E68; }

@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes drift { 0%,100% { transform: translateX(0); } 50% { transform: translateX(26px); } }

/* ------------------------------------------------------------- stats strip */
.stats-strip {
  position: relative; z-index: 5; margin-top: -4.5rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.stat {
  background: #fff; border: 2px solid rgba(246, 196, 69, .35);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
.stat .label { color: var(--ink-soft); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.stat .value { font-family: 'Baloo 2', sans-serif; font-size: 1.9rem; font-weight: 800; margin-top: .1rem; color: var(--plum); }
.stat .hint { font-size: .76rem; color: var(--ink-soft); }
.stat.gold .value { color: var(--gold-2); }
.stat.cyan .value { color: var(--cyan); }
.stat.pink .value { color: var(--coral-2); }
.stat.green .value { color: #1E9E68; }

/* --------------------------------------------------------------- sections */
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-title h2 { margin: 0; }
.section-title a { font-weight: 700; font-size: .86rem; }

.band { background: var(--plum); color: var(--cream); position: relative; overflow: hidden; }
.band.plum { background: linear-gradient(180deg, var(--plum-2), var(--plum)); }
.band .section-title h2 { color: #fff; }
.band .section-title a { color: var(--gold); }
.band .muted, .band .small { color: rgba(255,249,239,.72); }
.band .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.band .card h3, .band .card h2 { color: #fff; }

/* --------------------------------------------------------- CTA band */
.band.plum.cta-band {
  background:
    radial-gradient(620px 260px at 10% -10%, rgba(246,196,69,.20), transparent 62%),
    radial-gradient(560px 280px at 92% 115%, rgba(79,200,232,.16), transparent 62%),
    linear-gradient(135deg, #4A1B63 0%, #321044 55%, #23082F 100%);
  border-block: 1px solid rgba(246,196,69,.18);
}
.cta-band { position: relative; overflow: hidden; padding-block: clamp(2.4rem, 5vw, 3.8rem); }
.cta-band-inner {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center; gap: clamp(1.6rem, 4vw, 3.2rem);
  position: relative; z-index: 1;
}
.cta-copy { min-width: 0; }
.cta-eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); background: rgba(246,196,69,.12);
  border: 1px solid rgba(246,196,69,.35);
  padding: .3rem .7rem; border-radius: 999px; margin-bottom: .9rem;
}
.cta-eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 10px rgba(246,196,69,.9);
}
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin: 0 0 .5rem; line-height: 1.08; }
.cta-band p { color: rgba(255,249,239,.82); margin: 0 0 1.2rem; max-width: 48ch; }
.cta-points {
  list-style: none; display: flex; flex-wrap: wrap; gap: .45rem 1.15rem;
  margin: 1.1rem 0 0; padding: 0;
}
.cta-points li {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .82rem; color: rgba(255,249,239,.8); font-weight: 500;
}
.cta-points li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px rgba(246,196,69,.8);
}
.cta-art { position: relative; display: grid; place-items: center; }
.cta-ring {
  position: absolute; width: min(82%, 330px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(246,196,69,.28), rgba(246,196,69,0) 68%);
}
.cta-mascot {
  position: relative; width: clamp(150px, 21vw, 250px); justify-self: center;
  filter: drop-shadow(0 24px 34px rgba(0,0,0,.42));
  animation: bob 7s ease-in-out infinite;
}
.cta-glow { position: absolute; border-radius: 50%; filter: blur(48px); pointer-events: none; z-index: 0; }
.cta-glow.g1 { width: 280px; height: 280px; left: -90px; top: -130px; background: rgba(246,196,69,.22); }
.cta-glow.g2 { width: 320px; height: 320px; right: -80px; bottom: -160px; background: rgba(79,200,232,.18); }

/* ----------------------------------------------------------- rank cards */
.rank-band { padding-block: clamp(2.4rem, 5vw, 3.4rem); }
.live-dot {
  display: inline-block; width: .5em; height: .5em; margin-right: .5em;
  border-radius: 50%; background: #4ADE80; vertical-align: baseline;
  animation: livePulse 2s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); }
  70% { box-shadow: 0 0 0 .5em rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.rank-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.rank-card {
  --accent: var(--gold);
  --accent-soft: rgba(246,196,69,.16);
  --accent-line: rgba(246,196,69,.5);
  position: relative; overflow: hidden;
  padding: 1.15rem 1.05rem 1.25rem;
  text-align: center; color: #fff;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background:
    radial-gradient(150px 90px at 50% -10%, var(--accent-soft), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.rank-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .85;
}
.rank-card.power { --accent: #F6C445; --accent-soft: rgba(246,196,69,.16); --accent-line: rgba(246,196,69,.5); }
.rank-card.fame { --accent: #FFE08A; --accent-soft: rgba(255,224,138,.16); --accent-line: rgba(255,224,138,.5); }
.rank-card.pvp { --accent: #FF8A9B; --accent-soft: rgba(255,138,155,.16); --accent-line: rgba(255,138,155,.5); }
.rank-card.guild { --accent: #7BE0F2; --accent-soft: rgba(123,224,242,.16); --accent-line: rgba(123,224,242,.5); }
.rank-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  box-shadow: 0 18px 36px rgba(0,0,0,.30);
}
.rank-card .ico {
  width: 44px; height: 44px; margin: 0 auto .65rem;
  display: grid; place-items: center; border-radius: 13px;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.rank-card .ico svg { width: 22px; height: 22px; }
.rank-card .k {
  font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  color: rgba(255,249,239,.66); font-weight: 800;
}
.rank-card .v {
  font-family: 'Baloo 2', sans-serif; font-size: 1.4rem; font-weight: 800;
  color: #fff; margin-top: .25rem; line-height: 1.15; word-break: break-word;
}
.rank-card .v small {
  display: block; margin-top: .18rem;
  color: var(--accent); font-family: 'Rubik', sans-serif;
  font-size: .74rem; font-weight: 600;
}
@media (prefers-reduced-motion: reduce) {
  .cta-mascot { animation: none; }
  .live-dot { animation: none; }
  .rank-card { transition: none; }
}

/* ------------------------------------------------------------- downloads */
.dl-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(2.6rem, 6vw, 4rem) 0 clamp(2.2rem, 5vw, 3.4rem);
  background:
    radial-gradient(700px 320px at 50% -20%, rgba(246,196,69,.22), transparent 60%),
    linear-gradient(180deg, var(--sky-2), var(--cream));
}
.dl-hero-inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: .35rem; }
.dl-mascot {
  width: clamp(150px, 22vw, 220px); height: auto;
  filter: drop-shadow(0 20px 30px rgba(27,11,75,.2));
  animation: bob 7s ease-in-out infinite;
}
.dl-eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--plum);
  background: var(--gold-soft); border: 1px solid rgba(217,154,34,.35);
  padding: .3rem .75rem; border-radius: 999px; margin-top: .4rem;
}
.dl-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); }
.dl-hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); color: var(--plum); margin: .2rem 0 0; }
.dl-sub { color: var(--ink-soft); max-width: 52ch; margin: .2rem auto 0; }
.dl-cloud, .dl-island { position: absolute; opacity: .5; pointer-events: none; }
.dl-cloud.c1 { left: -50px; top: 8%; width: 220px; animation: drift 12s ease-in-out infinite; }
.dl-cloud.c2 { right: -50px; top: 26%; width: 260px; animation: drift 15s ease-in-out infinite reverse; }
.dl-island.left { left: 1%; bottom: -24px; width: clamp(120px, 16vw, 210px); opacity: .8; }
.dl-island.right { right: 1%; bottom: -24px; width: clamp(120px, 16vw, 210px); opacity: .8; }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.dl-card {
  position: relative; overflow: hidden; text-align: center;
  padding: 2rem 1.4rem; border-radius: var(--radius);
  border: 2px solid var(--line); background: #fff; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dl-card.primary {
  border-color: rgba(246,196,69,.55);
  background:
    radial-gradient(300px 160px at 50% -10%, rgba(246,196,69,.30), transparent 70%),
    linear-gradient(180deg, #fff, var(--cream-2));
}
.dl-badge {
  display: inline-block; font-family: 'Baloo 2', sans-serif; font-weight: 800;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--plum); background: var(--gold-soft);
  border: 1px solid rgba(217,154,34,.35);
  padding: .25rem .7rem; border-radius: 999px; margin-bottom: .7rem;
}
.dl-card.alt .dl-badge { background: var(--sky); border-color: rgba(79,200,232,.4); }
.dl-card h2 { font-size: 1.5rem; margin: 0 0 .4rem; }
.dl-card p { margin: 0 0 1.2rem; }
.dl-btn { font-size: 1.02rem; padding: .8rem 1.6rem; }
.dl-card.alt .dl-btn { background: #fff; }
.dl-steps {
  margin-top: 2.2rem; background: #fff; border: 2px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}
.dl-steps h2 { margin-top: 0; }
.dl-steps ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; color: var(--ink-soft); }
.dl-steps li strong { color: var(--plum); }
.dl-soon { text-align: center; }
@media (max-width: 760px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dl-cloud.c2, .dl-island { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dl-mascot { animation: none; }
  .dl-cloud { animation: none; }
}

/* ------------------------------------------------------------- news cards */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.news-card {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; box-shadow: var(--shadow); transition: .18s; display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-3px); border-color: rgba(246,196,69,.6); }
.news-card .tag { display: inline-block; align-self: flex-start; background: var(--gold); color: var(--plum); font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: .72rem; padding: .15rem .6rem; border-radius: 999px; margin-bottom: .6rem; }
.news-card h3 { margin: 0 0 .3rem; }
.news-card .meta { font-size: .76rem; color: var(--ink-soft); margin-top: auto; }

/* ---------------------------------------------------------- explore cards */
.explore-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.explore-card {
  display: block; background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; box-shadow: var(--shadow); transition: .18s; color: var(--ink);
}
.explore-card:hover { transform: translateY(-4px); border-color: var(--gold); color: var(--ink); box-shadow: var(--shadow-lg); }
.explore-card .ico { width: 54px; height: 54px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 16px; background: linear-gradient(145deg, var(--gold-soft), var(--gold)); margin-bottom: .7rem; }
.explore-card strong { font-family: 'Baloo 2', sans-serif; font-size: 1.1rem; display: block; color: var(--plum); }
.explore-card span { font-size: .84rem; color: var(--ink-soft); }

/* ----------------------------------------------------------- banner CTA */
.banner-cta {
  position: relative; overflow: hidden; border-radius: 26px;
  background:
    radial-gradient(500px 220px at 15% 10%, rgba(255,255,255,.22), transparent 60%),
    linear-gradient(120deg, #4A1B63, #2A0C3A);
  color: #fff; padding: 2.2rem clamp(1.2rem, 4vw, 3rem);
  padding-right: clamp(190px, 26vw, 270px); box-shadow: var(--shadow-lg);
}
.banner-cta h2 { color: #fff; margin: 0 0 .4rem; font-size: clamp(1.4rem, 3vw, 2.1rem); }
.banner-cta p { color: rgba(255,249,239,.82); margin: 0 0 1.2rem; }
.banner-cta .mascot-inline {
  position: absolute; right: clamp(1rem, 3vw, 2.5rem); top: 50%;
  transform: translateY(-50%); width: clamp(150px, 19vw, 220px);
  opacity: .95;
}
@media (max-width: 760px) {
  .banner-cta { padding-right: clamp(1.2rem, 4vw, 3rem); }
  .banner-cta .mascot-inline { display: none; }
}

/* ------------------------------------------------------------------ cards */
.card {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; box-shadow: var(--shadow);
}
.card.tight { padding: 1rem; }
.card h2, .card h3 { color: var(--plum); }
.card-link { display: block; color: inherit; transition: .18s; }
.card-link:hover { transform: translateY(-2px); border-color: var(--gold); color: inherit; }

.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 1.3fr .7fr; gap: 1rem; }
.stack { display: grid; gap: 1rem; }

/* Home "News & events" / "Item Mall" row. By default the two auto rows stretch
   to fill the taller column, which pushes the news heading (and its cards) far
   below the Item Mall card. Keep the heading row content-sized and let the
   card row take the rest, so both cards share the same top and bottom edge. */
.home-split > .stack { align-content: start; }
/* The Item Mall card fills its column so its bottom edge meets the news card
   whenever the news list is the taller of the two. */
.home-split > .stack:last-child { height: 100%; grid-template-rows: auto minmax(0, 1fr); }

/* News feed: a card of stacked rows, mirroring the Item Mall card beside it. */
.news-feed { display: grid; gap: .55rem; align-content: start; }
.news-item {
  display: block; padding: .75rem .85rem; border: 2px solid var(--line);
  border-radius: 16px; background: #fff; transition: .18s; color: inherit;
}
.news-item:hover { transform: translateY(-2px); border-color: var(--gold); color: inherit; }
.news-item .tag {
  display: inline-block; background: var(--gold); color: var(--plum);
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: .68rem;
  padding: .12rem .55rem; border-radius: 999px; margin-bottom: .35rem;
  letter-spacing: .04em;
}
.news-item strong { display: block; color: var(--plum); font-family: 'Baloo 2', sans-serif; font-size: 1.02rem; line-height: 1.3; }
.news-item .meta { display: block; font-size: .76rem; color: var(--ink-soft); margin-top: .25rem; }

@media (max-width: 980px) {
  .home-split > .stack,
  .home-split > .stack:last-child { height: auto; grid-template-rows: none; }
}

/* ----------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th {
  text-align: left; font-family: 'Baloo 2', sans-serif; font-weight: 700;
  font-size: .76rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft); padding: .65rem .75rem; border-bottom: 2px solid var(--line-strong);
  white-space: nowrap; background: var(--cream);
}
table.data td { padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:hover { background: rgba(246, 196, 69, .1); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-1 { color: var(--gold-2); font-weight: 800; }
.rank-2 { color: #7C8AA5; font-weight: 800; }
.rank-3 { color: #C97B4A; font-weight: 800; }

/* ----------------------------------------------------------- podium cards */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.podium-card {
  background: linear-gradient(180deg, #fff, var(--cream-2)); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem; text-align: center; box-shadow: var(--shadow);
}
.podium-card.p1 { border-color: rgba(246,196,69,.7); }
.podium-card.p2 { border-color: rgba(124,138,165,.5); }
.podium-card.p3 { border-color: rgba(201,123,74,.5); }
.podium-rank { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.6rem; }
.podium-card.p1 .podium-rank { color: var(--gold-2); }
.podium-card.p2 .podium-rank { color: #7C8AA5; }
.podium-card.p3 .podium-rank { color: #C97B4A; }
.podium-card .name { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.15rem; color: var(--plum); }
.podium-card .score { color: var(--ink-soft); font-size: .84rem; }

/* ----------------------------------------------------------------- badges */
.badge {
  display: inline-block; padding: .18rem .6rem; border-radius: 999px;
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: .72rem;
  border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink-soft);
  white-space: nowrap;
}
.badge.gold { color: #8A5A00; border-color: rgba(217,154,34,.55); background: var(--gold-soft); }
.badge.green { color: #14734A; border-color: rgba(30,158,104,.4); background: rgba(126,224,184,.35); }
.badge.red { color: #B32A45; border-color: rgba(226,87,108,.45); background: rgba(255,122,138,.22); }
.badge.cyan { color: #0E6C88; border-color: rgba(79,200,232,.45); background: rgba(79,200,232,.2); }
.badge.pink { color: #B02A5B; border-color: rgba(255,122,138,.45); background: rgba(255,122,138,.18); }
.badge.purple { color: #fff; border-color: transparent; background: var(--plum); }

.job-warrior { color: #B4521E; border-color: rgba(180,82,30,.4); background: rgba(255,171,107,.25); }
.job-knight { color: #24559A; border-color: rgba(36,85,154,.35); background: rgba(157,200,255,.28); }
.job-thief { color: #5E37A8; border-color: rgba(94,55,168,.35); background: rgba(195,164,255,.28); }
.job-mage { color: #0E6C88; border-color: rgba(14,108,136,.35); background: rgba(111,227,255,.25); }
.job-priest { color: #8A5A00; border-color: rgba(138,90,0,.35); background: rgba(255,224,138,.35); }
.job-smith { color: #7A4A23; border-color: rgba(122,74,35,.35); background: rgba(215,178,142,.32); }
.job-gambler { color: #B02A5B; border-color: rgba(176,42,91,.35); background: rgba(255,159,196,.28); }
.job-hunter { color: #1E7A44; border-color: rgba(30,122,68,.35); background: rgba(150,230,161,.3); }
.job-chef { color: #9A6A00; border-color: rgba(154,106,0,.35); background: rgba(255,207,122,.32); }
.job-novice { color: var(--ink-soft); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .62rem 1.25rem; border-radius: 999px; border: 2px solid transparent;
  font-family: 'Baloo 2', sans-serif; font-size: 1rem; font-weight: 800; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--plum); transition: .16s; text-decoration: none;
  box-shadow: 0 8px 18px rgba(246, 196, 69, .4);
}
.btn:hover { transform: translateY(-2px); color: var(--plum); filter: brightness(1.04); box-shadow: 0 12px 24px rgba(246,196,69,.5); }
.btn:active { transform: translateY(0); }
.btn.sm { padding: .4rem .85rem; font-size: .86rem; box-shadow: none; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--plum); border-color: var(--line-strong); box-shadow: none; }
.btn.ghost:hover { border-color: var(--gold); color: var(--plum); }
.btn.dark { background: var(--plum); color: var(--cream); box-shadow: 0 8px 18px rgba(50,16,68,.35); }
.btn.dark:hover { color: #fff; }
.btn.pink { background: linear-gradient(180deg, #FF9FB2, var(--coral)); color: #5A0E22; box-shadow: 0 8px 18px rgba(255,122,138,.4); }
.btn.pink:hover { color: #5A0E22; }
.inline { display: inline; }

/* ------------------------------------------------------------------ forms */
label.field { display: block; margin-bottom: .95rem; }
label.field > span {
  display: block; font-family: 'Baloo 2', sans-serif; font-size: .82rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .35rem;
}
.input, input[type="text"], input[type="password"], input[type="number"],
input[type="search"], input[type="email"], textarea, select {
  width: 100%; padding: .65rem .85rem; border-radius: 13px;
  border: 2px solid var(--line-strong); background: #fff; color: var(--ink);
  font: inherit; font-size: .95rem; outline: none; transition: .15s;
}
.input:focus, input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(246,196,69,.2); }
textarea { min-height: 160px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }
.searchbar { display: flex; gap: .55rem; flex-wrap: wrap; }
.searchbar input { flex: 1 1 220px; }
.checkbox-row { display: flex; align-items: center; gap: .55rem; }
.checkbox-row input { width: auto; }

@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------- auth */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: stretch; padding: 2.4rem 0; }
.auth-art {
  position: relative; overflow: hidden; border-radius: 26px; padding: 2rem; color: #fff;
  background:
    radial-gradient(400px 200px at 80% 0%, rgba(246,196,69,.4), transparent 60%),
    linear-gradient(160deg, #4A1B63, #2A0C3A);
  display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow);
}
.auth-art h2 { color: #fff; font-size: 1.7rem; }
.auth-art p { color: rgba(255,249,239,.85); }
.auth-art .mascot-inline { position: absolute; right: 1rem; bottom: 0; width: 150px; opacity: .95; }
.auth-card { align-self: center; width: 100%; }

.captcha-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.captcha-img {
  border-radius: 12px; border: 2px solid var(--line-strong); background: #fff;
  box-shadow: var(--shadow); cursor: pointer;
}
.captcha-img:hover { border-color: var(--gold); }

.hint { display: block; margin-top: .3rem; font-size: .76rem; color: var(--ink-soft); line-height: 1.35; }

/* Email verification */
.notice {
  background: var(--cream); border: 1.5px solid var(--line-strong);
  border-radius: 12px; padding: .8rem .9rem; font-size: .88rem; color: var(--ink-soft);
}
.dev-mail {
  margin-top: 1rem; padding: .9rem; border-radius: 14px;
  background: var(--gold-soft); border: 2px dashed var(--gold); font-size: .88rem;
}
.dev-mail > strong { color: var(--plum); }
.dev-mail p { margin: .5rem 0; color: var(--ink-soft); }
.dev-mail .btn { margin: .4rem 0; }
@media (max-width: 820px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ------------------------------------------------------------------- misc */
.flash {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .8rem 1rem; margin: 1rem 0 1.1rem;
  border: 1.5px solid var(--line-strong); border-left-width: 6px;
  border-radius: 14px; background: #fff;
  font-size: .92rem; font-weight: 600; line-height: 1.45;
  box-shadow: 0 10px 24px rgba(50, 16, 68, .1);
  animation: flashIn .26s ease both;
}
.flash::before {
  content: "!"; flex: 0 0 1.4rem; width: 1.4rem; height: 1.4rem; border-radius: 999px;
  display: grid; place-items: center; margin-top: .1rem;
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: .95rem;
  color: #fff; background: var(--line-strong);
}
.flash.ok { border-color: rgba(30,158,104,.45); border-left-color: #1E9E68; background: rgba(126,224,184,.18); color: #10603C; }
.flash.ok::before { content: "\2713"; background: #1E9E68; }
.flash.err { border-color: rgba(226,87,108,.45); border-left-color: #C0384E; background: rgba(255,122,138,.16); color: #A32038; }
.flash.err::before { content: "\00D7"; background: #C0384E; }
.flash.warn { border-color: rgba(217,154,34,.5); border-left-color: #D99622; background: rgba(255,231,154,.35); color: #7A5200; }
.flash.warn::before { content: "!"; background: #D99622; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

.empty { padding: 2rem; text-align: center; color: var(--ink-soft); font-size: .92rem; }
.muted { color: var(--ink-soft); }
.mono { font-family: Consolas, 'Cascadia Mono', monospace; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 1rem; }
.mb0 { margin-bottom: 0; }
.preline { white-space: pre-wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.pagination { display: flex; gap: .35rem; align-items: center; justify-content: center; margin-top: 1.3rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; display: grid; place-items: center;
  padding: 0 .6rem; border-radius: 12px; border: 2px solid var(--line-strong);
  color: var(--ink-soft); font-family: 'Baloo 2', sans-serif; font-weight: 700; background: #fff;
}
.pagination a:hover { color: var(--plum); border-color: var(--gold); }
.pagination .current { background: var(--gold); border-color: var(--gold); color: var(--plum); }
.pagination .disabled { opacity: .4; }

.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.tabs a,
.tabs button {
  padding: .45rem 1rem; border-radius: 999px; border: 2px solid var(--line-strong);
  color: var(--ink-soft); font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: .92rem; background: #fff;
  cursor: pointer; line-height: inherit;
}
.tabs a:hover,
.tabs button:hover { color: var(--plum); border-color: var(--gold); }
.tabs a.active,
.tabs button.active { background: var(--plum); border-color: var(--plum); color: var(--gold); }
/* Account sections swapped by /js/account-tabs.js. */
.account-tab-panel[hidden] { display: none !important; }

.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin: .4rem 0 1rem; }
.chip { padding: .3rem .8rem; border-radius: 999px; border: 2px solid var(--line-strong); color: var(--ink-soft); font-size: .82rem; font-weight: 600; background: #fff; }
.chip:hover { color: var(--plum); border-color: var(--gold); }
.chip.active { color: var(--plum); border-color: var(--gold); background: var(--gold-soft); }

.detail-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.avatar {
  width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center;
  font-family: 'Baloo 2', sans-serif; font-size: 1.7rem; font-weight: 800; color: var(--plum);
  background: linear-gradient(145deg, var(--gold-soft), var(--gold)); box-shadow: var(--shadow);
}
/* ------------------------------------------- account: bank password / usage */
.bank-head .k, .bank-usage .k {
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 800;
}
.bank-secret { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .25rem; min-height: 1.9rem; }
.bank-secret .mono { font-size: 1.15rem; letter-spacing: .12em; }
.bank-toggle { padding: .25rem .7rem; font-size: .8rem; }
.bank-error { color: #b3261e; font-size: .85rem; margin: .45rem 0 0; }
.bank-usage { margin-top: 1rem; }
.meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: .4rem 0 .3rem; }
.meter span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--plum)); }
.bank-usage .v { font-size: .88rem; color: var(--ink-soft); }
.bank-usage .v strong { color: var(--plum); }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.kv > div { border: 2px solid var(--line); border-radius: 14px; padding: .7rem .85rem; background: var(--cream); }
.kv .k { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 800; }
.kv .v { font-family: 'Baloo 2', sans-serif; font-size: 1.05rem; font-weight: 700; margin-top: .1rem; color: var(--plum); }

.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.item-card {
  border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem; background: #fff;
  display: flex; flex-direction: column; gap: .5rem; box-shadow: var(--shadow); transition: .16s;
}
.item-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.item-card h3 { font-size: .95rem; margin: 0; color: var(--plum); }
.item-card .code { font-size: .74rem; color: var(--ink-soft); }
.item-card .price-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; font-size: .84rem; gap: .5rem; flex-wrap: wrap; }
.item-tags { display: flex; gap: .3rem; flex-wrap: wrap; }

/* ----------------------------------------------------------------- admin */
.admin-shell { display: grid; grid-template-columns: 232px 1fr; gap: 1.4rem; align-items: start; padding-top: 1.4rem; }
.admin-nav {
  position: sticky; top: 92px; display: grid; gap: .3rem;
  background: var(--plum); border-radius: var(--radius); padding: .8rem; box-shadow: var(--shadow);
}
.admin-nav a {
  padding: .6rem .85rem; border-radius: 12px; color: rgba(255,249,239,.82);
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: .95rem; border: 2px solid transparent;
}
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.admin-nav a.active { color: var(--plum); background: var(--gold); border-color: var(--gold); }
.admin-nav-links > a:last-child { color: rgba(255,249,239,.65); font-size: .85rem; }
/* Collapsible sidebar submenu (e.g. Diamonds -> Manage / Logs) */
.admin-nav-group { border-radius: 12px; }
.admin-nav summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: .6rem .85rem; border-radius: 12px; color: rgba(255,249,239,.82);
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: .95rem; border: 2px solid transparent;
}
.admin-nav summary::-webkit-details-marker { display: none; }
.admin-nav summary::after { content: '▾'; font-size: .8rem; transition: transform .18s; }
.admin-nav-group[open] summary::after { transform: rotate(180deg); }
.admin-nav summary:hover { color: #fff; background: rgba(255,255,255,.08); }
.admin-nav summary.active { color: var(--plum); background: var(--gold); border-color: var(--gold); }
.admin-nav-group > a { display: block; padding-left: 1.7rem; }
.admin-nav-group > a:first-of-type { margin-top: .15rem; }

/* Collapsible admin sidebar ("Menu admin" on phones) + link icons.
   On desktop the wrapper is transparent (display:contents) so every link and
   group sits directly in the sidebar grid; on phones the list folds behind one
   minimum-44px toggle button. */
.admin-nav-toggle { display: none; }
.admin-nav-links { display: contents; }
.admin-nav a, .admin-nav summary { display: flex; align-items: center; gap: .55rem; }
.admin-nav .nav-ico { width: 18px; height: 18px; flex: 0 0 auto; opacity: .82; }
.admin-nav a.active .nav-ico, .admin-nav summary.active .nav-ico { opacity: 1; }
.admin-nav summary .nav-label { display: flex; align-items: center; gap: .55rem; }
.admin-nav a:focus-visible, .admin-nav summary:focus-visible,
.admin-nav-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--gold); border-radius: 12px; }

/* Admin pages must never scroll sideways on a phone. A grid/flex child defaults
   to min-width:auto, so one wide table or inline min-width could stretch the
   whole shell past the viewport. Let the panels shrink; tables scroll inside
   .table-wrap (or their own overflow-x wrapper) instead. */
.admin-shell, .admin-shell > *, .admin-shell .card { min-width: 0; }
body.is-admin .kv .v { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .admin-shell { gap: 1rem; padding-top: 1rem; }
  /* Keep a long, expanded menu reachable without losing the page behind it. */
  .admin-nav-links { max-height: 70vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 720px) {
  /* Section headings + their action button(s) wrap instead of overflowing. */
  body.is-admin .section-title { flex-wrap: wrap; row-gap: .45rem; align-items: flex-start; }
  /* Page-hero action groups sit under the title, left-aligned, rather than
     being pushed off the right edge by an inline margin-left:auto. */
  body.is-admin .detail-head > * { margin-left: 0 !important; }
  body.is-admin .page-hero { padding-block: 1.5rem 1.7rem; }
  /* Search/filter buttons share the full row with the input. */
  body.is-admin .searchbar .btn { flex: 1 1 auto; justify-content: center; }
  /* Diamond adjust: stack the amount/reason fields so the row fits the phone
     column instead of forcing a long horizontal scroll. */
  .admin-shell table.diamond-table td:last-child { white-space: normal; }
  body.is-admin .diamond-adjust { flex-wrap: wrap; }
  body.is-admin .diamond-adjust .diamond-amount,
  body.is-admin .diamond-adjust .diamond-reason { width: 100%; }
  /* Roles table keeps every column readable at phone width. */
  table.role-admin-table { min-width: 540px; }
  table.role-admin-table th, table.role-admin-table td { padding: .4rem .45rem; }
  table.role-admin-table .btn.sm { padding: .32rem .5rem; font-size: .78rem; }
}

/* Horizontal scroller for admin tables that are part of a card layout. */
.table-scroll { min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Diamonds admin: compact, single-line per-row adjust form */
.diamond-table td:last-child { white-space: nowrap; }
.diamond-adjust { display: flex; flex-wrap: nowrap; align-items: center; gap: .3rem; margin: 0; }
.diamond-adjust input { padding: .28rem .45rem; font-size: .8rem; }
.diamond-adjust .diamond-amount { width: 174px; }
.diamond-adjust .diamond-reason { width: 260px; }
.diamond-adjust .btn { padding: .28rem .6rem; line-height: 1.2; }
#diamond-flash:empty { display: none; }
#diamond-flash { margin-bottom: .8rem; }

/* ------------------------------------------------------------ diamond shop */
.shop-topbar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.shop-balance { display: inline-flex; align-items: center; gap: .35rem; font-size: .95rem; }
.shop-card { position: relative; display: flex; flex-direction: column; height: 100%; }
.shop-card .shop-buy,
.shop-card .shop-buy-disabled { margin-top: auto; }
.shop-ribbon {
  position: absolute; top: .6rem; right: .6rem; z-index: 2;
  background: #e11d48; color: #fff; font-family: 'Baloo 2', sans-serif; font-weight: 700;
  font-size: .7rem; letter-spacing: .04em; padding: .18rem .5rem; border-radius: 999px;
  box-shadow: 0 4px 10px rgba(225,29,72,.35);
}
.shop-icon { text-align: center; margin-bottom: .4rem; }
.shop-icon img { display: inline-block; object-fit: contain; }
.shop-range { font-size: .78rem; margin: .1rem 0 .5rem; }
.shop-buy { display: flex; gap: .4rem; align-items: center; margin-top: .6rem; }
.shop-qty { width: 72px; padding: .38rem .45rem; }
.shop-qty:disabled,
#buyQty:disabled {
  background: #e9e6ef;
  color: #8b8499;
  border-color: rgba(50, 16, 68, .12);
  cursor: not-allowed;
  opacity: .85;
}
.shop-buy-disabled { margin-top: .6rem; font-size: .85rem; }
.shop-stock { margin: .35rem 0 .2rem; font-size: .8rem; }
.shop-limit { font-size: .76rem; margin: .1rem 0 .3rem; }
.shop-meta { display: flex; align-items: center; justify-content: flex-start; gap: .4rem; margin: .35rem 0 .2rem; flex-wrap: nowrap; }
.shop-meta-left { display: inline-flex; align-items: center; gap: .3rem; min-width: 0; }
.shop-meta .shop-stock { margin: 0; }
.shop-meta .shop-price { white-space: nowrap; }
.shop-price-tag { position: absolute; top: .6rem; left: .6rem; z-index: 2; white-space: nowrap; }
.shop-tip {
  position: fixed; z-index: 300; max-width: 260px; pointer-events: none;
  background: rgba(30, 16, 40, .96); color: #fff; font-size: .8rem; line-height: 1.4;
  padding: .5rem .65rem; border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}
.shop-tip[hidden] { display: none; }

/* ------------------------------------------------------------------ gatcha */
.gatcha-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
@media (max-width: 900px) { .gatcha-layout { grid-template-columns: 1fr; } }
.gatcha-machine-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.wheel-card {
  position: relative; width: min(520px, 100%); color: #5a2d05;
  background: linear-gradient(180deg, #ffcf5a 0%, #f0a52c 55%, #d97e17 100%);
  border: 4px solid #8a4b12; border-radius: 26px;
  box-shadow: 0 26px 50px rgba(50,16,68,.28), inset 0 2px 0 rgba(255,255,255,.5);
  padding: 1rem 1rem 1.2rem;
}
.wheel-card.is-closed .wheel-stage { filter: grayscale(.55) brightness(.86); }
.wheel-head {
  text-align: center; font-family: 'Baloo 2', sans-serif; font-weight: 800;
  font-size: 1.15rem; letter-spacing: .06em; color: #6b2f04;
  background: linear-gradient(#ffe9a8, #ffd15c); border: 2px solid #b56a16;
  border-radius: 12px; padding: .35rem .5rem; margin-bottom: .8rem;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.wh-star { color: #e0481f; }
.wheel-stage {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px; overflow: hidden;
  background: radial-gradient(circle at 50% 34%, rgba(255,255,255,.6), rgba(150,110,220,.30) 58%, rgba(60,30,90,.42));
  box-shadow: inset 0 0 26px rgba(70,30,110,.4);
}
.wheel-canvas { width: 100%; height: 100%; display: block; }
.wheel-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1rem; color: #4a2a6a;
  background: rgba(255,248,236,.6); z-index: 3;
}
.wheel-loading[hidden] { display: none; }
.wheel-fallback {
  position: absolute; inset: 6%; border-radius: 50%; z-index: 2;
  box-shadow: inset 0 0 24px rgba(80,40,120,.3), 0 8px 24px rgba(0,0,0,.25);
}
.wheel-fallback[hidden] { display: none; }
.wheel-fallback .wf-icon {
  position: absolute; width: 30px; height: 30px; object-fit: contain;
  transform: translate(-50%, -50%); pointer-events: none;
}
.wheel-fallback .wf-center {
  position: absolute; left: 50%; top: 50%; width: 22%; height: 22%;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff3c4, #f0a81e 70%, #b56a16);
  border: 3px solid #8a4b12; box-shadow: 0 3px 8px rgba(0,0,0,.3);
}
.wf-pointer {
  position: absolute; left: 50%; top: 2.5%; z-index: 4;
  width: 0; height: 0; transform: translateX(-50%);
  border-left: 13px solid transparent; border-right: 13px solid transparent;
  border-top: 34px solid #000000;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.4));
}
.gatcha-base { margin-top: .9rem; text-align: center; }
.gatcha-cost { font-family: 'Baloo 2', sans-serif; font-weight: 700; margin-bottom: .6rem; }
.gatcha-controls { display: flex; gap: .5rem; align-items: end; justify-content: center; flex-wrap: wrap; }
.gatcha-controls .field { text-align: left; }
.gatcha-controls select, .gatcha-controls input { min-width: 130px; }
.gatcha-play {
  padding: .7rem 1.6rem; font-size: 1.05rem; color: #fff;
  background: linear-gradient(#ff7a59, #e0481f); border: 2px solid #a8330f;
  box-shadow: 0 8px 18px rgba(224,72,31,.4);
}
.gatcha-play:hover { filter: brightness(1.05); }
.gatcha-closed-note, .gatcha-warn { font-size: .9rem; color: #7a1f1f; font-weight: 600; }
.gatcha-flash:empty { display: none; }
.gatcha-flash { width: 100%; }
.gatcha-reveal {
  position: absolute; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center;
  background: rgba(30,16,40,.55); border-radius: inherit;
}
.gatcha-reveal[hidden] { display: none; }
.gatcha-reveal.pop .gatcha-reveal-card { animation: gpop .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes gpop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.gatcha-reveal-card { background: #fff; border-radius: 18px; padding: 1rem 1.2rem; text-align: center; width: min(300px, 80%); box-shadow: 0 20px 40px rgba(0,0,0,.35); }
.gr-name { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.1rem; margin-top: .4rem; color: #5a2d05; }
.gr-sub { font-size: .8rem; color: #6b6478; }
.gatcha-again { margin-top: .8rem; }
.gatcha-odds .section-title { margin-bottom: .6rem; }
.gatcha-prize-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.gatcha-prize-list li { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: 10px; background: rgba(246,196,69,.1); }
.gatcha-prize-list img { border-radius: 8px; }
.gp-name { flex: 1; font-weight: 600; font-size: .9rem; }
.gp-chance { font-family: 'Baloo 2', sans-serif; font-weight: 700; color: #7a4b00; }
.gatcha-total { margin-top: .7rem; font-size: .85rem; font-weight: 700; color: #1a7f37; }
.gatcha-total.is-bad { color: #b42318; }
.gatcha-balance { margin-top: .8rem; padding-top: .7rem; border-top: 1px solid rgba(50,16,68,.1); font-size: .9rem; }
.gatcha-status { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .7rem; }
.gatcha-status .gatcha-total { margin: 0; }
.gatcha-toggle { flex-direction: row; align-items: center; gap: .45rem; }
.gatcha-toggle input { width: auto; margin: 0; }
.shop-result.is-active { background: rgba(246,196,69,.3); }
@media (prefers-reduced-motion: reduce) {
  .gatcha-reveal.pop .gatcha-reveal-card { animation: none !important; }
}
.shop-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.shop-filters input[type="search"] { width: 100%; }
.shop-filters select { width: auto; min-width: 160px; }
@media (max-width: 520px) {
  .shop-filters { grid-template-columns: 1fr; }
  .shop-filters select { width: 100%; }
}
.shop-admin { min-width: 0; }
#shopFlash:empty { display: none; }
#shopFlash { margin-bottom: .8rem; }

/* buy modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200; padding: 1rem;
  background: rgba(20, 10, 30, .55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  position: relative; background: #fff; border-radius: 18px;
  width: min(440px, 100%); max-height: 90vh; overflow: auto;
  padding: 1.4rem; box-shadow: 0 30px 70px rgba(20, 10, 30, .4);
}
.modal-close {
  position: absolute; top: .5rem; right: .8rem; border: 0; background: none;
  font-size: 1.7rem; line-height: 1; color: #9a8fa6; cursor: pointer;
}
.buy-summary { display: flex; gap: .8rem; align-items: center; margin-bottom: 1rem; }
.buy-summary img { border-radius: 10px; background: rgba(246,196,69,.15); }
.buy-name { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.05rem; }
.buy-total { margin: .4rem 0 1rem; font-size: 1.02rem; }
.buy-error { color: #b42318; font-size: .86rem; margin-bottom: .6rem; }
.buy-error[hidden] { display: none; }

/* admin add-item picker */
.shop-results {
  border: 1px solid rgba(50,16,68,.12); border-radius: 12px; max-height: 280px;
  overflow: auto; margin-bottom: .8rem; background: #fff;
}
.shop-results[hidden] { display: none; }
.shop-result {
  display: flex; gap: .55rem; align-items: center; width: 100%; text-align: left;
  padding: .5rem .65rem; background: none; border: 0; cursor: pointer;
  border-bottom: 1px solid rgba(50,16,68,.06); font: inherit;
}
.shop-result:hover { background: rgba(246,196,69,.18); }
.shop-selected {
  display: flex; gap: .6rem; align-items: center; padding: .6rem;
  border: 1px solid rgba(50,16,68,.12); border-radius: 12px; margin-bottom: .8rem;
  background: rgba(246,196,69,.1);
}
.shop-selected[hidden] { display: none; }
.shop-admin-item { display: inline-flex; gap: .5rem; align-items: center; }
.shop-edit-row td { background: rgba(246,196,69,.08); }
.shop-form-msg { font-size: .86rem; }
.shop-form-msg.ok { color: #1a7f37; }
.shop-form-msg.err { color: #b42318; }

.alertbox { border: 2px solid rgba(226,87,108,.45); background: rgba(255,122,138,.16); border-radius: 14px; padding: 1rem; font-size: .9rem; }
.alertbox strong { color: #A32038; }

.shop-delivery-note {
  display: flex; align-items: center; gap: .55rem;
  margin-top: 1rem;
  background: rgba(255,122,138,.18);
  border: 2px solid rgba(226,87,108,.6);
  box-shadow: 0 6px 18px rgba(226,87,108,.16);
  color: #8f1d33;
  font-size: .9rem;
}
.shop-delivery-note strong { color: #A32038; }
.shop-delivery-note::before {
  content: "!"; flex: 0 0 auto;
  display: inline-grid; place-items: center;
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: #d6455c; color: #fff; font-weight: 800; font-size: .9rem;
}
@media (min-width: 1000px) {
  .shop-delivery-note { white-space: nowrap; }
}

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { position: static; }
  .admin-nav-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem;
    width: 100%; min-height: 46px; padding: .7rem .9rem; margin: 0;
    background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px; cursor: pointer;
    font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1rem;
  }
  .admin-nav-toggle svg { width: 18px; height: 18px; transition: transform .18s ease; }
  .admin-nav:not(.is-collapsed) .admin-nav-toggle svg { transform: rotate(180deg); }
  .admin-nav-links { display: grid; gap: .3rem; margin-top: .4rem; }
  .admin-nav.is-collapsed .admin-nav-links { display: none; }
  .admin-nav a, .admin-nav summary { min-height: 44px; }
}

/* ---------------------------------------------------------------- footer */
.site-foot { background: #15161A; color: rgba(255,249,239,.85); margin-top: 2rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem; padding: 2.4rem 0 1.2rem; }
.foot-brand { display: flex; align-items: center; gap: .7rem; }
.foot-brand img { width: clamp(180px, 22vw, 240px); height: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,.4)); }
.foot-col h4 { color: var(--gold); font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .6rem; }
.foot-col a { display: block; color: rgba(255,249,239,.8); padding: .18rem 0; font-size: .9rem; }
.foot-col a:hover { color: var(--gold); }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1rem 0 1.4rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; }

/* Full-width admin pages: brand left, footer menus pushed to the right edge. */
@media (min-width: 901px) {
  body.is-admin .foot-grid { grid-template-columns: 1fr auto auto; }
  body.is-admin .foot-grid .foot-col { justify-self: end; text-align: right; }
}

/* --------------------------------------------------------- mascot helpers */
.mascot-inline { pointer-events: none; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .hero-mascot, .hero-clouds, .hero-island, .cta-mascot { animation: none !important; }
}

/* --------------------------------------------------------- filter bar */
.filter-bar {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; box-shadow: var(--shadow); margin-bottom: 1rem;
}
.filter-form { display: flex; gap: .9rem; flex-wrap: wrap; align-items: flex-end; }
.filter-field { display: flex; flex-direction: column; gap: .3rem; min-width: 150px; }
.filter-field.grow { flex: 1 1 240px; }
.filter-field.small { width: 122px; min-width: 104px; }
.filter-field > span {
  font-family: 'Baloo 2', sans-serif; font-size: .78rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft);
}
.filter-actions { display: flex; gap: .5rem; align-items: center; white-space: nowrap; }
.filter-classes { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.filter-classes .chip { cursor: pointer; }

.filter-summary {
  display: flex; gap: .55rem; flex-wrap: wrap; align-items: center;
  margin-bottom: 1rem; font-size: .88rem; color: var(--ink-soft);
}
.filter-tag {
  background: var(--gold-soft); border: 1.5px solid var(--gold); color: var(--plum);
  border-radius: 999px; padding: .22rem .7rem; font-weight: 600; font-size: .82rem;
}
.filter-tag:hover { color: var(--plum); filter: brightness(.97); }

@media (max-width: 720px) {
  .filter-field, .filter-field.small, .filter-field.grow { flex: 1 1 100%; width: auto; }
  .filter-actions { width: 100%; }
  .filter-actions .btn { flex: 1; }
}

/* ------------------------------------------------- character / guild cards */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.char-card {
  display: block; background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1rem; box-shadow: var(--shadow); transition: .18s; color: inherit;
}
.char-card:hover { transform: translateY(-3px); border-color: var(--gold); color: inherit; box-shadow: var(--shadow-lg); }
.char-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .85rem; }
.char-card .avatar { width: 52px; height: 52px; border-radius: 15px; font-size: 1.3rem; }
.char-id { display: flex; flex-direction: column; gap: .28rem; min-width: 0; }
.char-id strong { font-family: 'Baloo 2', sans-serif; font-size: 1.1rem; color: var(--plum); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char-head .badge.green { margin-left: auto; }
.char-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; text-align: center; }
.char-stats span, .guild-stats span {
  display: flex; flex-direction: column; background: var(--cream);
  border: 1.5px solid var(--line); border-radius: 12px; padding: .4rem .2rem;
}
.char-stats b, .guild-stats b { font-family: 'Baloo 2', sans-serif; font-size: .98rem; color: var(--plum); }
.char-stats i, .guild-stats i { font-style: normal; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }

.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.guild-card {
  display: block; background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem; box-shadow: var(--shadow); transition: .18s; color: inherit;
}
.guild-card:hover { transform: translateY(-3px); border-color: var(--gold); color: inherit; box-shadow: var(--shadow-lg); }
.guild-head { display: flex; align-items: center; gap: .7rem; }
.guild-emblem {
  width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; font-size: 1.4rem;
  border-radius: 14px; background: linear-gradient(145deg, var(--gold-soft), var(--gold));
}
.guild-id { display: flex; flex-direction: column; min-width: 0; }
.guild-id strong { font-family: 'Baloo 2', sans-serif; font-size: 1.12rem; color: var(--plum); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-id .muted { font-size: .78rem; }
.guild-head .badge.gold { margin-left: auto; }
.guild-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: .85rem; text-align: center; }
.guild-notice {
  margin-top: .7rem; padding-top: .6rem; border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band-inner { grid-template-columns: 1fr; text-align: center; }
  .cta-band p { margin-inline: auto; }
  .cta-points { justify-content: center; }
  .pod3 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .grid.two, .grid.three, .grid.four, .rank-cards, .explore-grid, .podium { grid-template-columns: 1fr; }
  .hero-island { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
}

/* ================================================================== carousel
   Full-width futuristic promotion banner, directly under the top menu. */
.promo-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #120725;
  color: #fff;
  outline: none;
}
.promo-track {
  position: relative;
  height: clamp(470px, 45vw, 620px);
}
.promo-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .9s ease, visibility .9s;
  background:
    radial-gradient(700px 380px at 78% 12%, rgba(79, 200, 232, .22), transparent 62%),
    radial-gradient(620px 360px at 12% 92%, rgba(246, 196, 69, .18), transparent 62%),
    linear-gradient(135deg, #190a33, #321044 55%, #170726);
}
.promo-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}
.promo-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.07);
  transition: transform 9s cubic-bezier(.2, .6, .2, 1);
  filter: saturate(1.05);
}
.promo-slide.is-active .promo-slide-img { transform: scale(1.01); }

.promo-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 4, 30, .92) 0%, rgba(12, 4, 30, .72) 36%, rgba(12, 4, 30, .18) 72%, rgba(12, 4, 30, .04) 100%),
    linear-gradient(0deg, rgba(10, 3, 24, .88) 0%, rgba(10, 3, 24, .18) 38%, transparent 62%);
}
.promo-grid {
  position: absolute;
  inset: -20% -10%;
  z-index: 1;
  opacity: .22;
  background-image:
    linear-gradient(rgba(79, 200, 232, .45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 200, 232, .45) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(520px) rotateX(58deg) translateY(24%);
  transform-origin: center bottom;
  -webkit-mask-image: linear-gradient(0deg, #000 0%, transparent 72%);
  mask-image: linear-gradient(0deg, #000 0%, transparent 72%);
  animation: promoGridDrift 18s linear infinite;
}
.promo-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(79, 200, 232, .8), rgba(246, 196, 69, .8), transparent);
  box-shadow: 0 0 18px rgba(79, 200, 232, .8);
  opacity: .55;
  animation: promoScan 7s linear infinite;
}
.promo-orb {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}
.promo-orb.o1 {
  width: 260px; height: 260px; right: 14%; top: 8%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.6), rgba(79,200,232,.14) 45%, transparent 70%);
  animation: promoFloat 10s ease-in-out infinite;
}
.promo-orb.o2 {
  width: 150px; height: 150px; right: 30%; bottom: 16%;
  background: radial-gradient(circle at 35% 30%, rgba(255,231,154,.7), rgba(246,196,69,.12) 50%, transparent 72%);
  animation: promoFloat 13s ease-in-out infinite reverse;
}
.promo-content {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 3.4rem;
}
.promo-copy { max-width: 660px; }
.promo-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .34rem .9rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  border: 1px solid rgba(79, 200, 232, .55);
  background: rgba(10, 3, 24, .55);
  color: #CDF6FF;
  font-family: 'Baloo 2', sans-serif;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  box-shadow: 0 0 24px rgba(79, 200, 232, .28), inset 0 0 18px rgba(79, 200, 232, .08);
  backdrop-filter: blur(8px);
}
.promo-badge::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  animation: promoPulse 2.4s ease-in-out infinite;
}
.promo-title {
  margin: 0 0 .7rem;
  color: #fff;
  font-size: clamp(2rem, 4.4vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -.5px;
  overflow-wrap: break-word;
  text-shadow: 0 8px 34px rgba(0, 0, 0, .5);
}
.promo-desc {
  max-width: 54ch;
  margin: 0 0 1.5rem;
  color: rgba(245, 248, 255, .84);
  font-size: clamp(.95rem, 1.25vw, 1.08rem);
  line-height: 1.65;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}
.promo-btn {
  padding: .72rem 1.45rem;
  background: linear-gradient(180deg, #FFF0B8, var(--gold) 60%, #E0A61F);
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow: 0 0 0 4px rgba(246, 196, 69, .12), 0 14px 34px rgba(0, 0, 0, .45), 0 0 26px rgba(246, 196, 69, .35);
}
.promo-btn:hover { box-shadow: 0 0 0 4px rgba(246,196,69,.2), 0 18px 40px rgba(0,0,0,.5), 0 0 34px rgba(246,196,69,.5); }
.promo-btn-arrow { transition: transform .18s; }
.promo-btn:hover .promo-btn-arrow { transform: translateX(4px); }

.promo-sigil {
  position: relative;
  flex: 0 0 auto;
  width: clamp(150px, 17vw, 240px);
  aspect-ratio: 1;
  margin-right: clamp(0px, 3vw, 55px);
  opacity: .9;
}
.sigil-ring, .sigil-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.sigil-ring {
  border: 1px solid rgba(79, 200, 232, .45);
  box-shadow: 0 0 40px rgba(79, 200, 232, .2), inset 0 0 40px rgba(79, 200, 232, .12);
  background:
    conic-gradient(from 0deg, transparent 0 12%, rgba(79,200,232,.55) 13%, transparent 20% 42%, rgba(246,196,69,.55) 43%, transparent 50% 78%, rgba(255,255,255,.35) 79%, transparent 86%);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 59%, #000 61%, transparent 62%);
  mask: radial-gradient(circle, transparent 58%, #000 59%, #000 61%, transparent 62%);
  animation: promoSpin 22s linear infinite;
}
.sigil-core {
  inset: 21%;
  border: 1px solid rgba(246, 196, 69, .5);
  box-shadow: 0 0 30px rgba(246, 196, 69, .25), inset 0 0 34px rgba(246,196,69,.15);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.28), transparent 55%);
  animation: promoPulse 4s ease-in-out infinite;
}

.promo-slide .promo-badge,
.promo-slide .promo-title,
.promo-slide .promo-desc,
.promo-slide .promo-btn {
  opacity: 0;
  transform: translateY(18px);
}
.promo-slide.is-active .promo-badge { animation: promoRise .7s .08s cubic-bezier(.2,.7,.2,1) forwards; }
.promo-slide.is-active .promo-title { animation: promoRise .8s .16s cubic-bezier(.2,.7,.2,1) forwards; }
.promo-slide.is-active .promo-desc { animation: promoRise .8s .26s cubic-bezier(.2,.7,.2,1) forwards; }
.promo-slide.is-active .promo-btn { animation: promoRise .8s .36s cubic-bezier(.2,.7,.2,1) forwards; }

.promo-controls {
  position: absolute;
  z-index: 7;
  left: 0;
  right: 0;
  bottom: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}
.promo-controls > * { pointer-events: auto; }
.promo-arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .32);
  background: rgba(10, 3, 24, .5);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: .18s;
}
.promo-arrow:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(10, 3, 24, .72);
  box-shadow: 0 0 22px rgba(246, 196, 69, .3);
}
.promo-dots { display: flex; align-items: center; gap: .45rem; margin: 0 auto; }
.promo-dot {
  width: 26px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, .32);
  transition: .2s;
}
.promo-dot:hover { background: rgba(255, 255, 255, .6); }
.promo-dot.is-active {
  width: 52px;
  background: linear-gradient(90deg, var(--gold), #FFF0B8);
  box-shadow: 0 0 14px rgba(246, 196, 69, .55);
}
.promo-progress {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, .08);
}
.promo-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  box-shadow: 0 0 14px rgba(79, 200, 232, .8);
}
.promo-carousel.is-playing .promo-slide.is-active .promo-progress span {
  animation: promoBar 6.5s linear forwards;
}
.promo-carousel.is-paused .promo-slide.is-active .promo-progress span { animation-play-state: paused; }

@keyframes promoRise { to { opacity: 1; transform: translateY(0); } }
@keyframes promoBar { from { width: 0; } to { width: 100%; } }
@keyframes promoGridDrift { from { background-position: 0 0, 0 0; } to { background-position: 0 72px, 72px 0; } }
@keyframes promoScan { 0% { transform: translateY(-10px); } 50% { transform: translateY(calc(clamp(470px, 45vw, 620px) - 20px)); } 100% { transform: translateY(-10px); } }
@keyframes promoSpin { to { transform: rotate(360deg); } }
@keyframes promoPulse { 0%, 100% { opacity: .65; transform: scale(.98); } 50% { opacity: 1; transform: scale(1.03); } }
@keyframes promoFloat { 0%, 100% { transform: translateY(-8px); } 50% { transform: translateY(10px); } }

@media (max-width: 900px) {
  .promo-sigil { display: none; }
  .promo-copy { max-width: 100%; }
  .promo-shade {
    background:
      linear-gradient(90deg, rgba(12, 4, 30, .9) 0%, rgba(12, 4, 30, .62) 55%, rgba(12, 4, 30, .22) 100%),
      linear-gradient(0deg, rgba(10, 3, 24, .92) 0%, rgba(10, 3, 24, .2) 55%, transparent 72%);
  }
}
@media (max-width: 620px) {
  .promo-track { height: 540px; }
  .promo-content { align-items: flex-end; padding-bottom: 5.4rem; }
  .promo-slide-img { object-position: 68% center; }
  .promo-title { font-size: clamp(1.65rem, 7vw, 2.2rem); }
  .promo-desc { font-size: .94rem; max-width: 100%; }
  .promo-controls { bottom: 1rem; }
  .promo-arrow { width: 40px; height: 40px; }
  @keyframes promoScan { 0% { transform: translateY(-10px); } 50% { transform: translateY(520px); } 100% { transform: translateY(-10px); } }
}
@media (prefers-reduced-motion: reduce) {
  .promo-slide-img,
  .promo-grid,
  .promo-scan,
  .promo-orb,
  .sigil-ring,
  .sigil-core,
  .promo-badge::before { animation: none !important; transition: none !important; }
  .promo-slide .promo-badge,
  .promo-slide .promo-title,
  .promo-slide .promo-desc,
  .promo-slide .promo-btn { opacity: 1; transform: none; animation: none !important; }
  .promo-slide-img { transform: none; }
}

/* ------------------------------------------------------------- news cover */
.news-cover {
  margin: 0 0 1.2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: var(--cream-2);
}
.news-cover img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; }

/* ---------------------------------------------------- explore card images */
.explore-card.has-image { padding-top: 0; }
.explore-card-img {
  display: block;
  width: calc(100% + 2.6rem);
  height: 132px;
  margin: 0 -1.3rem .95rem;
  object-fit: cover;
  border-radius: 18px 18px 0 0;
}
.explore-card-link {
  display: inline-block;
  margin-top: .65rem;
  color: var(--gold-2);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .02em;
}

/* ------------------------------------------------- admin content manager */
.btn.xs { padding: .2rem .5rem; min-width: 30px; font-size: .76rem; box-shadow: none; }
.btn[disabled] { opacity: .38; cursor: not-allowed; transform: none; }
.field-hint { display: inline; font-family: 'Rubik', sans-serif; font-size: .72rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.admin-content-table td { vertical-align: middle; }
.admin-content-title { display: flex; align-items: center; gap: .75rem; min-width: 240px; }
.admin-content-title > span:last-child { display: flex; flex-direction: column; gap: .18rem; min-width: 0; }
.admin-content-title strong { color: var(--plum); font-family: 'Baloo 2', sans-serif; font-size: 1.02rem; }
.admin-content-thumb {
  width: 76px;
  height: 48px;
  flex: 0 0 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  font-size: 1.2rem;
}
.admin-content-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-content-thumb.card-thumb { width: 56px; flex-basis: 56px; height: 56px; border-radius: 14px; }
.admin-content-desc { display: block; color: var(--ink-soft); font-size: .78rem; line-height: 1.35; max-width: 36ch; }
.admin-actions { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.admin-actions form { margin: 0; }
.admin-order { display: flex; align-items: center; gap: .3rem; }
.admin-order .mono { min-width: 1.4rem; text-align: center; font-size: .8rem; color: var(--ink-soft); }
.admin-order form { margin: 0; }

/* ------------------------------------------------------- admin media picker */
.admin-media-field > span { margin-bottom: .5rem; }
.admin-media {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 1rem;
  align-items: stretch;
  padding: .8rem;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff, var(--cream));
}
.admin-media-preview {
  position: relative;
  min-height: 130px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--cream-2);
  border: 1px solid var(--line);
}
.admin-media-preview img { width: 100%; height: 100%; min-height: 130px; max-height: 210px; object-fit: cover; display: block; }
.admin-media-empty {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  color: var(--ink-soft);
  font-size: .82rem;
}
.admin-media-empty span { font-size: 1.5rem; }
.admin-media-side { display: flex; flex-direction: column; justify-content: center; gap: .5rem; min-width: 0; }
.admin-media-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.media-pick { cursor: pointer; margin: 0; }
.admin-media .media-url { background: #fff; }
.media-status { min-height: 1.1em; margin: .35rem 0 0; color: #1E7A55; }
.media-status.err { color: var(--coral-2); }
@media (max-width: 620px) {
  .admin-media { grid-template-columns: 1fr; }
  .admin-content-title { min-width: 190px; }
}

/* --------------------------------------------------------------- misi board */
.misi-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.misi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: .8rem;
}
.misi-card {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--cream));
  box-shadow: var(--shadow);
}
.misi-state-claimed { opacity: .86; }
.misi-state-claimable {
  border-color: rgba(217, 154, 34, .6);
  box-shadow: 0 0 0 3px rgba(246, 196, 69, .18), var(--shadow);
}
.misi-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.misi-title {
  margin: 0;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.1rem;
  color: var(--plum);
  line-height: 1.15;
}
.misi-desc { margin: 0; color: var(--ink-soft); font-size: .84rem; line-height: 1.4; }
.misi-progress { display: flex; flex-direction: column; gap: .3rem; }
.misi-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.misi-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width .35s ease;
}
.misi-state-claimed .misi-bar > span { background: linear-gradient(90deg, #1E9E68, #7EE0B8); }
.misi-progress-text {
  font-size: .76rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.misi-rewards { display: flex; flex-wrap: wrap; gap: .4rem; }
.misi-reward {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .18rem .5rem;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid rgba(217, 154, 34, .35);
  color: #7a5000;
  font-size: .78rem;
  font-weight: 700;
}
.misi-reward img { border-radius: 4px; }
.misi-action { margin-top: auto; padding-top: .3rem; }
.btn.is-disabled { opacity: .55; pointer-events: none; box-shadow: none; }

/* type filters */
.misi-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 0; }
.misi-chip {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: .3rem .72rem;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
}
.misi-chip:hover { border-color: var(--gold-2); color: var(--plum); }
.misi-chip.is-active { background: var(--gold); border-color: var(--gold-2); color: var(--plum); }
.misi-card.is-hidden { display: none; }
.misi-no-match[hidden] { display: none; }

/* Type filters live in a Codex-style sidebar to the left of each section. */
.misi-section-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 1.2rem; align-items: start; margin-top: 1.2rem; }
.misi-section-layout + .misi-section-layout { margin-top: 2.4rem; }
.misi-main { min-width: 0; }
.misi-side-nav { gap: .8rem; }
.misi-side-nav .misi-filter {
  display: flex; flex-direction: column; flex-wrap: nowrap;
  gap: .25rem; margin: 0;
}
.misi-side-title {
  display: block; padding: .15rem .45rem .2rem;
  color: #d8b98a; font: 800 .66rem/1.3 'Baloo 2', sans-serif;
  letter-spacing: .1em; text-transform: uppercase;
}
.misi-side-nav .misi-chip { width: 100%; text-align: left; }
.misi-side-nav .misi-chip:not(.is-active):hover,
.misi-side-nav .misi-chip:not(.is-active):focus-visible {
  border-color: #ffe0a6; color: #fff; outline: none;
  box-shadow: 0 0 0 2px rgba(255, 201, 60, .35);
}
.misi-side-nav .misi-chip.is-active {
  border-color: #ffe0a6; color: #2a1200;
  background: linear-gradient(180deg, #ffe0a6, #e8b96b);
  box-shadow: inset 0 1px 0 #fff6e2, 0 0 0 2px rgba(255, 201, 60, .45);
}
.misi-side-nav .misi-chip-count {
  min-width: 1.35rem; padding: 0 .3rem; border-radius: 999px;
  background: rgba(0, 0, 0, .28); color: inherit;
  font-size: .7rem; line-height: 1.35rem; text-align: center;
}
.misi-side-nav .misi-chip.is-active .misi-chip-count { background: rgba(80, 50, 20, .18); }

/* Mobile: each section keeps its filters as a compact sticky chip rail. */
@media (max-width: 900px) {
  .misi-section-layout { grid-template-columns: 1fr; gap: .55rem; margin-top: 1rem; }
  .misi-section-layout + .misi-section-layout { margin-top: 1.8rem; }
  .catalog-filter-nav.misi-side-nav {
    position: sticky; top: 76px; z-index: 25;
    flex-direction: row; align-items: center;
    max-height: none; overflow-x: auto; overflow-y: hidden;
    padding: .4rem; gap: .35rem; border-width: 2px; border-radius: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .misi-side-nav .misi-filter { flex-direction: row; flex-wrap: nowrap; gap: .3rem; }
  .misi-side-nav .misi-side-title { display: none; }
  .misi-side-nav .misi-chip { width: auto; text-align: center; white-space: nowrap; }
}
@media (max-width: 720px) {
  .misi-grid { grid-template-columns: 1fr; gap: .75rem; margin-top: .6rem; }
  .misi-card { padding: .95rem 1rem; gap: .55rem; border-radius: 16px; }
  .misi-title { font-size: 1rem; }
  .misi-desc { font-size: .82rem; }
  .misi-reward { font-size: .74rem; }
  .misi-section-layout .section-title { margin-bottom: .6rem; flex-wrap: wrap; row-gap: .1rem; }
  .misi-section-layout .section-title .muted { font-size: .76rem; }
}

/* --------------------------------------------------------------- market */
.market-chars { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 1rem; }
.market-chars .btn { font-size: .86rem; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td {
  padding: .5rem .6rem; text-align: left; vertical-align: middle; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.table th { font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.table tbody tr:last-child td { border-bottom: 0; }
.table img { border-radius: 6px; vertical-align: middle; }
.table form.inline { margin: 0; }
/* Admin roles tables: wrap content instead of forcing a horizontal scrollbar. */
table.role-admin-table th, table.role-admin-table td { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 620px) {
  .table th, .table td { padding: .4rem .45rem; font-size: .82rem; }
}

.inventory-status {
  position: absolute; top: .6rem; right: .6rem; z-index: 2;
  display: inline-flex; align-items: center;
  padding: .18rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: #6b4a00; background: linear-gradient(180deg, #FFF0B8, var(--gold));
  border: 1px solid rgba(217, 154, 34, .5); box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.inventory-listed { margin-top: auto; font-size: .82rem; }

.market-delivery-note {
  display: inline-block;
  margin: .55rem 0 0;
  padding: .6rem .9rem;
  border-left: 4px solid #C0392B;
  background: rgba(192, 57, 43, .09);
  border-radius: 8px;
  font-size: .95rem;
  line-height: 1.45;
  color: #7a1f16;
}
.market-delivery-note .market-red { color: #C0392B; font-weight: 800; }

/* --------------------------------------------------- account nav (full dock) */
/* A dark, full-width control that reads as a separate system from the light
   pill tabs underneath it (.tabs / .account-tabs). */
.account-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: .35rem;
  width: 100%;
  margin: 0 0 1.35rem;
  padding: .4rem;
  border-radius: 16px;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(255, 201, 60, .16), transparent 55%),
    linear-gradient(180deg, var(--plum-2), var(--plum-deep));
  border: 1px solid rgba(8, 42, 68, .55);
  box-shadow: 0 16px 34px rgba(8, 42, 68, .22), inset 0 1px 0 rgba(255, 255, 255, .09);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.account-nav::-webkit-scrollbar { display: none; }
.account-nav a {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .62rem 1rem;
  border-radius: 11px;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, .76);
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.account-nav a svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: .82;
  transition: opacity .16s ease;
}
.account-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .09);
  transform: translateY(-1px);
}
.account-nav a:hover svg { opacity: 1; }
.account-nav a:active { transform: translateY(0) scale(.99); }
.account-nav a:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--gold); }
.account-nav a.active {
  color: var(--plum-deep);
  background: linear-gradient(180deg, #FFDD73, var(--gold));
  border-color: rgba(8, 42, 68, .08);
  box-shadow: 0 8px 18px rgba(255, 201, 60, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.account-nav a.active svg { opacity: 1; }

@media (max-width: 980px) {
  .account-nav a { flex: 0 0 auto; }
}

/* 44px minimum tap targets + a visible gold keyboard focus ring on account
   controls (account dock and the pill tabs underneath it). */
.account-nav a { min-height: 44px; }
.tabs a, .tabs button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.tabs a:focus-visible, .tabs button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--gold); }

/* Admin dashboard: align KPI figures so they line up across the grid. */
.stat .value { font-variant-numeric: tabular-nums; }
.stat { transition: box-shadow .16s ease, border-color .16s ease; }
.stat:hover { border-color: rgba(255, 201, 60, .7); box-shadow: 0 22px 44px rgba(11, 58, 92, .16); }

/* Respect users who ask their OS to reduce motion: quiet the lifts/zooms. */
@media (prefers-reduced-motion: reduce) {
  .account-nav a, .admin-nav a, .admin-nav summary, .admin-nav-toggle svg, .btn, .stat {
    transition-duration: .01ms !important;
  }
  .account-nav a:hover, .btn:hover, .item-card:hover { transform: none; }
}

/* --------------------------------------------------------- market polish */
.market-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin: .2rem 0 .9rem; }
.market-count { font-size: .85rem; color: var(--ink-soft); }
/* Search takes the free space; sort + Filter sit together on the right. */
.market-filters { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
.market-price {
  display: inline-flex; align-items: center; gap: .3rem;
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.15rem; color: var(--plum);
}
.market-seller { font-size: .8rem; color: var(--ink-soft); margin: 0 0 .2rem; }
.market-card { overflow: hidden; }
.market-card .js-market-buy { width: 100%; }
.market-card h3 { line-height: 1.25; }

@media (max-width: 720px) {
  .card { padding: 1rem; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .kv > div { padding: .6rem .7rem; }
  .detail-head { gap: .75rem; }
  .detail-head > .btn { margin-left: 0 !important; }
  /* data tables stay usable: scroll horizontally with a subtle edge hint */
  .table-wrap { -webkit-overflow-scrolling: touch; box-shadow: inset -12px 0 12px -12px rgba(50, 16, 68, .22); }
  table.data { font-size: .84rem; }
  table.data th, table.data td { padding: .5rem .55rem; }
  .account-tabs-list { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: .25rem; }
  .account-tabs-list button { white-space: nowrap; flex: 0 0 auto; }
  .shop-filters { grid-template-columns: 1fr; }
  .shop-filters select { width: 100%; min-width: 0; }
  .shop-card { padding: .85rem; }
  .shop-icon img { width: 56px; height: 56px; }
  .shop-price-tag { top: .45rem; left: .45rem; }
  .inventory-status { top: .45rem; right: .45rem; }
}
@media (max-width: 420px) {
  .kv { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Seal Online colour pass — loaded last so it retints every page (public,
   account, admin) from one place: sunny sky, leaf green, sunshine gold,
   terracotta wood, deep-ocean ink.
   ========================================================================== */
body {
  background:
    radial-gradient(1100px 560px at 88% -6%, rgba(255, 201, 60, .20), transparent 62%),
    radial-gradient(900px 520px at -5% 4%, rgba(56, 190, 230, .18), transparent 58%),
    linear-gradient(180deg, #F1FBFF 0%, var(--cream) 42%, #FFF5DF 100%);
  background-attachment: fixed;
}

a { color: #1677C8; }
a:hover { color: #0E5AA0; }

/* Bright, glossy top bar with a thin rainbow-of-the-worlds accent strip. */
.topbar {
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(255,248,236,.93));
  border-bottom: 2px solid rgba(255, 201, 60, .6);
  box-shadow: 0 6px 22px rgba(11, 58, 92, .08);
}
.topbar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--leaf), var(--gold), var(--terracotta), var(--coral));
}
.brand-logo { filter: drop-shadow(0 6px 10px rgba(11, 58, 92, .22)); }

.page-hero {
  background:
    radial-gradient(620px 280px at 92% -20%, rgba(255,201,60,.55), transparent 60%),
    radial-gradient(520px 320px at 2% 120%, rgba(87,190,74,.35), transparent 62%),
    radial-gradient(420px 220px at 62% 120%, rgba(56,190,230,.25), transparent 60%),
    linear-gradient(135deg, #C9EDFF 0%, #E9F9FF 46%, #FFF3D0 100%);
  border-bottom: 3px solid var(--gold);
}
.page-hero h1 { color: var(--plum-deep); }

.card { background: linear-gradient(180deg, #fff 0%, #FFFDF7 100%); }
.char-card:hover, .guild-card:hover, .item-card:hover, a.card:hover {
  box-shadow: 0 22px 44px rgba(11, 58, 92, .16);
}

/* Public game-world shell; admin/account retain their existing presentation. */
body.is-public:not(.is-home) .topbar {
  background: rgba(89, 51, 22, .97);
  border-bottom: 4px solid #e9af3c;
  box-shadow: 0 5px 16px rgba(31, 17, 8, .3);
}
body.is-public:not(.is-home) .topbar::before { background: linear-gradient(90deg, #e4a638, #8abc54, #f7d478, #b7522f); }
body.is-public:not(.is-home) .nav-links a,
body.is-public:not(.is-home) .nav-dropdown-toggle { color: #fff1cc; text-shadow: 0 2px 2px #482409; }
body.is-public:not(.is-home) .nav-links a:hover,
body.is-public:not(.is-home) .nav-dropdown-toggle:hover { color: #fff; background: rgba(255, 202, 70, .2); }
body.is-public:not(.is-home) .nav-links a.active { color: #5e3210; background: #ffc93c; }
body.is-public:not(.is-home) .nav-dropdown-menu a { color: #3b2413; }
body.is-public:not(.is-home) .nav-dropdown-menu a:hover,
body.is-public:not(.is-home) .nav-dropdown-menu a.active { color: #5e3210; }
body.is-public:not(.is-home) .brand-logo { filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
body.is-public:not(.is-home) .mobile-toggle svg { stroke: #fff1cc; }
body.is-public:not(.is-home) .mobile-menu { background: #553014; border-top: 2px solid #d39a34; }
body.is-public:not(.is-home) .mobile-games summary { color: #fff1cc; }
.nav-art { display: none; }

body.is-home { background: #f4e2b8; }
body.is-home .topbar { display: none; }
body.is-home .site-main { padding-bottom: 0; }
body.is-home .site-main > .container,
body.is-home .site-main > .section-pad,
body.is-home .site-main > .band { position: relative; z-index: 1; }
.launch-world {
  position: relative; min-height: 900px; overflow: hidden; isolation: isolate;
  color: #fff7dd; background: #47823e;
}
.launch-world-bg {
  position: absolute; z-index: -2; inset: 0; overflow: hidden; background: #47823e;
}
.launch-world-bg picture { display: block; width: 100%; height: 100%; }
.launch-world-bg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 44%; }
.launch-world-bg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(17,35,39,.08), rgba(33,57,22,.01) 54%, rgba(30,46,18,.16));
}
.launch-shell { position: relative; width: min(1800px, 100%); min-height: 900px; margin: 0 auto; padding: 16px clamp(20px,4vw,72px) 18px; }
.launch-nav { position: relative; z-index: 5; display: grid; grid-template-columns: repeat(4,minmax(82px,1fr)) 180px repeat(4,minmax(82px,1fr)); align-items: start; gap: .5rem; min-height: 138px; }
.launch-nav-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap:2px;
  min-height: 92px; color: #fff2cb; font:900 clamp(.9rem,1.5vw,1.35rem)/1 'Baloo 2',sans-serif;
  text-transform:uppercase; text-shadow:-2px -2px #4a210c,2px -2px #4a210c,-2px 2px #4a210c,2px 2px #4a210c,0 4px 2px #301606; transition: transform .18s, filter .18s;
}
.launch-nav-link img { display:block; width:clamp(72px,9vw,135px); height:76px; object-fit:contain; filter:drop-shadow(0 4px 3px rgba(40,20,4,.45)); }
.launch-nav-link > span:first-child { font-size:1.55em; line-height:.9; filter:drop-shadow(0 2px 1px #41240e); }
.launch-nav-link.nav-home .nav-home-icon { width:1.55em; height:1.55em; filter:drop-shadow(0 2px 1px #41240e); }
.launch-nav-label { font-size:inherit!important; line-height:1!important; filter:none!important; }
.launch-nav-link.nav-characters img { content:url('/img/launch/nav-info.webp'); }
.launch-nav-link.nav-rankings { color:#ffe679; }
.launch-nav-link.nav-guilds { color:#ff8374; }
.launch-nav-link.nav-characters { color:#cfe9ff; }
.launch-nav-link.nav-item-mall { color:#ffbc55; }
.launch-nav-link.nav-news { color:#ffbc55; }
.launch-nav-link.nav-wiki { color:#f49ddd; }
.launch-nav-link.nav-downloads { color:#8bd4ff; }
.launch-nav-link:hover,.launch-nav-link:focus-visible { transform: translateY(-3px); filter: brightness(1.1); }
.launch-brand { display: grid; place-items: start center; min-height: 178px; margin-top: -8px; }
.launch-brand img { width: min(100%,190px); height: auto; filter: drop-shadow(0 7px 3px rgba(30,23,12,.42)); }
.launch-panels { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0,340px) minmax(0,1fr) minmax(0,360px); gap: clamp(16px,2.2vw,46px); align-items: start; margin-top: 38px; }
.launch-panels > * { min-width:0; }
.wood-panel,.blue-panel { border: 7px solid #69401d; border-radius: 24px; box-shadow: 0 12px 18px rgba(31,17,7,.34), inset 0 0 0 3px rgba(255,221,143,.55); }
.wood-panel { color: #532c15; background: linear-gradient(145deg,#ffe8ae,#f1ce87 55%,#ffe4a9); }
.launch-news { position: relative; aspect-ratio: 649 / 715; min-height: 370px; padding: 18% 13% 13%; margin-top: 14px; background: url('/img/launch/news-frame.webp') center / 100% 100% no-repeat; }
.launch-news h2,.launch-login h2 { position: absolute; top: 2px; left: 50%; width: max-content; max-width: 90%; transform: translateX(-50%); padding: 5px 32px 9px; margin: 0; color: transparent; font-size: 0; }
.launch-news h2 { top: -1%; width: 64%; max-width: 300px; height: 18%; min-height: 46px; display: flex; align-items: center; justify-content: center; padding: 0 8px; color: #f7e6bd; font: 900 clamp(1.2rem, 3.2vw, 1.9rem)/1 'Baloo 2',sans-serif; letter-spacing: .08em; text-align: center; text-transform: uppercase; text-shadow: 0 2px 1px #3a2410, 0 3px 6px rgba(0,0,0,.4); }
.launch-login h2 { top:1px; }
.launch-news-list { display: grid; gap: 9px; margin-top: 10px; }
.launch-news-item { display: grid; gap: 2px; color: #532c15; padding: 8px 4px; border-bottom: 1px solid rgba(96,54,19,.2); line-height: 1.25; }
.launch-news-item strong { font-family: 'Baloo 2',sans-serif; font-size: 1.06rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.launch-news-item small { color: #785130; }
.launch-news-item:hover { color: #a84322; }
.launch-empty { margin: .8rem 0; font-weight: 700; }
.launch-center { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 6px; }
.launch-countdown { position: relative; display: flex; flex-wrap: wrap; align-content: center; align-items: center; justify-content: center; width: min(100%,690px); min-height: 200px; padding: 50px 30px 30px; text-align: center; border:7px solid #493017; border-radius:64px; background:linear-gradient(160deg,#7c5830,#3a230f 52%,#6b4921); box-shadow:0 12px 22px rgba(25,15,5,.46),inset 0 0 0 3px #b0843f,inset 0 16px 28px rgba(255,214,140,.09); }
.launch-countdown:has(.countdown-unset) { min-height:240px; }
.launch-countdown-title { position:absolute; z-index:2; top:-32px; left:50%; transform:translateX(-50%); display:block; width:max-content; max-width:90%; margin:0; padding:6px 27px 7px; border:5px solid #543519; border-radius:14px; background:linear-gradient(#c08140,#8a4f1f 60%,#6f3d17); box-shadow:inset 0 2px 0 rgba(255,226,164,.45),0 5px 10px rgba(25,12,3,.35); color:#fff3c4; font:900 clamp(1.15rem,2.3vw,1.85rem)/1.1 'Baloo 2',sans-serif; text-transform:uppercase; letter-spacing:.02em; text-shadow:0 3px 2px #61280e; }
.launch-countdown-title-unset { top:-28px; }
.countdown-units { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; width: 100%; container-type: inline-size; }
.countdown-units > span { display: grid; align-content: center; justify-items: center; gap: 8px; min-height: 136px; padding: 12% 8%; border: 0; border-radius: 0; background: url('/img/launch/countdown-unit.webp') center / 100% 100% no-repeat; box-shadow: none; }
.countdown-units strong { display: block; color: #ffd25c; font: 900 clamp(2.4rem,4.6vw,4.2rem)/.92 'Baloo 2',sans-serif; letter-spacing: .02em; font-variant-numeric: tabular-nums; transform-origin: 50% 62%; text-shadow: 0 3px 0 #5a2a06, 0 7px 14px rgba(255,180,60,.32); }
@supports (container-type: inline-size) {
  .countdown-units strong { font-size: clamp(1.85rem, 12.2cqw, 4.2rem); }
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .countdown-units strong {
    background: linear-gradient(180deg,#fff7cf 4%,#ffd863 46%,#f5a62a 76%,#ffe08a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 0 rgba(90,42,6,.9)) drop-shadow(0 7px 12px rgba(255,180,60,.26));
    text-shadow: none;
  }
}
.countdown-units small { padding: 3px 9px; border: 1px solid rgba(255,214,140,.22); border-radius: 999px; background: rgba(58,31,10,.5); color: #ffe9b0; font: 800 clamp(.72rem,1.15vw,1rem)/1 'Baloo 2',sans-serif; text-transform: uppercase; letter-spacing:.16em; text-shadow:0 1px 1px rgba(63,28,6,.8); }
@container (max-width: 600px) {
  .countdown-units small { padding: 2px 7px; font-size: .72rem; letter-spacing: .07em; }
}
.countdown-units strong.is-ticking { animation: countdown-tick .42s cubic-bezier(.22,.9,.3,1); }
@keyframes countdown-tick {
  0% { transform: translateY(-18%) scale(.9); opacity: .2; }
  55% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.launch-countdown-unset,.countdown-finished { margin: 0; color: #ffebae; font: 700 1.1rem 'Baloo 2',sans-serif; }
.launch-countdown.is-finished { padding-top: 34px; }
.launch-countdown.is-finished .countdown-finished { max-width: 36ch; font-size: clamp(1.1rem,2.3vw,1.5rem); line-height: 1.4; text-wrap: balance; }
.launch-start,.panel-button { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding: 9px 23px; border: 4px solid #743b12; border-radius: 18px; box-shadow: inset 0 2px 0 rgba(255,255,255,.56),0 5px 0 rgba(88,44,13,.72); color: #fff1c4; font: 900 1.05rem/1.1 'Baloo 2',sans-serif; text-align: center; text-decoration: none; text-shadow: 0 2px 1px rgba(79,34,9,.78); text-transform: uppercase; transition: transform .14s,filter .14s; cursor: pointer; }
.launch-start { width:min(420px,92%); min-height:92px; border:0; border-radius:30px; background:url('/img/launch/game-start.webp') center / contain no-repeat; color:transparent; font-size:0; box-shadow:none; }
.launch-start-seal { display:none; }
.launch-start:hover,.panel-button:hover { transform: translateY(-3px); filter: brightness(1.08); color: #fff; }
.launch-start:active,.panel-button:active { transform: translateY(2px); }
.launch-actions { position: relative; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 14px; margin: 22px auto 18px; }
.launch-center .launch-actions { width: 100%; margin: 0; }
.launch-actions .launch-live { flex: none; }
.hot-features-nav { position: relative; z-index: 3; width: min(826px,calc(100% - 32px)); margin: 20px auto 12px; padding: 20px; border-style: solid; border-width: 64px 41px 44px; border-image: url('/img/features/hot-features-frame.webp') 140 90 90 90 fill stretch; }
.hot-features-nav h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hot-features-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(10px,1.4vw,20px); width: 100%; }
.hot-feature-link { display: block; min-width: 0; border-radius: 16px; overflow: hidden; transition: transform .16s, filter .16s; }
.hot-feature-link img { display: block; width: 100%; aspect-ratio: 7 / 8; object-fit: cover; }
.hot-feature-link:hover,.hot-feature-link:focus-visible { transform: translateY(-4px) scale(1.02); filter: brightness(1.06) drop-shadow(0 8px 12px rgba(30,14,4,.45)); }
.hot-feature-link:focus-visible { outline: 3px solid #ffe27a; outline-offset: 3px; }
.home-feature-showcase { overflow: hidden; padding: 0; background: #f8eed6; }
.home-feature-showcase img { max-width: 100%; }
.home-feature-section { position: relative; padding: 42px clamp(18px,5vw,72px); scroll-margin-top: 24px; }
#feature-marketplace { background: radial-gradient(130% 110% at 12% -10%, rgba(255,255,255,.55), transparent 58%), linear-gradient(135deg,#ffe9cf,#f5cb9b 54%,#dfa066); }
#feature-daily-mission { background: radial-gradient(130% 110% at 88% -10%, rgba(255,255,255,.5), transparent 58%), linear-gradient(135deg,#f3fadf,#d9edba 54%,#b6d68f); }
#feature-gatcha { background: radial-gradient(130% 110% at 12% -10%, rgba(255,255,255,.5), transparent 58%), linear-gradient(135deg,#e5f5fb,#c4e5f0 54%,#9ccee0); }
#feature-item-mall { background: radial-gradient(130% 110% at 88% -10%, rgba(255,255,255,.55), transparent 58%), linear-gradient(135deg,#fdf5e4,#f2e3c2 54%,#e3cc9a); }
#feature-diamond-cash { background: radial-gradient(130% 110% at 12% -10%, rgba(255,255,255,.5), transparent 58%), linear-gradient(135deg,#eaf3fb,#cfe2f0 54%,#aec9dc); }
#feature-auto-hunt { background: radial-gradient(130% 110% at 88% -10%, rgba(255,255,255,.45), transparent 58%), linear-gradient(135deg,#e4f2ea,#c1ddcf 54%,#96c0af); }
.home-feature-inner { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: clamp(22px,5vw,74px); width: min(1160px,100%); min-height: 340px; margin: 0 auto; padding: 34px clamp(30px,3.4vw,52px); border-style: solid; border-width: 30px 52px; border-image: url('/img/features/section-bg.webp') 62 58 62 58 fill stretch; background: none; box-shadow: none; border-radius: 0; }
.feature-even .home-feature-inner { background: none; }
.feature-even .home-feature-copy { order: 2; }
.feature-even .home-feature-art { order: 1; }
/* Odd sections: two separate parchment panels side by side. */
.feature-odd .home-feature-inner { grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: stretch; gap: clamp(14px,2.4vw,28px); min-height: 0; padding: 0; border: 0; border-image: none; background: none; }
.feature-odd .home-feature-copy,
.feature-odd .home-feature-art { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 26px clamp(24px,2.8vw,38px); border-style: solid; border-width: 26px 40px; border-image: url('/img/features/section-bg.webp') 62 58 62 58 fill stretch; border-radius: 0; background: none; box-shadow: none; }
.feature-odd .home-feature-copy { order: 1; }
.feature-odd .home-feature-art { order: 2; align-items: stretch; }
.feature-odd .home-feature-art img { width: 100%; border: 4px solid #69401d; box-shadow: 0 5px 0 rgba(70,38,15,.55); }
.home-feature-copy { padding: clamp(4px,2vw,20px); color: #4a2b15; }
.home-feature-kicker { display: inline-flex; margin-bottom: 8px; padding: 5px 12px; border: 2px solid #8b5b27; border-radius: 999px; background: linear-gradient(#fff0b5,#f2c45b); color: #633d1b; font: 800 .74rem/1 'Baloo 2',sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.home-feature-copy h2 { margin: 0 0 12px; color: #553216; font: 900 clamp(1.65rem,3.1vw,2.55rem)/1.07 'Baloo 2',sans-serif; text-shadow: 0 2px 0 rgba(255,255,255,.58); }
.feature-even .home-feature-copy h2 { color: #104464; }
.home-feature-copy p { max-width: 46ch; margin: 0 0 20px; color: #553a20; font-size: clamp(.96rem,1.3vw,1.1rem); line-height: 1.55; }
.feature-even .home-feature-copy p { color: #244d60; }
.home-feature-cta { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 18px; border: 3px solid #613817; border-radius: 14px; background: linear-gradient(#ffdf71,#f5a91f 60%,#d87614); box-shadow: inset 0 2px 0 rgba(255,255,255,.5),0 4px 0 rgba(76,43,18,.65); color: #fff4d3; font: 900 .95rem/1.1 'Baloo 2',sans-serif; text-shadow: 0 2px 1px #714117; transition: transform .14s,filter .14s; }
.home-feature-cta span { color: #fff0a9; font-size: 1.2em; transition: transform .14s; }
.home-feature-cta:hover { transform: translateY(-2px); filter: brightness(1.06); color: #fff; }
.home-feature-cta:hover span { transform: translateX(3px); }
.home-feature-art { min-width: 0; padding: 9px; border: 5px solid #69401d; border-radius: 22px; background: linear-gradient(145deg,#14527a,#082e4b); box-shadow: inset 0 0 0 2px rgba(255,221,143,.55),0 7px 0 rgba(70,38,15,.7),0 14px 24px rgba(31,17,7,.28); }
.home-feature-art img { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 13px; object-fit: cover; object-position: center; }
.home-feature-art:hover img { transform: scale(1.02); }
.home-feature-art img { transition: transform .35s ease; }
.launch-live { display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 14px; border-radius: 999px; background: rgba(27,55,25,.72); color: #fff4d4; }
.launch-live strong { color: #ffe278; }
/* Login panel uses the illustrated frame as its background. The frame keeps a
   near-square ratio, so a percentage-driven plaque covers the baked-in banner
   text and stays aligned when the panel grows on logged-in / mobile layouts. */
.launch-login {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 380px;
  padding: clamp(76px, 8vw, 88px) clamp(20px, 9%, 34px) clamp(20px, 4%, 30px);
  border: 0; border-radius: 0; color: #eaf4ff;
  background: url('/img/launch/login-frame.webp') center / 100% 100% no-repeat;
  box-shadow: none;
}
.launch-login--user { padding-top: clamp(76px, 8vw, 88px); }
.launch-login.launch-login--user { padding-bottom: clamp(40px, 9%, 60px); }
.launch-login:has(.launch-login-form)::before { display: none; }
.launch-login h2 {
  top: 2%; left: 50%; width: 60%; max-width: 320px; height: 13.5%; min-height: 48px; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px;
  border: 2px solid rgba(150,175,196,.55); border-radius: 10px;
  background: radial-gradient(120% 140% at 50% 15%, #3d6690, #24445f 65%, #1c3650);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.35), inset 0 -2px 6px rgba(0,0,0,.3);
  color: #eaf7ff; font: 900 clamp(1rem, 4.6vw, 1.42rem)/1 'Baloo 2',sans-serif;
  text-transform: uppercase; letter-spacing: .05em; text-align: center; white-space: nowrap;
  text-shadow: 0 2px 1px #0c2a44, 0 0 12px rgba(120,200,255,.5);
}
.launch-login.launch-login--user h2 { font-size: clamp(.8rem, 3.4vw, 1.02rem); letter-spacing: .03em; }
.launch-login-name { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.launch-login > a,.launch-login > form { position:relative; z-index:1; }
.launch-login-form { display: grid; gap: 10px; }
.launch-login-form label,.launch-captcha { display: grid; gap: 4px; }
.launch-login-form label > span:first-child,.launch-captcha > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.launch-login-form input,.launch-captcha input { width: 100%; min-height: 42px; padding: 8px 12px; border: 3px solid #a1b9c6; border-radius: 12px; background: #f3f5f2; color: #264459; font: 600 1rem 'Rubik',sans-serif; }
.launch-login-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panel-button.orange { background: linear-gradient(#ffd452,#f6a018 58%,#dd7912); }
.panel-button.green { background: linear-gradient(#80da66,#39a830 58%,#278222); }
.panel-button.download { background: linear-gradient(#ffcc47,#e68718 58%,#c86012); }
.launch-forgot { align-self: center; justify-self: center; color: #fff2c9; font-weight: 800; text-decoration: underline; text-shadow: 0 2px #633d18; }
.launch-logout-form { margin: 0; }
.launch-logout { display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 4px 6px; border: 2px solid #743b12; border-radius: 8px; background: linear-gradient(#ff9a74,#e64b2c 58%,#b9311a); box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 2px 0 rgba(88,44,13,.6); color: #fff3d6; cursor: pointer; transition: transform .14s, filter .14s; }
.launch-logout svg { width: 12px; height: 12px; }
.launch-logout:hover { transform: translateY(-2px); filter: brightness(1.07); }
.launch-logout:active { transform: translateY(1px); }
.launch-menu { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.launch-menu-item { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 7px 12px; border: 3px solid #2a6b96; border-radius: 13px; background: linear-gradient(180deg,rgba(18,94,138,.55),rgba(8,48,76,.85)); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 3px 0 rgba(7,34,54,.4); color: #fff3cf; font: 800 .86rem/1.1 'Baloo 2',sans-serif; text-decoration: none; transition: transform .14s, filter .14s, border-color .14s; }
.launch-menu-item svg { width: 20px; height: 20px; flex: none; color: #ffd77a; }
.launch-menu-item:hover, .launch-menu-item:focus-visible { transform: translateY(-2px); border-color: #ffcf6a; filter: brightness(1.08); color: #fff8dc; }
.launch-menu-item:focus-visible { outline: 3px solid rgba(255,215,122,.65); outline-offset: 2px; }
.launch-menu-item:active { transform: translateY(1px); }
.launch-menu-item.is-soon { grid-column: 1 / -1; border-style: dashed; border-color: rgba(255,255,255,.34); background: rgba(6,38,60,.42); color: rgba(255,243,207,.62); cursor: not-allowed; }
.launch-menu-item.is-soon svg { color: rgba(255,215,122,.55); }
.launch-menu-item.is-soon:hover { transform: none; filter: none; border-color: rgba(255,255,255,.34); }
.launch-soon { margin-left: auto; padding: 3px 7px; border-radius: 999px; background: rgba(255,206,90,.18); color: #ffe1a0; font: 800 .55rem/1 'Baloo 2',sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.launch-wallet { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; margin-top: auto; padding-top: 14px; }
.launch-wallet-chip { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 58px; padding: 8px 10px; border: 3px solid rgba(255,222,150,.5); border-radius: 14px; background: linear-gradient(180deg,rgba(12,74,112,.5),rgba(5,38,62,.82)); box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 3px 0 rgba(8,36,56,.32); color: #e7f7ff; }
.launch-wallet-chip img { width: 28px; height: 28px; flex: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.launch-wallet-chip > span { display: grid; gap: 1px; line-height: 1; }
.launch-wallet-chip small { color: #fff; font: 700 .66rem/1 'Baloo 2',sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.launch-wallet-chip strong { color: #fff; font: 900 1.2rem/1 'Baloo 2',sans-serif; font-variant-numeric: tabular-nums; text-shadow:0 1px 1px rgba(6,32,52,.5); }
.launch-captcha-row { display: flex; gap: 8px; align-items: center; }
.launch-captcha-row img { width: 115px; height: 46px; object-fit: contain; background: #fff; border-radius: 8px; }
.visually-hidden { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
body.is-home .site-foot { position: relative; z-index: 2; margin-top: 0; background: #4e2e16; }

@media (min-width: 1500px) {
  .launch-shell { min-height: min(1000px, 65vw); }
  .launch-panels { margin-top: 26px; }
}
@media (max-width: 1300px) {
  .launch-shell { min-height: auto; }
  .launch-panels { grid-template-columns: minmax(0,1fr) minmax(0,1fr); margin-top: 16px; }
  .launch-login { grid-column: 2; grid-row: 1; }
  .launch-center { grid-column: 1/-1; grid-row: 2; width: min(680px,100%); margin: 10px auto 0; }
  .launch-news { grid-column: 1; grid-row: 1; }
  .launch-actions { position: static; margin: 22px auto 18px; }
}
@media (max-width: 1150px) {
  .launch-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 0; padding: 6px 0 8px; }
  .launch-nav-link { display: none; }
  .launch-brand { order: 0; display: block; min-height: 0; margin: 0; }
  .launch-brand img { width: 118px; }
  .launch-mobile-toggle { display: flex; order: 1; margin: 0 0 0 auto; background: rgba(75,42,18,.8); }
  .launch-mobile-toggle svg { stroke: #fff0c2; }
  .launch-mobile-menu.open { position: absolute; z-index: 8; left: 15px; right: 15px; top: 104px; display: grid; grid-template-columns: 1fr 1fr; border: 3px solid #d6a246; border-radius: 15px; background: #563216; box-shadow: 0 12px 22px rgba(25,15,5,.4); }
}
@media (max-width: 900px) {
  .launch-shell { padding-bottom: 26px; }
  .launch-panels { gap: 16px; }
  .launch-news { padding: 18% 13% 12%; }
  .launch-login { padding: clamp(74px, 8vw, 84px) clamp(18px, 8%, 30px) 24px; }
  .launch-login h2 { white-space: nowrap; font-size: 1.2rem; }
  .launch-login--user { padding-top: clamp(74px, 8vw, 84px); }
  .launch-menu-item { gap: 7px; padding: 6px 9px; font-size: .8rem; }
  .launch-menu-item svg { width: 18px; height: 18px; }
  .launch-live { font-size: .82rem; }
  .hot-features-nav { width: min(560px,100%); border: 3px solid #6a3d1c; border-image: none; border-radius: 20px; padding: 20px; background: linear-gradient(145deg,#ffe7a0,#eab858 52%,#bd792e); box-shadow: inset 0 2px 0 rgba(255,255,255,.5),0 6px 0 rgba(70,38,15,.6); }
  .hot-features-nav h2 { position: static; width: auto; height: auto; margin: 0 0 10px; overflow: visible; clip: auto; white-space: normal; color: #5a3215; font: 900 1.05rem/1 'Baloo 2',sans-serif; text-align: center; text-shadow: 0 1px rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .08em; }
  .hot-features-links { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .home-feature-section { padding-right: 20px; padding-left: 20px; }
  .home-feature-inner { gap: 20px; min-height: 280px; }
}
@media (max-width: 760px) {
  .launch-panels { display: flex; flex-direction: column; gap: 22px; margin-top: 8px; }
  .launch-panels > *, .launch-center, .launch-countdown, .launch-news, .launch-login { width: 100%; min-width: 0; max-width: 100%; }
  .launch-center { order: 0; margin: 10px 0 0; gap: 12px; }
  .launch-login { order: 1; min-height: 335px; padding: clamp(72px, 9vw, 82px) clamp(20px, 8%, 32px) 24px; }
  .launch-login h2 { top: 2%; font-size: 1.28rem; }
  .launch-login--user { padding-top: clamp(72px, 9vw, 82px); }
  .launch-news { order: 2; min-height: 0; margin: 0; padding: 18% 13% 12%; }
  .launch-news h2 { top: -1%; font-size: clamp(1.38rem, 6.24vw, 1.74rem); }
  .hot-features-nav { margin: 30px auto 8px; }
  .home-feature-showcase { padding-top: 0; }
  .home-feature-section { padding: 20px 14px; }
  .home-feature-inner { grid-template-columns: 1fr; gap: 14px; min-height: 0; padding: 16px; border-width: 18px 20px; }
  .feature-odd .home-feature-inner { grid-template-columns: 1fr; gap: 12px; }
  .feature-even .home-feature-copy,.feature-even .home-feature-art { order: initial; }
  .home-feature-copy { padding: 4px 2px; }
  .home-feature-art { width: 100%; padding: 7px; border-width: 4px; border-radius: 16px; }
  .home-feature-art img { border-radius: 10px; }
  .feature-odd .home-feature-copy, .feature-odd .home-feature-art { border-width: 16px 18px; padding: 14px 16px; }
  .home-feature-copy h2 { font-size: clamp(1.45rem,6vw,1.9rem); }
  .home-feature-kicker { font-size: .68rem; letter-spacing: .04em; line-height: 1.2; }
  .home-feature-copy p { margin-bottom: 14px; }
  .home-feature-cta { min-height: 48px; }
}
@media (max-width: 620px) {
  .launch-shell { display: flex; flex-direction: column; align-items: center; }
  .launch-nav,.launch-panels,.launch-actions,.hot-features-nav { width: 100%; }
  .launch-panels > *, .launch-center, .launch-countdown, .launch-news, .launch-login { width:100%; min-width:0; max-width:100%; }
  .launch-actions .launch-start { width: min(210px,55%); }
  .hot-features-nav { width: 100%; margin: 30px auto 10px; padding: 16px; }
  .hot-features-nav h2 { margin-bottom: 12px; font-size: 1rem; }
  .hot-features-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 4px 0; }
}
@media (max-width: 620px) {
  .launch-world { min-height: 100vh; }
  .launch-world-bg img { object-position: 56% center; }
  .launch-shell { min-height: initial; padding: 10px 14px 35px; }
  .launch-brand img { width: 98px; }
  .launch-mobile-menu.open { top: 86px; }
  .launch-countdown { min-height: 215px; padding: 44px 12px 20px; border-width:5px; border-radius:38px; }
  .launch-countdown:has(.countdown-unset) { min-height: 170px; }
  .launch-countdown-title { top:-22px; margin:0; padding:4px 14px; border-width:4px; font-size:1.05rem; }
  .launch-countdown-title-unset { top:-20px; }
  .countdown-units { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; }
  .countdown-units > span { min-height: 96px; gap: 5px; padding: 10% 6%; border: 0; border-radius: 0; }
  .countdown-units strong { font-size: clamp(1.6rem,8vw,2.25rem); }
  .countdown-units small { padding: 2px 5px; font-size: .58rem; letter-spacing:.1em; }
  .launch-start { min-height:64px; }
  .launch-actions { position: static; margin: 16px auto 20px; gap: 6px; }
  .launch-actions .launch-start { width: min(210px,55%); min-height: 64px; }
  .launch-actions .launch-live { gap: 5px; padding: 5px 9px; font-size: .7rem; white-space: nowrap; }
  .launch-news-item { padding: 6px 2px; }
  .launch-menu { gap: 6px; }
  .launch-menu-item { min-height: 42px; gap: 6px; padding: 6px 8px; border-width: 2px; font-size: .78rem; }
  .launch-menu-item svg { width: 17px; height: 17px; }
  .launch-wallet { gap: 7px; padding-top: 10px; }
  .launch-wallet-chip { min-height: 50px; gap: 6px; padding: 6px 4px; border-width: 2px; }
  .launch-wallet-chip img { width: 22px; height: 22px; }
  .launch-wallet-chip small { font-size: .58rem; }
  .launch-wallet-chip strong { font-size: 1rem; }
  .launch-live { font-size: .8rem; }
}
@media (max-width: 430px) {
  .launch-shell { padding: 8px 10px 28px; }
  .launch-brand img { width: 86px; }
  .launch-mobile-menu.open { top: 80px; }
  .launch-countdown { padding: 42px 8px 16px; border-radius: 32px; }
  .launch-countdown-title { padding: 4px 11px; font-size: .95rem; }
  .countdown-units { gap: 4px; }
  .countdown-units > span { min-height: 88px; padding: 9% 5%; border-radius: 0; }
  .countdown-units strong { font-size: clamp(1.4rem,8.4vw,2rem); }
  .countdown-units small { font-size: .52rem; letter-spacing: .06em; }
  .launch-news { padding: 18% 13% 11%; }
  .launch-login { padding: clamp(70px, 9vw, 80px) clamp(18px, 7%, 28px) 20px; }
  .launch-login--user { padding-top: clamp(70px, 9vw, 80px); }
  .launch-menu-item { font-size: .74rem; }
  .launch-wallet-chip strong { font-size: .95rem; }
  .launch-actions .launch-start { width: min(196px,58%); }
  .launch-actions .launch-live { font-size: .66rem; padding: 4px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .launch-nav-link,.launch-start,.panel-button { transition: none; }
  .countdown-units strong.is-ticking { animation: none; }
  html { scroll-behavior: auto; }
  .hot-feature-link,.home-feature-cta,.home-feature-art img { transition: none; }
}

.btn {
  background: linear-gradient(180deg, #FFEFA6 0%, var(--gold) 52%, var(--gold-2) 100%);
  box-shadow: 0 8px 18px rgba(240,168,30,.45), inset 0 1px 0 rgba(255,255,255,.7);
}
.btn:hover { box-shadow: 0 12px 26px rgba(240,168,30,.55), inset 0 1px 0 rgba(255,255,255,.8); }
.btn.dark { background: linear-gradient(180deg, var(--plum-2), var(--plum)); }

/* Small multi-colour tick before section headings. */
.section-title h2 { position: relative; padding-left: .75rem; }
.section-title h2::before {
  content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: .32rem;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--leaf), var(--cyan) 60%, var(--gold));
}

/* Sky-tinted data tables, brighter gold badges. */
table.data th {
  background: linear-gradient(180deg, #EAF8FF, #DFF3FF);
  color: var(--plum-2);
  border-bottom: 2px solid rgba(56, 190, 230, .45);
}
table.data tbody tr:hover { background: rgba(255, 201, 60, .12); }
.badge.gold { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #6a4300; }

/* Admin sidebar: deep-ocean panel (light link text stays readable) + gold active. */
.admin-nav {
  background: linear-gradient(180deg, var(--plum-2), var(--plum-deep));
  border: 2px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius);
  padding: .8rem;
}
.admin-nav a.active, .admin-nav summary.active {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: var(--plum);
}

/* Footer background matches the homepage footer. */
.site-foot { background: #4e2e16; }
.foot-col h4 { color: var(--gold); }

/* Login / register artwork panel. */
.auth-art {
  background:
    radial-gradient(420px 220px at 82% 0%, rgba(255,201,60,.45), transparent 60%),
    radial-gradient(360px 220px at 10% 100%, rgba(87,190,74,.35), transparent 60%),
    linear-gradient(160deg, #14507A, #082A44);
}

/* Home power ranking: two lines per row — #rank + name (aligned), then meta. */
.power-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  column-gap: .55rem; row-gap: .05rem; align-items: baseline;
  padding: .5rem .7rem; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; transition: .16s;
}
.power-row:hover { border-color: var(--gold); box-shadow: 0 8px 18px rgba(11,58,92,.10); transform: translateY(-1px); }
.power-row .power-rank {
  grid-row: 1; grid-column: 1;
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: .95rem;
  color: var(--gold-2); min-width: 1.7rem;
}
.power-row .power-name {
  grid-row: 1; grid-column: 2;
  font-family: 'Baloo 2', sans-serif; font-weight: 800; color: var(--plum);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.power-row .power-meta {
  grid-row: 2; grid-column: 2;
  font-size: .78rem; color: var(--ink-soft);
}

/* --------------------------------------------------------------- battle pass */
/* A "season" panel: deep plum, one gold progress rail, then reward cards. */
.bp-season {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 2.1rem;
  color: var(--cream);
  background:
    radial-gradient(620px 260px at 88% -40%, rgba(255, 201, 60, .30), transparent 62%),
    radial-gradient(460px 260px at -10% 120%, rgba(56, 190, 230, .20), transparent 60%),
    linear-gradient(158deg, var(--plum-deep) 0%, var(--plum) 62%, var(--plum-2) 100%);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: var(--shadow-lg);
}
.bp-season-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.bp-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-soft);
}
.bp-progress-figure { display: flex; align-items: baseline; gap: .5rem; margin-top: .3rem; font-family: 'Baloo 2', sans-serif; }
.bp-progress-rp { font-size: clamp(1.9rem, 4.2vw, 2.7rem); font-weight: 800; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.bp-progress-goal { font-size: .95rem; font-weight: 600; color: rgba(255, 248, 236, .68); }
.bp-progress-sub { margin: .4rem 0 0; font-size: .84rem; color: rgba(255, 248, 236, .72); }
.bp-wallet {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .8rem; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  color: #fff; font-weight: 800; font-size: .86rem; font-variant-numeric: tabular-nums;
}

.bp-rail { position: relative; height: 14px; margin: 2.8rem .4rem 1.4rem; }
.bp-rail-track { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.bp-rail-fill {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width .9s cubic-bezier(.2, .7, .2, 1);
}
.bp-node { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.bp-node-dot {
  display: block; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255, 255, 255, .25); border: 2px solid rgba(255, 255, 255, .55);
}
.bp-node.is-claimable .bp-node-dot { background: var(--gold); border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 201, 60, .22); }
.bp-node.is-claimed .bp-node-dot { background: var(--mint); border-color: #fff; }
.bp-node-flag {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: .68rem; font-weight: 700;
  color: rgba(255, 248, 236, .68); font-variant-numeric: tabular-nums;
}
.bp-node.is-claimable .bp-node-flag { color: var(--gold-soft); }
.bp-rail-scale {
  display: flex; justify-content: space-between; margin: 0 .4rem;
  font-size: .68rem; color: rgba(255, 248, 236, .5); font-variant-numeric: tabular-nums;
}

.bp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; margin-top: 1.3rem; }
.bp-card {
  display: flex; flex-direction: column; gap: .7rem;
  padding: 1.1rem 1.15rem; border-radius: var(--radius);
  border: 2px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.bp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.bp-card-claimable { border-color: rgba(217, 154, 34, .6); box-shadow: 0 0 0 3px rgba(246, 196, 69, .16), var(--shadow); }
.bp-card-claimed { opacity: .85; }
.bp-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.bp-threshold { font-family: 'Baloo 2', sans-serif; font-size: 1.35rem; font-weight: 800; line-height: 1.05; color: var(--plum); }
.bp-reach { margin-top: .15rem; font-size: .8rem; color: var(--ink-soft); }
.bp-card-claimable .bp-reach { color: #8A5A00; font-weight: 700; }
.bp-rewards { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.bp-reward {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .55rem; border-radius: 999px;
  background: var(--gold-soft); border: 1px solid rgba(217, 154, 34, .35);
  color: #7a5000; font-size: .78rem; font-weight: 700;
}
.bp-reward img { border-radius: 4px; flex: none; }
.bp-reward-cegel { background: #FDEBD3; border-color: rgba(218, 138, 52, .4); color: #8a5a13; }
.bp-cegel-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFE6A8, var(--terracotta));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5);
}
.bp-reward-note { font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #8a5a13; opacity: .8; }
.bp-card-foot { margin-top: auto; padding-top: .2rem; }
.bp-claimed { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; font-size: .86rem; color: #14734A; }
.bp-claim { display: flex; flex-direction: column; gap: .5rem; }
.bp-claim .field { margin: 0; }
.bp-claim .field > span { font-size: .78rem; }
.bp-hint { font-size: .72rem; line-height: 1.35; color: var(--ink-soft); }

@media (max-width: 560px) {
  .bp-season { padding: 1.2rem 1.1rem 1.7rem; }
  .bp-node-flag { font-size: .6rem; }
  .bp-rail { margin: 2.4rem .2rem 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-rail-fill, .bp-card { transition: none; }
}

/* ============================================================ shop catalog
   Item Mall + Marketplace share a dense, scannable catalog layout built for
   long lists: a sticky search bar, uniform product cards and progressive
   loading. Scoped to #shopRoot / #marketRoot so inventory keeps its layout. */

/* Type sidebar, visually matching the Codex stat nav. */
.catalog-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 1rem; align-items: start; }
.catalog-main { min-width: 0; }
.catalog-filter-nav {
  position: sticky; top: 84px;
  display: flex; flex-direction: column; gap: .35rem;
  padding: .55rem; border: 3px solid #b98a54; border-radius: 16px;
  background: linear-gradient(180deg, #3a2414, #241407);
  box-shadow: inset 0 0 0 2px rgba(255, 220, 170, .16), 0 10px 24px rgba(50, 25, 8, .22);
  max-height: calc(100vh - 104px); overflow-y: auto; scrollbar-width: thin;
}
.catalog-filter-nav button {
  display: flex; align-items: center; justify-content: space-between; gap: .4rem;
  width: 100%; padding: .5rem .6rem; border-radius: 8px; cursor: pointer;
  border: 2px solid rgba(200, 160, 106, .55); color: #f3dfc4;
  background: linear-gradient(180deg, #52321c, #2e1a0e);
  box-shadow: inset 0 1px 0 rgba(255, 224, 178, .18);
  font: inherit; font-weight: 700; font-size: .84rem; text-align: left;
  transition: border-color .12s ease, box-shadow .12s ease, color .12s ease;
}
.catalog-filter-nav button:hover,
.catalog-filter-nav button:focus-visible {
  border-color: #ffe0a6; color: #fff; outline: none;
  box-shadow: 0 0 0 2px rgba(255, 201, 60, .35);
}
.catalog-filter-nav button.active {
  border-color: #ffe0a6; color: #2a1200;
  background: linear-gradient(180deg, #ffe0a6, #e8b96b);
  box-shadow: inset 0 1px 0 #fff6e2, 0 0 0 2px rgba(255, 201, 60, .45);
}
.catalog-filter-nav .catalog-filter-count {
  min-width: 1.35rem; padding: 0 .3rem; border-radius: 999px;
  background: rgba(0, 0, 0, .28); color: inherit;
  font-size: .7rem; line-height: 1.35rem; text-align: center;
}
.catalog-filter-nav button.active .catalog-filter-count { background: rgba(80, 50, 20, .18); }

.shop-hero-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 1.4rem; flex-wrap: wrap; }
.shop-hero-copy { min-width: 0; }
.shop-hero-side { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

.shop-balance--lg {
  gap: .6rem; padding: .5rem .9rem .5rem .65rem;
  border: 2px solid rgba(217, 154, 34, .55); border-radius: 16px;
  background: linear-gradient(180deg, #fff, #FFF3D2);
  box-shadow: inset 0 2px 0 #fff, 0 8px 18px rgba(11, 58, 92, .12);
  font-size: .72rem;
}
.shop-balance--lg img { width: 26px; height: 26px; }
.shop-balance--lg > span { display: grid; line-height: 1.05; }
.shop-balance--lg strong { font-family: 'Baloo 2', sans-serif; font-size: 1.15rem; color: var(--plum-deep); }
.shop-balance--lg small { color: var(--ink-soft); font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

/* Sticky search + filter bar keeps controls reachable in long catalogs. */
.shop-page { padding-top: 0; }
.shop-bar {
  position: sticky; top: 78px; z-index: 30;
  margin: 0 -8px .9rem; padding: .55rem 8px .7rem;
  background: rgba(255, 248, 236, .93);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(13, 42, 60, .1);
}
.shop-bar .shop-filters { margin-bottom: .4rem; }
.shop-resultline { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.shop-count { font-size: .82rem; font-weight: 700; color: var(--ink-soft); }

.shop-filters input[type="search"],
.shop-filters select {
  min-height: 44px; border: 2px solid var(--line-strong); border-radius: 12px;
  background: #fff; box-shadow: inset 0 1px 0 #fff;
}
.shop-filters input[type="search"] {
  padding-left: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E6475' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: .85rem center; background-size: 17px;
}
.shop-filters .btn { min-height: 44px; }

/* Uniform product cards: artwork stage, price tag, clamped name, aligned buy row. */
#shopRoot .item-grid,
#marketRoot .item-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: .9rem; }

#shopRoot .shop-card,
#marketRoot .shop-card {
  gap: .4rem; padding: .7rem;
  border: 2px solid rgba(121, 82, 38, .26); border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #FFF9EF 100%);
  box-shadow: 0 5px 14px rgba(11, 58, 92, .07), inset 0 1px 0 #fff;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
#shopRoot .shop-card:hover,
#marketRoot .shop-card:hover {
  transform: translateY(-3px);
  border-color: rgba(217, 154, 34, .8);
  box-shadow: 0 16px 30px rgba(11, 58, 92, .15);
}

#shopRoot .shop-icon,
#marketRoot .shop-icon {
  display: grid; place-items: center; height: 118px; margin: 0 0 .15rem;
  border: 1px solid rgba(30, 110, 150, .2); border-radius: 12px;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,.95), rgba(255,255,255,0) 60%),
    linear-gradient(160deg, #DDF2FF, #C3E5F8 58%, #A6D2EA);
  box-shadow: inset 0 2px 6px rgba(255,255,255,.8), inset 0 -8px 16px rgba(16, 80, 110, .12);
}
#shopRoot .shop-icon img,
#marketRoot .shop-icon img { width: 84px; height: 84px; filter: drop-shadow(0 6px 5px rgba(16, 60, 90, .2)); }
#shopRoot .shop-icon img[src$=".svg"],
#marketRoot .shop-icon img[src$=".svg"] { width: 70px; height: 70px; }

#shopRoot .shop-price-tag,
#marketRoot .shop-price-tag {
  top: .5rem; left: .5rem;
  padding: .24rem .55rem .24rem .42rem; border-radius: 10px;
  border: 1.5px solid rgba(160, 106, 10, .4);
  background: linear-gradient(180deg, #FFF3BF, #FFD25B 70%, #F3B12C);
  color: #5A3600; font: 800 .86rem/1 'Baloo 2', sans-serif;
  box-shadow: 0 4px 10px rgba(80, 50, 0, .2);
}
#shopRoot .shop-price-tag img,
#marketRoot .shop-price-tag img { width: 12px; height: 12px; }

#shopRoot .shop-card h3,
#marketRoot .shop-card h3 {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  min-height: 2.5em; margin: 0; font-size: .93rem; line-height: 1.25;
}
#shopRoot .shop-meta,
#marketRoot .shop-meta { justify-content: space-between; gap: .3rem; row-gap: .2rem; margin: 0; flex-wrap: wrap; }
#shopRoot .shop-meta-left,
#marketRoot .shop-meta-left { flex-wrap: wrap; }
#shopRoot .shop-meta .badge,
#marketRoot .shop-meta .badge { padding: .1rem .45rem; font-size: .64rem; border-width: 1px; }
#shopRoot .shop-stock,
#shopRoot .shop-limit,
#shopRoot .shop-range { margin: 0; font-size: .71rem; line-height: 1.35; }
/* Sold-out is already stated at the bottom of the card; skip the duplicate chip. */
#shopRoot .shop-stock .badge.red { display: none; }
#shopRoot .shop-buy,
#marketRoot .shop-buy { gap: .35rem; margin-top: auto; padding-top: .4rem; }
#shopRoot .shop-buy .btn,
#marketRoot .shop-buy .btn { flex: 1; min-height: 36px; padding: .35rem .7rem; }
#shopRoot .shop-qty { width: 58px; min-height: 36px; padding: .3rem .35rem; text-align: center; border-radius: 10px; }
#shopRoot .shop-buy-disabled { margin-top: auto; padding-top: .6rem; font-size: .76rem; font-weight: 700; color: #9a3b3b; }

.market-seller { margin: 0; font-size: .74rem; }
.market-card .js-market-buy { width: 100%; }
.market-delivery-note { max-width: 78ch; }
.shop-delivery-note { margin-top: .9rem; }

.shop-sentinel { height: 1px; width: 100%; }
.shop-empty { padding: 1.4rem; }

@media (max-width: 900px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-filter-nav {
    position: static; flex-direction: row; align-items: center;
    overflow-x: auto; overflow-y: hidden; max-height: none;
    -webkit-overflow-scrolling: touch; padding: .45rem;
  }
  .catalog-filter-nav button { width: auto; white-space: nowrap; }
}

@media (max-width: 720px) {
  .shop-hero { padding: 1.5rem 0 1.8rem; }
  .shop-hero-inner { align-items: flex-start; gap: .8rem; }
  .shop-hero-side { width: 100%; }
  .shop-balance--lg { flex: 1 1 150px; }
  .shop-bar { top: 72px; }
  #shopRoot .item-grid,
  #marketRoot .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  #shopRoot .shop-card,
  #marketRoot .shop-card { padding: .55rem; border-radius: 13px; }
  #shopRoot .shop-icon,
  #marketRoot .shop-icon { height: 96px; }
  #shopRoot .shop-icon img,
  #marketRoot .shop-icon img { width: 64px; height: 64px; }
  #shopRoot .shop-icon img[src$=".svg"],
  #marketRoot .shop-icon img[src$=".svg"] { width: 54px; height: 54px; }
  #shopRoot .shop-card h3,
  #marketRoot .shop-card h3 { font-size: .84rem; min-height: 2.5em; }
  #shopRoot .shop-price-tag,
  #marketRoot .shop-price-tag { top: .38rem; left: .38rem; padding: .2rem .45rem; font-size: .76rem; }
  #shopRoot .shop-meta .badge,
  #marketRoot .shop-meta .badge { font-size: .58rem; padding: .08rem .35rem; }
  #shopRoot .shop-qty { width: 46px; min-height: 34px; padding: .25rem .25rem; }
  #shopRoot .shop-buy .btn,
  #marketRoot .shop-buy .btn { min-height: 34px; padding: .3rem .5rem; font-size: .8rem; }
  .shop-filters input[type="search"],
  .shop-filters select,
  .shop-filters .btn { min-height: 42px; }
}
@media (max-width: 380px) {
  #shopRoot .shop-icon, #marketRoot .shop-icon { height: 84px; }
  #shopRoot .shop-icon img, #marketRoot .shop-icon img { width: 56px; height: 56px; }
}

.shop-delivery-note {
  align-items: flex-start; padding: .8rem .9rem; font-size: .85rem; line-height: 1.5;
  color: #6B470F;
  background: linear-gradient(180deg, #FFF7DE, #FFEDB9);
  border: 2px solid rgba(217, 154, 34, .55);
  box-shadow: 0 6px 16px rgba(217, 154, 34, .16);
}
.shop-delivery-note > span { min-width: 0; }
.shop-delivery-note strong { color: #8A4B00; }
.shop-delivery-note::before {
  content: "i"; align-self: flex-start; margin-top: .05rem;
  background: #E9AF3C; color: #5B3A10;
}
.market-delivery-note {
  border-left: 4px solid #e9af3c;
  background: rgba(255, 233, 168, .5);
  border-radius: 0 12px 12px 0;
  padding: .7rem .95rem;
  font-size: .86rem;
  color: #6b4a15;
}
.market-delivery-note .market-red { color: #B4521E; }
@media (min-width: 1000px) { .shop-delivery-note { white-space: normal; } }

/* Perf: skip layout/paint for off-screen homepage sections (images are lazy).
   `auto <length>` lets the browser remember the real size after the first
   render, so there is no scrollbar jump. */
.home-feature-section { content-visibility: auto; contain-intrinsic-size: auto 640px; }
.hot-features-nav { content-visibility: auto; contain-intrinsic-size: auto 260px; }
.home-feature-art picture,
.hot-feature-link picture { display: contents; }

/* ---------------------------------------------- registration milestone bar */
.regm-strip {
  position: relative;
  z-index: 4;
  width: 100%;
  margin: 0 0 15px;
  padding: 12px 18px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(30, 18, 6, .62), rgba(16, 9, 3, .6));
  border: 1px solid rgba(255, 200, 120, .28);
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, .12), 0 10px 24px rgba(0, 0, 0, .28);
  backdrop-filter: blur(3px);
}
.regm-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  color: #ffe0a8;
  font-size: .9rem;
  margin-bottom: 26px;
}
.regm-title { font-weight: 700; letter-spacing: .02em; color: #ffd270; }
.regm-count { color: #ffe7c2; }
.regm-count strong { color: #fff; }
.regm-ended { color: #ffb38a; font-weight: 700; }
.regm-track {
  position: relative;
  height: 12px;
  margin: 0 6px 30px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .48);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6);
}
.regm-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--regm-fill, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb347, #ffd270);
  box-shadow: 0 0 12px rgba(255, 200, 90, .5);
  transition: width .6s ease;
}
.regm-mark {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
}
.regm-chest { position: relative; display: inline-block; cursor: pointer; line-height: 1; outline: none; }
.regm-chest-icon {
  display: block;
  font-size: 1.7rem;
  filter: grayscale(1) brightness(.72);
  transition: filter .2s ease, transform .2s ease;
}
.regm-mark.is-reached .regm-chest-icon {
  filter: none;
  transform: translateY(-3px) scale(1.12);
}
.regm-chest:focus-visible .regm-chest-icon { filter: none; }
.regm-target {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  font-size: .72rem;
  color: #ffd9a0;
  white-space: nowrap;
}
.regm-pop {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 168px;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(24, 14, 6, .97);
  border: 1px solid rgba(255, 200, 120, .42);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .5);
  z-index: 30;
}
.regm-chest:hover .regm-pop,
.regm-chest:focus .regm-pop,
.regm-chest:focus-visible .regm-pop { display: block; }
.regm-pop-title {
  display: block;
  font-size: .72rem;
  color: #ffd9a0;
  margin-bottom: 5px;
}
.regm-pop-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: #fff;
  white-space: nowrap;
  padding: 1px 0;
}
.regm-pop-item img { border-radius: 4px; flex: none; }

@media (max-width: 720px) {
  .regm-head { margin-bottom: 22px; font-size: .82rem; }
  .regm-chest-icon { font-size: 1.45rem; }
  .regm-target { font-size: .66rem; }
}
@media (prefers-reduced-motion: reduce) {
  .regm-fill, .regm-chest-icon { transition: none; }
}
