

:root {
  --bg:        var(--tg-theme-bg-color, #ffffff);
  --bg-2:      var(--tg-theme-secondary-bg-color, #f2f2f7);
  --text:      var(--tg-theme-text-color, #000000);
  --hint:      var(--tg-theme-hint-color, #8e8e93);
  --link:      var(--tg-theme-link-color, #007aff);
  --btn:       var(--tg-theme-button-color, #007aff);
  --btn-text:  var(--tg-theme-button-text-color, #ffffff);
  --section:   var(--tg-theme-section-bg-color, var(--bg));

  
  --accent:    #ff5a36;
  --accent-2:  #ff9d00;
  --accent-grad: linear-gradient(135deg, #ff5a36, #ff9d00);

  --ok:        #34c759;
  --warn:      #ff9f0a;
  --danger:    #ff3b30;

  --line: color-mix(in srgb, var(--hint) 22%, transparent);
  
  --card: color-mix(in srgb, var(--hint) 9%, color-mix(in srgb, var(--bg) 82%, transparent));

  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;

  --pad: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  
  --tabs-h: 76px;

  --ease: cubic-bezier(.2, .9, .3, 1);
}


@media (prefers-color-scheme: dark) {
  :root {
    --card: color-mix(in srgb, #ffffff 8%, color-mix(in srgb, var(--bg) 78%, transparent));
    --line: color-mix(in srgb, #ffffff 14%, transparent);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }


[hidden] { display: none !important; }


html {
  background: var(--bg);
  min-height: 100%;
}

html, body {
  margin: 0; padding: 0;
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  
  overscroll-behavior-y: contain;
}
body { background: transparent; }

button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; }


.sky {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%; pointer-events: none;
}
body::before, body::after {
  content: ""; position: fixed; z-index: 0; pointer-events: none;
  width: 64vmax; height: 64vmax; border-radius: 50%; opacity: .17;
}
body::before {
  top: -24vmax; left: -20vmax;
  background: radial-gradient(circle, var(--accent), transparent 68%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
body::after {
  bottom: -28vmax; right: -22vmax;
  background: radial-gradient(circle, #6366f1, transparent 68%);
  animation: drift-b 34s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(6vmax, 4vmax) scale(1.12) } }
@keyframes drift-b { to { transform: translate(-5vmax, -6vmax) scale(1.16) } }


.boot {
  position: fixed; inset: 0; display: grid; place-content: center; gap: 22px;
  justify-items: center; background: var(--bg); z-index: 100;
}
.boot__logo { font-size: 54px; animation: float 2s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
.boot__bar { width: 140px; height: 3px; border-radius: 3px; background: var(--card); overflow: hidden; }
.boot__bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: var(--accent-grad);
  animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-110%) } 100% { transform: translateX(360%) } }


.fatal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center;
  justify-items: center; gap: 12px; padding: 40px 28px; text-align: center; background: var(--bg);
}
.fatal__icon { font-size: 46px; }
.fatal__title { margin: 0; font-size: 19px; font-weight: 600; }
.fatal__text { margin: 0 0 12px; color: var(--hint); font-size: 14px; }



.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 2px;
  padding: calc(8px + var(--safe-top)) var(--pad) 8px;
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.topbar__who { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1 1 auto; }
.topbar__avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-content: center; overflow: hidden;
  background: var(--accent-grad); color: #fff;
  font-size: 14px; font-weight: 700;
}

.topbar__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-content: center;
  background: color-mix(in srgb, var(--hint) 24%, transparent); color: var(--text);
  font-size: 14px; font-weight: 700;
}
.avatar--me { background: var(--accent-grad); color: #fff; }

.avatar { overflow: hidden; }

.avatar img {
  grid-area: 1 / 1; align-self: stretch; justify-self: stretch;
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.topbar__name {
  font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


.bell {
  flex: none; position: relative;
  width: var(--d-tap); height: var(--d-tap);
  display: grid; place-content: center;
  border: 0; background: none; color: var(--d-t1); cursor: pointer;
  border-radius: 12px; transition: background-color .16s ease;
}
.bell:active { background: var(--d-s2); }

.bell__dot {
  position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--d-dgr-solid);
  box-shadow: 0 0 0 2px var(--d-bg);
}


.topbar__menu {
  flex: none; width: var(--d-tap); height: var(--d-tap);
  display: grid; place-content: center;
  margin-right: calc(var(--pad) * -1 + 4px);
  border: 0; background: none; color: var(--d-t1); cursor: pointer;
  border-radius: 12px; transition: background-color .16s ease;
}
.topbar__menu:active { background: var(--d-s2); }

.topbar__menu--on { color: var(--d-accent-t); }



.drawer {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  
  background: color-mix(in srgb, var(--d-bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  animation: drawerIn .2s var(--ease);
}
@keyframes drawerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.drawer__body {
  flex: 1; overflow-y: auto;
  
  padding: var(--d-3) var(--pad) calc(var(--tabs-h) + var(--safe-bottom) + var(--d-5));
}


.info__tabs {
  display: flex; gap: 6px; overflow-x: auto; margin: 0 0 var(--d-4);
  padding-bottom: 2px; scrollbar-width: none;
}
.info__tabs::-webkit-scrollbar { display: none; }
.info__tab {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--d-tap); padding: 0 14px; cursor: pointer;
  border: 1px solid var(--d-line); border-radius: 12px;
  background: var(--d-s1); color: var(--d-t2);
  font-size: var(--d-fs-cap); font-weight: 500; white-space: nowrap;
  transition: background-color .16s ease, color .16s ease;
}
.info__tab--on {
  background: color-mix(in srgb, var(--d-accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--d-accent) 45%, transparent);
  color: var(--d-accent-t);
}
.info__h {
  margin: var(--d-4) 0 var(--d-2); font-size: var(--d-fs-row);
  font-weight: 600; color: var(--d-t1);
}
.info__h:first-child { margin-top: 0; }
.info__p { margin: 0 0 var(--d-2); color: var(--d-t2); line-height: 1.5; }
.info__li {
  position: relative; margin: 0 0 var(--d-2); padding-left: 16px;
  color: var(--d-t2); line-height: 1.5;
}
.info__li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 4px; height: 4px; border-radius: 50%; background: var(--d-t3);
}


.pop { position: fixed; inset: 0; z-index: 92; }
.pop__backdrop { position: absolute; inset: 0; }
.pop__panel {
  position: absolute; z-index: 1;
  min-width: 208px; max-width: min(320px, calc(100vw - 20px));
  max-height: min(58vh, 440px); overflow-y: auto;
  padding: 5px;
  
  background: color-mix(in srgb, var(--d-s1) 82%, transparent);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid color-mix(in srgb, var(--d-line) 80%, transparent);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.05) inset;
  animation: popIn .16s var(--ease);
  transform-origin: top right;
  scrollbar-width: none;
}
.pop__panel::-webkit-scrollbar { display: none; }
@keyframes popIn {
  from { opacity: 0; transform: scale(.96) translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.pop__panel--center { transform: translateX(-50%); transform-origin: top center;
  animation: popInCenter .16s var(--ease); }
@keyframes popInCenter {
  from { opacity: 0; transform: translateX(-50%) scale(.96) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%); }
}
.pop__title {
  padding: 7px 10px 5px; font-size: var(--d-fs-micro); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--d-t3);
}
.pop .item { border: 0; border-radius: 12px; padding: 9px 10px; gap: 10px; }
.pop .item + .item { border-top: 0; }
.pop .list { background: none; border: 0; }

.pop .ac-card { background: none; border: 0; border-radius: 0; }


.pop .ac-row--log { padding: 8px 10px; align-items: flex-start; }
.pop .ac-row--log + .ac-row--log { border-top: 1px solid var(--d-line); }
.pop .ac-row--log .ac-row__title {
  font-size: var(--d-fs-cap); line-height: 1.3; -webkit-line-clamp: 1;
}
.pop .ac-row--log .ac-row__sub {
  font-size: var(--d-fs-micro); line-height: 1.3; -webkit-line-clamp: 2;
}

.pop .ac-row--text .ac-row__sub {
  display: -webkit-box; -webkit-line-clamp: 2; overflow: hidden;
}
.pop .ac-row__end { gap: 2px; }
.pop .ac-row__val { font-size: var(--d-fs-micro); }
.pop .ac-row__ic .ic { width: 16px; height: 16px; flex-basis: 16px; }

.drawer__who {
  display: flex; align-items: center; gap: var(--d-3);
  padding: var(--d-3) 0 var(--d-4);
}
.drawer__who .avatar { width: 44px; height: 44px; font-size: 17px; }
.drawer__name { font-size: var(--d-fs-row); font-weight: 600; color: var(--d-t1); }
.drawer__sub { font-size: var(--d-fs-cap); color: var(--d-t2); }

.lang {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 13px; font-weight: 600; letter-spacing: .3px;
  position: relative;
  transition: transform .14s var(--ease);
}

.lang::after {
  content: ''; position: absolute; left: 0; right: 0;
  top: 50%; height: var(--d-tap); transform: translateY(-50%);
}
.lang:active { transform: scale(.94); }


.lang .lang__caret { width: 13px; height: 13px; flex-basis: 13px; opacity: .5; }


.app {
  position: relative; z-index: 1;
  padding: 0 var(--pad) calc(var(--tabs-h) + var(--safe-bottom) + 20px);
}


.screen--in > * { animation: rise .42s var(--ease) both; }
.screen--in > *:nth-child(1) { animation-delay: 0ms }
.screen--in > *:nth-child(2) { animation-delay: 34ms }
.screen--in > *:nth-child(3) { animation-delay: 60ms }
.screen--in > *:nth-child(4) { animation-delay: 84ms }
.screen--in > *:nth-child(5) { animation-delay: 105ms }
.screen--in > *:nth-child(6) { animation-delay: 124ms }
.screen--in > *:nth-child(7) { animation-delay: 140ms }
.screen--in > *:nth-child(n+8) { animation-delay: 154ms }
@keyframes rise { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

.head { padding: 10px 2px 12px; }
.head__title { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -0.4px; }
.head__sub { margin: 4px 0 0; color: var(--hint); font-size: 14px; }

.section { margin: 20px 0 8px; padding: 0 4px; display: flex; align-items: baseline; justify-content: space-between; }
.section__title { font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--hint); }
.section__aside { font-size: 13px; color: var(--hint); }

.footer { text-align: center; color: var(--hint); font-size: 12px; margin: 26px 0 0; }


.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px; margin-bottom: 10px;
}
.card--flat { background: transparent; border-color: transparent; padding: 0; }
.card--tap { cursor: pointer; transition: transform .12s ease, opacity .12s ease; }
.card--tap:active { transform: scale(.985); opacity: .85; }

.row { display: flex; align-items: center; gap: 12px; }

.row + .row { margin-top: 14px; }
.row__grow { flex: 1; min-width: 0; }

.row__title { font-weight: 600; font-size: 15px; display: block; min-width: 0; }
.row__sub { color: var(--hint); font-size: 13px; margin-top: 2px; }
.row__val { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.list > .item { padding: 13px 14px; display: flex; align-items: center; gap: 12px; }
.list > .item + .item { border-top: 1px solid var(--line); }
.item--tap {
  position: relative; overflow: hidden; cursor: pointer;
  transition: background .12s ease;
}
.item--tap:active { background: var(--line); }
.item__icon { width: 28px; text-align: center; font-size: 18px; flex: none; }
.item__chev { color: var(--hint); flex: none; opacity: .5; transition: transform .16s var(--ease); }
.item--tap:active .item__chev { transform: translateX(3px); }


.hero {
  --hero-grad: var(--accent-grad);
  position: relative; overflow: hidden; border-radius: 22px;
  padding: 20px; color: #fff;
  
  margin: 6px 0 12px;
  
  background-image:
    linear-gradient(115deg, rgba(255,255,255,0) 34%, rgba(255,255,255,.16) 47%, rgba(255,255,255,0) 60%),
    var(--hero-grad);
  background-size: 260% 100%, 100% 100%;
  background-position: 150% 0, 0 0;
  animation: sheen 5.5s ease-in-out 3;
}
@keyframes sheen {
  0%, 12% { background-position: 150% 0, 0 0 }
  62%, 100% { background-position: -60% 0, 0 0 }
}
.hero--off   { --hero-grad: linear-gradient(135deg, #6b7280, #4b5563); }
.hero--soon  { --hero-grad: linear-gradient(135deg, #f59e0b, #f97316); }
.hero--blue  { --hero-grad: linear-gradient(135deg, #3b82f6, #6366f1); }
.hero--green { --hero-grad: linear-gradient(135deg, #10b981, #059669); }

.hero::after {                       
  content: ""; position: absolute; right: -60px; top: -80px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.16);
  animation: blob 11s ease-in-out infinite alternate;
}
@keyframes blob { to { transform: translate(-20px, 16px) scale(1.14) } }

.hero::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 1px solid rgba(255,255,255,.18); pointer-events: none; z-index: 1;
}
.hero__label { position: relative; z-index: 1; font-size: 13px; opacity: .9; }
.hero__title { position: relative; z-index: 1; font-size: 24px; font-weight: 700;
  margin: 4px 0 2px; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; }
.hero__meta { position: relative; z-index: 1; font-size: 13px; opacity: .92; }
.hero__actions { position: relative; z-index: 1; margin-top: 16px; display: flex; gap: 8px; }


.hero__note {
  position: relative; z-index: 1; margin-top: 12px;
  display: flex; align-items: center; gap: 8px; width: 100%;
  appearance: none; border: 1px solid rgba(255,255,255,.28); border-radius: 12px;
  background: rgba(255,255,255,.14); color: #fff;
  padding: 9px 12px; font: inherit; font-size: 13px; text-align: left;
  cursor: pointer;
}
.hero__note:active { background: rgba(255,255,255,.22); }
.hero__note svg { flex: 0 0 16px; width: 16px; height: 16px; opacity: .9; }
.hero__note span { min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }

.hero .btn--ghost-light {
  background: rgba(255,255,255,.2); color: #fff; border: none;
  backdrop-filter: blur(6px);
}
.hero .btn--white { background: #fff; color: #1c1c1e; border: none; }



.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.ptile {
  position: relative; appearance: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 18px 12px 14px; border-radius: 18px;
  background: var(--card); border: 1.5px solid transparent;
  color: var(--text); font: inherit; text-align: center;
  transition: border-color .15s ease, background-color .15s ease, transform .1s ease;
}
.ptile:active { transform: scale(.985); }
.ptile.is-on { border-color: var(--accent); background: var(--accent-soft, var(--card)); }
.ptile__price { font-size: 24px; font-weight: 700; letter-spacing: -.5px;
  font-variant-numeric: tabular-nums; }
.ptile__per { font-size: 12px; color: var(--muted); margin-top: -2px; }
.ptile__name { font-size: 14px; font-weight: 600; margin-top: 6px; }
.ptile__save { font-size: 12px; color: var(--ok); font-weight: 600; }

.ptile__flag {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
  background: var(--accent); color: #fff;
}
.plans__go { margin-bottom: 8px; }
.plans__trial { margin-top: 10px; }


.seg {
  display: flex; gap: 4px; padding: 4px; margin: 10px 0 8px;
  background: var(--card); border-radius: 14px;
}
.seg__b {
  flex: 1; appearance: none; border: 0; cursor: pointer;
  padding: 9px 8px; border-radius: 10px; background: transparent;
  color: var(--muted); font: 600 14px/1.2 inherit;
  transition: background-color .15s ease, color .15s ease;
}
.seg__b.is-on { background: var(--accent); color: #fff; }


.why { background: var(--card); border-radius: 16px; overflow: hidden; }
.why__row { display: flex; gap: 10px; padding: 12px 14px; align-items: flex-start; }
.why__row + .why__row { border-top: 1px solid var(--line, rgba(255,255,255,.07)); }
.why__ic { flex: 0 0 20px; color: var(--accent-t, var(--accent)); margin-top: 1px; }
.why__ic svg { width: 20px; height: 20px; }
.why__t { font-size: 13px; line-height: 19px; color: var(--text-2, var(--text)); }


.btn {
  appearance: none; border: 1px solid transparent; border-radius: var(--r-md);
  padding: 12px 16px; font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--card); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  
  min-height: 44px;
  position: relative; overflow: hidden;
  transition: transform .12s ease, opacity .12s ease, filter .12s ease;
}
.btn--primary:active, .btn--accent:active { filter: brightness(.92); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn--primary { background: var(--btn); color: var(--btn-text); }
.btn--accent { background: var(--accent-grad); color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn--danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.btn--ghost { background: transparent; border-color: var(--line); }
.btn--wide { width: 100%; }
.btn--sm { padding: 8px 12px; font-size: 14px; border-radius: var(--r-sm); min-height: 38px; }
.btn-row { display: flex; gap: 8px; }
.btn-row > * { flex: 1; }


.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .16; transform: scale(0);
  animation: ripple .6s ease-out forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0 } }


.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--card); color: var(--hint);
  
  flex: none;
}
.badge--ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.badge--warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.badge--danger { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.badge--accent { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }


.wallets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wallets--1 { grid-template-columns: 1fr; }
.wallets--2 { grid-template-columns: repeat(2, 1fr); }
.wallets--3 { grid-template-columns: repeat(3, 1fr); }

.wallet--solo { padding: 16px; }
.wallet--solo .wallet__val { font-size: 26px; }
.wallet--solo .wallet__key { font-size: 12px; margin-top: 4px; }
.wallet { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 10px; text-align: center; }
.wallet--tap {
  position: relative; overflow: hidden; cursor: pointer; color: inherit;
  transition: transform .13s var(--ease), border-color .13s ease;
}
.wallet--tap:active { transform: scale(.95); border-color: var(--btn); }
.wallet__val { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wallet__key { font-size: 11px; color: var(--hint); margin-top: 3px; }


.plan { position: relative; display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: transform .13s var(--ease), border-color .13s ease; }
.plan:active { transform: scale(.98); }
.plan--best { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.plan__name { font-weight: 600; }
.plan__sub { color: var(--hint); font-size: 13px; margin-top: 2px; }
.plan__price { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan__per { font-size: 12px; color: var(--hint); text-align: right; margin-top: 2px; }
.ribbon {
  position: absolute; top: -9px; right: 12px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--accent-grad);
}


.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  position: relative; overflow: hidden;
  padding: 6px 11px; border-radius: 999px;
  background: var(--d-s2); border: 1px solid transparent;
  color: var(--d-t1); font-size: 13px;
  animation: pop .34s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}
@keyframes pop { from { opacity: 0; transform: scale(.86) } to { opacity: 1; transform: none } }

.chip--more {
  cursor: pointer; font-weight: 700; color: var(--link);
  border-color: color-mix(in srgb, var(--link) 40%, transparent);
  font-variant-numeric: tabular-nums;
}


.cc {
  display: inline-block; margin-right: 5px; padding: 1px 5px;
  border-radius: 5px; background: var(--line); color: var(--hint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  vertical-align: 1px;
}


.fl {
  display: inline-block; width: 1.35em; height: .9em;
  margin-right: 5px; vertical-align: -.08em;
  border-radius: 2px; box-shadow: 0 0 0 .5px rgba(255,255,255,.16);
  flex: none;
}

.item__icon > .fl, .ac-row__ic > .fl { margin-right: 0; width: 20px; height: 14px; }


.field { margin-bottom: 12px; }
.field__label { display: block; font-size: 13px; color: var(--hint); margin: 0 0 6px 4px; }
.input, .textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus {
  border-color: var(--btn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--btn) 16%, transparent);
}
.textarea { min-height: 96px; resize: vertical; }
.input--mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }


.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-bottom) + 16px);
  transform: translateX(-50%); z-index: 90;
  max-width: min(92vw, 440px); padding: 11px 16px; border-radius: 12px;
  background: rgba(28,28,30,.94); color: #fff; font-size: 14px; text-align: center;
  box-shadow: 0 8px 28px rgba(0,0,0,.3); animation: toastIn .28s var(--ease);
}
.toast--ok { background: rgba(24,120,60,.96); }
.toast--err { background: rgba(170,32,26,.96); }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 14px) scale(.94) }
  to { opacity: 1; transform: translate(-50%, 0) scale(1) }
}





.tabs__pill {
  position: absolute; top: 6px; bottom: 6px; left: 0;
  border-radius: 16px; z-index: 0;
  background: color-mix(in srgb, var(--d-accent) 18%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--d-accent) 22%, transparent) inset;
  will-change: transform, width;
  transition: background-color .2s ease, box-shadow .2s ease;
}

.tabs__pill--drag {
  background: color-mix(in srgb, var(--d-accent) 26%, rgba(255, 255, 255, .06));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--d-accent) 40%, rgba(255, 255, 255, .25)) inset,
    0 1px 0 rgba(255, 255, 255, .22) inset,
    0 10px 24px rgba(0, 0, 0, .35);
  backdrop-filter: saturate(170%) brightness(1.12);
  -webkit-backdrop-filter: saturate(170%) brightness(1.12);
}
.tabs {
  position: fixed; z-index: 80;
  left: 10px; right: 10px; bottom: calc(var(--safe-bottom) + 8px);
  display: flex; gap: 2px; padding: 6px;
  background: color-mix(in srgb, var(--d-s1) 92%, transparent);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--d-line);
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .38);
  
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.tab {
  position: relative; z-index: 1;
  flex: 1; border: none; background: none; padding: 7px 2px 6px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border-radius: 16px;
  color: var(--d-t3); font-size: 10px; font-weight: 500;
  transition: color .18s ease, background-color .22s var(--ease);
}
.tab__icon { font-size: 20px; line-height: 1; transition: transform .26s var(--ease); }



.tab--on, .tab--hover { color: var(--d-accent-t); }
.tab--on .tab__icon { transform: translateY(-1px); }

@media (hover: none) and (pointer: coarse) {
  .tab:active { transform: scale(.96); }
}


.region { margin-top: 10px; border: 1px solid var(--d-line); border-radius: 12px; }
.region__sum { cursor: pointer; padding: 10px 12px; font-size: 13px; font-weight: 600; list-style: none; }
.region__sum::-webkit-details-marker { display: none; }
.region__sum::before { content: "⚠️ "; }
.region[open] .region__sum { border-bottom: 1px solid var(--d-line); }
.region__body { padding: 2px 12px 10px; font-size: 13px; line-height: 1.5; color: var(--d-t2, inherit); }
.region__body p { margin: 8px 0 0; }
.region__body ol { margin: 6px 0 0; padding-left: 18px; }
.region__body li { margin-top: 4px; }


.sheet { position: fixed; inset: 0; z-index: 95; display: flex; align-items: flex-end; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fade .24s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.sheet--full .sheet__body {
  height: 100%; max-height: 100%; border-radius: 0;
  padding-top: calc(var(--safe-top) + 8px);
}
.sheet--full .sheet__grip { margin-bottom: 4px; }

.sheet__body {
  position: relative; width: 100%; max-height: 88vh; overflow-y: auto;
  background: var(--bg); border-radius: 20px 20px 0 0;
  padding: 8px var(--pad) calc(var(--safe-bottom) + 20px);
  box-shadow: 0 -12px 40px rgba(0,0,0,.24);
  animation: up .32s var(--ease);
}
@keyframes up { from { transform: translateY(100%) } to { transform: none } }
.sheet__grip { width: 36px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
.sheet__title { margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.sheet__text { margin: 0 0 16px; color: var(--hint); font-size: 14px; }



.steps { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 2px 0 14px; }
.steps__dot {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2px solid var(--line); background: transparent;
  transition: background .2s ease, border-color .2s ease;
}
.steps__dot--on { border-color: var(--accent); background: var(--accent); }
.steps__dot--done { border-color: var(--ok); background: var(--ok); }
.steps__bar { width: 34px; height: 2px; background: var(--line); flex: none; }
.steps__bar--on { background: var(--ok); }


.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tile {
  position: relative; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px; border-radius: var(--r-md);
  background: var(--card); border: 1.5px solid var(--line); color: var(--text);
  transition: transform .13s var(--ease), border-color .13s ease, background .13s ease;
}
.tile:active { transform: scale(.95); }
.tile--on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
}
.tile__icon { font-size: 22px; line-height: 1; }
.tile__name { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.2; }


.step-card { padding: 14px; margin-bottom: 10px; }
.step-card__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.step-card__hint { margin: 8px 0 0; color: var(--hint); font-size: 12px; text-align: center; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }


.copybox {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  padding: 8px 8px 8px 12px; border-radius: var(--r-md);
  background: var(--bg-2); border: 1px solid var(--line);
}
.copybox__val {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; color: var(--hint);
}
.copybox .btn { flex: none; }


.qr {
  width: min(240px, 62vw); margin: 4px auto 0; padding: 12px;
  background: #fff; color: #000; border-radius: var(--r-md);
}
.qr svg { display: block; width: 100%; height: auto; }
.qr__hint { margin: 10px 0 0; text-align: center; color: var(--hint); font-size: 12px; }

.step__n {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-content: center;
  background: var(--accent-grad); color: #fff;
  font-size: 13px; font-weight: 700;
}



.mail-card { padding: 14px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 4px 0 12px; }
.otp__cell {
  width: 100%; aspect-ratio: 3 / 4; padding: 0; text-align: center;
  font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums;
  border-radius: var(--r-sm); border: 1.5px solid var(--line);
  background: var(--bg-2); color: var(--text); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.otp__cell:focus {
  border-color: var(--btn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--btn) 16%, transparent);
}


.empty { text-align: center; padding: 36px 20px; color: var(--hint); }
.empty__icon { font-size: 40px; margin-bottom: 10px; animation: float 2.6s ease-in-out infinite; }
.empty__title { font-weight: 600; color: var(--text); margin-bottom: 4px; }


.skel { border-radius: var(--r-md); background: var(--card); position: relative; overflow: hidden; }
.skel::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--hint) 12%, transparent), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { transform: translateX(100%) } }


.op__amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.op__amount--plus { color: var(--ok); }
.op__amount--minus { color: var(--text); }


.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; }
.stat__val { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat__key { font-size: 12px; color: var(--hint); margin-top: 2px; }
.stat--alarm { border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent); }
.stat--alarm .stat__val { color: var(--danger); }

.danger-zone { border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: var(--r-lg); padding: 14px; background: color-mix(in srgb, var(--danger) 6%, transparent); }

.link-card { border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--card); padding: 12px; margin-bottom: 8px;
  
  transition: transform .16s var(--ease), box-shadow .16s ease;
  will-change: transform; }
.link-card__head { display: flex; align-items: center; gap: 8px; }
.link-card__name { font-weight: 600; flex: 1; min-width: 0; }


.link-card--row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; margin-bottom: 6px;
  
  height: 60px; box-sizing: border-box;
}

.link-card--row .link-card__name {
  font-weight: 500; font-size: 14px; line-height: 1.25;
  white-space: normal; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.link-card__more {
  flex: none; width: 34px; height: 34px; margin-right: -4px;
  display: grid; place-content: center;
  border: 0; background: none; color: var(--d-t2); cursor: pointer;
  border-radius: 9px;
}
.link-card__more:active { background: var(--line); color: var(--text); }

.links-filtered .link-card__grip { opacity: .25; pointer-events: none; }


.link-card__grip {
  flex: none; width: 30px; height: 34px; margin: -6px 0 -6px -4px;
  display: grid; place-content: center; cursor: grab;
  touch-action: none; color: var(--hint); user-select: none;
  border-radius: 8px; transition: background .15s ease, color .15s ease;
}
.link-card__grip::before {
  content: ""; width: 10px; height: 16px; opacity: .85;
  background-image: radial-gradient(currentColor 1.4px, transparent 1.5px);
  background-size: 5px 5px;
}

.link-card__grip--inline { display: inline-grid; vertical-align: -9px; margin: 0; }
.link-card__grip:active { cursor: grabbing; background: var(--line); color: var(--text); }
.link-card__pos {
  flex: none; min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-content: center; border-radius: 6px;
  background: var(--line); color: var(--hint);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.link-card--drag {
  transition: none; z-index: 5; position: relative;
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
.link-card--drag .link-card__grip { background: var(--line); color: var(--text); }

.link-card--drag .link-card__uri,
.link-card--drag .link-actions { opacity: .35; }
.links-dragging { user-select: none; }
.link-card__uri {
  margin-top: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; color: var(--hint); word-break: break-all; line-height: 1.35;
  max-height: 3.2em; overflow: hidden;
}
.link-fields { margin-top: 10px; display: grid; gap: 8px; }
.link-field { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; }
.link-field__label { font-size: 12px; color: var(--hint); }
.link-field .input { padding: 8px 10px; font-size: 13px; }
.link-actions { display: flex; gap: 6px; margin-top: 10px; }
.link-actions .btn { flex: 1; padding: 8px 6px; }

.link-actions .btn--icon { flex: 0 0 40px; }

.link-actions__gap { flex: 1; }

.notice { border-radius: var(--r-md); padding: 11px 13px; font-size: 13px; line-height: 1.4; margin-bottom: 10px; }
.notice--warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.notice--danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.notice--info { background: var(--card); border: 1px solid var(--line); color: var(--hint); }

.mono-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
  white-space: pre-wrap; word-break: break-word; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; line-height: 1.45;
}

.spinner {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


:root {
  
  --d-bg:      #0B0B0F;
  --d-s1:      #131318;   
  --d-s2:      #1A1A21;   
  --d-s3:      #202028;   
  --d-line:    #26262F;
  --d-line-2:  #33333E;

  
  --d-t1:  #EDEDF2;  
  --d-t2:  #A0A0AE;  
  
  --d-t3:  #888893;  
  --d-off: #4A4A55;  

  
  --d-accent:  #6D4AFF;        
  --d-accent-press: #5E3AE0;
  --d-accent-fg: #FFFFFF;
  
  --d-accent-t: #A692FF;       

  --d-ok:   #3FCF8E; --d-ok-bg:   rgba(63,207,142,.12); --d-ok-line:   rgba(63,207,142,.28);
  --d-warn: #E5A83C; --d-warn-bg: rgba(229,168,60,.12); --d-warn-line: rgba(229,168,60,.28);
  --d-dgr:  #FF6B6B; --d-dgr-bg:  rgba(255,107,107,.12); --d-dgr-line: rgba(255,107,107,.30);
  
  --d-dgr-solid: #D32F35;   

  
  --d-fs-title: 24px; --d-lh-title: 30px;
  --d-fs-h:     20px; --d-lh-h:     26px;
  --d-fs-body:  17px; --d-lh-body:  22px;
  --d-fs-row:   15px; --d-lh-row:   20px;
  --d-fs-cap:   13px; --d-lh-cap:   18px;
  --d-fs-micro: 11px; --d-lh-micro: 14px;

  
  --d-1:4px; --d-2:8px; --d-3:12px; --d-4:16px;
  --d-5:20px; --d-6:24px; --d-7:32px; --d-8:40px;
  --d-gutter: 16px;
  --d-section-gap: 28px;

  --d-r-card:16px; --d-r-btn:12px; --d-r-field:12px; --d-r-sheet:20px; --d-r-chip:8px;

  --d-dur-sheet:260ms; --d-dur-step:180ms; --d-dur-press:100ms;
  --d-ease-sheet: cubic-bezier(.32,.72,0,1);

  --d-row-h:52px; --d-btn-h:48px; --d-tap:44px; --d-icon:20px;
}


:root {
  --bg:       var(--d-bg);
  --bg-2:     var(--d-s1);
  --text:     var(--d-t1);
  --hint:     var(--d-t2);
  --link:     var(--d-accent-t);
  --btn:      var(--d-accent);
  --btn-text: var(--d-accent-fg);
  --section:  var(--d-bg);
  --line:     var(--d-line);
  
  --card:     var(--d-s1);

  
  --accent:   var(--d-accent);
  --accent-2: var(--d-accent-press);

  --ok:     var(--d-ok);
  --warn:   var(--d-warn);
  --danger: var(--d-dgr);

  --r-lg: var(--d-r-card);
  --r-md: var(--d-r-btn);
  --r-sm: var(--d-r-chip);
  --pad:  var(--d-gutter);
  --ease: var(--d-ease-sheet);
}


@media (prefers-color-scheme: dark) {
  :root { --card: var(--d-s1); --line: var(--d-line); }
}

html, body { background: var(--d-bg); color: var(--d-t1); }


.head { padding: var(--d-5) 2px var(--d-4); }
.head__title {
  font-size: var(--d-fs-title); line-height: var(--d-lh-title);
  font-weight: 600; letter-spacing: -.01em;
}
.head__sub {
  margin-top: var(--d-1);
  font-size: var(--d-fs-cap); line-height: var(--d-lh-cap); color: var(--d-t2);
}
.section { margin: var(--d-section-gap) 0 var(--d-2); padding: 0 var(--d-1); }
.section__title {
  font-size: var(--d-fs-micro); line-height: var(--d-lh-micro);
  font-weight: 600; letter-spacing: .06em; color: var(--d-t3);
}
.section__aside { font-size: var(--d-fs-cap); color: var(--d-t3); }
.list, .card { border-radius: var(--d-r-card); border-color: var(--d-line); }
.item { min-height: var(--d-row-h); }

.item__icon, .tab__icon, .tile__icon, .empty__icon {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--d-t2); flex: none;
}
.item__icon { width: var(--d-icon); }
.item__chev { display: inline-flex; align-items: center; color: var(--d-off); opacity: 1; }
.empty__icon { color: var(--d-off); }
.empty__icon .ic { width: 32px; height: 32px; flex-basis: 32px; }
.tab__icon .ic { width: 22px; height: 22px; flex-basis: 22px; }
.tile__icon .ic { width: 26px; height: 26px; flex-basis: 26px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--d-2); }
.btn .ic { flex: none; }

.tab--on .tab__icon, .tab.is-active .tab__icon { color: var(--d-accent-t); }


.ic-num {
  font-size: var(--d-fs-cap); font-weight: 600; color: var(--d-t3);
  font-variant-numeric: tabular-nums;
}

.ic-up   { transform: rotate(-90deg); }
.ic-down { transform: rotate(90deg); }


.boot__logo .ic { width: 44px; height: 44px; flex-basis: 44px; color: var(--d-accent-t); }
.fatal__icon { display: flex; justify-content: center; color: var(--d-warn); }
.fatal__icon .ic { width: 44px; height: 44px; flex-basis: 44px; }
.row__title { font-size: var(--d-fs-row); line-height: var(--d-lh-row); font-weight: 400; }
.row__sub { font-size: var(--d-fs-cap); line-height: var(--d-lh-cap); color: var(--d-t2); }
.row__val { font-size: var(--d-fs-row); color: var(--d-t2); font-weight: 400; }
.btn { min-height: var(--d-btn-h); border-radius: var(--d-r-btn);
       font-size: var(--d-fs-body); font-weight: 500; }
.btn--primary { background: var(--d-accent); color: var(--d-accent-fg); }
.btn--danger  { background: var(--d-dgr-solid); color: #fff; }
.btn--ghost   { background: transparent; color: var(--d-t2); }
.btn--white   { background: #fff; color: #1a1a1f; }
.input, .field input, .field textarea {
  min-height: var(--d-btn-h); border-radius: var(--d-r-field);
  background: var(--d-bg); color: var(--d-t1);
  border: 1px solid var(--d-line-2); font-size: var(--d-fs-body);
}
.notice { border-radius: var(--d-r-card); font-size: var(--d-fs-cap);
          line-height: var(--d-lh-cap); }
.stat { border-radius: var(--d-r-card); border-color: var(--d-line); }
.badge { border-radius: 999px; font-size: var(--d-fs-cap); }
.chip { border-radius: 999px; font-size: var(--d-fs-cap); }
.empty { color: var(--d-t2); }
.avatar { background: var(--d-s2); border: 1px solid var(--d-line); color: var(--d-t2); }


#screen[data-screen="account"] {
  color: var(--d-t1);
  font-size: var(--d-fs-row);
  line-height: var(--d-lh-row);
}
body.no-sky { background: var(--d-bg); }
body.no-sky .sky { display: none; }

body.no-sky::before, body.no-sky::after { display: none; }


.ic {
  width: var(--d-icon); height: var(--d-icon);
  flex: 0 0 var(--d-icon);
  fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.ic--sm { width:16px; height:16px; flex-basis:16px; }


.ac-head { padding: var(--d-5) var(--d-gutter) var(--d-4); }
.ac-head__top { display:flex; align-items:center; gap: var(--d-3); }
.ac-head__title {
  margin:0; flex:1 1 auto;
  font-size: var(--d-fs-title); line-height: var(--d-lh-title);
  font-weight:600; letter-spacing:-.01em; color: var(--d-t1);
}
.ac-head__sub {
  margin: var(--d-1) 0 0;
  font-size: var(--d-fs-cap); line-height: var(--d-lh-cap);
  color: var(--d-t2);
  
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.ac-chip {
  flex:0 0 auto;
  padding: 3px var(--d-2);
  border-radius: var(--d-r-chip);
  background: var(--d-s2); border:1px solid var(--d-line);
  color: var(--d-t2);
  font-size: var(--d-fs-micro); line-height: var(--d-lh-micro);
  font-weight:600; text-transform:uppercase; letter-spacing:.06em;
}


.ac-sec { margin-top: var(--d-section-gap); }
.ac-sec:first-of-type { margin-top: var(--d-5); }
.ac-sec__head {
  display:flex; align-items:baseline; gap: var(--d-2);
  padding: 0 var(--d-gutter) var(--d-2);
}
.ac-sec__title {
  flex:1 1 auto;
  font-size: var(--d-fs-micro); line-height: var(--d-lh-micro);
  font-weight:600; text-transform:uppercase; letter-spacing:.06em;
  color: var(--d-t3);
}
.ac-sec__aside { font-size: var(--d-fs-cap); color: var(--d-t3); }



.ac-card {
  margin: 0;
  background: var(--d-s1);
  border: 1px solid var(--d-line);
  border-radius: var(--d-r-card);
  overflow: hidden;
}

.ac-row {
  display:flex; align-items:center; gap: var(--d-3);
  min-height: var(--d-row-h);
  padding: var(--d-3) var(--d-4);
  border-top: 1px solid var(--d-line);
}
.ac-row:first-child { border-top: 0; }
.ac-row__ic { color: var(--d-t2); display:flex; }
.ac-row__grow { flex:1 1 auto; min-width:0; }
.ac-row__title {
  display:block;
  font-size: var(--d-fs-row); line-height: var(--d-lh-row);
  color: var(--d-t1);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.ac-row__sub {
  display:block; margin-top:2px;
  font-size: var(--d-fs-cap); line-height: var(--d-lh-cap);
  color: var(--d-t2);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.ac-row__val {
  flex:0 0 auto; max-width:45%;
  font-size: var(--d-fs-row); color: var(--d-t2);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.ac-row__end {
  flex: 0 0 auto; display: flex; flex-direction: column;
  align-items: flex-end; gap: 4px; margin-left: var(--d-2);
}

.ac-row__end .ac-row__val { max-width: none; }



.ac-row--new { box-shadow: inset 2px 0 0 var(--d-accent-t); }
.ac-row--new .ac-row__title { color: var(--d-t1); font-weight: 500; }

.ac-row--log { align-items: flex-start; }
.ac-row--log .ac-row__title,
.ac-row--log .ac-row__sub {
  white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.ac-row--text .ac-row__sub {
  display: block; -webkit-line-clamp: none; overflow: visible;
}
.ac-row__chev { color: var(--d-off); display:flex; flex:0 0 auto; }


.ac-row--tap { cursor:pointer; -webkit-user-select:none; user-select:none;
  transition: background var(--d-dur-press) linear, transform var(--d-dur-press) linear; }
.ac-row--tap:active { background: var(--d-s2); transform: scale(.985); }
.ac-row--danger .ac-row__title { color: var(--d-dgr); }
.ac-row--danger .ac-row__ic { color: var(--d-dgr); }


.ac-badge {
  display:inline-flex; align-items:center; gap:4px; flex:0 0 auto;
  padding: 2px var(--d-2); border-radius: 999px;
  border:1px solid var(--d-line-2); background: var(--d-s2);
  color: var(--d-t2);
  font-size: var(--d-fs-cap); line-height: var(--d-lh-cap); font-weight:500;
  white-space:nowrap;
}
.ac-badge .ic { width:14px; height:14px; flex-basis:14px; stroke-width:2.25; }
.ac-badge--on   { color: var(--d-ok);   border-color: var(--d-ok-line);   background: var(--d-ok-bg); }
.ac-badge--todo { color: var(--d-warn); border-color: var(--d-warn-line); background: var(--d-warn-bg); }



.ac-score {
  display:flex; align-items:center; gap: var(--d-4);
  margin: var(--d-4) 0 0;
  padding: var(--d-4);
  background: var(--d-s1); border:1px solid var(--d-line);
  border-radius: var(--d-r-card);
  cursor:pointer; -webkit-user-select:none; user-select:none;
  transition: background var(--d-dur-press) linear, transform var(--d-dur-press) linear;
}
.ac-score:active { background: var(--d-s2); transform: scale(.99); }

.ac-score__shield { position:relative; flex:0 0 auto; width:46px; height:46px; }
.ac-score__shield .ic { width:46px; height:46px; flex-basis:46px; stroke-width:1.25; }
.ac-score__num {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  padding-top:2px;
  font-size: var(--d-fs-row); font-weight:600; line-height:1;
}
.ac-score__grow { flex:1 1 auto; min-width:0; }
.ac-score__top { display:flex; align-items:baseline; gap: var(--d-2); }
.ac-score__title {
  flex:1 1 auto; font-size: var(--d-fs-row); color: var(--d-t1); font-weight:500;
}
.ac-score__val { flex:0 0 auto; font-size: var(--d-fs-cap); font-weight:600; }

.ac-score__bar { display:flex; gap:3px; margin: var(--d-2) 0 var(--d-1); }
.ac-score__seg { flex:1 1 0; height:4px; border-radius:2px; background: var(--d-line-2); }
.ac-score__seg--on { background: currentColor; }
.ac-score__sub {
  font-size: var(--d-fs-cap); line-height: var(--d-lh-cap); color: var(--d-t2);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.ac-score--low  { color: var(--d-dgr); }
.ac-score--mid  { color: var(--d-warn); }
.ac-score--high { color: var(--d-ok); }



.ac-score__tally {
  display: inline-flex; align-items: center; gap: 6px;
  margin: var(--d-2) 0 var(--d-1);
  padding: 5px 11px; border-radius: 999px;
  font-size: var(--d-fs-cap); font-weight: 600;
  background: color-mix(in srgb, var(--d-t2) 14%, transparent);
  color: var(--d-t1);
}
.ac-score__tally--high {
  background: color-mix(in srgb, var(--d-ok) 16%, transparent); color: var(--d-ok);
}
.ac-score__tally--mid {
  background: color-mix(in srgb, var(--d-warn) 16%, transparent); color: var(--d-warn);
}


.ac-check {
  display:flex; gap: var(--d-2); align-items:flex-start;
  padding: 5px 0; min-height: 24px;
}
.ac-check__ic { flex:0 0 auto; margin-top:2px; }
.ac-check--on   .ac-check__ic { color: var(--d-ok); }
.ac-check--todo .ac-check__ic { color: var(--d-off); }
.ac-check__text { font-size: var(--d-fs-cap); line-height: 1.35; color: var(--d-t1); }
.ac-check--todo .ac-check__text { color: var(--d-t2); }
.ac-check__note {
  display:block; margin-top: 1px;
  font-size: var(--d-fs-micro); line-height: 1.35; color: var(--d-t3);
}


.ac-note {
  display:flex; gap: var(--d-3); align-items:flex-start;
  margin: var(--d-4) 0 0;
  padding: var(--d-3) var(--d-4);
  border-radius: var(--d-r-card);
  border:1px solid var(--d-line);
  background: var(--d-s1);
  font-size: var(--d-fs-cap); line-height: var(--d-lh-cap);
  color: var(--d-t2);
}
.ac-note__ic { flex:0 0 auto; margin-top:1px; }
.ac-note__grow { flex:1 1 auto; min-width:0; }
.ac-note__title {
  display:block; color: var(--d-t1);
  font-size: var(--d-fs-row); line-height: var(--d-lh-row); font-weight:500;
}
.ac-note--ok   { background: var(--d-ok-bg);   border-color: var(--d-ok-line); }
.ac-note--ok   .ac-note__ic { color: var(--d-ok); }
.ac-note--warn { background: var(--d-warn-bg); border-color: var(--d-warn-line); }
.ac-note--warn .ac-note__ic { color: var(--d-warn); }
.ac-note--dgr  { background: var(--d-dgr-bg);  border-color: var(--d-dgr-line); }
.ac-note--dgr  .ac-note__ic { color: var(--d-dgr); }

.ac-note--info .ac-note__ic { color: var(--d-accent-t); }


.ac-key {
  margin-bottom: var(--d-3); padding: var(--d-4);
  background: var(--d-bg); border:1px solid var(--d-line-2);
  border-radius: var(--d-r-field);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--d-fs-h); line-height: 1.5; letter-spacing: .08em;
  text-align:center; color: var(--d-t1);
  -webkit-user-select: all; user-select: all;
  word-break: break-all;
}


.ac-btn {
  display:inline-flex; align-items:center; justify-content:center; gap: var(--d-2);
  min-height: var(--d-btn-h); padding: 0 var(--d-5);
  border:1px solid transparent; border-radius: var(--d-r-btn);
  font-size: var(--d-fs-body); font-weight:500; line-height:1;
  cursor:pointer; -webkit-user-select:none; user-select:none;
  transition: background var(--d-dur-press) linear, transform var(--d-dur-press) linear;
}
.ac-btn:active:not(:disabled) { transform: scale(.98); }
.ac-btn:disabled { opacity:.5; cursor:default; }
.ac-btn--wide { display:flex; width: 100%; margin: 0; }
.ac-btn--primary { background: var(--d-accent); color: var(--d-accent-fg); }
.ac-btn--primary:active:not(:disabled) { background: var(--d-accent-press); }
.ac-btn--secondary { background: var(--d-s2); color: var(--d-t1); border-color: var(--d-line-2); }

.ac-btn--danger { background: var(--d-dgr-solid); color:#fff; }
.ac-btn--ghost { background: transparent; color: var(--d-t2); }


.ac-empty {
  margin: var(--d-4) 0; padding: var(--d-7) var(--d-5);
  text-align:center; border:1px dashed var(--d-line-2);
  border-radius: var(--d-r-card); color: var(--d-t2);
}
.ac-empty__ic { color: var(--d-off); margin-bottom: var(--d-3); }
.ac-empty__title {
  color: var(--d-t1); font-size: var(--d-fs-body); font-weight:500;
  margin-bottom: var(--d-1);
}

.ac-skel { margin:0 var(--d-gutter); border-radius: var(--d-r-card);
  background: var(--d-s1); border:1px solid var(--d-line); overflow:hidden; }
.ac-skel__row { height: var(--d-row-h); border-top:1px solid var(--d-line); }
.ac-skel__row:first-child { border-top:0; }


.ac-ava {
  flex:0 0 auto; width:32px; height:32px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background: var(--d-s2); border:1px solid var(--d-line);
  color: var(--d-t2); font-size: var(--d-fs-cap); font-weight:600;
}
.ac-ava--me { border-color: var(--d-accent); color: var(--d-accent-t); }


.ac-btn--row {
  flex: 0 0 auto;
  min-height: var(--d-tap);
  padding: 0 var(--d-3);
  font-size: var(--d-fs-cap);
  font-weight: 500;
}


.ac-row--session .ac-row__sub {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ac-row--session { align-items: flex-start; }
.ac-row--session .ac-ava,
.ac-row--session .ac-btn { margin-top: 2px; }


.ac-tail { height: calc(var(--d-8) + var(--safe-bottom)); }




html.sheet-open { overflow: hidden; touch-action: none; }

.sheet__backdrop { background: rgba(0,0,0,.6); }

.sheet--v2 .sheet__body {
  background: var(--d-s3);
  color: var(--d-t1);
  border-radius: var(--d-r-sheet) var(--d-r-sheet) 0 0;
  
  min-height: 200px;
  max-height: 88vh;
  padding: var(--d-2) var(--d-gutter) calc(var(--safe-bottom) + var(--d-5));
  transition: height var(--d-dur-step) var(--d-ease-sheet);
  animation: sheetUp var(--d-dur-sheet) var(--d-ease-sheet);
}
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet--v2 .sheet__grip { background: var(--d-line-2); width:36px; height:4px; margin:0 auto var(--d-3); }


.ac-sh__head {
  display:flex; align-items:center; gap: var(--d-2);
  min-height: var(--d-tap); margin-bottom: var(--d-3);
}
.ac-sh__back {
  flex:0 0 auto; width: var(--d-tap); height: var(--d-tap);
  display:flex; align-items:center; justify-content:center;
  margin-left: calc(var(--d-2) * -1);
  border:0; background:transparent; color: var(--d-t2); cursor:pointer;
  border-radius: var(--d-r-btn);
}
.ac-sh__back:active { background: var(--d-s2); }
.ac-sh__title {
  flex:1 1 auto; margin:0;
  font-size: var(--d-fs-h); line-height: var(--d-lh-h);
  font-weight:600; color: var(--d-t1);
}

.ac-sh__dots { display:flex; gap:6px; flex:0 0 auto; }
.ac-sh__dot { width:6px; height:6px; border-radius:50%; background: var(--d-off); }
.ac-sh__dot--on { background: var(--d-accent-t); }


.ac-sh__step { animation: stepIn var(--d-dur-step) var(--d-ease-sheet); }
.ac-sh__step--back { animation-name: stepInBack; }
@keyframes stepIn     { from { opacity:0; transform: translateX(14px); } }
@keyframes stepInBack { from { opacity:0; transform: translateX(-14px); } }

.ac-sh__text {
  margin: 0 0 var(--d-4);
  font-size: var(--d-fs-body); line-height: var(--d-lh-body);
  color: var(--d-t2);
}
.ac-sh__foot { margin-top: var(--d-5); }


.ac-sh__link {
  display:flex; align-items:center; justify-content:center;
  min-height: var(--d-tap); margin-top: var(--d-2);
  color: var(--d-accent-t); font-size: var(--d-fs-cap);
  text-decoration:none; border-radius: var(--d-r-btn);
}
.ac-sh__link:active { background: var(--d-s2); }


.toast {
  top: calc(var(--safe-top) + 52px);
  bottom: auto;
  animation: toastDown var(--d-dur-sheet) var(--d-ease-sheet);
  background: var(--d-s3); color: var(--d-t1);
  border: 1px solid var(--d-line-2);
  border-radius: var(--d-r-btn);
  font-size: var(--d-fs-row);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.toast--ok  { background: var(--d-s3); border-color: var(--d-ok-line);  color: var(--d-t1); }
.toast--err { background: var(--d-s3); border-color: var(--d-dgr-line); color: var(--d-t1); }
@keyframes toastDown {
  from { opacity: 0; transform: translate(-50%, -14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}


.ac-field { margin-bottom: var(--d-4); }
.ac-field__label {
  display:block; margin-bottom: var(--d-2);
  font-size: var(--d-fs-cap); color: var(--d-t2);
}
.ac-input {
  display:block; width:100%;
  min-height: var(--d-btn-h); padding: 0 var(--d-4);
  background: var(--d-bg); color: var(--d-t1);
  border:1px solid var(--d-line-2); border-radius: var(--d-r-field);
  font-size: var(--d-fs-body); font-family: inherit;
  
}
.ac-input:focus { outline:none; border-color: var(--d-accent); }
.ac-input--code { letter-spacing:.28em; text-align:center; font-size: var(--d-fs-h); }
.ac-field__hint {
  margin: var(--d-2) 0 0;
  font-size: var(--d-fs-cap); line-height: var(--d-lh-cap); color: var(--d-t3);
}
.ac-field__err {
  margin: var(--d-2) 0 0;
  font-size: var(--d-fs-cap); line-height: var(--d-lh-cap); color: var(--d-dgr);
}



.sheet--v2 .otp,
#screen[data-screen="account"] .otp { display:flex; gap: var(--d-2); margin-bottom: var(--d-4); }
.sheet--v2 .otp__cell,
#screen[data-screen="account"] .otp__cell {
  flex:1 1 0; min-width:0; height: 56px;
  text-align:center; font-size: var(--d-fs-h); font-family: inherit;
  background: var(--d-bg); color: var(--d-t1);
  border:1px solid var(--d-line-2); border-radius: var(--d-r-field);
}
.sheet--v2 .otp__cell:focus,
#screen[data-screen="account"] .otp__cell:focus { outline:none; border-color: var(--d-accent); }


.ac-btn__spin {
  width:18px; height:18px; border-radius:50%;
  border:2px solid currentColor; border-top-color: transparent;
  animation: acSpin .7s linear infinite;
}
@keyframes acSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ac-sh__step { animation: none; }
  .sheet--v2 .sheet__body { animation: none; }
}




@media (min-width: 600px) {

  .sheet {
    align-items: center;
    justify-content: center;
    padding: var(--d-6);
  }

  
  .sheet__backdrop {
    background: rgba(6, 6, 10, .62);
    backdrop-filter: blur(6px) saturate(140%);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
  }

  
  .sheet__body,
  .sheet--v2 .sheet__body,
  .sheet--full .sheet__body {
    width: min(440px, 100%);
    height: auto;
    min-height: 0;
    max-height: min(84vh, 660px);
    border-radius: var(--d-r-card, 16px);
    padding: var(--d-6) var(--d-6) var(--d-6);
    box-shadow:
      0 0 0 1px var(--d-line),
      0 32px 80px -28px rgba(0, 0, 0, .82);
    animation: dialogIn 220ms var(--d-ease-sheet);
  }

  
  @keyframes dialogIn {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
  }

  .sheet__grip { display: none; }

  
  .sheet--v2 #sheet-head { margin-top: calc(var(--d-2) * -1); }

  
  .sheet .btn-row {
    justify-content: flex-end;
  }
  .sheet .btn-row .btn { flex: 0 1 auto; min-width: 132px; }
}


@media (min-width: 1024px) {
  .sheet__body,
  .sheet--v2 .sheet__body,
  .sheet--full .sheet__body { width: min(480px, 100%); }
}

@media (prefers-reduced-motion: reduce) {
  .sheet__body,
  .sheet--v2 .sheet__body,
  .sheet--full .sheet__body { animation: none; }
}
