:root {
  --bg: #16121c; --card: #1f1a27; --card2: #28212f; --line: #342b3d; --text: #f1e9de; --muted: #a99fae;
  --accent: #f46a1f; --ok: #3fbf74; --red: #e0394a; --grad: linear-gradient(90deg, #d7263d, #f46a1f 55%, #fdb43a);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f6f2ec; --card: #fff; --card2: #f3ede6; --line: #e5ddd3; --text: #1b1622; --muted: #6f6575;
    --accent: #d9530e; --ok: #23935a; --red: #c62839; color-scheme: light; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }
svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 12px max(16px, calc(50% - 540px));
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; letter-spacing: -.01em; }
.brand img { border-radius: 8px; }
.links { display: flex; gap: 18px; margin-left: auto; color: var(--muted); font-weight: 600; font-size: .95rem; }
.links a:hover { color: var(--text); }
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .55em 1.05em; border-radius: 10px; font-weight: 700; font-size: .92rem;
  background: var(--card2); box-shadow: inset 0 0 0 1px var(--line); transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn.panel { background: var(--grad); color: #fff; box-shadow: none; }

main { width: min(1080px, 100%); margin: 0 auto; padding: 28px 16px 40px; }

.server-tag { display: flex; align-items: center; gap: 14px; max-width: 560px; margin: 0 auto; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.server-tag img { border-radius: 8px; image-rendering: pixelated; }
.st-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.st-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-state { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.server-tag.on .dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
.server-tag.on .st-state { color: var(--ok); }
.server-tag.off .dot { background: var(--red); } .server-tag.off .st-state { color: var(--red); }
.st-players { display: flex; flex-direction: column; align-items: center; padding-left: 14px; border-left: 1px solid var(--line); line-height: 1.2; }
.st-players b { font-size: 1.4rem; } .st-players small { color: var(--muted); font-size: .72rem; }

.hero { text-align: center; padding: 56px 0 36px; }
.hero-logo { width: min(520px, 90%); margin-bottom: 28px; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.lead { max-width: 640px; margin: 0 auto 20px; color: var(--muted); font-size: 1.08rem; }
.lead b { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { padding: .3em .9em; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: .88rem; font-weight: 600; }

section { scroll-margin-top: 80px; }
.section-title { font-size: 1.6rem; margin-top: 48px; position: relative; padding-bottom: 10px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; border-radius: 2px; background: var(--grad); }
.section-sub { color: var(--muted); margin-top: -4px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.kicker { font-size: .78rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.project-head { display: flex; gap: 22px; align-items: center; margin-bottom: 20px; }
.project-head p { margin: 0; color: var(--muted); }
.project-logo { width: 120px; flex: none; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--card2); }
.video video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.next { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--card2); }
.next div { display: flex; flex-direction: column; line-height: 1.3; } .next span { color: var(--muted); font-size: .9rem; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.plugin { display: flex; flex-direction: column; }
.plugin-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.plugin-head img { border-radius: 14px; } .plugin-head h3 { margin: 0; }
.shot { border-radius: 12px; border: 1px solid var(--line); }
.plugin p { color: var(--muted); flex: 1; } .plugin p b { color: var(--text); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.soon { font-size: .8rem; color: var(--muted); padding: .35em .8em; border-radius: 99px; border: 1px dashed var(--line); }

.foot { text-align: center; padding: 36px 16px 44px; border-top: 1px solid var(--line); }
.by { margin: 0 0 12px; color: var(--muted); } .by b { color: var(--text); }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.socials a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  color: var(--muted); transition: color .15s, border-color .15s, transform .15s; }
.socials a:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.small { font-size: .8rem; color: var(--muted); margin: 0; }

@media (max-width: 760px) {
  .links { display: none; }
  .grid { grid-template-columns: 1fr; }
  .project-head { flex-direction: column; text-align: center; }
  .hero { padding: 40px 0 24px; }
  .top { backdrop-filter: none; background: var(--bg); }
  .st-text small { white-space: normal; }
}

/* ---------- UltraWiki ---------- */
svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.wiki { color: var(--accent); }
.links a.on { color: var(--text); }
.link { color: var(--accent); font-weight: 700; }
.center { text-align: center; }
.ver { font-size: .55em; font-weight: 700; color: var(--muted); background: var(--card2); border: 1px solid var(--line);
  padding: .15em .55em; border-radius: 99px; vertical-align: middle; }
.hero.small { padding: 40px 0 28px; }
.hero.small h1 { display: inline-flex; align-items: center; gap: 12px; }
.hero.small h1 svg { width: 1em; height: 1em; color: var(--accent); }
.wiki-card { display: flex; gap: 18px; align-items: flex-start; transition: border-color .15s, transform .15s; }
.wiki-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.wiki-card img { border-radius: 16px; flex: none; }
.wiki-card h3 { margin-bottom: 2px; }
.wiki-card p { color: var(--muted); margin: 6px 0 10px; }

.wiki-page { width: min(1180px, 100%); }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--accent); font-weight: 600; } .crumbs span { margin: 0 4px; }
.wiki-head { display: flex; gap: 22px; align-items: center; margin-bottom: 26px; }
.wiki-head img { border-radius: 20px; flex: none; }
.wiki-head h1 { margin: 2px 0 6px; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.wiki-head p { color: var(--muted); margin: 0 0 12px; }
.wiki-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 34px; align-items: start; }
.toc { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; font-size: .9rem; }
.toc summary { font-weight: 700; cursor: pointer; margin-bottom: 8px; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 5px 10px; color: var(--muted); border-radius: 6px; margin-left: -2px; border-left: 2px solid transparent; }
.toc li a:hover { color: var(--text); border-left-color: var(--accent); }

.prose { font-size: 1.02rem; line-height: 1.75; min-width: 0; }
.prose > p:first-child { font-size: 1.12rem; color: var(--text); }
.prose h2 { font-size: 1.55rem; margin: 2.2em 0 .6em; padding-top: .6em; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.prose h2:first-of-type { margin-top: 1em; }
.prose h3 { font-size: 1.18rem; margin: 1.6em 0 .5em; scroll-margin-top: 80px; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; } .prose li { margin: .3em 0; }
.prose strong { color: var(--text); }
.prose code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88em; background: var(--card2);
  border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px; }
.prose pre { background: #0f0c13; color: #e9e1d6; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow: auto; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; font-size: .86rem; color: inherit; }
.prose img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); margin: 1.2em 0 .4em; }
.prose img + em, .prose p:has(> img) + p > em:only-child { display: block; text-align: center; color: var(--muted); font-size: .9rem; }
.prose blockquote { margin: 1.3em 0; padding: 12px 16px; border-radius: 12px; border-left: 4px solid var(--muted); background: var(--card); }
.prose blockquote p { margin: .3em 0; }
.prose blockquote.nota { border-left-color: #4f8cff; background: color-mix(in srgb, #4f8cff 10%, var(--card)); }
.prose blockquote.consejo { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--card)); }
.prose blockquote.importante { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.tabla { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--card2); font-weight: 700; color: var(--text); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

@media (max-width: 900px) {
  .wiki-body { grid-template-columns: 1fr; gap: 10px; }
  .toc { position: static; max-height: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
  .toc details:not([open]) summary { margin-bottom: 0; }
}
@media (max-width: 760px) {
  .btn.panel { margin-left: auto; }
  .wiki-head { flex-direction: column; text-align: center; }
  .wiki-head .actions { justify-content: center; }
  .wiki-card { flex-direction: column; }
}
.hero.small .kicker { display: block; margin-bottom: 6px; }
.wiki-home .grid + .section-sub { margin-top: 22px; }
