:root {
  --bg: #120e0c; --panel: #1b1613; --panel-2: #241d19; --line: #3a2e27; --text: #f3e9df; --muted: #b9a89a;
  --accent: #f07a22; --accent-2: #b4501c; --ok: #4fbf6a; --bad: #d9534f; --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 70px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Inter, system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ok { color: var(--ok); font-weight: 700; }
.bad { color: var(--bad); font-weight: 700; }
.pre { white-space: pre-line; }
kbd { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); font: 600 12px/20px ui-monospace, monospace; color: var(--text); text-align: center; }
code { color: var(--accent); font-size: 14px; }

/* Buttons */
.btn { display: inline-block; padding: 10px 20px; border-radius: 8px; font-weight: 700; letter-spacing: .2px; text-decoration: none !important; border: 0; cursor: pointer; font: inherit; font-weight: 700; transition: transform .1s, background .2s; }
.btn:active { transform: translateY(1px); }
.btn-play { background: var(--accent); color: #1a0f08; box-shadow: 0 6px 18px rgba(240,122,34,.3); }
.btn-play:hover { background: #ff8c33; }
.btn-ghost { border: 1px solid rgba(255,255,255,.35); color: #fff; background: rgba(0,0,0,.3); }
.btn-ghost:hover { background: rgba(0,0,0,.55); }
.btn-ghost.danger { border-color: rgba(217,83,79,.6); color: #ff9a97; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
button.link:hover { text-decoration: underline; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(27,22,19,.97); border-bottom: 2px solid var(--accent-2); backdrop-filter: blur(6px); }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 0 12px; display: flex; align-items: center; gap: 4px; min-height: 56px; }
.brand { display: flex; align-items: center; margin-right: 10px; }
.brand img { height: 44px; width: auto; }
.menus { display: flex; align-items: center; flex: 1; }
.nav-link { display: block; padding: 17px 13px; font-weight: 600; color: var(--text); }
.nav-link:hover { color: var(--accent); text-decoration: none; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 17px 13px; font-weight: 600; color: var(--text); user-select: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " ▾"; color: var(--muted); font-size: 11px; }
.menu[open] summary, .menu summary:hover { color: var(--accent); }
.menu-list { position: absolute; left: 0; top: 100%; min-width: 230px; background: var(--panel-2); border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 0 0 8px 8px; padding: 6px 0; box-shadow: 0 10px 24px rgba(0,0,0,.5); }
.menu-list a { display: block; padding: 8px 16px; color: var(--text); white-space: nowrap; }
.menu-list a:hover { background: rgba(240,122,34,.12); color: var(--accent); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 6px; }
.lang a { display: inline-block; padding: 3px 7px; margin-left: 2px; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; color: #fff; font-size: 11px; font-weight: 700; }
.lang a.on { background: var(--accent); color: #1a0f08; border-color: var(--accent); }
.lang a:hover { text-decoration: none; background: rgba(0,0,0,.5); }
.lang a.on:hover { background: var(--accent); }
.burger { display: none; }
.burger summary { list-style: none; cursor: pointer; font-size: 22px; padding: 8px 10px; color: var(--text); }
.burger summary::-webkit-details-marker { display: none; }

/* Hero (home) */
.hero { position: relative; background: url('/static/img/hero.png') center 30% / cover; min-height: 340px; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,14,12,.1) 0%, rgba(18,14,12,.7) 65%, var(--bg) 100%); }
.hero-inner { position: relative; max-width: var(--max); margin: 0 auto; padding: 40px 16px 24px; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; }
.hero-title { margin: 0; line-height: 0; }
.hero-title img { width: 400px; max-width: 100%; height: auto; filter: drop-shadow(0 4px 14px rgba(0,0,0,.8)); }
.tagline { margin: 0; max-width: 560px; font-size: 17px; text-shadow: 0 1px 4px #000; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.status { color: #e9ddd2; font-size: 14px; text-shadow: 0 1px 3px #000; }
.status a { color: #e9ddd2; }
.status .today { opacity: .85; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.off { background: var(--bad); }
.dot.small { width: 7px; height: 7px; margin: 0 0 0 5px; }

/* Page */
.page { max-width: 880px; margin: 24px auto; padding: 22px 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.page.wide { max-width: var(--max); }
.crumb { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.crumb a { color: var(--muted); }
.title { margin: 0 0 14px; font-size: 28px; }
.page h2 { margin: 24px 0 8px; font-size: 20px; }
.page h3 { margin: 16px 0 6px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.page p { margin: 8px 0; }
.page ul, .page ol { padding-left: 22px; }
.page li { margin: 4px 0; }
.spaced li { margin: 8px 0; }
.cols2 { columns: 2; column-gap: 24px; }
.flash { padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; border: 1px solid var(--line); background: var(--panel-2); }
.flash-ok { border-color: rgba(79,191,106,.5); }
.flash-bad { border-color: rgba(217,83,79,.6); }
.note { padding: 10px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.note.ok { border-color: rgba(79,191,106,.5); }
.note.bad { border-color: rgba(217,83,79,.6); }
.note ul { margin: 0; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 10px 16px 32px; }
.foot .muted { opacity: .7; }

/* Home columns */
.cols { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 8px; font-size: 15px; color: var(--text); text-transform: none; letter-spacing: 0; }
.card .more { display: inline-block; margin-top: 6px; font-size: 13px; }
.card.discord { border-color: rgba(88,101,242,.6); }
ul.plain, ol.plain { list-style: none; padding: 0; margin: 0; }
ol.num { counter-reset: n; }
ol.num li::before { counter-increment: n; content: counter(n) ". "; color: var(--muted); }
.steps { padding-left: 20px; }
.steps.big li { margin: 10px 0; }
.news { padding: 4px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.news:last-of-type { border-bottom: 0; }
.news-title { margin: 0 0 4px; font-size: 22px; }
.news-title a { color: var(--text); }
.news-meta { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.news-body h3 { margin: 14px 0 4px; font-size: 16px; color: var(--text); text-transform: none; letter-spacing: 0; }

/* Tables */
table { border-collapse: collapse; max-width: 100%; }
.list { width: 100%; margin: 8px 0 4px; }
.list th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding: 6px 8px; }
.list td { border-top: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.list tbody tr:hover td { background: rgba(240,122,34,.06); }
.list.compact td, .list.compact th { padding: 3px 8px; }
.info { width: 100%; }
.info td { border-top: 1px solid var(--line); padding: 8px; vertical-align: top; }
.info td:first-child { white-space: nowrap; color: var(--muted); width: 170px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.tabs a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: var(--panel-2); font-size: 14px; }
.tabs a.on { background: var(--accent); color: #1a0f08; border-color: var(--accent); font-weight: 700; }
.tabs a:hover { text-decoration: none; border-color: var(--accent); }
.pager { display: flex; justify-content: space-between; margin: 10px 0; }
.filter { width: 100%; max-width: 360px; margin: 8px 0; }
.char-name { font-size: 26px; margin-top: 6px; }
.motd { font-style: italic; color: var(--muted); }
.faq details { border-top: 1px solid var(--line); padding: 8px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.faq summary:hover { color: var(--accent); }
.faq p { margin: 6px 0 4px; color: #e4d9ce; }
.entry { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-top: 10px; }
.entry .meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.entry p { margin: 0; }
.badge { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid; }
.badge.l1 { color: #6cc8ff; border-color: #6cc8ff; } .badge.l2 { color: var(--accent); border-color: var(--accent); } .badge.l3 { color: #ff6b5b; border-color: #ff6b5b; }
.badge.free { color: var(--ok); border-color: var(--ok); } .badge.used { color: #6cc8ff; border-color: #6cc8ff; } .badge.expired { color: var(--muted); border-color: var(--muted); }

/* Forms */
input[type=text], input[type=password], input[type=email], input[type=search], input[type=number], select, textarea {
  background: #0f0c0a; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: inherit; max-width: 100%; width: 100%;
}
input.wide { width: 100%; margin: 6px 0; }
select { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
button { font: inherit; }
.form { margin: 10px 0; }
.form.narrow { max-width: 440px; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-weight: 600; margin-bottom: 4px; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.field.inline { display: inline-block; margin: 0; }
.field.inline > span { display: inline; margin-right: 6px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; }
.check input { margin-top: 3px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form.row input[type=text] { flex: 1; min-width: 200px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.search { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.search input[type=search] { width: auto; min-width: 240px; }
.search button { background: var(--accent); color: #1a0f08; border: 0; border-radius: 6px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
textarea { resize: vertical; }

/* Account */
.account { display: grid; grid-template-columns: 190px 1fr; gap: 24px; align-items: start; }
.subnav { display: flex; flex-direction: column; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.subnav a, .subnav button { display: block; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--text); width: 100%; }
.subnav a.on { background: rgba(240,122,34,.15); color: var(--accent); font-weight: 600; }
.subnav a:hover, .subnav button:hover { background: rgba(255,255,255,.05); text-decoration: none; }
.subnav form { margin: 0; }
.account-body h2:first-child { margin-top: 0; }

/* Forum */
.boards .board { font-weight: 700; font-size: 16px; }
.post { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.post-head { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 6px; }
.post-head a { font-weight: 700; }
.post-admin { margin-left: auto; font-size: 12px; }
.post-admin form { display: inline; }
.post-body p { margin: 6px 0; }
.post-form textarea { min-height: 120px; }
.admin-row { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.admin-row form { margin: 0; }
.invites td.link { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }

@media (max-width: 760px) {
  .cols, .account, .two { grid-template-columns: 1fr; }
  .cols2 { columns: 1; }
  .page { margin: 12px; padding: 14px 16px; }
  .info td:first-child { width: 110px; white-space: normal; }
  .hero-title img { width: 280px; }
  .hero, .hero-inner { min-height: 260px; }
  .burger { display: block; order: 3; }
  .menus { display: none; order: 5; flex-direction: column; align-items: stretch; width: 100%; padding-bottom: 8px; }
  .nav.open .menus { display: flex; }
  .nav-inner { flex-wrap: wrap; }
  .nav-right { margin-left: auto; order: 2; }
  .nav-right .nav-link { display: none; }
  .menu-list { position: static; box-shadow: none; border-radius: 0; border-width: 0 0 0 2px; }
  .nav-link, .menu summary { padding: 10px 8px; }
  .subnav { flex-direction: row; flex-wrap: wrap; }
  .subnav a, .subnav button { width: auto; }
}
