/* Gekido SMP — "Glyphwork at night".
   Colours and frames are taken from the in-game Glyphwork menus: plum panels, brass frames,
   teal glyph gems at the corners, crimson only for danger. No webfonts (privacy + speed). */

:root {
  --void: #0b0812;
  --night: #0f0b17;
  --plum-1: #160f22;
  --plum-2: #1c1530;
  --plum-3: #241b38;
  --plum-4: #31244a;
  --plum-5: #43345f;
  --brass-dim: #8a6420;
  --brass: #c79a3e;
  --brass-hi: #ecc66a;
  --teal: #2ec4b6;
  --teal-hi: #7ee8dd;
  --teal-deep: #1f5c5a;
  --crimson: #c4465d;
  --crimson-deep: #5a2430;
  --ember: #ff7a1a;
  --text: #efe8f7;
  --text-2: #c9bedb;
  --muted: #a99cbf;
  --line: rgba(199, 154, 62, .28);

  --f-display: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --f-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

  --r: 3px;
  --gap: clamp(16px, 3vw, 28px);
  --max: 1180px;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 400 1rem/1.6 var(--f-ui); color: var(--text); background: var(--night);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(46, 196, 182, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(199, 154, 62, .07), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: auto, auto, 24px 24px, 24px 24px;
  background-attachment: fixed;
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--teal-hi); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--teal-deep); color: #fff; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.15; letter-spacing: .01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--f-mono); font-size: .9em; background: var(--plum-1); border: 1px solid var(--line); padding: .05em .4em; border-radius: var(--r); color: var(--brass-hi); }
.muted { color: var(--muted); }
.lead { font-size: 1.12rem; color: var(--text-2); }
.kicker {
  display: inline-flex; align-items: center; gap: .55em; font: 600 .74rem/1 var(--f-mono);
  letter-spacing: .18em; text-transform: uppercase; color: var(--brass-hi);
}
.kicker::before, .kicker.both::after { content: ""; width: 6px; height: 6px; background: var(--teal); transform: rotate(45deg); box-shadow: 0 0 8px var(--teal); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--teal); color: var(--void); padding: .6em 1em; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.section { padding-block: clamp(48px, 8vw, 96px); }
.section-head { max-width: 720px; margin-bottom: clamp(24px, 4vw, 40px); }
.section-head.center { margin-inline: auto; text-align: center; }
.brass-text {
  background: linear-gradient(180deg, #fff3cf 0%, var(--brass-hi) 38%, var(--brass) 70%, #8f6625 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ------------------------------------------------------------------ frame: the Glyphwork panel */
.frame {
  position: relative; background: linear-gradient(180deg, var(--plum-3), var(--plum-2));
  border: 1px solid var(--brass-dim);
  box-shadow: inset 0 0 0 1px var(--void), inset 0 0 0 2px rgba(236, 198, 106, .10), var(--shadow);
  border-radius: var(--r); padding: clamp(18px, 2.6vw, 26px);
}
.frame::before, .frame::after {
  content: ""; position: absolute; top: -5px; width: 9px; height: 9px; transform: rotate(45deg);
  background: linear-gradient(135deg, var(--teal-hi), var(--teal) 55%, var(--teal-deep));
  box-shadow: 0 0 0 1px var(--void), 0 0 10px rgba(46, 196, 182, .55);
}
.frame::before { left: -5px; }
.frame::after { right: -5px; }
.frame.plain::before, .frame.plain::after { display: none; }
.frame.lift { transition: transform .18s ease, border-color .18s ease; }
.frame.lift:hover { transform: translateY(-3px); border-color: var(--brass); }
.slot { background: var(--void); border: 1px solid var(--brass-dim); box-shadow: inset 0 2px 10px rgba(0, 0, 0, .6); border-radius: 2px; }
.slot-teal { border-color: var(--teal-deep); }

/* ------------------------------------------------------------------ buttons, chips, tabs */
.btn {
  --b: var(--brass-dim); --bg: var(--plum-4); --fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 44px;
  padding: .6em 1.15em; font: 600 .95rem/1.1 var(--f-ui); color: var(--fg); text-decoration: none; cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 100%, #fff 8%), var(--bg));
  border: 1px solid var(--b); border-radius: var(--r);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12), 0 6px 18px -8px rgba(0, 0, 0, .8);
  transition: filter .15s ease, transform .15s ease, border-color .15s;
}
.btn:hover { filter: brightness(1.15); color: var(--fg); border-color: var(--brass); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; filter: none; }
.btn-teal { --b: var(--teal); --bg: var(--teal-deep); --fg: #eafffb; }
.btn-gold { --b: var(--brass-hi); --bg: #6b4e1c; --fg: #fff6dc; }
.btn-ghost { --bg: transparent; --b: var(--line); box-shadow: none; }
.btn-sm { min-height: 36px; padding: .45em .8em; font-size: .85rem; }
.btn svg { width: 18px; height: 18px; flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: .35em; padding: .22em .6em; font: 600 .7rem/1.2 var(--f-mono);
  letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line); color: var(--text-2);
  background: var(--plum-1); border-radius: 2px; white-space: nowrap;
}
.chip-new, .chip-gold { color: var(--brass-hi); border-color: var(--brass-dim); }
.chip-fixed, .chip-teal, .chip-done, .chip-fixedinnext { color: var(--teal-hi); border-color: var(--teal-deep); }
.chip-nether, .chip-danger { color: #ffb08a; border-color: #7a3417; background: #2a120b; }
.chip-mock { color: #ffd2dc; border-color: var(--crimson-deep); background: #2a1219; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab {
  padding: .5em .95em; min-height: 40px; display: inline-flex; align-items: center; font: 600 .85rem/1 var(--f-ui);
  color: var(--text-2); text-decoration: none; background: var(--plum-2); border: 1px solid var(--plum-5);
  border-radius: 2px; cursor: pointer;
}
.tab:hover { color: #fff; border-color: var(--brass-dim); }
.tab[aria-selected="true"], .tab.on { color: #eafffb; background: var(--teal-deep); border-color: var(--teal); box-shadow: 0 0 14px -4px var(--teal); }

/* ------------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(11, 8, 18, .94), rgba(15, 11, 23, .86));
  border-bottom: 1px solid var(--line);
}
.site-head::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 9px; height: 9px; transform: translateX(-50%) rotate(45deg); background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.head-row { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.brand img { width: 38px; height: 38px; }
.brand b { font: 700 1.25rem/1 var(--f-display); letter-spacing: .04em; }
.brand small { display: block; font: 600 .62rem/1.4 var(--f-mono); letter-spacing: .2em; color: var(--brass-hi); text-transform: uppercase; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav a { display: block; padding: .55em .7em; color: var(--text-2); text-decoration: none; font-size: .92rem; font-weight: 500; border-radius: 2px; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.nav a[aria-current="page"] { color: var(--brass-hi); box-shadow: inset 0 -2px 0 var(--brass); }
.head-cta { display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; }
@media (max-width: 1080px) {
  .head-cta .ip-mini { display: none; }
}
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; margin-left: auto; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; margin: 0; background: var(--night); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .nav a { padding: .8em .6em; border-bottom: 1px solid rgba(255, 255, 255, .04); }
  .no-js .nav { position: static; display: block; background: none; border: 0; }
  .no-js .nav ul { flex-direction: row; flex-wrap: wrap; padding: 0; }
  .no-js .menu-btn { display: none; }
  .head-cta .btn-discord span { display: none; }
}
@media (max-width: 900px) { .no-js .head-row { flex-wrap: wrap; padding-block: 8px; } }
@media (max-width: 600px) { .head-cta { display: none; } }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 9vw, 110px) clamp(40px, 7vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .25em; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.hero h1 .brass-text { filter: drop-shadow(0 2px 14px rgba(236, 198, 106, .2)); }
.hero .lead { max-width: 560px; font-size: clamp(1.05rem, 1.6vw, 1.22rem); }
.hero-emblem { position: relative; justify-self: center; width: min(100%, 420px); aspect-ratio: 1; }
.hero-emblem img { width: 100%; height: 100%; filter: drop-shadow(0 30px 60px rgba(46, 196, 182, .18)); animation: float 9s ease-in-out infinite; }
.hero-emblem::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(46, 196, 182, .28), transparent 65%); filter: blur(10px); }
@keyframes float { 50% { transform: translateY(-10px); } }
.ip-box { display: flex; align-items: stretch; gap: 0; margin: 26px 0 14px; max-width: 520px; }
.ip-box .slot { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: .55em 1em; min-width: 0; }
.ip-box .slot small { font: 600 .66rem/1.2 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ip-box .slot strong { font: 700 clamp(1.05rem, 2.6vw, 1.45rem)/1.3 var(--f-mono); color: var(--teal-hi); letter-spacing: .02em; overflow-wrap: anywhere; }
.ip-box .btn { border-radius: 0 var(--r) var(--r) 0; margin-left: -1px; min-width: 120px; }
.status-pill { display: inline-flex; align-items: center; gap: .6em; padding: .45em .9em; font: 600 .85rem/1 var(--f-mono); background: var(--plum-1); border: 1px solid var(--line); border-radius: 2px; color: var(--text-2); }
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status-pill[data-state="online"] .dot { background: var(--teal); box-shadow: 0 0 0 0 rgba(46, 196, 182, .6); animation: pulse 2s infinite; }
.status-pill[data-state="offline"] .dot { background: var(--crimson); }
.status-pill b { color: #fff; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(46, 196, 182, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 196, 182, 0); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; padding: 0; list-style: none; color: var(--muted); font-size: .9rem; }
.hero-facts li::before { content: "◆"; color: var(--teal); margin-right: .5em; font-size: .7em; vertical-align: .15em; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-emblem { order: -1; width: min(60vw, 240px); }
}

/* ------------------------------------------------------------------ banners */
.event-banner {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  background: linear-gradient(100deg, #2a120b, #3a1a10 40%, var(--plum-2)); border-color: #8a3a16;
}
.event-banner .ico { width: 48px; height: 48px; display: grid; place-items: center; background: #1a0905; border: 1px solid #8a3a16; color: var(--ember); }
.event-banner h2 { font-size: 1.3rem; margin: 0 0 .15em; }
.event-banner p { margin: 0; color: #f3d6c8; }
.event-banner .count { font: 700 1.1rem/1.2 var(--f-mono); color: #ffcf9e; text-align: right; }
@media (max-width: 700px) { .event-banner { grid-template-columns: auto 1fr; } .event-banner .count { grid-column: 1 / -1; text-align: left; } }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--crimson-deep); background: #1d0f16; color: #ffdbe3; border-radius: var(--r); }
.notice.teal { border-color: var(--teal-deep); background: #0d1d1f; color: #d6fbf6; }
.notice svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.notice p { margin: 0; }

/* ------------------------------------------------------------------ grids, feature cards */
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.feat h3 { display: flex; align-items: center; gap: 12px; margin-bottom: .4em; }
.feat p { color: var(--text-2); margin: 0; font-size: .96rem; }
.ico-box { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: var(--void); border: 1px solid var(--brass-dim); color: var(--brass-hi); border-radius: 2px; }
.ico-box svg { width: 24px; height: 24px; }
.ico-box.teal { color: var(--teal-hi); border-color: var(--teal-deep); }
.ico-box.ember { color: var(--ember); border-color: #7a3417; }
.feat ul { margin: .8em 0 0; padding-left: 1.1em; color: var(--text-2); font-size: .92rem; }
.feat ul li::marker { color: var(--teal); }
.feat-wide { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
@media (max-width: 760px) { .feat-wide { grid-template-columns: 1fr; } }

/* pillars: the four promises */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pillars > div { background: var(--plum-1); padding: 22px; }
.pillars b { display: block; font: 700 1.05rem/1.3 var(--f-display); color: var(--brass-hi); margin-bottom: .3em; }
.pillars p { margin: 0; color: var(--text-2); font-size: .92rem; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .pillars { grid-template-columns: 1fr; } }

/* join steps */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.steps li { counter-increment: step; position: relative; padding-top: 38px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 30px; height: 30px; display: grid; place-items: center;
  font: 700 .95rem/1 var(--f-mono); color: var(--void); background: var(--brass-hi); transform: rotate(45deg);
}
.steps li::after { content: ""; }
.steps h3 { font-size: 1.08rem; }
.steps p { color: var(--text-2); margin: 0; font-size: .94rem; }

/* news */
.news-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: .6em; margin-bottom: .8em; }
.news-head h3 { margin: 0; font-size: 1.3rem; }
.news-head time { font: 600 .8rem/1 var(--f-mono); color: var(--muted); }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.news-list li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: baseline; color: var(--text-2); }
.news-list li .chip { justify-content: center; }
.news-list li:not(:has(.chip)) { grid-template-columns: 1fr; color: var(--muted); font-style: italic; margin-top: 6px; }
@media (max-width: 520px) { .news-list li { grid-template-columns: 1fr; gap: 4px; } .news-list li .chip { justify-self: start; } }

/* ------------------------------------------------------------------ page head */
.page-head { padding-block: clamp(36px, 6vw, 64px) clamp(16px, 3vw, 28px); }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: .2em; }
.page-head .lead { max-width: 720px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 18px; }

/* ------------------------------------------------------------------ tables (leaderboards) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.board { width: 100%; border-collapse: collapse; font-size: .95rem; }
.board th { text-align: left; font: 600 .7rem/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: .7em .8em; border-bottom: 1px solid var(--line); }
.board td { padding: .7em .8em; border-bottom: 1px solid rgba(255, 255, 255, .05); vertical-align: middle; }
.board tbody tr:hover { background: rgba(46, 196, 182, .05); }
.board .rank { width: 56px; font: 700 1rem/1 var(--f-mono); color: var(--muted); }
.board tr:nth-child(1) .rank { color: var(--brass-hi); }
.board tr:nth-child(2) .rank { color: #d8d8e6; }
.board tr:nth-child(3) .rank { color: #d68a52; }
.board .who { display: flex; align-items: center; gap: 10px; }
.board .who a { color: var(--text); font-weight: 600; text-decoration: none; }
.board .who a:hover { color: var(--teal-hi); text-decoration: underline; }
.board .num { font-family: var(--f-mono); color: var(--brass-hi); white-space: nowrap; }
.head-img { width: 28px; height: 28px; image-rendering: pixelated; background: var(--plum-4); border: 1px solid var(--brass-dim); flex: none; }
.podium { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.champ { text-align: center; }
.champ img { width: 72px; height: 72px; image-rendering: pixelated; border: 1px solid var(--brass); background: var(--void); }
.champ b { display: block; margin-top: .5em; font: 700 1.05rem/1.2 var(--f-display); }
.champ span { display: block; font: 600 .8rem/1.4 var(--f-mono); color: var(--muted); }
.champ .num { color: var(--brass-hi); }

/* states */
.state { padding: 28px; text-align: center; color: var(--muted); }
.state b { display: block; color: var(--text); font-family: var(--f-display); font-size: 1.15rem; margin-bottom: .3em; }
.skeleton { background: linear-gradient(90deg, var(--plum-2), var(--plum-3), var(--plum-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 2px; min-height: 1em; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ profile */
.search { display: flex; gap: 0; max-width: 520px; }
.search input { flex: 1; min-width: 0; min-height: 48px; padding: .6em 1em; font: 600 1rem/1 var(--f-mono); color: var(--text); background: var(--void); border: 1px solid var(--brass-dim); border-right: 0; border-radius: var(--r) 0 0 var(--r); }
.search input::placeholder { color: #7d7092; }
.search .btn { border-radius: 0 var(--r) var(--r) 0; }
.profile { display: grid; grid-template-columns: 260px 1fr; gap: var(--gap); align-items: start; }
.profile .avatar { display: grid; place-items: center; padding: 18px; background: radial-gradient(circle at 50% 60%, #183b40, var(--void) 70%); }
.profile .avatar img { width: 100%; max-width: 200px; image-rendering: pixelated; }
.profile h2 { margin: .5em 0 .1em; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.stat { padding: 12px 14px; background: var(--plum-1); border: 1px solid var(--plum-5); }
.stat small { display: block; font: 600 .66rem/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat b { font: 700 1.3rem/1.3 var(--f-mono); color: var(--brass-hi); }
.skill-bars { display: grid; gap: 10px; margin-top: 8px; }
.skill-bar { display: grid; grid-template-columns: 120px 1fr 52px; gap: 10px; align-items: center; font-size: .92rem; }
.skill-bar .bar { height: 10px; background: var(--void); border: 1px solid var(--plum-5); position: relative; }
.skill-bar .bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--teal-deep), var(--teal)); box-shadow: 0 0 10px -2px var(--teal); }
.skill-bar span:last-child { font-family: var(--f-mono); color: var(--brass-hi); text-align: right; }
@media (max-width: 760px) { .profile { grid-template-columns: 1fr; } .profile .avatar img { max-width: 140px; } }

/* ------------------------------------------------------------------ store */
.store-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--gap); align-items: start; }
.store-cat { margin-bottom: clamp(32px, 5vw, 56px); }
.store-cat-head { margin-bottom: 18px; }
.store-cat-head h2 { font-size: 1.6rem; margin-bottom: .15em; }
.grid-pkg { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.pkg { display: flex; flex-direction: column; gap: 14px; }
.pkg h3 { font-size: 1.3rem; margin: .35em 0 .2em; }
.pkg .muted { font-size: .92rem; margin: 0; }
.pkg .perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .92rem; color: var(--text-2); flex: 1; }
.pkg .perks li { padding-left: 1.3em; position: relative; }
.pkg .perks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 6px; height: 6px; background: var(--teal); transform: rotate(45deg); }
.pkg-buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.price { display: flex; align-items: center; gap: 8px; }
.price-val { font: 700 1.3rem/1 var(--f-mono); color: #fff; }
.pkg.tier-1 { border-color: #5b8a86; }
.pkg.tier-2 { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--void), 0 0 0 1px rgba(46, 196, 182, .15), 0 20px 50px -20px rgba(46, 196, 182, .35); }
.pkg.tier-3 { border-color: #8b6ad6; }
.pkg.tier-4 { border-color: var(--brass-hi); background: linear-gradient(180deg, #2f2340, var(--plum-2)); }
.cart { position: sticky; top: 92px; }
.cart h2 { font-size: 1.3rem; }
.cart ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.cart li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; font-size: .92rem; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.cart .rm { background: none; border: 0; color: var(--muted); cursor: pointer; min-width: 32px; min-height: 32px; font-size: 1.1rem; }
.cart .rm:hover { color: var(--crimson); }
.cart .total { display: flex; justify-content: space-between; font: 700 1.05rem/1 var(--f-mono); margin: 12px 0 16px; }
.cart .btn { width: 100%; }
@media (max-width: 980px) { .store-layout { grid-template-columns: 1fr; } .cart { position: static; } }
.redeem-steps { counter-reset: r; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.redeem-steps li { counter-increment: r; display: grid; grid-template-columns: 28px 1fr; gap: 10px; color: var(--text-2); }
.redeem-steps li::before { content: counter(r); width: 26px; height: 26px; display: grid; place-items: center; font: 700 .8rem/1 var(--f-mono); color: var(--teal-hi); border: 1px solid var(--teal-deep); }
dialog.modal { width: min(100% - 32px, 572px); padding: 6px; border: 0; background: transparent; color: var(--text); overflow-x: hidden; overflow-y: auto; }
dialog.modal::backdrop { background: rgba(5, 3, 9, .75); backdrop-filter: blur(3px); }
dialog.modal .frame { padding: 26px; }
dialog.modal label { display: block; font: 600 .72rem/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
dialog.modal input[type=text] { width: 100%; min-height: 46px; padding: .5em .8em; font: 600 1rem/1 var(--f-mono); color: var(--text); background: var(--void); border: 1px solid var(--brass-dim); border-radius: var(--r); }
dialog.modal input[aria-invalid=true] { border-color: var(--crimson); }
.field-error { color: #ff9fb1; font-size: .85rem; margin-top: 6px; min-height: 1.2em; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ issues */
.issue { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; }
.issue h3 { margin: 0; font-size: 1.05rem; font-family: var(--f-ui); }
.issue .meta { font: 500 .78rem/1.4 var(--f-mono); color: var(--muted); }
.issue .id { font: 700 .85rem/1 var(--f-mono); color: var(--muted); }
@media (max-width: 600px) { .issue { grid-template-columns: 1fr; gap: 6px; } }
.issue-list { display: grid; gap: 10px; }

/* ------------------------------------------------------------------ wiki + prose */
.wiki-layout { display: grid; grid-template-columns: 250px 1fr; gap: var(--gap); align-items: start; }
.wiki-nav { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; font-size: .92rem; }
.wiki-nav ul { list-style: none; margin: 0; padding: 0; }
.wiki-nav > ul > li { margin-bottom: 16px; }
.wiki-nav li ul { margin-top: 6px; border-left: 1px solid var(--line); }
.wiki-nav li ul a { display: block; padding: .3em .8em; color: var(--text-2); text-decoration: none; }
.wiki-nav li ul a:hover { color: #fff; background: rgba(255, 255, 255, .03); }
.wiki-cat { margin-bottom: 40px; }
.wiki-cat > h2 { font-size: 1.6rem; margin-bottom: .1em; }
.wiki-page { margin-top: 18px; }
.wiki-page h3 { font-size: 1.3rem; }
.wiki-page .lead { font-size: 1rem; }
.wiki-body p { color: var(--text-2); }
.wiki-body strong { color: #fff; }
mark.warn { background: none; color: #ff9fb1; font-weight: 600; }
.related { font-size: .9rem; margin: 0; border-top: 1px solid var(--line); padding-top: 10px; }
.wiki-search { max-width: 100%; margin-bottom: 16px; }
@media (max-width: 860px) { .wiki-layout { grid-template-columns: 1fr; } .wiki-nav { position: static; max-height: none; } .wiki-nav > ul { columns: 2; } }
.prose { max-width: 780px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { color: var(--text-2); }
.prose .placeholder { color: var(--brass-hi); font-family: var(--f-mono); font-size: .92em; }
.rule { display: grid; grid-template-columns: 54px 1fr; gap: 16px; }
.rule .n { font: 700 1.6rem/1 var(--f-display); color: var(--brass-hi); }
.rule h3 { margin-bottom: .3em; }
.rule p { margin: 0; color: var(--text-2); }
.rule .cons { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ footer */
.site-foot { margin-top: 40px; border-top: 1px solid var(--line); background: var(--void); padding-block: 36px 28px; font-size: .9rem; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.site-foot h2 { font: 600 .72rem/1.3 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--brass-hi); margin-bottom: 10px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-foot a { color: var(--text-2); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .05); font-size: .8rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------------ toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 90; padding: .8em 1.2em; background: var(--teal-deep); color: #eafffb; border: 1px solid var(--teal); box-shadow: var(--shadow); font-weight: 600; transition: transform .25s ease; max-width: calc(100% - 32px); }
.toast:not(.show) { visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
.toast.show { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ no-JS + small states */
.no-js .js-only, .no-js .pkg-buy .btn, .no-js .cart .btn { display: none !important; }
.vote-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.vote-list .btn { width: 100%; justify-content: space-between; }
.event-banner .count a { color: #ffcf9e; }
.price-val.soon { font-size: .95rem; color: var(--brass-hi); letter-spacing: .06em; text-transform: uppercase; }
