/* maiVPN 8.2 — home dashboard only. Other pages are kept from 8.0. */
:root { --dashboard-red: #ff1738; }

/* Critical: the bottom bar must be viewport-fixed, never part of page flow. */
#content > .bottom-nav {
  position: fixed !important;
  inset: auto auto 0 50%;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 45;
  width: min(720px, 100%);
  height: calc(72px + env(safe-area-inset-bottom, 0px));
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  background: rgba(13, 12, 15, .95);
  border-top: 1px solid rgba(255, 255, 255, .075);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
body.modal-open { overflow: hidden; }

/* The exact brand icon comes from the user-approved red m, not a font glyph. */
.brand-image,
.brand-symbol.brand-image {
  display: block;
  flex-shrink: 0;
  padding: 0;
  letter-spacing: normal;
  font-size: initial;
  line-height: normal;
  color: unset;
  background: transparent;
  transform: none;
  object-fit: contain;
  width: 80px;
  height: 54px;
  animation: none;
}
.brand-symbol.small.brand-image { width: 43px; height: 31px; }
.brand-symbol.gate-icon.brand-image { width: 118px; height: 79px; margin: 0 auto 25px; }
.loader .brand-image { width: 128px; height: 86px; }
.brand b .accent { font-size: inherit; color: var(--dashboard-red); }

/* The animated black and red atmosphere is limited to the HOME tab. */
body[data-current-page="home"] { background: #09080a; }
body[data-current-page="home"]::before,
body[data-current-page="home"]::after {
  content: "";
  pointer-events: none;
  position: fixed;
  z-index: 0;
  inset: -18%;
  border-radius: 50%;
  will-change: transform;
}
body[data-current-page="home"]::before {
  background: radial-gradient(ellipse 48% 37% at 91% 12%, rgba(236, 11, 42, .37), rgba(93, 4, 18, .08) 56%, transparent 80%);
  animation: mai-red-drift 18s ease-in-out infinite alternate;
}
body[data-current-page="home"]::after {
  background: radial-gradient(ellipse 55% 42% at 10% 88%, rgba(190, 5, 31, .22), rgba(65, 4, 18, .09) 55%, transparent 80%);
  animation: mai-red-drift-alt 23s ease-in-out infinite alternate;
}
body[data-current-page="home"] .app { position: relative; z-index: 1; }
body[data-current-page="home"] .topbar { background: rgba(12, 9, 11, .85); }

.dashboard-home { padding: 12px 16px calc(114px + env(safe-area-inset-bottom, 0px)); }
.dashboard-home button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.dashboard-home .surface {
  background: linear-gradient(150deg, rgba(27, 27, 31, .94), rgba(15, 16, 19, .96));
  border: 1px solid rgba(255, 255, 255, .068);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}
.dashboard-home button.surface:active { border-color: rgba(255, 23, 56, .52); transform: scale(.985); }

/* Account tile */
.home-profile {
  width: 100%; padding: 13px 15px;
  display: flex; align-items: center; gap: 13px;
  border-radius: 19px;
  color: #f5f5f7; text-align: left;
  cursor: pointer;
}
.home-profile-icon {
  display: grid; place-items: center;
  flex: 0 0 49px; height: 49px;
  background: #170b0f;
  border-radius: 13px;
}
.home-profile-icon img { display: block; width: 36px; height: 27px; object-fit: contain; }
.home-profile-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 4px; }
.home-profile-copy strong { font-size: 15px; font-weight: 750; }
.home-profile-copy small { font-size: 13px; color: #a6a5ad; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-chevron { font-size: 30px; color: #9b98a1; line-height: 1; }

/* Subscription card matching the reference. */
.dashboard-home .dashboard-status {
  margin: 13px 0 0;
  padding: 17px 16px 16px;
  border-radius: 22px;
  color: #f7f7fa;
}
.dash-status-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dash-status-head > div { min-width: 0; }
.dash-muted { color: #a5a2ad; font-size: 12px; }
.dashboard-status .dash-status-head h3 { margin: 7px 0 0; font-size: 23px; font-weight: 780; letter-spacing: -.035em; line-height: 1.1; }
/* Explicit text color fixes the "blue Продлить" issue on iOS/Telegram. */
.dashboard-status button.dash-renew,
.dashboard-status button.dash-renew:link,
.dashboard-status button.dash-renew:visited {
  appearance: none;
  -webkit-appearance: none;
  background: var(--dashboard-red);
  border: 0;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.1;
  width: auto;
  min-width: 91px;
  flex-shrink: 0;
  padding: 12px 13px;
  border-radius: 13px;
  text-decoration: none;
  box-shadow: none;
}
.dash-status-description { margin: 16px 0 0; color: #aaa7b2; font-size: 13px; line-height: 1.5; }
.dash-progress { overflow: hidden; height: 7px; border-radius: 12px; background: #303036; margin-top: 17px; }
.dash-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--dashboard-red); transition: width .5s ease; }
.dash-status-metrics { margin-top: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; font-size: 12px; }
.dash-status-metrics b { font-weight: 720; }
.dash-status-metrics span { text-align: right; color: #b2aeb7; }
.dash-status-until { margin: 12px 0 0; color: #a49ca6; font-size: 12px; }

/* Quick actions */
.dashboard-block { margin-top: 23px; }
.home-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 2px 11px; }
.home-section-head h2 { margin: 0; font-size: 19px; letter-spacing: -.035em; font-weight: 800; }
.home-section-note { font-size: 11px; color: #8d8992; }
.home-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.home-action {
  cursor: pointer;
  border-radius: 17px;
  padding: 11px 7px 10px;
  min-width: 0;
  min-height: 104px;
  color: #f1f1f3;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 8px;
}
.home-action > span:last-child { font-size: 11px; font-weight: 630; line-height: 1.25; }
.home-action-icon { display: grid; place-items: center; color: var(--dashboard-red); height: 32px; width: 35px; }
.home-action-icon svg { width: 26px; height: 26px; }

/* Server cards: informational; no false promise that tapping changes VPN protocol. */
.home-servers { display: grid; gap: 8px; }
.home-server { display: flex; align-items: center; min-height: 65px; padding: 12px 13px; border-radius: 17px; gap: 11px; }
.server-flag { font-size: 26px; line-height: 1; flex-shrink: 0; }
.server-description { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.server-description b { color: #fff; font-weight: 680; font-size: 13px; }
.server-description small { color: #b3b1bb; display: flex; align-items: center; gap: 5px; font-size: 11px; }
.online-dot, .upcoming-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; flex-shrink: 0; }
.online-dot { background: #39d179; }
.upcoming-dot { background: #88858d; }
.server-detail { margin-left: auto; text-align: right; color: #9f9da7; font-size: 10px; max-width: 90px; }
.upcoming .server-description small,.upcoming .server-detail { color: #87858e; }

/* Home plan variants link to the corresponding tariff on the actual Tariffs tab. */
.home-text-link { border: none; background: none; color: var(--dashboard-red); font-size: 11px; cursor: pointer; padding: 0; font-weight: 750; }
.home-tariff-choices { display: grid; gap: 7px; }
.home-plan { display: flex; gap: 8px; justify-content: space-between; align-items: center; width: 100%; padding: 13px 14px; color: #eeeef1; border-radius: 15px; cursor: pointer; }
.home-plan-title { font-size: 13px; font-weight: 700; }
.home-plan-price { display: inline-flex; align-items: center; gap: 10px; color: #f8f8fa; font-size: 13px; font-weight: 800; white-space: nowrap; }
.home-plan-price > span { font-size: 21px; line-height: .6; color: var(--dashboard-red); font-weight: 500; }
/* Only a deliberate click may temporarily emphasize a plan. */
.tariff.spotlight { border-color: var(--dashboard-red) !important; box-shadow: 0 0 0 1px rgba(255, 23, 56, .2); }
.home-trial-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 18px; background: #26191e; border: 1px solid #463039; border-radius: 15px; color: #f7f5f7; padding: 13px 10px; font-weight: 650; font-size: 12px; }
.home-trial-btn:disabled { opacity: .54; cursor: not-allowed; }
.home-trial-btn svg { width: 18px; height: 18px; color: var(--dashboard-red); }
.home-device-guides { display: flex; justify-content: center; gap: 17px; margin-top: 15px; flex-wrap: wrap; }
.home-device-guides a { text-decoration: none; font-size: 12px; color: #ada0a6; }

@keyframes mai-red-drift { 0% { transform: translate3d(0, 0, 0) scale(1); opacity: .7; } 100% { transform: translate3d(-9%, 9%, 0) scale(1.1); opacity: 1; } }
@keyframes mai-red-drift-alt { 0% { transform: translate3d(0, 3%, 0) scale(1); opacity: .5; } 100% { transform: translate3d(9%, -7%, 0) scale(1.07); opacity: .95; } }
@media (max-width: 350px) {
  .dashboard-home { padding-left: 12px; padding-right: 12px; }
  .home-actions { gap: 6px; }
  .home-action { padding: 11px 3px 9px; }
  .home-action > span:last-child { font-size: 10px; }
  .server-detail { max-width: 70px; font-size: 9px; }
}
@media (min-width: 600px) {
  .dashboard-home { padding-left: 26px; padding-right: 26px; }
  .home-action { min-height: 110px; }
  .server-detail { max-width: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-current-page="home"]::before,
  body[data-current-page="home"]::after { animation: none; }
}

/* v8.3: three persistent tabs; plan options on Home above the server list. */
.bottom-nav {grid-template-columns:repeat(3,minmax(0,1fr))!important;}
.dashboard-tariff-block {margin-top:22px;}
.home-tariff-choices {gap:9px;}
.home-plan {min-height:60px; transition:border-color .2s ease,transform .2s ease;}
.home-plan:active {transform:scale(.985);border-color:rgba(255,41,71,.48);}
#homePlansHeading{scroll-margin-top:95px;}
.dashboard-home .dashboard-block[aria-labelledby="homeServersHeading"]{margin-top:24px;}

/* v8.4 — refined visual system and motion layer. Business logic stays untouched. */
:root {
  --dashboard-red: #ff2145;
  --dashboard-red-soft: rgba(255, 33, 69, .13);
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.2, .9, .25, 1.18);
}
html { background: #090709; }
body {
  min-height: 100dvh;
  background:
    radial-gradient(100% 52% at 100% -8%, rgba(134, 3, 30, .24), transparent 66%),
    linear-gradient(180deg, #0b080a 0%, #09080a 58%, #080709 100%);
  overscroll-behavior-y: none;
}
body::selection { background: rgba(255, 33, 69, .32); }
.app { min-height: 100dvh; isolation: isolate; }
.topbar {
  height: 74px;
  padding: 14px 18px 13px;
  background: linear-gradient(180deg, rgba(10, 7, 9, .95), rgba(10, 7, 9, .78));
  border-bottom-color: rgba(255, 255, 255, .055);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  backdrop-filter: blur(24px) saturate(135%);
}
.brand b { font-weight: 820; letter-spacing: -.045em; }
.brand > div:last-child { gap: 1px; }
.brand span { color: #827a80; letter-spacing: .01em; }
.avatar {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .1);
  background: linear-gradient(145deg, #3b1a24, #1b1015);
  box-shadow: inset 0 0 0 1px rgba(255, 33, 69, .08), 0 8px 24px rgba(0, 0, 0, .28);
  transition: transform .28s var(--ease-spring), border-color .25s ease;
}
.avatar::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.avatar.has-photo { color: transparent; background-position: center; background-size: cover; }
.avatar:active { transform: scale(.91); border-color: rgba(255, 33, 69, .52); }

.loader { background: radial-gradient(circle at center, rgba(112, 5, 27, .17), transparent 34%); }
.loader-mark { position: relative; display: grid; place-items: center; }
.loader-mark::before {
  content: ""; position: absolute; width: 112px; height: 112px; border-radius: 38px;
  background: radial-gradient(circle, rgba(255, 33, 69, .18), transparent 68%);
  animation: loader-aura 1.8s ease-in-out infinite;
}
.loader .brand-image { position: relative; filter: drop-shadow(0 10px 30px rgba(255, 25, 59, .18)); }
.loader-line { width: 72px; height: 3px; margin-top: 4px; overflow: hidden; border-radius: 5px; background: #25191e; }
.loader-line::after { content: ""; display: block; width: 38%; height: 100%; border-radius: inherit; background: var(--dashboard-red); animation: loader-slide 1.25s var(--ease-out-expo) infinite; }

body[data-current-page="home"]::before { opacity: .74; filter: blur(3px); animation-duration: 22s; }
body[data-current-page="home"]::after { opacity: .55; filter: blur(5px); animation-duration: 28s; }
.dashboard-home { padding-top: 10px; }
.dashboard-home .surface {
  background:
    linear-gradient(145deg, rgba(31, 29, 33, .92), rgba(16, 15, 18, .96)),
    rgba(20, 19, 22, .94);
  border-color: rgba(255, 255, 255, .075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 14px 38px rgba(0, 0, 0, .2);
}
.home-profile {
  min-height: 76px;
  padding: 13px 14px;
  border-radius: 22px;
  transition: transform .32s var(--ease-spring), border-color .25s ease, background .25s ease;
}
.home-profile-icon {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #290e17, #130b0e);
  border: 1px solid rgba(255, 46, 79, .13);
  box-shadow: inset 0 0 22px rgba(255, 22, 58, .06);
}
.home-profile-icon::after { content: ""; position: absolute; inset: -60% 28%; background: rgba(255,255,255,.12); transform: rotate(28deg); transition: transform .55s var(--ease-out-expo); }
.home-profile:active .home-profile-icon::after { transform: translateX(38px) rotate(28deg); }
.home-profile-copy strong { font-size: 15px; letter-spacing: -.01em; }
.home-chevron { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.045); font-size: 24px; }

.dashboard-home .dashboard-status {
  position: relative;
  overflow: hidden;
  padding: 19px 17px 17px;
  border-radius: 24px;
  background:
    radial-gradient(100% 150% at 110% -20%, rgba(255, 31, 67, .18), transparent 48%),
    linear-gradient(145deg, rgba(32, 27, 31, .97), rgba(15, 14, 17, .98));
}
.dashboard-status::before {
  content: ""; position: absolute; width: 140px; height: 140px; right: -70px; top: -80px; border-radius: 50%;
  border: 1px solid rgba(255, 57, 88, .14); box-shadow: 0 0 45px rgba(255, 27, 62, .08); pointer-events: none;
}
.dashboard-status > * { position: relative; z-index: 1; }
.dashboard-status button.dash-renew { box-shadow: 0 8px 22px rgba(255, 24, 61, .22); transition: transform .28s var(--ease-spring), box-shadow .25s ease, filter .25s ease; }
.dashboard-status button.dash-renew:active { transform: scale(.94); box-shadow: 0 3px 10px rgba(255, 24, 61, .17); }
.dash-progress { height: 6px; background: rgba(255,255,255,.08); }
.dash-progress > span { position: relative; min-width: 7px; background: linear-gradient(90deg, #dd0e31, #ff4766); box-shadow: 0 0 14px rgba(255, 30, 66, .28); transition: width .9s var(--ease-out-expo); }
.dash-progress > span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); transform: translateX(-110%); animation: progress-glint 3.8s ease-in-out 1.2s infinite; }

.dashboard-block { margin-top: 27px; }
.home-section-head { margin: 0 3px 13px; }
.home-section-head h2 { font-size: 20px; letter-spacing: -.04em; }
.home-section-note { color: #777078; letter-spacing: .02em; }
.home-tariff-choices { gap: 10px; }
.home-plan {
  position: relative;
  overflow: hidden;
  min-height: 76px;
  padding: 13px 13px 13px 15px;
  border-radius: 20px;
  transition: transform .3s var(--ease-spring), border-color .25s ease, box-shadow .25s ease;
  opacity: 0;
  transform: translateY(11px);
}
.ui-ready .home-plan { animation: item-reveal .55s var(--ease-out-expo) calc(80ms + var(--item-index) * 55ms) forwards; }
.home-plan::after { content: ""; position: absolute; inset: 0; opacity: 0; background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.035), transparent 75%); transition: opacity .25s ease; pointer-events: none; }
.home-plan:active::after { opacity: 1; }
.home-plan.featured { border-color: rgba(255, 39, 72, .32); background: radial-gradient(90% 170% at 100% 0%, rgba(255, 27, 63, .11), transparent 54%), linear-gradient(145deg, rgba(34, 28, 32, .96), rgba(16, 15, 18, .97)); }
.home-plan-copy { display: flex; flex-direction: column; min-width: 0; gap: 7px; text-align: left; }
.home-plan-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.home-plan-title { color: #f6f3f5; font-size: 15px; font-weight: 770; letter-spacing: -.02em; }
.home-plan-badge { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 99px; padding: 4px 7px; background: rgba(255, 36, 69, .1); color: #ff7890; font-size: 9px; font-weight: 780; letter-spacing: .015em; }
.home-plan.featured .home-plan-badge { background: var(--dashboard-red); color: #fff; }
.home-plan-meta { color: #888189; font-size: 10px; line-height: 1.2; }
.home-plan-price { margin-left: auto; gap: 11px; }
.home-plan-price b { font-size: 15px; font-weight: 820; letter-spacing: -.02em; }
.home-plan-arrow { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; background: rgba(255,255,255,.05); color: #ff4967; font-size: 23px; transition: transform .3s var(--ease-spring), background .25s ease; }
.home-plan:active .home-plan-arrow { transform: translateX(2px); background: rgba(255, 33, 69, .12); }

.home-trial-btn {
  min-height: 49px;
  margin-top: 15px;
  background: linear-gradient(145deg, rgba(50, 29, 36, .9), rgba(30, 20, 24, .94));
  border-color: rgba(255, 82, 110, .16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  transition: transform .3s var(--ease-spring), border-color .25s ease;
}
.home-trial-btn:not(:disabled):active { transform: scale(.975); border-color: rgba(255, 49, 82, .42); }
.home-device-guides a { position: relative; padding: 3px 0; color: #9d9399; transition: color .2s ease; }
.home-device-guides a:active { color: #fff; }

.home-servers { gap: 9px; }
.home-server {
  position: relative;
  min-height: 70px;
  padding: 13px 14px;
  border-radius: 19px;
  transition: transform .28s var(--ease-spring), border-color .25s ease;
}
.home-server:active { transform: scale(.987); border-color: rgba(255,255,255,.12); }
.server-flag { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: rgba(255,255,255,.045); font-size: 23px; }
.online-dot { position: relative; box-shadow: 0 0 0 3px rgba(57, 209, 121, .08); }
.online-dot::after { content: ""; position: absolute; inset: -4px; border: 1px solid rgba(57, 209, 121, .45); border-radius: inherit; animation: online-ring 2.4s ease-out infinite; }

#content > .bottom-nav {
  height: calc(74px + env(safe-area-inset-bottom, 0px));
  background: rgba(12, 9, 11, .9);
  border-top-color: rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  backdrop-filter: blur(26px) saturate(140%);
  box-shadow: 0 -14px 40px rgba(0,0,0,.24);
}
.bottom-nav button { position: relative; transition: color .25s ease, transform .28s var(--ease-spring); }
.bottom-nav button::before { content: ""; position: absolute; top: -5px; width: 22px; height: 3px; border-radius: 5px; background: var(--dashboard-red); opacity: 0; transform: scaleX(.25); transition: opacity .25s ease, transform .35s var(--ease-out-expo); }
.bottom-nav button.active::before { opacity: 1; transform: scaleX(1); }
.bottom-nav button:active { transform: scale(.93); }

.modal { -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); background: rgba(0,0,0,.68); }
.modal.closing { animation: modal-out .19s ease forwards; }
.modal.closing .sheet { animation: sheet-out .19s ease forwards; }
.sheet { background: linear-gradient(180deg, #1e171b, #140f12); border-color: rgba(255,255,255,.09); box-shadow: 0 -25px 70px rgba(0,0,0,.48); }
.toast { animation: toast-in .42s var(--ease-spring) both; }

@keyframes loader-aura { 50% { transform: scale(1.14); opacity: .55; } }
@keyframes loader-slide { 0% { transform: translateX(-120%); } 70%,100% { transform: translateX(290%); } }
@keyframes progress-glint { 0%,55% { transform: translateX(-110%); } 82%,100% { transform: translateX(110%); } }
@keyframes item-reveal { to { opacity: 1; transform: translateY(0); } }
@keyframes online-ring { 0% { opacity: .7; transform: scale(.55); } 75%,100% { opacity: 0; transform: scale(1.45); } }
@keyframes modal-out { to { opacity: 0; } }
@keyframes sheet-out { to { opacity: .55; transform: translateY(24px); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px) scale(.94); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

@media (hover: hover) and (pointer: fine) {
  .home-profile:hover, .home-plan:hover { transform: translateY(-2px); border-color: rgba(255, 63, 94, .25); }
  .home-server:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.12); }
}
@media (max-width: 370px) {
  .home-plan-badge { max-width: 90px; }
  .home-plan { padding-left: 12px; padding-right: 10px; }
  .home-plan-price { gap: 7px; }
  .home-plan-meta { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-plan { opacity: 1; transform: none; }
  .loader-mark::before, .loader-line::after, .dash-progress > span::after, .online-dot::after { animation: none !important; }
}

/* v8.5 — profile placement, floating purchase sheet and compact account view. */
.topbar { justify-content: flex-start; }
.profile-avatar.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 49px;
  width: 49px;
  height: 49px;
  font-size: 16px;
  color: #fff;
  background-position: center;
  background-size: cover;
}
.profile-avatar.avatar.has-photo { color: transparent; }
.home-profile:active .profile-avatar.avatar { transform: scale(.94); border-color: rgba(255, 33, 69, .5); }

.modal { padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.sheet {
  width: min(696px, 100%);
  margin: auto auto 0;
  border-radius: 28px;
  padding: 28px 20px 22px;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}
.sheet::before { display: none; }
.close { top: 13px; right: 14px; }

.bottom-nav button::before {
  top: auto;
  bottom: -5px;
}

body[data-current-page="account"] { overflow: hidden; }
.page[data-page="account"].active {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 148px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  min-height: 0;
  padding-top: 0;
  padding-bottom: 8px;
  overflow: hidden;
}
.page[data-page="account"] .page-head { flex: 0 0 auto; padding: 15px 4px 13px; }
.page[data-page="account"] .page-head h1 { margin: 7px 0 0; font-size: clamp(27px, 7vw, 36px); }
#accountView { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 10px; }
.page[data-page="account"] .account-main { flex: 1 1 auto; min-height: 0; padding: 17px; border-radius: 23px; }
.page[data-page="account"] .account-main .big { font-size: clamp(33px, 9vw, 42px); line-height: 1.05; }
.page[data-page="account"] .stats { gap: 8px; margin-top: 13px; }
.page[data-page="account"] .stat { min-height: 59px; padding: 11px 12px; }
.page[data-page="account"] .stat b { font-size: 16px; }
.page[data-page="account"] .copy-box { flex: 0 0 auto; margin-top: 0; padding: 12px; border-radius: 17px; }
.page[data-page="account"] .copy-box code { margin-bottom: 9px; }
.page[data-page="account"] .copy-box .btn { padding: 12px 15px; }
.page[data-page="account"] .empty { margin: auto 0; padding: 22px; }

@media (max-height: 650px) {
  .page[data-page="account"] .page-head { padding-top: 8px; padding-bottom: 8px; }
  .page[data-page="account"] .page-head > span { display: none; }
  .page[data-page="account"] .page-head h1 { font-size: 26px; }
  .page[data-page="account"] .account-main { padding: 13px; }
  .page[data-page="account"] .account-main .big { font-size: 31px; }
  .page[data-page="account"] .stats { margin-top: 9px; }
  .page[data-page="account"] .stat { min-height: 51px; padding: 8px 10px; }
  .page[data-page="account"] .copy-box { padding: 9px 11px; }
  .page[data-page="account"] .copy-box code { margin-bottom: 6px; }
  .page[data-page="account"] .copy-box .btn { padding: 10px 13px; }
}
