body { min-height: 100dvh; }
.shell { width: min(560px, 100%); margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom)); }
.boot { min-height: 100dvh; display: grid; place-items: center; }
/* Brand marks come from /assets/brand/sprite.svg (see taksidi.ru/brand/). */
svg.mark.big { width: 96px; margin-inline: auto; animation: pulse 1.4s ease-in-out infinite; }
.topbar .brand svg.logo { height: 26px; }
.login-logo { margin: 0 auto 6px; }
.login-logo svg.logo-v { display: block; width: 190px; height: auto; color: var(--text); --vpn: var(--accent); fill: currentColor; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .7; } }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }

/* Account page with tabs (owner 2026-10-18). Phones: a bottom bar like in apps; wide screens: a side menu. */
/* owner 2026-10-18: the bottom bar must be easy to notice — a floating raised bar, the current tab's icon in an
   amber pill (as in phone apps), brighter labels */
.home { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.home .pages { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; justify-content: center;
  background: rgba(55, 45, 33, .97); backdrop-filter: blur(12px); border: 1px solid rgba(255, 240, 220, .12); border-radius: 22px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55); padding: 7px 4px; }
.pages a { flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 4px 2px;
  border-radius: 12px; color: rgba(246, 239, 230, .78); text-decoration: none; font: 700 11px/1.15 var(--font-body); text-align: center; -webkit-tap-highlight-color: transparent; }
.pages a .i { box-sizing: border-box; width: 58px; height: 32px; padding: 5px 17px; border-radius: 999px; transition: background .2s, color .2s; }
.pages a.on { color: var(--text); }
.pages a.on .i { background: rgba(233, 162, 59, .22); color: var(--accent); }
.pages a:active .i { background: rgba(255, 240, 220, .08); }
.page > section:first-child, .page-cols > section:first-child { margin-top: 0; }
.logout-btn span { display: none; }
body:has(.home .pages) .toast { bottom: calc(104px + env(safe-area-inset-bottom)); }  /* above the bottom bar */
@media (min-width: 900px) {
  .shell.home { width: min(1120px, 100%); padding: 24px 32px 40px; display: grid; grid-template-columns: 220px minmax(0, 1fr);
    grid-template-areas: "top top" "nav main"; column-gap: 28px; align-items: start; }
  .home .topbar { grid-area: top; margin-bottom: 26px; }
  .home .pages { grid-area: nav; position: sticky; top: 24px; flex-direction: column; justify-content: flex-start; gap: 4px;
    left: auto; right: auto; bottom: auto; background: none; backdrop-filter: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
  .pages a { max-width: none; flex: none; flex-direction: row; gap: 12px; padding: 12px 14px; font-size: 15px; text-align: start; color: var(--muted); }
  .pages a .i, .pages a.on .i, .pages a:active .i { width: 22px; height: 22px; padding: 0; background: none; }
  .pages a:hover { color: var(--text); }
  .pages a.on { background: var(--surface); color: var(--text); }
  .pages a.on .i { color: var(--accent); }
  .home .page { grid-area: main; min-width: 0; }
  .page-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .page-cols > section, .page-cols > section.block { margin-top: 0; }
  .page-sub .page-cols { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .page-devices > section, .page-partner > section { max-width: 760px; }
  .top-actions .logout-btn { width: auto; padding: 0 14px; display: flex; align-items: center; gap: 8px; font: 700 14px/1 var(--font-body); }
  .top-actions .logout-btn span { display: inline; }
  .home .foot { text-align: start; }
}
.topbar .brand { display: flex; align-items: center; text-decoration: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,240,220,.05); color: var(--text); font-size: 18px; cursor: pointer; display: grid; place-items: center; }

section.block { margin-top: 14px; padding: 20px; }
.block h2 { font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: grid; gap: 10px; }
.small { font-size: 14px; }

/* status */
.status { padding: 22px; position: relative; overflow: hidden; }
/* the yak behind the status card stands level (owner 2026-10-18: it was tilted) */
.status::after { content: ""; position: absolute; right: -28px; top: -18px; width: 210px; height: 170px; background: url(/assets/yak-white.png) center/contain no-repeat; opacity: .06; pointer-events: none; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font: 700 13px/1 var(--font-body); background: rgba(255,240,220,.06); }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.badge.on i { background: var(--ok); box-shadow: 0 0 0 4px rgba(95,208,139,.18); }
.badge.off i { background: var(--bad); }
.status .days { font: 800 46px/1 var(--font-head); margin: 18px 0 4px; }
.status .until { color: var(--muted); }
.status .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.meter { height: 8px; border-radius: 999px; background: rgba(255,240,220,.08); overflow: hidden; margin-top: 14px; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

.trial { padding: 20px; background: var(--surface-2); }
.trial h3 { font-size: 18px; margin-bottom: 6px; }

/* connect tabs */
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: var(--surface-2); margin-bottom: 14px; overflow-x: auto; }
.tabs button { flex: 1; min-width: max-content; padding: 10px 8px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font: 700 14px/1 var(--font-body); cursor: pointer; }
.tabs button.on { background: var(--bg); color: var(--text); }
/* platform drop-down in «Подключить устройство» (owner 2026-10-18) */
.platform-pick { display: grid; gap: 6px; margin-bottom: 14px; }
.platform-select { appearance: none; -webkit-appearance: none; width: 100%; height: 48px; padding: 0 44px 0 14px; border-radius: 14px;
  border: 1px solid var(--line); color: var(--text); font: 700 16px var(--font-body); cursor: pointer;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9a23b' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center/18px; }
.platform-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.platform-select option { background: var(--bg-2); color: var(--text); }
html[dir="rtl"] .platform-select { background-position: left 14px center; padding: 0 14px 0 44px; }
/* a subscription with no real end date (decades ahead): ∞ instead of a day count (owner 2026-10-18) */
.status .days.inf { font-size: 64px; line-height: .9; }
ol.steps { margin: 0 0 14px; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 8px 8px 12px; }
.linkbox code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 13px/1.4 var(--font-mono); color: var(--muted); }
.qr { display: grid; place-items: center; padding: 14px; background: #fff; border-radius: var(--radius-sm); width: max-content; margin: 12px auto 0; }

/* devices */
.device { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.device:first-of-type { border-top: 0; }
.device .ico { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,240,220,.06); display: grid; place-items: center; }
.device .meta { flex: 1; min-width: 0; }
.device .meta div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* partner */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.stat { padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.stat b { display: block; font: 800 20px/1.1 var(--font-head); }
.stat span { color: var(--muted); font-size: 12px; }
.lvls { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.lvls span { padding: 6px 10px; border-radius: 999px; background: rgba(233,162,59,.12); color: var(--accent-2); font-weight: 700; font-size: 13px; }
/* partner materials + the short card on the subscription page (2026-10-20) */
.kit-item { padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); margin-top: 10px; }
.kit-text { white-space: pre-line; margin: 6px 0 10px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.kit-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; align-items: start; }
.kit-img { display: flex; flex-direction: column; gap: 8px; text-decoration: none; font-weight: 700; font-size: 13px; }
.kit-img img { width: 100%; border-radius: var(--radius-sm); background: var(--surface-2); }
.teaser { display: flex; gap: 14px; align-items: flex-start; }
.teaser h2 { margin-bottom: 4px; }
.teaser p { margin: 0 0 12px; }
.teaser-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); }
.teaser-ico .i { width: 22px; height: 22px; }

/* login */
.login { min-height: calc(100dvh - 64px); display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 12px; }
.login svg.mark.big { margin: 0 auto 10px; animation: none; }
.login h1 { font-size: 28px; }
.login p { color: var(--muted); margin: 0 0 14px; }
.login .btn { width: 100%; }
.waiting { padding: 18px; text-align: left; }

/* sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); max-height: 88dvh; overflow-y: auto; z-index: 41;
  background: var(--bg-2); border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); }
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: rgba(255,240,220,.18); margin: 0 auto 14px; }
.sheet h3 { font-size: 20px; margin-bottom: 14px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan { text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,240,220,.04); color: var(--text); cursor: pointer; font: inherit; }
.plan.on { border-color: var(--accent); background: rgba(233,162,59,.10); }
.plan .t { font-weight: 700; font-size: 14px; }
.plan .p { font: 800 22px/1.1 var(--font-head); margin-top: 8px; }
.plan .m { color: var(--muted); font-size: 12px; margin-top: 2px; }
/* plans (2026-10-27): plan tabs above the term cards */
.plan-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.plan-seg .seg-btn { padding: 10px 4px; }
.plan-seg .seg-btn b { font-size: 13px; }
.seg-btn { display: grid; gap: 4px; padding: 10px 8px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,240,220,.04); color: var(--text); font: inherit; cursor: pointer; text-align: center; }
.seg-btn b { font-size: 14px; }
.seg-btn.on { border-color: var(--accent); background: rgba(233,162,59,.10); }
.plan-lead { margin: 0 0 12px; min-height: 2.6em; }
.providers { display: grid; gap: 8px; margin-top: 14px; }
.provider { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,240,220,.04); color: var(--text); font: 700 15px/1 var(--font-body); cursor: pointer; }
.provider.on { border-color: var(--accent); background: rgba(233,162,59,.10); }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin-top: 10px; }

.sheet .close { position: absolute; top: 14px; right: 14px; }
.toast { width: max-content; text-align: center; position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: var(--surface-2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 22px; }
.foot a { color: var(--muted); }
.provider .pl { display: inline-flex; align-items: center; gap: 10px; }
.provider .pl .i, .device .ico .i { color: var(--accent); }
.icon-btn .i { width: 18px; height: 18px; }
.btn .i { width: 18px; height: 18px; }

/* language switcher + RTL (Persian) + CJK fonts */
.top-actions { display: flex; align-items: center; gap: 8px; }
.login-top { display: flex; align-items: center; justify-content: space-between; }
.login-top .brand { display: flex; align-items: center; text-decoration: none; }
.login-top .brand svg.logo { height: 26px; }
.lang-select { appearance: none; -webkit-appearance: none; background: rgba(255,240,220,.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9ab98' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center/12px;
  color: var(--text); border: 1px solid var(--line); border-radius: 12px; height: 40px; padding: 0 24px 0 10px; font: 600 13px var(--font-body); cursor: pointer; }
.lang-select option { background: var(--bg-2); color: var(--text); }
html[dir="rtl"] .lang-select { background-position: left 8px center; padding: 0 10px 0 24px; }
html:lang(fa) { --font-head: "Vazirmatn", system-ui, sans-serif; --font-body: "Vazirmatn", system-ui, sans-serif; }
html:lang(zh) { --font-head: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
html[dir="rtl"] .status::after { right: auto; left: -28px; transform: scaleX(-1); }
html[dir="rtl"] .sheet .close { right: auto; left: 14px; }
html[dir="rtl"] ol.steps { padding-left: 0; padding-right: 20px; }
html[dir="rtl"] .plan { text-align: right; }
/* Yak ID */
.yid-input{width:100%;box-sizing:border-box;padding:14px 16px;margin:4px 0 12px;border-radius:14px;border:1px solid var(--line);background:var(--surface-2);color:inherit;font:700 20px/1.2 var(--font-mono);letter-spacing:.06em;text-align:center}
.yid-input:focus{outline:2px solid var(--accent);outline-offset:1px}
.yid-box{margin-top:14px}
.yid-box .linkbox{margin-top:6px}
.yid{font:700 16px/1.3 var(--font-mono) !important;letter-spacing:.08em;color:var(--accent-2) !important}

/* e-mail registration */
.login-h { font-size: 18px; margin: 22px 0 4px; }
.login-or { margin: 18px 0 6px; opacity: .8; }
.login.auth { justify-content: flex-start; padding-top: 7vh; }  /* the tabs stay put when the form height changes */
/* owner 2026-10-18: no big centred logo (it is already top-left), the account name instead */
.login-title { font-size: 34px; letter-spacing: -0.01em; }
.login-title span { color: var(--accent); }
.login-title.sm { font-size: 24px; margin-bottom: 4px; }
.login-tabs { margin: 22px 0 2px; }
/* «или» + «Войти через Telegram» under the form */
.login-or-line { display: flex; align-items: center; gap: 12px; margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.login-or-line::before, .login-or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-tg .i { width: 20px; height: 20px; }
/* owner 2026-10-18: Telegram's own colour and logo on its button (a third-party brand, not our amber) */
.login .btn-tg { background: #2aabee; color: #fff; border: 0; }
.login .btn-tg:hover { background: #229ed9; }
.btn .brand-logo { width: 22px; height: 22px; flex: none; }
/* owner 2026-10-18: a more compact sign-in / sign-up page */
.login.auth { padding-top: 3vh; gap: 10px; }
.login.auth .login-title { font-size: 28px; }
.login.auth .login-tabs { margin: 10px 0 0; }
.login.auth .login-tabs button { padding: 10px 8px; }
.login.auth > p { margin: 0; font-size: 14px; }
.login.auth .mail-input, .login.auth .pw-wrap, .login.auth .pw-wrap .yid-input { margin: 0; }
.login.auth .mail-input { padding: 12px 14px; font-size: 16px; }
.login.auth .btn { min-height: 48px; }
.login.auth .btn-link { padding: 4px; }
.login.auth .login-or-line { margin: 2px 0 0; }
.login .btn-ya { background: #000; color: #fff; border: 1px solid var(--line); }
.login .btn-ya:hover { background: #1a1a1a; }
.login .social { display: flex; gap: 10px; }
.login .social .btn { flex: 1; min-width: 0; padding: 0 12px; }
.login-tabs button { padding: 12px 8px; font-size: 15px; transition: background .2s, color .2s; }
.mail-input { font: 500 17px/1.3 var(--font-body); letter-spacing: 0; text-align: start; }
.btn-link { background: none; border: 0; color: var(--accent); font: 600 14px/1 var(--font-body); padding: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.mail-box { margin-top: 14px; }
/* passwords */
.mail-input + .mail-input, .mail-input + .pw-wrap, .pw-wrap + .pw-wrap { margin-top: -4px; }
/* password field with the eye button inside it */
.pw-wrap { position: relative; margin: 4px 0 12px; }
.pw-wrap .yid-input { margin: 0; padding-right: 52px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pw-eye:hover { color: var(--text); }
.pw-eye:focus-visible { outline: 2px solid var(--accent); }
.pw-eye .i { width: 22px; height: 22px; }
.pw-eye .eye-off, .pw-eye[aria-pressed="true"] .eye-on { display: none; }
.pw-eye[aria-pressed="true"] .eye-off { display: block; }
.pw-eye[aria-pressed="true"] { color: var(--accent); }
.mail-inline { flex: 1; min-width: 0; background: transparent; border: 0; color: inherit; font: 500 15px/1.3 var(--font-body); padding: 6px 4px; outline: none; }
/* confirm dialog (ask) */
.ask-back { display: grid; place-items: center; padding: 16px; }
.ask { width: min(400px, 100%); background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.ask p { margin: 0 0 18px; line-height: 1.5; }
.ask-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* dangerous actions (delete account) */
.btn-danger { background: var(--bad); color: #17120d; }
.btn-danger-ghost { color: var(--bad); }
/* withdrawal form */
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field input, .field select { height: 46px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 0 14px; font: 500 15px var(--font-body); }
.field select option { background: var(--bg-2); }
.wd-card { min-height: 60px; margin-bottom: 12px; }
.wd-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.wd-sum b { font: 800 20px var(--font-head); }
.wd-row { padding: 8px 0; border-top: 1px solid var(--line); gap: 8px; }
.wd-st { font-size: 13px; font-weight: 700; white-space: nowrap; }
.wd-st.paid { color: var(--ok); } .wd-st.rejected, .wd-st.failed { color: var(--bad); } .wd-st.pending, .wd-st.approved { color: var(--accent); } .wd-st.canceled { color: var(--muted); }
.wd-st .btn-link { padding: 0 0 0 8px; font-size: 13px; }
/* renewal by the subscription link (?pay=): a tall page, starts at the top */
.login.renew { justify-content: flex-start; padding-top: 18px; }
.login.renew .row { text-align: left; }

/* several subscriptions on one account (2026-10-24) */
.extra + .extra { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--surface-2); }
