/* Общее оформление вики игрока и админки. Тёмная тема как у игры. */
:root {
  --bg: #151715; --panel: #1d211d; --line: #2c312c; --text: #e8e8e3; --muted: #9da197;
  --accent: #8fe8d8; --accent-bg: #1f4a43; --warn: #ffd54f; --bad: #ff8a80; --good: #8be28b;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 1000px; margin: 0 auto; padding: 14px 14px 60px; }
h1 { font-size: 22px; margin: 6px 0 4px; color: var(--accent); }
h2 { font-size: 18px; margin: 26px 0 8px; color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
code { color: #b9bb9f; font-size: 13px; word-break: break-all; }

/* шапка с разделами */
header.top { position: sticky; top: 0; z-index: 5; background: #101210ee; border-bottom: 1px solid var(--line); backdrop-filter: blur(4px); }
header.top .in { max-width: 1000px; margin: 0 auto; padding: 8px 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
header.top .brand { font-weight: 700; color: var(--accent); margin-right: 10px; }
.tab { padding: 6px 12px; border-radius: 16px; color: var(--text); }
.tab.on { background: var(--accent-bg); color: #d6fff7; }
.crumbs { margin: 4px 0 2px; font-size: 14px; color: var(--muted); }

/* таблицы */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.link { cursor: pointer; }
tr.link:hover td { background: #222722; }
td .sub { display: block; }

/* значок из общей картинки 4×4 */
.ico { display: inline-block; width: 28px; height: 28px; background-image: url(/assets/icons.png); background-size: 500% 500%; vertical-align: middle; flex: none; }
.ico.big { width: 56px; height: 56px; }
.ico.none { background: none; border: 2px dashed #3a403a; border-radius: 50%; }
.icon-cell { display: flex; align-items: center; gap: 8px; }

/* метки состояния */
.chip { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 13px; white-space: nowrap; background: #2a2f2a; color: var(--muted); }
.chip.none { background: #2a2f2a; color: #a9ada4; }
.chip.designed { background: #4a4220; color: #ffe08a; }
.chip.in_game { background: #1f4a2b; color: #a9f0b5; }
.chip.skip { background: #262626; color: #777; text-decoration: line-through; }

/* полоса доли */
.bar { position: relative; height: 8px; background: #2a2f2a; border-radius: 4px; min-width: 70px; overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; }

/* формы */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 12px 0; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input[type=text], input[type=number], input[type=search], select, textarea {
  width: 100%; background: #121412; color: var(--text); border: 1px solid #3a403a; border-radius: 8px; padding: 9px 10px; font: inherit; }
textarea { min-height: 90px; resize: vertical; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { background: #262b26; color: var(--text); border: 1px solid #3a403a; border-radius: 16px; padding: 6px 12px; font: inherit; cursor: pointer; }
.seg button.on { background: var(--accent-bg); border-color: var(--accent); color: #d6fff7; }
.btn { background: #12917f; color: #fff; border: 0; border-radius: 8px; padding: 10px 20px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 260px; }
.saved { color: var(--good); margin-left: 12px; }
.err { color: var(--bad); margin-left: 12px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.filters input { flex: 1 1 220px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* сетка значков */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; gap: 12px; align-items: center; cursor: pointer; color: var(--text); }
.tile:hover { border-color: var(--accent); text-decoration: none; }
.tile b { display: block; }

/* вики игрока */
.place-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.place-list span { background: #262b26; border-radius: 12px; padding: 3px 10px; font-size: 13px; }
.lang { margin-left: auto; }

/* кнопка «Скачать игру» в вике игрока */
a.download { display: block; text-align: center; background: #12917f; color: #fff; font-weight: 700; font-size: 18px;
  padding: 14px 18px; border-radius: 10px; text-decoration: none; }
a.download:hover { background: #16a893; text-decoration: none; }
a.download span { display: block; font-weight: 400; font-size: 14px; opacity: .85; margin-top: 2px; }
