/* Шрифты сайта hopneo.ru (site/frontend/src/fonts.css): Montserrat - текст, Unbounded - заголовки и названия. Файлы
   те же, что на сайте, раздаются этим сервером. Оба - Google Fonts, SIL OFL 1.1. */
@font-face { font-family: 'Montserrat'; font-weight: 100 900; font-display: swap; src: url(/montserrat-cyr.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-weight: 100 900; font-display: swap; src: url(/montserrat-lat.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-weight: 500 700; font-display: swap; src: url(/unbounded-cyr.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 500 700; font-display: swap; src: url(/unbounded-lat.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #101317; --deep: #0a0c10; --card: #191d23; --raised: #20252d;
  --line: rgba(233, 237, 245, .08); --line-strong: rgba(233, 237, 245, .16);
  --text: #e9edf5; --text-2: #a6afbf; --text-3: #8a93a6;
  --accent: #754dcf; --accent-hover: #8055e2; --accent-ink: #b6a0ff; --focus: #b6a0ff; --bad: #e5776c;
  --ease: cubic-bezier(.22, 1, .36, 1); --t: 150ms;
  --font: 'Montserrat', system-ui, sans-serif;
  --heading: 'Unbounded', 'Montserrat', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--deep); color: var(--text); font: 400 14px/20px var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#map { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#map.drag { cursor: grabbing; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.px { display: inline-block; width: 8px; height: 8px; flex: none; }

/* левая панель */
#panel { position: fixed; left: 16px; top: 16px; width: 280px; padding: 16px; display: flex; flex-direction: column; max-height: calc(100% - 96px); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; line-height: 16px; }
.brand img { width: 14px; height: 17px; image-rendering: pixelated; }
.who { margin-top: 12px; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.who b { font-family: var(--heading); font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { color: var(--text-2); }
.open { margin-top: 4px; color: var(--text-2); }
.open em { font-style: normal; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 36px; border-radius: 10px; font-weight: 500; transition: background-color var(--t) var(--ease), transform var(--t) var(--ease); }
.btn:active { transform: scale(.98); }
.btn-main { width: 100%; margin-top: 16px; background: var(--accent); color: #fff; }
.btn-main:hover { background: var(--accent-hover); }
.btn-main:disabled { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.list-head { margin-top: 24px; display: flex; justify-content: space-between; color: var(--text-3); font-size: 12px; line-height: 16px; }
.list-head i { font-style: normal; font-variant-numeric: tabular-nums; }
#list { margin-top: 8px; padding: 0 8px; margin-left: -8px; margin-right: -8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; }
.row { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px; margin: 0 -8px; border-radius: 8px; text-align: left; transition: background-color var(--t) var(--ease); }
.row:hover, .row.on { background: var(--raised); }
.row .nm { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .rk { color: var(--text-3); font-size: 12px; }
.none { color: var(--text-3); padding: 8px 0; }

/* углы */
#coords { position: fixed; left: 16px; bottom: 16px; height: 32px; padding: 0 12px; display: flex; align-items: center; gap: 12px; border-radius: 10px; font: 500 12px/16px var(--font); color: var(--text-2); font-variant-numeric: tabular-nums; }
#coords span { min-width: 64px; }
#zoom { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; }
#zoom button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--text-2); transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
#zoom button:hover { background: var(--raised); color: var(--text); }
#zoom button + button { border-top: 1px solid var(--line); }
#zoom svg { width: 16px; height: 16px; }

/* карточка при наведении */
#tip { position: fixed; left: 0; top: 0; padding: 12px; border-radius: 12px; pointer-events: none; opacity: 0; transition: opacity var(--t) var(--ease); min-width: 176px; }
#tip.on { opacity: 1; }
#tip .t1 { display: flex; align-items: center; gap: 8px; font-family: var(--heading); font-weight: 600; letter-spacing: -.02em; }
#tip .t2 { margin-top: 4px; color: var(--text-2); }
#tip .t3 { color: var(--text-3); font-size: 12px; line-height: 16px; margin-top: 2px; }

/* сообщения состояний */
.msg { position: fixed; left: 50%; transform: translateX(-50%); width: min(400px, calc(100% - 32px)); padding: 20px 24px; text-align: left; }
.msg h2 { font-family: var(--heading); font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.025em; }
.msg p { margin-top: 8px; color: var(--text-2); }
.msg .small { display: block; color: var(--text-3); font-size: 12px; line-height: 16px; margin-top: 12px; }
#hint { bottom: 24px; }
#gate { top: 50%; transform: translate(-50%, -50%); }
#code-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
#code-form .small { margin-top: 0; }
.code-row { display: flex; gap: 8px; margin-top: 8px; }
.code-row input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--deep); border: 1px solid var(--line-strong); font: 600 14px/20px var(--font); font-variant-numeric: tabular-nums; letter-spacing: .06em; text-transform: uppercase; }
.code-row input::placeholder { color: var(--text-3); }
.code-row .btn-main { width: auto; margin-top: 0; padding: 0 16px; }
.err { color: var(--bad) !important; font-size: 12px; line-height: 16px; }
[hidden] { display: none !important; }

/* телефон: шапка сверху, список уезжает в выдвижную панель снизу */
#sheetbar { display: none; }
@media (max-width: 720px) {
  #panel { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; padding: 0 16px 16px; max-height: 70%; transition: transform 240ms var(--ease); }
  #panel .brand, #panel .who, #panel .open { display: none; }
  #sheetbar { display: flex; align-items: center; justify-content: space-between; height: 56px; width: 100%; text-align: left; position: relative; }
  #sheetbar .grip { position: absolute; left: 50%; top: 6px; width: 32px; height: 4px; margin-left: -16px; border-radius: 2px; background: var(--line-strong); }
  #sheetbar b { font-weight: 500; }
  #sheetbar span { color: var(--text-3); font-size: 12px; }
  #sheetbar svg { width: 16px; height: 16px; color: var(--text-3); transition: transform 240ms var(--ease); }
  #panel.open-sheet #sheetbar svg { transform: rotate(180deg); }
  #panel .sheet-body { display: none; }
  #panel.open-sheet .sheet-body { display: flex; flex-direction: column; min-height: 0; }
  .btn-main { margin-top: 0; }
  .list-head { margin-top: 16px; }
  #top.on { position: fixed; left: 8px; right: 8px; top: 8px; padding: 10px 12px; border-radius: 14px; display: flex !important; align-items: center; gap: 10px; }
  #top img { width: 16px; height: 20px; image-rendering: pixelated; }
  #top .tn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #top .tn b { font-family: var(--heading); font-weight: 600; letter-spacing: -.025em; }
  #top .tn span { color: var(--text-2); margin-left: 6px; }
  #top .pc { color: var(--text-2); font-size: 12px; text-align: right; line-height: 16px; }
  #top .pc em { font-style: normal; color: var(--text); font-weight: 500; }
  #coords, #zoom { display: none !important; }
  #hint { bottom: 88px; }
  .row { height: 44px; }
}
#top { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
