/* BeTitle / neutral charcoal. Shared controls and responsive application shell.
   Loaded after structural styles by the app and both public-page shells. */
:root {
  color-scheme: dark;
  --bg: #181818;
  --bg2: #1b1b1b;
  --surface: #202020;
  --surface2: #2b2b2b;
  --border: #323232;
  --hover: #303030;
  --text: #ededed;
  --muted: #aaa;
  --accent: #e75105;
  --accent2: #c94708;
  --accent-soft: rgba(231, 81, 5, .13);
  --accent-glow: rgba(231, 81, 5, .22);
  --silver: #b8b8b8;
  --silver-hi: #dedede;
  --silver-soft: rgba(255, 255, 255, .08);
  --glass: var(--surface);
  --glass-strong: var(--bg2);
  --glass-brd: var(--border);
  --glass-hi: var(--hover);
  --card: var(--surface);
  --warn: #efbc66;
  --ui-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ui-control: #2b2b2b;
  --ui-popover: #252525;
  --ui-border-strong: #444;
  --ui-field-border: #3a3a3a;
  --ui-subtle-surface: #272727;
  --ui-scrollbar-thumb: #626262;
  --ui-scrollbar-thumb-hover: #858585;
  --ui-focus: #ff9b69;
  --ui-danger: #ff8986;
  --ui-success: #82ceaa;
  /* Brand hue, darkened only behind small white action labels (AA contrast). */
  --ui-action: #c94708;
  --ui-action-hover: #cf4705;
  --ui-shadow-popover: 0 20px 60px -16px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .025);
  --r-xs: 8px;
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 26px;
  --r-pill: 999px;
  --shadow: 0 8px 32px -18px rgba(0, 0, 0, .7);
  --sheen: none;
  --ui-selected: #4b2b1c;
  --ui-selected-border: #90502c;
  --ui-selected-text: #ffd0b2;
  --ui-selected-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  --inset-hi: inset 0 1px 0 rgba(255, 255, 255, .025);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
}

/* Native form controls do not inherit body typography by default. */
button, input, select, textarea { font-family: var(--ui-font); }
.ic { width: 18px; height: 18px; }
.ic svg { width: 100%; height: 100%; }
* { scrollbar-color: var(--ui-scrollbar-thumb) transparent; }
@supports selector(::-webkit-scrollbar) {
  * { scrollbar-color: auto; scrollbar-width: auto; }
  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--ui-scrollbar-thumb); border: 2px solid transparent; background-clip: padding-box; border-radius: var(--r-pill); }
  ::-webkit-scrollbar-thumb:hover { background: var(--ui-scrollbar-thumb-hover); background-clip: padding-box; }
  ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
  ::-webkit-scrollbar-corner { background: transparent; }
}

/* Header geometry stays shared with shapka.css and the TEST wrapper. */
.bt-top {
  background: rgba(28, 28, 28, .96);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.bt-navbtn { border-radius: var(--r-pill); font-family: var(--ui-font); font-weight: 500; }
.bt-navbtn.on, .bt-navbtn[aria-current] {
  color: var(--ui-selected-text);
  background: var(--ui-selected);
  box-shadow: inset 0 0 0 1px var(--ui-selected-border), var(--ui-selected-shadow);
}
.bt-navbtn:hover:not(.on):not([aria-current]) { background: var(--hover); color: var(--text); }
.bt-projname { background: var(--bg2); border-color: var(--border); border-radius: var(--r-pill); }

/* Buttons retain their existing sizes, keyboard behavior and event handlers. */
.btn, .bt-knopka, .knopka {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--ui-font);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  transition: background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}
.btn:hover { transform: none; }
/* Provider marks are their own circular buttons, never padded generic tiles. */
.btn.bt-social {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}
.btn.bt-social.bt-ico-pad { background: #fff; }
.btn.bt-social svg { width: 54px; height: 54px; }
.btn.bt-social.bt-ico-pad svg { width: 34px; height: 34px; }
.btn.bt-social:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .32); }
.btn-primary, .btn-glavnyi, .bt-knopka, .knopka {
  background: var(--ui-selected);
  color: var(--ui-selected-text);
  border-color: var(--ui-selected-border);
  box-shadow: var(--ui-selected-shadow);
}
.btn-primary:hover:not(:disabled), .btn-glavnyi:hover:not(:disabled), .bt-knopka:hover, .knopka:hover {
  background: linear-gradient(rgba(231,81,5,.20),rgba(231,81,5,.20)), var(--ui-control);
  color: var(--text);
  border-color: var(--accent);
}
.btn-ghost {
  background: var(--ui-control);
  border-color: var(--ui-field-border);
  color: var(--silver-hi);
  box-shadow: none;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--hover);
  border-color: var(--ui-border-strong);
  color: var(--text);
}
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; line-height: 20px; }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 15px; }
.bt-top .bt-navbtn,
.bt-top > .btn,
.bt-top > .bt-pravo > .btn,
.bt-top > .bt-knopka {
  box-sizing: border-box;
  min-height: 34px;
  height: 34px;
  padding: 0 14px;
  gap: 8px;
  border-radius: var(--r-pill);
  font: 500 13px/18px var(--ui-font);
}
#expGo { min-height: 40px; gap: 8px; padding-inline: 18px; }
.btn-ghost.on, .bt-lang-pick .btn.on {
  background: var(--accent-soft);
  border-color: rgba(231, 81, 5, .5);
  color: var(--text);
}

/* Focus is separate from selection and remains visible over orange. */
:where(.btn, .bt-knopka, .knopka, .bt-navbtn, .bt-set-tab, .bt-tab, .bt-country-item,
  .bt-umenu-item, .bt-mode, .bt-sposob, .bt-card, .bt-new):focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: 3px;
}
:is(.bt-auth, .bt-set, .modal-dialog, .st-modal-box) :is(input:not([type=range]):not([type=color]):not([type=checkbox]):not([type=radio]), textarea):focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: 2px;
}
.bt-auth input:not([type=checkbox]), .bt-set .input, .bt-linkerr .input, .bt-sel {
  background: var(--ui-control);
  border-color: var(--ui-field-border);
  border-radius: var(--r-sm);
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
}
.bt-auth input::placeholder, .bt-set .input::placeholder, .bt-linkerr .input::placeholder { color: #85827f; }
.bt-auth input:hover, .bt-set .input:hover, .bt-linkerr .input:hover, .bt-sel:hover { border-color: var(--ui-border-strong); }

/* Dialog surfaces: same material for export, billing, help and confirmations. */
.card { background: var(--sheen), var(--surface); border-color: var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.modal-dialog, .st-modal-box, .tk-okno-karta {
  background: var(--ui-popover);
  border-color: var(--ui-border-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--ui-shadow-popover);
}
.modal-title { font-weight: 600; letter-spacing: -.025em; }
.st-modal-head { font-weight: 600; letter-spacing: -.02em; }
.modal-body { color: var(--muted); }
.bt-modal-exp, .bt-modal-exp > .st-modal-head, .bt-modal-exp > .bt-modal-foot { background: var(--ui-popover); }
.bt-modal-exp > .bt-modal-foot { border-top: 1px solid var(--border); }
.bt-mode { background: var(--bg2); border-color: var(--border); border-radius: var(--r-md); }
.bt-mode:hover:not(.off) { border-color: var(--ui-border-strong); background: var(--ui-control); }
.bt-mode.on { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.bt-mode b { font-weight: 600; }
.bt-mode small { line-height: 1.5; }
.bt-mode-fmt { border-radius: 4px; font-weight: 600; }
.bt-exp-warn { color: var(--muted); line-height: 1.6; }
.bt-exp-warn strong { color: var(--warn); }
.bt-exp-bar i { background: var(--accent); }
.bt-exp-pct { font-weight: 550; letter-spacing: -.05em; }
.bt-exp-title { font-weight: 600; }
.bt-exp-play { background: var(--accent); }
.bt-exp-play .ic { display: inline-flex; align-items: center; }
.bt-del .ic { display: inline-flex; }
.bt-pending-icon .ic { width: 32px; height: 32px; display: inline-flex; }
.bt-thumb .ph .ic { width: 32px; height: 32px; }

/* Projects and library: content first, quiet chrome. */
.bt-head h1, .bt-head .bt-head-title { font-weight: 600; letter-spacing: -.035em; }
.bt-card { background: var(--surface); border-color: var(--border); border-radius: var(--r-md); }
.bt-card:hover { transform: none; border-color: var(--ui-border-strong); box-shadow: 0 8px 24px -14px #000; }
.bt-card.sel { border-color: var(--accent); }
.bt-cbody { border-top: 1px solid var(--border); }
.bt-cname { font-weight: 500; }
.bt-cmeta { color: var(--muted); }
.bt-chip { border: 1px solid rgba(255, 255, 255, .12); border-radius: 5px; }
.bt-new { appearance: none; box-sizing: border-box; padding: 0; gap: 0; aspect-ratio: auto; align-self: stretch; align-items: stretch; justify-content: flex-start; overflow: hidden; text-align: left; border: 1px dashed var(--ui-border-strong); border-radius: var(--r-md); background: var(--surface); font-family: var(--ui-font); }
.bt-new .bt-thumb { flex: none; width: 100%; background: transparent; }
.bt-new .bt-cbody { display: block; width: 100%; }
.bt-new .bt-cname { display: block; font-size: 13px; font-weight: 500; }
.bt-new .bt-cmeta { display: block; font-size: 11px; font-weight: 400; }
.bt-new:hover { transform: none; border-color: var(--accent); background: var(--accent-soft); }
.bt-new .plus { color: var(--text); }
.bt-vid { border-radius: var(--r-sm); }
.bt-vid:hover { transform: none; }
.bt-vid.sel { box-shadow: 0 0 0 1px var(--accent); }
.bt-empty { color: var(--muted); }

/* Account, onboarding, security, storage and every billing sub-panel. */
.bt-tab { background: transparent; border-color: transparent; border-radius: var(--r-sm); color: var(--muted); }
.bt-tab.on { background: var(--ui-selected); color: var(--ui-selected-text); box-shadow: inset 0 0 0 1px var(--ui-selected-border), var(--ui-selected-shadow); }
.bt-auth .card { border-color: var(--border); box-shadow: 0 12px 48px -28px #000; }
.bt-auth .lead { color: var(--muted); }
.bt-set-card { background: var(--surface); border-color: var(--border); border-radius: var(--r-lg); box-shadow: none; padding: 24px; margin-bottom: 18px; }
.bt-set-card > .bt-sect { margin-bottom: 16px; }
.bt-set-card > .bt-note { margin-bottom: 16px; }
.bt-set-card > .bt-slovar-kak { padding-left: 20px; display: grid; gap: 6px; margin-bottom: 10px; }
.bt-slovar-kak b { color: var(--text); font-weight: 600; }
.bt-set-tab { border-radius: var(--r-sm); }
.bt-set-tab.on { color: var(--ui-selected-text); border-color: var(--ui-selected-border); background: var(--ui-selected); box-shadow: var(--ui-selected-shadow); }
.bt-set-label, .bt-sect { color: var(--muted); font-weight: 500; letter-spacing: .025em; }
.bt-method { background: var(--ui-subtle-surface); border-color: rgba(255,255,255,.08); border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 10px; min-height: 58px; }
.bt-method > span { min-width: 0; overflow-wrap: anywhere; line-height: 20px; }
.bt-method b { font-weight: 500; }
.bt-method > .btn { flex-shrink: 0; }
.bt-method-btns { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.bt-method-state { font-size: 13px; color: var(--muted); }
.bt-umenu, .bt-country-list { background: var(--ui-popover); border-color: var(--ui-border-strong); box-shadow: var(--ui-shadow-popover); }
.bt-umenu { box-sizing: border-box; width: 320px; min-width: 0; max-width: calc(100vw - 24px); padding: 8px; border-radius: var(--r-lg); }
.bt-umenu-head { padding: 8px 12px 14px; margin-bottom: 8px; }
.bt-umenu-head b { font-size: 14px; line-height: 20px; font-weight: 600; }
.bt-umenu-head small { font-size: 12px; line-height: 18px; margin-top: 3px; }
.bt-umenu-item { box-sizing: border-box; width: 100%; min-height: 40px; padding: 10px 12px; border-radius: 12px; font: 400 13px/20px var(--ui-font); }
.bt-umenu-sep { margin: 6px 12px; }
.bt-umenu::-webkit-scrollbar-track:vertical { margin-top: var(--r-lg); margin-bottom: var(--r-lg); }
.bt-umenu-item:hover { background: var(--hover); color: var(--text); }
.bt-umenu-tok { margin: 0 0 8px; padding: 12px; gap: 10px; background: var(--ui-subtle-surface); border-color: rgba(255,255,255,.08); border-radius: var(--r-sm); }
.bt-umenu-tok-zag { font-size: 13px; line-height: 20px; font-weight: 500; }
.bt-umenu-tok-zag b { font-size: 13px; font-weight: 600; }
.bt-umenu-tok-zag > span:last-child { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.bt-umenu-tok .bt-tok-polosa { height: 4px; border-radius: var(--r-pill); }
.bt-umenu-tok-plan { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; font-size: 12px; line-height: 18px; }
.bt-umenu-tok-plan > span { white-space: normal; overflow: visible; }
.bt-umenu-tok-plan b { font-weight: 500; }
.bt-umenu-tok-kupit { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 5px 10px; background: var(--ui-selected); color: var(--ui-selected-text); border: 1px solid var(--ui-selected-border); border-radius: var(--r-pill); font: 500 12px/20px var(--ui-font); }
.bt-umenu-tok-kupit:hover { filter: none; background: var(--accent-soft); color: var(--text); }
.bt-ava { background: #292320; color: #ffab80; box-shadow: inset 0 0 0 1px rgba(231, 81, 5, .25); }
.bt-ava:hover { transform: none; box-shadow: inset 0 0 0 1px var(--accent); }
.bt-user > .bt-ava-kolco {
  left: 50%; top: 50%; width: calc(100% + 8px); height: calc(100% + 8px);
  transform: translate(-50%, -50%) rotate(-90deg);
}
.bt-tarif, .bt-oplata-tovar { background: var(--bg2); border-radius: var(--r-md); border-color: var(--border); }
.bt-tarif.tek { border-color: var(--accent); background: var(--accent-soft); }
.bt-tarif .cena { font-weight: 600; letter-spacing: -.025em; }
.bt-sposob { border-radius: var(--r-md); background: var(--bg2); }
.bt-sposob:hover { transform: none; background: var(--ui-control); border-color: var(--ui-border-strong); }
.bt-sposob i { background: var(--surface2); border-radius: 8px; }
.bt-blog { border-bottom-color: var(--border); }
.bt-blog .plus { color: var(--ui-success); }
.bt-docs-list a { color: var(--text); transition: color .14s; }
.bt-docs-list a:hover { color: #ffab80; }
.bt-help-mail { line-height: 1.5; }
.bt-toast { background: var(--ui-popover); border-color: var(--ui-border-strong); border-radius: var(--r-md); box-shadow: var(--ui-shadow-popover); }
.bt-msg { border-radius: var(--r-sm); }

@media (max-width: 760px) {
  .bt-set-card { padding: 18px; }
  .bt-profile-info { min-width: 0; width: 100%; }
  .bt-umenu { max-height: calc(100dvh - 96px); overflow-y: auto; }
  .bt-umenu-langs { position: static; min-width: 0; width: 100%; max-width: 100%; margin-block: 6px; }
}

@media (max-width: 560px) {
  .bt-top .bt-navbtn, .bt-top > .btn, .bt-top > .bt-pravo > .btn, .bt-top > .bt-knopka {
    min-height: 44px;
    height: 44px;
  }
}

/* Reduced motion affects interface transitions, never the subtitle frame. */
@media (prefers-reduced-motion: reduce) {
  .btn, .bt-navbtn, .bt-card, .bt-new, .bt-sposob, .bt-set-tab, .bt-vid { transition: none; }
  .modal-dialog { animation: none; }
}

/* Responsive product shell. Keep controls usable at narrow layout viewports
   (including browser zoom) without changing subtitle coordinates. */
.bt-top > *, .bt-set-body, .bt-set-card, .bt-name-view { min-width: 0; }
.bt-top .bt-logo { flex-shrink: 0; }
.bt-auth > .bt-logo.big { width: min(315px, 100%); height: auto; }
.bt-toast { max-width: calc(100vw - 32px); overflow-wrap: anywhere; }
.modal-dialog, .st-modal-box, .tk-okno-karta, .st-pokaz {
  max-height: calc(var(--ui-viewport-height, 100dvh) - 48px);
  overscroll-behavior: contain;
}
.tk-okno-karta { overflow-y: auto; }
.tk-okno-karta > * { flex-shrink: 0; }
.tk-okno-zag { position: sticky; top: -22px; z-index: 2; background: var(--ui-popover); }
.tk-okno-zag button { min-width: 40px; min-height: 40px; border-radius: var(--r-sm); }
.modal, .st-modal, .tk-okno, .st-pokaz-fon {
  top: var(--ui-viewport-top, 0px);
  left: var(--ui-viewport-left, 0px);
  right: auto;
  bottom: auto;
  width: var(--ui-viewport-width, 100%);
  height: var(--ui-viewport-height, 100dvh);
  padding: 24px 12px;
  box-sizing: border-box;
}
#expDlgBg { padding: 24px 12px; }
.ui-menu-toggle { display: none; }
.ui-account-sections { display: none; }
.bt-exp-stage { --ui-export-full-width: 0; }
@media (max-width: 900px) {
  .bt-exp-stage { --ui-export-full-width: 1; }
}
.ui-menu-mark { width: 18px; height: 14px; display: grid; align-content: space-between; }
.ui-menu-mark::before, .ui-menu-mark::after, .ui-menu-mark > span {
  content: ''; height: 2px; border-radius: 2px; background: currentColor;
}

@media (max-width: 1024px) {
  .bt-top.ui-nav-ready { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .bt-top.ui-nav-ready > .bt-logo, .bt-top.ui-nav-ready > a:has(.bt-logo) { margin-right: auto; }
  .bt-top.ui-nav-ready .bt-logo { height: clamp(30px, 8vw, 38px); }
  .bt-top.ui-nav-ready > .bt-spacer { display: none; }
  .bt-top.ui-nav-ready > .btn-primary, .bt-top.ui-nav-ready > .bt-knopka, .bt-top.ui-nav-ready > .bt-pravo { flex-shrink: 0; }
  .bt-top.ui-nav-ready > .ui-menu-toggle,
  #viewLanding .bt-top.ui-nav-ready > .ui-menu-toggle {
    display: inline-flex; width: 44px; min-width: 44px; height: 44px; padding: 0;
  }
  .bt-top.ui-nav-ready > .bt-nav, #viewLanding .bt-top.ui-nav-ready > .bt-nav { display: none; }
  .bt-top.ui-nav-open > .bt-nav, #viewLanding .bt-top.ui-nav-open > .bt-nav {
    display: flex; position: absolute; left: 12px; right: 12px; top: calc(100% + 4px);
    flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--ui-border-strong);
    border-radius: var(--r-md); background: var(--ui-popover); box-shadow: var(--ui-shadow-popover);
    max-height: calc(var(--ui-viewport-height, 100dvh) - var(--ui-header-bottom, 80px) - 12px);
    overflow: auto; overscroll-behavior: contain; box-sizing: border-box;
  }
  .bt-top.ui-nav-ready .bt-nav > .bt-navbtn { min-height: 44px; flex: none; width: 100%; }
  .bt-top.ui-nav-ready .bt-nav > .btn-ghost,
  #viewLanding .bt-top.ui-nav-ready .bt-nav .btn-ghost { display: inline-flex; min-height: 44px; }
  .bt-top.ui-nav-ready .bt-nav > .bt-l-lang { width: 100%; }
  .bt-top.ui-nav-ready .bt-l-langbtn { width: 100%; justify-content: flex-start; }
  .bt-top.ui-nav-ready .bt-l-langs { position: static; width: 100%; margin-top: 8px; }
  .bt-top.ui-nav-ready .bt-nav > .bt-projname { max-width: none; width: 100%; white-space: normal; overflow-wrap: anywhere; padding: 10px 12px; }
  #viewApp > .bt-top.ui-nav-ready { flex-wrap: nowrap; }
  #viewApp > .bt-top.ui-nav-ready > .ui-app-mark { width: 32px; height: 32px; object-fit: contain; }
  #viewApp > .bt-top.ui-nav-ready > .ui-project-link { margin-inline: auto; min-width: 0; padding-inline: 10px; white-space: nowrap; }
  /* The burger follows the avatar: offset its existing popover to the page edge. */
  .bt-top.ui-nav-ready .bt-umenu { right: -52px; top: calc(100% + 14px); width: calc(100vw - 24px); min-width: 0; max-width: none; max-height: calc(var(--ui-viewport-height, 100dvh) - var(--ui-header-bottom, 94px) - 12px); }
}
.st-modal-head { gap: 8px; }
.st-modal-head > button, .st-modal-head > label.btn { flex-shrink: 0; }
#st-font-modal .st-modal-box { display: flex; flex-direction: column; overflow: hidden; }
#st-font-modal .st-modal-head, #st-font-search, .st-font-zhanry { flex-shrink: 0; }
#st-font-search { flex: 0 0 40px; }
#st-font-list { min-height: 0; max-height: none; flex: 1 1 auto; }
.ui-font-search-row { display: contents; }
.ui-font-genre { display: none; }
#st-font-modal .st-modal-head { flex-wrap: nowrap; }

@media (max-width: 600px) {
  .bt-page { padding: 16px 12px 40px; }
  #viewSettings :is(.bt-set, .bt-set-body, .bt-set-pane, .bt-set-card) { width: 100%; max-width: none; }
  #viewApp > .bt-top.ui-nav-ready { flex-wrap: nowrap; }
  #viewApp > .bt-top.ui-nav-ready > .bt-user { flex: 0 0 auto; margin-left: 0; }
  #setNav { display: none; }
  .ui-account-sections { display: block; width: 100%; min-height: 44px; }
  .bt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .bt-card .bt-del { display: inline-flex; width: 40px; height: 40px; }
  .bt-profile { flex-direction: column; gap: 20px; }
  .bt-profile-ava { min-width: 0; align-self: flex-start; }
  .bt-profile-info { flex: none; width: 100%; }
  .bt-name-view { flex-wrap: wrap; }
  .bt-name-text { overflow-wrap: normal; }
  .bt-name-view > .btn { flex-shrink: 0; }
  .bt-set .btn { min-height: 44px; }
  .bt-plan { flex-direction: column; align-items: stretch; }
  .bt-plan > .btn { width: 100%; }
  .bt-row .input { min-width: 0; flex-basis: 100%; width: 100%; max-width: 100%; }
  .bt-help-mail { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bt-help-mail .btn { justify-self: start; }
  .bt-help-mail small, .bt-docs-seller { overflow-wrap: anywhere; }
  .bt-auth { padding: 32px 16px; }
  .bt-auth .card { padding: 20px; }
  .bt-modal-exp > .bt-modal-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
  .bt-modal-exp > .bt-modal-foot > .bt-exp-cena { grid-column: 1 / -1; }
  .bt-modal-exp > .bt-modal-foot > .btn { min-width: 0; padding-inline: 8px; gap: 6px; font-size: 13px; white-space: nowrap; }
  .bt-oplata-tovar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .bt-oplata-tovar > div:not(.cena) { display: contents; }
  .bt-oplata-tovar > div > b { grid-column: 1; grid-row: 1; }
  .bt-oplata-tovar > div > span { grid-column: 1 / -1; grid-row: 2; }
  .bt-oplata-tovar > .cena { grid-column: 2; grid-row: 1; }
  .bt-sposob { display: grid; gap: 8px; padding: 12px; }
  .bt-sposob > i { width: 30px; height: 30px; }
  .bt-sposob > span { min-width: 0; }
  .bt-sposob b { font-size: 13px; }
  .bt-soc-row { gap: 8px; flex-wrap: wrap; }
  .btn.bt-social { --provider-size: clamp(44px, 13vw, 54px); width: var(--provider-size); height: var(--provider-size); min-height: var(--provider-size); }
  .btn.bt-social svg { width: var(--provider-size); height: var(--provider-size); }
  .btn.bt-social.bt-ico-pad svg { width: calc(var(--provider-size) * .63); height: calc(var(--provider-size) * .63); }
  .bt-cap { flex-wrap: wrap; }
  .bt-cap input { min-width: 0; flex: 1 1 100px; }
  .bt-cap img { max-width: 100%; }
  :is(.bt-auth, .bt-set, .modal-dialog) input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
  :is(.bt-auth, .bt-set, .modal-dialog) textarea,
  .bt-sel,
  :is(.st-modal-box, .st-wordpop, .st-settings-menu) input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]) { font-size: 16px; }
  .st-modal-head { flex-wrap: wrap; }
  .st-modal-head > label.btn { flex-basis: 100%; order: 2; margin-left: 0 !important; }
  .st-modal-head > button[onclick^="close"] { margin-left: auto; }
  .st-font-zhanr { min-height: 36px; }
  .bt-legal, .bt-docs-list { overflow-wrap: anywhere; }
}

@media (max-width: 760px) {
  .bt-set-body { width: 100%; }
}

@media (max-width: 560px) {
  #btnExport { width: 44px; min-width: 44px; padding: 0; gap: 0; }
  #btnExport > span:not(.ic) { display: none; }
  #btnExport > .ic { width: 18px; height: 18px; }
  .bt-toast { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); }
}

@media (max-height: 480px) {
  .bt-top { position: relative; top: auto; }
  /* A relative header is already in normal flow; a sticky offset adds a gap. */
  body .bt-top { top: 0 !important; }
  .bt-umenu { max-height: calc(var(--ui-viewport-height, 100dvh) - var(--ui-header-bottom, 94px) - 12px); overflow-y: auto; }
  .bt-umenu-langs { position: static; width: 100%; min-width: 0; }
  /* Keep the settings reachable when the sticky header and footer would meet. */
  .bt-modal-exp > .bt-modal-foot { position: static; }
  .modal-dialog, .st-modal-box { max-height: calc(var(--ui-viewport-height, 100dvh) - 48px); }
  .st-modal-box, .modal-dialog:not(.bt-modal-exp) { padding: 14px; }
  #st-font-modal .st-modal-box { height: calc(var(--ui-viewport-height, 100dvh) - 48px); padding: 8px; overflow: hidden; }
  #st-font-modal .st-modal-head { min-height: 36px; margin-bottom: 6px; }
  #st-font-modal .st-modal-head > button { min-height: 36px; }
  #st-font-modal .st-font-zhanry { display: none; }
  .ui-font-search-row { display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 6px; flex: 0 0 40px; margin-bottom: 6px; }
  .ui-font-search-row #st-font-search { min-width: 0; margin-bottom: 0 !important; }
  .ui-font-genre { display: block; min-width: 0; width: 100%; padding-inline: 6px; font-size: 12px; }
  #st-font-list { min-height: 44px; flex: 1 1 auto; max-height: none; }
}

/* ── наши соцсети в меню профиля и чат поддержки в «Помощи» (владелец, 10.11) ──
   Тот же язык, что кнопки входа: фирменный круг и есть кнопка, только меньше — под пункты меню.
   На российской стороне Instagram — словом в пилюле и с оговоркой, без знака Meta. */
.bt-umenu-soc { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 10px; padding: 6px 12px 10px; }
.bt-soc-ico { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
              transition: transform .12s, box-shadow .12s; text-decoration: none; }
.bt-soc-ico svg { width: 100%; height: 100%; display: block; }
.bt-soc-ico:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.bt-soc-ico:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bt-soc-tekst { display: none; }
.bt-soc-ico.bt-soc-slovom { width: auto; padding: 0 12px; border-radius: var(--r-pill, 999px); background: var(--ui-subtle-surface);
                            border: 1px solid var(--ui-border-strong, var(--border)); color: var(--text); font: 500 12px/18px var(--ui-font); }
.bt-soc-ico.bt-soc-slovom .bt-soc-znak { display: none; }
.bt-soc-ico.bt-soc-slovom .bt-soc-tekst { display: inline; }
.bt-soc-ogovorka { flex-basis: 100%; text-align: left; font-size: 11px; line-height: 15px; color: var(--muted); }
.bt-help-tg { margin: 12px 0 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.bt-help-tg-btn { display: inline-flex; align-items: center; gap: 8px; }
.bt-help-tg-btn svg { width: 18px; height: 18px; flex: none; }

/* ── подсказка об опечатке в почте (gmail.con → gmail.com), 10.11 ── */
.bt-opechatka { margin: 6px 0 10px; font-size: 13px; line-height: 18px; color: var(--muted); }
.bt-opechatka-fix { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--accent);
                    cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; word-break: break-all; }
.bt-opechatka-fix:hover { text-decoration-style: solid; }
