/* mobile.css — phone layout & UX pass (audit 2026-10-08). Loaded last.
   Desktop (>760px): only neutralises the new phone-only helpers so the desktop look is unchanged. */

/* ---------- desktop / shared: phone-only helpers are invisible ---------- */
.fsheet, .fsheet-panel { display: contents; }
.fsheet-back, .fsheet-head, .fsheet-foot, .fsheet-open,
.mswitch-sel, .mp-more-btn, .gsub-gift, .gopt-row, .email-line, .pay-via, .recent-strip, .pt-ico { display: none; }
.cat-mseg { display: flex; width: max-content; max-width: 100%; margin: 0 0 12px; }
.fsheet-dot[hidden] { display: none !important; }

@media (max-width: 760px) {
  /* ---------- 4. form controls: 16px = no iOS zoom on focus ---------- */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
  select, textarea { font-size: 16px !important; }

  /* ---------- chrome: top bar, tab bar, keyboard ---------- */
  .topbar { padding-top: 6px; padding-bottom: 6px; }
  .topbar .balance-pill { min-height: 44px; }
  .tabbar a, .tabbar button { font-size: 11.5px; min-height: 48px; justify-content: center; }
  html.kb-open .tabbar { display: none !important; }
  html.kb-open body.has-tabbar { padding-bottom: 0 !important; }
  /* guests on a studio page: one clear sign-in CTA (the create button), the tab is plain */
  body:has(a.gen-btn[href^="/login"]) .tabbar a.tab-cta { background: none; color: var(--text-dim); }
  .mob-hide { display: none; }

  /* ---------- small text ≥12px ---------- */
  .mc-badge, .mc-vendor, .tag, .soon-pill, .disc-tag, .mp-cat, .state { font-size: 12px; }
  .model-card .price small, .mc-foot small, .price small.muted, .rdd small, .seg-btn small { font-size: 12px; }

  /* ---------- generic tap targets ---------- */
  .btn-xs, .btn-sm { min-height: 44px; }
  main details > summary { min-height: 44px; display: flex; align-items: center; }
  /* /login: the flex summary above drops the native ▸ marker, so «Другие способы» (GitHub, email) looked like plain text.
     Make it an obvious full-width toggle with a chevron. */
  .login-more > summary { justify-content: center; gap: 10px; min-height: 48px; margin: 2px 0 14px; padding: 0 16px; list-style: none; cursor: pointer;
    border: 1px solid var(--border); border-radius: 14px; color: var(--text); font-weight: 700; }
  .login-more > summary::-webkit-details-marker { display: none; }
  .login-more > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; transition: transform .2s; flex: none; }
  .login-more[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
  .tg-fallback > summary { justify-content: center; text-align: center; }
  .faq summary { min-height: 48px; }
  summary.pcard-h { min-height: 44px; align-items: center; }
  .pager a, .pager button, .pager-size select { min-height: 44px; min-width: 44px; }
  .tip {
    width: 44px; height: 44px; margin: -13px -10px -13px -8px; border: 0; flex: none;
    background: radial-gradient(circle, var(--surface-3, #ececf1) 0 9.5px, var(--border) 10px 11px, transparent 11.5px);
  }

  /* ---------- 1. /models: no horizontal overflow ---------- */
  .vendor-filters, .vendor-filters .chip-row { min-width: 0; max-width: 100%; }
  .vendor-filters .chip-label { width: auto; flex: none; }
  .vendor-filters .chip-row .fchip, .picker .fchip, .fchip { min-height: 44px; }
  .market-filters .filters-2 { flex-wrap: wrap; gap: 10px; align-items: center; }
  .market-filters .filters-2 .search { flex: 1 1 0; min-width: 0; }
  .market-filters .filters-2 .vendor-filters { flex: 1 1 100%; }

  /* ---------- 9. /models: «Фильтры» bottom sheet, compare as a 44px icon ---------- */
  .fsheet-open {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
    min-height: 44px; padding: 0 14px; position: relative; font-weight: 800;
  }
  .fsheet-open svg { width: 18px; height: 18px; }
  .fsheet-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #6c47ff); }
  .fsheet { position: fixed; inset: 0; z-index: 140; display: none; }
  .fsheet.open { display: block; }
  .wrap:has(.fsheet.open), main:has(.fsheet.open) > * { z-index: 150 !important; }
  .fsheet-back { display: block; position: absolute; inset: 0; background: rgba(8, 6, 20, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
  .fsheet-panel {
    display: flex; flex-direction: column; gap: 14px; position: absolute; left: 0; right: 0; bottom: 0;
    max-height: 85vh; max-height: 85dvh; overflow: auto; overscroll-behavior: contain;
    background: var(--surface); color: var(--text); border-radius: 22px 22px 0 0; border-top: 1px solid var(--border);
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -18px 50px rgba(0, 0, 0, .28);
    animation: fsheet-up .22s cubic-bezier(.2, .8, .2, 1); transition: transform .2s ease;
  }
  .fsheet.closing .fsheet-panel { transform: translateY(105%); }
  @keyframes fsheet-up { from { transform: translateY(100%); } to { transform: none; } }
  .fsheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; order: -10; }
  .fsheet-head b { font-size: 1.1em; }
  .fsheet-foot { display: block; position: sticky; bottom: calc(-14px - env(safe-area-inset-bottom)); margin: 0 -16px calc(-14px - env(safe-area-inset-bottom)); padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--surface); order: 10; }
  .fsheet-foot .btn { width: 100%; min-height: 48px; }
  html.msheet-open, html.msheet-open body { overflow: hidden; }
  .fsheet .cat-mseg { order: -5; display: flex; width: 100%; margin: 0; }
  .fsheet .cat-mseg .mseg-i { flex: 1 1 0; justify-content: center; min-height: 44px; padding: 0 6px; }
  .fsheet .picker { margin: 0; }
  .fsheet .sort-row { margin: 0; flex-wrap: wrap; gap: 8px; }
  .fsheet .sort-row label, .fsheet .sort-row select { width: 100%; min-width: 0; }
  .fsheet .sort-row select { min-height: 44px; }
  .fsheet .row { flex-wrap: wrap; gap: 10px; }
  .fsheet .row > label, .fsheet .row .field { flex: 1 1 100%; margin: 0; }
  .fsheet .row select { width: 100%; min-height: 44px; }
  .fsheet .row .btn { flex: 1 1 100%; min-height: 48px; }
  .mseg-i { min-height: 44px; }
  .sort-row select { min-height: 44px; }

  .model-card .mc-body { position: relative; }
  .model-card .mc-cmp {
    position: absolute; float: none; top: 6px; right: 6px; z-index: 3; margin: 0; padding: 0;
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; line-height: 1;
  }
  .model-card .mc-body:has(.mc-cmp) h3 { padding-right: 46px; }

  /* ---------- 2/3. studio: compact model row, form first ---------- */
  .mp-top { flex-wrap: nowrap; align-items: center; gap: 10px; padding-top: 8px; }
  .mp-top .mp-back { flex: none; min-height: 44px; display: inline-flex; align-items: center; font-size: .86em; white-space: nowrap; }
  .mp-top .mswitch { flex: 1 1 auto; flex-basis: auto; min-width: 0; padding-top: 0; }
  .mswitch .mseg, .mswitch .mchips { display: none; }
  .mswitch-sel { display: block; width: 100%; }
  .mswitch-sel select { width: 100%; min-height: 44px; font-weight: 700; border-radius: 12px; padding-top: 8px; padding-bottom: 8px; text-overflow: ellipsis; }
  .mp-hero { margin-top: 8px; }
  .mp-intro { padding: 14px 16px; }
  .mp-intro h1 { font-size: 1.35em; margin-bottom: 4px; }
  .mp-intro:not(.open) .mp-kicker, .mp-intro:not(.open) .mp-good, .mp-intro:not(.open) .mp-tags, .mp-intro:not(.open) .mp-rate { display: none; }
  .mp-intro:not(.open) .mp-desc { -webkit-line-clamp: 1; line-clamp: 1; margin-bottom: 0; }
  .mp-more-btn {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: .9em; font-weight: 800; color: var(--accent-ink, var(--violet));
  }
  .mp-actions { align-items: center; gap: 4px 12px; margin-top: 0; }
  .mp-devlink { min-height: 44px; display: inline-flex; align-items: center; flex-basis: auto; }
  .mp-jump { position: static !important; top: auto; margin-top: 10px; margin-bottom: 10px; }
  .mp-jump a { min-height: 44px; }
  .mp-modes { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 10px 0; }
  .mp-modes .mode-card { display: flex; min-height: 52px; padding: 6px 10px; gap: 8px; flex-direction: row; justify-content: center; align-items: center; text-align: left; }
  .mp-modes .mode-card small { display: none; }
  .mp-modes .mode-ic { width: 32px; height: 32px; border-radius: 10px; margin: 0; }
  .mp-modes .mode-ic .ico { width: 18px; height: 18px; }
  .mp-modes .mode-tx { min-width: 0; }
  .mp-modes .mode-tx b { font-size: .9em; line-height: 1.15; }
  .gen-form > .mp-ph { display: none; }
  .mp-step { padding-top: 12px; padding-bottom: 12px; }
  .mp-sh { margin-bottom: 8px; }
  .to-form, .grecent-head a, .mp-similar a.more, .mp-back { min-height: 44px; display: inline-flex; align-items: center; }
  .gex-row .btn { min-height: 44px; }

  /* prompt tools: 44px, 8px gaps, «Очистить» set apart (icon, undo toast) */
  .prompt-tools { flex-wrap: nowrap; gap: 8px; }
  .prompt-tools .btn { min-height: 44px; flex: 1 1 0; min-width: 0; padding: 0 8px; font-size: .84em; white-space: nowrap; }
  .prompt-tools .pt-clear { flex: none; width: 44px; padding: 0; margin-left: 10px; position: relative; color: var(--text-dim); }
  .prompt-tools .pt-clear::before { content: ''; position: absolute; left: -10px; top: 10px; bottom: 10px; width: 1px; background: var(--border); }
  .prompt-tools .pt-clear .pt-l { display: none; }
  .prompt-tools .pt-clear .pt-ico { display: block; }

  /* segmented / thumbnail controls */
  .seg-ctl { gap: 8px; }
  .seg-btn { min-height: 44px; }
  .gthumbs { gap: 10px; }
  .gthumbs .thumb > button:not(.thumb-first), .thumb > button:not(.thumb-first) {
    width: 44px; height: 44px; top: 0; right: 0; border-radius: 0 0 0 14px; font-size: 18px; line-height: 44px;
    background: radial-gradient(circle, rgba(0, 0, 0, .68) 0 13px, transparent 13.5px); color: #fff; border: 0;
  }
  .gthumbs .thumb > button.thumb-first, .thumb > button.thumb-first {
    width: 44px; height: 44px; left: 0; bottom: 0; font-size: 15px;
    background: radial-gradient(circle, rgba(0, 0, 0, .68) 0 13px, transparent 13.5px); color: #fff; border: 0;
  }

  /* ---------- sticky create block: just the button (≤56px) ---------- */
  .mp-panel .gsubmit {
    bottom: calc(60px + env(safe-area-inset-bottom)) !important;
    padding: 6px 16px; margin-left: -16px; margin-right: -16px; margin-top: 8px;
    background: var(--surface); border-top: 1px solid var(--border); border-radius: 0;
  }
  html.kb-open .mp-panel .gsubmit { bottom: 0 !important; }
  .mp .gen-btn { min-height: 52px; max-height: 56px; padding: 0 14px; gap: 8px; white-space: nowrap; overflow: hidden; font-size: 1em; }
  .mp .gen-btn .gen-price { white-space: nowrap; }
  .mp .gen-btn .gen-disc, .mp .gen-btn .gen-gift { display: none; }
  .gsub-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: .88em; }
  .gsub-meta:empty { display: none; }
  .gsub-meta .gsub-gift { display: flex; }
  .gsub-meta > * { margin: 0; }

  /* ---------- 7. uploads: compact 64px rows, optional zones on demand ---------- */
  .mp .mp-drop.gdrop {
    min-height: 64px; display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-auto-rows: auto;
    column-gap: 10px; row-gap: 0; align-items: center; justify-items: start; text-align: left; padding: 10px 12px;
  }
  .mp .mp-drop.gdrop .gdrop-ico { grid-row: 1 / span 2; width: 38px; height: 38px; margin: 0; }
  .mp .mp-drop.gdrop .gdrop-title { font-size: 14px; margin: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mp .mp-drop.gdrop .gdrop-sub { font-size: 12px; margin: 0; }
  .mp .mp-drop.gdrop.full { display: none; }
  .opt-zone:not(.opt-open) { display: none !important; }
  .gopt-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .gopt-row[hidden] { display: none; }
  .gopt-add {
    min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px dashed var(--border); background: var(--surface);
    color: var(--text); font: inherit; font-size: .9em; font-weight: 800; cursor: pointer;
  }
  .gopt-add:hover { border-color: var(--accent-line, var(--violet)); }
  .mp-step.is-locked .gdrop, .mp-step.is-locked .gzone-title, .mp-step.is-locked .gframes, .mp-step.is-locked .gopt-row { display: none; }

  /* ---------- 6. «Генерации» ---------- */
  /* one compact card per generation: thumbnail · model · date · source · status · price · copy buttons · «Открыть» */
  table.works-table.stack tr {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; align-items: center; padding: 12px;
    grid-template-areas: "pic model fav" "pic time src" "pic st cost" "cp cp act";
  }
  table.works-table.stack td { display: block; width: auto; min-width: 0; padding: 0; text-align: left; }
  table.works-table.stack td[data-l]::before { content: none; display: none; }
  table.works-table.stack td.c-pic { grid-area: pic; align-self: start; }
  table.works-table.stack td.c-model { grid-area: model; font-weight: 800; }
  table.works-table.stack td.c-model .clip { display: block; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
  table.works-table.stack td.c-time { grid-area: time; font-size: 13px; color: var(--text-dim); }
  table.works-table.stack td.c-src { grid-area: src; font-size: 13px; color: var(--text-dim); text-align: right; max-width: 140px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  table.works-table.stack td.c-cost { grid-area: cost; text-align: right; }
  table.works-table.stack td.c-dur { display: none; }
  table.works-table.stack td.cell-fav { grid-area: fav; justify-self: end; }
  table.works-table.stack td.cell-st { display: contents; }
  table.works-table.stack td.cell-st > .stpop { grid-area: st; justify-self: start; }
  table.works-table.stack td.cell-st > .qcopies { grid-area: cp; display: flex; gap: 8px; margin: 4px 0 0; }
  table.works-table.stack td.cell-act { grid-area: act; display: block; justify-self: end; margin-top: 4px; }
  table.works-table.stack td.cell-act .btn { padding-left: 14px; padding-right: 14px; }
  table.works-table.stack td.c-user, table.works-table.stack td.c-prompt { grid-column: 1 / -1; }
  table.works-table .thumb-sm { width: 64px; height: 64px; border-radius: 12px; }
  table.works-table .thumb-vid, table.works-table td.c-pic > a { display: block; width: 64px; height: 64px; }
  .fav-star { width: 44px; height: 44px; }
  .filters-chips { gap: 8px; }
  .works-table .cell-act .btn { min-height: 44px; }
  .stpop-btn { min-height: 44px; display: inline-flex !important; align-items: center; }
  .cell-st .qcopies, .qcopies { gap: 8px; margin-left: 8px; }

  /* ---------- 10. cabinet ---------- */
  .cab > .side { display: none; }
  .cab > section:has(> .cont-box) { display: flex; flex-direction: column; }
  .cab > section:has(> .cont-box) > * { margin-top: 0; }
  .cab > section:has(> .cont-box) > .page-head { order: -3; }
  .cab > section:has(> .cont-box) > .cont-box { order: -2; }
  .cab > section:has(> .cont-box) > .grid-3 { order: -1; }
  .cab > section > .grid-3:has(> .stat) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
  .cab > section > .grid-3 > .stat { padding: 10px 10px 12px; min-width: 0; }
  .cab > section > .grid-3 > .stat .k { font-size: 12px; letter-spacing: 0; text-transform: none; gap: 4px; }
  .cab > section > .grid-3 > .stat .k .ico { display: none; }
  .cab > section > .grid-3 > .stat .v { font-size: 1.05em; overflow-wrap: anywhere; }
  .cab > section > .grid-3 > .stat .v .rub { display: block; font-size: 12px; margin: 0; }
  .cab > section > .grid-3 > .stat .small { font-size: 12px; }
  .cab-recent:has(.recent-strip) .table-wrap { display: none; }
  .cab-recent .recent-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 2px 4px 4px; }
  .cab-recent .recent-strip::-webkit-scrollbar { display: none; }
  .recent-item, .recent-all { flex: 0 0 96px; height: 96px; border-radius: 12px; overflow: hidden; position: relative; display: grid; place-items: center; background: var(--surface-2); text-decoration: none; color: var(--text); }
  .recent-item img { width: 100%; height: 100%; object-fit: cover; }
  .recent-item small { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .recent-item .thumb-play { position: absolute; top: 6px; left: 6px; }
  .recent-all { border: 1.5px dashed var(--border); background: none; font-weight: 800; }

  /* ---------- 5. balance ---------- */
  .cab .gsub-lock.lock-fold { cursor: pointer; min-height: 44px; }
  .cab .gsub-lock.lock-fold:not(.open) { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 24px; padding-top: 10px; padding-bottom: 10px; }
  .cab .gsub-lock.lock-fold:not(.open) .ico { vertical-align: -4px; }
  #topup .amt-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #topup .amt-tile { min-height: 64px; padding: 8px 4px; justify-content: center; }
  #topup .amt-tile b { font-size: 1.1em; }
  #topup .amt-tile span { max-width: 100%; }
  #topup .amt-tile small { font-size: 12px; text-align: center; line-height: 1.25; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topup .topup-pay {
    position: sticky; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 20; align-self: stretch;
    min-height: 52px; white-space: nowrap; box-shadow: 0 10px 28px -8px rgba(60, 30, 160, .45);
  }
  html.kb-open .topup .topup-pay { bottom: 8px; }
  .topup .topup-pay:has(.pay-via:not(:empty)) { flex-wrap: wrap; row-gap: 0; align-content: center; line-height: 1.2; padding-top: 6px; padding-bottom: 6px; min-height: 56px; }
  .pay-via { display: block; flex-basis: 100%; text-align: center; font-size: 12.5px; font-weight: 600; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pay-via:empty { display: none; }
  .email-line { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; font-size: .9em; color: var(--text-dim); }
  .email-line b { color: var(--text); overflow-wrap: anywhere; }
  .email-line .btn { min-height: 44px; }
  .topup.email-known:not(.email-edit) .topup-email { display: none; }
  .topup-email { max-width: none; }

  /* ---------- menu sheet ---------- */
  .msheet-x { width: 44px; height: 44px; }
  .msheet-seg a { min-height: 44px; padding: 0 9px; gap: 4px; }
  .msheet-seg a .ico { width: 15px; height: 15px; }
  .msheet .lang-switch a, .msheet-row .lang-switch a { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .msheet-links a { padding-top: 11px; padding-bottom: 11px; }
  .msheet-cta-1 { grid-template-columns: 1fr; }


  /* ---------- misc targets & small text found on the after-pass ---------- */
  .topbar .brand { min-height: 44px; display: inline-flex; align-items: center; }
  .mp-sim-head a, .lp-links a { min-height: 44px; display: inline-flex; align-items: center; }
  .checklist li > a { min-height: 44px; display: inline-flex; align-items: center; }
  .hero-frame figcaption { padding: 0 12px; }
  .hero-frame figcaption a { min-height: 44px; display: inline-flex; align-items: center; }
  .gdur-auto { min-height: 44px; }
  .rub, .t td .rub { font-size: max(12px, .8em); }
  .stat .v .rub { font-size: max(12px, .5em); }
  .mp-sh .opt, .gzone-title .opt, .tip, .vendor-filters .chip-label { font-size: 12px; }
  .gsub-meta, .gsub-meta > * { font-size: 13px; }
  .side-label, .stat .k { font-size: 12px; }
  .table-wrap .btn-xs, .table-wrap .btn-sm { font-size: 13px; }
  .cab > section > .grid-3 > .stat .rub-sep { display: none; }
  .stat .grad-text, .stat a { display: inline-flex; align-items: center; min-height: 44px; }

  /* cabinet «Продолжить»: thumbnail + text, button first */
  .cont-box { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; }
  .cont-box .cont-media { width: 76px; height: 76px; }
  .cont-box .cont-p { -webkit-line-clamp: 1; margin: 2px 0 8px; }
  .cont-box .cont-actions .btn { flex: 1 1 auto; min-height: 44px; }

  /* ---------- home ---------- */
  .hero-actions .btn, .hero2 .btn-lg { white-space: nowrap; }
}
@media (max-width: 760px) {
  .cab > section > .grid-3 > .stat:first-child .small { display: none; }
}
@media (max-width: 760px) {
  .t img.thumb-sm { width: 44px; height: 44px; }
  table.works-table img.thumb-sm, table.works-table .thumb-sm { width: 64px; height: 64px; }
}

/* ---------- compact footer v2 (2026-10-08 footer) ---------- */
.foot2{margin-top:16px;padding:20px 0 4px;border-top:1px solid var(--border);font-size:14px;line-height:1.4;color:var(--text-dim);text-align:left}
.foot2 a{color:var(--text-dim);font-weight:600;text-decoration:none}
.foot2 a:hover{color:var(--accent-ink)}
.f2-top{display:flex;align-items:center;justify-content:space-between;gap:12px 24px}
.f2-id{display:flex;align-items:center;flex-wrap:wrap;gap:4px 18px;min-width:0}
.foot2 .f2-brand{color:var(--text);font-size:15px;font-weight:800}
.f2-tag{font-size:13.5px}
.f2-status{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;white-space:nowrap}
.f2-status i{width:7px;height:7px;border-radius:50%;background:var(--ok);box-shadow:0 0 0 3px var(--ok-bg);flex:0 0 auto}
.f2-status.down i{background:var(--danger);box-shadow:0 0 0 3px var(--danger-bg)}
.f2-top .lang-switch{flex:0 0 auto}
.f2-top .lang-switch a{display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:30px;padding:0 12px}
.f2-nav{display:flex;flex-wrap:wrap;align-items:center;gap:6px 26px;margin-top:14px}
.foot2 .f2-nav a{display:inline-flex;align-items:center;min-height:28px}
.foot2 .f2-nav a.f2-seo{font-weight:500}
.f2-more-btn{display:none}
.f2-bottom{display:flex;flex-wrap:wrap;align-items:center;gap:6px 22px;margin-top:16px;padding:14px 0 10px;border-top:1px solid var(--border);font-size:13px}
.f2-tm{opacity:.85}
.f2-cats{margin-left:auto;display:inline-flex;align-items:center;gap:10px}
.foot2 .f2-cats a{display:inline-flex;align-items:center;opacity:.85}
.foot2 .f2-cats a:hover{opacity:1}
.f2-cats img{height:20px;width:auto;display:block}
.f2-cats .cat-d{display:none}
[data-theme="dark"] .f2-cats .cat-l{display:none}
[data-theme="dark"] .f2-cats .cat-d{display:block}
.foot2 .f2-cats .cat-txt{height:20px;padding:0 7px;border:1px solid var(--border);border-radius:6px;font-size:11px;line-height:1}

@media (max-width:760px){
  .foot2{margin-top:8px;padding:12px 0 2px}
  .f2-tag,.foot2 .f2-nav a.f2-dup,.f2-long{display:none}
  .f2-id{flex-direction:column;align-items:flex-start;gap:2px}
  .f2-status{font-size:12px}
  .f2-top .lang-switch a{min-width:44px;height:44px}
  .f2-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin-top:10px}
  .foot2 .f2-nav a.f2-main{grid-column:span 2;justify-content:center;min-height:44px;padding:0 8px;border:1px solid var(--border);border-radius:12px;background:var(--surface);white-space:nowrap}
  .f2-more-btn{display:flex;grid-column:1/-1;align-items:center;justify-content:space-between;min-height:44px;margin:0;padding:0;border:0;background:none;font:inherit;font-weight:700;color:var(--text-dim);cursor:pointer}
  .f2-more-btn::after{content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin:0 6px 4px 0;transition:transform .15s}
  .f2-nav.open .f2-more-btn::after{transform:rotate(-135deg);margin-bottom:-4px}
  .foot2 .f2-nav a.f2-seo{display:none;grid-column:span 3;min-height:44px;margin-top:-8px}
  .foot2 .f2-nav.open a.f2-seo{display:flex}
  .f2-bottom{margin-top:6px;padding:2px 0 8px;gap:0 16px}
  .foot2 .f2-bottom > a{min-height:44px;display:inline-flex;align-items:center}
  .f2-copy{order:3}
  .f2-tm{order:4;flex-basis:100%;font-size:12px;line-height:1.35}
  .f2-cats{order:2;gap:8px}
  .foot2 .f2-cats a{min-height:44px}
  .foot2 .f2-cats .cat-txt{height:44px;border:0;padding:0 2px;font-size:12px}
}

/* ---------- admin panel on phones (08.10.2026): the sidebar is hidden (.cab > .side above), so the sections live in
   the «Разделы» tab -> «Разделы админки» bottom sheet (layout.js, opened by mobile.js sheets()). Desktop: never shown. ---------- */
@media (min-width: 761px) { .adm-sheet, .tabbar .tab-adm { display: none !important; } }
@media (max-width: 760px) {
  .tabbar button.tab-adm.on { color: var(--accent-ink); background: var(--accent-soft); }
  .adm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .adm-grid a {
    display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 52px; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); color: var(--text);
    font-size: 14px; font-weight: 700; line-height: 1.2; text-decoration: none;
  }
  .adm-grid a .ico { width: 20px; height: 20px; flex: none; color: var(--text-dim); }
  .adm-grid a span { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
  .adm-grid a.on { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
  .adm-grid a.on .ico { color: inherit; }
}
