/* Minestones web — design tokens from docs/web/02 §3 (approximated from the mock-up). No framework. */
:root {
  --bg: #0a1120;
  --bg-2: #0d1628;
  --panel: #101a2d;
  --panel-2: #15223a;
  --panel-3: #1b2b48;
  --line: #243554;
  --line-2: #2f4468;
  --text: #e7ecf4;
  --muted: #8c9bb3;
  --dim: #5f6f8a;
  --gold: #e9b54a;
  --gold-2: #c8861e;
  --gold-3: #f5c865;
  --seal: #b25cff;
  --money: #46c96b;
  --gem: #3da5ff;
  --win: #3fcb6b;
  --loss: #e5484d;
  --warn: #f0a93b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --serif: "Cinzel", "Trajan Pro", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans);
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(61, 165, 255, .08), transparent 60%),
                    radial-gradient(900px 500px at 0% 0%, rgba(233, 181, 74, .06), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--gold-3); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: .02em; margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: clamp(26px, 4vw, 38px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }
code { background: var(--panel-3); padding: 1px 6px; border-radius: 5px; font-size: .92em; }
:focus-visible { outline: 2px solid var(--gold-3); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ banner (scrolls away; site.js sets --s 0..1 while it leaves) */
.banner {
  --s: 0; --logo-h: 230px; --pad-top: 26px;
  position: relative; overflow: hidden; isolation: isolate; background: #060b17;
}
.b-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.b-sky {
  background:
    radial-gradient(55% 95% at 0% 80%, rgba(196, 72, 36, .55), transparent 70%),
    radial-gradient(55% 95% at 100% 80%, rgba(47, 111, 219, .55), transparent 70%),
    radial-gradient(34% 60% at 50% 42%, rgba(233, 181, 74, .16), transparent 70%),
    linear-gradient(180deg, #040814 0%, #0c1730 58%, #1a2240 100%);
  transform: translate3d(0, calc(var(--s) * 140px), 0);
}
.b-stars { fill: #dfe8ff; opacity: .7; transform: translate3d(0, calc(var(--s) * 180px), 0); }
.b-stars .tw { animation: b-twinkle var(--tw) ease-in-out var(--twd) infinite; }
.b-rays {
  inset: auto; left: 50%; top: calc(var(--pad-top) + var(--logo-h) * .45 - 600px); width: 1200px; height: 1200px; margin-left: -600px;
  background: repeating-conic-gradient(from 0deg, rgba(245, 200, 101, .09) 0deg 5deg, transparent 5deg 15deg);
  -webkit-mask: radial-gradient(closest-side, #000 12%, transparent 62%); mask: radial-gradient(closest-side, #000 12%, transparent 62%);
  animation: b-spin 120s linear infinite;
}
.b-hills { transform: translate3d(0, calc(var(--s) * 90px), 0); }
.b-hills .far { fill: #111d3a; }
.b-hills .near { fill: #0b1429; }
.b-castle { inset: auto; bottom: 12px; height: 74%; width: auto; aspect-ratio: 500 / 300; --win: #ffb45c; --flag: #c4362a; }
.b-castle.l { left: -10px; transform: translate3d(0, calc(var(--s) * 60px), 0); }
.b-castle.r { right: -10px; transform: translate3d(0, calc(var(--s) * 60px), 0) scaleX(-1); --win: #7fd3ff; --flag: #2f6fdb; }
#b-castle .stone { fill: #080f20; }
#b-castle .roof { fill: #0c1630; }
#b-castle .pole { fill: #3a4762; }
#b-castle .flag { fill: var(--flag); }
#b-castle .win { fill: var(--win); animation: b-flicker 4s ease-in-out infinite; }
#b-castle .gate { fill: #04070f; }
#b-castle .torch { fill: var(--win); opacity: .55; filter: blur(4px); animation: b-flicker 1.6s ease-in-out infinite; }
.b-sparks i {
  position: absolute; bottom: 26px; left: var(--x); width: var(--sz); height: var(--sz); opacity: 0;
  animation: b-rise var(--d) linear var(--delay) infinite;
}
.b-sparks .ember { background: #ffb347; box-shadow: 0 0 6px 1px rgba(255, 110, 30, .85); }
.b-sparks .frost { background: #b6e8ff; box-shadow: 0 0 6px 1px rgba(70, 160, 255, .85); }
.b-wall {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 15px; z-index: 2; background: #0a1120;
  -webkit-mask: linear-gradient(#000 0 0) bottom / 100% 6px no-repeat, repeating-linear-gradient(90deg, #000 0 30px, transparent 30px 46px) top / 100% 10px no-repeat;
          mask: linear-gradient(#000 0 0) bottom / 100% 6px no-repeat, repeating-linear-gradient(90deg, #000 0 30px, transparent 30px 46px) top / 100% 10px no-repeat;
}
.b-inner {
  position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; padding-top: var(--pad-top); padding-bottom: 24px;
  transform: translate3d(0, calc(var(--s) * 110px), 0); opacity: calc(1 - var(--s) * 1.3);
}
.crest { position: relative; isolation: isolate; display: flex; justify-content: center; max-width: 100%; }
.crest::after {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 78%; width: 34%; height: 40%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(90, 200, 255, .45), transparent); animation: b-pulse 3.5s ease-in-out infinite;
}
.crest .brand { justify-content: center; }
.crest .logo {
  display: block; height: var(--logo-h); width: auto; max-width: 100%; object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .75)) drop-shadow(0 0 36px rgba(233, 181, 74, .16));
  animation: b-bob 7s ease-in-out infinite;
}
.pennant {
  position: absolute; top: calc(var(--pad-top) * -1); width: calc(var(--logo-h) * .32); height: auto; aspect-ratio: 80 / 230;
  transform-origin: 50% 0; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .55)); animation: b-sway 6s ease-in-out infinite;
}
.pennant.l { right: calc(100% + 22px); }
.pennant.r { left: calc(100% + 22px); animation-delay: -3s; }
.pennant .trim { fill: none; stroke: #e9b54a; stroke-width: 2; opacity: .85; }
.pennant.l .trim { stroke: #d5dbe6; opacity: .75; }
.pennant .band { fill: rgba(0, 0, 0, .28); }
.pennant .emblem { fill: #f5c865; }
.pennant.l .emblem { fill: #e4e9f2; }
.pennant .emblem .inset { fill: none; stroke: #b07818; stroke-width: 1.5; }
.pennant .emblem .gem { fill: #0b1a45; stroke: #8a5c12; stroke-width: 1; }
.pennant .emblem .facet { fill: none; stroke: #f5c865; stroke-width: 1; opacity: .55; }
.pennant .rod { fill: #c8861e; stroke: #f5c865; stroke-width: 1; }
.pennant.l .rod { fill: #6b7487; stroke: #b9c1d0; }
.banner.intro .crest .logo { animation: b-drop .9s cubic-bezier(.2, .8, .2, 1) both, b-bob 7s ease-in-out .9s infinite; }
.banner.intro .pennant { animation: b-unfurl 1.1s cubic-bezier(.2, .8, .2, 1) both, b-sway 6s ease-in-out 1.1s infinite; }
.banner.intro .pennant.r { animation-delay: .12s, -1.9s; }
.banner-play {
  margin-top: 14px; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(22, 33, 58, .85), rgba(8, 13, 26, .88));
  border: 1px solid rgba(233, 181, 74, .38);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.banner-play .online { margin: 0 4px 0 8px; font-size: 13px; white-space: nowrap; }
.banner-play .ipbox { margin: 0; }
.banner-play .ipbox code { padding: 8px 12px; font-size: 14px; }
.banner-play .ipbox button { padding: 0 12px; font-size: 13px; }
.banner-play .btn { padding: 9px 16px; }
.banner-note { margin: 6px 0 0; color: rgba(200, 212, 232, .62); font-size: 12px; line-height: 1.3; text-align: center; text-shadow: 0 1px 2px #000; }
@keyframes b-twinkle { 50% { opacity: .15; } }
@keyframes b-spin { to { transform: rotate(360deg); } }
@keyframes b-flicker { 0%, 100% { opacity: 1; } 40% { opacity: .7; } 60% { opacity: .9; } }
@keyframes b-rise { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--drift), -240px); opacity: 0; } }
@keyframes b-pulse { 50% { opacity: .45; transform: translate(-50%, -50%) scale(1.15); } }
@keyframes b-bob { 50% { transform: translateY(-5px); } }
@keyframes b-sway { 0%, 100% { transform: rotate(1.6deg); } 50% { transform: rotate(-1.6deg); } }
@keyframes b-drop { from { opacity: 0; transform: translateY(-18px) scale(.96); } }
@keyframes b-unfurl { from { opacity: 0; transform: scaleY(.15); } }
@media (prefers-reduced-motion: reduce) {
  .banner *, .banner *::after { animation: none !important; }
  .banner .b-layer, .banner .b-inner { transform: none !important; }
  .banner .b-castle.r { transform: scaleX(-1) !important; }
  .banner .b-sparks { display: none; }
}

/* ------------------------------------------------------------------ banner v2: shorter, the scene fades into the page and the nav floats on it.
   Everything is scoped to body.bv-v2; base.html banner_style = "classic" (or ?banner=classic) turns it off. */
.bv-v2 .banner { --nav-h: 50px; background: var(--bg); }
.bv-v2 .banner::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48%; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 17, 32, 0), rgba(10, 17, 32, .55) 45%, var(--bg) 92%);
}
.bv-v2 .b-wall { display: none; }
.bv-v2 .b-castle { bottom: calc(var(--nav-h) - 6px); height: 70%; }
.bv-v2 .b-sparks i { bottom: calc(var(--nav-h) + 10px); }
.bv-v2 .b-inner { padding-bottom: calc(var(--nav-h) + 16px); }
/* join box split around the logo: IP + online count on the left, join button + version note on the right, on the logo's bottom line */
@media (min-width: 1101px) {
  .bv-v2 .b-inner {
    max-width: 1440px; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: 1fr auto auto;
    column-gap: calc(var(--logo-h) * .32 + 48px); row-gap: 8px; align-items: center;
  }
  .bv-v2 .crest { grid-column: 2; grid-row: 1 / 4; }
  .bv-v2 .banner-play { display: contents; }
  .bv-v2 .banner-play .ipbox { grid-column: 1; grid-row: 2; justify-self: end; }
  .bv-v2 .banner-play .online { grid-column: 1; grid-row: 3; justify-self: end; margin: 0 4px 0 0; }
  .bv-v2 .banner-play .btn { grid-column: 3; grid-row: 2; justify-self: start; padding: 10px 20px; }
  .bv-v2 .banner-note { grid-column: 3; grid-row: 3; justify-self: start; margin: 0 0 0 4px; font-size: 13px; text-align: left; }
  .bv-v2 .banner-play .ipbox, .bv-v2 .banner-play .btn { box-shadow: 0 14px 30px rgba(0, 0, 0, .5); }
  .bv-v2 .banner-play .ipbox {
    border-color: rgba(233, 181, 74, .38); background: rgba(10, 17, 32, .7);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .bv-v2 .banner-play .online { text-shadow: 0 1px 2px #000; color: rgba(200, 212, 232, .8); }
}
@media (max-width: 1100px) { .bv-v2 .banner-play { margin-top: 10px; } }
.bv-v2 .mast { margin-top: -50px; }
.bv-v2 .top {
  background: rgba(10, 17, 32, .55); box-shadow: none; transition: background .25s, box-shadow .25s;
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
}
.bv-v2 .mast.stuck .top { background: rgba(10, 17, 32, .92); box-shadow: 0 12px 28px rgba(0, 0, 0, .4); }
.bv-v2 .mast::after { opacity: .85; -webkit-mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.bv-v2 .mast.stuck::after { opacity: 1; -webkit-mask: none; mask: none; }
/* the two castle lights keep glowing a little way down the page, so the scene and the content share one sky */
.bv-v2 main { position: relative; isolation: isolate; }
.bv-v2 main::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 520px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 70% at 0% 0%, rgba(196, 72, 36, .13), transparent 70%),
    radial-gradient(40% 70% at 100% 0%, rgba(47, 111, 219, .14), transparent 70%),
    radial-gradient(30% 45% at 50% 0%, rgba(233, 181, 74, .05), transparent 70%);
}

/* ------------------------------------------------------------------ header (sticky nav) */
.mast { position: sticky; top: 0; z-index: 30; }
.mast::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, #c4512a 0%, #e9b54a 46%, #7ec8ff 54%, #2f6fdb 100%);
}
.top { position: relative; background: #0a1120; box-shadow: 0 12px 28px rgba(0, 0, 0, .4); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 50px; }
.mini-brand { display: flex; align-items: center; flex: none; width: 0; margin-right: -18px; opacity: 0; overflow: hidden; transition: width .3s, margin .3s, opacity .3s; }
.mini-brand img { height: 32px; width: auto; max-width: none; }
.mast.stuck .mini-brand { width: 63px; margin-right: 0; opacity: 1; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; flex: none; }
footer .brand img.logo { width: auto; height: 52px; max-width: 220px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); }
.brand b {
  font-family: var(--serif); font-size: 18px; line-height: 1; letter-spacing: .06em;
  background: linear-gradient(180deg, var(--gold-3), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
.nav a { color: var(--muted); padding: 8px 10px; border-radius: 8px; white-space: nowrap; font-size: 14px; }
.nav a:hover, .nav a.on { color: var(--text); background: var(--panel-2); text-decoration: none; }
.top-right { display: flex; align-items: center; gap: 10px; flex: none; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang a { padding: 4px 8px; font-size: 12px; color: var(--muted); }
.lang a.on { background: var(--panel-3); color: var(--text); }
.pills { display: flex; gap: 6px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 10px; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu .face { width: 26px; height: 26px; }
.usermenu .drop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 6px; }
.usermenu .drop a, .usermenu .drop button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--text);
  background: none; border: 0; font: inherit; cursor: pointer; }
.usermenu .drop a:hover, .usermenu .drop button:hover { background: var(--panel-2); text-decoration: none; }

/* ------------------------------------------------------------------ currency */
.cur { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 999px; background: var(--panel);
  border: 1px solid var(--line); font-weight: 600; font-size: 13px; white-space: nowrap; }
.cur svg { width: 18px; height: 18px; flex: none; }
.cur.gold { color: var(--gold-3); } .cur.seal { color: #d4a4ff; } .cur.money { color: #7ee39a; } .cur.gem { color: #8cc9ff; }
.icon { width: 1em; height: 1em; vertical-align: -.15em; }
.art svg { width: 44px; height: 44px; }
.btn svg { width: 1.2em; height: 1.2em; }

/* ------------------------------------------------------------------ layout */
main { flex: 1; padding: 28px 0 60px; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel h2, .panel h3 { display: flex; align-items: center; gap: 8px; }
.panel-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.panel-title h2, .panel-title h3 { margin: 0; }
.section { margin-top: 34px; }
.page-head { margin-bottom: 20px; }
.page-head p { color: var(--muted); max-width: 70ch; }
.crumbs { font-size: 13px; color: var(--dim); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }

/* ------------------------------------------------------------------ buttons, forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font: 600 14px var(--sans); cursor: pointer; text-decoration: none !important; }
.btn:hover { border-color: var(--gold-2); }
.btn.primary { background: linear-gradient(180deg, var(--gold-3), var(--gold-2)); border-color: #b87a18; color: #1a1204; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.discord { background: #3b46b8; border-color: #5865f2; }
.btn.danger { background: #3a1518; border-color: #6d2327; color: #ffb3b5; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.big { padding: 14px 26px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; filter: none; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input, select, textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; font: inherit; }
textarea { min-height: 140px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
input:focus, select:focus, textarea:focus { border-color: var(--gold-2); outline: none; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; }
.check input { width: auto; margin-top: 3px; }
.form-narrow { max-width: 440px; margin: 0 auto; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { flex: none; }
.spacer { flex: 1; }
.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid; }
.alert.ok { background: rgba(63, 203, 107, .08); border-color: rgba(63, 203, 107, .35); color: #b9f0c9; }
.alert.err { background: rgba(229, 72, 77, .08); border-color: rgba(229, 72, 77, .4); color: #ffc2c4; }
.alert.info { background: rgba(61, 165, 255, .07); border-color: rgba(61, 165, 255, .3); color: #cfe7ff; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
  background: var(--panel-3); color: var(--muted); }
.tag.duyuru { background: #1d3150; color: #8cc9ff; } .tag.guncelleme { background: #1f3a28; color: #8ce3a9; }
.tag.dengeleme { background: #3a2f16; color: #f5c865; } .tag.etkinlik { background: #3b1f3f; color: #e2a4ff; }
.tag.done { background: #1f3a28; color: #8ce3a9; } .tag.active { background: #3a2f16; color: #f5c865; } .tag.planned { background: #1d3150; color: #8cc9ff; }
.tag.admin { background: #4a1f22; color: #ffb3b5; } .tag.moderator { background: #1d3150; color: #8cc9ff; }

/* ------------------------------------------------------------------ tabs, tables */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.tabs a.on { background: linear-gradient(180deg, var(--gold-3), var(--gold-2)); color: #1a1204; border-color: transparent; font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.on:hover { color: #1a1204; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid rgba(36, 53, 84, .6); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
tr.me td { background: rgba(233, 181, 74, .08); }
.win { color: var(--win); font-weight: 600; } .loss { color: var(--loss); font-weight: 600; } .draw { color: var(--muted); font-weight: 600; }
.who { display: flex; align-items: center; gap: 10px; }
.face { width: 32px; height: 32px; border-radius: 6px; image-rendering: pixelated; background: var(--panel-3); flex: none; }
.face.lg { width: 72px; height: 72px; border-radius: 10px; }
.face.xl { width: 96px; height: 96px; border-radius: 12px; box-shadow: 0 0 0 3px rgba(233, 181, 74, .35), 0 10px 24px rgba(0, 0, 0, .45); }
.face.placeholder { display: inline-block; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }

.ipbox { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: rgba(10, 17, 32, .8); margin-bottom: 12px; }
.ipbox code { background: none; padding: 11px 16px; font-size: 16px; font-weight: 600; letter-spacing: .02em; color: var(--text); }
.ipbox button { border: 0; border-left: 1px solid var(--line-2); background: var(--panel-2); color: var(--gold-3); padding: 0 16px; font: 600 14px var(--sans); cursor: pointer; }
.online { display: flex; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 22px; font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 3px rgba(95, 111, 138, .2); }
.dot.on { background: var(--win); box-shadow: 0 0 0 3px rgba(63, 203, 107, .2); }

/* ------------------------------------------------------------------ cards */
.feature { position: relative; overflow: hidden; }
.feature .art { height: 110px; border-radius: 10px; margin: -4px -4px 14px; display: grid; place-items: center; }
.feature .art svg { width: 64px; height: 64px; }
.art.gold { background: radial-gradient(circle at 50% 40%, rgba(233, 181, 74, .35), rgba(20, 30, 52, 1) 70%); }
.art.purple { background: radial-gradient(circle at 50% 40%, rgba(178, 92, 255, .35), rgba(20, 30, 52, 1) 70%); }
.art.green { background: radial-gradient(circle at 50% 40%, rgba(70, 201, 107, .3), rgba(20, 30, 52, 1) 70%); }
.art.blue { background: radial-gradient(circle at 50% 40%, rgba(61, 165, 255, .32), rgba(20, 30, 52, 1) 70%); }
.art.red { background: radial-gradient(circle at 50% 40%, rgba(229, 72, 77, .32), rgba(20, 30, 52, 1) 70%); }
.art.night { background: radial-gradient(circle at 50% 40%, rgba(140, 155, 179, .25), rgba(20, 30, 52, 1) 70%); }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }

/* ------------------------------------------------------------------ home: story sections */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--gold); font: 600 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.sec-head { max-width: 720px; margin: 0 auto 22px; text-align: center; }
.sec-head .eyebrow::before, .sec-head .eyebrow::after { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-2)); }
.sec-head .eyebrow::after { transform: scaleX(-1); }
.sec-head h2 { margin-bottom: 8px; font-size: clamp(22px, 2.6vw, 30px); }
.sec-head p { margin: 0; color: var(--muted); }
.sec-more { margin: 16px 0 0; text-align: center; font-size: 14px; font-weight: 600; }

.about {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; padding: 30px clamp(20px, 4vw, 40px);
  background:
    radial-gradient(70% 120% at 0% 0%, rgba(196, 72, 36, .13), transparent 60%),
    radial-gradient(70% 120% at 100% 100%, rgba(47, 111, 219, .15), transparent 60%),
    linear-gradient(180deg, var(--panel), var(--bg-2));
}
.about h2 { font-size: clamp(22px, 2.6vw, 30px); color: #f3e2b8; }
.about p { margin: 0 0 10px; color: var(--muted); }
.about p:last-child { margin-bottom: 0; }
.numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.numbers div { display: flex; flex-direction: column-reverse; gap: 4px; padding: 16px 8px; text-align: center; border-radius: 10px; background: rgba(7, 12, 24, .55); border: 1px solid var(--line); }
.numbers dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.numbers dd {
  margin: 0; font: 700 clamp(26px, 3vw, 34px) / 1.05 var(--serif);
  background: linear-gradient(180deg, var(--gold-3), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; padding: 22px 18px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel), var(--bg-2)); }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 38px; right: -17px; width: 18px; height: 2px; background: linear-gradient(90deg, var(--gold-2), transparent); }
.step-no { display: block; margin-bottom: 10px; font: 700 34px / 1 var(--serif); color: transparent; -webkit-text-stroke: 1px var(--gold-2); }
.steps h3 { margin-bottom: 6px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }

.age-road { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.age-road li {
  --c: hsl(calc(25 + var(--i) * 270 / max(var(--n) - 1, 1)) 62% 62%);
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); border-left: 3px solid var(--c);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 13%, var(--panel)), var(--panel) 70%);
  transition: transform .2s, border-color .2s;
}
.age-road li:hover { transform: translateY(-2px); border-color: var(--c); }
.age-road .age-no { font: 700 11px var(--sans); color: var(--c); letter-spacing: .08em; text-transform: uppercase; }
.age-road .age-name { font-family: var(--serif); font-size: 16px; line-height: 1.25; color: var(--text); }
.age-road .age-lord { font-size: 12px; color: var(--dim); }

.mode {
  --tint: 196, 72, 36;
  position: relative; overflow: hidden; display: flex; flex-direction: column; padding-top: 24px;
  background: radial-gradient(120% 60% at 50% 0%, rgba(var(--tint), .17), transparent 60%), linear-gradient(180deg, var(--panel), var(--bg-2));
}
.mode.survival { --tint: 70, 201, 107; }
.mode.arena { --tint: 61, 125, 235; }
.mode::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgb(var(--tint)); }
.mode h3 { font-size: 20px; }
.mode ul { flex: 1; display: grid; align-content: start; gap: 9px; margin: 4px 0 16px; padding: 0; list-style: none; }
.mode li { position: relative; padding-left: 20px; color: var(--muted); font-size: 14px; }
.mode li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; transform: rotate(45deg); background: rgb(var(--tint)); }
.mode-link { font-size: 14px; font-weight: 600; }

/* the three worlds share one account: hub on top, bridges between the cards, flows below */
.hub { display: flex; justify-content: center; position: relative; z-index: 1; }
.hub span {
  padding: 9px 20px; border-radius: 999px; font: 600 13px var(--sans); letter-spacing: .04em; color: #f3e2b8; text-align: center;
  background: linear-gradient(180deg, #1b2846, #0f182d); border: 1px solid rgba(233, 181, 74, .55);
  box-shadow: 0 0 0 4px rgba(233, 181, 74, .07), 0 10px 24px rgba(0, 0, 0, .35);
}
.hub-lines { position: relative; height: 30px; margin: 0 calc(100% / 6); }
.hub-lines::before {
  content: ""; position: absolute; inset: 14px 0 0; border: 2px solid; border-bottom: 0; border-radius: 10px 10px 0 0;
  border-image: linear-gradient(90deg, #c4512a, #e9b54a 50%, #3d7deb) 1;
}
.hub-lines::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #e9b54a; }
.modes { position: relative; gap: 40px; }
.bridge { position: absolute; top: 50%; width: 40px; height: 14px; margin-top: -7px; pointer-events: none; }
.bridge.b1 { left: calc(100% / 3 - 26.667px); --a: 196, 72, 36; --b: 70, 201, 107; }
.bridge.b2 { left: calc(200% / 3 - 13.333px); --a: 70, 201, 107; --b: 61, 125, 235; }
.bridge::before {
  content: ""; position: absolute; left: 0; right: 0; top: 2px; bottom: 2px; border-top: 2px solid; border-bottom: 2px solid;
  border-image: linear-gradient(90deg, rgb(var(--a)), rgb(var(--b))) 1;
}
.bridge::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; transform: rotate(45deg);
  background: #e9b54a; box-shadow: 0 0 10px rgba(233, 181, 74, .8);
}
.flows { margin-top: 34px; }
.flows-title { margin: 0 0 12px; text-align: center; color: var(--muted); font-size: 14px; font-weight: 600; }
.flows ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.flows li { padding: 14px 16px; border-radius: 10px; background: rgba(16, 26, 45, .7); border: 1px dashed var(--line-2); }
.flows p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.route i { width: 28px; height: 2px; position: relative; background: linear-gradient(90deg, var(--line-2), var(--gold-2)); }
.route i::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left-color: var(--gold-2); border-right: 0; }
.chip { --tint: 196, 72, 36; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: rgb(var(--tint)); background: rgba(var(--tint), .12); border: 1px solid rgba(var(--tint), .45); }
.chip.survival { --tint: 70, 201, 107; }
.chip.arena { --tint: 96, 150, 245; }

.join-cta {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 32px;
  padding: 28px clamp(20px, 4vw, 40px); border-radius: 16px; border: 1px solid rgba(233, 181, 74, .3); box-shadow: var(--shadow);
  background:
    radial-gradient(60% 160% at 0% 50%, rgba(196, 72, 36, .28), transparent 60%),
    radial-gradient(60% 160% at 100% 50%, rgba(47, 111, 219, .3), transparent 60%),
    linear-gradient(180deg, #121d35, #0c1527);
}
.join-cta h2 { margin-bottom: 6px; color: #f3e2b8; }
.join-cta p { max-width: 62ch; margin: 0; color: var(--muted); }
.post-card { display: flex; flex-direction: column; color: var(--text); text-decoration: none !important; }
.post-card .art { height: 130px; border-radius: 10px; margin-bottom: 12px; display: grid; place-items: center; }
.post-card .art svg { width: 56px; height: 56px; opacity: .9; }
.post-card h3 { margin: 8px 0 6px; font-size: 16px; }
.post-card p { color: var(--muted); font-size: 14px; margin: 0; }
.post-card:hover h3 { color: var(--gold-3); }
.meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--dim); }

/* event + countdown */
.event { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.event .art { min-height: 220px; display: grid; place-items: center; }
.event .art svg { width: 110px; height: 110px; }
.event .body { padding: 22px; }
.event h2 { font-size: 24px; }
.countdown { display: flex; gap: 8px; margin: 14px 0; }
.countdown div { background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; min-width: 58px; text-align: center; }
.countdown b { display: block; font: 700 22px var(--sans); font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; color: var(--muted); text-transform: uppercase; }

/* ------------------------------------------------------------------ account */
.account { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 272px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--muted); }
.side a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.side a.on { background: var(--panel-3); color: var(--text); box-shadow: inset 3px 0 0 var(--gold); }
.side svg { width: 18px; height: 18px; }
.profile { display: flex; gap: 16px; align-items: center; }
.profile .name { font-family: var(--serif); font-size: 24px; }
.player-hero { position: relative; overflow: hidden; display: flex; gap: 18px; align-items: center;
  background: linear-gradient(180deg, #18263f, #101a2d); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.player-hero::after { content: ""; position: absolute; right: 8px; top: 50%; width: 240px; height: 120px; transform: translateY(-50%);
  background: url("/static/img/logo.png") center / contain no-repeat; opacity: .16; pointer-events: none; }
.player-figures { display: flex; align-items: flex-end; gap: 10px; position: relative; z-index: 1; }
.player-id { position: relative; z-index: 1; min-width: 0; }
.player-hero .name { font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.player-hero.lg { padding: 22px 26px; }
.player-hero.lg .name { font-size: 34px; }
.player-hero .btn { position: relative; z-index: 1; }
.wallet .coin { text-align: center; padding: 16px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.wallet .coin svg { width: 40px; height: 40px; }
.wallet .coin b { display: block; font-size: 22px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.wallet .coin span { font-size: 12px; color: var(--muted); }
.wallet .coin.gold b { color: var(--gold-3); } .wallet .coin.seal b { color: #d4a4ff; } .wallet .coin.money b { color: #7ee39a; } .wallet .coin.gem b { color: #8cc9ff; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold-3)); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 4px 8px; border-radius: 6px; background: var(--panel-3); border: 1px solid var(--line); }
.chip.off { opacity: .35; }
.chip.rare { border-color: #2f6fb8; } .chip.epic { border-color: #8a3fd0; } .chip.common { border-color: var(--line-2); }

/* 6-digit code */
.code { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.code input { width: 48px; height: 58px; text-align: center; font: 700 26px var(--sans); padding: 0; }

/* ads */
.dots { display: flex; gap: 8px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--gold-2); }
.dots i.used { background: var(--gold); border-color: var(--gold); }
.reward-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.reward-choice { text-align: center; }
.reward-choice .art { height: 120px; border-radius: 10px; margin-bottom: 12px; display: grid; place-items: center; }
.reward-choice .art svg { width: 60px; height: 60px; }
.reward-choice h3 { font-size: 20px; }
.adbox { border: 1px dashed var(--line-2); border-radius: 12px; min-height: 200px; display: grid; place-items: center; text-align: center; padding: 20px;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .015) 0 10px, transparent 10px 20px); }
.adbox .timer { font: 700 48px var(--sans); font-variant-numeric: tabular-nums; color: var(--gold-3); }

/* leaderboard */
.mine { position: sticky; bottom: 12px; margin-top: 14px; border-color: var(--gold-2); background: #182238; box-shadow: var(--shadow); }

/* timeline */
.tl { list-style: none; padding: 0; margin: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl li { position: relative; padding: 0 0 22px 52px; }
.tl .mark { position: absolute; left: 4px; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3);
  border: 2px solid var(--line-2); font-size: 14px; }
.tl .done .mark { border-color: var(--win); color: var(--win); }
.tl .active .mark { border-color: var(--gold); color: var(--gold); }
.tl .planned .mark { border-color: var(--gem); color: var(--gem); }

/* wiki */
.wiki { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.prose { max-width: 75ch; }
.wiki table { table-layout: fixed; }
.wiki th:first-child, .wiki td:first-child { width: 30%; }
.prose h2 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose p, .prose li { color: #cfd8e6; }

/* footer */
footer { border-top: 1px solid var(--line); background: #080e1b; padding: 30px 0; font-size: 14px; color: var(--muted); }
footer .wrap { display: grid; gap: 18px; }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer .links a { color: var(--muted); }
footer .fine { font-size: 12px; color: var(--dim); }

/* admin */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ------------------------------------------------------------------ ranks, items, skins */
.rank { width: 22px; height: 22px; vertical-align: -6px; flex: none; }
.rank.lg { width: 40px; height: 40px; }
.rank-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.rank-acemi { color: #8c9bb3; } .rank-er { color: #e7ecf4; } .rank-cavus { color: #46c96b; } .rank-tegmen { color: #45d0e0; }
.rank-yuzbasi { color: #6fa3ff; } .rank-binbasi { color: #d49bff; } .rank-albay { color: #f5c865; } .rank-general { color: #ff7a70; }
.rank-maresal { color: #ff4d5e; text-shadow: 0 0 10px rgba(255, 77, 94, .35); }
.rank-efsane { background: linear-gradient(90deg, #fff3b0, #ffc62e, #ff7a00); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 6px rgba(255, 190, 40, .45)); }
.rank-efsane .rank { filter: none; }
.item-icon { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: middle; flex: none; }
.item { display: inline-flex; align-items: center; gap: 10px; }
.body-skin { width: 96px; height: 192px; image-rendering: pixelated; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); }
.body-skin.sm { width: 64px; height: 128px; }
.body-skin.lg { width: 120px; height: 240px; }
/* 3D figure (static/js/skin3d.js): wider than the flat picture so a turned figure and what it holds still fit */
.body-skin.skin3d { display: inline-block; vertical-align: bottom; width: 128px; height: 192px; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45)); }
.body-skin.sm.skin3d { width: 88px; height: 128px; }
.body-skin.lg.skin3d { width: 200px; height: 270px; }
.skin3d canvas { display: block; cursor: grab; }
.skin3d canvas:active { cursor: grabbing; }

/* Arena character window (templates/_character.html): equipment slots either side of the figure */
.character h2 { flex-wrap: wrap; }
.character-body { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 8px; }
.gear-col { display: grid; gap: 8px; }
.character-figure { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.character-floor { width: 70%; height: 14px; margin-top: -10px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(233, 181, 74, .28), transparent); }
.gear-slot { --r: var(--line-2); position: relative; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 10px;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--r) 22%, transparent), var(--panel-2) 70%);
  border: 1px solid var(--r); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35); }
.gear-slot .item-icon { width: 36px; height: 36px; }
.gear-slot .lv { position: absolute; right: 3px; bottom: 1px; font: 700 11px var(--sans); color: var(--text); text-shadow: 0 1px 2px #000; }
.gear-slot .ph { font-size: 9px; line-height: 1.1; text-align: center; color: var(--muted); opacity: .7; padding: 2px; }
.gear-slot.empty { border-style: dashed; background: var(--panel-2); }
.gear-slot.r-common { --r: #9aa3b2; } .gear-slot.r-uncommon { --r: #46c96b; } .gear-slot.r-rare { --r: #5b8cff; }
.gear-slot.r-epic { --r: #b56bff; } .gear-slot.r-legendary { --r: #f5b52e; } .gear-slot.r-mythic { --r: #ff4d5e; }
.gear-slot.r-legendary, .gear-slot.r-mythic { box-shadow: 0 0 12px color-mix(in srgb, var(--r) 45%, transparent); }
.center { text-align: center; }
@media (max-width: 600px) {
  .gear-slot { width: 44px; height: 44px; }
  .gear-slot .item-icon { width: 30px; height: 30px; }
  .body-skin.lg.skin3d { width: 150px; height: 220px; }
}
.trend { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.trend b { display: block; }
.reset { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.reset .countdown { margin: 0; }
.reset .countdown div { min-width: 44px; padding: 4px 6px; }
.reset .countdown b { font-size: 16px; }

/* ------------------------------------------------------------------ store */
.store-hero { --tint: 178, 92, 255; --tint-2: 233, 181, 74; }
.store-soon { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px !important; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; color: #f3e2b8; background: rgba(233, 181, 74, .1); border: 1px solid rgba(233, 181, 74, .35); }
.store-soon .dot.on { background: var(--gold-3); box-shadow: 0 0 0 3px rgba(233, 181, 74, .25); }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan {
  --c: 70, 201, 107;
  position: relative; display: flex; flex-direction: column; padding: 28px 22px 22px; border-radius: 16px;
  border: 1px solid rgba(var(--c), .4);
  background: radial-gradient(120% 50% at 50% 0%, rgba(var(--c), .18), transparent 65%), linear-gradient(180deg, var(--panel), var(--bg-2));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3); transition: transform .2s, box-shadow .2s;
}
.plan:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0, 0, 0, .4), 0 0 0 1px rgba(var(--c), .5); }
.plan.tier-2 { --c: 79, 195, 247; }
.plan.tier-3 { --c: 233, 181, 74; }
.plan.tier-4 { --c: 255, 79, 216; }
.plan.tier-4 .plan-name { background: linear-gradient(90deg, #ff4fd8, #ffd36e, #4fd8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plans.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plans.four .plan { padding: 28px 16px 18px; }
/* discount campaign (store.indirimler): its own line under the normal price; the "one by one" comparison stays as it is */
.sale-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 6px 0 10px; font-size: 14px; }
.sale-line s { color: var(--dim); text-decoration-color: rgba(229, 72, 77, .8); text-decoration-thickness: 2px; }
.sale-line b { color: #ff8a7a; font-size: 18px; }
.sale-tag { padding: 1px 8px; border-radius: 6px; font: 700 11.5px var(--sans); color: #fff; background: linear-gradient(180deg, #e5484d, #b3262b); }
.sale-end { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.lots li:has(.sale-line) { flex-wrap: wrap; }
.lots .sale-line { flex-basis: 100%; margin: 4px 0 0; font-size: 12.5px; }
.sale-banner { margin-bottom: 18px; border-color: rgba(229, 72, 77, .45); background: linear-gradient(90deg, rgba(229, 72, 77, .14), transparent); font-weight: 600; }
.plan.popular { transform: translateY(-10px); border-width: 2px; box-shadow: 0 22px 46px rgba(0, 0, 0, .45), 0 0 40px rgba(var(--c), .18); }
.plan.popular:hover { transform: translateY(-14px); }
.plan::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: rgb(var(--c)); }
.ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 4px 14px; border-radius: 999px;
  font: 700 12px var(--sans); letter-spacing: .04em; color: #1a1204; background: linear-gradient(180deg, var(--gold-3), var(--gold-2));
  box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.plan-name { margin: 0 0 6px; font-size: 30px; color: rgb(var(--c)); text-shadow: 0 0 24px rgba(var(--c), .35); }
.plan-price { margin-bottom: 18px; color: var(--muted); }
.plan-price b { font: 700 38px / 1.1 var(--serif); color: var(--text); }
.plan-perks { flex: 1; margin: 0 0 22px; padding: 4px 0 0; border-top: 1px solid var(--line); }
.plan-perks h4 { margin: 14px 0 8px; font: 700 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--c)); }
.plan-perks ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.plan-perks li { position: relative; padding-left: 26px; font-size: 14px; color: #c9d3e3; }
.plan-perks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(var(--c), .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.5l2.2 2.2 4.8-5' fill='none' stroke='%23e7ecf4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(var(--c), .6); }
.plan .btn { width: 100%; }
.btn:disabled { cursor: not-allowed; opacity: .75; filter: saturate(.8); }

.packs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.pack {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 14px 16px; border-radius: 14px;
  border: 1px solid rgba(178, 92, 255, calc(.25 + var(--i) * .08));
  background: radial-gradient(100% 60% at 50% 0%, rgba(178, 92, 255, calc(.1 + var(--i) * .05)), transparent 70%), linear-gradient(180deg, var(--panel), var(--bg-2));
  transition: transform .2s, border-color .2s;
}
.pack:hover { transform: translateY(-4px); border-color: rgba(178, 92, 255, .8); }
.pack.best { border-color: var(--gold-2); background: radial-gradient(100% 60% at 50% 0%, rgba(233, 181, 74, .2), transparent 70%), linear-gradient(180deg, var(--panel), var(--bg-2)); }
.pack-art { position: relative; display: flex; justify-content: center; height: 58px; margin-bottom: 8px; filter: drop-shadow(0 6px 12px rgba(120, 40, 200, .5)); }
.pack-art svg { width: 46px; height: 46px; margin: 0 -12px; }
.pack-art svg:nth-child(2) { transform: translateY(-8px) scale(1.08); z-index: 1; }
.pack h3 { margin: 0 0 4px; font-size: 18px; }
.pack-seals { color: var(--muted); font-size: 13px; }
.pack-seals b { display: block; font: 700 26px / 1.15 var(--serif); color: #d4a4ff; }
.pack-meta { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; margin: 8px 0 10px; }
.bonus { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #7ee39a; background: rgba(70, 201, 107, .12); border: 1px solid rgba(70, 201, 107, .4); }
.pack-price { margin-top: auto; margin-bottom: 10px; font: 700 22px var(--sans); color: var(--text); }
.pack .btn { width: 100%; }
.store-info h3 { font-size: 17px; margin-bottom: 6px; }
.store-info p { margin: 0; color: var(--muted); font-size: 14px; }

/* store: category strip, discount badges, bundles, crate keys / spawners shelves */
.store-nav { position: sticky; top: 60px; z-index: 5; margin: 22px auto 0; background: rgba(8, 13, 25, .97); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 10px 24px rgba(0, 0, 0, .45); }
.store-nav a.hot { color: var(--gold-3); }
.nav-deal { margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: linear-gradient(180deg, #ff6b5a, #d43a2f); }
.section[id^="bolum-"] { scroll-margin-top: 120px; }
.was { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 500; color: var(--dim); text-decoration: line-through; text-decoration-color: rgba(229, 72, 77, .8); text-decoration-thickness: 2px; }
.deal {
  position: absolute; top: 12px; right: -6px; z-index: 2; padding: 5px 12px 5px 14px; font: 800 14px var(--sans); color: #fff;
  background: linear-gradient(180deg, #ff6b5a, #c8322a); border-radius: 6px 0 0 6px;
  box-shadow: 0 6px 14px rgba(200, 50, 42, .45);
}
.deal::after { content: ""; position: absolute; right: 0; bottom: -6px; border: 3px solid #7a1a15; border-right-color: transparent; border-bottom-color: transparent; }

.bundles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.bundle {
  position: relative; display: flex; flex-direction: column; padding: 22px; border-radius: 16px; overflow: visible;
  border: 1px solid rgba(233, 181, 74, .4);
  background: radial-gradient(90% 70% at 0% 0%, rgba(233, 181, 74, .14), transparent 60%), radial-gradient(80% 60% at 100% 100%, rgba(255, 107, 90, .1), transparent 60%),
    linear-gradient(180deg, var(--panel), var(--bg-2));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3); transition: transform .2s, box-shadow .2s;
}
.bundle:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0, 0, 0, .4), 0 0 0 1px rgba(233, 181, 74, .6); }
.bundle.starter { border-color: rgba(70, 201, 107, .55); background: radial-gradient(90% 70% at 0% 0%, rgba(70, 201, 107, .16), transparent 60%), linear-gradient(180deg, var(--panel), var(--bg-2)); }
.bundle-head { display: flex; align-items: center; gap: 16px; padding-right: 70px; }
.bundle-head h3 { margin: 0 0 6px; font-size: 22px; }
.bundle-head .item-slot.lg { width: 72px; height: 72px; }
.bundle-head .item-art { width: 52px; height: 52px; image-rendering: pixelated; }
.tag.once { background: rgba(70, 201, 107, .15); color: #8ce3a9; }
.bundle-label { margin: 16px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.bundle-items { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.bundle-items li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #d3dbe8; }
.bundle-items .item-slot { width: 34px; height: 34px; }
.bundle-items .item-slot .icon, .bundle-items .item-icon { width: 24px; height: 24px; }
.bundle-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.price-stack b { display: block; font: 700 30px / 1.1 var(--serif); }
.save { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; color: #7ee39a; }

.shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.shelf.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.spawner-xp { margin: 10px 0 6px; line-height: 1.45; }
.spawner-xp b { color: var(--gold-3); }
.shelf-card { display: flex; flex-direction: column; padding: 16px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--bg-2)); transition: transform .2s, border-color .2s; }
.shelf-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.shelf-card.crate-demir { border-color: rgba(190, 200, 214, .35); }
.shelf-card.crate-altin { border-color: rgba(233, 181, 74, .45); }
.shelf-card.crate-elmas { border-color: rgba(79, 195, 247, .5); background: radial-gradient(100% 60% at 50% 0%, rgba(79, 195, 247, .12), transparent 70%), linear-gradient(180deg, var(--panel), var(--bg-2)); }
.shelf-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.shelf-head .item-slot.lg { width: 56px; height: 56px; flex: none; }
.shelf-head .item-art { width: 40px; height: 40px; image-rendering: pixelated; }
.shelf-head h3 { margin: 2px 0 4px; font-size: 17px; }
.shelf-head p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.lots { flex: 1; display: grid; align-content: start; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.lots li { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 9px;
  background: rgba(7, 12, 24, .5); border: 1px solid var(--line); }
.lots li.deal-lot { border-color: rgba(255, 107, 90, .35); background: linear-gradient(90deg, rgba(255, 107, 90, .08), rgba(7, 12, 24, .5)); }
.lot-n { font-weight: 700; font-size: 14px; white-space: nowrap; }
.lot-price { margin-left: auto; text-align: right; white-space: nowrap; }
.lot-price b { font-size: 15px; }
.lot-price .was { display: inline; margin: 0 6px 0 0; font-size: 12px; }
.lots .deal { top: -8px; right: -6px; padding: 1px 6px; font-size: 10.5px; border-radius: 6px; box-shadow: 0 3px 8px rgba(200, 50, 42, .45); }
.lots .deal::after { display: none; }
.shelf-card .btn, .pack .btn { width: 100%; }
.packs.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pack.xp { border-color: rgba(126, 227, 154, calc(.25 + var(--i) * .1)); background: radial-gradient(100% 60% at 50% 0%, rgba(126, 227, 154, calc(.08 + var(--i) * .04)), transparent 70%), linear-gradient(180deg, var(--panel), var(--bg-2)); }
.pack.xp .pack-art { height: auto; filter: drop-shadow(0 6px 12px rgba(70, 201, 107, .35)); }
.pack.xp .item-slot.lg { width: 64px; height: 64px; }
.pack.xp .item-art { width: 46px; height: 46px; image-rendering: pixelated; }
.pack.xp .pack-seals b { color: #7ee39a; }
.pack-price .was { font-size: 13px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1060px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; z-index: 2; }
  .nav.open { display: flex; }
  .menu-toggle { display: inline-block; }
  .pills { display: none; }
  .top .wrap { justify-content: space-between; }
  .banner { --logo-h: 190px; }
  .packs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shelf, .shelf.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .packs.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li::after { display: none; }
  .age-road { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .bundles { grid-template-columns: 1fr; }
  .plans, .plans.four { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; gap: 26px; }
  .plan.popular { order: -1; transform: none; }
  .plan.popular:hover { transform: translateY(-4px); }
  .about { grid-template-columns: 1fr; gap: 22px; }
  .modes { grid-template-columns: 1fr; gap: 28px; }
  .hub-lines { height: 28px; margin: 0; }
  .hub-lines::before { display: none; }
  .bridge { display: none; }
  .modes::before { content: ""; position: absolute; left: 50%; top: -28px; bottom: 0; width: 2px; margin-left: -1px; background: linear-gradient(180deg, #e9b54a, #c4512a 20%, #46c96b 50%, #3d7deb 85%); }
  .flows ul { grid-template-columns: 1fr; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event { grid-template-columns: 1fr; }
  .event .art { min-height: 140px; }
  .account, .wiki { grid-template-columns: 1fr; }
  .side { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .side a { white-space: nowrap; }
}
@media (max-width: 760px) {
  .banner-play { flex-wrap: wrap; justify-content: center; max-width: 440px; }
  .banner-play .ipbox { order: -1; flex: 1 1 100%; }
  .banner-play .ipbox code { flex: 1; text-align: center; }
  .b-castle { height: 46%; opacity: .75; }
}
@media (max-width: 600px) {
  .shelf, .shelf.five { grid-template-columns: 1fr; }
  .bundle-items { grid-template-columns: 1fr; }
  .bundle-foot { flex-direction: column; align-items: stretch; }
  .store-nav { top: 56px; }
  .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pack.best { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; gap: 10px; }
  .steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; padding: 16px; }
  .steps .step-no { grid-row: span 2; margin: 2px 0 0; font-size: 28px; }
  .age-road { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 58%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .age-road li { scroll-snap-align: start; }
  .numbers dd { font-size: 24px; }
  .join-cta .row { width: 100%; }
  .join-cta .btn { flex: 1; }
  .banner { --logo-h: min(150px, 36vw); --pad-top: 18px; }
  .pennant { width: 10vw; }
  .pennant.l { right: calc(100% + 2vw); }
  .pennant.r { left: calc(100% + 2vw); }
  .b-inner { padding-bottom: 22px; }
  .bv-v2 .b-inner { padding-bottom: calc(var(--nav-h) + 12px); }
  .mini-brand { margin-right: -8px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .wallet.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .code input { width: 40px; height: 52px; font-size: 22px; }
  .brand b { font-size: 15px; }
  .top .wrap { gap: 8px; }
  .top-right { gap: 6px; }
  .side { top: 12px; }
  .reward-grid { grid-template-columns: 1fr; }
  .player-hero { flex-wrap: wrap; }
  .player-hero::after { opacity: .08; width: 160px; }
  .countdown div { min-width: 48px; }
  .hide-sm { display: none; }
  table.cards-sm thead { display: none; }
  table.cards-sm tr { display: grid; grid-template-columns: 1fr 1fr; padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.cards-sm td { border: 0; padding: 4px 8px; }
  table.cards-sm td::before { content: attr(data-k); display: block; font-size: 11px; color: var(--dim); text-transform: uppercase; }
}

/* wiki: ages as cards, battles list, card rows */
.age-list { display: grid; gap: 14px; margin-top: 12px; }
.age-card { background: var(--panel-3); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.age-card header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.age-card h3 { margin: 0; }
.age-card p { margin: 8px 0; }
.age-no { font-size: 12px; color: var(--muted, #8a93a6); text-transform: uppercase; letter-spacing: .06em; }
.age-units { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 10px 0 4px; }
.age-unit { display: flex; gap: 10px; align-items: flex-start; }
.age-unit .item-icon { image-rendering: pixelated; flex: none; }
.age-unit .tag { margin: 3px 4px 0 0; background: var(--panel-2, #1b2230); color: #c9d3e6; }
.age-unit .tag.hot { background: #4a1f22; color: #ffb3b5; }
.age-unit .tag.ok { background: #1f3a28; color: #8ce3a9; }
.age-lord { font-size: 14px; }
.wiki-battles li { margin: 4px 0; }
.card-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.card-name { display: inline-flex; align-items: center; gap: 6px; }
.card-name .item-icon { width: 24px; height: 24px; image-rendering: pixelated; }

/* "Double my last match" (docs/web/04 §2.6): the offer card on the ad page and the site-wide popup */
.offer-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin: 14px 0 18px; padding: 16px 18px;
  border: 1px solid var(--gold-3); border-radius: 14px; background: linear-gradient(120deg, rgba(240, 190, 60, .16), transparent 70%); }
.offer-card.vip { border-color: #c084fc; background: linear-gradient(120deg, rgba(192, 132, 252, .18), transparent 70%); }
.offer-card.asked { box-shadow: 0 0 0 3px rgba(240, 190, 60, .35); }
.offer-card h3 { margin: 0 0 4px; }
.offer-card p { margin: 2px 0; }
.offer-badge { font: 800 34px var(--sans); color: var(--gold-3); min-width: 64px; text-align: center; }
.offer-card.vip .offer-badge { color: #c084fc; }
.offer-gains-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.offer-gains-row .chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: 14px;
  background: var(--bg-2); border: 1px solid var(--line-2); }
.offer-gains-row .chip .chip-icon { width: 15px; height: 15px; }
.offer-gains-row .chip.gold { border-color: var(--gold-3); color: var(--gold-3); background: rgba(240, 190, 60, .12); }
.vip-tag { color: #c084fc; font-weight: 700; }
@media (max-width: 640px) { .offer-card { grid-template-columns: 1fr; text-align: center; } .offer-gains-row { justify-content: center; } }
.offer-modal { max-width: 440px; width: calc(100% - 32px); border: 1px solid var(--gold-3); border-radius: 16px; padding: 24px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2)); color: inherit; text-align: center; }
.offer-modal::backdrop { background: rgba(0, 0, 0, .6); }
.offer-modal h2 { margin: 6px 0 8px; }
.offer-glow { font: 800 56px var(--sans); color: var(--gold-3); text-shadow: 0 0 24px rgba(240, 190, 60, .55); }
.offer-gains { list-style: none; padding: 0; margin: 12px 0; font-size: 20px; font-weight: 700; }
.offer-gains li { margin: 4px 0; }
.offer-actions { justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.vip-note { color: #c084fc; }
.challenge-head { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin-bottom: 16px; }
.challenge-head .item-art { width: 72px; height: 72px; image-rendering: pixelated; }
.challenge-tiers { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.challenge-tiers li { border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 10px; font-size: 14px; }
.challenge-tiers li.done { border-color: var(--gold-3); }
.challenge-winners { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------------ boards: leaderboard + market */
.hero-head {
  --tint: 233, 181, 74; --tint-2: 196, 72, 36;
  position: relative; overflow: hidden; gap: 16px 24px; padding: 24px clamp(18px, 3vw, 30px); border-radius: 16px;
  border: 1px solid rgba(var(--tint), .3);
  background:
    radial-gradient(60% 140% at 0% 0%, rgba(var(--tint-2), .2), transparent 60%),
    radial-gradient(50% 140% at 100% 100%, rgba(var(--tint), .16), transparent 60%),
    linear-gradient(180deg, #131e37, #0d1629);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
}
.hero-head::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 28px), repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 28px);
  -webkit-mask: linear-gradient(90deg, transparent 30%, #000); mask: linear-gradient(90deg, transparent 30%, #000);
}
.hero-head > * { position: relative; z-index: 1; }
.hero-head h1 { margin-bottom: 6px; color: #f3e2b8; }
.hero-head h1 .icon { color: rgb(var(--tint)); }
.hero-head p { margin: 0; }
.market-hero { --tint: 70, 201, 107; --tint-2: 233, 181, 74; }
.board-hero .reset { flex-direction: column; align-items: flex-end; gap: 6px; }
.board-hero .reset > span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.board-hero .countdown div { background: rgba(7, 12, 24, .6); }

.tabs.seg { display: flex; flex-wrap: nowrap; gap: 4px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  padding: 4px; border-radius: 999px; background: rgba(9, 15, 28, .8); border: 1px solid var(--line); }
.tabs.seg::-webkit-scrollbar { display: none; }
.tabs.seg a { flex: none; border: 0; padding: 8px 16px; white-space: nowrap; }
.tabs.seg a:not(.on):hover { background: var(--panel-2); }
.tabs a.on .muted { color: rgba(26, 18, 4, .7); }

.medal {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  font: 700 18px var(--serif); color: #1a1204;
  background: radial-gradient(circle at 35% 30%, var(--m1), var(--m2) 75%);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25), inset 0 2px 0 rgba(255, 255, 255, .45), 0 0 0 3px rgba(var(--glow), .2), 0 6px 16px rgba(0, 0, 0, .4);
}


.board { padding: 6px 8px; }
.board table th { padding-top: 14px; }
.board tbody tr { transition: background .15s; }
.board tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.pos { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; font-weight: 700; color: var(--muted); background: var(--panel-2); }
.pos.p1, .pos.p2, .pos.p3 { --m1: #f5d47a; --m2: #b8801c; color: #1a1204; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--m1), var(--m2) 75%);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .45); }
.pos.p2 { --m1: #eef2f7; --m2: #8d97a6; }
.pos.p3 { --m1: #f0b07a; --m2: #94531f; }

.challenge-head { background: radial-gradient(60% 140% at 0% 50%, rgba(233, 181, 74, .14), transparent 60%), linear-gradient(180deg, var(--panel), var(--bg-2)); }
.challenge-tiers li { background: rgba(7, 12, 24, .5); }
.challenge-tiers li b { color: var(--gold-3); }
.challenge-tiers li.done { background: rgba(233, 181, 74, .12); }

/* a Minecraft inventory slot around item icons, with the stack size in the corner */
.item-slot { position: relative; display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 6px;
  background: linear-gradient(135deg, #0a1020, #172340); border: 1px solid #2c3d62; box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .45), inset -1px -1px 0 rgba(255, 255, 255, .06); }
.item-slot .item-icon { width: 30px; height: 30px; }
.item-slot.lg { width: 92px; height: 92px; border-radius: 12px; box-shadow: inset 3px 3px 0 rgba(0, 0, 0, .45), 0 0 30px rgba(233, 181, 74, .2); }
.challenge-head .item-slot .item-art { width: 64px; height: 64px; }
.stack { position: absolute; right: 3px; bottom: 1px; font: 700 12px/1 var(--sans); color: #fff; text-shadow: 1px 1px 0 #3f3f3f, 2px 2px 0 rgba(0, 0, 0, .6); }
.cell-item .item b { display: block; }
.board table.cards-sm th:first-child { width: 36%; }
.board table.cards-sm th:nth-child(2) { width: 18%; }
.board table.cards-sm td:nth-child(3), .board table.cards-sm th:nth-child(3) { padding-left: 32px; }
.cell-item .tag { margin-top: 3px; }
.board .price { display: block; color: #7ee39a; font-weight: 700; }
.board .unit { display: block; font-size: 12px; color: var(--dim); }
.board .who .face { width: 26px; height: 26px; }
.fill { display: block; width: 100%; max-width: 120px; height: 4px; margin: 6px 0 0 auto; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.fill i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold-3)); }

.market-stats .stat { --accent: 233, 181, 74; position: relative; overflow: hidden; padding: 16px 16px 14px;
  background: radial-gradient(90% 120% at 100% 0%, rgba(var(--accent), .14), transparent 60%), var(--panel); }
.market-stats .stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: rgb(var(--accent)); }
.market-stats .stat:nth-child(2) { --accent: 61, 165, 255; }
.market-stats .stat:nth-child(3) { --accent: 70, 201, 107; }
.market-stats .stat:nth-child(4) { --accent: 178, 92, 255; }
.market-stats .v { font: 700 26px var(--serif); }

.trend { position: relative; transition: transform .2s, border-color .2s; }
.trend:hover { transform: translateY(-2px); border-color: var(--gold-2); }
.trend-no { position: absolute; top: 6px; right: 10px; font: 700 13px var(--serif); color: var(--dim); }

.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.toolbar .tabs { margin: 0; }
.toolbar .filters { flex: 1; justify-content: flex-end; gap: 8px; }
.toolbar .filters input { flex: 1 1 200px; max-width: 280px; }
.toolbar .filters select { width: auto; }
@media (max-width: 600px) {
  .toolbar .filters .btn { flex: 1 1 100%; }
  .board-hero .reset { align-items: flex-start; }
  .toolbar .filters { justify-content: stretch; }
  .toolbar .filters input { max-width: none; flex-basis: 100%; }
  .toolbar .filters select { flex: 1; }
  .market-stats .v { font-size: 22px; }
}


/* ------------------------------------------------------------------ leaderboard podium (templates/leaderboard.html)
   Minecraft blocks, drawn like the game shows them: a square front, the top and the right side in oblique view, the game's own
   textures (via /item). 1st stands on three gold blocks, 2nd on two iron, 3rd on one copper, all on a row of grass blocks.
   Figures are 3D (static/js/skin3d.js). */
.podium-stage { --b: 66px; position: relative; display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: end; gap: 0 10px;
  margin-bottom: 18px; padding: 28px 18px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(60% 45% at 50% 100%, rgba(233, 181, 74, .12), transparent 70%),
    radial-gradient(90% 70% at 50% 0%, #1b2a47 0%, transparent 70%), linear-gradient(180deg, #0d1626, #0a1220); }
/* the ground: grass blocks seen from the front, a strip of their top above */
.podium-stage::before { content: ""; grid-column: 1 / -1; grid-row: 2; height: calc(var(--b) * .75); margin: 0 -18px;
  background: linear-gradient(180deg, #6aa84f 0, #5a9442 7px, rgba(0, 0, 0, .15) 7px, rgba(0, 0, 0, .45)),
    url("/item/grass_block.png") 0 7px / calc(var(--b) * .5) calc(var(--b) * .5);
  image-rendering: pixelated; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .12); }
.pod { --glow: 233, 181, 74; --tex: url("/item/gold_block.png"); --fig-w: 150px; --fig-h: 210px; grid-row: 1;
  position: relative; display: flex; flex-direction: column; align-items: center; color: inherit; text-decoration: none !important; min-width: 0; }
.pod.second { --glow: 196, 206, 222; --tex: url("/item/iron_block.png"); --fig-w: 124px; --fig-h: 176px; }
.pod.third { --glow: 214, 128, 74; --tex: url("/item/copper_block.png"); --fig-w: 124px; --fig-h: 176px; }
.pod-light { position: absolute; left: 50%; bottom: 0; width: 170%; height: 130%; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--glow), 0), rgba(var(--glow), .16) 70%, rgba(var(--glow), .26));
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); filter: blur(6px); animation: pod-beam 5s ease-in-out infinite alternate; }
.pod.second .pod-light { animation-delay: -1.7s; } .pod.third .pod-light { animation-delay: -3.1s; }
@keyframes pod-beam { from { opacity: .55; } to { opacity: 1; } }
.pod-tag { position: relative; z-index: 3; display: inline-flex; flex-direction: column; align-items: center; gap: 1px; max-width: 100%;
  padding: 4px 10px; border-radius: 3px; background: rgba(0, 0, 0, .5); line-height: 1.25; margin-bottom: 6px; }
.pod:has(.skin3d) .pod-tag { margin-bottom: calc(var(--fig-h) * -.07); } /* 3D: over the head, not over the empty top of the view */
.pod-tag b { font: 700 14px var(--sans); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pod-val { font-weight: 700; font-size: 13px; color: rgb(var(--glow)); white-space: nowrap; }
.pod-val .muted { color: rgba(255, 255, 255, .7); }
.pod-rank .rank-label { font-size: 11px; } .pod-rank .rank { width: 16px; height: 16px; vertical-align: -3px; }
.pod-crown { position: absolute; top: -20px; left: 50%; width: 26px; height: 26px; transform: translateX(-50%); color: #ffd25e;
  filter: drop-shadow(0 0 8px rgba(255, 196, 60, .7)); animation: pod-float 3s ease-in-out infinite; }
@keyframes pod-float { 50% { transform: translate(-50%, -3px); } }
.pod-fig { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: center; height: var(--fig-h); width: 100%;
  margin-bottom: calc(var(--b) * -.32); } /* feet on the middle of the top face */
.pod-fig .body-skin { width: calc(var(--fig-h) / 2); height: var(--fig-h); }
.pod-fig .body-skin.skin3d { width: var(--fig-w); height: var(--fig-h); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .5));
  margin-bottom: calc(var(--fig-h) * -.085); } /* the 3D view leaves room under the feet */
/* a column of blocks; the right side and the top stick out by half a block, so the column moves left by a quarter to look centred */
.pod-base { position: relative; z-index: 1; display: flex; justify-content: center; width: 100%; }
.mc-stack { display: flex; flex-direction: column; padding-top: calc(var(--b) * .5); transform: translateX(calc(var(--b) * -.25)); }
.mc-block { position: relative; width: var(--b); height: var(--b); }
.mc-block > span, .mc-block > b { position: absolute; background-image: var(--tex); background-repeat: no-repeat; image-rendering: pixelated; }
.mc-block .f { inset: 0; background-size: 100% 100%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3), inset 0 -10px 18px rgba(0, 0, 0, .2); }
.mc-block .s { left: 100%; top: 0; width: 50%; height: 100%; background-size: 100% 100%; transform-origin: 0 0; transform: skewY(-45deg);
  filter: brightness(.55); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }
.mc-block .t { left: 0; bottom: 100%; width: 100%; height: 50%; background-size: 100% 100%; transform-origin: 0 100%; transform: skewX(-45deg);
  filter: brightness(1.25); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.pod.first .mc-block.top .f { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3), 0 0 26px rgba(var(--glow), .35); }
/* the place, like text in the game: white with a dark offset shadow, on the front of the top block */
.mc-block .pod-num { inset: 0; display: grid; place-items: center; background: none; filter: none;
  font: 900 calc(var(--b) * .56)/1 var(--sans); color: #fff; text-shadow: 3px 3px 0 #3f3f3f; pointer-events: none; }
a.pod:hover .pod-tag { background: rgba(0, 0, 0, .7); box-shadow: 0 0 0 1px rgba(var(--glow), .7); }
.pod.open { opacity: .5; }
.pod-ghost { display: grid; place-items: center; width: 70px; height: 120px; margin-bottom: 10px; border-radius: 6px;
  border: 2px dashed rgba(var(--glow), .5); font: 700 40px var(--serif); color: rgba(var(--glow), .8); }
.pod.open .pod-fig { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .pod-light, .pod-crown { animation: none; } }
@media (max-width: 600px) {
  .podium-stage { --b: 40px; gap: 0 4px; padding: 26px 6px 0; }
  .podium-stage::before { margin: 0 -6px; }
  .pod { --fig-w: 96px; --fig-h: 140px; }
  .pod.second, .pod.third { --fig-w: 80px; --fig-h: 116px; }
  .pod-tag { padding: 3px 6px; } .pod-tag b { font-size: 12px; }
  .pod-rank { display: none; }
  .pod-val { font-size: 11px; }
  .pod-num { text-shadow: 2px 2px 0 #3f3f3f; }
}

/* League period rewards (templates/leaderboard.html): the place in its metal, the prizes as item pills */
.league-rewards { margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: radial-gradient(70% 120% at 0% 0%, rgba(233, 181, 74, .1), transparent 60%), linear-gradient(180deg, var(--panel), var(--bg-2)); }
.lr-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 12px; }
.lr-head .icon { width: 20px; height: 20px; color: var(--gold-3); }
.lr-head b { font: 700 17px var(--serif); }
.lr-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lr { --a: #ffe9a3; --b: #e2a52c; --c: #8a5a0e; --glow: 233, 181, 74; position: relative; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 14px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(var(--glow), .45);
  background: linear-gradient(100deg, rgba(var(--glow), .2), rgba(var(--glow), .03) 55%), var(--panel-2); }
.lr::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--a), var(--b), var(--c)); }
.lr.p2 { --a: #ffffff; --b: #c3ccd8; --c: #6f7a8a; --glow: 196, 206, 222; }
.lr.p3 { --a: #ffd2a8; --b: #d9864a; --c: #7c3f14; --glow: 214, 128, 74; }
.lr-place { flex: none; width: 46px; text-align: center; font: 700 40px/1 var(--serif);
  background: linear-gradient(180deg, var(--a), var(--b) 55%, var(--c)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .5)) drop-shadow(0 0 10px rgba(var(--glow), .35)); }
.lr-items { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lr-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.lr-item .icon, .lr-item img { width: 22px; height: 22px; flex: none; image-rendering: pixelated; }
.lr-item.seal .icon { color: #d4a4ff; }
.lr-item b { font-size: 16px; color: var(--text); }
.lr-item span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.lr.p1 { box-shadow: 0 0 22px rgba(var(--glow), .18); }
.my-klasman { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel-2); font-weight: 600; }
.my-klasman .icon { width: 18px; height: 18px; color: var(--gold-3); }
@media (max-width: 760px) {
  .lr-list { grid-template-columns: 1fr; }
  .lr-items { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; }
}

/* Weekly countdown to Sunday 23:59 (leaderboard header, home "top of the week") */
.week-clock { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.week-clock .reset > span { text-align: right; line-height: 1.3; }
.week-clock .reset b, .home-week b { color: var(--gold-3); }
.day-left b { color: var(--text); font-variant-numeric: tabular-nums; }
.home-week { display: flex; flex-wrap: wrap; justify-content: space-between; margin: 4px 0 10px; }
@media (max-width: 760px) { .week-clock { align-items: flex-start; } .week-clock .reset > span { text-align: left; } }

/* Arena gear details (templates/_character.html): item cards like the game's lore, as a slot tooltip and in a list */
.gear-slot[tabindex] { cursor: help; outline: none; }
.gear-slot[tabindex]:focus-visible { box-shadow: 0 0 0 2px var(--gold-3); }
.gear-tip { position: absolute; z-index: 30; top: 50%; width: 260px; transform: translateY(-50%); pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity .12s; }
.gear-col.left .gear-tip { left: calc(100% + 10px); }
.gear-col.right .gear-tip { right: calc(100% + 10px); }
.gear-slot:hover .gear-tip, .gear-slot:focus .gear-tip { opacity: 1; visibility: visible; }
.gear-tip .gear-card { background: rgba(10, 6, 24, .97); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
.gear-card { --r: #9aa3b2; padding: 10px 12px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--r) 70%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--r) 10%, var(--panel-2)), var(--panel-2)); text-align: left; }
.gear-card.r-uncommon { --r: #46c96b; } .gear-card.r-rare { --r: #5b8cff; } .gear-card.r-epic { --r: #b56bff; }
.gear-card.r-legendary { --r: #f5b52e; } .gear-card.r-mythic { --r: #ff4d5e; }
.gc-head { display: flex; align-items: center; gap: 10px; }
.gc-head .item-icon { width: 32px; height: 32px; }
.gc-head > div { min-width: 0; flex: 1; }
.gc-name { display: block; color: var(--r); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-rarity { color: var(--r); font-weight: 600; }
.gc-power { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--gold-3); white-space: nowrap; }
.gc-power .icon { width: 14px; height: 14px; }
.gc-stats, .gc-enchants, .gear-totals { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.gc-stats li, .gear-totals li { color: var(--muted); padding: 1px 0; }
.gc-stats b, .gear-totals b { color: #7ee39a; font-variant-numeric: tabular-nums; }
.gc-enchants { margin-top: 6px; border-top: 1px dashed var(--line-2); padding-top: 6px; }
.gc-enchants li { color: #d4a4ff; }
.gear-sub { margin: 16px 0 8px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.gear-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 14px; margin: 0; }
.gear-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
@media (max-width: 600px) {
  .gear-tip { display: none; } /* phones: the list below says it all */
}
