/* UNIT VPN — «террариум ночью».
   Фон — хвойная ночь, а не чёрный; акцент — зелёный Юни; второй цвет — янтарь (глаза, ключ, выгода).
   Уровни поверхностей различаются радиусом: сцена и пропуск 28, панели 22, элементы 14, чипы — капсулы.
   Geologica — заголовки и цифры, Golos Text — текст. */
@font-face { font-family: "Geologica"; font-weight: 100 900; font-display: swap;
  src: url("../fonts/geologica-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geologica"; font-weight: 100 900; font-display: swap;
  src: url("../fonts/geologica-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Golos Text"; font-weight: 400 900; font-display: swap;
  src: url("../fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 400 900; font-display: swap;
  src: url("../fonts/golos-text-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --bg: #06110C;
  --bg-2: #0B1D14;
  --surface: rgba(24, 56, 40, .42);      /* мох под стеклом */
  --surface-2: rgba(36, 78, 57, .45);
  --well: rgba(2, 10, 6, .45);           /* поле внутри панели */
  --line: rgba(190, 255, 220, .09);
  --line-hi: rgba(190, 255, 220, .18);
  --text: #ECF6EF;
  --muted: #93AE9F;
  --faint: #5E7C6C;
  --accent: #46E08F;
  --accent-hi: #8FF0BC;
  --accent-deep: #1FAE66;
  --on-accent: #062014;
  --amber: #FFC65C;
  --amber-deep: #D9902A;
  --ok: #46E08F;
  --warn: #FFC65C;
  --bad: #FF6F6F;

  --display: "Geologica", "Golos Text", system-ui, sans-serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-xl: 28px; --r-l: 22px; --r-m: 14px; --r-s: 10px;
  --gutter: 20px;
  --tabs-h: 76px;
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --safe-t: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --ease: cubic-bezier(.2, .8, .2, 1);
  --glass: blur(20px) saturate(140%);
  --lift: inset 0 1px 0 rgba(220, 255, 235, .07), 0 14px 30px -12px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); overscroll-behavior: none; }
body {
  color: var(--text); font: 400 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  user-select: none; -webkit-user-select: none;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 46%) fixed;
}
/* лунный свет сверху и тёплое отражение снизу */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 30% at 70% -4%, rgba(70, 224, 143, .22), transparent 70%),
    radial-gradient(50% 26% at 0% 30%, rgba(70, 224, 143, .10), transparent 70%),
    radial-gradient(60% 24% at 100% 104%, rgba(255, 198, 92, .07), transparent 70%);
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.view:focus { outline: none; }
.selectable { user-select: text; -webkit-user-select: text; }

#app { max-width: 520px; margin: 0 auto; min-height: 100%; position: relative; z-index: 1; overflow-x: clip; }
.view { padding: calc(var(--safe-t) + 16px) var(--gutter) calc(var(--tabs-h) + var(--safe-b) + 32px); min-height: 100vh; min-height: 100dvh; }
.view-ghost { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; z-index: 1; }

/* ---------- типографика ---------- */
.title { font: 650 28px/1.1 var(--display); letter-spacing: -.025em; }
.lead { color: var(--muted); margin-top: 8px; max-width: 36ch; }
.section { margin-top: 32px; }
.section-title { font: 600 13px/1.2 var(--body); color: var(--muted); margin-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.4; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.45; }

/* ---------- шапка ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.wordmark { font: 700 17px/1 var(--display); letter-spacing: .04em; display: flex; align-items: center; gap: 8px; }
.wordmark .mascot { border-radius: 50%; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-hi); }
.device { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.device svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.badge { font-size: 12px; line-height: 1; padding: 7px 10px; border-radius: 99px; color: var(--amber); background: rgba(255, 198, 92, .1); border: 1px solid rgba(255, 198, 92, .25); }

/* ---------- поверхности ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--lift); }
.panel, .pick, .tier, .app, .device, .linkbox, .addbar input, .btn-soft, .mini, .chip, .os, .tile, .pay-option { -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); }
.row { display: flex; align-items: center; gap: 14px; padding: 15px 16px; width: 100%; }
.row + .row { border-top: 1px solid var(--line); }
.row .grow { flex: 1; min-width: 0; }
.row .name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { width: 8px; height: 14px; flex: none; stroke: var(--faint); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cc { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font: 650 12px/1 var(--display); letter-spacing: .06em; background: var(--surface-2); border: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; display: inline-block; }
.dot.online { background: var(--ok); box-shadow: 0 0 0 3px rgba(70, 224, 143, .16); }
.dot.degraded { background: var(--warn); }
.dot.offline { background: var(--bad); }
.empty { padding: 22px 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line-hi); border-radius: var(--r-l); font-size: 14px; line-height: 1.45; }
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-m); background: rgba(70, 224, 143, .08); border: 1px solid rgba(70, 224, 143, .2); font-size: 13px; line-height: 1.45; color: #CBEFD9; }
.notice.warn { background: rgba(255, 198, 92, .08); border-color: rgba(255, 198, 92, .26); color: #F2E1BC; }
.pill { font-size: 12px; line-height: 1; padding: 7px 10px; border-radius: 99px; white-space: nowrap; background: rgba(70, 224, 143, .12); color: var(--accent); }
.pill.off { background: rgba(255, 111, 111, .12); color: var(--bad); }
.pill.soft { background: rgba(255, 198, 92, .12); color: var(--amber); }

/* ---------- кнопки ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 0 18px; border-radius: var(--r-m); font-weight: 600; text-align: center; transition: transform .15s var(--ease), opacity .2s, background .2s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-main { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 -3px 0 rgba(6, 32, 20, .25), inset 0 1px 0 rgba(255, 255, 255, .4), 0 12px 26px -10px rgba(70, 224, 143, .7); }
.btn-soft { background: var(--surface-2); border: 1px solid var(--line); }
.btn-quiet { min-height: 44px; color: var(--muted); font-weight: 500; }
.btn-danger { color: var(--bad); }
.btn svg.star { width: 15px; height: 15px; fill: currentColor; }
.stack { display: grid; gap: 10px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.pair .btn { min-height: 46px; font-size: 14px; }
.mini { height: 34px; padding: 0 12px; border-radius: var(--r-s); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 500; flex: none; }
.icon-btn { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.switch { flex: none; width: 50px; height: 30px; border-radius: 99px; background: rgba(190, 255, 220, .14); position: relative; transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #D3E6DA; transition: transform .25s var(--ease), background .25s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--on-accent); }
.switch.sm { width: 42px; height: 26px; }
.switch.sm::after { width: 20px; height: 20px; }
.switch.sm[aria-checked="true"]::after { transform: translateX(16px); }

/* ---------- витрина: сцена с Юни ---------- */
.scene { position: relative; margin-top: 18px; height: 236px; border-radius: var(--r-xl); overflow: hidden;
  background: radial-gradient(120% 90% at 70% 0%, #1D5A3C 0%, #0F3324 46%, #0A2219 100%);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 -40px 60px -30px rgba(0, 0, 0, .5); }
.scene.dim { background: radial-gradient(120% 90% at 70% 0%, #173A2B 0%, #0D2619 50%, #091A12 100%); }
.scene .jungle { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .mascot { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); }
.intro { margin-top: 22px; }
.intro h1 { font: 700 32px/1.06 var(--display); letter-spacing: -.035em; max-width: 13ch; text-wrap: balance; }
.intro p { color: var(--muted); margin-top: 12px; max-width: 36ch; }
.intro .pill { display: inline-block; margin-bottom: 12px; }

/* тарифы — три ценника в ряд */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 24px; }
.tier { position: relative; display: grid; gap: 2px; padding: 16px 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: border-color .2s, background .2s, transform .15s var(--ease); }
.tier:active { transform: scale(.97); }
.tier .t-num { font: 700 30px/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tier .t-unit { font-size: 13px; color: var(--muted); }
.tier .t-price { font: 650 17px/1.1 var(--display); margin-top: 14px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.tier .t-price svg { width: 13px; height: 13px; fill: var(--amber); }
.tier .t-per { font-size: 12px; color: var(--faint); white-space: nowrap; }
.tier .t-save { position: absolute; top: -9px; right: 8px; font: 650 11px/1 var(--display); padding: 5px 7px; border-radius: 99px; background: var(--amber); color: #2A1A02; }
.tier[aria-checked="true"] { border-color: var(--accent); background: linear-gradient(180deg, rgba(70, 224, 143, .2), rgba(70, 224, 143, .06)); box-shadow: 0 0 0 1px var(--accent), 0 14px 30px -14px rgba(70, 224, 143, .6); }
.tier[aria-checked="true"] .t-per { color: var(--muted); }

/* как это работает — три шага в строку */
.how { margin: 0; padding: 0; list-style: none; counter-reset: h; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.how li { counter-increment: h; display: grid; gap: 8px; align-content: start; color: var(--muted); font-size: 13px; line-height: 1.35; padding: 14px 12px; border-radius: 18px; border: 1px solid var(--line); }
.how li::before { content: counter(h); width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); color: var(--accent); font: 650 13px/26px var(--display); text-align: center; }
.how li b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

/* ---------- кабинет: пропуск ---------- */
.pass-wrap { position: relative; margin-top: 14px; padding-top: 118px; }
.pass-wrap .pass-title { position: absolute; left: 2px; top: 18px; max-width: 54%; }
.pass-wrap .pass-title h1 { font: 700 26px/1.08 var(--display); letter-spacing: -.03em; }
.pass-wrap .pass-title p { font-size: 13px; color: var(--muted); margin-top: 6px; }
/* Юни смотрит на заголовок, лапы на кромке пропуска, хвост свисает над корешком */
.pass-wrap > .mascot { position: absolute; right: -4px; top: 14px; z-index: 2; transform: scaleX(-1); }
.pass {
  --stub: 104px;
  position: relative; display: grid; grid-template-columns: 1fr var(--stub); border-radius: 24px;
  background: linear-gradient(135deg, #1E6B47 0%, #13492F 55%, #0E3524 100%);
  box-shadow: inset 0 1px 0 rgba(220, 255, 235, .16), 0 22px 40px -18px rgba(0, 0, 0, .7);
  -webkit-mask: radial-gradient(circle 11px at calc(100% - var(--stub)) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 11px at calc(100% - var(--stub)) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 11px at calc(100% - var(--stub)) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 11px at calc(100% - var(--stub)) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.pass::before { /* чешуя хамелеона, едва заметно */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .5;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .07) 0 2px, transparent 2.5px) 0 0 / 14px 12px;
}
.pass-main { position: relative; padding: 20px 18px 18px; min-width: 0; }
.pass-main .line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pass-main .label { font-size: 13px; color: #BFE5CF; }
.pass-days { font: 750 56px/.95 var(--display); letter-spacing: -.05em; margin-top: 14px; font-variant-numeric: tabular-nums; }
.pass-days small { font: 500 15px/1 var(--body); letter-spacing: 0; color: #BFE5CF; margin-left: 8px; }
.pass-until { font-size: 13px; color: #BFE5CF; margin-top: 10px; }
.pass .bar { margin-top: 14px; background: rgba(0, 0, 0, .25); }
.pass .bar b { background: var(--accent); }
.pass-stub { position: relative; display: grid; place-items: center; align-content: center; gap: 8px; padding: 16px 10px; border-left: 2px dashed rgba(220, 255, 235, .28); color: #BFE5CF; font-size: 12px; }
.pass-stub .mini-qr { width: 70px; height: 70px; padding: 5px; border-radius: 10px; background: #F4FFF8; }
.pass-stub .mini-qr svg { width: 100%; height: 100%; display: block; }
.bar { height: 6px; border-radius: 6px; background: rgba(190, 255, 220, .12); overflow: hidden; }
.bar b { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }

/* строка ключа */
.keyrow { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; }
.keyrow .k { flex: 1; min-width: 0; font: 450 13px/1.4 var(--display); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keyrow .k.open { color: var(--text); white-space: normal; word-break: break-all; }
.keyrow-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.keyrow-label .section-title { margin: 0; }
.keyrow-label button { font-size: 13px; color: var(--accent); font-weight: 500; }

/* ---------- подключение ---------- */
.oses { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); scrollbar-width: none; }
.oses::-webkit-scrollbar { display: none; }
.os { flex: none; height: 38px; padding: 0 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--muted); white-space: nowrap; transition: color .2s, border-color .2s, background .2s; }
.os[aria-checked="true"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; transition: border-color .2s, background .2s; }
.app b { font: 650 18px/1.1 var(--display); display: flex; align-items: center; justify-content: space-between; }
.app b i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--faint); position: relative; flex: none; }
.app span { font-size: 12px; line-height: 1.35; color: var(--muted); }
.app[aria-checked="true"] { border-color: var(--accent); background: linear-gradient(180deg, rgba(70, 224, 143, .16), rgba(70, 224, 143, .04)); }
.app[aria-checked="true"] b i { border-color: var(--accent); }
.app[aria-checked="true"] b i::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.step { margin-top: 22px; }
.step > h3 { font: 600 15px/1.2 var(--display); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.step > h3 i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--accent); font: 650 12px/22px var(--display); text-align: center; font-style: normal; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links .mini { height: 40px; padding: 0 14px; font-size: 14px; }
details.manual { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
details.manual summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 14px; display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
details.manual summary::-webkit-details-marker { display: none; }
details.manual summary svg { transform: rotate(90deg); transition: transform .2s; }
details.manual[open] summary svg { transform: rotate(-90deg); }
.confirmed { display: flex; gap: 12px; align-items: center; padding: 10px 16px 10px 8px; border-radius: var(--r-m); margin-top: 14px; background: rgba(70, 224, 143, .12); border: 1px solid rgba(70, 224, 143, .35); color: #CBEFD9; font-size: 14px; }
.waiting { display: grid; justify-items: center; margin-top: 8px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(190, 255, 220, .14); border-top-color: var(--accent); margin: 6px auto; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- серверы: список с сигналом ---------- */
.auto-card { margin-top: 20px; }
.auto-card .row { padding: 16px; }
.auto-card .name { font: 650 17px/1.2 var(--display); }
.srv-list { margin-top: 14px; }
.srv { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; transition: background .2s; }
.srv + .srv { border-top: 1px solid var(--line); }
.srv .grow { flex: 1; min-width: 0; }
.srv .city { font-weight: 550; display: block; }
.srv .sub { font-size: 12px; color: var(--muted); display: block; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv .sub em { font-style: normal; color: var(--accent); }
.srv .sub em.amber { color: var(--amber); }
.srv .sub em.bad { color: var(--bad); }
.srv .ping { font: 600 15px/1 var(--display); font-variant-numeric: tabular-nums; text-align: right; min-width: 52px; }
.srv .ping small { font: 400 11px/1 var(--body); color: var(--muted); margin-left: 2px; }
.signal { display: flex; align-items: flex-end; gap: 2px; height: 16px; flex: none; }
.signal i { width: 4px; border-radius: 1.5px; background: rgba(190, 255, 220, .16); }
.signal i:nth-child(1) { height: 25%; } .signal i:nth-child(2) { height: 50%; } .signal i:nth-child(3) { height: 75%; } .signal i:nth-child(4) { height: 100%; }
.signal i.on { background: var(--accent); }
.signal.mid i.on { background: var(--amber); }
.srv.is-current { background: rgba(70, 224, 143, .09); box-shadow: inset 3px 0 0 var(--accent); }
.srv.is-off { opacity: .45; }

/* ---------- маршруты ---------- */
.modes { margin-top: 20px; }
.mode { align-items: flex-start; }
.radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--faint); position: relative; transition: border-color .2s; }
.mode .radio { margin-top: 1px; }
.mode[aria-checked="true"] .radio { border-color: var(--accent); }
.mode[aria-checked="true"] .radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); }
.mode .name { white-space: normal; }
.mode .desc { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.addbar { display: flex; gap: 8px; }
.addbar input { flex: 1; min-width: 0; height: 50px; padding: 0 16px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); outline: none; user-select: text; -webkit-user-select: text; font-size: 16px; }
.addbar input::placeholder { color: var(--faint); }
.addbar input:focus { border-color: var(--accent); }
.addbar button { flex: none; width: 50px; height: 50px; border-radius: var(--r-m); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.addbar button svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.field-error { color: var(--bad); font-size: 13px; margin-top: 8px; min-height: 18px; }
.field { width: 100%; height: 52px; padding: 0 16px; border-radius: var(--r-m); background: var(--well); border: 1px solid var(--line); outline: none; font-size: 16px; user-select: text; -webkit-user-select: text; margin-top: 16px; }
.field:focus { border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; max-width: 100%; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip svg { width: 10px; height: 10px; stroke: var(--muted); stroke-width: 2; fill: none; stroke-linecap: round; flex: none; }
.chip.ip { font-family: var(--display); font-size: 13px; }
.chip.preset { border-style: dashed; border-color: var(--line-hi); color: var(--muted); }
.chip.preset.done { border-style: solid; color: var(--accent); border-color: rgba(70, 224, 143, .4); }
.backlink { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); height: 32px; margin-bottom: 8px; }
.backlink svg { transform: rotate(180deg); }

/* ---------- бонусы ---------- */
.hero-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px; }
.hero-head .mascot { margin: -8px -10px -14px 0; }
.hero-head .lead { max-width: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; }
.stats > div { padding: 16px 14px; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font: 700 28px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats span { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.3; }
.linkbox { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.linkbox code { flex: 1; min-width: 0; font: 400 12px/1.4 var(--display); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- профиль ---------- */
.who { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font: 650 20px/1 var(--display); background: var(--surface-2); border: 1px solid var(--line-hi); color: var(--accent); flex: none; }
.subcard { padding: 18px; margin-top: 22px; }
.subcard .big { font: 700 36px/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.subcard .big small { font: 400 15px/1 var(--body); color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.subcard .bar { margin-top: 16px; }
.plan .price { font: 650 16px/1 var(--display); white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.plan .price svg { width: 14px; height: 14px; fill: var(--amber); }
.plan .save { font-size: 12px; color: var(--amber); margin-top: 3px; }
.hist .row { padding: 13px 16px; }
.hist .sum { font: 600 15px/1 var(--display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hist .sum.plus { color: var(--accent); }
.pay-option { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); margin-top: 10px; }
.pay-option b { font: 600 16px/1.2 var(--display); display: block; }
.pay-option small { font-size: 13px; color: var(--muted); display: block; margin-top: 3px; }
.pay-option .sum { margin-left: auto; font: 650 18px/1 var(--display); white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.pay-option .sum svg { width: 15px; height: 15px; fill: var(--amber); }

/* ---------- админ ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.tile { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.tile b { display: block; font: 700 28px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tile b small { font: 400 13px/1 var(--body); color: var(--muted); letter-spacing: 0; }
.tile span { display: block; font-size: 13px; color: var(--muted); margin-top: 8px; }
.adm-server { flex-wrap: wrap; row-gap: 10px; }
.adm-server .ctl { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.adm-server .ctls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; width: 100%; padding-left: 22px; }
.adm-server .ctl { white-space: nowrap; }
.event { display: flex; gap: 12px; padding: 12px 16px; font-size: 13px; align-items: baseline; }
.event + .event { border-top: 1px solid var(--line); }
.event time { color: var(--faint); font-family: var(--display); font-variant-numeric: tabular-nums; flex: none; font-size: 12px; }
.event.down b, .event.failover b { color: var(--warn); font-weight: 500; }
.event b { font-weight: 400; }

/* ---------- нижняя навигация: стекло и скользящая подложка ---------- */
#tabs {
  position: fixed; z-index: 20; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); max-width: 496px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 26px;
  border: 1px solid var(--line-hi); background: rgba(10, 30, 20, .62);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(220, 255, 235, .1), 0 16px 40px rgba(0, 0, 0, .5);
}
#tabs::before { /* подложка активной вкладки едет за пальцем, как в Telegram */
  content: ""; position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 4); border-radius: 20px;
  background: rgba(70, 224, 143, .14); box-shadow: inset 0 0 0 1px rgba(70, 224, 143, .2);
  transform: translateX(calc(var(--tab, 0) * 100%)); transition: transform .36s cubic-bezier(.32, .72, 0, 1);
}
#tabs button { position: relative; height: 52px; display: grid; justify-items: center; align-content: center; gap: 4px; font-size: 11px; color: var(--faint); border-radius: 20px; transition: color .25s; }
#tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#tabs button[aria-current="page"] { color: var(--accent); }

/* ---------- шторка и тост ---------- */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(1, 6, 3, .58); opacity: 0; transition: opacity .28s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 520px; margin: 0 auto; max-height: 92dvh; overflow-y: auto;
  background: rgba(10, 28, 19, .86); -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid var(--line-hi); border-bottom: 0; border-radius: 30px 30px 0 0; box-shadow: inset 0 1px 0 rgba(220, 255, 235, .12);
  padding: 10px var(--gutter) calc(22px + var(--safe-b)); transform: translateY(100%); transition: transform .38s cubic-bezier(.32, .72, 0, 1);
}
.sheet::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 4px; background: var(--line-hi); margin: 0 auto 18px; }
.open > .backdrop { opacity: 1; } .open > .sheet { transform: none; }
.sheet h2 { font: 650 22px/1.2 var(--display); letter-spacing: -.02em; }
.sheet .lead { max-width: none; }
.qr { width: 208px; height: 208px; margin: 20px auto; padding: 10px; background: #F4FFF8; border-radius: 20px; }
.qr svg { width: 100%; height: 100%; display: block; }
.steps { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; font-size: 14px; color: var(--muted); }
.steps li::before { content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); color: var(--accent); font: 650 12px/22px var(--display); text-align: center; }
#toast {
  position: fixed; left: 16px; right: 16px; margin: 0 auto; width: fit-content; max-width: min(440px, calc(100vw - 32px));
  bottom: calc(var(--tabs-h) + var(--safe-b) + 22px); z-index: 60; transform: translateY(12px); padding: 12px 16px; border-radius: 16px;
  background: rgba(22, 52, 37, .9); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); border: 1px solid var(--line-hi);
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); text-align: center;
}
#toast.show { opacity: 1; transform: none; }
#toast.err { background: rgba(72, 24, 24, .92); border-color: rgba(255, 111, 111, .4); }
.skeleton { height: 248px; display: grid; place-items: center; color: var(--faint); }
.fatal { padding: 64px 8px; text-align: center; }
.fatal h1 { font: 650 22px/1.2 var(--display); margin: 8px 0 10px; }
.fatal .mascot { margin: 0 auto; }

/* ---------- Юни ---------- */
.mascot { display: block; flex: none; overflow: visible; }
.mascot.portrait { overflow: hidden; }
.mascot.live { cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* Все части крутятся вокруг своих суставов: точки заданы в разметке (transform-origin в координатах рисунка) */
.mascot.live :is(.yu-tail, .yu-body, .yu-head, .yu-pupil, .yu-blink, .yu-tongue, .yu-swing, .yu-gift, .yu-bow,
  .yu-leaf, .yu-leaf2, .yu-spark, .yu-tear, .yu-dot) { animation-delay: var(--yu-delay, 0s); }

/* дыхание: тело чуть расширяется от лап вверх */
.mascot.live .yu-body { animation: yu-breathe 3.8s ease-in-out infinite; }
@keyframes yu-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.018, .975); } }
/* голова: лёгкий кивок и наклон, как будто прислушивается */
.mascot.live .yu-head { animation: yu-head 6.4s ease-in-out infinite; }
@keyframes yu-head { 0%, 100% { transform: rotate(0); } 18% { transform: rotate(-2.2deg); } 34% { transform: rotate(1deg); } 60% { transform: rotate(-.6deg); } 78% { transform: rotate(1.8deg); } }
/* хвост: спираль медленно подкручивается */
.mascot.live .yu-tail { animation: yu-tail 5.2s ease-in-out infinite; }
@keyframes yu-tail { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-5deg); } 70% { transform: rotate(2.5deg); } }
/* глаз-башенка: хамелеон осматривается — главное, что делает его живым */
.mascot.live .yu-pupil { animation: yu-look 7s cubic-bezier(.6, 0, .2, 1) infinite; }
@keyframes yu-look {
  0%, 14% { transform: translate(0, 0); } 18%, 32% { transform: translate(3.6px, -2.4px); }
  36%, 50% { transform: translate(-3.4px, 1.6px); } 54%, 70% { transform: translate(2px, 3px); }
  74%, 100% { transform: translate(0, 0); }
}
/* моргание */
.mascot.live .yu-blink { animation: yu-blink 5.3s infinite; }
@keyframes yu-blink { 0%, 91%, 100% { transform: scaleY(1); } 93.5% { transform: scaleY(.08); } }
/* листья на ветке колышутся */
.mascot.live .yu-leaf { animation: yu-leaf 4.6s ease-in-out infinite; }
.mascot.live .yu-leaf2 { animation: yu-leaf 5.4s ease-in-out infinite reverse; }
@keyframes yu-leaf { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(6deg); } }

/* позы */
.mascot.live .yu-tongue { animation: yu-tongue 2.6s cubic-bezier(.5, 0, .2, 1) infinite; }
@keyframes yu-tongue { 0%, 30%, 100% { transform: scale(.15); } 42%, 62% { transform: scale(1.08); } 70% { transform: scale(1); } }
.mascot.live .yu-swing { animation: yu-swing 2.8s ease-in-out infinite; }
@keyframes yu-swing { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.mascot.live .yu-gift { animation: yu-hop 2.4s ease-in-out infinite; }
@keyframes yu-hop { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(-5px) rotate(-3deg); } 80% { transform: translateY(0) rotate(2deg); } }
.mascot.live .yu-bow { animation: yu-bow 1.8s ease-in-out infinite; }
@keyframes yu-bow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12, .92); } }
.mascot.live .yu-spark { animation: yu-spark 1.9s ease-in-out infinite; }
.mascot.live .yu-spark.s2 { animation-duration: 2.3s; animation-delay: -.6s; }
.mascot.live .yu-spark.s3 { animation-duration: 1.6s; animation-delay: -1.1s; }
@keyframes yu-spark { 0%, 100% { transform: scale(.4) rotate(0); opacity: .3; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
.mascot.live .yu-tear { animation: yu-tear 2.6s ease-in infinite; }
@keyframes yu-tear { 0%, 20% { transform: translateY(0); opacity: 1; } 85% { transform: translateY(26px); opacity: 0; } 100% { opacity: 0; } }
.mascot.live .yu-dot { animation: yu-dot 1.4s ease-in-out infinite; }
.mascot.live .yu-dot.d2 { animation-delay: .2s; } .mascot.live .yu-dot.d3 { animation-delay: .4s; }
@keyframes yu-dot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.mascot.live.pose-sad .yu-body { animation-duration: 5.4s; }
.mascot.live.pose-happy .yu-body { animation: yu-bounce 1.3s cubic-bezier(.3, 0, .3, 1) infinite; }
@keyframes yu-bounce { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(1.04, .93); } 55% { transform: scale(.98, 1.04); } }

/* маскировка по нажатию: кожа проходит через цвета листвы, янтаря и неба и возвращается */
.mascot.camo .s1 { animation: yu-camo1 2.2s ease-in-out; }
.mascot.camo .s2 { animation: yu-camo2 2.2s ease-in-out; }
.mascot.camo .s3 { animation: yu-camo3 2.2s ease-in-out; }
@keyframes yu-camo1 { 25% { stop-color: #FFE38A; } 50% { stop-color: #8FE3FF; } 75% { stop-color: #FFB3C7; } }
@keyframes yu-camo2 { 25% { stop-color: #FFC65C; } 50% { stop-color: #4FB8F0; } 75% { stop-color: #F27BA0; } }
@keyframes yu-camo3 { 25% { stop-color: #D9902A; } 50% { stop-color: #2C7FC0; } 75% { stop-color: #C44D77; } }
.mascot.camo .yu-body { animation: yu-squash .5s cubic-bezier(.3, 0, .3, 1) 2; }
@keyframes yu-squash { 0%, 100% { transform: scale(1, 1); } 40% { transform: scale(1.06, .9); } 70% { transform: scale(.97, 1.04); } }

@media (max-width: 350px) {
  :root { --gutter: 16px; }
  .intro h1 { font-size: 28px; }
  .tier .t-num { font-size: 26px; }
  .pass-days { font-size: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .panel, .sheet, #tabs, .tier, .app { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: #10291D; }
}

/* форма добавления сервера */
.sheet .row input[type="radio"], .sheet .row input[type="checkbox"] { accent-color: var(--accent); width: 20px; height: 20px; flex: none; }
.sheet select.field { appearance: none; -webkit-appearance: none; color: var(--text); }
.sheet .row { cursor: pointer; }

/* ---------- конструктор заказа: срок 1–365 дней и 3–10 устройств ---------- */
.order { margin-top: 22px; padding: 18px 16px 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); display: grid; gap: 18px; }
.order.in-sheet { margin-top: 16px; background: rgba(2, 10, 6, .25); }
.order [hidden] { display: none; }
.ord-block { display: grid; gap: 12px; }
.ord-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ord-head .label { font: 600 13px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--well); border: 1px solid var(--line); }
.seg button { height: 38px; padding: 0 6px; border-radius: 10px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--muted); transition: background .2s, color .2s; }
.seg button[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-hi); }

.daysbox { display: inline-flex; align-items: baseline; gap: 6px; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--well); border: 1px solid var(--line); transition: border-color .2s; }
.daysbox:focus-within { border-color: var(--accent); }
.daysbox input { width: 3.2ch; background: none; border: 0; outline: none; color: var(--text); font: 700 22px/44px var(--display); text-align: right; font-variant-numeric: tabular-nums; user-select: text; -webkit-user-select: text; -moz-appearance: textfield; }
.daysbox input::-webkit-outer-spin-button, .daysbox input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.daysbox span { color: var(--muted); font-size: 14px; }

/* ползунок: заполненная часть — зелёная, ручка — светлая капсула с тенью */
.range { --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; touch-action: pan-y; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--accent-deep), var(--accent) var(--p), rgba(190, 255, 220, .12) var(--p)); }
.range::-moz-range-track { height: 8px; border-radius: 99px; background: rgba(190, 255, 220, .12); }
.range::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--accent); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: #F2FFF7; border: 0; box-shadow: 0 0 0 6px rgba(70, 224, 143, .22), 0 6px 16px rgba(0, 0, 0, .45); transition: box-shadow .15s; }
.range::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #F2FFF7; border: 0; box-shadow: 0 0 0 6px rgba(70, 224, 143, .22), 0 6px 16px rgba(0, 0, 0, .45); }
.range:active::-webkit-slider-thumb { box-shadow: 0 0 0 10px rgba(70, 224, 143, .28), 0 6px 16px rgba(0, 0, 0, .45); }
.range:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 99px; }

.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.presets .chip { justify-content: center; padding: 0 6px; font-size: 13px; white-space: nowrap; transition: border-color .2s, color .2s, background .2s; }
.presets .chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-hi); background: rgba(70, 224, 143, .12); }

.devrow { display: flex; align-items: center; gap: 14px; }
.stepper { display: grid; grid-template-columns: 44px 40px 44px; align-items: center; justify-items: center; height: 48px; border-radius: 14px; background: var(--well); border: 1px solid var(--line); flex: none; }
.stepper button { display: grid; place-items: center; text-align: center; width: 44px; height: 46px; padding: 0; font: 500 24px/1 var(--display); color: var(--text); border-radius: 12px; }
.stepper button:disabled { color: var(--faint); }
.stepper button:not(:disabled):active { background: var(--surface-2); }
.stepper output { min-width: 2ch; text-align: center; font: 700 22px/1 var(--display); }
.devdots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; flex: 1; min-width: 0; }
.devdots i { height: 18px; border-radius: 5px; background: rgba(190, 255, 220, .08); transition: background .2s, transform .2s var(--ease); }
.devdots i.on { background: var(--accent); transform: scaleY(1.15); }
.devdots i.paid { background: rgba(70, 224, 143, .45); }

.ord-sum { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.ord-price { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ord-price b { font: 750 34px/1 var(--display); letter-spacing: -.03em; display: inline-flex; align-items: center; gap: 6px; }
.ord-price b svg { width: 22px; height: 22px; fill: var(--amber); }
.ord-price span { font-size: 13px; color: var(--amber); font-weight: 500; }
.ord-note { font-size: 13px; line-height: 1.4; color: var(--muted); min-height: 18px; }
.ord-note.err { color: var(--warn); }
.order .btn-main { margin-top: 2px; }
.device-row .mini { min-width: 92px; }
.device-row .grow { min-width: 0; }
.device-row .name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 350px) {
  .presets { grid-template-columns: repeat(2, 1fr); }
  .ord-price b { font-size: 30px; }
}
