/* ─────────────────────────────────────────────────────────────────────────
   Темы для Happ (/themes).

   Страница живёт вместе с выбранной темой: свечение под телефоном и акцентные детали страницы берут цвет
   акцента темы (--acc, ставит themes.js). Всё остальное — спокойный графит и синий сайта, как в кабинете.
   Телефон слева (на телефоне — сверху) — главное; галерея и редактор — справа (ниже).
   ───────────────────────────────────────────────────────────────────────── */

/* Страница не двигается вбок и не увеличивается (владелец): Safari на iPhone приближал страницу при касании
   поля с шрифтом меньше 16px, а случайный сдвиг пальцем уводил её вбок. Ряды фильтров листаются внутри себя. */
html:has(.page-themes), .page-themes { overflow-x: clip; max-width: 100%; touch-action: pan-y; }
.page-themes input, .page-themes textarea { font-size: 16px; }
.page-themes { --acc: var(--brand); --acc-soft: color-mix(in srgb, var(--brand) 18%, transparent); }

.tp-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.tp-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(90% 60% at 50% 0, #000, transparent 75%); mask-image: radial-gradient(90% 60% at 50% 0, #000, transparent 75%);
}
.tp-bg__glow { position: absolute; left: 50%; top: 120px; width: 620px; height: 620px; margin-left: -310px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--acc-soft), transparent); filter: blur(10px); transition: background .5s var(--ease); }
@media (min-width: 980px) { .tp-bg__glow { left: 30%; } }

.tp { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: calc(var(--top-h) + 20px) 16px 120px; }
@media (min-width: 980px) {
  .tp { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 64px; }
}
/* Слева на компьютере — закреплённая колонка, и она целиком должна помещаться по высоте окна, иначе кнопка
   «Скопировать тему» уходит под край: телефон уменьшается под высоту окна, а на совсем низких — колонка не закреплена. */
@media (min-width: 980px) and (min-height: 780px) { .tp-stage { position: sticky; top: calc(var(--top-h) + 12px); } }
@media (min-width: 980px) and (max-height: 1060px) { .phone { zoom: .88; } }
@media (min-width: 980px) and (max-height: 960px) { .phone { zoom: .74; } }
@media (min-width: 980px) and (max-height: 870px) { .phone { zoom: .6; } }
@media (min-width: 980px) and (max-height: 780px) { .phone { zoom: .74; } }

/* ─── сцена ─── */
.tp-head { text-align: center; margin-bottom: 18px; }
.tp-title { margin: 0; font-size: clamp(34px, 9vw, 46px); line-height: 1; letter-spacing: -.045em; font-weight: 900;
  background: linear-gradient(120deg, var(--fg) 30%, var(--acc)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tp-lead { margin: 10px auto 0; max-width: 26em; color: var(--fg-2); font-size: 15.5px; }
.tp-phone-wrap { position: relative; display: flex; justify-content: center; touch-action: pan-y; }
.tp-arrow { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(20, 20, 24, .7);
  display: grid; place-items: center; color: var(--fg); cursor: pointer; backdrop-filter: blur(8px); transition: background .2s, transform .15s; }
.tp-arrow:hover { background: rgba(255, 255, 255, .08); }
.tp-arrow:active { transform: scale(.94); }
.tp-arrow:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; }
.tp-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tp-now { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; text-align: center; }
.tp-now__mid { flex: 1; min-width: 0; }
.tp-now__name { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.tp-now__name b { font-size: 21px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-now__name span { font: 12px var(--mono); color: var(--fg-3); }
.tp-now__tags { display: flex; justify-content: center; gap: 6px; margin-top: 8px; min-height: 24px; }
.tp-tag { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); background: var(--card-2); border: 1px solid var(--line); }
.tp-install { width: 100%; min-height: 56px; font-size: 17px; gap: 10px; }
.tp-install svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tp-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 0; padding: 0; }
.tp-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 14px; background: var(--card-2);
  border: 1px solid var(--line); font-size: 12.5px; line-height: 1.25; color: var(--fg-2); text-align: center; }
.tp-steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--mono); color: #fff; background: var(--acc); }

/* ─── телефон и экран Happ ─── */
.phone { width: min(78vw, 300px); padding: 9px; border-radius: 46px; flex: none;
  background: linear-gradient(145deg, #3a3f48, #121317 30%, #0b0c0f 60%, #2b2f37);
  box-shadow: 0 40px 90px -36px var(--acc), 0 30px 80px -30px rgba(0, 0, 0, .9), inset 0 0 0 1.5px rgba(255, 255, 255, .18);
  transition: box-shadow .5s var(--ease); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
@media (min-width: 980px) { .phone { width: 300px; } }
.phone__screen { position: relative; aspect-ratio: 9 / 19.5; border-radius: 38px; overflow: hidden; isolation: isolate;
  font: 500 12px/1.25 -apple-system, "SF Pro Text", var(--font); color: var(--t-title, #fff); }
.phone__screen * { transition: background-color .35s ease, color .35s ease, stroke .35s ease; }
.phone.is-swap .phone__screen { animation: tp-swap .35s var(--ease); }
@keyframes tp-swap { from { opacity: .4; transform: scale(.985); } to { opacity: 1; transform: none; } }
.hp__bg { position: absolute; inset: 0; z-index: -2; background: var(--t-bg1); }
.hp__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--t-angle, 30deg), var(--t-bg1), var(--t-bg2), var(--t-bg3)); opacity: var(--t-int, 1); }
.hp__status { display: flex; justify-content: space-between; align-items: center; padding: 13px 22px 0; font-weight: 600; font-size: 12.5px; color: var(--t-title); }
.hp__isl { width: 70px; height: 20px; border-radius: 12px; background: #000; }
.hp__status-r { display: flex; gap: 2px; align-items: center; }
.hp__status-r i { width: 3px; height: 7px; border-radius: 1px; background: currentColor; }
.hp__status-r i:nth-child(2) { height: 9px; } .hp__status-r i:nth-child(3) { height: 11px; }
.hp__status-r b { margin-left: 4px; padding: 0 3px; border: 1px solid currentColor; border-radius: 4px; font-size: 7.5px; line-height: 10px; }
.hp__top { display: flex; justify-content: space-between; padding: 12px 14px 0; }
.hp__round { width: 46px; height: 40px; border-radius: 20px; display: grid; place-items: center; background: color-mix(in srgb, var(--t-title) 9%, transparent); }
.hp__round svg, .hp__ico svg { width: 20px; height: 20px; fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hp__power { position: relative; display: grid; place-items: center; height: 150px; margin-top: 4px; }
.hp__glow { position: absolute; width: 136px; height: 136px; border-radius: 50%; filter: blur(14px); opacity: .55; }
.hp__glow--1 { background: var(--t-el1); transform: translate(-12px, -8px); }
.hp__glow--2 { background: var(--t-el2); transform: translate(12px, 6px); opacity: .45; }
.hp__glow--3 { background: var(--t-el3); width: 108px; height: 108px; opacity: .35; }
.hp__btn { position: relative; width: 110px; height: 110px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: var(--t-btn); box-shadow: 0 0 0 9px color-mix(in srgb, var(--t-btn) 22%, transparent), 0 12px 30px -10px rgba(0, 0, 0, .6); }
.hp__btn svg { width: 26px; height: 26px; fill: none; stroke: var(--t-power); stroke-width: 2.4; stroke-linecap: round; }
.hp__btn b { font-size: 8px; letter-spacing: .08em; font-weight: 600; color: var(--t-btntext); }
.hp__btn span { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--t-timer); }
.hp__actions { display: flex; gap: 7px; padding: 0 12px; }
.hp__actions span { flex: 1; text-align: center; padding: 10px 6px; border-radius: 16px; background: color-mix(in srgb, var(--t-title) 8%, transparent); font-size: 9.5px; color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp__actions span:last-child { flex: .55; }
.hp__sub { margin: 9px 11px 0; border-radius: 16px 16px 0 0; overflow: hidden; }
.hp__head { display: flex; align-items: center; gap: 7px; padding: 9px 11px; background: var(--t-head); }
.hp__head > div { flex: 1; min-width: 0; }
.hp__head b { display: block; font-size: 14px; font-weight: 700; color: var(--t-dhead); }
.hp__head small { display: block; font-size: 8px; color: var(--t-dsub); margin-top: 2px; }
.hp__ico { width: 30px; height: 26px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--t-title) 8%, transparent); }
.hp__ico svg { width: 15px; height: 15px; }
.hp__ico--sm { width: 26px; height: 22px; }
.hp__ico--sm svg { width: 13px; height: 13px; }
.hp__info { display: flex; align-items: center; gap: 7px; padding: 7px 11px; background: var(--t-info); color: var(--t-itext); font-size: 9px; }
.hp__traffic { padding: 3px 7px; border-radius: 7px; background: var(--t-traffic); flex: 1; text-align: center; }
.hp__until { white-space: nowrap; }
.hp__row { display: flex; align-items: center; gap: 9px; padding: 8px 11px; background: var(--t-row); border-top: 1px solid rgba(0, 0, 0, .14); position: relative; }
.hp__row.on { background: var(--t-sel); }
.hp__row.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--t-title); }
.hp__flag { flex: none; width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
.hp__row div { flex: 1; min-width: 0; }
.hp__row b { display: block; font-size: 11px; font-weight: 700; color: var(--t-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp__row small { display: block; font-size: 8.5px; color: var(--t-rsub); margin-top: 2px; }
.hp__row > svg:last-child { width: 8px; height: 13px; fill: none; stroke: var(--t-chev); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hp__home { position: absolute; left: 50%; bottom: 7px; width: 96px; height: 4px; margin-left: -48px; border-radius: 3px; background: var(--t-title); opacity: .55; }

/* ─── правая колонка ───
   Галерея и редактор — стеклянными карточками, выбранное красится в акцент темы (владелец, 2026-10-21: «сделай её
   удобнее и красивее в нашем стиле»). */
.tp-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 44px; min-width: 0; }
.tp-side > * { min-width: 0; }
@media (min-width: 980px) { .tp-side { margin-top: 6px; } }
.tp-gallery { padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
@media (max-width: 559px) { .tp-gallery, .tp-own { padding: 16px; } }
.tp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tp-h2 { margin: 0; font-size: 26px; letter-spacing: -.03em; font-weight: 800; }
.tp-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2);
  color: var(--fg); font: 600 14px var(--font); cursor: pointer; }
.tp-link:hover { background: rgba(255, 255, 255, .07); }
.tp-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.tp-filters { display: flex; gap: 6px; overflow-x: auto; margin: 14px -16px 16px; padding: 0 16px; scrollbar-width: none; touch-action: pan-x pan-y; }
.tp-filters::-webkit-scrollbar { display: none; }
@media (min-width: 980px) { .tp-filters { margin: 14px 0 16px; padding: 0; flex-wrap: wrap; } }
.tp-filters button { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--fg-2);
  font: 600 14px var(--font); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.tp-filters button[aria-selected="true"] { background: var(--acc); color: #fff; border-color: var(--acc); box-shadow: 0 8px 20px -10px var(--acc); }
.tp-filters button span { margin-left: 4px; opacity: .55; font: 500 12px var(--mono); }

/* карточки тем: маленький настоящий экран Happ */
.tp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .tp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tcard { display: block; padding: 0; border: 0; background: none; color: var(--fg); text-align: left; cursor: pointer; font: inherit; }
.tcard:focus-visible { outline: none; }
.tcard:focus-visible .mini { outline: 2px solid var(--brand-2); outline-offset: 3px; }
.mini { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; isolation: isolate;
  background: linear-gradient(var(--a, 120deg), var(--b1), var(--b2), var(--b3)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: transform .2s var(--ease), box-shadow .2s; }
.tcard:hover .mini { transform: translateY(-2px); }
.tcard[aria-pressed="true"] .mini { box-shadow: 0 0 0 2px var(--acc-card), 0 14px 30px -14px var(--acc-card); }
.mini i { position: absolute; display: block; }
.mini__plus { right: 9%; top: 6%; width: 18%; aspect-ratio: 1.15; border-radius: 40%; background: color-mix(in srgb, var(--tt) 12%, transparent); }
.mini__plus::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--acc-card); font: 700 13px/1 var(--font); }
.mini__glow { left: 50%; top: 31%; width: 52%; aspect-ratio: 1; margin-left: -26%; border-radius: 50%; background: var(--acc-card); filter: blur(14px); opacity: .55; transform: translateY(-50%); }
.mini__btn { left: 50%; top: 31%; width: 34%; aspect-ratio: 1; margin-left: -17%; border-radius: 50%; background: var(--acc-card); transform: translateY(-50%);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--acc-card) 25%, transparent); }
.mini__btn::after { content: ""; position: absolute; left: 50%; top: 50%; width: 34%; height: 34%; margin: -17% 0 0 -17%; border-radius: 50%;
  border: 2px solid var(--on-acc); border-top-color: transparent; }
.mini__rows { left: 8%; right: 8%; bottom: 0; height: 38%; border-radius: 10px 10px 0 0; overflow: hidden; background: var(--row); }
.mini__rows b { display: flex; align-items: center; gap: 6%; height: 33.4%; padding: 0 8%; border-top: 1px solid rgba(0, 0, 0, .12); }
.mini__rows b:first-child { background: var(--sel); border-top: 0; }
.mini__rows b::before { content: ""; flex: none; width: 14%; aspect-ratio: 1.4; border-radius: 2px; background: color-mix(in srgb, var(--tt) 35%, transparent); }
.mini__rows b::after { content: ""; flex: 1; height: 5px; border-radius: 3px; background: var(--tt); opacity: .75; }
.mini__check { right: 8px; bottom: calc(38% + 8px); width: 24px; height: 24px; border-radius: 50%; background: var(--fg); display: none !important; }
.tcard[aria-pressed="true"] .mini__check { display: grid !important; place-items: center; }
.mini__check svg { width: 14px; height: 14px; fill: none; stroke: #0a0a0b; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tcard__name { display: block; margin-top: 8px; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard__tag { display: block; margin-top: 1px; font-size: 12.5px; color: var(--fg-3); }

/* ─── своя тема ─── */
.tp-own { padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.tp-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 16px 0 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.tp-tabs button { min-height: 40px; border: 0; border-radius: 10px; background: none; color: var(--fg-2); font: 600 15px var(--font); cursor: pointer; }
.tp-tabs button[aria-selected="true"] { background: var(--acc); color: #fff; }
.tp-hint { margin: 0 0 14px; color: var(--fg-2); font-size: 14.5px; }
.tp-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.key { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 16px; background: var(--card-2);
  border: 1px solid var(--line); min-width: 0; text-align: center; }
.key__sw { position: relative; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 6px 16px -6px rgba(0, 0, 0, .7); overflow: hidden; }
.key__sw input { position: absolute; inset: -10px; width: 64px; height: 64px; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.key span { font-size: 12.5px; font-weight: 600; color: var(--fg-2); line-height: 1.2; }
.key input[type="text"], .row-c input[type="text"] { width: 100%; padding: 0; border: 0; background: none; color: var(--fg); font: 16px/1.2 var(--mono); text-align: center;
  text-transform: uppercase; letter-spacing: -.02em; }
.key input[type="text"] { font-size: 16px; transform: scale(.78); transform-origin: center; }
.key input[type="text"]:focus, .row-c input[type="text"]:focus { outline: none; color: var(--brand-2); }
[aria-invalid="true"] { color: #ff6b6b !important; }
.tp-sliders { display: grid; gap: 14px; margin: 18px 0 4px; }
.tp-sliders label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px; font-size: 14.5px; font-weight: 600; }
.tp-sliders output { font: 12px var(--mono); color: var(--fg-2); }
.tp-sliders input { grid-column: 1 / -1; width: 100%; accent-color: var(--acc); }
.tp-more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.tp-more summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; font-weight: 700; font-size: 15.5px; }
.tp-more summary::-webkit-details-marker { display: none; }
.tp-more summary span { color: var(--fg-3); font-weight: 400; font-size: 13.5px; }
.tp-more summary::after { content: "+"; margin-left: auto; font: 18px var(--mono); color: var(--fg-2); }
.tp-more[open] summary::after { content: "−"; }
.tp-list { display: grid; gap: 6px; margin-top: 12px; }
@media (min-width: 560px) { .tp-list { grid-template-columns: 1fr 1fr; } }
.row-c { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); min-width: 0; }
.row-c .key__sw { width: 30px; height: 30px; border-radius: 9px; }
.row-c div { flex: 1; min-width: 0; }
.row-c span { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-c input[type="text"] { text-align: left; font-size: 16px; transform: scale(.8); transform-origin: left center; width: 125%; color: var(--fg-2); }
.tp-read { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tp-read span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--card-2); border: 1px solid var(--line); color: var(--fg-2); }
.tp-read span i { width: 7px; height: 7px; border-radius: 50%; }
.tp-read .ok i { background: var(--ok); } .tp-read .weak i { background: #ffc850; } .tp-read .bad i { background: #ff6b6b; }
.tp-code { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: #08080a; color: var(--fg); font: 16px/1.45 var(--mono); resize: vertical; min-height: 120px; }
.tp-code:focus { outline: none; border-color: var(--brand); }
.tp-btns3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.tp-btns3 .btn { width: 100%; padding: 0 8px; font-size: 15px; min-width: 0; }
.tp-file { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tp-msg { margin: 10px 0 0; font-size: 14px; color: var(--fg-2); }
.tp-msg:empty { display: none; }
.tp-msg.is-ok { color: var(--ok); } .tp-msg.is-bad { color: #ff6b6b; }
.tp-json { margin: 12px 0 0; padding: 12px; max-height: 240px; overflow: auto; border-radius: 12px; background: #08080a; border: 1px solid var(--line);
  font: 11.5px/1.5 var(--mono); color: var(--fg-2); white-space: pre-wrap; word-break: break-all; user-select: all; -webkit-user-select: all; }
.tp-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.tp-actions button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2);
  color: var(--fg); font: 600 13px var(--font); cursor: pointer; }
.tp-actions button:hover { background: rgba(255, 255, 255, .07); }
.tp-actions svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── низ ─── */
.tp-foot { position: relative; z-index: 1; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; padding: 0 16px 32px; color: var(--fg-3); font-size: 13.5px; }
.tp-foot a { color: var(--fg-2); text-decoration: none; }
.tp-foot a:hover { color: var(--fg); }
@media (max-width: 979px) { .tp-foot { padding-bottom: 110px; } }

/* закреплённая кнопка на телефоне */
.tp-dock { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 10px; border-radius: 20px; background: rgba(18, 18, 22, .9); border: 1px solid var(--line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8); transform: translateY(140%); transition: transform .35s var(--ease); }
.tp-dock.is-on { transform: none; }
@media (min-width: 980px) { .tp-dock { display: none; } }
.tp-dock__sw { flex: none; width: 34px; height: 34px; border-radius: 11px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.tp-dock__name { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-dock .btn--sm { min-height: 42px; padding: 0 16px; }
.tp-toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 41; width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 12px 16px;
  border-radius: 14px; background: #f5f5f7; color: #0a0a0b; font-size: 14.5px; font-weight: 600; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .7);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.tp-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 980px) { .tp-toast { bottom: 28px; } }
@media (prefers-reduced-motion: reduce) { .phone.is-swap .phone__screen { animation: none; } }

/* компьютер: левая колонка плотнее, чтобы вместе с кнопкой помещалась по высоте окна */
@media (min-width: 980px) {
  .tp-head { margin-bottom: 14px; }
  .tp-lead { font-size: 14px; max-width: none; white-space: nowrap; }
  .tp-now { margin: 12px 0 10px; }
  .tp-steps li { flex-direction: row; justify-content: center; padding: 8px 6px; font-size: 12px; text-align: left; gap: 7px; }
  .tp-steps b { flex: none; width: 20px; height: 20px; font-size: 11px; }
}
