@font-face { font-family: "Cinzel"; src: url("/assets/fonts/Cinzel-Variable.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Source Sans"; src: url("/assets/fonts/SourceSans3-Variable.ttf") format("truetype"); font-weight: 300 800; font-display: swap; }

:root, [data-theme="midnight"] {
  --bg: #07060c;
  --ink: #f6f1e6;
  --muted: #b3a9c4;
  --gold: #e7c98a;
  --gold-2: #9a7040;
  --line: rgba(231, 201, 138, .28);
  --panel: rgba(8, 6, 14, .5);
  --panel-2: rgba(8, 6, 14, .5);
  --danger: #ffb4b4;
  --ok: #b7f0d2;
  --font: "Source Sans", "Segoe UI", sans-serif;
  --display: "Cinzel", Palatino, serif;
  --radius: 16px;
  --shadow: none;
}
[data-theme="voidstorm"] {
  --bg: #031018; --ink: #e9f7ff; --muted: #9ec9d8; --gold: #8ae7ff; --gold-2: #1c6f88;
  --line: rgba(138, 231, 255, .3); --panel: rgba(3, 16, 26, .5); --panel-2: rgba(3, 16, 26, .5);
}
[data-theme="highborne"] {
  --bg: #14110c; --ink: #fff8ee; --muted: #d8c6a4; --gold: #f3d7a2; --gold-2: #a67c3d;
  --line: rgba(243, 215, 162, .34); --panel: rgba(24, 18, 12, .5); --panel-2: rgba(24, 18, 12, .5);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { color: var(--ink); font-family: var(--font); background: var(--bg); font-size: 17px; line-height: 1.55; }
a { color: var(--gold); text-underline-offset: 3px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

.bg-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: saturate(1.05) contrast(1.05); }
.bg-shade { position: fixed; inset: 0; z-index: -1; background: #05040a; opacity: .5; }
.shell { width: min(1680px, calc(100% - 40px)); margin: 0 auto; }
body.acp-page .shell { width: min(1280px, calc(100% - 32px)); }
body.acp-page .bg-shade { opacity: .5; }

.top { position: sticky; top: 0; z-index: 40; overflow: visible; backdrop-filter: blur(10px); background: rgba(7, 6, 12, .5); border-bottom: 1px solid rgba(255,255,255,.12); }
.bar { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: nowrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line), 0 0 0 4px rgba(0,0,0,.35); }
.brand strong { display: block; font-family: var(--display); font-size: 1.15rem; letter-spacing: .14em; font-weight: 600; }
.brand span { display: block; color: var(--muted); font-size: .82rem; letter-spacing: .02em; max-width: 26ch; }
.nav { display: flex; flex-wrap: nowrap; gap: 2px; flex: 1; align-items: center; min-width: 0; }
.nav-toggle { display: none; align-items: center; gap: 8px; margin-left: auto; background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.nav-burger { display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.nav-toggle span { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
.nav-toggle b { font-weight: 650; font-size: .92rem; }
.nav > a { text-decoration: none; color: var(--ink); padding: 8px 10px; font-size: .95rem; border-bottom: 2px solid transparent; }
.nav > a:hover, .nav > a.active { color: var(--gold); border-bottom-color: var(--gold); }
.menu { position: relative; }
.menu > button { background: transparent; border: 0; color: var(--ink); padding: 8px 12px; cursor: pointer; }
.menu > button:hover, .menu.open > button { color: var(--gold); }
.drop { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 190px; padding: 6px; z-index: 80; background: rgba(8, 6, 14, .92); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; }
.menu:hover > .drop, .menu:focus-within > .drop, .menu.open > .drop { display: flex; flex-direction: column; }
.drop a { text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 8px; border-bottom: 0; }
.drop a:hover, .drop a.active { color: var(--gold); background: rgba(255,255,255,.05); }
.menu.flags > .drop { left: auto; right: 0; width: 168px; min-width: 0; flex-direction: row; flex-wrap: wrap; }
.flag, .drop.flags a { line-height: 0; }
.flag img, .drop.flags img { width: 22px; height: 16px; display: block; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.tools select, .field select, .field input, .field textarea, .stack input, .stack select, .stack textarea, .form-row input, .form-row select {
  background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%;
}
.tools select { width: auto; min-width: 148px; padding: 8px 10px; }
.tools form { margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); text-decoration: none; padding: 11px 18px; border-radius: 999px; cursor: pointer; }
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn.solid { background: linear-gradient(180deg, #f0d7a4, #c4924e); color: #1c1408; border-color: transparent; font-weight: 700; }
.btn.solid:hover { color: #1c1408; filter: brightness(1.05); }
.btn.small { padding: 8px 12px; font-size: .92rem; }

.hero { position: relative; padding: 36px 0 8px; max-width: 720px; }
.kicker { color: var(--gold); letter-spacing: .22em; text-transform: uppercase; font-size: .74rem; margin: 0 0 10px; }
.hero h1, main h1, .panel h1, .section h2, .panel h2 { font-family: var(--display); font-weight: 560; letter-spacing: .03em; }
.hero h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); line-height: 1.05; margin: 0 0 12px; }
.lead { max-width: 62ch; font-size: 1.15rem; color: #efe8dc; }
.hero-actions, .card-row, .form-row, .pager, .stat-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-actions { margin-top: 22px; }

.status-rail { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin: 0 0 14px; }
.hero-slider { margin: 18px 0 0; }
.hero-frame { position: relative; height: clamp(260px, 38vw, 540px); border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.35); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; color: inherit; text-decoration: none; }
.hero-slide.on { opacity: 1; z-index: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 72px 52px; background: linear-gradient(transparent, rgba(5,4,10,.78)); }
.hero-caption h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 560; font-size: clamp(1.5rem, 3vw, 2.6rem); line-height: 1.1; }
.hero-caption p { margin: 0; max-width: 62ch; }
.hero-nav { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: rgba(8,6,14,.55); color: var(--ink); cursor: pointer; font-size: 1.6rem; line-height: 1; }
.hero-nav.prev { left: 12px; }
.hero-nav.next { right: 12px; }
.hero-nav:hover { border-color: var(--gold); color: var(--gold); }
.hero-bar { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; display: flex; justify-content: center; align-items: center; gap: 8px; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.45); cursor: pointer; }
.hero-dot.on { background: var(--gold); }
.hero-bar span { color: var(--ink); font-size: .85rem; margin-left: 6px; text-shadow: 0 1px 4px #000; }
.slide-preview { width: min(100%, 640px); height: 220px; object-fit: cover; border-radius: 12px; }
.slide-thumb { width: 120px; height: 68px; object-fit: cover; border-radius: 8px; display: block; }
.home-board { display: grid; grid-template-columns: minmax(340px, 460px) minmax(0, 1fr) minmax(260px, 320px); grid-template-areas: "side text who"; gap: 20px; align-items: start; margin: 18px 0 36px; }
.home-side { grid-area: side; }
.home-who { grid-area: who; }
.home-who .who-grid { grid-template-columns: 1fr; }
.home-status { padding: 18px 20px 8px; }
.home-status > .eyebrow { margin: 16px 0 0; }
.home-status > .eyebrow:first-child { margin-top: 0; }
.status-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.status-line:last-child { border-bottom: 0; }
.status-line strong { display: block; margin: 0; font-family: var(--display); font-size: 1.05rem; line-height: 1.25; }
.status-line p { margin: 0; white-space: nowrap; }
.status-line .meta { margin-top: 3px; white-space: normal; }
.home-stage, .home-copy { grid-area: text; max-width: none; width: auto; margin: 0; min-width: 0; }
.home-stage .grid-3, .home-stage .shop-grid, .home-stage .char-grid, .home-stage .gold-rail, .home-stage .path-grid, .home-stage .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.home-stage .ucp, .home-stage .wiki-layout, .home-stage .read-layout, .home-stage .auth-layout, .home-stage .item-sheet, .home-stage .cart-layout, .home-stage .daily-now { grid-template-columns: minmax(0, 1fr); }
.home-stage .page-head { padding-top: 0; }
.home-copy h1 { font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1.2; margin: 0 0 18px; }
.home-prose { font-size: 1.05rem; line-height: 1.7; color: #f3eee4; }
.home-prose p, .home-prose li { max-width: none; }
.home-prose > :first-child { margin-top: 0; }
.home-prose h2, .home-prose h3, .home-prose h4 { font-family: var(--display); font-weight: 560; letter-spacing: .02em; line-height: 1.25; color: var(--gold); }
.home-prose h2 { font-size: 1.45rem; margin: 1.5em 0 .45em; }
.home-prose h3 { font-size: 1.18rem; margin: 1.25em 0 .35em; }
.home-prose h4 { font-size: 1.05rem; margin: 1.1em 0 .3em; }
.home-prose p { margin: 0 0 .9em; }
.home-prose ul, .home-prose ol { margin: 0 0 1em; padding-left: 1.25em; }
.home-prose li { margin: .28em 0; }
.home-prose li p { margin: 0; }
.home-prose blockquote { margin: 1.1em 0 1.2em; padding: 12px 16px; border-left: 3px solid var(--gold); background: rgba(0,0,0,.28); border-radius: 0 12px 12px 0; }
.home-prose blockquote p { margin: 0; }
.who-board { padding: 18px 20px 20px; }
.who-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.who-head strong { font-family: var(--display); font-size: 1.7rem; color: var(--gold); line-height: 1; }
.who-empty { margin: 14px 0 4px; padding: 22px 16px; text-align: center; border: 1px dashed rgba(255,255,255,.18); border-radius: 12px; }
.who-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.who-card { min-width: 0; display: grid; grid-template-columns: 62px 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.28); box-shadow: inset 3px 0 0 var(--class, var(--gold)); }
.who-level { width: 62px; height: 62px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid var(--class, var(--gold)); background: radial-gradient(circle at 40% 30%, rgba(255,255,255,.16), rgba(0,0,0,.45)); }
.who-level b { font-family: var(--display); font-size: 1.35rem; line-height: 1; color: var(--class, var(--ink)); font-weight: 560; }
.who-level small { margin-top: 2px; font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.who-card h3 { margin: 0; font-family: var(--display); font-size: 1.2rem; font-weight: 560; letter-spacing: .04em; color: var(--class, var(--ink)); }
.who-card p { margin: 3px 0 0; color: var(--muted); font-size: .95rem; }
.who-card .realm { margin-top: 5px; color: var(--gold); letter-spacing: .16em; font-size: .72rem; text-transform: uppercase; }
.status-rail article, .metric, .panel, .card, .item-card, .thread, .post, .event-card {
  background: rgba(8, 6, 14, .5);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  box-shadow: none;
}
.status-rail article { padding: 16px 18px; }
.status-rail span, .metric span, .eyebrow { display: block; color: var(--muted); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.status-rail strong, .metric strong { display: block; font-family: var(--display); font-size: 1.35rem; margin-top: 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: #e15b5b; box-shadow: 0 0 0 4px rgba(225, 91, 91, .15); }
.dot.on { background: #5ddea2; box-shadow: 0 0 0 4px rgba(93, 222, 162, .15); }

.section { margin: 34px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 1.8rem; }
.section-head h2, .panel h1, .page-head h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.panel.home-copy h1 { font-size: clamp(1.7rem, 3vw, 2.45rem); line-height: 1.2; margin: 0 0 18px; max-width: none; }
.grid-3, .grid-2, .shop-grid, .event-grid { display: grid; gap: 16px; }
.grid-3, .shop-grid { grid-template-columns: repeat(3, 1fr); }
.grid-2, .event-grid { grid-template-columns: repeat(2, 1fr); }
.panel { padding: 26px; }
.card { overflow: hidden; }
.card img.cover, .banner { width: 100%; height: 190px; object-fit: cover; display: block; }
.card .pad, .event-card { padding: 18px; }
.news-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); text-decoration: none; color: var(--ink); }
.news-row:hover { color: var(--gold); }
.meta, .muted { color: var(--muted); }

.item-card { display: flex; flex-direction: column; gap: 8px; min-height: 168px; padding: 16px; }
.item-head { display: flex; gap: 14px; align-items: flex-start; }
.item-ico { width: 44px; height: 44px; border-radius: 8px; background: rgba(0,0,0,.35); object-fit: cover; flex: none; }
.item-ico.lg { width: 68px; height: 68px; }
.item-card.q-2 { box-shadow: inset 3px 0 0 #1eff00; }
.item-card.q-3 { box-shadow: inset 3px 0 0 #0070dd; }
.item-card.q-4 { box-shadow: inset 3px 0 0 #a335ee; }
.item-card.q-5 { box-shadow: inset 3px 0 0 #ff8000; }
.item-card.q-6, .item-card.q-7 { box-shadow: inset 3px 0 0 #e6cc80; }
.wh-item { display: flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 650; min-height: 56px; }
.wh-item img { width: 52px; height: 52px; border-radius: 10px; background: #120e18; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.price { font-family: var(--display); color: var(--gold); font-size: 1.05rem; }
.banner-wide { width: 100%; height: 240px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 16px; }
.event-strip { margin: 16px 0; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.4); }
.prose p, .prose li { max-width: 72ch; }
.prose a { color: var(--gold); }

form.stack, .stack { display: flex; flex-direction: column; gap: 12px; }
.field, label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: .92rem; }
.field-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.flash { padding: 12px 14px; border-radius: 12px; margin: 12px 0; }
.flash.ok { background: rgba(80, 160, 110, .22); border: 1px solid rgba(183, 240, 210, .3); }
.flash.bad { background: rgba(160, 50, 50, .28); border: 1px solid rgba(255, 180, 180, .3); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: middle; }
.footer { margin-top: 48px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.footer-captcha { grid-column: 1 / -1; position: relative; width: 170px; height: 42px; }
.footer-captcha .grecaptcha-badge { position: absolute !important; left: 0 !important; top: 0 !important; right: auto !important; bottom: auto !important; z-index: 1; transform: scale(0.62); transform-origin: top left; box-shadow: none !important; }
.footer strong { color: var(--ink); font-family: var(--display); letter-spacing: .08em; }

.acp { display: grid; grid-template-columns: 250px 1fr; gap: 22px; padding: 22px 0 40px; }
.side { padding: 14px; position: sticky; top: 96px; align-self: start; }
.side .group { margin: 14px 10px 6px; color: var(--muted); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.side a { display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); border-left: 2px solid transparent; }
.side a.active, .side a:hover { background: rgba(231, 201, 138, .1); color: var(--gold); border-left-color: var(--gold); }
.metric { padding: 18px; }
.metric strong { font-size: 2rem; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 18px; }
.locale-switch { margin-top: 8px; }
.locale-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 8px; }
.translate-row { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.locale-tabs button { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 6px 10px; cursor: pointer; }
.locale-tabs button.on { background: rgba(231, 201, 138, .16); color: var(--gold); border-color: var(--gold); }
.locale-pane { display: none; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; }
.locale-pane.on { display: block; }
.check-list { display: grid; gap: 8px; }
.check-list label, .stack .tick { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; color: var(--ink); }
.stack .tick input, .check-list input, .form-row .tick input { width: auto; flex: none; }
.account-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.account-facts div { padding: 12px 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(0,0,0,.22); }
.account-facts span { display: block; color: var(--muted); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.account-facts strong { display: block; margin-top: 4px; color: var(--ink); font-weight: 650; word-break: break-all; }
.account-grid { grid-template-columns: 1fr 1fr; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.account-sheet > .btn { align-self: flex-start; }
.account-sheet h2 { margin: 8px 0 0; font-size: 1.2rem; }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.theme-pick label { padding: 16px; border-radius: 14px; border: 1px solid var(--line); min-height: 110px; }
.theme-pick label strong { color: var(--ink); font-family: var(--display); }
.pager { margin-top: 14px; }

.decor-snow { background-image: radial-gradient(circle, rgba(255,255,255,.75) 1px, transparent 1.5px); background-size: 140px 180px; }
.decor-lights .top { box-shadow: inset 0 -6px 0 #b43333, inset 0 -12px 0 #1d7a3a; }
.decor-confetti .event-strip { background: linear-gradient(90deg, rgba(120,20,40,.75), rgba(20,40,90,.75)); }
.decor-flags .event-strip { background: linear-gradient(90deg, #111, #dd0000 30%, #f0c400 70%, #111); }
.decor-lanterns .event-strip { background: radial-gradient(circle at 12% 50%, #ffb347, transparent 42%), rgba(40, 16, 0, .7); }
.decor-hearts .event-strip { background: linear-gradient(90deg, rgba(90,10,30,.85), rgba(40,8,20,.85)); }
.decor-brew .event-strip { background: linear-gradient(90deg, #3a2412, #6b3e16); }
.decor-wreath .event-strip { background: linear-gradient(90deg, #102416, #1d3a28); }
.decor-boots .event-strip { background: linear-gradient(90deg, #2a120c, #5a2a16); }
.decor-fireworks .event-strip { background: radial-gradient(circle at 20% 40%, #ffe38a, transparent 30%), #120818; }
.decor-eggs .hero h1 { text-shadow: 0 0 18px rgba(243, 201, 107, .45); }

.page-head { padding: 28px 0 8px; max-width: none; }
.page-head h1 { font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.05; margin: 0 0 10px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); margin: 22px 0 0; font-size: .92rem; }
.crumbs a { color: var(--gold); text-decoration: none; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 18px 0; }
.facts div { padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.facts dt { color: var(--muted); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; font-family: var(--display); font-size: 1.15rem; }
.ucp { display: grid; grid-template-columns: 240px 1fr; gap: 22px; padding: 22px 0 40px; }
.char-grid, .gold-rail, .file-grid, .path-grid { display: grid; gap: 14px; }
.char-grid, .gold-rail, .path-grid { grid-template-columns: repeat(3, 1fr); }
.file-grid { grid-template-columns: repeat(2, 1fr); }
.path-grid a { text-decoration: none; color: inherit; }
.path-grid a:hover { border-color: var(--gold); }
.shop-bar { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.chips a.on, .chips a:hover { color: var(--gold); border-color: var(--gold); background: rgba(231,201,138,.1); }
.chips a.q-2.on { box-shadow: inset 0 -2px 0 #1eff00; }
.chips a.q-3.on { box-shadow: inset 0 -2px 0 #0070dd; }
.chips a.q-4.on { box-shadow: inset 0 -2px 0 #a335ee; }
.chips a.q-5.on { box-shadow: inset 0 -2px 0 #ff8000; }
.item-sheet, .cart-layout, .read-layout, .auth-layout, .wiki-layout, .daily-now { display: grid; gap: 18px; margin: 18px 0 36px; }
.item-sheet, .cart-layout, .auth-layout { grid-template-columns: 1.4fr .8fr; }
.read-layout, .wiki-layout, .daily-now { grid-template-columns: 1fr 280px; }
.daily-now { grid-template-columns: 320px 1fr; align-items: start; }
.wiki-layout { grid-template-columns: 240px 1fr; }
.toc { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.toc a { text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 10px; }
.toc a.active, .toc a:hover { color: var(--gold); background: rgba(231,201,138,.1); }
.wiki-card, .news-card { display: block; text-decoration: none; color: inherit; margin-bottom: 12px; }
.wiki-card h2, .news-card h2 { margin: 0 0 8px; font-size: 1.45rem; }
.prose-sheet h1 { margin-top: 0; }
.price.big { font-size: 2rem; }
.forum-table { padding: 8px; }
.forum-row, .forum-head { display: grid; grid-template-columns: 1.6fr .7fr .5fr 1fr; gap: 12px; align-items: center; padding: 14px 12px; text-decoration: none; color: inherit; border-bottom: 1px solid rgba(255,255,255,.08); }
.forum-head { color: var(--muted); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.forum-row strong { display: block; color: var(--ink); }
.forum-row em { display: block; color: var(--muted); font-style: normal; }
.forum-row:hover strong { color: var(--gold); }
.forum-row .mark { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); border: 1px solid var(--line); color: var(--gold); }
.boards .forum-row { grid-template-columns: 46px 1.6fr .45fr .45fr 1.1fr; }
.stat { color: var(--muted); font-size: .85rem; }
.stat b { display: block; color: var(--ink); font-family: var(--display); font-size: 1.2rem; }
.pin { color: var(--gold); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; margin-right: 6px; }
.speech { display: grid; grid-template-columns: 180px 1fr; gap: 16px; margin: 0 0 12px; }
.speech aside, .compose { background: rgba(8, 6, 14, .5); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; }
.speech aside { padding: 16px; }
.speech .prose, .compose { padding: 16px 18px; }
.compose { margin: 18px 0 36px; }
.pad { padding: 8px 12px 16px; }
.steps { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(8, 6, 14, .5); }
.steps strong { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; font-family: var(--display); color: #1c1408; background: linear-gradient(180deg, #f0d7a4, #c4924e); }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.calendar article { min-height: 64px; padding: 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(8, 6, 14, .5); }
.calendar span { color: var(--muted); font-size: .8rem; }
.calendar strong { display: block; color: var(--gold); }
.calendar .today { border-color: var(--gold); }
.calendar .claimed { background: rgba(80, 160, 110, .18); }
.calendar em { font-style: normal; color: var(--ok); font-size: .75rem; }
.vote-list { display: flex; flex-direction: column; gap: 12px; margin: 18px 0 36px; }
.vote-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.vote-action { text-align: right; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline article { display: grid; grid-template-columns: 120px 1fr; gap: 16px; }
.timeline time { color: var(--gold); font-family: var(--display); padding-top: 16px; }
.timeline h3, .timeline h2 { margin: 0 0 6px; }
.timeline article > div { border-left: 1px solid var(--line); padding: 12px 0 18px 16px; }
.timeline.dim { opacity: .72; }
.timeline.log article > div { border-left: 0; padding: 0 0 16px; }
.news-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }
.file-card h2 { margin-top: 0; }
.langform { display: flex; align-items: center; gap: 6px; margin: 0; }
.btn.danger { color: var(--danger); border-color: rgba(255, 180, 180, .45); }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.cookiebar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); z-index: 70; display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 16px; background: rgba(8, 6, 14, .92); border: 1px solid rgba(255,255,255,.16); }
.cookiebar p { margin: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 36px; }
.gallery-grid figure { margin: 0; background: rgba(8, 6, 14, .5); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; overflow: hidden; }
.gallery-grid img { display: block; width: 100%; height: 180px; object-fit: cover; }
.gallery-grid figcaption { padding: 10px 12px; }
.section-form { margin-top: 16px; }
.wh-filters { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 22px; align-items: start; }
.wh-main { display: flex; flex-direction: column; gap: 12px; }
.wh-main > label, .wh-selects label, .chest-pop label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: .78rem; letter-spacing: .03em; }
.wh-filters input, .wh-filters select, .chest-pop input, .chest-pop select {
  width: 100%; height: 36px; padding: 6px 10px; border-radius: 8px;
  background: rgba(0, 0, 0, .45); color: var(--ink); border: 1px solid rgba(255,255,255,.18);
}
.wh-range { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; }
.wh-range span { width: 148px; flex: none; }
.wh-range input { width: 84px; flex: none; }
.wh-range em { color: var(--gold); font-style: normal; }
.wh-selects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.wh-actions { display: flex; gap: 8px; align-items: center; }
.wh-quality { margin: 0; padding: 0 0 0 16px; border: 0; border-left: 1px solid rgba(255,255,255,.12); }
.wh-quality legend { color: var(--muted); font-size: .78rem; margin-bottom: 8px; }
.wh-quality label { display: flex; align-items: center; gap: 8px; margin: 2px 0; cursor: pointer; font-weight: 700; font-size: .95rem; }
.wh-quality input { width: 14px; height: 14px; accent-color: var(--gold); }
.qcol-0 { color: #9d9d9d; } .qcol-1 { color: #fff; } .qcol-2 { color: #1eff00; }
.qcol-3 { color: #0070dd; } .qcol-4 { color: #a335ee; } .qcol-5 { color: #ff8000; }
.qcol-any { color: var(--muted); font-weight: 600; }
.chest-fab { position: fixed; right: 16px; bottom: 16px; z-index: 75; width: 132px; height: 132px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.chest-fab img { width: 132px; height: 132px; object-fit: contain; mix-blend-mode: screen; filter: drop-shadow(0 10px 18px rgba(0,0,0,.65)); }
dialog.chest-pop { width: min(680px, calc(100% - 28px)); max-height: min(82vh, 820px); overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: rgba(8, 6, 14, .5); color: var(--ink); padding: 18px 20px 22px; }
dialog.chest-pop::backdrop { background: rgba(0, 0, 0, .82); }
.chest-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chest-head h2, .chest-pop h3 { font-family: var(--display); margin: 0; }
.chest-pop .won { color: var(--gold); }
.loot-scroll { max-height: 240px; overflow: auto; margin-top: 8px; padding-right: 6px; }
.loot-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .95rem; }
pre, code { font-family: ui-monospace, monospace; }
.db-set { margin: 16px 0; padding: 8px 14px 2px; border: 1px solid rgba(201, 168, 106, .35); border-radius: 12px; }
.db-set legend { padding: 0 8px; color: #e4c47a; }

@media (max-width: 1280px) {
  .brand span { display: none; }
  .home-board { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(220px, 260px); gap: 16px; }
}

@media (max-width: 1100px) {
  .shell { width: min(100% - 28px, 1680px); }
  .home-board { grid-template-columns: 1fr 1fr; grid-template-areas: "side who" "text text"; }
  .home-who .who-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; margin-left: 0; order: 2; }
  .bar { flex-wrap: wrap; gap: 10px; }
  .brand { flex: 1 1 auto; }
  .nav { display: none; flex: 1 1 100%; flex-direction: column; order: 4; width: 100%; padding: 4px 0 8px; }
  body.nav-open .nav { display: flex; }
  .nav > a, .nav .menu > button { width: 100%; text-align: left; padding: 12px 4px; min-height: 44px; }
  .nav .menu { width: 100%; }
  .nav .drop { position: static; width: 100%; min-width: 0; }
  .nav .menu:hover > .drop { display: none; }
  .nav .menu.open > .drop, .nav .menu:focus-within > .drop { display: flex; }
  .tools { order: 3; flex: 1 1 100%; justify-content: flex-end; flex-wrap: wrap; }
}

@media (max-width: 860px) {
  .status-rail, .grid-3, .grid-2, .shop-grid, .event-grid, .acp, .metrics, .field-grid, .footer, .theme-pick, .ucp, .char-grid, .gold-rail, .file-grid, .path-grid, .item-sheet, .cart-layout, .read-layout, .auth-layout, .wiki-layout, .daily-now, .vote-card, .speech, .forum-row, .boards .forum-row, .timeline article, .gallery-grid, .cookiebar, .perm-grid, .account-grid, .facts { display: flex; flex-direction: column; }
  .who-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wh-filters, .wh-selects { grid-template-columns: 1fr; }
  .wh-quality { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; }
  .wh-range { flex-wrap: wrap; }
  .wh-range span, .wh-range input { width: auto; flex: 1 1 120px; }
  .calendar { grid-template-columns: repeat(4, 1fr); }
  .side, .toc { position: static; }
  .side { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .side .group { grid-column: 1 / -1; }
  .panel:has(> .table), form:has(.table) { overflow-x: auto; }
  .hero, .page-head { max-width: none; }
  .panel { padding: 18px; }
  input, select, textarea { font-size: 16px; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 20px, 1680px); }
  .home-board { grid-template-columns: 1fr; grid-template-areas: "side" "text" "who"; gap: 14px; }
  .home-who .who-grid, .who-grid { grid-template-columns: 1fr; }
  .status-line { align-items: flex-start; }
  .brand img { width: 40px; height: 40px; }
  .brand strong { font-size: 1rem; letter-spacing: .08em; }
  .tools .btn.small { padding: 8px 10px; }
  .hero-frame { height: clamp(210px, 56vw, 320px); }
  .hero-caption { padding: 28px 52px 48px; }
  .hero-caption h2 { font-size: 1.35rem; }
  .hero-nav { width: 40px; height: 40px; }
  .home-copy h1, .panel.home-copy h1 { font-size: 1.55rem; }
  .calendar { grid-template-columns: repeat(2, 1fr); }
  .cookiebar { left: 10px; right: 10px; width: auto; transform: none; }
  .chest-fab, .chest-fab img { width: 84px; height: 84px; }
  body { padding-bottom: 88px; }
  .footer { padding-bottom: 28px; }
}
.qr-code { width: 196px; margin: 12px 0; background: #fff; border-radius: 12px; padding: 8px; }
.qr-code svg { display: block; width: 180px; height: 180px; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; padding: 0; list-style: none; }
.recovery-codes code { display: block; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.06); }
