/* PHANTOM mini app.
   Colours come from the Telegram theme; the fallbacks follow iOS system colours
   and are only used outside Telegram. Layout and type follow the App Store. */
:root {
  --fb-bg: #ffffff;
  --fb-bg2: #f2f2f7;
  --fb-text: #000000;
  --fb-hint: #8a8a8e;
  --fb-accent: #007aff;
  --fb-sep: rgba(60, 60, 67, .2);
  --fb-fill: rgba(118, 118, 128, .12);

  --bg: var(--tg-theme-bg-color, var(--fb-bg));
  --bg2: var(--tg-theme-secondary-bg-color, var(--fb-bg2));
  --section: var(--tg-theme-section-bg-color, var(--bg));
  --text: var(--tg-theme-text-color, var(--fb-text));
  --hint: var(--tg-theme-hint-color, var(--fb-hint));
  --accent: var(--tg-theme-button-color, var(--fb-accent));
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --link: var(--tg-theme-link-color, var(--accent));
  --sep: var(--tg-theme-section-separator-color, var(--fb-sep));
  --danger: var(--tg-theme-destructive-text-color, #ff3b30);
  --fill: var(--fb-fill);
  --tint: color-mix(in srgb, var(--accent) 13%, transparent);
  --ok: #248a3d;
  --star: #ff9500;


  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .06);
  --shadow-2: 0 8px 28px rgba(0, 0, 0, .16), 0 0 0 .5px var(--sep);
  --ease: cubic-bezier(.2, .9, .3, 1);

  /* Liquid Glass (iOS 26): a thin translucent layer, a strong blur that keeps colour,
     a bright specular rim on top and a softer one at the bottom. */
  --glass: color-mix(in srgb, var(--bg) 58%, transparent);
  --glass-strong: color-mix(in srgb, var(--bg) 72%, transparent);
  --glass-blur: blur(22px) saturate(190%) brightness(1.04);
  --glass-rim: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -1px 0 rgba(255, 255, 255, .35),
    inset 0 0 0 .5px rgba(255, 255, 255, .55);
  --glass-shadow: 0 8px 28px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .08);
  --glass-shine: linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .12) 38%, rgba(255, 255, 255, 0) 60%);

  --safe-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
  --tabbar-h: 64px;     /* floating capsule */
  --tabbar-gap: 10px;   /* space under it */
  --above-tabbar: calc(var(--tabbar-h) + var(--tabbar-gap) + var(--safe-bottom));
  color-scheme: light;
}

:root[data-theme="dark"] {
  --fb-bg: #000000;
  --fb-bg2: #1c1c1e;
  --fb-text: #ffffff;
  --fb-hint: #98989f;
  --fb-accent: #0a84ff;
  --fb-sep: rgba(84, 84, 88, .6);
  --fb-fill: rgba(118, 118, 128, .24);
  --ok: #30d158;
  --star: #ff9f0a;
  --shadow-1: 0 0 0 .5px var(--sep);
  --shadow-2: 0 8px 28px rgba(0, 0, 0, .5), 0 0 0 .5px var(--sep);
  --glass: color-mix(in srgb, var(--bg2) 55%, transparent);
  --glass-strong: color-mix(in srgb, var(--bg2) 70%, transparent);
  --glass-blur: blur(22px) saturate(170%) brightness(1.1);
  --glass-rim: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(255, 255, 255, .08),
    inset 0 0 0 .5px rgba(255, 255, 255, .18);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, .55);
  --glass-shine: linear-gradient(180deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .04) 40%, rgba(255, 255, 255, 0) 60%);
  color-scheme: dark;
}

/* Shared glass surface. The ::after layer is the gloss; content sits above it. */
.glass, .tabbar, .search, .filter-btn, .job-pill, .select-bar, .toast, .star, .sheet-head .get {
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.38 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--above-tabbar) + 16px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; }
button, a, summary { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--hint); }
svg { flex: none; }

.view { display: none; max-width: 720px; margin: 0 auto; padding: 0 16px; overflow-x: clip; }
.view.is-active { display: block; }
.view.is-entering { animation: view-in .22s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Large titles ---------- */
.top, .page-head { padding: 18px 0 2px; }
.top h1, .page-head h2 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.025em; line-height: 1.12; }
.top h1.brand-title { display: flex; align-items: center; gap: 10px; letter-spacing: .13em; font-size: 25px; }
.brand-title img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 4px 14px rgba(85, 242, 194, .22); }
.brand-title span { color: #55dcb4; }
:root[data-theme="dark"] .brand-title span { color: #75f5c7; }
.lead, .page-head p { margin: 4px 0 0; color: var(--hint); font-size: 15px; line-height: 1.4; }
.eyebrow { margin: 0 0 2px; color: var(--hint); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.account {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 10px 12px 10px 10px;
  border-radius: var(--r-md); background: var(--bg2); font-size: 15px;
}
.account::before {
  content: ""; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #fff 0 6px, transparent 6.5px),
    radial-gradient(ellipse 11px 8px at 50% 96%, #fff 0 97%, transparent 100%),
    linear-gradient(160deg, #a1a1a6, #6e6e73);
}
.account-text { flex: 1; min-width: 0; }
.account-text b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text small { color: var(--hint); font-size: 13px; }
.account button {
  flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--fill); color: var(--danger); font-size: 14px; font-weight: 600;
}

/* ---------- Search + filters (one sticky glass panel) ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 5; margin: 0 -16px; padding: 8px 16px 4px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
}
.toolbar.is-stuck { box-shadow: 0 .5px 0 var(--sep); }
.search-row { display: flex; align-items: center; gap: 8px; }
.search {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 6px 0 14px;
  border-radius: 22px; background: var(--glass); box-shadow: var(--glass-rim), var(--glass-shadow);
}
.search::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--glass-shine); pointer-events: none; }
.search > * { position: relative; z-index: 1; }
.search svg { width: 18px; height: 18px; fill: var(--hint); }
.search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none;
  color: var(--text); font: inherit; font-size: 17px;
}
.search input::placeholder { color: var(--hint); }
.search input::-webkit-search-cancel-button { display: none; }
.icon-btn {
  display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: none; color: var(--hint); font-size: 20px; line-height: 1; cursor: pointer;
}

/* Filter button next to the search field; the sections open under it. */
.filter-btn {
  position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 22px; cursor: pointer; color: var(--text);
  background: var(--glass); box-shadow: var(--glass-rim), var(--glass-shadow);
  transition: color .15s, background-color .2s;
}
.filter-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--glass-shine); pointer-events: none; }
.filter-btn svg { position: relative; z-index: 1; width: 20px; height: 20px; fill: currentColor; }
.filter-btn.is-open { color: var(--accent); }
.filter-btn.is-on {
  background: color-mix(in srgb, var(--accent) 90%, transparent); color: var(--accent-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 0, 0, .12);
}
.filter-btn:active { transform: scale(.94); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0 0 8px; animation: view-in .18s var(--ease); }
.chip {
  flex: none; height: 34px; padding: 0 14px; border: 0; border-radius: 17px; cursor: pointer;
  background: var(--fill); color: var(--text); font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.chip small { margin-left: 4px; color: var(--hint); font-size: 13px; font-variant-numeric: tabular-nums; }
.chip.is-active { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.chip.is-active small { color: inherit; opacity: .7; }
.chip:active { opacity: .6; }

.token {
  flex: none; display: inline-flex; align-items: center; gap: 4px; height: 28px; max-width: 55%;
  padding: 0 4px 0 10px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--accent); color: var(--accent-text); font-size: 14px; font-weight: 600;
}
.token span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-x {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  font-size: 15px; line-height: 1; background: rgba(255, 255, 255, .25);
}

/* ---------- App rows ---------- */
.list { display: flex; flex-direction: column; }
.group-title { margin: 22px 0 2px; font-size: 22px; font-weight: 700; letter-spacing: -.015em; }
.app {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-width: 0;
  padding: 10px 0; border: 0; background: none; text-align: left; cursor: pointer;
  content-visibility: auto; contain-intrinsic-size: auto 80px;
  transition: opacity .15s;
}
.app::after {
  content: ""; position: absolute; left: 74px; right: 0; bottom: 0; height: 1px;
  background: var(--sep); transform: scaleY(.5); transform-origin: bottom;
}
.list > .app:last-child::after { display: none; }
.app:active { opacity: .55; }
.app-text { flex: 1; min-width: 0; }
.app-name, .app-desc, .app-meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-name { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.app-desc { color: var(--hint); font-size: 13px; margin-top: 2px; }
.app-meta { color: var(--hint); font-size: 12px; margin-top: 3px; }
.own-badge { color: var(--ok); font-weight: 600; }
.fav-dot { color: var(--star); }

/* App Store "GET" pill */
.get {
  position: relative; flex: none; min-width: 92px; height: 32px; padding: 0 16px; border: 0; border-radius: 16px;
  background: var(--fill); color: var(--accent); font-size: 15px; font-weight: 700; letter-spacing: -.01em; cursor: pointer;
  transition: transform .12s, opacity .12s;
}
.get::before { content: ""; position: absolute; inset: -6px -2px; }  /* 44px tap target */
.get:active { transform: scale(.94); opacity: .7; }
.get.is-off { color: var(--hint); }

.app-icon {
  flex: none; position: relative; width: 60px; height: 60px; border-radius: 13.5px; overflow: hidden;
  display: grid; place-items: center; font-size: 21px; font-weight: 700; color: var(--hint);
  background: var(--fill);
}
.app-icon::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 .5px var(--sep);
}
.app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.app-icon.has-img { color: transparent; }
.app-icon.lg { width: 108px; height: 108px; border-radius: 24px; font-size: 38px; }

mark { background: none; color: var(--accent); }

.skeleton { height: 60px; margin: 10px 0; border-radius: var(--r-md); background: var(--fill); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .45; } }

.empty { text-align: center; color: var(--hint); padding: 48px 24px; font-size: 15px; line-height: 1.45; }
.extras { margin-top: 4px; }

/* ---------- Grouped sections (download, help, sheets) ---------- */
.section-label {
  margin: 26px 16px 7px; color: var(--hint); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em;
}
.group { border-radius: var(--r-md); background: var(--bg2); overflow: hidden; }
.sheet .group, .sheet .field input { background: var(--section); }
.row {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 11px 16px;
  color: inherit; text-decoration: none;
}
.row + .row::after {
  content: ""; position: absolute; left: 16px; right: 0; top: 0; height: 1px;
  background: var(--sep); transform: scaleY(.5); transform-origin: top;
}
.steps .row + .row::after { left: 56px; }
a.row:active, button.row:active { background: var(--fill); }
.row-text { flex: 1; min-width: 0; }
.row-text b { display: block; font-weight: 500; }
.row-text span, .row-text code { display: block; color: var(--hint); font-size: 13px; margin-top: 2px; }
.row-text code { font: 13px ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.row.is-owned code { color: var(--ok); }
.row .tag {
  flex: none; height: 30px; padding: 0 12px; border-radius: 15px; display: grid; place-items: center;
  background: var(--fill); color: var(--accent); font-size: 14px; font-weight: 700;
}
.row-icon {
  flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(160deg, #5e5ce6, #3634a3); color: #fff;
}
.row-icon.win { background: linear-gradient(160deg, #0a84ff, #0055b8); }
.row-icon svg { width: 20px; height: 20px; fill: currentColor; }
.chevron { flex: none; width: 8px; height: 8px; border: solid var(--hint); border-width: 0 2px 2px 0; transform: rotate(-45deg); opacity: .55; }
.copy {
  position: relative; flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--fill); color: var(--accent); font-size: 14px; font-weight: 600;
}
.copy::before { content: ""; position: absolute; inset: -6px -2px; }
.footnote { margin: 8px 16px 0; color: var(--hint); font-size: 13px; line-height: 1.45; }
.card { padding: 14px 16px; border-radius: var(--r-md); background: var(--bg2); }
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.card p { margin: 0; color: var(--hint); font-size: 14px; line-height: 1.5; }
.card p + p { margin-top: 8px; }

.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before {
  content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--tint); color: var(--accent); font-size: 14px; font-weight: 700;
}
.steps li .row-text { padding-top: 2px; }

.faq details + details { box-shadow: inset 0 .5px 0 var(--sep); }
.faq summary {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 11px 16px;
  list-style: none; cursor: pointer; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary span { flex: 1; }
.faq summary .chevron { transform: rotate(45deg); transition: transform .2s; }
.faq details[open] .chevron { transform: rotate(-135deg); }
.faq p { margin: -2px 16px 14px; color: var(--hint); font-size: 14px; line-height: 1.5; }
.install-only { display: none; }
.can-install .install-only { display: block; }

/* ---------- Tab bar: floating Liquid Glass capsule ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + var(--tabbar-gap)); z-index: 10;
  transform: translateX(-50%); width: min(calc(100% - 24px), 440px); height: var(--tabbar-h); padding: 5px;
  display: flex; border-radius: 32px;
  background: var(--glass); box-shadow: var(--glass-rim), var(--glass-shadow);
}
.tabbar::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--glass-shine); pointer-events: none; }
.tab {
  position: relative; z-index: 1; flex: 1; border: 0; border-radius: 27px; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 10.5px; font-weight: 600; color: var(--text); transition: color .2s, background-color .25s var(--ease);
}
.tab svg { width: 24px; height: 24px; fill: currentColor; transition: transform .25s var(--ease); }
.tab.is-active {
  color: var(--accent);
  background: color-mix(in srgb, var(--text) 8%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 .5px rgba(255, 255, 255, .25);
}
.tab:active svg { transform: scale(.85); }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .42);
  opacity: 0; transition: opacity .25s;
}
.sheet-backdrop.is-open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 720px; margin: 0 auto;
  max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--bg2);
  padding: 8px 16px calc(28px + var(--safe-bottom));
  box-shadow: 0 -4px 30px rgba(0, 0, 0, .12);
  transform: translateY(100%); transition: transform .32s var(--ease);
}
.sheet.is-open { transform: none; }
.sheet-grip { width: 38px; height: 5px; border-radius: 3px; background: var(--hint); opacity: .4; margin: 0 auto 16px; }

/* App page header */
.sheet-head { display: flex; gap: 16px; align-items: flex-start; }
.sheet-head > div { flex: 1; min-width: 0; padding-top: 2px; }
.sheet-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.sheet-head p { margin: 4px 0 0; color: var(--hint); font-size: 15px; }
.sheet-head .actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.sheet-head .get { background: color-mix(in srgb, var(--accent) 90%, transparent); color: var(--accent-text); min-width: 104px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.sheet-head .get.is-off { background: var(--fill); color: var(--hint); }
.sheet-head .app-icon { box-shadow: var(--shadow-1); }
.star {
  position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: var(--glass); color: var(--accent); cursor: pointer; transition: transform .12s;
  box-shadow: var(--glass-rim), 0 2px 8px rgba(0, 0, 0, .08);
}
.star::before { content: ""; position: absolute; inset: -5px; }
.star svg { width: 18px; height: 18px; fill: currentColor; }
.star:active { transform: scale(.9); }
.star.is-on { color: var(--star); }

/* Facts strip under the header, like the App Store's ratings row */
.facts {
  display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; margin: 18px 0 0;
  padding: 12px 0; border-block: .5px solid var(--sep); text-align: center;
}
.facts > div { min-width: 0; padding: 0 6px; }
.facts > div + div { box-shadow: -.5px 0 0 var(--sep); }
.facts small { display: block; color: var(--hint); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.facts b { display: block; margin-top: 3px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facts b.is-bad { color: var(--danger); }
.facts span { display: block; margin-top: 1px; color: var(--hint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desc { margin: 16px 0 0; font-size: 15px; line-height: 1.5; }

.btn {
  width: 100%; height: 50px; border: 0; border-radius: var(--r-md); cursor: pointer;
  background: var(--accent); color: var(--accent-text); font-size: 17px; font-weight: 600;
  transition: transform .12s, opacity .12s;
}
.btn:active { transform: scale(.98); opacity: .85; }
.btn:disabled { opacity: .5; }
.btn.secondary { background: var(--section); color: var(--accent); }
.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn-row .btn { flex: 1; }

/* Login */
.login-mark {
  width: 64px; height: 64px; margin: 4px auto 14px; border-radius: 18px; display: grid; place-items: center;
  background: var(--tint); color: var(--accent);
}
.login-mark svg { width: 34px; height: 34px; fill: currentColor; }
.login-mark + h2, .login-mark ~ .muted { text-align: center; }
.login h2 { margin: 4px 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.login .muted { margin: 0 0 18px; font-size: 15px; line-height: 1.45; }
.field { display: block; margin-top: 12px; }
.field span { display: block; margin: 0 0 6px 4px; color: var(--hint); font-size: 13px; font-weight: 500; }
.field input {
  width: 100%; height: 50px; padding: 0 16px; border: 0; border-radius: var(--r-md); outline: 0;
  color: var(--text); font: inherit; font-size: 17px; transition: box-shadow .15s;
}
.field input:focus { box-shadow: 0 0 0 2px var(--accent); }
.field input[inputmode="numeric"] { letter-spacing: .4em; font-size: 24px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.form-msg { margin: 12px 4px 0; color: var(--hint); font-size: 14px; line-height: 1.4; }
.form-msg.is-error { color: var(--danger); }
.login .btn { margin-top: 18px; }
.login .footnote { margin: 14px 4px 0; text-align: center; }

/* Tariff picker on the pay sheet */
.tariffs { margin-top: 16px; }
.tariff { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.tariff .check { display: grid; }
.tariff.is-selected { background: var(--tint); }
.tariff.is-selected .check { background: var(--accent); box-shadow: none; }
.tariff.is-selected .check::before { content: "✓"; }
.pay .btn { margin-top: 16px; }

/* Job */
.job-status { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--section); font-size: 15px; line-height: 1.4; }
.job-status.is-done { color: var(--ok); font-weight: 600; }
.job-status.is-error, .job-status.is-warn { color: var(--danger); }
.queue-row.is-warn .row-text span { color: var(--danger); }
.progress { position: relative; height: 4px; margin-top: 12px; border-radius: 2px; overflow: hidden; background: var(--fill); }
.progress::after {
  content: ""; position: absolute; inset: 0; width: 35%; border-radius: 2px; background: var(--accent);
  animation: indeterminate 1.2s ease-in-out infinite;
}
@keyframes indeterminate { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.job-status + .btn { margin-top: 16px; }

.job-pill {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--above-tabbar) + 10px); z-index: 11;
  max-width: 696px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; border: 0; border-radius: 26px; cursor: pointer; text-align: left;
  background: var(--glass-strong); box-shadow: var(--glass-rim), var(--glass-shadow); font-size: 14px; font-weight: 600;
}
.job-pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-pill-dot {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--fill); border-top-color: var(--accent); animation: spin .8s linear infinite;
}
.job-pill.is-done .job-pill-dot { border-color: var(--ok); background: var(--ok); animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Queue, selection, requests ---------- */
.queue-head h2 { margin: 4px 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.queue-head .muted { margin: 0 0 14px; font-size: 14px; line-height: 1.45; }
.queue-row .app-icon { width: 40px; height: 40px; border-radius: 10px; font-size: 15px; }
.queue-row.is-error .row-text span { color: var(--danger); }
.queue-row.is-done .row-text span { color: var(--ok); }
.queue-close { margin-top: 16px; }

.list-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 0; font-size: 13px; }
.list-tools button { flex: none; border: 0; background: none; color: var(--link); font-size: 15px; font-weight: 600; cursor: pointer; padding: 8px 0; }
#link-row { margin-top: 4px; }
#link-row .app { background: var(--tint); border-radius: var(--r-md); padding: 10px 12px; margin: 6px 0; }
#link-row .app::after { display: none; }

.check {
  display: none; flex: none; width: 26px; height: 26px; border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--sep); place-items: center; color: var(--accent-text); font-size: 15px; font-weight: 700;
}
.selecting .app .check { display: grid; }
.selecting .app .get { display: none; }
.app.is-selected .check { background: var(--accent); box-shadow: none; }
.app.is-selected .check::before { content: "✓"; }
.selecting .app.is-selected { background: var(--tint); }

.select-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--above-tabbar) + 10px); z-index: 12;
  max-width: 696px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; border-radius: 29px;
  background: var(--glass-strong); box-shadow: var(--glass-rim), var(--glass-shadow); font-size: 15px; font-weight: 600;
}
.select-bar .get { background: var(--accent); color: var(--accent-text); min-width: 128px; height: 38px; border-radius: 19px; }
.select-bar .get:disabled { opacity: .45; }
.selecting .job-pill { display: none; }
body.selecting { padding-bottom: calc(var(--above-tabbar) + 80px); }

.link-btn { border: 0; background: none; color: var(--link); font-size: 15px; font-weight: 600; cursor: pointer; padding: 10px 8px; }
.request-footer { text-align: center; color: var(--hint); font-size: 14px; margin: 24px 0 8px; }
.request-footer p { margin: 0; }
.request-text {
  width: 100%; padding: 12px 14px; border: 0; border-radius: var(--r-md); outline: 0; resize: vertical;
  background: var(--section); color: var(--text); font: inherit; font-size: 16px; line-height: 1.45;
}
.request-text:focus { box-shadow: 0 0 0 2px var(--accent); }

/* ---------- Versions & admin ---------- */
.req { color: var(--hint); }
.req.is-bad, .version-row .is-bad { color: var(--danger); }
.more-versions { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.more-versions .row-text b { color: var(--link); }
.login .link-btn, .sheet-body > .link-btn { display: block; margin: 8px auto 0; }
.admin-report { white-space: pre-wrap; color: var(--text) !important; font-size: 14px; line-height: 1.5; }

/* ---------- Home ---------- */
#view-home .account { margin-top: 14px; }

/* Intro card */
.hero { margin: 16px 0 0; padding: 18px 16px 16px; border-radius: var(--r-lg); background: var(--bg2); }
.hero-icons { display: flex; gap: 8px; margin-bottom: 14px; min-height: 48px; }
.hero-icons .app-icon { width: 48px; height: 48px; border-radius: 11px; font-size: 17px; }
.hero h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.hero p { margin: 6px 0 16px; color: var(--hint); font-size: 15px; line-height: 1.45; }
.hero .btn { height: 46px; font-size: 16px; }
.hero .btn:disabled { opacity: .6; }

.search-link { width: 100%; margin-top: 16px; border: 0; cursor: pointer; color: var(--hint); font: inherit; font-size: 17px; text-align: left; }
.search-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shelf { margin-top: 26px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2px; }
.shelf-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.shelf-head .link-btn { padding: 6px 0; font-weight: 500; font-size: 16px; }

/* Ranked list, like the App Store charts */
#shelf-popular-list { counter-reset: rank; }
#shelf-popular-list .app { counter-increment: rank; }
#shelf-popular-list .app::before {
  content: counter(rank); flex: none; order: 1; width: 16px; margin-left: -2px;
  color: var(--text); font-size: 17px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums;
}
#shelf-popular-list .app .app-icon { order: 0; }
#shelf-popular-list .app .app-text { order: 2; }
#shelf-popular-list .app .get { order: 3; }
#shelf-popular-list .app::after { left: 104px; }

/* Section tiles */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border: 0;
  border-radius: var(--r-md); background: var(--bg2); color: var(--text); text-align: left; cursor: pointer;
  transition: transform .15s var(--ease);
}
.tile:active { transform: scale(.97); }
.tile-icons { display: flex; gap: 5px; }
.tile-icons .app-icon { width: 30px; height: 30px; border-radius: 7px; font-size: 11px; }
.tile b { font-size: 16px; font-weight: 600; }
.tile small { margin-top: -8px; color: var(--hint); font-size: 13px; }

.icon-form { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; }
.icon-form input { flex: 1; min-width: 0; height: 36px; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 15px; }
.footnote.is-error { color: var(--danger); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--above-tabbar) + 14px); z-index: 30;
  transform: translateX(-50%); padding: 11px 18px; border-radius: 22px; font-size: 14px; font-weight: 600;
  background: var(--glass-strong); color: var(--text); white-space: nowrap;
  box-shadow: var(--glass-rim), var(--glass-shadow);
  animation: toast-in .2s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

@media (min-width: 560px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Personal account ---------- */
.profile { display: flex; align-items: center; gap: 14px; padding: 18px 4px 4px; }
.avatar {
  flex: none; width: 60px; height: 60px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(160deg, #5e5ce6, #3634a3); color: #fff; font-size: 22px; font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-text { min-width: 0; }
.profile-text h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-text p { margin: 2px 0 0; color: var(--hint); font-size: 14px; }
.access { padding: 16px; border-radius: var(--r-md); background: var(--bg2); }
.access-value { font-size: 22px; font-weight: 700; letter-spacing: -.015em; }
.access-value.is-empty { color: var(--hint); }
.access p { margin: 4px 0 12px; color: var(--hint); font-size: 14px; line-height: 1.45; }
.access p:last-child { margin-bottom: 0; }
.access .btn { width: 100%; }
.cab-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.cab-stat { padding: 12px; border-radius: var(--r-md); background: var(--bg2); }
.cab-stat b { display: block; font-size: 20px; font-weight: 700; }
.cab-stat span { color: var(--hint); font-size: 12.5px; }
.row .app-icon { width: 40px; height: 40px; border-radius: 10px; font-size: 14px; }
.row-text .is-error { color: var(--danger); }
.row .copy:disabled { opacity: .5; }

/* ---------- Growth: bell, gifts, QR, reviews ---------- */
.star.bell.is-on { color: var(--accent); }
.pills { display: flex; gap: 6px; flex: none; }
.link-row code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-label { color: var(--hint); font-size: 13px; margin-bottom: 2px; }
.discount-note { color: var(--ok); font-weight: 600; }
.tag s { color: var(--hint); font-weight: 500; }
.qr-link { display: block; margin: 12px auto 0; }
.qr-sheet { text-align: center; }
.qr-img { display: block; width: min(72vw, 280px); height: auto; margin: 8px auto; border-radius: 12px; background: #fff; padding: 6px; }
.shelf-sub { margin: -4px 4px 10px; color: var(--hint); font-size: 14px; }
.reviews { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
.reviews::-webkit-scrollbar { display: none; }
.review { flex: 0 0 78%; scroll-snap-align: start; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg2); }
.review p { margin: 0 0 8px; font-size: 15px; line-height: 1.45; }
.review span { color: var(--hint); font-size: 13px; }
.safety .row { align-items: flex-start; }
button.row { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.link-row { flex-wrap: wrap; }
.link-row .row-text { flex-basis: 100%; }
.link-row .pills { margin-top: 2px; }

/* Without Telegram: access key and the inbox of what the bot would have said */
.login .btn + .btn { margin-top: 10px; }
.access-key {
  margin: 0 0 14px; padding: 16px 12px; border-radius: var(--r-md); background: var(--section); text-align: center;
  font: 600 21px ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; user-select: all; -webkit-user-select: all;
}
.guest-card h3 { margin-bottom: 6px; }
.guest-card .btn { margin-top: 14px; }
.guest-card .btn + .btn { margin-top: 10px; }
.guest-card .link-btn { display: block; margin: 6px auto 0; }
.inbox-item { padding: 12px 16px; }
.inbox-item + .inbox-item { border-top: .5px solid var(--sep, rgba(127,127,127,.25)); }
.inbox-item p { margin: 0; font-size: 15px; line-height: 1.45; white-space: pre-line; }
.inbox-item span { display: block; margin-top: 4px; color: var(--hint); font-size: 13px; }
