:root {
  --fb-bg: #f2f2f7;
  --fb-surface: #ffffff;
  --fb-text: #000000;
  --fb-hint: #8e8e93;
  --fb-accent: #007aff;
  --fb-separator: rgba(60, 60, 67, 0.18);

  --bg: var(--tg-theme-secondary-bg-color, var(--fb-bg));
  --surface: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, var(--fb-surface)));
  --text: var(--tg-theme-text-color, var(--fb-text));
  --hint: var(--tg-theme-hint-color, var(--fb-hint));
  --accent: var(--tg-theme-accent-text-color, var(--tg-theme-link-color, var(--fb-accent)));
  --button: var(--tg-theme-button-color, var(--fb-accent));
  --button-text: var(--tg-theme-button-text-color, #ffffff);
  --separator: var(--tg-theme-section-separator-color, var(--fb-separator));
  --header: var(--tg-theme-section-header-text-color, var(--hint));

  --pressed: rgba(127, 127, 127, 0.16);
  --star: #ffa800;
  --green: #34c759;
  --orange: #ff9500;
  --radius: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
}

:root[data-scheme="dark"] { color-scheme: dark; }
:root[data-scheme="light"] { color-scheme: light; }

@media (prefers-color-scheme: dark) {
  :root {
    --fb-bg: #000000;
    --fb-surface: #1c1c1e;
    --fb-text: #ffffff;
    --fb-hint: #8d8e93;
    --fb-accent: #0a84ff;
    --fb-separator: rgba(84, 84, 88, 0.6);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font: 17px/1.29 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.016em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; letter-spacing: inherit; }
.num { font-variant-numeric: tabular-nums; }
.i { width: 24px; height: 24px; flex: none; fill: currentColor; }

.view { padding: 0 16px; }
#view-tabs { padding-bottom: calc(var(--safe-bottom) + 100px); }

.page-head { padding: 20px 4px 18px; }
.page-head h1 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; }

.group-header {
  margin: 26px 16px 7px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--header);
}
.group-footer { margin: 8px 16px 0; font-size: 13px; line-height: 1.38; color: var(--hint); letter-spacing: 0; }

.intro { display: flex; flex-direction: column; align-items: center; padding: 28px 8px 4px; text-align: center; }
.intro h1 { margin: 18px 0 0; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.025em; }
.intro p { max-width: 330px; margin: 6px 0 0; font-size: 15px; line-height: 1.4; color: var(--hint); text-wrap: balance; }

.icon-stack { display: flex; align-items: center; justify-content: center; height: 88px; }
.icon-stack .app-icon { width: 64px; height: 64px; --s: 64px; box-shadow: 0 0 0 3px var(--bg); }
.icon-stack .app-icon:nth-child(1) { margin-right: -12px; }
.icon-stack .app-icon:nth-child(2) { width: 80px; height: 80px; --s: 80px; z-index: 1; }
.icon-stack .app-icon:nth-child(3) { margin-left: -12px; }
.icon-stack[data-count="1"] .app-icon, .icon-stack[data-count="2"] .app-icon:nth-child(2) { margin: 0; }
.icon-stack[data-count="1"] .app-icon { width: 80px; height: 80px; --s: 80px; }

.group { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.group + .group, .group + .search { margin-top: 22px; }

.cell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 44px;
  padding: 11px 16px;
  border: 0;
  background: none;
  text-align: left;
  transition: background-color 0.15s;
}
button.cell { cursor: pointer; }
.cell + .cell::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: var(--sep-inset, 16px);
  height: 0.5px;
  background: var(--separator);
}
.cell-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cell-title { font-size: 17px; }
.cell-sub { font-size: 14px; line-height: 1.3; color: var(--hint); letter-spacing: -0.01em; }
.cell-title, .cell-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub.wrap { white-space: normal; }
.feature .cell-title, .order-cell .cell-title, .order-cell .cell-sub { white-space: normal; }
.hero p, .cell-sub.wrap, .sheet-panel > p { text-wrap: pretty; }
.cell-value { color: var(--hint); white-space: nowrap; }
.chevron { width: 16px; height: 16px; color: var(--hint); opacity: 0.55; }

.pressable.is-pressed { background-color: var(--pressed); }
.is-busy { opacity: 0.55; pointer-events: none; }

.glyph {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.glyph .i { width: 19px; height: 19px; }
.glyph.green { background: #34c759; }
.glyph.blue { background: #007aff; }
.glyph.orange { background: #ff9500; }
.glyph.red { background: #ff3b30; }
.glyph.purple { background: #af52de; }
.glyph.indigo { background: #5856d6; }
.glyph.teal { background: #30b0c7; }
.glyph.pink { background: #ff2d55; }
.glyph.gray { background: #8e8e93; }
.glyph.dark { background: #3a3a3c; }
.glyph.star-glyph { background: #ffa800; }
.icons-inset { --sep-inset: 60px; }
.spaced { margin-top: 22px; }

.app-icon {
  position: relative;
  flex: none;
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 22.5%;
  background: var(--tile, #000);
  overflow: hidden;
  isolation: isolate;
}
.app-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
:root[data-scheme="dark"] .app-icon::after { box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2); }
.app-icon .poster, .app-icon picture { position: absolute; top: 12%; left: 12%; width: 76%; height: 76%; }
.app-icon picture img { display: block; width: 100%; height: 100%; }
.app-icon .emoji { position: absolute; top: 12%; left: 12%; width: 76%; height: 76%; display: block; object-fit: contain; }
.app-icon .emoji svg { display: block; }
.app-icon.bare { background: none; }
.app-icon.bare::after { display: none; }
.app-icon.bare .emoji { top: 0; left: 0; width: 100%; height: 100%; }
.tgs-pick .slot-clear { padding: 0 12px; color: var(--button); font-size: 15px; }
.app-icon.is-live .poster { visibility: hidden; }
.app-icon.sm { width: 40px; height: 40px; }
.app-icon.lg { width: 84px; height: 84px; }
.app-icon.xl { width: 112px; height: 112px; }

#catalog { --sep-inset: 90px; }
.product { padding: 12px 16px; min-height: 84px; }
.product .cell-title { font-weight: 600; }
.product .cell-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.price-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 11px 6px 8px;
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.12);
  background: color-mix(in srgb, var(--button) 12%, transparent);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.price-pill .i, .star { color: var(--star); }
.price-pill .i { width: 15px; height: 15px; }
.price-pill small { font-size: 13px; font-weight: 500; opacity: 0.8; margin-right: 1px; }
@media (max-width: 359px) {
  .product { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 6px; }
  .product .app-icon { grid-row: span 2; }
  .product .price-pill { grid-column: 2; justify-self: start; }
}

.list-inset { --sep-inset: 70px; }
.order-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.order-id { font-size: 13px; color: var(--hint); letter-spacing: 0; }
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; white-space: nowrap; }
.status .i { width: 17px; height: 17px; }
.status.paid { color: var(--orange); }
.status.done { color: var(--green); }
.status.refunded, .status.cancelled { color: var(--hint); }
.status.preorder { color: var(--orange); }

.empty { display: flex; flex-direction: column; align-items: center; padding: 56px 24px; text-align: center; }
.empty > .i { width: 56px; height: 56px; color: var(--hint); opacity: 0.6; }
.empty h2 { margin: 14px 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.empty p { margin: 0; color: var(--hint); font-size: 15px; }
.empty .btn-plain { margin-top: 10px; }

.skeleton { height: 64px; background: var(--surface); animation: pulse 1s ease-in-out infinite alternate; }
.skeleton:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.skeleton:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.skeleton + .skeleton { margin-top: 1px; }
@keyframes pulse { to { background-color: rgba(127, 127, 127, 0.12); } }


.profile-head { display: flex; flex-direction: column; align-items: center; padding: 28px 0 22px; text-align: center; }
.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--button);
  color: var(--button-text);
  font-size: 36px;
  font-weight: 600;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .i { width: 56px; height: 56px; opacity: 0.9; }
.profile-head h1 { margin: 12px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.profile-head p { margin: 3px 0 0; color: var(--hint); font-size: 15px; }

.faq { display: block; padding: 0; }
.faq summary { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 11px 16px; list-style: none; cursor: pointer; transition: background-color 0.15s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .cell-title { flex: 1; white-space: normal; }

.faq[open] .chevron { transform: rotate(180deg); }
.faq p { margin: -4px 16px 12px; color: var(--hint); font-size: 15px; line-height: 1.4; }

.dock {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 24px calc(var(--safe-bottom) + 12px);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--bg) 42%);
  pointer-events: none;
}
.dock.is-away { visibility: hidden; }

.tabbar {
  position: relative;
  max-width: 330px;
  height: 62px;
  margin: 0 auto;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 31px;
  background: var(--surface);
  box-shadow: 0 0 0 0.5px var(--separator), 0 6px 20px rgba(0, 0, 0, 0.14);
  pointer-events: auto;
  touch-action: none;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) and (background: color-mix(in srgb, red 50%, transparent)) {
  :root.blur .tabbar {
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
  }
}

.lens {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 0;
  pointer-events: none;
  transition: left 0.42s cubic-bezier(0.3, 1.25, 0.45, 1);
}
.lens > span {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.14);
  background: color-mix(in srgb, var(--text) 7%, transparent);
  transition-property: top, right, bottom, left, background-color, box-shadow;
  transition-duration: 0.28s, 0.28s, 0.28s, 0.28s, 0.2s, 0.2s;
  transition-timing-function: cubic-bezier(0.3, 1.4, 0.5, 1);
}
.tabbar.is-dragging .lens > span {
  top: -6px;
  bottom: -6px;
  left: -9px;
  right: -9px;
  background: rgba(127, 127, 127, 0.08);
  background: color-mix(in srgb, var(--text) 4%, transparent);
  box-shadow: inset 0 0 0 0.5px rgba(127, 127, 127, 0.4), 0 6px 18px rgba(0, 0, 0, 0.14);
}

.tabbar-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
}
.tabbar-item .i { width: 25px; height: 25px; overflow: visible; }

.anim-orders .ln { fill: #000; }

.tabbar-item .on, .tabbar-item.is-active .off { display: none; }
.tabbar-item.is-active .on { display: block; }
.tabbar-item.is-active { color: var(--accent); }

.screen { min-height: var(--tg-viewport-stable-height, 100vh); padding-bottom: calc(var(--safe-bottom) + 100px); background: var(--bg); }

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 8px 0 0 -8px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--accent);
  cursor: pointer;
}
.nav-back .i { width: 22px; height: 22px; }

.hero { display: flex; flex-direction: column; align-items: center; padding: 20px 8px 4px; text-align: center; }
.hero h1 { margin: 16px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -0.025em; }
.hero p { margin: 4px 0 0; color: var(--hint); font-size: 15px; line-height: 1.4; }

.plan { gap: 12px; padding: 10px 16px; min-height: 60px; }
.plan .radio { width: 24px; height: 24px; color: var(--hint); opacity: 0.5; }
.plan[aria-checked="true"] .radio { color: var(--button); opacity: 1; }
.plans, .methods { --sep-inset: 52px; }
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(142, 142, 147, 0.18);
  color: var(--hint);
  font-size: 13px;
  font-weight: 600;
  vertical-align: 1px;
  letter-spacing: 0;
}
.tag.save { background: rgba(52, 199, 89, 0.16); color: var(--green); }
.plan .stars { color: var(--text); font-weight: 600; }
.plan .glyph { margin-left: -2px; }

.feature .i { color: var(--accent); }
.features { --sep-inset: 54px; }

.paybar {
  position: fixed;
  z-index: 21;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px calc(var(--safe-bottom) + 10px);
  background: var(--bg);
  box-shadow: 0 -0.5px 0 var(--separator);
  visibility: hidden;
}
.paybar.is-open { visibility: visible; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: var(--radius);
  background: var(--button);
  color: var(--button-text);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}
.btn.is-pressed { background: var(--button); opacity: 0.75; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn .star { width: 18px; height: 18px; margin-left: 2px; }
.btn s { margin-left: 6px; font-weight: 500; opacity: 0.6; }
.btn.is-busy { opacity: 0.6; }

.btn-plain {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--accent);
  font-size: 17px;
  cursor: pointer;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  overscroll-behavior: contain;
  touch-action: none;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.4);
  animation: dim 0.2s ease-out;
}
.sheet-panel {
  width: 100%;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 26px 16px calc(var(--safe-bottom) + 12px);
  border-radius: 14px 14px 0 0;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  animation: rise 0.32s var(--ease);
}
.sheet.is-closing { animation: dim 0.2s ease-in reverse forwards; }
.sheet.is-closing .sheet-panel { animation: rise 0.22s ease-in reverse forwards; }
.sheet-panel > h2 { margin: 16px 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.sheet-panel > p { margin: 0 8px 22px; color: var(--hint); font-size: 15px; line-height: 1.4; }
.sheet-panel .btn-plain { margin-top: 6px; }
@keyframes dim { from { background-color: rgba(0, 0, 0, 0); } }
@keyframes rise { from { top: 100vh; } }

.order-head { display: flex; align-items: center; gap: 14px; align-self: stretch; text-align: left; }
.order-head .app-icon { width: 56px; height: 56px; }
.order-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.order-head p { margin: 2px 0 0; color: var(--hint); font-size: 15px; }

.timeline { align-self: stretch; margin: 22px 0 22px; padding: 0; list-style: none; text-align: left; }
.timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: 2px;
  width: 2px;
  border-radius: 1px;
  background: var(--separator);
}
.timeline li.is-done:not(:last-child)::before { background: var(--green); }
.timeline .i { width: 24px; height: 24px; color: var(--hint); opacity: 0.45; }
.timeline .is-done .i { color: var(--green); opacity: 1; }
.timeline .is-current .i { color: var(--orange); opacity: 1; }
.timeline .is-refund .i { color: var(--hint); opacity: 1; }
.timeline b { display: block; font-size: 16px; font-weight: 600; }
.timeline span { display: block; margin-top: 1px; font-size: 14px; line-height: 1.35; color: var(--hint); }

.toast {
  position: fixed;
  z-index: 40;
  left: 16px;
  right: 16px;
  top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(28, 28, 30, 0.94);
  color: #fff;
  font-size: 15px;
  text-align: center;
  animation: toast-in 0.24s var(--ease);
}
@keyframes toast-in { from { top: -60px; } }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
}

.stars { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.stars .star { width: 16px; height: 16px; }
.stars.big { gap: 6px; font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.stars.big .star { width: 30px; height: 30px; }
.cell-value.balance { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 600; }
.cell-value.balance .star { width: 17px; height: 17px; }
.balance-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 22px; }
.balance-hero > span:first-child { color: var(--hint); font-size: 15px; }
.amount-delta { flex: none; font-weight: 600; color: var(--text); }
.amount-delta.plus { color: var(--green); }

.field-row { gap: 14px; }
.field-input {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
  letter-spacing: inherit;
  -webkit-user-select: text;
  user-select: text;
}
.field-input::placeholder { color: var(--hint); opacity: 0.8; }
.link-btn {
  flex: none;
  height: 32px;
  padding: 0 4px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--accent);
  font-size: 17px;
  cursor: pointer;
}
.link-btn.is-pressed { opacity: 0.55; background: none; }
.link-btn.danger { color: #ff3b30; }

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
}
.notice .i { color: var(--orange); }
.notice b { display: block; font-weight: 600; }
.notice span { display: block; margin-top: 2px; color: var(--hint); font-size: 15px; line-height: 1.35; }

.badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: #ff3b30;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
  letter-spacing: 0;
}

.app-icon .letter { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: calc(var(--s, 60px) * 0.46); font-weight: 600; }
.app-icon .letter.on-light { color: #1c1c1e; }
.app-icon .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app-icon { --s: 60px; }
.app-icon.sm { --s: 40px; }
.app-icon.lg { --s: 84px; }
.app-icon.xl { --s: 112px; }

.order-head .app-icon { --s: 56px; }

.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-self: stretch; }
.amount {
  height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow 0.15s;
}
.amount .star { width: 15px; height: 15px; }
.amount.is-selected { box-shadow: inset 0 0 0 2px var(--button); }
.amount-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  height: 48px;
  margin: 8px 0 16px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--bg);
}
.amount-custom .star { width: 18px; height: 18px; }
.amount-custom:focus-within { box-shadow: inset 0 0 0 2px var(--button); }
@media (max-width: 359px) {
  .amounts { grid-template-columns: repeat(2, 1fr); }
}

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 22px; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px 13px;
  border-radius: var(--radius);
  background: var(--surface);
}
.stat > span { font-size: 13px; line-height: 1.25; color: var(--hint); letter-spacing: 0; }
.stat > b { font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat > b .star { width: 19px; height: 19px; }
.stat > small { font-size: 13px; color: var(--hint); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats.three .stat { align-items: center; text-align: center; padding: 10px 8px 11px; }
.stats.three .stat > b { font-size: 19px; }
.stats.three .stat > b .star { width: 16px; height: 16px; }

.search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  margin: 0 0 12px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(118, 118, 128, 0.12);
  color: var(--hint);
}
.search .i { width: 18px; height: 18px; }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
  -webkit-user-select: text;
  user-select: text;
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder { color: var(--hint); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.segmented {
  display: flex;
  gap: 2px;
  margin: 0 0 14px;
  padding: 2px;
  border-radius: 9px;
  background: rgba(118, 118, 128, 0.12);
}
.segmented button {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 4px;
  border: 0;
  border-radius: 7px;
  background: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.segmented button.is-on { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); font-weight: 600; }
:root[data-scheme="dark"] .segmented button.is-on { background: #636366; }
.segmented.in-cell { flex: 1; margin: 0; }

.form { display: block; }
.field { flex-direction: column; align-items: stretch; gap: 3px; padding-top: 9px; padding-bottom: 9px; }
.field-label { font-size: 13px; line-height: 1.3; color: var(--hint); letter-spacing: 0; }
textarea.field-input { height: auto; min-height: 44px; padding: 2px 0; resize: none; line-height: 1.35; }
input[type="date"].field-input { -webkit-appearance: none; appearance: none; min-height: 30px; text-align: left; }
.form-submit { margin-top: 22px; }
.btn-plain.wide { display: block; width: 100%; margin-top: 8px; }
.btn-plain.danger, .cell.danger .cell-title { color: #ff3b30; }
.row-actions { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.row-actions .btn-plain { display: inline-flex; align-items: center; gap: 4px; }
.row-actions .i { width: 18px; height: 18px; }
.prefixed { display: flex; align-items: center; gap: 1px; }
.prefixed > span { color: var(--hint); }

.switch {
  flex: none;
  position: relative;
  width: 51px;
  height: 31px;
  margin: 0;
  border-radius: 16px;
  background: rgba(120, 120, 128, 0.32);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background-color 0.2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16);
  transition: left 0.2s var(--ease);
}
.switch:checked { background: #34c759; }
.switch:checked::after { left: 22px; }
.check {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border-radius: 50%;
  border: 1.5px solid var(--hint);
  opacity: 0.8;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.check:checked { border: 0; opacity: 1; background: var(--button) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.color { position: relative; width: 30px; height: 30px; flex: none; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 0.5px var(--separator); }
.color input { position: absolute; inset: -8px; width: 46px; height: 46px; padding: 0; border: 0; background: none; cursor: pointer; }

.plan-edit { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 9px; padding-bottom: 9px; }
.plan-fields { display: flex; gap: 10px; align-items: flex-end; }
.plan-fields label { display: flex; flex-direction: column; gap: 3px; width: 58px; min-width: 0; }
.plan-fields label.grow { flex: 1; width: auto; }
.plan-on { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; }
.plan-edit.is-off .plan-fields { opacity: 0.45; }
.plan-supply { display: flex; flex-direction: column; gap: 4px; }
.plan-supply select { width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 15px; }
.plan-edit.is-off .plan-on span { color: var(--hint); }
.icon-btn { flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--hint); opacity: 0.6; display: grid; place-items: center; cursor: pointer; }
.icon-btn .i { width: 22px; height: 22px; }
.icon-pick { flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: rgba(118, 118, 128, 0.12); color: var(--accent); display: grid; place-items: center; cursor: pointer; }
.icon-pick .i { width: 20px; height: 20px; }
.add-row { color: var(--accent); }
.add-row > .i { width: 24px; height: 24px; color: #34c759; }
.tgs-pick { gap: 10px; flex-wrap: wrap; }
.tgs-pick button { padding: 3px; border: 0; border-radius: 13px; background: none; box-shadow: inset 0 0 0 2px transparent; cursor: pointer; }
.tgs-pick button.is-on { box-shadow: inset 0 0 0 2px var(--button); }
.icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-self: stretch; margin: 6px 0 4px; }
.icon-grid button { aspect-ratio: 1; border: 0; border-radius: 10px; background: var(--bg); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.icon-grid .i { width: 24px; height: 24px; }
.preview-box { margin-bottom: 4px; }
.preview .product { cursor: default; }

.tag.blue { background: rgba(0, 122, 255, 0.14); color: #007aff; }
.tag.red { background: rgba(255, 59, 48, 0.14); color: #ff3b30; }
.tag.big { margin: 8px 0 0; padding: 3px 10px; font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.02em; }

.avatar-sm { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 17px; font-weight: 600; }
.avatar-sm.xl { width: 84px; height: 84px; font-size: 34px; }
.profile-head.compact { padding: 12px 0 18px; }
.profile-head .link-btn.sub { height: auto; margin-top: 2px; color: var(--hint); font-size: 15px; }
.hero.compact { padding: 8px 8px 20px; }
.hero.compact h1 { margin-top: 12px; font-size: 22px; }
.kv .cell-title { flex: 1; }
.kv .cell-value { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.kv .cell-value s { color: var(--hint); }
.details { white-space: normal !important; word-break: break-all; -webkit-user-select: text; user-select: text; }
.wrap-title { white-space: normal !important; }
.cell-value.accent { color: var(--accent); }
.crown { width: 20px; height: 20px; color: #ffa800; }
.notice.live .i { color: var(--accent); }
.notice.muted .i { color: var(--green); }
.notice + .btn-plain.wide { margin-top: 4px; }
.page-head + .notice { margin-top: 0; }

.admin-order .cell-title, .admin-order .cell-sub { white-space: nowrap; }
.admin-order .muted { color: var(--hint); font-weight: 400; }
.admin-order .st { font-weight: 500; }
.st.paid { color: var(--orange); }
.st.done { color: var(--green); }
.st.wait, .st.refunded { color: var(--hint); }
.cell-value.small { font-size: 14px; letter-spacing: 0; }
label.cell .cell-sub { white-space: normal; }
.cell-sub .stars { gap: 2px; vertical-align: -2px; }
.cell-sub .stars .star { width: 13px; height: 13px; }
.banned { min-height: 70vh; display: grid; place-items: center; }
@media (max-width: 359px) { .admin-order .cell-value { display: none; } }

.enter { animation: enter 0.36s cubic-bezier(0.25, 1.45, 0.5, 1) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes enter { from { opacity: 0; transform: translateY(-22px); } }
.product.is-pressed .app-icon { transform: scale(0.94); }
.shake { animation: shake 0.42s ease; }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

body.gated #view-tabs, body.gated .screen, body.gated #dock, body.gated #paybar { display: none !important; }
.gate { min-height: var(--tg-viewport-stable-height, 100vh); padding: 40px 20px calc(var(--safe-bottom) + 24px); display: flex; flex-direction: column; align-items: center; text-align: center; }
.gate-logo { position: relative; top: 0; width: 96px; height: 96px; margin: 24px 0 26px; border-radius: 24%; box-shadow: 0 16px 34px rgba(91, 76, 245, 0.4); animation: float 3.2s ease-in-out infinite; }
.tg-logo { display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(160deg, #5fc0ff, #2a8bdf); }
.tg-logo img { width: 100%; height: 100%; }
@keyframes float { 50% { top: -8px; } }
.gate h1 { margin: 0 0 22px; font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
.gate-channel { display: flex; align-items: center; gap: 14px; align-self: stretch; padding: 12px 16px; border: 0; margin-bottom: 18px; text-align: left; cursor: pointer; }
.gate-avatar { flex: none; width: 46px; height: 46px; }
.gate .btn { align-self: stretch; }
.gate .btn-plain { margin-top: 6px; }
.gate.is-done .gate-logo { animation: done 0.5s ease-in forwards; }
.gate.is-done > *:not(.gate-logo) { transition: opacity 0.4s; opacity: 0; }
@keyframes done { 30% { transform: scale(1.12); } 100% { transform: scale(0.2); opacity: 0; } }

.avail { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; font-size: 13px; font-weight: 600; letter-spacing: 0; }
.avail.in { color: var(--green); }
.avail.pre { color: var(--orange); }
.avail .i { width: 13px; height: 13px; }
.pay-note.pre-note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); color: var(--hint); text-transform: none; }
.pay-note.pre-note .i { width: 20px; height: 20px; flex: none; color: var(--orange); }
.pay-note.pre-note b { color: var(--text); font-weight: 600; }
.delivered { align-self: stretch; margin: 0 0 18px; padding: 12px 14px; border-radius: var(--radius); background: var(--bg); text-align: left; display: flex; flex-direction: column; gap: 6px; }
.delivered > span { font-size: 13px; color: var(--hint); }
.delivered code { font: 15px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; word-break: break-all; white-space: pre-wrap; -webkit-user-select: text; user-select: text; }
.delivered .link-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 0; height: 28px; font-size: 15px; }
.delivered .link-btn .i { width: 18px; height: 18px; }

.paid-art { position: relative; }
.check-anim { position: absolute; right: -10px; bottom: -8px; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); }
.check-anim circle { fill: var(--green); }
.check-anim path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.4s 0.3s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.methods-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; align-self: stretch; margin-bottom: 12px; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px 10px; border: 0; border-radius: var(--radius); background: var(--bg); cursor: pointer; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow 0.15s; }
.pick.is-selected { box-shadow: inset 0 0 0 2px var(--button); }
.pick b { font-size: 16px; font-weight: 600; }
.pick small { font-size: 12px; color: var(--hint); letter-spacing: 0; }
.pick .app-icon { --s: 44px; width: 44px; height: 44px; }
.app-icon.bare.stars .poster, .app-icon.bare.stars picture { top: 0; left: 0; width: 100%; height: 100%; }
.topup-art { margin: 4px 0 2px; }
.announce-list { align-self: stretch; text-align: left; }
.announce-preview { align-self: stretch; margin: 12px 0 0; padding: 12px 14px; border-radius: var(--radius); background: var(--bg); text-align: left; white-space: pre-wrap; font-size: 15px; line-height: 1.4; }
.app-icon.crypto .poster, .app-icon.crypto picture { top: 14%; left: 14%; width: 72%; height: 72%; }
.usd { margin: -8px 0 14px !important; font-size: 14px !important; color: var(--hint); }
.glyph.brown { background: #a2845e; }
.warn { color: var(--orange) !important; }
.stock-n { flex: none; min-width: 26px; color: var(--hint); font-size: 14px; }

.brand-row { gap: 14px; }
.brand-thumb { flex: none; width: 56px; height: 56px; border-radius: 24%; object-fit: cover; box-shadow: 0 0 0 0.5px var(--separator); }
.cell-title.accent { color: var(--accent); }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.theme-sw { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--text); cursor: pointer; }
.theme-sw span { width: 52px; height: 52px; border-radius: 16px; box-shadow: 0 0 0 0.5px var(--separator), inset 0 0 0 2px transparent; }
.theme-sw.is-on span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.theme-sw small { font-size: 12px; line-height: 1.2; text-align: center; color: var(--hint); }
.theme-sw.is-on small { color: var(--text); font-weight: 600; }

.delivered-actions { display: flex; gap: 18px; }
#splash { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--bg); animation: splash-off 0s 8s forwards; }
.splash-mark { width: 172px; height: 84px; color: var(--text); }
.gate-mark { width: 150px; height: 74px; margin: 34px 0 30px; color: var(--text); }
@keyframes splash-off { to { visibility: hidden; } }
.glyph.letter { color: #fff; font-size: 15px; font-weight: 700; }
.glyph.letter.lg { width: 64px; height: 64px; border-radius: 16px; font-size: 30px; }
.glyph.letter.xl { width: 80px; height: 80px; border-radius: 20px; font-size: 38px; }
.glyph.svc { padding: 0; background: none; object-fit: contain; }
.glyph.svc.lg { width: 64px; height: 64px; }
.glyph.svc.xl { width: 80px; height: 80px; }
.flag { flex: none; width: 30px; font-size: 24px; line-height: 1; text-align: center; }
.otp-phone { font-size: 22px; font-weight: 600; letter-spacing: 0.01em; }
.otp-code { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 16px 0 6px; padding: 16px; border-radius: var(--radius); background: var(--surface); }
.otp-code span { color: var(--hint); font-size: 14px; }
.otp-code b { font-size: 38px; font-weight: 700; letter-spacing: 0.12em; }
.otp-wait { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 18px 0 8px; color: var(--hint); }
.otp-wait b { color: var(--text); font-size: 18px; }
.otp-wait .num { font-size: 28px; color: var(--text); font-weight: 600; }
.otp-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.otp-note { font-size: 14px; }
.cell-title .muted { color: var(--hint); font-weight: 400; }
