/* Studio (also the Telegram Mini App). Three panes on desktop, tabbed on small screens. */
html, body.app { height: 100%; }
body.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; padding-top: var(--tg-top); background: var(--bg); }
.is-tma body.app { height: var(--tg-viewport-stable-height, 100dvh); }
.num { font-variant-numeric: tabular-nums; }

/* ── top bar ── */
.s-top { flex: none; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 clamp(10px, 2vw, 18px); border-bottom: 1px solid var(--line); background: rgba(9, 9, 11, 0.94); position: relative; z-index: 20; }
.s-top .brand svg { width: 26px; height: 26px; }
.s-top-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bal { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font: 600 0.9375rem/1 var(--ff-t); transition: border-color 0.2s, background 0.2s; }
.bal:hover { border-color: var(--amber-b); background: var(--surface-3); }
.bal-ic svg { width: 16px; height: 16px; color: var(--amber); }
.bal-u { color: var(--text-3); font-size: 0.8125rem; font-weight: 500; }
.bal.bump { animation: bump 0.6s var(--ease); }
@keyframes bump { 40% { transform: scale(1.08); border-color: var(--amber); box-shadow: 0 0 24px -4px var(--amber-b); } }
#topupIc svg { width: 16px; height: 16px; }
@media (max-width: 559px) { .topup-t { display: none; } #topupBtn { width: 36px; padding: 0; } }
@media (max-width: 479px) { .brand-t { display: none; } .s-top-r { gap: 6px; } .bal { padding: 0 10px 0 8px; } }

/* ── layout ── */
.studio { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr) 340px; }
.pane { min-height: 0; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.pane-models { border-right: 1px solid var(--line); background: var(--bg-2); }
.pane-hist { border-left: 1px solid var(--line); background: var(--bg-2); }
.pane-head { flex: none; padding: 14px 14px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pane-title { font: 600 0.75rem/1 var(--ff-t); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.pane-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 24px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.pane-create { overflow-y: auto; padding: clamp(14px, 2.4vw, 28px); background: radial-gradient(70% 38% at 50% 0%, rgba(245, 181, 68, 0.1), transparent 72%), var(--bg); scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; outline: none; }
.create-inner { width: 100%; max-width: 760px; margin: 0 auto; display: grid; gap: 18px; align-content: start; }
.tabbar { display: none; }
#kindTabs { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
#kindTabs button { justify-content: center; padding-inline: 0.4rem; min-width: 0; }
#kindTabs svg { flex: none; }

@media (max-width: 1179px) {
  .studio { display: block; position: relative; }
  .pane { position: absolute; inset: 0; display: none; border: 0; }
  .studio[data-pane="models"] .pane-models, .studio[data-pane="create"] .pane-create, .studio[data-pane="history"] .pane-hist { display: flex; }
  .pane-models, .pane-hist { background: var(--bg); }
  .pane-head, .pane-scroll { padding-inline: clamp(14px, 3vw, 28px); }
  .pane-scroll { max-width: 900px; width: 100%; margin-inline: auto; }
  .pane-head { max-width: 900px; width: 100%; margin-inline: auto; }
  .tabbar { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(12, 12, 15, 0.97); border-top: 1px solid var(--line-2); padding-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-bottom)); position: relative; z-index: 20; }
  .tabbar button { display: grid; justify-items: center; gap: 3px; padding: 9px 4px 8px; min-height: 58px; border: 0; background: transparent; color: var(--text-3); font: 600 0.75rem/1.1 var(--ff-t); position: relative; }
  .tabbar button svg { width: 22px; height: 22px; }
  .tabbar button[aria-current="true"] { color: var(--amber-2); }
  .tabbar button[aria-current="true"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; border-radius: 2px; background: var(--amber); box-shadow: 0 0 12px var(--amber-b); }
  .tabbar .dot { position: absolute; top: 8px; right: calc(50% - 20px); width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px var(--bg); }
}

/* ── model + template picker ── */
.tier-h { display: flex; align-items: center; gap: 10px; margin: 16px 2px 8px; color: var(--text-3); font: 600 0.6875rem/1 var(--ff-t); letter-spacing: 0.1em; text-transform: uppercase; }
.tier-h:first-child { margin-top: 4px; }
.mc, .tc { display: block; position: relative; margin-bottom: 8px; cursor: pointer; }
.mc input, .tc input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.mc-body, .tc-body { display: grid; gap: 6px; padding: 13px 14px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); transition: border-color 0.18s, background 0.18s, transform 0.2s var(--ease); }
.mc:hover .mc-body, .tc:hover .tc-body { border-color: var(--line-2); background: var(--surface-2); }
.mc input:checked + .mc-body, .tc input:checked + .tc-body { border-color: var(--amber); background: linear-gradient(180deg, var(--amber-a), rgba(245, 181, 68, 0.04)); box-shadow: 0 0 0 1px var(--amber-b), 0 12px 32px -18px var(--amber-b); }
.mc input:focus-visible + .mc-body, .tc input:focus-visible + .tc-body { outline: 2px solid var(--amber); outline-offset: 2px; }
.mc-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mc-title { font: 500 0.9375rem/1.2 var(--ff-d); letter-spacing: -0.01em; }
.mc-sub { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 0.8125rem; flex-wrap: wrap; }
.mc-sub svg { width: 13px; height: 13px; }
.mc-blurb { color: var(--text-2); font-size: 0.8125rem; line-height: 1.45; }
.mc-price { color: var(--amber-2); font-weight: 600; font-size: 0.875rem; }
.tc-body { grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; align-items: start; }
.tc-emoji { grid-row: span 3; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.4rem; background: radial-gradient(circle at 30% 20%, rgba(245, 181, 68, 0.26), rgba(245, 181, 68, 0.04)); border: 1px solid var(--amber-b); }
.tc-title { font: 500 0.9375rem/1.25 var(--ff-d); letter-spacing: -0.01em; }
.tc-hint { color: var(--text-2); font-size: 0.8125rem; line-height: 1.4; }
.tc-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.tc-meta .tag svg { width: 11px; height: 11px; }
.cat-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.cat-row .chip { min-height: 32px; padding: 0.2rem 0.7rem; font-size: 0.8125rem; }
.skel-list > div { height: 104px; margin-bottom: 8px; border-radius: var(--r-m); }
.empty-note { color: var(--text-3); text-align: center; padding: 28px 8px; font-size: 0.9375rem; }

/* ── canvas ── */
.canvas { display: grid; justify-items: center; gap: 14px; }
.frame { --fh: min(58dvh, 620px); position: relative; width: min(100%, calc(var(--fh) * var(--arn, 0.5625))); aspect-ratio: var(--ar, 9 / 16); border-radius: var(--r-l); overflow: hidden; background: #0b0b0e; border: 1px solid var(--line-2); box-shadow: 0 40px 90px -40px #000; isolation: isolate; transition: aspect-ratio 0.3s, width 0.3s; }
@media (max-width: 1179px) { .frame { --fh: min(46dvh, 520px); } }
.frame > video, .frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.fr-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 18px; text-align: center; z-index: 2; }
.fr-center h3 { font: 500 1.05rem/1.2 var(--ff-d); letter-spacing: -0.01em; }
.fr-center p { color: var(--text-2); font-size: 0.875rem; max-width: 26ch; }
.fr-beam { position: absolute; inset: 0; z-index: 0; background: linear-gradient(to bottom, rgba(245, 181, 68, 0.28), transparent 70%); clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%); filter: blur(18px); animation: breathe 6s ease-in-out infinite alternate; }
@keyframes breathe { from { opacity: 0.6; } to { opacity: 1; } }
.fr-work .fr-beam { background: linear-gradient(to bottom, rgba(245, 181, 68, 0.34), transparent 75%); }
.sweep { position: absolute; inset: 0; z-index: 1; background: linear-gradient(105deg, transparent 35%, rgba(245, 181, 68, 0.1) 50%, transparent 65%); background-size: 250% 100%; animation: shimmer 2.2s linear infinite; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--amber-b); border-top-color: var(--amber); animation: spin 0.9s linear infinite; }
.stat { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line-2); font: 600 0.8125rem/1.2 var(--ff-t); color: var(--amber-2); }
.stat.err { color: var(--danger); border-color: rgba(255, 128, 128, 0.35); }
.fr-err .fr-glyph { color: var(--danger); }
.cbar { width: 100%; display: grid; gap: 10px; }
.cbar-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.cbar-prompt { color: var(--text-2); font-size: 0.9375rem; text-align: center; max-width: 60ch; margin-inline: auto; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cbar-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.try-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 560px; }
.try-row .chip { max-width: 100%; }
.try-lab { width: 100%; text-align: center; color: var(--text-3); font-size: 0.8125rem; }

/* ── composer ── */
.composer { position: relative; display: grid; gap: 12px; padding: 14px; border-radius: var(--r-xl); background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)); border: 1px solid var(--line-2); box-shadow: 0 30px 70px -40px #000; transition: border-color 0.25s, box-shadow 0.3s; }
.composer:focus-within { border-color: var(--amber-b); box-shadow: 0 30px 70px -40px #000, 0 0 0 3px var(--amber-a); }
.composer.drag { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-a); }
.composer.drag::after { content: attr(data-drop); position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; border-radius: inherit; background: rgba(9, 9, 11, 0.86); color: var(--teal); font: 500 1.1rem var(--ff-d); }
.model-strip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 8px 8px 12px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); color: var(--text); text-align: left; }
.model-strip:hover { border-color: var(--line-2); }
.ms-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; font-size: 1.15rem; }
.ms-ic svg { width: 18px; height: 18px; }
.ms-t { min-width: 0; flex: 1; display: grid; line-height: 1.25; }
.ms-t b { font: 500 0.9375rem var(--ff-d); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-t small { color: var(--text-3); font-size: 0.8125rem; }
.ms-go { color: var(--amber-2); font-weight: 600; font-size: 0.8125rem; display: inline-flex; align-items: center; gap: 4px; }
.ms-go svg { width: 14px; height: 14px; }
@media (min-width: 1180px) { .model-strip { display: none; } }
.cmp-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.cmp-main.has-photo { grid-template-columns: auto minmax(0, 1fr); }
.photo { position: relative; width: 88px; height: 88px; border-radius: 18px; border: 1.5px dashed var(--line-2); background: var(--surface-2); display: grid; place-items: center; align-content: center; gap: 4px; color: var(--text-2); font: 600 0.6875rem/1.2 var(--ff-t); text-align: center; padding: 6px; overflow: hidden; cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.photo:hover { border-color: var(--amber-b); background: var(--surface-3); color: var(--text); }
.photo svg { width: 22px; height: 22px; }
.photo.req { border-color: var(--amber-b); }
.photo.shake { animation: shake 0.4s; border-color: var(--danger); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo.has { border-style: solid; padding: 0; cursor: default; }
.photo .x { position: absolute; top: 4px; right: 4px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.7); color: #fff; }
.photo .x:hover { background: var(--danger); color: #000; }
.photo .x svg { width: 14px; height: 14px; }
.photo .ld { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); }
.photo .ld .spin { width: 24px; height: 24px; }
.cmp-ta { min-height: 88px; max-height: 240px; background: transparent; border-color: transparent; padding: 8px 6px; font-size: 1.0625rem; }
.cmp-ta:hover, .cmp-ta:focus { background: transparent; border-color: transparent; box-shadow: none; }
.cmp-sub { display: flex; justify-content: space-between; gap: 10px; color: var(--text-3); font-size: 0.75rem; margin-top: -6px; padding: 0 6px; }
.cmp-opts { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.opt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt-l { color: var(--text-3); font: 600 0.6875rem/1 var(--ff-t); letter-spacing: 0.08em; text-transform: uppercase; }
.opt .chip { min-height: 34px; padding: 0.2rem 0.75rem; }
.ar-g { display: inline-block; height: 12px; width: calc(12px * var(--r, 1)); border: 1.6px solid currentColor; border-radius: 3px; flex: none; }
.cmp-dir { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r-m); background: var(--teal-a); border: 1px solid rgba(60, 207, 196, 0.2); }
.cmp-dir .switch { color: var(--teal); font-weight: 600; }
.switch svg { width: 16px; height: 16px; flex: none; }
.cmp-dir small { color: var(--text-2); font-size: 0.8125rem; flex: 1 1 180px; }
.cmp-dir .seg { background: rgba(0, 0, 0, 0.25); }
.cmp-dir .seg button { min-height: 30px; padding-inline: 0.7rem; font-size: 0.8125rem; }
.cmp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.price { display: grid; line-height: 1.2; min-width: 96px; }
.price b { font: 500 1.35rem var(--ff-d); letter-spacing: -0.02em; color: var(--text); }
.price small { color: var(--text-3); font-size: 0.8125rem; }
.price .skel { height: 24px; width: 90px; border-radius: 8px; }
.is-tma #createBtn { display: none; }
@media (max-width: 479px) { #createBtn { flex: 1 1 100%; } .cmp-bar .price { flex: 1 1 100%; display: flex; align-items: baseline; gap: 10px; } .photo { width: 76px; height: 76px; } }
.tpl-head { display: flex; gap: 12px; align-items: center; }
.tpl-head .tc-emoji { grid-row: auto; flex: none; }
.tpl-head h3 { font: 500 1.05rem/1.2 var(--ff-d); letter-spacing: -0.01em; }
.tpl-head p { color: var(--text-2); font-size: 0.875rem; margin-top: 2px; }
.tpl-text { min-height: 64px; background: var(--surface-2); border-color: var(--line); border-radius: var(--r-m); padding: 10px 12px; font-size: 1rem; }
.tpl-text:focus { background: var(--surface); border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-a); }
.tpl-photo-row { display: flex; gap: 14px; align-items: center; }
.tpl-photo-row .req-note { color: var(--text-2); font-size: 0.875rem; }
.tpl-empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 20px 8px; color: var(--text-2); }

/* ── director plan ── */
.plan { position: relative; display: grid; gap: 14px; padding: 18px; border-radius: var(--r-xl); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid rgba(60, 207, 196, 0.32); box-shadow: 0 30px 70px -40px #000; animation: pop 0.3s var(--ease); }
.plan-top { display: flex; align-items: center; gap: 10px; color: var(--teal); font: 600 0.75rem/1 var(--ff-t); letter-spacing: 0.1em; text-transform: uppercase; }
.plan-top svg { width: 18px; height: 18px; }
.plan-top .tag { margin-left: auto; letter-spacing: 0.04em; }
.plan h3 { font: 500 1.3rem/1.2 var(--ff-d); letter-spacing: -0.015em; }
.plan > p { color: var(--text-2); font-size: 0.9375rem; }
.p-step { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-m); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); position: relative; }
.p-step + .p-step { margin-top: 12px; }
.p-step + .p-step::before { content: ""; position: absolute; left: 30px; top: -13px; height: 12px; border-left: 1px dashed rgba(60, 207, 196, 0.5); }
.p-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--teal-a); color: var(--teal); }
.p-ic svg { width: 19px; height: 19px; }
.p-step b { display: block; font-weight: 600; font-size: 0.9375rem; }
.p-step small { color: var(--text-3); font-size: 0.8125rem; }
.p-cr { font: 500 0.9rem var(--ff-d); color: var(--amber-2); white-space: nowrap; }
.plan-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.plan-foot .tot { display: grid; line-height: 1.2; }
.plan-foot .tot b { font: 500 1.35rem var(--ff-d); }
.plan-foot .tot small { color: var(--text-3); }
.plan-act { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── history ── */
.hist-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1179px) { .hist-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.h-item { position: relative; display: block; width: 100%; padding: 0; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); text-align: left; transition: transform 0.25s var(--ease), border-color 0.2s; animation: pop 0.3s var(--ease) both; }
.h-item:hover { transform: translateY(-2px); border-color: var(--line-2); }
.h-item[aria-current="true"] { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber-b), 0 12px 30px -14px var(--amber-b); }
.h-item video, .h-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.h-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 5, 7, 0.85), transparent 55%); pointer-events: none; }
.h-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 8px 10px 9px; font-size: 0.75rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.h-st { position: absolute; top: 8px; left: 8px; z-index: 3; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font: 600 0.6875rem/1.4 var(--ff-t); background: rgba(0, 0, 0, 0.6); border: 1px solid var(--line-2); backdrop-filter: blur(6px); color: var(--amber-2); }
.h-st.bad { color: var(--danger); }
.h-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.h-step { position: absolute; top: 8px; right: 8px; z-index: 3; padding: 2px 7px; border-radius: 999px; font: 600 0.625rem/1.5 var(--ff-t); background: var(--teal-a); color: var(--teal); border: 1px solid rgba(60, 207, 196, 0.3); }
.h-kind { position: absolute; right: 8px; bottom: 8px; z-index: 3; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); color: var(--text-2); }
.h-kind svg { width: 13px; height: 13px; }
.h-item.busy { background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 45%, var(--surface-2) 60%); background-size: 300% 100%; animation: shimmer 1.6s linear infinite; }
.h-item.busy::after, .h-item.bad::after { background: linear-gradient(to top, rgba(5, 5, 7, 0.7), transparent 60%); }
.h-item.bad { background: var(--danger-a); }
.hist-more { display: grid; place-items: center; padding: 14px 0 4px; }
.hist-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; padding: 36px 12px; text-align: center; color: var(--text-3); font-size: 0.9375rem; }
.hist-empty svg { width: 44px; height: 44px; color: var(--amber); opacity: 0.6; }

.sr-in { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* illustrated states */
.frame > img.fr-art { position: absolute; z-index: 1; inset: auto; left: 50%; top: 5%; height: 66%; width: auto; max-width: 96%; transform: translateX(-50%); object-fit: contain; background: transparent; pointer-events: none; }
.fr-center.fr-bottom { place-content: end center; padding-bottom: 7%; }
.fr-bottom p { max-width: 24ch; }
.frame .stat { margin-top: 2px; }
.burst { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.burst i { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; background: var(--amber); transform: rotate(45deg) rotate(var(--a)) translateY(0); opacity: 0; animation: burst 1.2s var(--ease) var(--d) 1 forwards; }
.burst i:nth-child(3n) { background: var(--teal); width: 7px; height: 7px; }
.burst i:nth-child(3n+1) { background: var(--text); width: 6px; height: 6px; }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) rotate(45deg); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-170px) rotate(45deg); } }
.tc-cover { grid-row: span 3; width: 72px; height: 46px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line-2); background: #14110b; }
.tc-cover.big { width: 96px; height: 60px; border-radius: 12px; flex: none; }
.tc-body { grid-template-columns: 72px minmax(0, 1fr); }
.mc-s { display: inline-flex; align-items: center; gap: 4px; }

/* touch targets on phones and coarse pointers */
@media (max-width: 760px), (pointer: coarse) {
  .opt .chip, .cat-row .chip { min-height: 44px; }
  .bal { min-height: 44px; }
  .s-top .brand { min-width: 44px; justify-content: center; }
}
@media (max-width: 559px) { #topupBtn { width: 44px; } }
