/* SPTS Wiki: dark "superpower" theme. Colours as tokens; stat colours match the in-game stat identity loosely. */
:root {
  --bg: #0d0b1a;
  --bg-2: #141127;
  --panel: #1a1631;
  --panel-2: #221d3f;
  --line: #2e2852;
  --text: #ece9ff;
  --muted: #a39dc7;
  --accent: #ffcb2f;
  --accent-2: #ff6a2a;
  --violet: #8b5cf6;
  --link: #9fc4ff;
  --link-missing: #ff8a8a;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --fs: #ff5a5a;
  --bt: #ffb020;
  --ms: #3dd6ff;
  --jf: #6ee86e;
  --pp: #c084fc;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bebas Neue", "Impact", "Arial Narrow", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(139, 92, 246, .22), transparent 60%),
    radial-gradient(900px 400px at -10% 10%, rgba(255, 106, 42, .12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.65 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a.missing { color: var(--link-missing); }
img { max-width: 100%; height: auto; }
code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: .05em .35em; font-size: .9em; }
pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: .88em; }
pre code { background: none; border: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.sr, .skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 100; left: 12px; top: 12px; width: auto; height: auto; clip: auto; background: var(--accent); color: #000; padding: 8px 12px; border-radius: 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- admin bar + top bar */
.adminbar {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
  padding: 6px 16px; font-size: .85rem;
  background: linear-gradient(90deg, #3b1d8f, #5b21b6); color: #f3eaff;
}
.adminbar a, .adminbar .linklike { color: #fff; }
.adminbar form { margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }

.sitehead {
  position: sticky; top: 0; z-index: 30;
  background: rgba(13, 11, 26, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px 6px;
  max-width: 1300px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-text { display: flex; align-items: baseline; gap: 6px; font-family: var(--display); letter-spacing: .04em; line-height: 1; }
.brand-main {
  font-size: 1.9rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { font-size: 1.4rem; color: var(--text); }

.search { display: flex; flex: 1; max-width: 520px; margin-left: auto; }
.search input {
  flex: 1; min-width: 0;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-right: 0;
  border-radius: 999px 0 0 999px; padding: 9px 16px; font: inherit;
}
.search button {
  border: 1px solid var(--line); border-radius: 0 999px 999px 0;
  background: var(--panel-2); color: var(--text); padding: 0 14px; cursor: pointer;
}
.search button:hover { background: var(--violet); }
.search-big { max-width: 640px; margin: 0 0 1rem; }
.search-big .btn { border-radius: 0 999px 999px 0; }

.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-btn span:not(.sr) { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }

/* ---------- top menu (Fandom-style bar with dropdowns) */
.mainnav { max-width: 1300px; margin: 0 auto; padding: 0 12px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.nav-list > li { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 12px 11px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font: 600 .9rem var(--font); letter-spacing: .01em;
  border-bottom: 2px solid transparent; text-decoration: none !important; white-space: nowrap;
}
.nav-link:hover, .dd.open > .nav-link, .dd:focus-within > .nav-link { color: var(--text); }
.nav-link.active { color: var(--text); border-bottom-color: var(--accent); }
.nav-tool { color: var(--accent); }
.chev { transition: transform .15s; opacity: .8; }
.dd.open .chev { transform: rotate(180deg); }
.dd-menu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 40;
  min-width: 230px; max-height: 70vh; overflow-y: auto;
  padding: 6px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.dd-right .dd-menu { left: auto; right: 0; }
.dd.open > .dd-menu { display: block; }
@media (hover: hover) and (min-width: 961px) {
  .dd:hover > .dd-menu { display: block; }
  .dd:hover .chev { transform: rotate(180deg); }
}
.dd-menu a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--text); font-size: .92rem; }
.dd-menu a:hover { background: var(--panel-2); text-decoration: none; }
.dd-menu a.active { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.dd-menu .dd-all { color: var(--accent); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; margin-bottom: 4px; }

.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-btn span:not(.sr) { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }

.main { flex: 1; width: 100%; max-width: 1300px; margin: 0 auto; padding: 28px 32px 60px; }

.footer {
  border-top: 1px solid var(--line);
  padding: 20px; text-align: center; color: var(--muted); font-size: .82rem;
  background: var(--bg-2);
}
.footer p { max-width: 900px; margin: .4rem auto; }

/* ---------- buttons, flash, cards */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font: 600 .95rem var(--font); cursor: pointer; text-decoration: none !important;
}
.btn:hover { border-color: var(--violet); }
.btn-primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #1a0d00; border: 0; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; border-color: var(--err); color: var(--err); }
.btn-danger:hover { background: var(--err); color: #200; }
.btn-small { padding: 5px 12px; font-size: .82rem; }

.flash { padding: 10px 14px; border-radius: 10px; margin: 0 0 16px; border: 1px solid; }
.flash-ok { border-color: var(--ok); background: rgba(52, 211, 153, .1); }
.flash-error { border-color: var(--err); background: rgba(248, 113, 113, .1); }
.flash-warn { border-color: var(--warn); background: rgba(251, 191, 36, .1); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.tag {
  display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 1px 8px; vertical-align: middle;
}

/* ---------- home */
.hero {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center;
  padding: 32px; margin-bottom: 28px;
  border-radius: 22px; border: 1px solid var(--line);
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(255, 203, 47, .16), transparent 70%),
    linear-gradient(135deg, #1f1840, #130f28);
  box-shadow: var(--shadow);
}
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--accent); margin: 0 0 6px; font-weight: 700; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; letter-spacing: .02em; margin: 0 0 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.stat-chip, .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem;
  border: 1px solid currentColor; background: rgba(255, 255, 255, .03);
}
.fs { color: var(--fs); } .bt { color: var(--bt); } .ms { color: var(--ms); } .jf { color: var(--jf); } .pp { color: var(--pp); }
.hero-stats .stat-chip { box-shadow: 0 0 18px -6px currentColor; }

.home-intro { margin-bottom: 24px; }
.portal { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.portal-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; position: relative; overflow: hidden;
}
.portal-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--violet), var(--accent)); }
.portal-card h2 { font-family: var(--display); font-weight: 400; letter-spacing: .04em; font-size: 1.6rem; margin: 0 0 2px; }
.portal-card h2 a { color: var(--text); }
.portal-card p { margin: 0 0 10px; font-size: .9rem; }
.portal-card ul { margin: 0; padding-left: 1.1em; }
.portal-card li { margin: 2px 0; }
.portal-card .more { color: var(--muted); }

/* ---------- article */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.article-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.article-head h1, .main > h1 {
  font-family: var(--display); font-weight: 400; letter-spacing: .03em;
  font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1.05; margin: 0;
}
.main > h1 { margin-bottom: 12px; }
.article-tools { display: flex; gap: 8px; margin-left: auto; }
.lead { font-size: 1.1rem; color: #d6d1f5; margin: 8px 0 18px; }
.article-foot { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--line); }

.toc {
  float: right; clear: right; width: 240px; margin: 0 0 16px 24px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: .88rem;
}
.toc summary { cursor: pointer; font-weight: 700; }
.toc ol { list-style: none; margin: 8px 0 0; padding: 0; }
.toc li { margin: 3px 0; }
.toc .toc-l3 { padding-left: 14px; }

.prose { max-width: 860px; }
.narrow-prose { max-width: 720px; }
.prose h2, .prose h3, .prose h4 { line-height: 1.25; margin: 1.8em 0 .5em; }
.prose h2 { font-family: var(--display); font-weight: 400; letter-spacing: .04em; font-size: 1.9rem; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.prose h3 { font-size: 1.2rem; }
.prose h4 { font-size: 1rem; color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 3px 0; }
.prose strong { color: #fff; }

.table-wrap { overflow-x: auto; margin: 1em 0 1.4em; border-radius: 12px; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--panel-2); font-weight: 700; white-space: nowrap; }
tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .02); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(139, 92, 246, .08); }
.t-center { text-align: center; } .t-right { text-align: right; }
td:empty::after { content: "\00a0"; }   /* an empty cell keeps the height of one line of text */
table.t-grouped tbody td { border-bottom: 0; }
table.t-grouped tbody td { vertical-align: middle; }
table.t-grouped tbody tr.row-gap td { padding: 0; height: 18px; line-height: 0; font-size: 0; }
table.t-grouped tbody tr:nth-child(even) td { background: none; }
table.t-grouped tbody tr.row-gap td { background: rgba(139, 92, 246, .16); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); }
table.t-grouped tbody tr.row-gap:hover td { background: rgba(139, 92, 246, .16); }
tbody tr.row-split td { border-top: 3px solid rgba(139, 92, 246, .6); }   /* | --- | row in a table */

.infobox {
  float: right; clear: right; width: 290px; margin: 0 0 18px 24px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: .9rem;
  box-shadow: var(--shadow);
}
.infobox-title { font-family: var(--display); letter-spacing: .05em; font-size: 1.4rem; text-align: center; padding: 8px 12px; background: linear-gradient(90deg, #3b1d8f, #6d28d9); }
.infobox img { display: block; width: 100%; }
.infobox table { font-size: .88rem; }
.infobox th { width: 42%; color: var(--muted); font-weight: 600; background: none; white-space: normal; }

.box { border-radius: 12px; padding: 12px 16px; margin: 1em 0; border: 1px solid; }
.box > :first-child { margin-top: 0; } .box > :last-child { margin-bottom: 0; }
.box-title { font-weight: 700; margin-bottom: 4px; }
.box-note { border-color: var(--line); background: var(--panel); }
.box-tip { border-color: rgba(52, 211, 153, .6); background: rgba(52, 211, 153, .08); }
.box-tip .box-title { color: var(--ok); }
.box-warning { border-color: rgba(248, 113, 113, .6); background: rgba(248, 113, 113, .08); }
.box-warning .box-title { color: var(--err); }

.related { clear: both; margin-top: 32px; }
.related h2 { font-family: var(--display); font-weight: 400; letter-spacing: .04em; font-size: 1.6rem; margin: 0 0 12px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.related-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text);
}
.related-card span { color: var(--muted); font-size: .85rem; line-height: 1.45; }
.related-card:hover { border-color: var(--violet); text-decoration: none; transform: translateY(-1px); }

.results { padding-left: 1.2em; }
.results li { margin: 0 0 14px; }
.results a { font-weight: 600; font-size: 1.05rem; }
.results p { margin: 2px 0 0; }

/* ---------- forms */
.narrow { max-width: 420px; }
.form { display: flex; flex-direction: column; gap: 14px; margin: 16px 0; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .9rem; }
.form h2 { margin: 0; font-size: 1.15rem; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: 400 .95rem var(--font); width: 100%;
}
textarea { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .25); }
.form-row { display: flex; flex-wrap: wrap; gap: 14px; }
.form-row > label { flex: 0 0 auto; min-width: 160px; }
.form-row > .grow { flex: 1 1 260px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.preview { border: 2px dashed var(--violet); border-radius: 14px; padding: 18px 22px; margin: 14px 0 24px; }
.preview-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--violet); font-weight: 700; }
.help { margin-top: 16px; }
.help summary { cursor: pointer; font-weight: 600; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.danger-zone { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }

/* ---------- calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 18px 0 28px; }
.calc-inputs { display: flex; flex-direction: column; gap: 12px; }
.calc-inputs label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .9rem; }
.stat-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stat-pick legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.stat-pick .chip { cursor: pointer; flex-direction: row; font-size: .85rem; padding: 6px 12px; opacity: .65; }
.stat-pick .chip:has(input:checked) { opacity: 1; background: rgba(255, 255, 255, .07); box-shadow: 0 0 14px -4px currentColor; }
.stat-pick input { accent-color: currentColor; margin: 0; }
.calc-out { display: flex; flex-direction: column; gap: 14px; }
.calc-req { color: var(--warn); font-size: .9rem; min-height: 1.2em; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.calc-grid div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.calc-grid dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.calc-grid dd { margin: 0; font-family: var(--display); font-size: 2rem; letter-spacing: .03em; color: var(--accent); line-height: 1.1; }
.calc-goal { font-size: 1.05rem; }
.calc-goal strong { color: var(--accent); font-size: 1.3rem; }
.calc-next { color: var(--muted); font-size: .9rem; }

/* ---------- small screens */
@media (max-width: 960px) {
  .menu-btn { display: block; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .mainnav { display: none; padding: 0 12px 12px; max-height: calc(100vh - 62px); overflow-y: auto; }
  .mainnav.open { display: block; }
  body.menu-open { overflow: hidden; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { width: 100%; justify-content: space-between; padding: 12px 8px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-link.active { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--accent); }
  .dd-menu { position: static; box-shadow: none; border: 0; background: none; max-height: none; padding: 4px 0 8px 12px; }
  .main { padding: 18px 16px 48px; }
  .hero { grid-template-columns: 1fr; padding: 22px 18px; }
  .hero-stats { justify-content: flex-start; }
  .calc, .two-col, .help-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .toc, .infobox { float: none; width: 100%; margin: 0 0 16px; }
  .brand-text { display: none; }
  .article-tools { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- admin panel */
.maint-badge { background: var(--err); color: #200 !important; font-weight: 800; padding: 1px 8px; border-radius: 999px; text-decoration: none !important; }
.status-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; border: 1px solid; margin: 14px 0 18px; }
.status-strip .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; flex-shrink: 0; }
.status-strip.is-open { border-color: rgba(52, 211, 153, .5); background: rgba(52, 211, 153, .08); }
.status-strip.is-open .dot { color: var(--ok); }
.status-strip.is-maint { border-color: rgba(248, 113, 113, .6); background: rgba(248, 113, 113, .1); }
.status-strip.is-maint .dot { color: var(--err); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; color: var(--text); }
.tile:hover { border-color: var(--violet); text-decoration: none; }
.tile-num { font-family: var(--display); font-size: 2.4rem; line-height: 1; color: var(--accent); }
.tile-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.admin-grid .card h2 { font-family: var(--display); font-weight: 400; letter-spacing: .04em; font-size: 1.6rem; margin: 0 0 4px; }
#maintenance { grid-column: 1 / -1; }
.timer-pick { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.timer-pick legend { font-weight: 600; font-size: .9rem; padding: 0 6px; }
.form label.radio { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; flex-wrap: wrap; }
.form label.radio input[type=radio], .form label.radio input[type=checkbox] { width: auto; accent-color: var(--accent); }
.radio-inline select, .radio-inline input[type=datetime-local] { width: auto; }
input[type=datetime-local] { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font: 400 .95rem var(--font); }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list .small { margin-left: auto; }

/* ---------- announcement banner */
.announce-bar { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; align-items: baseline; padding: 10px 16px; text-align: center;
  background: linear-gradient(90deg, rgba(255, 203, 47, .16), rgba(255, 106, 42, .16)); border-bottom: 1px solid rgba(255, 203, 47, .35); }
.announce-bar strong { color: var(--accent); }

/* ---------- maintenance page */
.maint-body { justify-content: flex-start; }
.maint { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.maint-card {
  width: 100%; max-width: 620px; text-align: center; padding: 36px 30px 26px;
  border-radius: 24px; border: 1px solid var(--line);
  background: radial-gradient(420px 220px at 50% 0%, rgba(255, 203, 47, .14), transparent 70%), linear-gradient(160deg, #1f1840, #130f28);
  box-shadow: var(--shadow), 0 0 80px -30px rgba(139, 92, 246, .7);
}
.maint-bolt img { filter: drop-shadow(0 0 22px rgba(255, 203, 47, .55)); animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.maint-card h1 { font-family: var(--display); font-weight: 400; letter-spacing: .03em; font-size: clamp(2.4rem, 7vw, 3.4rem); line-height: 1; margin: 4px 0 12px; }
.maint-msg { color: #d6d1f5; font-size: 1.05rem; margin: 0 auto 22px; max-width: 480px; }
.countdown-box { border: 1px solid rgba(255, 203, 47, .35); background: rgba(255, 203, 47, .06); border-radius: 16px; padding: 16px 18px; margin-bottom: 18px; }
.countdown-label { font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.countdown { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.countdown span { min-width: 72px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px 6px; display: flex; flex-direction: column; }
.countdown b { font-family: var(--display); font-weight: 400; font-size: 2.4rem; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(255, 203, 47, .45); }
.countdown i { font-style: normal; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.countdown.done { font-family: var(--display); font-size: 2rem; color: var(--accent); }
.countdown-unknown { font-family: var(--display); font-size: 2rem; letter-spacing: .04em; }
.countdown-at { margin-top: 8px; }
.maint-announce { text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; }
.maint-announce-title { font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.maint-announce p { margin: 0; }
.maint-foot { margin: 8px 0 0; }
@media (max-width: 480px) { .countdown span { min-width: 60px; } .countdown b { font-size: 2rem; } .maint-card { padding: 28px 18px 20px; } }

/* ---------- roles, team, submissions */
.role-badge { display: inline-block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; line-height: 1.4; }
.role-owner { color: #ffcb2f; } .role-admin { color: #ff6a6a; } .role-moderator { color: #3dd6ff; } .role-editor { color: #6ee86e; }
.adminbar .role-badge { color: #fff; border-color: rgba(255, 255, 255, .6); }
.count { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 999px; background: var(--err); color: #200; font-size: .75rem; font-weight: 800; text-align: center; }
.team-section { margin-top: 32px; }
.team-head h2 { font-family: var(--display); font-weight: 400; letter-spacing: .04em; font-size: 2rem; margin: 0; }
.team-head p { margin: 0 0 14px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.member { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.member.role-owner { border-color: rgba(255, 203, 47, .45); box-shadow: 0 0 24px -12px #ffcb2f; }
.avatar { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 1.6rem; color: #1a0d00;
  background: linear-gradient(135deg, currentColor, #8b5cf6); }
.member-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; color: var(--text); }
.member-text strong { overflow-wrap: anywhere; }
.submit-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 16px; padding: 16px 18px; border-radius: 14px;
  border: 1px dashed rgba(255, 203, 47, .45); background: rgba(255, 203, 47, .05); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tabs a.active { background: var(--panel-2); color: var(--text); border-color: var(--violet); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.sub { margin-bottom: 12px; }
.sub-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.sub-when { margin-left: auto; }
.sub-msg { white-space: normal; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }
.sub-done { opacity: .75; } .sub-rejected { opacity: .6; }
.sub-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sub-actions input[type=text] { flex: 1 1 220px; width: auto; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form select { width: auto; padding: 5px 8px; }
.tile-alert { border-color: rgba(248, 113, 113, .6); }
.tile-alert .tile-num { color: var(--err); }

/* ---------- home: main column + staff box top right */
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.home-main > .hero { margin-bottom: 24px; }
.home-side { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 14px; }
/* staff box: same look as the section cards on the home page */
.staff-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 10px; position: relative; overflow: hidden; }
.staff-box::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--violet), var(--accent)); }
.staff-box h2 { font-family: var(--display); font-weight: 400; letter-spacing: .04em; font-size: 1.6rem; margin: 0 0 2px; }
.staff-box > p { margin: 0 0 10px; font-size: .9rem; }
.staff-group { margin-bottom: 10px; }
.staff-group h3 { margin: 0 0 2px; font-size: .95rem; font-weight: 700; color: currentColor; }
.staff-group ul { margin: 0; padding-left: 1.1em; }
.staff-group li { margin: 2px 0; color: var(--text); }
.staff-group li::marker { color: currentColor; }
.staff-group .bio { display: block; color: var(--muted); font-size: .82rem; line-height: 1.3; }
.side-cta { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 14px 16px; border-radius: 14px;
  border: 1px dashed rgba(255, 203, 47, .45); background: rgba(255, 203, 47, .05); }
@media (max-width: 1100px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

/* ---------- "new SPTS only" note in the hero */
.edition-note { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid rgba(61, 214, 255, .45); background: rgba(61, 214, 255, .08); font-size: .92rem; color: #d6d1f5; }
.edition-note strong { color: #7fe3ff; }

/* ---------- removal requests: screenshot upload + proof in the admin view */
input[type=file] { background: var(--bg-2); color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 12px; font: 400 .9rem var(--font); width: 100%; cursor: pointer; }
input[type=file]::file-selector-button { margin-right: 12px; padding: 6px 14px; border-radius: 999px; border: 0; cursor: pointer; font: 600 .85rem var(--font);
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #1a0d00; }
input[type=email], input[type=url] { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: 400 .95rem var(--font); width: 100%; }
.file-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.file-preview:empty { display: none; }
.file-preview figure { margin: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.file-preview img { display: block; width: 100%; height: 90px; object-fit: cover; }
.file-preview figcaption { font-size: .72rem; color: var(--muted); padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-preview .bad { border-color: var(--err); }
.file-preview .bad figcaption { color: var(--err); }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.proof-grid img { display: block; width: 100%; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.proof-grid a:hover img { border-color: var(--violet); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; overflow-wrap: anywhere; }

/* ---------- images on pages, editor image tool, media page */
.prose img { border-radius: 12px; border: 1px solid var(--line); margin: 6px 0; }
.img-tool { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; background: var(--bg-2); }
.img-tool input[type=file] { width: auto; flex: 1 1 220px; padding: 6px; }
.img-tool input[type=text] { width: auto; flex: 1 1 200px; }
.img-tool [data-img-status] { flex-basis: 100%; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.media-item { margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.media-item img { display: block; width: 100%; height: 160px; object-fit: contain; background: var(--bg-2); border-radius: 10px; }
.media-item figcaption { display: flex; flex-direction: column; gap: 4px; }
.media-item .copy { cursor: pointer; overflow-wrap: anywhere; font-size: .75rem; }
.media-item .copy.copied { border-color: var(--ok); color: var(--ok); }
.media-item form { margin-top: 4px; }

/* ---------- picture slider (:::gallery) */
.gallery { position: relative; margin: 1.2em 0; max-width: 720px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.gallery-title { font-family: var(--display); letter-spacing: .05em; font-size: 1.4rem; padding: 8px 16px; background: linear-gradient(90deg, #3b1d8f, #6d28d9); }
.gallery-stage { position: relative; }
.js .gallery-slide { display: none; }
.js .gallery-slide[data-active] { display: block; animation: gfade .25s ease; }
@keyframes gfade { from { opacity: .3; } to { opacity: 1; } }
.gallery-slide img { display: block; width: 100%; height: clamp(220px, 45vw, 420px); object-fit: contain; background: #07060f; border: 0; border-radius: 0; margin: 0; }
.gallery-missing { height: clamp(220px, 45vw, 420px); display: grid; place-items: center; background: repeating-linear-gradient(45deg, #110e22, #110e22 14px, #161230 14px, #161230 28px); color: var(--muted); font-weight: 600; }
.gallery-slide figcaption { padding: 10px 16px 4px; text-align: center; font-weight: 700; font-size: 1.05rem; }
.gallery-num { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; margin-right: 6px; vertical-align: middle; }
.gallery-btn { display: none; position: absolute; top: calc(clamp(220px, 45vw, 420px) / 2 + var(--gt, 0px)); transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(13, 11, 26, .75); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.gallery:has(.gallery-title) { --gt: 47px; }
.js .gallery-btn { display: grid; place-items: center; }
.gallery-btn:hover { background: var(--violet); }
.gallery-btn.prev { left: 10px; } .gallery-btn.next { right: 10px; }
.gallery-dots { display: none; justify-content: center; gap: 6px; padding: 4px 0 12px; }
.js .gallery-dots { display: flex; }
.gallery-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: var(--line); cursor: pointer; }
.gallery-dots button[aria-current="true"] { background: var(--accent); }
.prose .gallery-slide img { border-radius: 0; }

/* ---------- game updates */
.update-index { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.update-index a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: .88rem; }
.update-index a:hover { border-color: var(--violet); text-decoration: none; }
.update { margin-bottom: 16px; scroll-margin-top: 130px; }
.update-latest { border-color: rgba(255, 203, 47, .5); box-shadow: 0 0 30px -16px #ffcb2f; }
.update-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.update-head h2 { font-family: var(--display); font-weight: 400; letter-spacing: .04em; font-size: 1.8rem; margin: 0; line-height: 1.1; }
.update-version { display: inline-block; font-family: var(--display); font-size: 1.1rem; letter-spacing: .05em; padding: 1px 10px; border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #1a0d00; }
.update-edit { margin-left: auto; }
.update .prose h2 { font-size: 1.4rem; margin-top: 1em; }
.tag-new { color: var(--accent); border-color: rgba(255, 203, 47, .5); }
.latest-update .latest-title { margin: 4px 0 0; }
.latest-update p { margin: 0 0 4px; }
.latest-update::before { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
input[type=date] { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 400 .95rem var(--font); }

/* ---- visitors page (wiki owner) */
.vrange { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.vrange a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: inherit; text-decoration: none; font-size: .9rem; }
.vrange a.on { background: rgba(139, 92, 246, .25); border-color: rgba(139, 92, 246, .7); }
.vdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); vertical-align: middle; }
.vdot-old { background: #8b5cf6; box-shadow: none; }
.vmap-card { margin: 16px 0; }
.vmap { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(139, 92, 246, .10), #05060d 80%); }
.vmap-svg { display: block; width: 100%; height: auto; }
.vmap-land path { fill: #141228; stroke: rgba(196, 181, 253, .22); stroke-width: .6; vector-effect: non-scaling-stroke; }
.vmap-land path.has { fill: #2a1f55; }
.vmap-land path:hover { fill: #3a2a72; }
.vmap-dots .dot circle { fill: rgba(139, 92, 246, .55); stroke: #c4b5fd; stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: pointer; }
.vmap-dots .dot.on circle { fill: rgba(52, 211, 153, .75); stroke: #a7f3d0; }
.vmap-dots .dot .ring { fill: none; stroke: #34d399; animation: vpulse 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes vpulse { from { transform: scale(1); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .vmap-dots .dot .ring { animation: none; } }
.vmap-tip { position: absolute; pointer-events: none; background: #0e0c1c; border: 1px solid rgba(139, 92, 246, .6); border-radius: 8px; padding: 5px 9px; font-size: .82rem; white-space: nowrap; }
.vmap-legend .vdot { margin-right: 2px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 16px 0; }
.vgrid .card h3 { margin: 14px 0 6px; font-size: .95rem; }
.vbar { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto; align-items: center; gap: 10px; margin: 5px 0; font-size: .9rem; }
.vbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vbar-track { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.vbar-fill { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #6d28d9, #a78bfa); }
.vbar-n { font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }

/* ---- team profiles */
.staff-link { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(255, 255, 255, .25); }
.staff-link:hover { color: #fff; border-bottom-color: currentColor; }
.avatar { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; flex: none; background: var(--panel-2); border: 1px solid var(--line); }
.avatar-big { width: 112px; height: 112px; border-radius: 24px; }
.avatar-letter { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; color: #fff; background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.avatar-letter.avatar-big { font-size: 3rem; }
.avatar-letter.role-owner { background: linear-gradient(135deg, #b45309, #fbbf24); }
.avatar-letter.role-admin { background: linear-gradient(135deg, #b91c1c, #f87171); }
.avatar-letter.role-moderator { background: linear-gradient(135deg, #1d4ed8, #60a5fa); }
.profile-head { display: flex; gap: 22px; align-items: center; margin: 8px 0 20px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); position: relative; overflow: hidden; }
.profile-head::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--violet), var(--accent)); }
.profile-head h1 { margin: 0 0 4px; }
.profile-head .lead { margin: 8px 0 0; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.profile-info dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.profile-info dt { color: var(--muted); }
.profile-info dd { margin: 0; overflow-wrap: anywhere; }
.profile-stats .stat-tiles { margin: 0; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.profile-about { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.copyable { cursor: pointer; border-bottom: 1px dotted var(--muted); }
.copyable.copied::after { content: " ✓ copied"; color: #34d399; font-size: .85em; }
.team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.team-card { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; }
.team-card:hover { border-color: var(--violet); text-decoration: none; }
.team-card-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
@media (max-width: 560px) { .profile-head { flex-direction: column; text-align: center; } }

/* ---- :::tabs blocks in pages */
.tabs { margin: 1em 0 1.6em; }
.tab-bar { display: none; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs-on .tab-bar { display: flex; }
.tab-btn { font: inherit; font-size: .9rem; font-weight: 700; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.tab-btn:hover { border-color: var(--violet); }
.tab-btn[aria-selected="true"] { background: linear-gradient(135deg, #6d28d9, #8b5cf6); border-color: #a78bfa; color: #fff; }
.tab-panel-title { font-weight: 800; font-size: 1.15rem; margin: 18px 0 6px; }
.tabs-on .tab-panel-title { display: none; }
.prose td img { max-height: 180px; width: auto; border-radius: 10px; display: block; }

/* ---- big picture viewer */
img.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; background: rgba(4, 3, 12, .92); }
.lightbox[hidden] { display: none; }
.lightbox img { height: calc(100vh - 90px); max-width: 96vw; width: auto; object-fit: contain; image-rendering: auto; border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.lightbox-cap { color: var(--text); font-size: .95rem; text-align: center; }
.lightbox-close { position: absolute; top: 14px; right: 18px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(20, 16, 40, .9); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.lightbox-close:hover { background: #7c3aed; }
html.lightbox-open { overflow: hidden; }
.file-preview .file-video { height: 90px; display: flex; align-items: center; justify-content: center; font-size: 2rem; background: #0c0a18; }
.sub-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 10px 0; }
.sub-files img, .sub-files video { display: block; width: 100%; max-height: 260px; object-fit: contain; background: #0c0a18; border: 1px solid var(--line); border-radius: 10px; }
