@font-face { font-family: "Golos Text"; font-weight: 400 600; font-display: swap; src: url(fonts/golos-text-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 400 600; font-display: swap; src: url(fonts/golos-text-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 500; font-display: swap; src: url(fonts/jetbrains-mono-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 500; font-display: swap; src: url(fonts/jetbrains-mono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Pixelify Sans"; font-weight: 600; font-display: swap; src: url(fonts/pixelify-sans-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Pixelify Sans"; font-weight: 600; font-display: swap; src: url(fonts/pixelify-sans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

:root {
  --ground: #15171a;
  --surface: #1e2125;
  --line: #30353b;
  --line-strong: #5a616a;
  --text: #ece8df;
  --muted: #a9adab;
  --accent: #f0a63a;
  --accent-hover: #f7b95e;
  --on-accent: #1c1305;
  --ok: #7fcf6e;
  --danger: #ef8d7c;
  --idle: #7a8088;
  --pixel: "Pixelify Sans", "Golos Text", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 16px/1.5 "Golos Text", system-ui, sans-serif; scrollbar-color: var(--line-strong) var(--ground); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
code { font-family: var(--mono); font-size: 0.92em; overflow-wrap: anywhere; }
small { display: block; font-size: 14px; color: var(--muted); }
[hidden] { display: none !important; }

.page { max-width: 1120px; margin: 0 auto; padding: 0 16px 64px; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.wordmark { font: 600 26px/1.2 var(--pixel); color: var(--text); text-decoration: none; }
.wordmark:hover { color: var(--accent-hover); }
.nav { display: flex; flex-wrap: wrap; gap: 0 22px; flex: 1 1 420px; }
.nav a { padding: 10px 0; color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.nav a[aria-current] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.me { display: flex; align-items: center; gap: 10px; }

.head { display: inline-block; flex: none; width: 28px; height: 28px; background-color: var(--line-strong); background-repeat: no-repeat; background-size: 224px auto; background-position: -28px -28px; image-rendering: pixelated; }
.head-large { width: 40px; height: 40px; background-size: 320px auto; background-position: -40px -40px; }

.split { display: flex; flex-wrap: wrap; gap: 40px 64px; padding-top: 48px; }
.split-hero { padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
.wide { flex: 999 1 520px; min-width: 0; }
.narrow { flex: 1 1 320px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 28px; }
.stack-tight { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; }
p + .row { margin-top: 14px; }
.narrow-page { max-width: 460px; margin: 48px auto 0; }

h1, h2, h3, h4, p { margin: 0; }
.page-title { font: 600 clamp(34px, 5vw, 52px)/1.1 var(--pixel); margin-top: 40px; margin-bottom: 12px; }
.section { font-size: 24px; font-weight: 600; line-height: 1.25; margin-bottom: 20px; }
.split .section:not(:first-child), .prose-page .section:not(:first-child) { margin-top: 40px; }
.label { font-size: 15px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.muted { color: var(--muted); }
.ok { color: var(--ok); font-size: 14px; margin: 2px 0 14px; }
.warn { color: var(--accent); font-size: 14px; margin: 2px 0 14px; }
.hint { margin-top: 14px; font-size: 14px; color: var(--muted); }

.status-line { display: flex; align-items: center; gap: 16px; }
.status-line h1 { font: 600 clamp(38px, 6vw, 72px)/1.05 var(--pixel); }
.block { flex: none; width: 20px; height: 20px; background: var(--idle); }
.block-running { background: var(--ok); }
.block-starting { background: var(--accent); }
.block-unreachable { background: var(--danger); }
.status-sub { margin-top: 14px; font-size: 19px; color: var(--muted); }
.players { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 32px; }
.players li { display: flex; align-items: center; gap: 12px; }
.players strong { display: block; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-top: 32px; }
.action { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; font: inherit; font-weight: 500; color: var(--text); text-decoration: none; background: transparent; border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer; transition: background-color 120ms ease-out, border-color 120ms ease-out; }
.btn:hover { color: var(--text); background: var(--surface); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn-primary { font-weight: 600; color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { color: var(--on-accent); background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { color: var(--danger); }
.btn:disabled { color: var(--muted); background: transparent; border-color: var(--line); cursor: not-allowed; transform: none; }
.link { min-height: 44px; padding: 0; font: inherit; color: var(--muted); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--text); }
.icon { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--text); background: transparent; border: 0; cursor: pointer; }
.icon:hover { color: var(--accent); }
.icon.copied { color: var(--ok); }
.check { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: 14px; color: var(--muted); }

.address { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 4px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.pack-name { font-weight: 500; }
.links { margin-top: 12px; }

.post { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.post:last-of-type { border-bottom: 0; margin-bottom: 0; }
.post h3 { font-size: 22px; font-weight: 600; line-height: 1.3; }
.post .meta { margin: 4px 0 12px; font-size: 14px; color: var(--muted); }
.post h4 { margin: 16px 0 6px; font-size: 15px; font-weight: 500; color: var(--muted); }
.post ul { margin: 0; padding-left: 20px; }
.prose { max-width: 65ch; white-space: pre-line; overflow-wrap: anywhere; }
.post-admin { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -20px 0 28px; }

.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.log li { display: flex; justify-content: space-between; gap: 16px; }
.log span { min-width: 0; overflow-wrap: anywhere; }
.log time { flex: none; font: 14px/1.7 var(--mono); color: var(--muted); }

.form { display: flex; flex-direction: column; align-items: stretch; gap: 16px; margin-top: 20px; }
.form label, .search { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--muted); }
.form label small { margin-top: 2px; }
input:not([type=checkbox]):not([type=file]), textarea, select { width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; caret-color: var(--accent); }
input[type=file] { font: inherit; font-size: 14px; color: var(--text); max-width: 100%; }
input[type=file]::file-selector-button { min-height: 40px; margin-right: 12px; padding: 0 14px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
::placeholder { color: var(--muted); opacity: 1; }
.form .btn { align-self: flex-start; }
.form-tight { margin-top: 0; }

.msg { margin-top: 24px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; }
.msg-error { color: var(--danger); border-color: var(--danger); }
.panel { margin: 20px 0 40px; padding: 16px; background: var(--surface); border-radius: 6px; }
.panel summary { min-height: 28px; font-weight: 500; cursor: pointer; }
.panel input, .panel textarea, .panel select { background: var(--ground); }

.steps { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 12px; max-width: 70ch; }

.search { max-width: 460px; margin: 24px 0 8px; }
.mod-group { margin-top: 40px; }
.mod-group > .muted { margin: -12px 0 20px; }
.mods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px 40px; }
.mods h3 { font-size: 17px; font-weight: 600; }
.mods a { color: var(--text); text-decoration-color: var(--line-strong); }
.mods a:hover { color: var(--accent-hover); }
.mods p { margin: 2px 0 4px; }
.mods small { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }

.files { list-style: none; margin: 20px 0 0; padding: 0; }
.files li { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.file-main { min-width: 0; overflow-wrap: anywhere; }
.file-main p { margin-top: 2px; }

.skin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 48px 64px; margin-top: 40px; }
.skin-preview { display: flex; align-items: center; justify-content: center; height: 200px; padding: 16px; background: var(--surface); border-radius: 6px; }
.skin-preview img { max-width: 100%; max-height: 100%; min-height: 128px; image-rendering: pixelated; object-fit: contain; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
