/* DaviArt Craft — daviart.com. Тема — по системе (светлая/тёмная). Без фреймворков. */
:root {
  --bg: #f3eee4; --bg2: #ebe4d6; --card: #fffdf8; --card2: #f7f2e8; --line: #d9ccb6; --line2: #c7b79c;
  --text: #2a2118; --muted: #6b5c48; --soft: #8b7b65;
  --grass: #3d8a1e; --grass-bg: #e3f1d6; --gold: #9a6a00; --gold-bg: #fbefc8;
  --red: #b4321f; --red-bg: #f8e0da; --warn: #9c6100; --warn-bg: #f9ebcf;
  --code-bg: #efe7d8; --code: #4a2f10; --btn: #e5dccb; --btn-hi: #f4eee2; --btn-lo: #b9aa8f;
  --shadow: 0 1px 0 rgba(60, 40, 20, .06), 0 6px 18px -12px rgba(60, 40, 20, .35);
  --dirt-a: #8a6040; --dirt-b: #77513a; --grass-a: #6eaa3e; --grass-b: #5c9632;
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pixel: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
/* 2026-10-18: тема — по системе, либо выбранная вручную в кабинете (html[data-theme="light|dark"]) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14110e; --bg2: #1a1612; --card: #211c17; --card2: #29231c; --line: #3a3129; --line2: #4a3f34;
    --text: #efe7da; --muted: #b6a891; --soft: #8f826e;
    --grass: #8fd25a; --grass-bg: #20311a; --gold: #f6c945; --gold-bg: #362b12;
    --red: #f07a62; --red-bg: #3a1c17; --warn: #f0b14c; --warn-bg: #352713;
    --code-bg: #2f2820; --code: #ffd98a; --btn: #3a3129; --btn-hi: #4c4136; --btn-lo: #1d1813;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 24px -14px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #14110e; --bg2: #1a1612; --card: #211c17; --card2: #29231c; --line: #3a3129; --line2: #4a3f34;
    --text: #efe7da; --muted: #b6a891; --soft: #8f826e;
    --grass: #8fd25a; --grass-bg: #20311a; --gold: #f6c945; --gold-bg: #362b12;
    --red: #f07a62; --red-bg: #3a1c17; --warn: #f0b14c; --warn-bg: #352713;
    --code-bg: #2f2820; --code: #ffd98a; --btn: #3a3129; --btn-hi: #4c4136; --btn-lo: #1d1813;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 24px -14px rgba(0, 0, 0, .8);
    color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); overflow-x: hidden; }
a { color: var(--grass); text-underline-offset: 2px; }
code { font-family: var(--mono); font-size: .92em; background: var(--code-bg); color: var(--code); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h2 { font-size: 1.6rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; width: 14px; height: 14px; background: var(--grass); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .25); flex: none; }
section { padding: 40px 0 8px; }
.lead { color: var(--muted); margin: 8px 0 18px; max-width: 70ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- шапка ---------- */
.hero { position: relative; color: #f6efe2; background:
  linear-gradient(180deg, rgba(20, 14, 9, .15), rgba(20, 14, 9, .65)),
  repeating-conic-gradient(var(--dirt-a) 0 25%, var(--dirt-b) 0 50%) 0 0 / 32px 32px; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 22px;
  background: repeating-conic-gradient(var(--grass-a) 0 25%, var(--grass-b) 0 50%) 0 0 / 22px 22px; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 10px;
  background: linear-gradient(90deg, var(--grass-b) 0 8%, transparent 8% 14%, var(--grass-b) 14% 20%, transparent 20% 31%, var(--grass-b) 31% 35%, transparent 35% 52%, var(--grass-b) 52% 60%, transparent 60% 71%, var(--grass-b) 71% 74%, transparent 74% 86%, var(--grass-b) 86% 93%, transparent 93%); }
.hero .wrap { position: relative; padding-top: 52px; padding-bottom: 30px; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand img { width: 72px; height: 72px; image-rendering: pixelated; border: 3px solid #1a120b; box-shadow: 0 6px 0 rgba(0, 0, 0, .35); flex: none; }
.brand h1 { font-family: var(--pixel); font-weight: 800; font-size: clamp(2rem, 8.5vw, 3.4rem); letter-spacing: -.5px; text-shadow: 3px 3px 0 #1a120b; }
.tagline { margin: 14px 0 0; font-size: 1.05rem; color: #eadfcb; max-width: 60ch; }
.tagline b { color: #fff; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding: 0; list-style: none; }
.facts li { background: rgba(10, 7, 4, .55); border: 1px solid rgba(255, 255, 255, .14); padding: 3px 10px; border-radius: 999px; font-size: .86rem; }
.facts li.ok { color: #b9ef8b; }

.ip { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.ip-box { flex: 1 1 260px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #120d09; border: 3px solid #000; box-shadow: inset 0 0 0 2px #5a4a39; padding: 10px 10px 10px 16px; min-width: 0; }
.ip-box .lbl { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #a8987f; }
.ip-box .addr { font-family: var(--mono); font-weight: 700; font-size: clamp(1.45rem, 6.6vw, 2.3rem); color: #ffd64a; letter-spacing: 0; line-height: 1.1; word-break: break-all; }
.status { flex: 1 1 220px; background: rgba(10, 7, 4, .6); border: 1px solid rgba(255, 255, 255, .14); padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.status .line { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.status .dot { width: 12px; height: 12px; background: #8a8580; flex: none; box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .3); }
.status.on .dot { background: #63d23a; animation: pulse 2s infinite; }
.status.off .dot { background: #e2553f; }
.status .sub { font-size: .84rem; color: #cfc2ad; margin-top: 2px; overflow-wrap: anywhere; }
@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .status.on .dot { animation: none; } html { scroll-behavior: auto; } }

/* ---------- кнопки в стиле Minecraft ---------- */
.btn { --b: #6f6f6f; --bh: #a8a8a8; --bl: #3d3d3d; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  font: 600 1rem var(--font); color: #fff; text-decoration: none; cursor: pointer; background: var(--b); border: 2px solid #000;
  box-shadow: inset 2px 2px 0 var(--bh), inset -2px -3px 0 var(--bl); text-shadow: 1px 1px 0 rgba(0, 0, 0, .55); white-space: nowrap; }
.btn:hover { filter: brightness(1.1); }
.btn:active { box-shadow: inset -2px -2px 0 var(--bh), inset 2px 3px 0 var(--bl); }
.btn:focus-visible, .chip:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #ffd64a; outline-offset: 2px; }
.btn.green { --b: #4a9a2a; --bh: #7fcf55; --bl: #2b6216; }
.btn.blue { --b: #5865f2; --bh: #8d96ff; --bl: #3540b8; }
.btn.gold { --b: #c7921a; --bh: #f2c24b; --bl: #7f5c0c; }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.actions .btn { flex: 1 1 150px; }

/* ---------- навигация ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 7px; padding-bottom: 7px; }   /* все кнопки видны: переносятся в 2–3 ряда */
.nav .wrap::-webkit-scrollbar { display: none; }
.nav a { flex: none; text-decoration: none; color: var(--text); font-weight: 500; font-size: .86rem; line-height: 1.2; padding: 5px 10px; border-radius: 6px; background: var(--card2); border: 1px solid var(--line); }
.nav a:hover, .nav a.cur { background: var(--grass-bg); border-color: var(--grass); color: var(--grass); }

/* ---------- карточки ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-bottom: 3px solid var(--line2); border-radius: 8px; box-shadow: var(--shadow); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px; }
.steps li::before { content: counter(s); width: 40px; height: 40px; display: grid; place-items: center; font: 700 1.2rem var(--pixel); color: #fff; background: var(--grass); border: 2px solid rgba(0, 0, 0, .35); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .2); }
.steps h3 { font-size: 1.05rem; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }
/* ui.js: значок мышки у ЛКМ/ПКМ и копирование команд нажатием */
.mkey { white-space: nowrap; font-weight: inherit; }
.mouse-ico { width: .72em; height: 1.08em; vertical-align: -.17em; margin-right: .18em; color: currentColor; }
code.cmdcopy { cursor: pointer; position: relative; transition: background .15s; }
code.cmdcopy::after, .copy-ico { content: ""; display: inline-block; width: .8em; height: .8em; margin-left: .32em; vertical-align: -.05em; opacity: .55; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 1h9v10h-2V3H5z'/%3E%3Cpath d='M2 5h8v10H2z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 1h9v10h-2V3H5z'/%3E%3Cpath d='M2 5h8v10H2z'/%3E%3C/svg%3E") center/contain no-repeat; }
code.cmdcopy:hover, code.cmdcopy:focus-visible { background: var(--grass-bg, rgba(61, 138, 30, .15)); outline: 1px solid var(--grass); }
/* «Как начать играть» — 5 карточек с картинкой */
.steps.join5 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.steps li.jstep { display: flex; flex-direction: column; gap: 6px; position: relative; padding: 12px; }
.steps li.jstep::before { content: none; }
.jstep .jn { position: absolute; top: 6px; left: 6px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; font: 700 1rem var(--pixel); color: #fff; background: var(--grass); border: 2px solid rgba(0, 0, 0, .4); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .2); }
.jstep .jmore { font-size: .85rem; color: var(--soft); }
.jv { height: 130px; border-radius: 6px; margin-bottom: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; overflow: hidden; position: relative; image-rendering: pixelated; }
.jv-btn { display: inline-block; padding: 4px 16px; background: #6f6f6f; color: #fff; border: 2px solid; border-color: #aaa #333 #333 #aaa; font: 600 .85rem var(--font); text-shadow: 1px 1px 0 #333; }
.jv-btn.green { background: #3d8a1e; border-color: #7fd357 #1f4a0e #1f4a0e #7fd357; }
.jv-launch { background: linear-gradient(#5b8fd6, #a7c9f0 60%, #6d9a3a 60%, #4f7a26); }
.jv-logo { font: 800 1.5rem var(--pixel); color: #ddd; letter-spacing: .06em; text-shadow: 3px 3px 0 #3a3a3a, -1px -1px 0 #777; }
.jv-ver { font-size: .78rem; color: #ffff55; text-shadow: 1px 1px 0 #3f3f00; font-weight: 700; }
.jv-dirt { background: #2b2018 url(img/mc/block__dirt.png) 0 0/32px 32px; box-shadow: inset 0 0 0 999px rgba(0, 0, 0, .55); align-items: stretch; padding: 10px 14px; }
.jv-dirt .jv-title { text-align: center; color: #fff; font-weight: 700; font-size: .9rem; }
.jv-dirt label { color: #a0a0a0; font-size: .72rem; }
.jv-field { display: flex; justify-content: space-between; align-items: center; background: #000; border: 2px solid #a0a0a0; color: #fff; font: 600 1rem var(--font); padding: 4px 8px; cursor: pointer; text-align: left; }
.jv-field:hover { border-color: #fff; }
.jv-field i { color: #ffff55; width: 1em; height: 1em; opacity: .9; }
.jv-dirt .jv-btn { align-self: center; }
.jv-chat { background: #1f2a1a url(img/mc/block__grass_block_side.png) 0 0/32px 32px; box-shadow: inset 0 0 0 999px rgba(0, 0, 0, .35); justify-content: flex-end; align-items: stretch; padding: 8px; gap: 4px; }
.jv-chat p { margin: 0; background: rgba(0, 0, 0, .55); color: #fff; font: 600 .85rem var(--font); padding: 3px 6px; text-shadow: 1px 1px 0 #222; }
.jv-chat p.y { color: #ffff55; }
.jv-chat p.in { background: rgba(0, 0, 0, .75); }
.jv-chat .ph { color: #aaa; font-style: italic; }
.jv-chat .caret { animation: jvBlink 1s steps(1) infinite; }
@keyframes jvBlink { 50% { opacity: 0; } }
.jv-portal { background: linear-gradient(#7aa9e8, #b9d6f5); }
.jv-portal .frame { width: 74px; height: 96px; padding: 12px; background: url(img/mc/block__obsidian.png) 0 0/12px 12px; }
.jv-portal .frame i { display: block; width: 100%; height: 100%; background-size: 100% 3200%; opacity: .9; animation: jvPortal 2.4s steps(31) infinite; }
@keyframes jvPortal { from { background-position: 0 0%; } to { background-position: 0 100%; } }
.jv-sign { background: #c49a5a; color: #2a1a08; font-weight: 700; font-size: .78rem; padding: 2px 8px; border: 2px solid #6b4a1f; }
.jv-start { flex-direction: row; background: #c6c6c6; border: 3px solid; border-color: #fff #555 #555 #fff; }
.jv-start .slot { position: relative; width: 46px; height: 46px; background: #8b8b8b; border: 2px solid; border-color: #373737 #fff #fff #373737; display: grid; place-items: center; }
.jv-start .slot i { width: 34px; height: 34px; background-size: 100% auto; image-rendering: pixelated; }
.jv-start .slot b { position: absolute; right: 2px; bottom: 0; color: #fff; font-size: .8rem; text-shadow: 2px 2px 0 #3f3f3f; }
.jv-start .arr { font-weight: 800; color: #3f3f3f; font-size: 1.2rem; }
@media (prefers-reduced-motion: reduce) { .jv-chat .caret, .jv-portal .frame i { animation: none; } }

/* миры */
.worlds { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.world { overflow: hidden; display: flex; flex-direction: column; }
.world .pic { position: relative; height: 140px; background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.world .pic.pale { background: repeating-conic-gradient(#b7b9b0 0 25%, #a9aba1 0 50%) 0 0 / 16px 16px; }
.world .pic.pale::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 120%, #5e6158 0 30%, transparent 31%), radial-gradient(circle at 80% 130%, #6a6d63 0 40%, transparent 41%), linear-gradient(180deg, rgba(220, 222, 214, .3), rgba(70, 72, 66, .55)); }
.world .pic.nether { background: repeating-conic-gradient(#6e1f1f 0 25%, #5a1818 0 50%) 0 0 / 16px 16px; }
.world .pic.nether::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(255, 120, 20, .55)); }
.world .pic.end { background: repeating-conic-gradient(#e6e1a8 0 25%, #d8d29a 0 50%) 0 0 / 16px 16px; }
.world .pic.pixel { image-rendering: pixelated; }
.world .pic.end::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #120d1c 0 55%, transparent 55%); }
.world .badge { position: absolute; z-index: 1; left: 10px; bottom: 10px; font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: rgba(10, 7, 4, .78); color: #fff; }
.world .body { padding: 14px; min-width: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.world h3 { font-size: 1.25rem; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.world h3 .lvl { font: 700 .95rem var(--pixel); padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.tone-safe h3 { color: var(--grass); } .tone-safe .lvl { background: var(--grass-bg); color: var(--grass); }
.tone-warn h3 { color: var(--warn); } .tone-warn .lvl { background: var(--warn-bg); color: var(--warn); }
.tone-danger h3 { color: var(--red); } .tone-danger .lvl { background: var(--red-bg); color: var(--red); }
.stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; margin: 0; }
.stats div { background: var(--card2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; min-width: 0; }
.stats dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); }
.stats dd { margin: 0; font-weight: 600; font-size: .95rem; }
.world .more { font-size: .92rem; color: var(--muted); margin: 0; padding-left: 18px; }
.world .more li + li { margin-top: 4px; }
.common { margin-top: 16px; padding: 16px 16px 16px 34px; }
.common li + li { margin-top: 6px; }

/* особенности */
.features { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.feature summary { list-style: none; cursor: pointer; padding: 14px 14px 12px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; gap: 12px; align-items: start; }
.feature summary::-webkit-details-marker { display: none; }
.feature .ico { width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.25rem; font-weight: 700; background: var(--gold-bg); color: var(--gold); border: 1px solid var(--line2); border-radius: 6px; }
.feature h3 { font-size: 1.08rem; }
.feature summary p { margin: 4px 0 0; color: var(--muted); font-size: .93rem; }
.feature .chev { width: 20px; height: 20px; margin-top: 10px; border-right: 3px solid var(--soft); border-bottom: 3px solid var(--soft); transform: rotate(45deg) scale(.55); transition: transform .2s; }
.feature[open] .chev { transform: rotate(225deg) scale(.55); }
.feature ul { margin: 0; padding: 0 16px 14px 34px; font-size: .95rem; }
.feature li + li { margin-top: 6px; }
.feature figure { margin: 0 14px 14px; }
.feature figure img { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--line); image-rendering: pixelated; }
.feature figcaption { font-size: .8rem; color: var(--soft); margin-top: 4px; }

/* команды */
.cmdbar { position: sticky; top: var(--navh, 53px); z-index: 10; background: var(--bg); padding: 8px 0 10px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 2px solid var(--line2); border-radius: 8px; padding: 0 12px; }
.search:focus-within { border-color: var(--grass); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 1rem var(--font); padding: 12px 0; outline: none; }
.search .count { color: var(--soft); font-size: .85rem; white-space: nowrap; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 8px; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; font: 500 .9rem var(--font); color: var(--text); background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; min-height: 36px; }
.chip[aria-pressed="true"] { background: var(--grass); border-color: var(--grass); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[aria-pressed="true"] { color: #10200a; } }
:root[data-theme="dark"] .chip[aria-pressed="true"] { color: #10200a; }
.cgroup { margin-top: 18px; }
.cgroup h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--muted); }
.cmds { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cmd { padding: 12px 12px 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; }
.cmd .name { font-family: var(--mono); font-weight: 700; color: var(--code); background: var(--code-bg); padding: 2px 8px; border-radius: 4px; justify-self: start; overflow-wrap: anywhere; font-size: .95rem; }
.cmd .name.act { font-family: var(--font); }
.cmd p { grid-column: 1 / -1; margin: 2px 0 0; font-size: .93rem; }
.cmd .ex { grid-column: 1 / -1; font-size: .82rem; color: var(--soft); }
.cmd .ex code { font-size: .95em; }
.copy { font: 600 .82rem var(--font); color: var(--text); background: var(--btn); border: 1px solid var(--line2); border-bottom-width: 3px; border-radius: 6px; padding: 6px 10px; cursor: pointer; min-height: 34px; }
.copy:hover { background: var(--btn-hi); }
.copy.done { background: var(--grass); color: #fff; border-color: var(--grass); }
.empty { color: var(--muted); padding: 20px 0; }

/* правила */
.rules { list-style: none; padding: 0; margin: 0; counter-reset: r; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.rules li { counter-increment: r; padding: 14px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.rules li::before { content: counter(r); font: 700 1.1rem var(--pixel); color: var(--red); background: var(--red-bg); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; }
.rules h3 { font-size: 1.02rem; margin-bottom: 3px; }
.rules p { margin: 0; color: var(--muted); font-size: .94rem; }

/* скоро */
.soon { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.soon .card { padding: 14px; border-style: dashed; border-bottom-style: solid; }
.soon h3 { font-size: 1.05rem; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.soon .tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 4px; background: var(--warn-bg); color: var(--warn); white-space: nowrap; }
.soon p { margin: 6px 0 0; color: var(--muted); font-size: .94rem; }

/* что нового (data.js NEWS) — лента карточек: дата слева, текст справа; первая — свежая (зелёная полоска) */
.news { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.news-item { padding: 14px; display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.news-item time { flex: none; width: 64px; text-align: center; font: 700 .78rem/1.25 var(--font); color: var(--grass); background: var(--grass-bg); border: 1px solid var(--line2); border-radius: 6px; padding: 6px 4px; }
.news-item > div { min-width: 0; }
.news-item h3 { font-size: 1.03rem; margin-bottom: 4px; }
.news-item p { margin: 0; color: var(--muted); font-size: .94rem; }
.news-item .news-pic { display: block; width: 100%; max-width: 560px; height: auto; margin-top: 10px; border-radius: 6px; border: 1px solid var(--line); }
.news-item .news-more { display: inline-block; margin-top: 6px; font-size: .9rem; font-weight: 600; }
.news-item.fresh { border-left: 4px solid var(--grass); }

/* FAQ */
.faq { display: grid; gap: 8px; }
.faq details { padding: 0; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 1.3rem/1 var(--pixel); color: var(--grass); }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 16px 14px; color: var(--muted); }

/* разделы-гайды (data.js GUIDES) */
.guide h2 .gico { display: inline-grid; place-items: center; width: 34px; height: 34px; font-size: 1.1rem; background: var(--gold-bg); color: var(--gold); border: 1px solid var(--line2); border-radius: 6px; }
.guide h2::before { display: none; }
.easier { background: var(--grass-bg); border: 1px solid var(--grass); border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; max-width: 80ch; }
.easier b { color: var(--grass); }
.vizgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 14px; }
.vizgrid figure { margin: 0; padding: 10px; }
.vizgrid figcaption { font-size: .82rem; color: var(--soft); margin-top: 6px; }
.viz { width: 100%; height: auto; display: block; }
.howto { display: grid; gap: 10px; grid-template-columns: 1fr 1.3fr; margin-bottom: 18px; align-items: stretch; }
.howto-card { padding: 16px 18px; }
.howto-card.has-ico { display: flex; gap: 16px; align-items: flex-start; border-color: var(--grass); background: var(--grass-bg); }
.howto-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.howto-card p { margin: 0; color: var(--muted); }
.howto-card ol { margin: 0; padding-left: 20px; }
.howto-card li + li { margin-top: 5px; }
.mc-ico { width: 72px; height: 72px; flex: none; image-rendering: pixelated; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.gblocks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); align-items: start; }
.gblock { padding: 14px; }
.gblock h3 { font-size: 1.03rem; margin-bottom: 6px; }
.gblock p { margin: 0; color: var(--muted); font-size: .95rem; }
.gblock ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .95rem; }
.gblock li + li { margin-top: 4px; }
.tablewrap { overflow-x: auto; margin-bottom: 14px; }
.gtable { width: 100%; border-collapse: collapse; font-size: .95rem; }
.gtable th, .gtable td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.gtable th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); }
.gtable tr:last-child td { border-bottom: 0; }
.gtable td:first-child { font-weight: 600; white-space: nowrap; }

/* веб-карта */
.mapcard { margin-top: 16px; padding: 16px; display: grid; gap: 12px; }
.mapcard h3 { font-size: 1.15rem; margin-bottom: 4px; }
.mapcard p { margin: 0; color: var(--muted); }
.mapbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.world .maplink { align-self: flex-start; margin-top: auto; }

/* служебная точка (админ-страница) — почти незаметна */
.dot-admin { position: fixed; right: 3px; bottom: 3px; width: 6px; height: 6px; background: var(--line); opacity: .35; border-radius: 1px; z-index: 5; }
.dot-admin:hover { opacity: .8; }

/* подвал */
footer { margin-top: 48px; padding: 28px 0 40px; border-top: 1px solid var(--line); background: var(--bg2); color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer img { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: middle; margin-right: 8px; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 200%); visibility: hidden; background: #1d1a15; color: #fff; padding: 10px 18px; border: 2px solid #000; box-shadow: inset 0 0 0 2px #4a9a2a; font-weight: 600; transition: transform .25s, visibility .25s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* ---------- форма восстановления ---------- */
.page-head { background: repeating-conic-gradient(var(--dirt-a) 0 25%, var(--dirt-b) 0 50%) 0 0 / 32px 32px; color: #fff; border-top: 14px solid var(--grass-a); }
.page-head .wrap { display: flex; align-items: center; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.page-head img { width: 44px; height: 44px; image-rendering: pixelated; border: 2px solid #1a120b; }
.page-head a { color: #fff; text-decoration: none; font: 700 1.4rem var(--pixel); text-shadow: 2px 2px 0 #1a120b; }
.page-head .back { margin-left: auto; font: 500 .95rem var(--font); text-shadow: none; background: rgba(10, 7, 4, .55); padding: 6px 12px; border-radius: 6px; }
.warn-box { background: var(--gold-bg); border: 2px solid var(--gold); border-radius: 8px; padding: 16px; margin: 18px 0; color: var(--text); }
.warn-box strong { display: block; font-size: 1.12rem; margin-bottom: 6px; color: var(--gold); }
.warn-box p { margin: 0; }
form.recover { display: grid; gap: 14px; }
.field { padding: 14px; }
.field label, .field .lab { display: block; font-weight: 600; margin-bottom: 4px; }
.field .hint { font-size: .86rem; color: var(--soft); margin: 0 0 8px; }
.field input[type=text], .field input[type=email], .field textarea { width: 100%; font: 1rem var(--font); color: var(--text); background: var(--card2); border: 2px solid var(--line2); border-radius: 6px; padding: 10px 12px; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--grass); outline: none; }
.req { color: var(--red); }
.two { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--grass); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formmsg { padding: 14px 16px; border-radius: 8px; font-weight: 500; }
.formmsg.ok { background: var(--grass-bg); border: 2px solid var(--grass); }
.formmsg.err { background: var(--red-bg); border: 2px solid var(--red); }
.formmsg[hidden] { display: none; }

@media (max-width: 560px) {
  /* 2026-10-18 (владелец): меню в 6–7 рядов не держим на экране — иначе поиск команд «висел» посреди экрана; поиск — у самого верха */
  .nav { position: static; }
  html { scroll-padding-top: 8px; }
  section { padding-top: 32px; }
  h2 { font-size: 1.4rem; }
  .brand img { width: 56px; height: 56px; }
  .actions .btn { flex: 1 1 100%; }
  .ip-box { padding-left: 12px; }
  .cmds, .worlds, .features, .rules, .soon, .gblocks, .vizgrid, .howto, .news { grid-template-columns: 1fr; }
  .news-item { padding: 12px; gap: 10px; }
  .news-item time { width: 56px; }
  .mc-ico { width: 56px; height: 56px; }
  .gtable { font-size: .86rem; }
  .gtable th, .gtable td { padding: 8px 8px; }
  .gtable td:first-child { white-space: normal; }
}
.stats .wide { grid-column: 1 / -1; }

/* ---------- страница «Партнёрам» ---------- */
.note-mail { color: var(--muted); font-size: .92rem; margin: 10px 0 0; }
.pcard { padding: 16px; display: grid; gap: 12px; }
.pcard.hl { border-color: var(--gold); background: var(--gold-bg); }
.pcard .big { margin: 0; font-size: 1.05rem; }
.codebox { flex: none; }
.plist { margin: 12px 0 0; padding: 14px 16px 14px 34px; }
.plist li + li { margin-top: 6px; }
.warnlist { padding: 16px; border-color: var(--red); }
.warnlist h3 { color: var(--red); margin-bottom: 6px; }
.warnlist ul { margin: 0 0 10px; padding-left: 20px; }
.warnlist p { margin: 0; }
.paygrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.stat .num { font: 800 2rem/1.1 var(--pixel); color: var(--grass); }
.stat span:last-child { color: var(--muted); font-size: .94rem; }
.ptop { width: 100%; border-collapse: collapse; }
.ptop th, .ptop td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ptop th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); }
.ptop td:first-child, .ptop th:first-child { width: 44px; color: var(--soft); }
.ptop td:last-child, .ptop th:last-child { text-align: right; font-weight: 700; }
.ptop tr:last-child td { border-bottom: 0; }
.ptop-empty { padding: 22px 16px; display: grid; gap: 8px; justify-items: start; }
.ptop-empty b { font-size: 1.1rem; color: var(--grass); }
.ptop-empty span { color: var(--muted); }

/* подстраницы (pages.js) */
main > section[hidden] { display: none !important; }
main > section.pg-on { animation: pgIn .25s ease; }
@keyframes pgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pg-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 22px 0 6px; padding-top: 14px; border-top: 1px dashed var(--line2); }
.pg-sentinel { height: 1px; }
.nav a.cur { background: var(--grass); color: #fff; border-radius: 6px; }
.nav a.nav-don { color: var(--gold); font-weight: 700; }
/* донат */
.don-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-items: stretch; }
.don-card { padding: 16px; display: flex; flex-direction: column; position: relative; }
.don-card h3 { margin: 0 0 4px; font-size: 1.2rem; }
.don-card ul { margin: 8px 0 14px; padding-left: 18px; color: var(--muted); font-size: .93rem; flex: 1; }
.don-card li + li { margin-top: 4px; }
.don-price { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.don-price span { font-size: .85rem; font-weight: 500; color: var(--soft); }
.don-best { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-bg), var(--shadow); }
.don-tag { position: absolute; top: -10px; right: 12px; background: var(--gold); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.don-status { color: var(--muted); margin: 0 0 12px; }
.don-msg { padding: 14px 16px; margin-top: 14px; border-color: var(--grass); background: var(--grass-bg); font-weight: 600; }

/* 2026-10-13 — владелец: «кнопки меню — мельче и все на экране (2–3 ряда); сайт шире; верх красивее; карта — заметнее» */
@media (max-width: 700px) {
  .nav { position: static; }   /* на телефоне меню из нескольких рядов не липнет к экрану — не закрывает текст */
  .nav .wrap { gap: 4px; }
  .nav a { font-size: .8rem; padding: 4px 8px; }
}
@media (min-width: 960px) {
  .hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 44px; align-items: start; padding-top: 60px; padding-bottom: 38px; }
  .hero .brand { grid-column: 1; grid-row: 1; }
  .hero .tagline { grid-column: 1; grid-row: 2; font-size: 1.15rem; }
  .hero .facts { grid-column: 1; grid-row: 3; }
  .hero .ip { grid-column: 2; grid-row: 1 / span 2; margin-top: 4px; flex-direction: column; }
  .hero .ip-box, .hero .status { flex: none; }
  .hero .actions { grid-column: 2; grid-row: 3; margin-top: 12px; }
  .brand img { width: 88px; height: 88px; }
  .brand h1 { font-size: 3.8rem; }
}
.btn.map { --b: #1f8fb3; --bh: #5cd2f2; --bl: #0d4c63; color: #fff; position: relative; }
.btn.map .live { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; background: rgba(0, 0, 0, .3); padding: 1px 7px; border-radius: 99px; text-transform: uppercase; letter-spacing: .04em; }
.btn.map .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7dff6a; box-shadow: 0 0 0 2px rgba(125, 255, 106, .35); animation: livePulse 1.6s infinite; will-change: transform, opacity; }
/* 2026-10-21: пульс — прозрачностью и размером (без перерисовки; раньше — анимация box-shadow каждый кадр) */
@keyframes livePulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .55; } }
.nav a.nav-map { color: #1f8fb3; font-weight: 700; border-color: #1f8fb3; }

/* У249 (2026-10-18): большая заметная кнопка «Личный кабинет» в шапке + выделенный пункт меню */
.btn.cab-big { --b: #3fae1c; --bh: #8ff060; --bl: #22680c; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; margin-top: 16px;
  min-height: 72px; padding: 12px 18px; border-width: 3px; white-space: normal; text-align: center;
  box-shadow: inset 3px 3px 0 var(--bh), inset -3px -4px 0 var(--bl), 0 0 0 3px rgba(143, 240, 96, .35), 0 8px 22px -6px rgba(63, 174, 28, .75);
  position: relative; }
/* 2026-10-21: свечение — отдельный слой, у которого меняется только прозрачность (раньше box-shadow каждый кадр — перерисовка всей кнопки) */
.btn.cab-big::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none; opacity: 0; will-change: opacity;
  box-shadow: 0 0 0 5px rgba(143, 240, 96, .55), 0 8px 26px -4px rgba(63, 174, 28, .9); animation: cabGlow 2.4s ease-in-out infinite; }
.btn.cab-big:active { box-shadow: inset -3px -3px 0 var(--bh), inset 3px 4px 0 var(--bl); }
.cab-big .cb-t { font-size: clamp(1.35rem, 6.2vw, 1.7rem); font-weight: 800; line-height: 1.15; letter-spacing: .2px; }
.cab-big .cb-s { font-size: .86rem; font-weight: 500; line-height: 1.25; color: #f1ffe6; opacity: .95; }
@keyframes cabGlow { 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .btn.cab-big::after { animation: none; } }
@media (min-width: 960px) {
  .hero .cab-big { grid-column: 1; grid-row: 3; margin-top: 18px; }
  .hero .facts { grid-row: 4; }
  .hero .voice-big { grid-column: 2; grid-row: 3; margin-top: 18px; }
  .hero .actions { grid-row: 4; }
}
/* У399 (2026-10-25): «🎧 Подключиться к голосу и звуку» — вторая большая кнопка первого экрана (мастер cabinet.html#voice) */
.btn.voice-big { --b: #7a3fc4; --bh: #b98cff; --bl: #46207a; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; margin-top: 10px;
  min-height: 68px; padding: 12px 18px; border-width: 3px; white-space: normal; text-align: center;
  box-shadow: inset 3px 3px 0 var(--bh), inset -3px -4px 0 var(--bl), 0 0 0 3px rgba(185, 140, 255, .35), 0 8px 22px -6px rgba(122, 63, 196, .75); }
.btn.voice-big:active { box-shadow: inset -3px -3px 0 var(--bh), inset 3px 4px 0 var(--bl); }
.voice-big .cb-t { font-size: clamp(1.2rem, 5.4vw, 1.5rem); font-weight: 800; line-height: 1.15; }
.voice-big .cb-s { font-size: .84rem; font-weight: 500; line-height: 1.25; color: #f3eaff; opacity: .95; }
.nav a.nav-cab { background: #3fae1c; border-color: #22680c; color: #fff; font-weight: 700; text-shadow: 1px 1px 0 rgba(0, 0, 0, .45); }
.nav a.nav-cab:hover { background: #4cc226; color: #fff; }

/* бонус дня рядом с донатом */
.btn.bonus { --b: #3d8a1e; --bh: #7fcf55; --bl: #23540f; color: #fff; }
.btn.don { --b: #c43a6a; --bh: #f07aa3; --bl: #7a1f3f; color: #fff; }
.don-bonus { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; margin: 0 0 14px; border-color: var(--gold); background: var(--gold-bg); }
.don-bonus .t { font-weight: 700; }
.don-bonus .s { color: var(--muted); font-size: .92rem; }

/* ---- Донат (У208.2, shop.js): голоса за $ и пакеты валюты ---- */
.don-tag.green { background: var(--grass); }
.vote-card.voted { border-color: var(--grass); background: var(--grass-bg); }
.vote-ok { margin: 6px 0 0; font-weight: 600; color: var(--grass); }
.vote-card:not(.voted) .vote-ok { color: var(--muted); }
.vote-card .btn { margin-top: auto; }
.vote-note { margin: 10px 0 0; font-size: .9rem; color: var(--muted); max-width: 70ch; }
.vote-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 8px 0 0; }
.vote-bar i { display: block; height: 100%; background: var(--grass); }
.don-nick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.don-nick input, .pay-form input:not([type=checkbox]) { font: inherit; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--card); color: var(--text); max-width: 300px; width: 100%; }
.pack-card h3 small { font-size: .8rem; font-weight: 500; color: var(--soft); }
.pack-card .btn { margin-top: 12px; }
.pack-card.sel { outline: 3px solid var(--gold); outline-offset: 2px; }
.pay-form { margin-top: 14px; padding: 16px; display: grid; gap: 10px; max-width: 520px; }
.pay-form label { font-weight: 600; }
.pf-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 1.05rem; }
.pf-x { border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 4px 8px; }
.pf-methods { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-methods button { font: inherit; font-weight: 600; padding: 8px 12px; border-radius: 8px; border: 2px solid var(--line2); background: transparent; color: var(--text); cursor: pointer; min-height: 40px; }
.pf-methods button.sel { border-color: var(--gold); background: var(--gold-bg); }
.pf-agree { font-weight: 500 !important; display: flex; gap: 8px; align-items: flex-start; }
.pf-err { color: var(--red); font-weight: 600; margin: 0; }
.don-sub { margin: 18px 0 8px; font-size: 1.15rem; }
.cur-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.cur-switch button { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 2px solid var(--line2); background: transparent; color: var(--text); cursor: pointer; min-height: 40px; }
.cur-switch button.sel { border-color: var(--gold); background: var(--gold-bg); }

/* У215: большая кнопка (партнёры → личный кабинет) и контакт владельца */
.btn.xl { min-height: 64px; padding: 12px 22px; font-size: clamp(1.1rem, 4.5vw, 1.35rem); width: 100%; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0; }
.contact-row .nick { font-family: var(--mono); font-weight: 700; font-size: 1.2rem; color: var(--gold); word-break: break-all; }

/* 2026-10-22: раздел «Музыка» (music.js) */
.music-place { margin: 22px 0 6px; font-size: 1.15rem; }
.music-style { margin: 12px 0 18px; }
.music-style h4 { margin: 0 0 8px; font-size: 1rem; color: var(--gold); }
.music-n { font-weight: 400; color: var(--soft); font-size: .85rem; }
.music-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.music-track { padding: 10px 12px; min-width: 0; }
.music-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.music-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-head span { color: var(--muted); font-size: .85rem; flex: none; }
.music-track audio { width: 100%; height: 36px; }
#music-chips { margin-bottom: 4px; }