/* The Long Dusk: web theme shared by the portal and (copied) the admin console.
   Dusk plum ground, ember gold support, blood red only for risk; colours echo the design plan.
   Rarity: magic blue, rare yellow, legendary orange, set green. Gold and Obols use different
   colours AND different coin shapes, so colour is never the only signal. */

:root {
  color-scheme: dark;
  --bg: #120c15;
  --bg2: #1a121e;
  --card: #1f1624;
  --card2: #261b2c;
  --line: #3a2c40;
  --ink: #f2e8dc;
  --mute: #bcadb9;
  --plum: #c9a2e6;
  --plumbg: #231729;
  --ember: #f3a640;
  --emberbg: #2a1b10;
  --blood: #ff7a6e;
  --bloodbg: #2d1316;
  --ok: #74d6a0;
  --okbg: #11241a;
  --r-common: #d8d0c8;
  --r-magic: #7f9dff;
  --r-rare: #f0cf4f;
  --r-legendary: #ff9a3c;
  --r-set: #5fd47a;
  --gold: #e9bd55;
  --goldbg: #2b2210;
  --obol: #b9c4ff;
  --obolbg: #1b1d33;
  --display: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --text: "Alegreya Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 10px;
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--text);
  overflow-x: clip;
}
a { color: var(--plum); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
h1, h2, h3, .h3, .h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 10px; }
h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 700; }
h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; }
h3, .h3 { font-size: 24px; font-weight: 700; }
.h4 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; overflow-wrap: anywhere; }
abbr { text-decoration: none; }

/* focus and accessibility */
:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ember); color: #1b0e06; padding: 10px 14px; border-radius: 6px; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* layout */
.wrap { max-width: 1240px; margin: 0 auto; }
.band { padding: clamp(32px, 5vw, 64px) max(5vw, 16px); border-top: 1px solid var(--line); }
.band.alt { background: var(--bg2); }
.band.narrow > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.stack > * + * { margin-top: 14px; }
@media (max-width: 1000px) { .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }
.shead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 18px; }
.shead p { margin: 0; max-width: 70ch; }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card > :last-child { margin-bottom: 0; }
.kicker { font: 700 14px/1.2 var(--text); color: var(--ember); margin: 0 0 8px; letter-spacing: 0.02em; }
.kicker a { color: inherit; }
.lede { font-size: 19px; max-width: 70ch; }
.mute { color: var(--mute); }
.small { font-size: 15px; }
.ember { color: var(--ember); }
.empty { color: var(--mute); font-style: italic; padding: 14px 0; }
.plain { list-style: none; padding: 0; margin: 0; }

/* badges and notices */
.badge { display: inline-block; font: 700 13px/1 var(--text); padding: 5px 8px; border-radius: 5px; background: var(--plumbg); color: var(--plum); white-space: nowrap; }
.badge.good { background: var(--okbg); color: var(--ok); }
.badge.warn { background: var(--emberbg); color: var(--ember); }
.badge.bad { background: var(--bloodbg); color: var(--blood); }
.badge.gold-b { background: var(--goldbg); color: var(--gold); }
.badge.cur-gold { background: var(--goldbg); color: var(--gold); }
.badge.cur-obol { background: var(--obolbg); color: var(--obol); }
.badge.s-active { background: var(--okbg); color: var(--ok); }
.badge.s-suspended { background: var(--emberbg); color: var(--ember); }
.badge.s-banned { background: var(--bloodbg); color: var(--blood); }
.notice { border-left: 3px solid var(--plum); background: var(--plumbg); border-radius: 0 8px 8px 0; padding: 12px 16px; margin: 0 0 16px; }
.notice > :last-child { margin-bottom: 0; }
.notice.good { border-color: var(--ok); background: var(--okbg); }
.notice.warn { border-color: var(--ember); background: var(--emberbg); }
.notice.bad { border-color: var(--blood); background: var(--bloodbg); }
.demo-banner { background: repeating-linear-gradient(135deg, #2a1b10 0 14px, #2f1f12 14px 28px); color: var(--ember); padding: 8px max(5vw, 16px); font-size: 15px; border-bottom: 1px solid #5a3a1c; }
.motd { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 8px max(5vw, 16px); background: var(--plumbg); border-bottom: 1px solid var(--line); font-size: 15px; }
.motd.warn { background: var(--emberbg); }
.motd-label { font-weight: 800; color: var(--plum); text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px/1.1 var(--text); padding: 11px 18px; min-height: 44px; border-radius: 8px; border: 1px solid #c77a22; background: linear-gradient(180deg, #f7b85a, #d9822b); color: #1d0f06; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); color: #1d0f06; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--plum); color: var(--ink); }
.btn.danger { background: transparent; color: var(--blood); border-color: #7a2a2a; }
.btn.danger:hover { background: var(--bloodbg); }
.btn.small { font-size: 14px; padding: 7px 12px; min-height: 36px; }
.btn.big { font-size: 18px; padding: 14px 22px; min-height: 52px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.4); }
form.inline { display: inline; margin: 0; }

/* forms */
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field.two { grid-template-columns: 1fr 1fr; gap: 12px; }
.field.two > div { display: grid; gap: 6px; }
label { font-weight: 700; font-size: 15px; }
input, select, textarea { font: 16px/1.4 var(--text); color: var(--ink); background: var(--bg); border: 1px solid #54425c; border-radius: 8px; padding: 10px 12px; min-height: 44px; width: 100%; }
textarea { font-family: var(--mono); font-size: 14px; min-height: 260px; }
input:focus, select:focus, textarea:focus { border-color: var(--ember); }
input[aria-invalid="true"] { border-color: var(--blood); }
input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; accent-color: var(--ember); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; }
.check label { font-weight: 500; }
.help { color: var(--mute); font-size: 14px; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 2px; margin: 0 0 12px; }
legend { font-weight: 800; color: var(--plum); padding: 0 6px; font-size: 14px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; }
.inline-form select { width: auto; }
.auth form { max-width: 460px; }
details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 14px 0; }
summary { cursor: pointer; padding: 12px 16px; font-weight: 800; }
details > :not(summary) { padding: 0 16px 14px; margin: 0; }
details.danger-zone summary { color: var(--blood); }

/* tables */
.scroll { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 800; background: var(--bg2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: 8px 12px; color: var(--mute); font-size: 14px; }
dl.facts { display: grid; grid-template-columns: minmax(8em, max-content) minmax(0, 1fr); gap: 8px 18px; margin: 0 0 16px; }
dl.facts dt { color: var(--mute); font-weight: 700; }
dl.facts dd { margin: 0; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(11em, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); margin: 0 0 12px; }
.fig1 { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fig1 b { display: block; font: 700 clamp(28px, 3.2vw, 38px)/1 var(--display); color: var(--ember); }
.fig1 span { display: block; font-size: 15px; color: var(--mute); margin-top: 6px; line-height: 1.35; }
.pager { margin: 8px 0 16px; }

/* header and footer */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 8px max(5vw, 16px); max-width: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font: 700 22px/1 var(--display); color: var(--ink); }
.sunmark { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #fff8de 0, #ffd781 40%, #f6993b 70%, #e2672a 100%); box-shadow: 0 0 14px #f6993b88; position: relative; overflow: hidden; }
.sunmark::after { content: ""; position: absolute; left: 30%; top: 10%; width: 2px; height: 80%; background: #8a2f1e; transform: rotate(28deg); opacity: 0.8; }
.main-nav { flex: 1; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: inline-block; font: 600 15px/1 var(--text); color: var(--mute); text-decoration: none; padding: 10px 10px; border-radius: 6px; }
.main-nav a:hover { color: var(--ink); background: var(--bg2); }
.main-nav a[aria-current="page"] { color: var(--ink); background: var(--plumbg); box-shadow: inset 0 -2px 0 var(--ember); }
.account-links { display: flex; align-items: center; gap: 10px; }
.who { font-weight: 700; color: var(--ink); text-decoration: none; }
.site-footer { border-top: 1px solid var(--line); background: #0d0810; padding: 32px max(5vw, 16px); }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 24px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- the dying sun hero ---- */
.hero { position: relative; min-height: clamp(560px, 84vh, 760px); overflow: hidden; color: #f8ecd9; isolation: isolate; border-top: 0; }
.sky { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #14091d 0%, #3a1636 34%, #93353a 60%, #df7434 78%, #f7b55b 90%); }
.stars { position: absolute; inset: 0 0 50% 0; opacity: 0.55; background:
  radial-gradient(1.5px 1.5px at 12% 18%, #fff1d8 50%, transparent 51%),
  radial-gradient(1px 1px at 22% 32%, #fff1d8 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 38% 12%, #fff1d8 50%, transparent 51%),
  radial-gradient(1px 1px at 57% 26%, #fff1d8 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 71% 9%, #fff1d8 50%, transparent 51%),
  radial-gradient(1px 1px at 83% 30%, #fff1d8 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 92% 15%, #fff1d8 50%, transparent 51%),
  radial-gradient(1px 1px at 6% 40%, #fff1d8 50%, transparent 51%); }
.corona { position: absolute; left: 54%; bottom: -14%; width: min(110vw, 1100px); aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, #ffcf7a8c 0%, #ffb35f40 32%, #ff9a4a00 62%); }
.sun { position: absolute; left: 54%; bottom: calc(24% - 150px); width: clamp(220px, 30vw, 360px); aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff8de 0%, #ffd781 48%, #f6993b 82%, #e2672a 100%);
  box-shadow: 0 0 60px 20px #f6993b66, 0 0 160px 60px #e2672a33; overflow: hidden; }
.sun::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 30%, transparent 55%, #5c1a1a33 100%); }
.crack { position: absolute; height: 3px; border-radius: 2px; background: #8a2f1e; opacity: 0.65; transform-origin: left center; }
.crack.k1 { left: 18%; top: 30%; width: 34%; transform: rotate(22deg); }
.crack.k2 { left: 44%; top: 44%; width: 30%; transform: rotate(-18deg); }
.crack.k3 { left: 30%; top: 56%; width: 40%; transform: rotate(8deg); }
.wound { position: absolute; left: 47%; top: 18%; width: 6%; height: 40%; background: linear-gradient(180deg, #5c1a1a, #8a2f1e00); transform: rotate(14deg); border-radius: 40%; opacity: 0.8; }
.embers span { position: absolute; bottom: 26%; width: 4px; height: 4px; border-radius: 50%; background: #ffcf7d; box-shadow: 0 0 6px #ffb35f; opacity: 0; animation: rise 11s linear infinite; }
.embers .e1 { left: 40%; animation-delay: 0s; } .embers .e2 { left: 46%; animation-delay: 1.4s; }
.embers .e3 { left: 52%; animation-delay: 3s; } .embers .e4 { left: 58%; animation-delay: 4.1s; }
.embers .e5 { left: 63%; animation-delay: 5.6s; } .embers .e6 { left: 49%; animation-delay: 6.8s; }
.embers .e7 { left: 55%; animation-delay: 8.2s; } .embers .e8 { left: 44%; animation-delay: 9.5s; }
.embers .e9 { left: 61%; animation-delay: 2.2s; } .embers .e10 { left: 37%; animation-delay: 7.4s; }
.embers .e11 { left: 67%; animation-delay: 0.7s; } .embers .e12 { left: 51%; animation-delay: 10.1s; }
.embers .e13 { left: 57%; animation-delay: 4.9s; } .embers .e14 { left: 42%; animation-delay: 6.1s; }
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 0.9; } 100% { transform: translate(-40px, -380px); opacity: 0; } }
.ridge { position: absolute; left: 0; right: 0; bottom: 0; }
.ridge.far { height: 30%; background: #b65a42; opacity: 0.55; clip-path: polygon(0 34%, 8% 22%, 16% 30%, 24% 16%, 33% 28%, 40% 22%, 48% 36%, 61% 35%, 69% 14%, 78% 26%, 87% 10%, 100% 22%, 100% 100%, 0 100%); }
.ridge.mid { height: 24%; background: #6b2638; clip-path: polygon(0 18%, 12% 10%, 22% 14%, 34% 4%, 44% 16%, 56% 12%, 64% 12%, 74% 8%, 86% 2%, 100% 10%, 100% 100%, 0 100%); }
.bell-tower { position: absolute; left: 13%; bottom: 20%; width: 34px; height: 150px; background: #4a1a33; clip-path: polygon(50% 0, 100% 24%, 100% 100%, 0 100%, 0 24%); }
.bell-tower::after { content: ""; position: absolute; left: 30%; top: 32%; width: 40%; height: 14%; background: #e9925a; opacity: 0.55; }
.ridge.near { height: 15%; background: #2a0f23; clip-path: polygon(0 20%, 14% 12%, 30% 18%, 45% 10%, 55% 10%, 70% 14%, 86% 8%, 100% 16%, 100% 100%, 0 100%); }
.road { position: absolute; left: 50%; bottom: 0; width: 34%; height: 15%; transform: translateX(-50%); background: linear-gradient(180deg, #ffc56be6, #7a2c2240); clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); opacity: 0.55; }
.wanderer { position: absolute; left: 53.6%; bottom: 9%; width: 16px; height: 46px; background: #12070f; clip-path: polygon(40% 0, 60% 0, 70% 14%, 66% 40%, 74% 100%, 56% 100%, 50% 62%, 44% 100%, 26% 100%, 34% 40%, 30% 14%); }
.hero-copy { position: relative; padding: clamp(36px, 7vw, 84px) max(5vw, 16px) 40px; max-width: 1240px; }
.hero-copy h1 { font-size: clamp(48px, 8vw, 92px); color: #fff4e2; max-width: 12ch; text-shadow: 0 2px 24px #0d061299; }
.hero-copy .sub { font-size: clamp(17px, 1.9vw, 21px); max-width: 46ch; color: #f1dfca; text-shadow: 0 1px 12px #0d0612cc; }
.hero-copy .kicker { color: #f3b866; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.center .cta { justify-content: center; }
.hook { font: 700 26px/1.2 var(--display); color: var(--ember); margin-top: 18px; }
.cta-band { background: radial-gradient(ellipse at 50% 120%, #3a1636 0%, var(--bg) 70%); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .embers span { animation: none; opacity: 0.5; } }

/* acts and classes */
.acts { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.act { padding: 16px; display: grid; gap: 4px; align-content: start; background: var(--card); border-right: 1px solid var(--line); }
.act:last-child { border-right: 0; }
.act .swatch { height: 10px; border-radius: 5px; margin-bottom: 8px; }
.act-n { font-size: 13px; font-weight: 800; color: var(--mute); text-transform: uppercase; letter-spacing: 0.08em; }
.act strong { font: 700 21px/1.1 var(--display); }
.act-1 .swatch { background: linear-gradient(90deg, #2d3a33, #9a7a45, #f0bf6a); }
.act-2 .swatch { background: linear-gradient(90deg, #4f6a73, #e8d6a6, #fff3cf); }
.act-3 .swatch { background: linear-gradient(90deg, #1e2140, #5b4a7a, #c7b7d8); }
.act-4 .swatch { background: linear-gradient(90deg, #120a10, #d8922e, #fffbe8); }
.act-5 .swatch { background: linear-gradient(90deg, #05060f, #1b2450, #7fd7ff); }
@media (max-width: 900px) { .acts { grid-template-columns: minmax(0, 1fr); } .act { border-right: 0; border-bottom: 1px solid var(--line); } }
.class-card, .hero-card { border-top: 3px solid var(--plum); }
.c-bellbreaker { border-top-color: #c8893a; } .c-duskwalker { border-top-color: #7b6ad8; }
.c-pyre_ascetic { border-top-color: #e2672a; } .c-mourner { border-top-color: #8fb3a8; }
.c-cindermancer { border-top-color: #ff9a3c; }
.hero-card.dead { opacity: 0.72; filter: grayscale(0.5); }

/* ----------------------------------------------------------------------- items -------- */
.r-common { --r: var(--r-common); } .r-magic { --r: var(--r-magic); } .r-rare { --r: var(--r-rare); }
.r-legendary { --r: var(--r-legendary); } .r-set { --r: var(--r-set); }
.r-text { color: var(--r, var(--ink)); }
.item-chip { position: relative; display: inline-block; }
.item-chip .item-name { color: var(--r, var(--ink)); font-weight: 800; text-decoration: none; border-bottom: 1px dotted color-mix(in srgb, var(--r, var(--ink)) 60%, transparent); cursor: help; }
.item-chip a.item-name { cursor: pointer; }
.tt-pop { display: none; position: absolute; z-index: 30; left: 0; top: calc(100% + 6px); width: min(340px, 86vw); }
.item-chip:hover .tt-pop, .item-chip:focus-within .tt-pop { display: block; }
.tooltip { background: linear-gradient(180deg, #1b1118, #120b10); border: 1px solid color-mix(in srgb, var(--r, var(--ember)) 55%, #3a2c40); border-radius: 8px; padding: 12px 14px; box-shadow: 0 10px 30px #000a, inset 0 0 0 1px #000; font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.tt-name { font: 700 21px/1.1 var(--display); color: var(--r, var(--ink)); margin: 0 0 2px; }
.tt-type, .tt-ilvl { margin: 0; color: var(--mute); }
.tt-set { margin: 2px 0 0; color: var(--r-set); font-weight: 700; }
.tt-affixes { list-style: none; padding: 0; margin: 8px 0; border-top: 1px solid #3a2c40; padding-top: 8px; }
.tt-affixes li { color: #9fb6ff; }
.tt-affixes li.crafted { color: #f0d9a2; }
.tier { font: 700 11px/1 var(--mono); color: var(--mute); border: 1px solid #4a3a52; border-radius: 3px; padding: 1px 3px; }
.crafted-mark { color: var(--mute); font-size: 12px; }
.tt-power { color: var(--r-legendary); font-style: italic; margin: 6px 0; }
.r-set .tt-power { color: var(--r-set); }
.tt-sockets { list-style: none; padding: 0; margin: 6px 0; }
.socket::before { content: "◇ "; color: var(--mute); }
.socket.filled::before { content: "◆ "; color: var(--ember); }
.tt-extra { margin: 2px 0; color: var(--mute); }
.tt-bind { margin: 8px 0 0; color: var(--mute); font-size: 13px; border-top: 1px solid #3a2c40; padding-top: 6px; }
.quality { font-weight: 800; color: var(--ember); }
.quality.q-sunwrought { color: #fff3c4; text-shadow: 0 0 8px #f6993b; }
.tooltip-frame .tooltip { font-size: 16px; }
.paperdoll-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; margin-top: 18px; }
@media (max-width: 860px) { .paperdoll-grid { grid-template-columns: minmax(0, 1fr); } }
.paperdoll { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.slot { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--r, var(--line)); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; }
.slot:has(.r-legendary) { border-left-color: var(--r-legendary); } .slot:has(.r-set) { border-left-color: var(--r-set); }
.slot:has(.r-rare) { border-left-color: var(--r-rare); } .slot:has(.r-magic) { border-left-color: var(--r-magic); }
.slot-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mute); font-weight: 800; }
.slot.empty { opacity: 0.6; }

/* ----------------------------------------------------------------------- money -------- */
.price { font-weight: 800; white-space: nowrap; display: inline-flex; align-items: baseline; gap: 6px; }
.price .coin { display: inline-block; width: 11px; height: 11px; align-self: center; }
.price.gold { color: var(--gold); }
.price.gold .coin { border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff0b0, #e9bd55 55%, #8a6a1a); }
.price.obol { color: var(--obol); }
.price.obol .coin, .obol-coin { transform: rotate(45deg); background: linear-gradient(135deg, #f4f6ff, #b9c4ff 50%, #5b62a8); border-radius: 2px; }
.fiat { color: var(--mute); font-weight: 600; font-size: 0.88em; }
.big-price { font-size: 30px; margin: 0 0 8px; }
.gold { color: var(--gold); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.tab { padding: 10px 16px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; text-decoration: none; font-weight: 800; color: var(--mute); }
.tab[aria-current="page"] { background: var(--card); border-color: var(--line); color: var(--ink); }
.tab-gold { color: var(--gold); } .tab-gold[aria-current="page"] { background: var(--goldbg); border-color: #6a5420; color: var(--gold); }
.tab-obol { color: var(--obol); } .tab-obol[aria-current="page"] { background: var(--obolbg); border-color: #3d4380; color: var(--obol); }
.ledger-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .ledger-grid { grid-template-columns: minmax(0, 1fr); } }
.filters .btn { margin: 4px 6px 0 0; }
.filters-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 20px; }
.filters-row .field { margin: 0; min-width: 150px; }
.listings td { vertical-align: middle; }
.delta.up { color: var(--ok); font-weight: 800; }
.delta.down { color: var(--blood); font-weight: 800; }
.books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 16px 0; }
@media (max-width: 860px) { .books { grid-template-columns: minmax(0, 1fr); } }
.book { border-top: 4px solid var(--line); }
.book-gold { border-top-color: var(--gold); background: linear-gradient(180deg, var(--goldbg), var(--card) 120px); }
.book-obol { border-top-color: var(--obol); background: linear-gradient(180deg, var(--obolbg), var(--card) 120px); }
.levels { margin-bottom: 12px; }
.levels tr.ask td:first-child { box-shadow: inset 3px 0 0 #ff7a6e66; }
.levels tr.bid td:first-child { box-shadow: inset 3px 0 0 #74d6a066; }
meter.depth { display: block; width: 100%; height: 6px; margin-top: 4px; }
.compare { border-left: 4px solid var(--plum); }
.compare.gold { border-left-color: var(--gold); }
.compare.obol { border-left-color: var(--obol); }
.list-row { display: grid; grid-template-columns: minmax(0, 2fr) 140px 130px auto; gap: 12px; align-items: end; }
.list-row .field { margin: 0; }
@media (max-width: 760px) { .list-row { grid-template-columns: minmax(0, 1fr); } }
.cashout { border-left-width: 5px; }
.bundles { margin-bottom: 18px; }
.bundle { text-align: center; }
.bundle-obols { font: 700 28px/1.1 var(--display); color: var(--obol); display: flex; gap: 10px; align-items: center; justify-content: center; }
.obol-coin { display: inline-block; width: 14px; height: 14px; }
.bundle-price { font-size: 22px; font-weight: 800; }
.topup { max-width: 520px; }
.confirm { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.confirm .check { flex-basis: 100%; }

/* --------------------------------------------------------- ladders, clan, season -------- */
.board td { vertical-align: middle; }
.board .rank { font: 700 20px/1 var(--display); color: var(--ember); }
.board tr.mine td { background: var(--plumbg); }
.board tr.mine td:first-child { box-shadow: inset 4px 0 0 var(--ember); }
.clan-head { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 28px; align-items: start; }
.banner { width: 160px; height: 224px; filter: drop-shadow(0 8px 18px #000a); }
@media (max-width: 640px) { .clan-head { grid-template-columns: minmax(0, 1fr); } .banner { width: 110px; height: 154px; } }
.motd-card { margin: 14px 0; border-left: 3px solid var(--ember); }
.season-hero { background: radial-gradient(ellipse at 70% 120%, #93353a55 0%, transparent 60%), var(--bg); }
progress { width: 100%; height: 14px; margin: 6px 0 22px; accent-color: var(--ember); appearance: none; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--bg2); }
progress::-webkit-progress-value { background: linear-gradient(90deg, #93353a, #f3a640); }
progress::-moz-progress-bar { background: linear-gradient(90deg, #93353a, #f3a640); }
.season-points { margin-top: 10px; }

/* account */
.qr { margin: 0; display: grid; gap: 8px; justify-items: start; }
.qr-img { width: min(260px, 100%); background: #fff; border-radius: 8px; padding: 6px; }
.qr-img svg { display: block; width: 100%; height: auto; }
.secret code { font-size: 18px; letter-spacing: 0.08em; }
.uri code { font-size: 13px; }
.recovery { columns: 2; font-size: 17px; }
.recovery code { font-size: 16px; }
