* { box-sizing: border-box; }
:root {
  --bg: #07111f;
  --surface: #0d1726;
  --surface-2: #111e30;
  --line: rgba(216, 231, 255, .12);
  --text: #f4f8ff;
  --muted: #93a2b6;
  --soft: #c8d3e2;
  --blue: #2f84ff;
  --blue-2: #69a8ff;
  --green: #24d1a4;
  --amber: #f0b84b;
  --red: #ef5d68;
  --shadow: 0 18px 56px rgba(0, 0, 0, .34);
  --r: 8px;
  --app-height: 100dvh;
  --tg-content-safe-top: 0px;
  --tg-content-safe-bottom: 0px;
  --tg-content-safe-left: 0px;
  --tg-content-safe-right: 0px;
  --tabbar-height: 76px;
}
html {
  min-height: 100%;
  min-height: var(--app-height);
  background: var(--bg);
  overscroll-behavior: none;
}
body {
  margin: 0;
  min-height: 100%;
  min-height: var(--app-height);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 18% -8%, rgba(47, 132, 255, .22), transparent 32%),
    radial-gradient(circle at 92% 12%, rgba(36, 209, 164, .15), transparent 28%),
    linear-gradient(180deg, #060b12, #0b1119 52%, #060b12);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; }
button { cursor: pointer; }
svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-shell {
  width: 100%;
  max-width: 1180px;
  height: 100vh;
  height: var(--app-height);
  min-height: 0;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, .06);
  border-right: 1px solid rgba(255, 255, 255, .06);
  background: linear-gradient(180deg, rgba(12, 19, 29, .75), rgba(7, 11, 17, .97));
}
.topbar {
  flex: 0 0 auto;
  position: relative;
  z-index: 20;
  padding: calc(12px + env(safe-area-inset-top) + var(--tg-content-safe-top)) calc(16px + var(--tg-content-safe-right)) 12px calc(16px + var(--tg-content-safe-left));
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, .86);
  backdrop-filter: blur(18px);
}
.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--soft);
  background: transparent;
}
.icon-button:hover, .icon-button:focus-visible {
  border-color: rgba(105, 168, 255, .35);
  outline: none;
  background: rgba(255, 255, 255, .05);
}
.brand { text-align: center; line-height: 1.15; }
.brand strong { display: block; font-size: 17px; font-weight: 850; }
.brand span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 650; }
.content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px max(14px, var(--tg-content-safe-right)) calc(var(--tabbar-height) + 24px + env(safe-area-inset-bottom) + var(--tg-content-safe-bottom)) max(14px, var(--tg-content-safe-left));
}
.view { display: none; animation: fade .18s ease; }
.view.active { display: block; }
body.auth-locked .view,
body.auth-locked .tabbar {
  display: none !important;
}
body.auth-locked .content {
  padding-bottom: calc(24px + env(safe-area-inset-bottom) + var(--tg-content-safe-bottom));
}
body.auth-locked #backButton {
  visibility: hidden;
}
.web-only {
  display: none !important;
}
body.web-client:not(.auth-locked) .web-only {
  display: block !important;
}
@keyframes fade { from { opacity: .55; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.panel {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(20, 31, 45, .92), rgba(15, 23, 34, .92));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .20);
}
.banner {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(240, 184, 75, .28);
  border-radius: var(--r);
  color: #ffe6ad;
  background: rgba(240, 184, 75, .08);
  font-size: 13px;
  line-height: 1.45;
}
.banner.error {
  color: #ffdfe2;
  border-color: rgba(239, 93, 104, .32);
  background: rgba(239, 93, 104, .08);
}
.auth-gate {
  padding: 12px;
  display: grid;
  justify-items: stretch;
  text-align: left;
  gap: 14px;
  overflow: hidden;
}
.auth-gate[hidden] {
  display: none;
}
.auth-brand-image {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(87, 153, 255, .22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
  background: #07111f;
}
.auth-gate h1 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.18;
}
.auth-gate p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.public-hero {
  display: grid;
  gap: 8px;
}
.public-hero h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.12;
  font-weight: 900;
}
.public-hero p {
  max-width: 560px;
  color: var(--soft);
}
.public-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.public-badges span {
  padding: 6px 8px;
  border: 1px solid rgba(87, 153, 255, .22);
  border-radius: var(--r);
  color: var(--blue-2);
  background: rgba(47, 132, 255, .08);
  font-size: 12px;
  font-weight: 800;
}
.public-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}
.public-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .026);
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: start;
}
.public-grid article > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.public-grid strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}
.public-grid p {
  margin-top: 0;
  font-size: 13px;
}
.login-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .026);
}
.login-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}
.login-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
}
.login-card p {
  max-width: 390px;
}
.telegram-login-widget {
  width: 100%;
  min-height: 50px;
  display: grid;
  place-items: center;
  margin: 4px 0 2px;
}
.telegram-login-widget iframe {
  max-width: 100%;
}
.widget-loading {
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
  font-size: 13px;
  font-weight: 750;
}
.auth-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.profile-card {
  padding: 14px;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 13px;
  align-items: center;
}
.avatar {
  width: 58px;
  height: 58px;
  border-radius: var(--r);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 20px;
  background: linear-gradient(135deg, rgba(47, 132, 255, .95), rgba(36, 209, 164, .88));
}
.profile-main { min-width: 0; }
.profile-main h1 { margin: 0; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.profile-main p { margin: 4px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.logout-button {
  width: 100%;
  margin-top: 10px;
  color: #ffdfe2;
  border-color: rgba(239, 93, 104, .34);
  background: rgba(239, 93, 104, .075);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(36, 209, 164, .34);
  border-radius: var(--r);
  color: #dffdf6;
  background: rgba(36, 209, 164, .10);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(36, 209, 164, .75);
}
.status-pill.expired {
  color: #ffdfe2;
  border-color: rgba(239, 93, 104, .34);
  background: rgba(239, 93, 104, .10);
}
.status-pill.expired span { background: var(--red); box-shadow: 0 0 14px rgba(239, 93, 104, .75); }
.sub-card { margin-top: 10px; padding: 16px; }
.sub-head {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 13px;
  align-items: center;
}
.shield, .round-icon, .device-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  display: grid;
  place-items: center;
  color: var(--blue-2);
  background: rgba(47, 132, 255, .11);
  border: 1px solid rgba(47, 132, 255, .24);
}
.shield { color: var(--green); background: rgba(36, 209, 164, .11); border-color: rgba(36, 209, 164, .28); }
.device-icon.current { color: var(--green); background: rgba(36, 209, 164, .10); border-color: rgba(36, 209, 164, .25); }
.kicker { color: var(--green); font-size: 15px; font-weight: 850; }
.plan { margin-top: 3px; font-size: 20px; font-weight: 900; overflow-wrap: anywhere; }
.expires { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.primary {
  width: 100%;
  min-height: 54px;
  margin-top: 15px;
  border: 0;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  background: linear-gradient(180deg, #3a92ff, #1568dc);
  box-shadow: 0 16px 34px rgba(47, 132, 255, .28);
  font-weight: 900;
  font-size: 17px;
}
.primary:disabled { opacity: .55; cursor: not-allowed; }
.secondary {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  font-size: 13px;
  font-weight: 750;
}
.secondary.small { min-height: 34px; white-space: nowrap; }
.secondary.danger { color: #ffdfe2; border-color: rgba(239, 93, 104, .35); background: rgba(239, 93, 104, .08); }
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.metric + .metric { border-left: 1px solid var(--line); padding-left: 12px; }
.metric-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.metric-label svg { width: 18px; height: 18px; }
.metric-value { margin: 7px 0 9px; font-size: 21px; font-weight: 900; }
.metric-value small { color: var(--muted); font-size: 13px; }
.bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #42ead0); transition: width .25s ease; }
.fill.blue { background: linear-gradient(90deg, var(--blue), var(--blue-2)); }
.section-head {
  margin: 17px 2px 9px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}
.section-head h2 { margin: 0; font-size: 17px; line-height: 1.2; }
.link-button { border: 0; background: transparent; color: var(--blue-2); padding: 0; font-size: 13px; font-weight: 800; }
.list { overflow: hidden; }
.row {
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: transparent;
  padding: 13px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 11px;
  align-items: center;
  text-align: left;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: rgba(255, 255, 255, .035); }
.row-title { display: block; font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.row-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.row-state { color: var(--green); font-size: 12px; font-weight: 800; white-space: nowrap; }
.row-actions { display: flex; gap: 7px; align-items: center; }
.empty-row { padding: 16px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.ref-card { margin-top: 12px; padding: 15px; }
.ref-top {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
}
.bonus {
  min-width: 70px;
  text-align: center;
  padding: 8px;
  border: 1px solid rgba(47, 132, 255, .28);
  border-radius: var(--r);
  color: var(--blue-2);
  background: rgba(47, 132, 255, .10);
  font-weight: 900;
}
.copy-box {
  margin-top: 12px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .035);
}
.copy-label { color: var(--muted); font-size: 11px; font-weight: 750; }
.copy-line { margin-top: 5px; display: grid; grid-template-columns: 1fr 34px; gap: 8px; align-items: center; }
.copy-value { min-width: 0; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice, .instruction {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(240, 184, 75, .20);
  border-radius: var(--r);
  background: rgba(240, 184, 75, .055);
  color: #ffe6ad;
  font-size: 12px;
  line-height: 1.45;
}
.instruction { color: var(--text); background: linear-gradient(180deg, rgba(20, 31, 45, .92), rgba(15, 23, 34, .92)); border-color: var(--line); }
.support-card { display: grid; gap: 12px; }
.support-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; }
.support-chat {
  max-height: min(46vh, 440px);
  overflow: auto;
  display: grid;
  gap: 9px;
  padding: 4px;
}
.chat-bubble {
  width: min(88%, 560px);
  padding: 10px 12px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
}
.chat-bubble.own { justify-self: end; background: rgba(47,132,255,.16); border-color: rgba(47,132,255,.30); }
.chat-bubble.admin { justify-self: start; background: rgba(36,209,164,.10); border-color: rgba(36,209,164,.26); }
.chat-meta { color: var(--muted); font-size: 11px; font-weight: 800; margin-bottom: 5px; }
.chat-text { color: var(--text); font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-form { display: grid; gap: 9px; }
.support-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding: 12px;
  font: inherit;
  line-height: 1.4;
}
.support-form textarea:focus { outline: 2px solid rgba(47,132,255,.32); outline-offset: 1px; }
.steps { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 9px; color: var(--soft); font-size: 14px; line-height: 1.35; }
.num {
  width: 22px;
  height: 22px;
  border-radius: var(--r);
  display: grid;
  place-items: center;
  color: #08131e;
  background: var(--green);
  font-size: 12px;
  font-weight: 900;
}
.two-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.muted { color: var(--muted); }
.payment-card {
  margin-top: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(18, 29, 43, .95), rgba(13, 21, 32, .95));
}
.trial-card {
  margin-bottom: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-color: rgba(36, 209, 164, .28);
  background:
    radial-gradient(circle at 12% 15%, rgba(36, 209, 164, .18), transparent 34%),
    linear-gradient(180deg, rgba(18, 35, 47, .96), rgba(12, 21, 32, .96));
}
.trial-card[hidden] {
  display: none;
}
.trial-icon {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(36, 209, 164, .34);
  border-radius: var(--r);
  display: grid;
  place-items: center;
  color: var(--green);
  background: rgba(36, 209, 164, .08);
}
.trial-icon svg {
  width: 26px;
  height: 26px;
}
.trial-copy {
  min-width: 0;
}
.trial-copy h2 {
  margin: 3px 0 5px;
  font-size: 21px;
  line-height: 1.18;
  font-weight: 900;
}
.trial-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
}
.trial-card .primary {
  grid-column: 1 / -1;
  margin-top: 2px;
}
.payment-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.payment-head h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.22;
  font-weight: 850;
}
.payment-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  max-width: 420px;
}
.balance-pill {
  white-space: nowrap;
  min-width: 88px;
  padding: 7px 10px;
  border: 1px solid rgba(36, 209, 164, .28);
  border-radius: var(--r);
  background: rgba(36, 209, 164, .075);
  text-align: right;
}
.balance-pill span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.balance-pill strong {
  display: block;
  margin-top: 2px;
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
}
.payment-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}
.payment-plans {
  display: grid;
  gap: 8px;
}
.plan-option {
  position: relative;
  min-width: 0;
  min-height: 64px;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--text);
  background: rgba(255, 255, 255, .026);
  text-align: left;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 10px;
  row-gap: 5px;
  align-items: center;
}
.plan-option::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(147, 162, 182, .50);
  background: rgba(255, 255, 255, .025);
}
.plan-option.active {
  border-color: rgba(87, 153, 255, .62);
  background: rgba(47, 132, 255, .115);
  box-shadow: inset 0 0 0 1px rgba(87, 153, 255, .12);
}
.plan-option.active::before {
  border-color: rgba(36, 209, 164, .80);
  background: var(--green);
  box-shadow: inset 0 0 0 3px rgba(10, 20, 30, .95), 0 0 0 4px rgba(36, 209, 164, .10);
}
.plan-option strong {
  display: block;
  min-width: 0;
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.plan-option .plan-price {
  color: #fff;
  font-size: 17px;
  font-weight: 850;
  line-height: 1;
  text-align: right;
}
.plan-option .plan-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.plan-option .plan-meta span {
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.plan-option .plan-meta span:not(:last-child)::after {
  content: "\00a0\00b7\00a0";
  color: rgba(147, 162, 182, .70);
}
.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.pay-method {
  min-height: 48px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--text);
  background: rgba(255, 255, 255, .028);
  text-align: left;
  padding: 9px 10px;
}
.pay-method span {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}
.pay-method small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}
.pay-method.active {
  color: #fff;
  border-color: rgba(87, 153, 255, .62);
  background: rgba(47, 132, 255, .18);
}
.pay-method:disabled { opacity: .42; cursor: not-allowed; }
.payment-card #payButton { min-height: 52px; font-size: 16px; }
.subscription-connect-card {
  margin-top: 12px;
  padding: 14px;
}
.subscription-connect-card .primary {
  min-height: 48px;
  margin-top: 12px;
  font-size: 15px;
}
.payment-message {
  padding: 10px 12px;
  border: 1px solid rgba(36, 209, 164, .26);
  border-radius: var(--r);
  color: #c9fff1;
  background: rgba(36, 209, 164, .08);
  font-size: 13px;
  line-height: 1.4;
}
.payment-message.error {
  color: #ffdfe2;
  border-color: rgba(239, 93, 104, .32);
  background: rgba(239, 93, 104, .08);
}
.tabbar {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: none;
  z-index: 25;
  width: 100%;
  min-height: var(--tabbar-height);
  padding: 7px max(8px, var(--tg-content-safe-right)) calc(7px + env(safe-area-inset-bottom) + var(--tg-content-safe-bottom)) max(8px, var(--tg-content-safe-left));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  border-top: 1px solid var(--line);
  background: rgba(7, 17, 31, .92);
  backdrop-filter: blur(18px);
}
.tab {
  min-width: 0;
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--muted);
  background: transparent;
  display: grid;
  place-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 750;
}
.tab svg { width: 23px; height: 23px; }
.tab.active { color: var(--blue-2); background: rgba(47, 132, 255, .11); border-color: rgba(47, 132, 255, .22); }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom) + var(--tg-content-safe-bottom));
  transform: translate(-50%, 14px);
  width: min(392px, calc(100% - 28px));
  z-index: 40;
  padding: 12px 13px;
  border: 1px solid rgba(36, 209, 164, .26);
  border-radius: var(--r);
  background: rgba(12, 19, 29, .96);
  box-shadow: var(--shadow);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  font-size: 13px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 360px) {
  .content { padding-left: 10px; padding-right: 10px; }
  .payment-head { display: grid; }
  .balance-pill {
    justify-self: stretch;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  .payment-methods { grid-template-columns: 1fr; }
  .plan-option { grid-template-columns: 1fr; padding-right: 12px; }
  .plan-option .plan-price { text-align: left; font-size: 16px; }
  .profile-card { grid-template-columns: 50px 1fr; align-items: start; }
  .profile-card .status-pill { grid-column: 2; justify-self: start; }
  .avatar { width: 50px; height: 50px; }
  .metrics { grid-template-columns: 1fr; }
  .metric + .metric { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 12px; }
  .support-head { grid-template-columns: 44px 1fr; }
  .support-head .small { grid-column: 2; justify-self: start; }
  .chat-bubble { width: 94%; }
  .tab { font-size: 9px; }
}

@media (min-width: 760px) {
  .content {
    width: min(100%, 940px);
    margin: 0 auto;
    padding: 22px max(22px, var(--tg-content-safe-right)) calc(var(--tabbar-height) + 28px + env(safe-area-inset-bottom) + var(--tg-content-safe-bottom)) max(22px, var(--tg-content-safe-left));
  }
  .view.active#view-profile {
    display: grid;
    grid-template-columns: minmax(320px, .92fr) minmax(340px, 1.08fr);
    grid-template-areas:
      "profile devicesTitle"
      "subscription devicesList"
      "subscription referral";
    gap: 14px;
    align-items: start;
  }
  #view-profile .profile-card,
  #view-profile .logout-button,
  #view-profile .sub-card,
  #view-profile .section-head,
  #view-profile #devicePreview,
  #view-profile .ref-card {
    margin-top: 0;
  }
  #view-profile .profile-card,
  #view-profile .logout-button,
  #view-profile .sub-card {
    grid-column: 1;
  }
  #view-profile .profile-card {
    grid-area: profile;
  }
  #view-profile .logout-button {
    grid-row: 2;
    grid-column: 1;
    margin-top: -4px;
  }
  #view-profile .sub-card {
    grid-area: subscription;
  }
  #view-profile .section-head,
  #view-profile #devicePreview,
  #view-profile .ref-card {
    grid-column: 2;
  }
  #view-profile .section-head {
    grid-area: devicesTitle;
    align-self: end;
  }
  #view-profile #devicePreview {
    grid-area: devicesList;
  }
  #view-profile .ref-card {
    grid-area: referral;
  }
  .view.active:not(#view-profile) {
    max-width: 760px;
    margin: 0 auto;
  }
  .auth-gate {
    max-width: 560px;
    margin: 42px auto 0;
  }
  .auth-gate {
    max-width: 760px;
  }
  .public-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .public-grid article {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 760px) and (max-width: 860px) {
  .view.active#view-profile {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "subscription"
      "devicesTitle"
      "devicesList"
      "referral";
  }
  #view-profile .profile-card,
  #view-profile .logout-button,
  #view-profile .sub-card,
  #view-profile .section-head,
  #view-profile #devicePreview,
  #view-profile .ref-card {
    grid-column: 1;
  }
}

.device-share-card {
  margin-bottom: 12px;
  padding: 13px;
  display: grid;
  gap: 10px;
}
.device-share-head {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 11px;
  align-items: center;
}
.device-share-url-box {
  margin-top: 0;
  padding: 10px;
  background: rgba(255, 255, 255, .028);
}
.device-share-url-box .copy-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  font-size: 12px;
  color: var(--text);
}
.device-share-actions {
  margin-top: 0;
}
.device-share-actions .secondary,
#addDeviceButton {
  min-height: 42px;
}
