/* Xsprix Telegram Mini App.
   Colours come from telegram-theme.js (Telegram surfaces + Admin > Appearance accent, contrast-checked);
   shapes and type follow the website: soft cards, pill actions, bold prices. */

:root {
  --tma-bg: #f5f7fa; --tma-surface: #ffffff; --tma-border: #b6bfcb;
  --tma-button: #1a5ae0; --tma-button-text: #ffffff;
  --tma-canvas-text: #0b1b4d; --tma-canvas-muted: #526176; --tma-canvas-link: #1a5ae0;
  --tma-surface-text: #0b1b4d; --tma-surface-muted: #526176; --tma-surface-link: #1a5ae0;
  --tma-surface-danger: #be123c; --tma-canvas-danger: #be123c;
  --tma-header: #1a5ae0; --tma-header-text: #ffffff; --tma-price: #0e7490;
  --tma-tag-software: #047857; --tma-tag-assets: #b45309; --tma-tag-academy: #4338ca; --tma-tag-accounts: #0369a1;
  --tma-radius: calc(var(--appearance-radius, 12px) + 8px);
  --tma-control-radius: 999px;
  --tma-line: color-mix(in srgb, var(--tma-border) 45%, transparent);
  --tma-shadow: 0 1px 2px rgb(15 23 42 / .04), 0 10px 24px -18px rgb(15 23 42 / .35);
  --tma-safe-top: env(safe-area-inset-top, 0px);
  --tma-safe-bottom: env(safe-area-inset-bottom, 0px);
}
[data-tma-theme="dark"] { --tma-shadow: none; }

/* Base reset: the Mini App loads only this stylesheet. */
*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { margin: 0; color: inherit; }
button { background: none; border: 0; padding: 0; }
a { color: inherit; }
[x-cloak] { display: none !important; }

body.tma-shell {
  min-height: 100vh; margin: 0;
  padding-bottom: calc(76px + var(--tma-safe-bottom));
  background: var(--tma-bg); color: var(--tma-canvas-text);
  font-family: var(--appearance-font, system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
.tma-shell :is(h1, h2, h3, h4, p) { margin: 0; overflow-wrap: anywhere; }
:where(.tma-shell) :is(button, input, textarea, a) { font: inherit; }
.tma-shell :is(button, input, select, a) { min-height: 44px; }
.tma-shell button { min-width: 44px; cursor: pointer; }
.tma-shell svg { flex-shrink: 0; }
.tma-shell :is(button, a, input, textarea, [role="button"], [tabindex]):focus-visible { outline: 2px solid var(--tma-canvas-link); outline-offset: 2px; }
.tma-shell img[data-tma-fallback="true"] { object-fit: contain; padding: 12%; background: var(--tma-surface); }

/* Header: the website's brand bar (accent in light, surface in dark) */
.tma-header, .tma-header-tools { background: var(--tma-header); color: var(--tma-header-text); }
.tma-header { position: sticky; top: 0; z-index: 40; padding: max(10px, var(--tma-safe-top)) 16px 10px; }
/* Search and filters scroll away with the page, so the pinned bar stays slim. */
.tma-header-tools { padding: 2px 16px 16px; box-shadow: 0 12px 28px -22px rgb(15 23 42 / .7); }
.tma-header:has(+ .tma-header-tools[style*="display: none"]) { box-shadow: 0 12px 28px -22px rgb(15 23 42 / .7); }
[data-tma-theme="dark"] :is(.tma-header, .tma-header-tools) { box-shadow: none; }
[data-tma-theme="dark"] .tma-header-tools, [data-tma-theme="dark"] .tma-header:has(+ .tma-header-tools[style*="display: none"]) { border-bottom: 1px solid var(--tma-line); }
.tma-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 640px; margin: 0 auto; }
.tma-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tma-brand img { width: 40px; height: 40px; padding: 5px; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px -6px rgb(2 6 23 / .45); }
.tma-brand > div { min-width: 0; }
.tma-brand strong { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.tma-brand p { overflow: hidden; max-width: 150px; font-size: 12px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.tma-top-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.tma-explore-tools { display: grid; gap: 10px; max-width: 640px; margin: 0 auto; }

.tma-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 14px; flex-shrink: 0;
  border: 1px solid var(--tma-line); border-radius: var(--tma-control-radius);
  background: var(--tma-surface); color: var(--tma-surface-text);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.tma-chip[aria-pressed="true"] { border-color: var(--tma-button); background: var(--tma-button); color: var(--tma-button-text); }
.tma-chip:active { transform: scale(.97); }
.tma-chip:disabled { opacity: .6; }
.tma-header-tools .tma-chip, .tma-header .tma-chip {
  border-color: color-mix(in srgb, var(--tma-header-text) 26%, transparent);
  background: color-mix(in srgb, var(--tma-header-text) 10%, var(--tma-header)); color: var(--tma-header-text);
}
.tma-header-tools .tma-chip[aria-pressed="true"], .tma-header .tma-balance {
  border-color: var(--tma-surface); background: var(--tma-surface); color: var(--tma-surface-link); font-weight: 700;
}
[data-tma-theme="dark"] .tma-header-tools .tma-chip[aria-pressed="true"] { border-color: var(--tma-button); background: var(--tma-button); color: var(--tma-button-text); }
[data-tma-theme="dark"] .tma-header .tma-balance { border-color: var(--tma-line); background: var(--tma-bg); color: var(--tma-canvas-link); }
.tma-balance { font-variant-numeric: tabular-nums; }

.tma-search {
  display: flex; align-items: center; gap: 8px; padding: 0 4px 0 14px;
  border: 1px solid transparent; border-radius: var(--tma-control-radius);
  background: var(--tma-surface); color: var(--tma-surface-muted);
  box-shadow: 0 6px 16px -12px rgb(2 6 23 / .5);
}
[data-tma-theme="dark"] .tma-search { border-color: var(--tma-line); background: var(--tma-bg); color: var(--tma-canvas-muted); box-shadow: none; }
.tma-search svg { width: 18px; height: 18px; }
.tma-search input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: inherit; font-size: 16px; }
.tma-search input { color: var(--tma-surface-text); }
[data-tma-theme="dark"] .tma-search input { color: var(--tma-canvas-text); }
.tma-search input::placeholder { color: inherit; opacity: 1; }
.tma-search input::-webkit-search-cancel-button { display: none; }
.tma-search:focus-within { border-color: var(--tma-button); }
.tma-search input:focus-visible { outline: 0; }
.tma-search:has(input:focus-visible) { outline: 2px solid var(--tma-header-text); outline-offset: 2px; }
.tma-search button { border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 20px; }
.tma-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.tma-filters::-webkit-scrollbar { display: none; }
:is(.tma-header, .tma-header-tools) :focus-visible { outline-color: var(--tma-header-text); }

/* Layout */
.tma-main { max-width: 640px; margin: 0 auto; padding: 18px 16px; }
.tma-view { display: grid; gap: 28px; min-width: 0; }
.tma-view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tma-view h2, .tma-view-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.tma-section { display: grid; gap: 16px; }
.tma-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tma-section-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.025em; line-height: 1.4; }
.tma-section-head > span { color: var(--tma-canvas-muted); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tma-view-all {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 0 15px;
  border: 1px solid var(--tma-surface-link); border-radius: 12px;
  background: var(--tma-surface); color: var(--tma-surface-link);
  font-size: 14.5px; font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / .05);
  transition: transform .15s ease;
}
.tma-view-all:active { transform: scale(.97); }
a.tma-view-all { text-decoration: none; }
.tma-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
@media (min-width: 600px) { .tma-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tma-stack { display: grid; gap: 10px; }
.tma-label { margin-top: 12px; color: var(--tma-canvas-text); font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.tma-stack > .tma-label:first-child { margin-top: 0; }

/* Page headings, as on the website: label pill, title, subtitle and actions */
.tma-page-head { display: grid; gap: 6px; }
.tma-page-head h1 { color: var(--tma-canvas-text); font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.tma-page-head > p { color: var(--tma-canvas-muted); font-size: 14.5px; }
.tma-page-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.tma-page-actions .tma-button { min-height: 44px; }
.tma-view-all svg, .tma-button svg { width: 18px; height: 18px; }
.tma-pill {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start; margin-bottom: 4px; padding: 5px 14px;
  border: 1px solid color-mix(in srgb, var(--tma-surface-link) 25%, transparent); border-radius: 999px;
  background: var(--tma-surface); color: var(--tma-surface-link); font-size: 13.5px; font-weight: 600;
}
.tma-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tma-form-title { margin-bottom: 4px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
/* Explore panel: the website's "Explore Xsprix" tiles */
.tma-explore {
  display: grid; gap: 12px; padding: 12px;
  border: 1px solid var(--tma-line); border-radius: 20px;
  background: var(--tma-surface); color: var(--tma-surface-text);
  box-shadow: 0 24px 48px -32px rgb(15 23 42 / .4);
}
.tma-explore-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; padding: 4px 4px 0; }
.tma-explore-head h2 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.tma-explore-head p { color: var(--tma-surface-muted); font-size: 13.5px; }
.tma-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 600px) { .tma-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tma-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  width: 100%; height: 100%; min-height: 96px; padding: 12px;
  border: 1px solid var(--tma-line); border-radius: 16px;
  background: var(--tma-surface); color: var(--tma-surface-text);
  text-align: left; text-decoration: none; transition: transform .15s ease, border-color .15s ease;
}
.tma-tile:active { transform: scale(.98); }
@media (hover: hover) { .tma-tile:hover { border-color: color-mix(in srgb, var(--tile-ink) 40%, var(--tma-line)); } }
.tma-tile-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--tile-bg); color: var(--tile-ink); }
.tma-tile-icon svg { width: 22px; height: 22px; }
.tma-tile-name { padding-right: 18px; font-size: 14.5px; font-weight: 700; line-height: 1.28; }
.tma-tile-arrow { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; color: var(--tma-surface-muted); }
.tma-tile[data-tile="software"] { --tile-bg: #edf3fb; --tile-ink: #315d91; }
.tma-tile[data-tile="academy"] { --tile-bg: #f3edff; --tile-ink: #6d28d9; }
.tma-tile[data-tile="accounts"] { --tile-bg: #e7f6ef; --tile-ink: #047857; }
.tma-tile[data-tile="assets"] { --tile-bg: #fff4e5; --tile-ink: #b45309; }
.tma-tile[data-tile="subscriptions"] { --tile-bg: #fdecf4; --tile-ink: #be185d; }
.tma-tile[data-tile="shops"] { --tile-bg: #e6f6f9; --tile-ink: #0e7490; }
[data-tma-theme="dark"] .tma-tile[data-tile="software"] { --tile-ink: #93c5fd; }
[data-tma-theme="dark"] .tma-tile[data-tile="academy"] { --tile-ink: #c4b5fd; }
[data-tma-theme="dark"] .tma-tile[data-tile="accounts"] { --tile-ink: #6ee7b7; }
[data-tma-theme="dark"] .tma-tile[data-tile="assets"] { --tile-ink: #fcd34d; }
[data-tma-theme="dark"] .tma-tile[data-tile="subscriptions"] { --tile-ink: #f9a8d4; }
[data-tma-theme="dark"] .tma-tile[data-tile="shops"] { --tile-ink: #67e8f9; }
[data-tma-theme="dark"] .tma-tile { --tile-bg: color-mix(in srgb, var(--tile-ink) 14%, transparent); }

/* Subscription tiles (same as the website hub) */
.tma-subs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 600px) { .tma-subs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tma-sub {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; height: 100%; padding: 16px;
  border-radius: 20px; text-decoration: none;
  background-image: linear-gradient(160deg, color-mix(in srgb, var(--brand, #1a5ae0) 9%, transparent) 0%, transparent 55%);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
[data-tma-theme="dark"] .tma-sub { background-image: linear-gradient(160deg, color-mix(in srgb, var(--brand, #1a5ae0) 22%, transparent) 0%, transparent 60%); }
.tma-sub:active { transform: scale(.98); }
@media (hover: hover) { .tma-sub:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand, #1a5ae0) 40%, var(--tma-line)); } }
.tma-sub-mark {
  position: relative; display: inline-grid; place-items: center; width: 48px; height: 48px; overflow: hidden;
  border-radius: 14px; background: var(--brand, #1a5ae0); color: #fff; font-size: 20px; font-weight: 800;
  box-shadow: 0 8px 18px -10px var(--brand, #1a5ae0);
}
.tma-sub-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 7px; background: #fff; }
.tma-sub-mark:has(img) > span { display: none; }
.tma-sub-mark.is-glyph img { padding: 22%; background: transparent; }
.tma-sub-mark.is-color { background: #fff; box-shadow: 0 0 0 1px rgb(15 23 42 / .08), 0 8px 18px -10px var(--brand, #1a5ae0); }
.tma-sub-mark.is-color img { padding: 18%; background: transparent; }
.tma-sub-mark.is-color:not(:has(img)) { background: var(--brand, #1a5ae0); }
.tma-sub-mark.is-small { width: 40px; height: 40px; border-radius: 12px; font-size: 16px; }
.tma-sub-name { font-size: 16px; font-weight: 700; line-height: 1.25; }
.tma-sub-price { margin-top: auto; font-size: 17px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tma-sub-price small { color: var(--tma-surface-muted); font-size: 12px; font-weight: 600; }
.tma-sub-badge {
  position: absolute; top: 14px; right: 14px; max-width: calc(100% - 80px); overflow: hidden;
  padding: 3px 9px; border-radius: 999px; background: var(--tma-surface); color: var(--tma-surface-text);
  font-size: 11px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgb(15 23 42 / .08), 0 0 0 1px rgb(15 23 42 / .04);
}
[data-tma-theme="dark"] .tma-sub-badge { background: var(--tma-bg); color: var(--tma-canvas-text); box-shadow: none; }
.tma-order { justify-content: flex-start; }
.tma-order > div { flex: 1; }
.tma-order-status { font-weight: 600; }
.tma-order-status.needs-you { color: var(--tma-surface-warning, #92400e); }

/* Cards */
.tma-card {
  min-width: 0; border: 1px solid var(--tma-line); border-radius: var(--tma-radius);
  background: var(--tma-surface); color: var(--tma-surface-text); box-shadow: var(--tma-shadow);
}
/* Product card: the website catalog card (badge, image, title, price pill, Buy) */
.tma-product {
  display: flex; flex-direction: column; overflow: hidden; cursor: pointer; border-radius: 14px;
  box-shadow: 0 1px 2px rgb(15 23 42 / .04), 0 2px 8px -2px rgb(15 23 42 / .06);
  transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s ease, border-color .2s ease;
}
[data-tma-theme="dark"] .tma-product { box-shadow: none; }
.tma-product:active { transform: scale(.98); }
@media (hover: hover) { .tma-product:hover { border-color: color-mix(in srgb, var(--tma-button) 50%, var(--tma-line)); box-shadow: 0 20px 40px -24px rgb(15 23 42 / .45); } }
.tma-product .tma-media { aspect-ratio: 4 / 5; }
.tma-product-body { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 14px; }
.tma-product h3 {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  min-height: calc(2 * 1.5em); font-size: 14px; font-weight: 600; letter-spacing: -.015em; line-height: 1.5;
}
.tma-rating { display: inline-flex; align-items: center; gap: 4px; margin-top: -4px; color: var(--tma-surface-text); font-size: 13px; font-variant-numeric: tabular-nums; }
.tma-rating svg { width: 15px; height: 15px; color: #f59e0b; }
.tma-rating strong { font-weight: 700; }
.tma-rating span { color: var(--tma-surface-muted); }
.tma-rating.is-large { margin: 0; font-size: 15px; }
.tma-rating.is-large svg { width: 18px; height: 18px; }
.tma-product-foot { display: grid; justify-items: start; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--tma-line); }
.tma-price-pill {
  display: inline-block; max-width: 100%; overflow: hidden; padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--tma-price) 38%, transparent); border-radius: 999px;
  background: var(--tma-surface); color: var(--tma-price);
  font-size: 13px; font-weight: 800; line-height: 1.6; white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums;
  box-shadow: 0 3px 10px rgb(15 23 42 / .04);
}
.tma-buy {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--tma-button) 82%, #000); border-radius: 999px;
  background-color: var(--tma-button); background-image: linear-gradient(rgb(255 255 255 / .1), transparent);
  color: var(--tma-button-text); font-size: 15px; font-weight: 600;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), 0 2px 8px color-mix(in srgb, var(--tma-button) 30%, transparent);
}
.tma-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2; max-width: calc(100% - 24px); overflow: hidden;
  padding: 3px 10px; border: 1px solid color-mix(in srgb, var(--tag, var(--tma-surface-text)) 22%, transparent); border-radius: 999px;
  background: var(--tma-surface); color: var(--tag, var(--tma-surface-text));
  font-size: 11.5px; font-weight: 700; line-height: 1.6; white-space: nowrap; text-overflow: ellipsis;
}
.tma-tag.is-market { --tag: var(--tma-tag-software); }
.tma-tag.is-asset { --tag: var(--tma-tag-assets); }
.tma-tag.is-academy { --tag: var(--tma-tag-academy); }
.tma-tag.is-account { --tag: var(--tma-tag-accounts); }
.tma-sold {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border: 1px solid rgb(16 185 129 / .3); border-radius: 999px;
  background: rgb(2 6 23 / .82); color: #6ee7b7; font-size: 11.5px; font-weight: 700; line-height: 1.6;
}
.tma-sold svg { width: 12px; height: 12px; }
.tma-price { color: var(--tma-surface-text); font-size: 15px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

.tma-media {
  position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 4 / 3;
  background: color-mix(in srgb, var(--tma-surface) 90%, var(--tma-surface-text));
}
.tma-media[style*="--banner-bg"]::before {
  content: ""; position: absolute; inset: -12px; z-index: 0;
  background: var(--banner-bg) center / cover no-repeat;
  filter: blur(14px) brightness(.85); transform: scale(1.1); opacity: .7;
}
.tma-media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; }
.tma-media-mark { color: var(--tma-surface-muted); font-size: 22px; font-weight: 800; }
.tma-media.is-large { aspect-ratio: 16 / 10; border-radius: calc(var(--tma-radius) - 4px); }

.tma-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; }
.tma-row > div { display: grid; gap: 2px; min-width: 0; }
.tma-row h4 { overflow: hidden; font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.tma-row p { color: var(--tma-surface-muted); font-size: 12px; }
.tma-row .tma-button { flex-shrink: 0; }
.tma-key-row code { color: var(--tma-surface-muted); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; }

.tma-empty { display: grid; justify-items: center; gap: 6px; padding: 24px 16px; color: var(--tma-surface-muted); font-size: 14px; text-align: center; }
.tma-empty :is(h2, h3) { color: var(--tma-surface-text); font-size: 15px; font-weight: 700; }
.tma-empty .tma-button { margin-top: 6px; }
.tma-notice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px;
  border: 1px solid color-mix(in srgb, var(--tma-surface-danger) 35%, transparent); border-radius: var(--tma-radius);
  background: var(--tma-surface); color: var(--tma-surface-danger); font-size: 14px;
}
.tma-skeleton { display: grid; gap: 10px; padding: 0 0 14px; overflow: hidden; }
.tma-skeleton span { display: block; height: 12px; margin: 0 12px; border-radius: 6px; background: color-mix(in srgb, var(--tma-surface) 85%, var(--tma-surface-text)); animation: tma-pulse 1.2s ease-in-out infinite; }
.tma-skeleton span:first-child { height: auto; margin: 0; border-radius: 0; aspect-ratio: 4 / 5; }
.tma-skeleton span:last-child { width: 45%; }
@keyframes tma-pulse { 50% { opacity: .45; } }

.tma-sell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.tma-sell strong { font-size: 15px; font-weight: 700; }
.tma-sell > div { display: flex; flex-wrap: wrap; gap: 8px; }

/* Buttons */
.tma-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 18px; border: 1px solid var(--tma-button); border-radius: var(--tma-control-radius);
  background-color: var(--tma-button); background-image: linear-gradient(rgb(255 255 255 / .1), transparent); color: var(--tma-button-text);
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), 0 2px 8px color-mix(in srgb, var(--tma-button) 30%, transparent);
  transition: filter .15s ease, transform .15s ease;
}
.tma-button svg { width: 16px; height: 16px; }
.tma-button:active { transform: scale(.98); }
.tma-button:disabled { opacity: .6; cursor: default; }
@media (hover: hover) { .tma-button:hover { filter: brightness(1.06); } }
.tma-button.is-quiet { border-color: var(--tma-line); background: var(--tma-surface); color: var(--tma-surface-text); box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.tma-button.is-wide { width: 100%; min-height: 50px; font-size: 15px; }
.tma-icon-button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; flex-shrink: 0;
  border: 1px solid var(--tma-line); border-radius: 50%;
  background: var(--tma-surface); color: var(--tma-surface-text); font-size: 22px; line-height: 1;
}
.tma-icon-button svg { width: 18px; height: 18px; }

/* Wallet */
.tma-wallet { display: grid; gap: 4px; padding: 20px; }
.tma-wallet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.tma-wallet-head h2 { font-size: 15px; font-weight: 700; }
.tma-wallet-head span { padding: 2px 10px; border: 1px solid var(--tma-line); border-radius: 999px; color: var(--tma-surface-muted); font-size: 12px; font-weight: 600; }
.tma-wallet-balance { font-size: clamp(1.5rem, 7vw, 2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tma-wallet-sub { color: var(--tma-surface-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.tma-wallet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.tma-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tma-links a { display: grid; place-items: center; min-height: 52px; color: var(--tma-surface-text); font-size: 14px; font-weight: 600; text-decoration: none; }

/* Recent wallet activity */
.tma-activity { margin: 0; padding: 4px 16px; list-style: none; }
.tma-activity li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.tma-activity li + li { border-top: 1px solid var(--tma-line); }
.tma-activity li > div { display: grid; gap: 2px; min-width: 0; }
.tma-activity h4 { overflow: hidden; font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.tma-activity p { color: var(--tma-surface-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tma-amount { flex-shrink: 0; font-size: 14px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tma-amount.is-in { color: var(--tma-surface-positive, #047857); }

/* Support form */
.tma-form { display: grid; gap: 8px; padding: 18px; }
.tma-form label { font-size: 13px; font-weight: 600; }
.tma-form label:not(:first-child) { margin-top: 6px; }
.tma-form :is(input, textarea) {
  width: 100%; box-sizing: border-box; padding: 11px 14px;
  border: 1px solid var(--tma-border); border-radius: calc(var(--appearance-radius, 12px));
  background: var(--tma-surface); color: var(--tma-surface-text); font-size: 16px; outline: 0;
}
.tma-form textarea { resize: vertical; min-height: 120px; }
.tma-form :is(input, textarea)::placeholder { color: var(--tma-surface-muted); opacity: 1; }
.tma-form :is(input, textarea):focus { border-color: var(--tma-button); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tma-button) 20%, transparent); }
.tma-form .tma-button { margin-top: 10px; min-height: 50px; }

/* Sheets */
.tma-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgb(2 6 23 / .55); }
.tma-sheet {
  display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto;
  padding: 20px 20px calc(20px + var(--tma-safe-bottom));
  border-radius: 24px 24px 0 0; background: var(--tma-surface); color: var(--tma-surface-text);
  box-shadow: 0 -12px 40px -12px rgb(2 6 23 / .35); outline: 0; overscroll-behavior: contain;
}
@media (min-width: 640px) { .tma-backdrop { align-items: center; padding: 16px; } .tma-sheet { border-radius: 24px; padding-bottom: 20px; } }
.tma-sheet > * { min-width: 0; flex-shrink: 0; } /* rows never shrink under each other in the scroll area */
@media (max-width: 639px) {
  .tma-sheet { position: relative; padding-top: 26px; }
  .tma-sheet::before { content: ""; position: absolute; top: 10px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--tma-line); }
}
.tma-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tma-sheet-head h2 { padding-top: 8px; font-size: 17px; font-weight: 800; line-height: 1.35; }
.tma-sheet .tma-label { margin-top: 4px; color: var(--tma-surface-muted); }
.tma-sheet .tma-card { box-shadow: none; }
.tma-offer { display: grid; gap: 2px; }
.tma-offer .tma-price { color: var(--tma-price); font-size: 26px; letter-spacing: -.02em; line-height: 1.25; }
/* Item details follow the website's product page: category line, price box, sticky Buy now */
.tma-eyebrow { color: var(--tag, var(--tma-surface-link)); font-size: 14.5px; font-weight: 600; }
.tma-eyebrow.is-market { --tag: var(--tma-tag-software); }
.tma-eyebrow.is-asset { --tag: var(--tma-tag-assets); }
.tma-eyebrow.is-academy { --tag: var(--tma-tag-academy); }
.tma-eyebrow.is-account { --tag: var(--tma-tag-accounts); }
.tma-price-box { justify-items: start; gap: 4px; padding: 16px; border: 1px solid var(--tma-line); border-radius: 18px; }
.tma-price-label { color: var(--tma-surface-muted); font-size: 13.5px; font-weight: 600; }
.tma-delivery { margin-top: 8px; padding: 4px 12px; border: 1px solid color-mix(in srgb, var(--tma-surface-positive) 30%, transparent); border-radius: 999px; background: var(--tma-surface); color: var(--tma-surface-positive); font-size: 13.5px; font-weight: 700; }
/* Rating a purchase (verified buyers) */
.tma-row > div.tma-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tma-rate svg { color: #f59e0b; }
.tma-stars { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.tma-stars legend { width: 100%; margin: 0 0 6px; padding: 0; }
.tma-stars button { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; color: color-mix(in srgb, var(--tma-surface-muted) 45%, var(--tma-surface)); }
.tma-stars button svg { width: 34px; height: 34px; }
.tma-stars button.is-on { color: #f59e0b; }
.tma-form.is-plain { padding: 0; }
.tma-sheet-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
.tma-sheet-row .tma-button { min-height: 48px; }
.tma-save[aria-pressed="true"] { border-color: color-mix(in srgb, var(--tma-surface-danger) 35%, transparent); color: var(--tma-surface-danger); }
.tma-saved-row { width: 100%; text-align: left; cursor: pointer; }
.tma-saved-row .tma-price-pill { flex-shrink: 0; }
.tma-sheet-actions { position: sticky; bottom: calc(-20px - var(--tma-safe-bottom)); margin: 0 -20px calc(-20px - var(--tma-safe-bottom)); padding: 12px 20px calc(16px + var(--tma-safe-bottom)); border-top: 1px solid var(--tma-line); background: var(--tma-surface); }
@media (min-width: 640px) { /* Rating a purchase (verified buyers) */
.tma-row > div.tma-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tma-rate svg { color: #f59e0b; }
.tma-stars { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.tma-stars legend { width: 100%; margin: 0 0 6px; padding: 0; }
.tma-stars button { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; color: color-mix(in srgb, var(--tma-surface-muted) 45%, var(--tma-surface)); }
.tma-stars button svg { width: 34px; height: 34px; }
.tma-stars button.is-on { color: #f59e0b; }
.tma-form.is-plain { padding: 0; }
.tma-sheet-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
.tma-sheet-row .tma-button { min-height: 48px; }
.tma-save[aria-pressed="true"] { border-color: color-mix(in srgb, var(--tma-surface-danger) 35%, transparent); color: var(--tma-surface-danger); }
.tma-saved-row { width: 100%; text-align: left; cursor: pointer; }
.tma-saved-row .tma-price-pill { flex-shrink: 0; }
.tma-sheet-actions { bottom: -20px; margin-bottom: -20px; padding-bottom: 16px; border-radius: 0 0 24px 24px; } }
.tma-sheet-actions .tma-button svg { width: 18px; height: 18px; }
.tma-billing-caption { color: var(--tma-surface-muted); font-size: 13px; }
.tma-details-link { display: inline-flex; align-items: center; gap: 6px; justify-self: start; color: var(--tma-surface-link); font-size: 14px; font-weight: 600; text-decoration: none; }
.tma-details-link svg { width: 15px; height: 15px; }
.tma-description { color: var(--tma-surface-muted); font-size: 14px; line-height: 1.6; white-space: pre-line; }

/* Bottom navigation */
.tma-nav {
  position: fixed; inset: auto 0 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr); max-width: 640px; margin: 0 auto;
  padding: 6px 8px max(8px, var(--tma-safe-bottom));
  background: var(--tma-bg); border-top: 1px solid var(--tma-line);
}
.tma-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px;
  border: 0; border-radius: 14px; background: transparent; color: var(--tma-canvas-muted);
  font-size: 11px; font-weight: 600;
}
.tma-nav svg { width: 22px; height: 22px; padding: 3px 16px; border-radius: 999px; box-sizing: content-box; transition: background-color .2s ease; }
.tma-nav button[aria-current="page"] { color: var(--tma-canvas-link); font-weight: 700; }
.tma-nav button[aria-current="page"] svg { background: color-mix(in srgb, var(--tma-canvas-link) 14%, transparent); }

.tma-toast {
  position: fixed; top: calc(12px + var(--tma-safe-top)); left: 50%; z-index: 60; transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 10px 16px; box-sizing: border-box;
  border: 1px solid var(--tma-line); border-radius: 16px; background: var(--tma-surface); color: var(--tma-surface-text);
  font-size: 13px; font-weight: 600; box-shadow: 0 12px 30px -12px rgb(2 6 23 / .4);
}

/* Header buttons: menu, search and avatar, as on the website */
.tma-head-button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; flex-shrink: 0;
  border: 1px solid color-mix(in srgb, var(--tma-header-text) 26%, transparent); border-radius: 14px;
  background: color-mix(in srgb, var(--tma-header-text) 10%, var(--tma-header)); color: var(--tma-header-text);
}
.tma-head-button svg { width: 21px; height: 21px; }
.tma-head-button.is-plain { border-color: transparent; background: transparent; }
.tma-avatar {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; flex-shrink: 0;
  border: 2px solid color-mix(in srgb, var(--tma-header-text) 40%, transparent); border-radius: 50%;
  background: #0f172a; color: #fff; font-size: 15px; font-weight: 800;
}
.tma-avatar svg { width: 20px; height: 20px; }

/* Side menu and account panel */
.tma-panel-backdrop { position: fixed; inset: 0; z-index: 55; background: rgb(2 6 23 / .5); backdrop-filter: blur(2px); }
.tma-panel {
  position: fixed; top: 0; bottom: 0; z-index: 56; display: flex; flex-direction: column;
  width: min(88vw, 380px); overflow-y: auto; overscroll-behavior: contain;
  padding: max(12px, var(--tma-safe-top)) 14px calc(16px + var(--tma-safe-bottom));
  background: var(--tma-surface); color: var(--tma-surface-text);
  box-shadow: 0 0 60px -12px rgb(2 6 23 / .45); outline: 0;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1);
}
.tma-panel.is-left { left: 0; border-radius: 0 22px 22px 0; }
.tma-panel.is-right { right: 0; border-radius: 22px 0 0 22px; }
.tma-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px 12px; border-bottom: 1px solid var(--tma-line); }
.tma-panel-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.tma-panel-brand img { width: 28px; height: 28px; }
.tma-panel-close { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--tma-surface-text); }
.tma-panel-close svg { width: 20px; height: 20px; }

/* Language / currency / theme switches */
.tma-prefs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--tma-line); }
.tma-switch {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2px; min-height: 48px; padding: 4px;
  border: 1px solid var(--tma-line); border-radius: 999px;
  background: color-mix(in srgb, var(--tma-surface-text) 4%, var(--tma-surface)); color: var(--tma-surface-text);
  font-size: 13.5px; font-weight: 700; text-decoration: none;
}
.tma-switch > span { display: grid; place-items: center; height: 38px; border-radius: 999px; }
.tma-switch > span.is-on { background: var(--tma-button); color: var(--tma-button-text); box-shadow: 0 2px 8px color-mix(in srgb, var(--tma-button) 30%, transparent); }
.tma-switch svg { width: 18px; height: 18px; }

/* Menu rows */
.tma-menu { display: grid; gap: 4px; margin: 0; padding: 12px 0; list-style: none; }
.tma-menu-row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 6px 8px;
  border-radius: 14px; color: var(--tma-surface-text); font-size: 16px; font-weight: 600; text-align: left; text-decoration: none;
}
.tma-menu-row:active, .tma-menu-row[aria-current="true"] { background: color-mix(in srgb, var(--tma-surface-link) 9%, transparent); }
.tma-menu-row > span:nth-child(2) { flex: 1; min-width: 0; }
.tma-menu-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: color-mix(in srgb, var(--tma-surface-link) 10%, var(--tma-surface)); color: var(--tma-surface-link); }
.tma-menu-icon svg { width: 18px; height: 18px; }
.tma-menu-hint { padding: 1px 8px; border: 1px solid color-mix(in srgb, var(--tma-surface-link) 30%, transparent); border-radius: 999px; background: var(--tma-surface); color: var(--tma-surface-link); font-size: 12px; font-weight: 700; }
.tma-menu-chevron { width: 18px; height: 18px; color: var(--tma-surface-muted); }
.tma-menu.is-plain .tma-menu-row { min-height: 50px; gap: 12px; font-size: 15.5px; font-weight: 500; }
.tma-menu.is-plain .tma-menu-icon { width: 24px; height: 24px; background: none; color: var(--tma-surface-muted); }
.tma-menu.is-plain .tma-menu-icon svg { width: 20px; height: 20px; }
.tma-panel-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid var(--tma-line); }
.tma-panel-tiles.is-four { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 12px 0; border-top: 0; border-bottom: 1px solid var(--tma-line); }
.tma-panel-tile {
  display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 70px; padding: 8px 4px;
  border-radius: 14px; background: color-mix(in srgb, var(--tma-surface-text) 5%, var(--tma-surface));
  color: var(--tma-surface-text); font-size: 13px; font-weight: 600; text-align: center; text-decoration: none;
}
.tma-panel-tile svg { width: 20px; height: 20px; color: var(--tma-surface-link); }

/* Account panel head */
.tma-account-head { display: flex; align-items: flex-start; gap: 12px; padding: 4px 2px 14px; border-bottom: 1px solid var(--tma-line); }
.tma-account-head .tma-avatar { width: 52px; height: 52px; border: 0; background: var(--tma-button); color: var(--tma-button-text); font-size: 20px; }
.tma-account-head > div { flex: 1; min-width: 0; display: grid; gap: 2px; padding-top: 2px; }
.tma-account-head strong { overflow: hidden; font-size: 17px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.tma-account-head p { color: var(--tma-surface-muted); font-size: 13.5px; }
.tma-account-balance { justify-self: start; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--tma-surface-link) 10%, var(--tma-surface)); color: var(--tma-surface-link); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Bottom bar: Home, Library, Post ad (raised), Wallet, Support */
.tma-nav { grid-template-columns: repeat(5, 1fr); align-items: end; }
.tma-nav-post { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-height: 52px; color: var(--tma-canvas-muted); font-size: 11px; font-weight: 600; text-decoration: none; }
.tma-nav-post > span:first-child {
  display: grid; place-items: center; width: 56px; height: 56px; margin-top: -26px;
  border: 4px solid var(--tma-bg); border-radius: 50%;
  background-color: var(--tma-button); background-image: linear-gradient(rgb(255 255 255 / .12), transparent); color: var(--tma-button-text);
  box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--tma-button) 60%, transparent);
}
.tma-nav-post svg { width: 26px; height: 26px; padding: 0; background: none !important; }
.tma-slide-left { transform: translateX(-100%); }
.tma-slide-right { transform: translateX(100%); }
.tma-brand .tma-head-button { margin-left: -8px; }
.tma-back { display: inline-flex; align-items: center; gap: 2px; justify-self: start; margin: -10px 0 -14px -8px; padding: 0 12px 0 4px; border-radius: 12px; color: var(--tma-canvas-link); font-size: 15px; font-weight: 600; }
.tma-back svg { width: 20px; height: 20px; }
.tma-header-tools { padding-top: 0; }
/* Item details: a full-height page like the website's listing page */
.tma-backdrop.is-page { align-items: stretch; }
.tma-sheet.is-page { gap: 16px; height: 100dvh; max-height: 100dvh; max-width: 640px; padding-top: max(16px, var(--tma-safe-top)); border-radius: 0; background: var(--tma-bg); color: var(--tma-canvas-text); }
@media (min-width: 640px) { .tma-backdrop.is-page { align-items: center; } .tma-sheet.is-page { height: auto; max-height: 92dvh; border-radius: 24px; } }
.tma-sheet.is-page::before { display: none; }
.tma-sheet.is-page .tma-sheet-head h2 { font-size: 20px; letter-spacing: -.015em; }
.tma-sheet.is-page .tma-icon-button { background: var(--tma-surface); }
.tma-detail-media {
  position: relative; display: grid; place-items: center; min-height: 200px; margin: 0; padding: 14px; overflow: hidden;
  border: 1px solid var(--tma-line); border-radius: 24px; background: color-mix(in srgb, var(--tma-surface) 90%, var(--tma-surface-text));
  box-shadow: var(--tma-shadow);
}
.tma-detail-media[style*="--banner-bg"]::before { content: ""; position: absolute; inset: -16px; background: var(--banner-bg) center / cover no-repeat; filter: blur(18px) brightness(.85); transform: scale(1.1); opacity: .65; }
.tma-detail-media img { position: relative; z-index: 1; width: auto; max-width: 100%; max-height: min(56vh, 460px); border-radius: 14px; object-fit: contain; box-shadow: 0 18px 40px -22px rgb(2 6 23 / .6); }
.tma-detail-intro { display: grid; gap: 6px; }
.tma-detail-stack { display: flex; flex-direction: column; gap: 16px; }
.tma-detail-card { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--tma-line); border-radius: 22px; background: var(--tma-surface); color: var(--tma-surface-text); box-shadow: var(--tma-shadow); }
.tma-detail-card h3 { font-size: 18px; font-weight: 800; letter-spacing: -.015em; }
.tma-detail-card .tma-description { font-size: 15px; line-height: 1.75; }
.tma-detail-card .tma-delivery { justify-self: start; margin-top: 0; }
.tma-checklist { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tma-checklist li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.tma-checklist svg { width: 18px; height: 18px; color: var(--tma-surface-positive); }
.tma-sheet-actions.is-bar { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.tma-sheet-actions.is-bar .tma-offer { flex: 1; min-width: 0; }
.tma-sheet-actions.is-bar .tma-price { color: var(--tma-surface-text); font-size: 21px; overflow-wrap: anywhere; }
.tma-sheet-actions.is-bar .tma-billing-caption { font-size: 12.5px; overflow-wrap: anywhere; }
.tma-sheet-actions.is-bar > .tma-button { flex: none; min-height: 52px; padding: 0 22px; }
@media (max-width: 359px) { .tma-sheet-actions.is-bar { flex-wrap: wrap; } .tma-sheet-actions.is-bar > .tma-button { flex: 1 1 100%; } }

/* Subscription preview: plans to choose from, ordering continues on the website page */
.tma-sub-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tma-sub-head > div { min-width: 0; }
.tma-sub-head p { color: var(--tma-canvas-muted); font-size: 13.5px; }
.tma-plans { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.tma-plans legend { margin: 0 0 8px; padding: 0; }
.tma-plan {
  display: grid; gap: 6px; width: 100%; padding: 16px; text-align: left;
  border: 2px solid var(--tma-line); border-radius: 18px; background: var(--tma-surface); color: var(--tma-surface-text);
  transition: border-color .15s ease, transform .15s ease;
}
.tma-plan:active { transform: scale(.99); }
.tma-plan[aria-pressed="true"] { border-color: var(--tma-button); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tma-button) 18%, transparent); }
.tma-plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tma-plan-top strong { font-size: 16px; font-weight: 700; }
.tma-plan-badge { padding: 2px 9px; border: 1px solid var(--tma-line); border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.tma-plan-price { font-size: 20px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tma-plan-price small { color: var(--tma-surface-muted); font-size: 13px; font-weight: 600; }
.tma-plan-features { display: grid; gap: 3px; color: var(--tma-surface-muted); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .tma-shell * { animation: none !important; transition: none !important; } }
