/* a2d 2026-12-03: страницы сайта (world2d/site.html). Цвета и заголовки — те же, что в рамке игры (shell.css). */

:root {
  --bg: #0d0b0a; --panel: #191512; --panel-2: #221c17; --line: #3a2f26; --text: #ece2d0; --muted: #a89a86;
  --amber: #e8a33d; --amber-2: #ffcf7a; --red: #ff8a6b; --bronze: #8a6a35; --bronze-2: #c99a4d;
  --head: Georgia, "Times New Roman", serif; --body: "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; scrollbar-color: #4a3a2a #0d0b0a; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 15px/1.55 var(--body); }
a { color: var(--amber-2); text-underline-offset: 3px; }
a:hover { color: #fff3d6; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; color: #fff3d6; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
main:focus { outline: none; }
.nojs { margin: 0; padding: 14px; background: #5a2318; text-align: center; }
.skip { position: absolute; left: -9999px; z-index: 50; padding: 8px 14px; background: var(--panel-2); }
.skip:focus { left: 8px; top: 8px; }

/* ---------- верхняя панель (та же, что над игрой) ---------- */

.bar { position: relative; z-index: 10; flex: none; display: flex; align-items: stretch; gap: 14px; min-height: 54px; padding: 0 16px; background: linear-gradient(#2a2018, #1a140f 62%, #120e0b); border-bottom: 1px solid #000; box-shadow: inset 0 -1px 0 rgba(201, 154, 77, .38), 0 3px 14px rgba(0, 0, 0, .6); }
.logo { align-self: center; padding: 2px 4px; font: 700 23px var(--head); letter-spacing: .02em; color: #fff3d6; text-decoration: none; text-shadow: 0 1px 0 #000, 0 0 18px rgba(232, 163, 61, .25); }
.logo span { color: var(--amber); }
.nav { flex: 1; min-width: 0; display: flex; align-items: stretch; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; flex: none; display: flex; align-items: center; padding: 0 13px; color: #d6c9b2; font-size: 14.5px; text-decoration: none; }
.nav a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--amber); transform: scaleX(0); transition: transform .16s ease-out; }
.nav a:hover { color: #fff3d6; }
.nav a:hover::after { transform: scaleX(.45); }
.nav a[aria-current] { color: var(--amber-2); }
.nav a[aria-current]::after { transform: scaleX(1); }
.nav a:focus-visible { outline-offset: -3px; }
.who { flex: none; display: flex; align-items: center; gap: 8px; }

/* ---------- кнопки, формы ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 6px 16px; border: 1px solid var(--bronze); border-radius: 7px; background: #14100d; color: #eadfc9; font: 600 14.5px/1.2 var(--body); text-align: center; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--bronze-2); color: #fff3d6; }
.btn.main { background: linear-gradient(#f0b04b, #c47c22); border-color: #f3c574; color: #21130a; text-shadow: 0 1px 0 rgba(255, 236, 190, .45); }
.btn.main:hover { background: linear-gradient(#ffc468, #d58a2b); color: #180d05; }
.btn.ghost { min-height: 34px; padding: 5px 13px; font-size: 13.5px; font-weight: 500; }
.btn.big { min-height: 48px; padding: 8px 26px; font-size: 17px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.busy { cursor: progress; }
.card { padding: 26px 28px; background: linear-gradient(rgba(34, 28, 23, .97), rgba(22, 18, 15, .97)); border: 1px solid #4a3a2a; border-radius: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, .5); }
.form > h1, .form > h2 { margin: 0 0 14px; font-size: 25px; }
.form .lead { margin: -6px 0 18px; color: var(--muted); }
.form > .btn { width: 100%; margin-top: 6px; }
.fld { margin: 0 0 14px; }
.fld > label:not(.agree), .fld > label[id] { display: block; margin-bottom: 5px; font-size: 13.5px; font-weight: 600; color: #d9ccb4; }
.fld input:not([type=radio]):not([type=checkbox]), .fld select { width: 100%; min-height: 40px; padding: 7px 11px; background: #0f0c0a; border: 1px solid #4a3d31; border-radius: 7px; color: var(--text); font: 15px var(--body); }
.fld input:focus, .fld select:focus { border-color: var(--amber); outline: none; box-shadow: 0 0 0 2px rgba(232, 163, 61, .28); }
.fld.wrong input:not([type=radio]):not([type=checkbox]), .fld.wrong select { border-color: #b4503a; }
.fld .note { margin: 4px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.fld .bad { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--red); }
.msg { margin: 0 0 8px; padding: 9px 12px; background: rgba(178, 64, 42, .18); border: 1px solid #8a3f2e; border-radius: 7px; color: #ffc9b6; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick { display: flex; gap: 8px; }
.pick label { flex: 1; cursor: pointer; }
.pick input { position: absolute; opacity: 0; }
.pick span { display: block; padding: 8px; background: #0f0c0a; border: 1px solid #4a3d31; border-radius: 7px; text-align: center; color: #cdbfa6; }
.pick input:checked + span { border-color: var(--amber); background: #2d2114; color: #fff3d6; }
.pick input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.birth { display: grid; grid-template-columns: 1fr 1.5fr 1.1fr; gap: 8px; }
.cap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cap img { border: 1px solid #4a3d31; border-radius: 7px; background: #211a14; }
.cap input[type=text] { width: 96px !important; text-align: center; font: 700 20px var(--head) !important; letter-spacing: .18em; }
.agree { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.agree input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--amber); flex: none; }
.more { display: flex; justify-content: space-between; gap: 12px; margin: 14px 0 0; font-size: 14px; }

/* ---------- главная: арена ---------- */

.hero { position: relative; min-height: clamp(560px, calc(100vh - 150px), 760px); display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto 1fr; gap: 0 40px; padding: 44px max(28px, calc((100vw - 1240px) / 2)) 26px; overflow: hidden; isolation: isolate; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.htop { grid-column: 1; max-width: 640px; }
.htop h1 { margin: 0 0 10px; font-size: clamp(30px, 3.5vw, 46px); letter-spacing: -.005em; text-shadow: 0 2px 10px #000; }
.htop .lead { margin: 0 0 18px; max-width: 400px; font-size: 16.5px; color: #e3d6bf; text-shadow: 0 1px 6px #000; }
.demo { grid-column: 1; align-self: end; display: grid; gap: 8px; }
.zrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zl { margin: 0; font: 700 15px var(--head); color: var(--amber-2); text-shadow: 0 1px 4px #000; }
.zones { display: flex; flex-wrap: wrap; gap: 6px; }
.zones button { min-height: 34px; padding: 4px 13px; background: rgba(16, 12, 9, .88); border: 1px solid #5d4a33; border-radius: 7px; color: #e9dcc3; font: 500 13.5px var(--body); cursor: pointer; }
.zones button:hover { border-color: var(--bronze-2); color: #fff3d6; }
.zones button[aria-pressed=true] { background: #5a3a12; border-color: var(--amber); color: #fff3d6; }
.log { height: 92px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; font-size: 13.5px; line-height: 23px; text-shadow: 0 1px 3px #000; }
.log p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #d8ccb6; }
.log p:not(:last-child) { opacity: .72; }
.log time { margin-right: 6px; color: #9c8d76; font-variant-numeric: tabular-nums; }
.log b { color: #fff3d6; }
.log i { font-style: normal; font-weight: 700; color: var(--red); }
.hside { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

.low { width: 100%; max-width: 1296px; margin: 0 auto; padding: 34px 28px 48px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; }
.low h2 { margin: 0 0 14px; font-size: 22px; }
.stat h2:not(:first-child) { margin-top: 30px; }
.on { margin: 0; font: 700 18px var(--head); color: var(--amber-2); }
.top { margin: 0; padding: 0; list-style: none; counter-reset: t; }
.top li { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid #2a221b; counter-increment: t; }
.top li::before { content: counter(t); flex: none; width: 18px; color: #9c8d76; font-variant-numeric: tabular-nums; }
.top a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top i { font-style: normal; color: var(--muted); font-size: 13px; }
.top b { margin-left: auto; font-variant-numeric: tabular-nums; color: #eadfc9; }
.all { display: inline-block; margin-top: 12px; }

/* ---------- новости, тексты ---------- */

.narrow { width: 100%; max-width: 560px; margin: 0 auto; padding: 38px 20px 56px; }
.narrow.wide { max-width: 740px; }
.title { margin: 0 0 18px; font-size: 32px; }
.nw { padding: 0 0 22px; margin: 0 0 22px; border-bottom: 1px solid #2a221b; }
.nw:last-child { margin-bottom: 0; border-bottom: 0; }
.nw time { font-size: 13px; color: var(--muted); }
.nw h3 { margin: 2px 0 8px; font-size: 20px; overflow-wrap: anywhere; }
.prose { max-width: 76ch; overflow-wrap: anywhere; }
.prose h2 { margin: 26px 0 8px; font-size: 20px; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 20px; }
.prose li { margin: 0 0 5px; }
.date { margin: -12px 0 18px; font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); }
#page { flex: 1; }
.foot { flex: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 18px 28px; border-top: 1px solid #2a221b; background: #0a0807; font-size: 13.5px; }
.foot a { color: #c3b59c; }
.foot span { margin-left: auto; color: var(--muted); }

@media (max-width: 1079px) {
  .hero { display: block; min-height: 0; padding: 26px 18px 24px; }
  .hero canvas { height: 620px; inset: 0 0 auto; }
  .demo { margin-top: 300px; margin-bottom: 22px; }
  .hero .card { max-width: 480px; margin: 0 auto; }
  .low { grid-template-columns: 1fr; gap: 30px; padding: 24px 18px 40px; }
}
@media (max-width: 799px) {
  .bar { flex-wrap: wrap; gap: 0 10px; padding: 6px 12px 0; }
  .nav { order: 3; flex-basis: 100%; min-height: 42px; }
  .who { margin-left: auto; }
}
@media (max-width: 520px) {
  .who .btn { padding: 4px 10px; min-height: 32px; font-size: 13px; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .card { padding: 20px 18px; }
  .htop h1 { font-size: 27px; }
  .demo { margin-top: 262px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
