/* HYSEEDS — стиль как у Telegram-канала HYNEWS: чёрный фон, кислотный лайм, белый пиксельный шрифт, ступенчатые углы */
:root {
  --bg: #080808; --bg2: #0c0c0c; --bg3: #141414; --line: #1f1f1f; --line2: #2b2b2b;
  --lime: #d3ff2e; --lime-d: #a2c326; --white: #ffffff; --dim: #8f8f8f; --text: #ececec; --ctl: #666666;
  --px: 'Pixelizer', 'Pixelify Sans', 'Courier New', monospace;
  --body: 'Onest', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --pw: 348px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.45 var(--body); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.lime { color: var(--lime); }
code { background: var(--bg3); padding: 1px 5px; color: var(--lime); font-size: 12px; }

/* ступенчатые («пиксельные») углы: 4px ступень, 8px вырез */
.px {
  --s: 4px; --s2: 8px;
  clip-path: polygon(
    0 var(--s2), var(--s) var(--s2), var(--s) var(--s), var(--s2) var(--s), var(--s2) 0,
    calc(100% - var(--s2)) 0, calc(100% - var(--s2)) var(--s), calc(100% - var(--s)) var(--s), calc(100% - var(--s)) var(--s2), 100% var(--s2),
    100% calc(100% - var(--s2)), calc(100% - var(--s)) calc(100% - var(--s2)), calc(100% - var(--s)) calc(100% - var(--s)), calc(100% - var(--s2)) calc(100% - var(--s)), calc(100% - var(--s2)) 100%,
    var(--s2) 100%, var(--s2) calc(100% - var(--s)), var(--s) calc(100% - var(--s)), var(--s) calc(100% - var(--s2)), 0 calc(100% - var(--s2)));
}

.app { display: flex; height: 100%; }

/* ---------- панель: сверху закреплены логотип и сид, ниже прокручиваемые разделы ---------- */
.panel {
  position: relative; flex: none; width: var(--pw); height: 100%; display: flex; flex-direction: column;
  background: var(--bg2); border-right: 2px solid var(--line); z-index: 3; transition: margin-left .25s ease;
}
body.collapsed .panel { margin-left: calc(-1 * var(--pw)); visibility: hidden; transition: margin-left .25s ease, visibility 0s .25s; }
.top { flex: none; padding: 14px 16px 12px; border-bottom: 2px solid var(--line); background: var(--bg2); }
.body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 16px 0; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.brand { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.logo { display: block; line-height: 0; }
.logo img { display: block; width: 170px; max-width: 100%; height: auto; }
.lbl { display: block; margin: 0 0 6px; font: 500 12px var(--px); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.seedrow { display: flex; gap: 8px; }
.subrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.mut { color: var(--dim); font-size: 12px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--lime); font: 700 12px var(--px); letter-spacing: .06em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--white); }
input[type=text], select {
  width: 100%; min-width: 0; background: var(--bg); border: 2px solid var(--ctl); color: var(--white); padding: 10px 12px;
  font: 700 16px var(--body); font-variant-numeric: tabular-nums; border-radius: 0;
}
input[type=text]:focus, select:focus { border-color: var(--lime); outline: none; }
select { font-size: 15px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--lime) 50%), linear-gradient(135deg, var(--lime) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.btn { border: 2px solid var(--ctl); background: var(--bg3); color: var(--white); padding: 10px 14px; font: 700 13px var(--px); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; border-radius: 0; }
.btn:hover { border-color: var(--lime); }
.btn.primary { flex: none; background: var(--lime); color: var(--bg); border: 0; padding: 0 16px; font-size: 14px; }
.btn.primary:hover { background: #e4ff6d; }
.sq { width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--bg3); border: 2px solid var(--ctl); text-decoration: none; color: var(--lime); font: 700 20px/1 var(--px); border-radius: 0; padding: 0; }
.sq:hover { border-color: var(--lime); background: #1b1b1b; }

/* разделы-аккордеоны */
.acc { border-bottom: 2px solid var(--line); padding: 0 0 12px; margin-bottom: 0; }
.acc > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; padding: 13px 0 10px; font: 700 15px/1 var(--px); letter-spacing: .08em; text-transform: uppercase; color: var(--white); user-select: none; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary > span { display: flex; align-items: center; gap: 8px; }
.acc > summary > span::before { content: ''; width: 8px; height: 8px; background: var(--lime); flex: none; }
.acc > summary::after { content: ''; width: 8px; height: 8px; border: solid var(--dim); border-width: 0 2px 2px 0; transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .15s; flex: none; }
.acc[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.acc > summary i { margin-left: auto; font-style: normal; font: 500 12px var(--body); letter-spacing: 0; text-transform: none; color: var(--dim); }
.acc > summary:hover { color: var(--lime); }
.acc .lbl { margin-top: 4px; }
.acc select { margin-bottom: 12px; }

/* быстрый выбор и слои */
.quick { display: flex; gap: 6px; margin-bottom: 10px; }
.chip { flex: 1; background: var(--bg3); border: 2px solid var(--ctl); color: var(--text); padding: 6px 4px; font: 700 12px var(--px); letter-spacing: .05em; text-transform: uppercase; border-radius: 0; }
.chip:hover { border-color: var(--lime); color: var(--white); }
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fbtn { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 8px 4px 4px; background: var(--bg3); border: 2px solid var(--line2); color: var(--dim); font: 500 12.5px/1.15 var(--body); text-align: left; border-radius: 0; filter: grayscale(.8); transition: border-color .15s; }
.fbtn canvas { opacity: .55; }
.fbtn canvas { width: 26px; height: 26px; image-rendering: pixelated; flex: none; }
.fbtn span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbtn { color: #a8a8a8; }
.fbtn.on { filter: none; color: var(--white); border-color: var(--lime); }
.fbtn.on canvas { opacity: 1; }
.fbtn:hover { border-color: var(--lime); color: var(--white); }
.fbtn .cnt { font: 700 11px var(--px); color: var(--lime); flex: none; }
.hint { margin: 10px 0 0; font-size: 12px; color: var(--dim); }

.chk { display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; cursor: pointer; color: var(--text); font-size: 13px; }
.chk input { position: absolute; opacity: 0; }
.chk .box { width: 18px; height: 18px; border: 2px solid var(--ctl); background: var(--bg); flex: none; position: relative; }
.chk input:checked + .box { background: var(--lime); border-color: var(--lime); }
.chk input:checked + .box::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(40deg); }
.chk input:focus-visible + .box { outline: 2px solid var(--lime); outline-offset: 2px; }

.leg { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.leg li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text); min-width: 0; }
.leg li i { width: 14px; height: 14px; flex: none; border: 2px solid var(--bg); outline: 1px solid var(--line2); }
.leg .gh { grid-column: 1 / -1; margin-top: 8px; font: 700 12px var(--px); letter-spacing: .08em; text-transform: uppercase; color: var(--lime); }

.onl { margin: 0 0 10px; color: var(--lime); font: 700 13px var(--px); letter-spacing: .05em; text-transform: uppercase; }
.onl[hidden] { display: none; }
.foot { margin: 0 0 8px; font-size: 12px; line-height: 1.5; color: var(--dim); }
.foot a { color: var(--lime); }

/* ступенчатый лаймовый угол с иконкой, как в постах канала (в потоке, ничего не перекрывает) */
.stair { height: 96px; width: 132px; margin: 14px -16px 0 auto; background: var(--lime); position: relative; pointer-events: none;
  clip-path: polygon(100% 0, 100% 100%, 0 100%, 0 78%, 14% 78%, 14% 56%, 31% 56%, 31% 34%, 48% 34%, 48% 12%, 66% 12%, 66% 0); }
.stair img { position: absolute; right: 16px; bottom: 14px; width: 40px; height: 34px; }

/* ---------- карта ---------- */
.stage { position: relative; flex: 1; min-width: 0; height: 100%; overflow: hidden; background: var(--bg); }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#map.drag { cursor: grabbing; }

.modebar { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; }
.tab { background: rgba(8, 8, 8, .92); color: var(--dim); border: 0; padding: 10px 18px; font: 700 14px var(--px); letter-spacing: .06em; text-transform: uppercase; }
.tab:hover { color: var(--white); }
.tab.on { background: var(--lime); color: var(--bg); }

.unfold { position: absolute; left: 14px; top: 14px; z-index: 4; display: none; align-items: center; gap: 6px; background: var(--lime); color: var(--bg); border: 0; padding: 10px 16px; font: 700 14px var(--px); letter-spacing: .04em; text-transform: uppercase; }
.unfold img { image-rendering: pixelated; }
body.collapsed .unfold { display: inline-flex; }
body.collapsed .modebar { left: calc(50% + 40px); }

.hud { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; align-items: flex-end; z-index: 2; }
.coords { background: rgba(8, 8, 8, .92); border-left: 4px solid var(--lime); padding: 8px 16px 8px 12px; min-width: 230px; font-variant-numeric: tabular-nums; }
.coords b { display: block; font: 700 15px var(--px); letter-spacing: .04em; color: var(--white); }
.coords span { display: block; color: var(--dim); font-size: 12.5px; }
.coords #hh { color: var(--lime); }
.tools { display: flex; flex-direction: column; gap: 6px; }
.tools .sq { background: rgba(8, 8, 8, .92); }

/* окно по клику на значок */
#pop { position: absolute; z-index: 4; width: 262px; background: var(--bg2); border: 2px solid var(--lime); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
#pop[hidden] { display: none; }
.phead { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--lime); color: var(--bg); padding: 7px 8px 7px 12px; font: 700 15px var(--px); text-transform: uppercase; letter-spacing: .03em; }
.phead .x { background: none; border: 0; color: var(--bg); font: 700 22px/1 var(--px); padding: 0 6px; }
.pc { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 8px; font-variant-numeric: tabular-nums; color: var(--white); }
.pc b { color: var(--lime); font-family: var(--px); font-size: 17px; }
.pc button { background: var(--bg3); border: 2px solid var(--line2); color: var(--white); padding: 4px 8px; font: 500 12px var(--body); border-radius: 0; }
.pc button:hover { border-color: var(--lime); }
.pm { padding: 0 12px 8px; color: var(--dim); font-size: 12px; line-height: 1.4; word-break: break-word; }
.pd { display: flex; gap: 8px; align-items: center; padding: 0 12px 10px; color: var(--text); cursor: pointer; }
.pd input { accent-color: var(--lime); width: 16px; height: 16px; }
.ps { display: block; width: calc(100% - 24px); margin: 0 12px 12px; padding: 8px; font-size: 12px; }

#toast { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); background: var(--lime); color: var(--bg); padding: 9px 16px; font: 700 14px var(--px); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 6; white-space: nowrap; }
#toast.on { opacity: 1; }

#boot { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; z-index: 20; transition: opacity .3s, visibility .3s; }
#boot img { width: 260px; max-width: 70vw; height: auto; animation: bob 1s steps(2) infinite; }
#boot.gone { opacity: 0; visibility: hidden; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ---------- телефон: панель — нижний лист ---------- */
@media (max-width: 760px) {
  :root { --pw: 100%; }
  .app { flex-direction: column-reverse; }
  .panel { width: 100%; height: 48%; border-right: 0; border-top: 2px solid var(--line); margin-left: 0 !important; transition: height .25s ease; }
  body.collapsed .panel { height: 0; border: 0; overflow: hidden; }
  .top { padding: 10px 12px 10px; }
  .brand { margin-bottom: 4px; }
  .logo img { width: 120px; }
  .body { padding: 4px 12px 0; }
  .stage { height: auto; flex: 1; }
  .coords { min-width: 0; padding: 6px 10px 6px 10px; }
  .coords span { display: none; }
  .coords span#hh { display: block; }
  .hud { right: 8px; bottom: 8px; }
  .modebar { top: 8px; left: 8px; right: 8px; transform: none; gap: 4px; }
  .tab { flex: 1; padding: 9px 6px; font-size: 13px; }
  body.collapsed .modebar { left: 8px; }
  .unfold { left: 8px; top: auto; bottom: 8px; padding: 9px 14px; }
  .leg { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .panel, #toast, #boot { transition: none; } #boot img { animation: none; } }

/* ---------- v0.1: доступность, язык, подсказка про сид ---------- */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 30; background: var(--lime); color: var(--bg); padding: 10px 14px; font: 700 14px var(--px); text-decoration: none; text-transform: uppercase; }
.skip:focus { top: 8px; }
.brand .btns { display: flex; gap: 6px; flex: none; }
.sq.lang { font-size: 13px; letter-spacing: .02em; }
.hintlink { color: var(--lime); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.hintlink:hover { color: var(--white); }
#map:focus-visible { outline: 2px solid var(--lime); outline-offset: -4px; }
.langbar { position: absolute; left: 14px; bottom: 14px; z-index: 5; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 28px); background: var(--bg2); border: 2px solid var(--lime); padding: 8px 8px 8px 14px; font-size: 13px; }
.langbar[hidden] { display: none; }
.langbar a { color: var(--lime); font-weight: 700; white-space: nowrap; }
.langbar button { background: none; border: 0; color: var(--text); font: 700 20px/1 var(--px); padding: 2px 8px; }
.nojs { position: fixed; inset: 0; background: var(--bg); color: #fff; padding: 2rem; font: 16px/1.5 var(--body); z-index: 30; }
.about p { margin: 0 0 8px; }
.about ul { margin: 0 0 8px; padding-left: 18px; color: var(--text); font-size: 13px; }
.about li { margin: 2px 0; }
.about a { color: var(--lime); }
.ver { color: var(--dim); font-size: 12px; margin: 4px 0 0; }
@media (max-width: 760px) { .langbar { left: 8px; right: 8px; bottom: 62px; max-width: none; } .langbar span { flex: 1; } }
@media (forced-colors: active) { .fbtn.on, .tab.on { outline: 2px solid; } }
