/* Общая навигация на телефонах и планшетах. */
@media (max-width: 960px) {
  .bar-top { position: relative; flex-wrap: wrap; gap: 8px; padding: 8px; border-radius: 20px; }
  .logo { flex: 1 0 100%; min-height: 44px; padding: 0 92px 0 4px; font-size: 19px; }
  .logo i { flex: none; width: 34px; height: 34px; }
  .top-links { flex: 1 1 100%; min-width: 0; gap: 6px; justify-content: flex-end; }
  .top-links .hide-sm { display: none; }
  .top-links > .icon-btn { flex: none; width: 44px; height: 44px; }
  .watch-link { position: static; flex: 1 1 0; min-width: 0; }
  .watch-link > button { width: 100%; min-height: 44px; justify-content: center; padding: 0 8px; border-radius: 12px; }
  .watch-link .wl { display: inline; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .watch-link > button b { flex: none; }
  .mobile-menu { display: block; position: static; }
  .mobile-menu > summary { position: absolute; top: 8px; right: 8px; display: flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); font-weight: 700; list-style: none; }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .mobile-menu > summary svg { width: 18px; height: 18px; flex: none; }
  .mobile-menu[open] > summary { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
  .mobile-menu nav, .watch-panel { left: 0; right: 0; top: calc(100% + 8px); width: auto; min-width: 0; max-height: min(65vh, 520px);
    max-height: min(65dvh, 520px); padding: 8px; overflow-y: auto; overscroll-behavior: contain; border-radius: 16px; }
  .mobile-menu nav a { display: flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
  .watch-row { gap: 6px; overflow-wrap: anywhere; }
  .watch-row a { display: inline-block; padding: 6px 0; }
  .watch-row button, .watch-panel .link-btn { min-width: 44px; min-height: 44px; height: auto; white-space: normal; }
  .watch-panel .panel-head { gap: 8px; }
  .watch-panel button { max-width: 100%; height: auto; min-height: 44px; white-space: normal; }
  .watch-panel input, .watch-panel select { font-size: 16px; max-width: 100%; }
  .fav-link.fav-empty, .watch-link.watch-empty { display: none; }
  .bar-top:not(:has(.watch-link:not(.hidden):not(.fav-empty):not(.watch-empty))) { flex-wrap: nowrap; gap: 6px; padding: 6px 8px; }
  .bar-top:not(:has(.watch-link:not(.hidden):not(.fav-empty):not(.watch-empty))) .logo { flex: 1 1 auto; min-width: 0; padding: 0 2px; font-size: 17px; gap: 7px; white-space: nowrap; }
  .bar-top:not(:has(.watch-link:not(.hidden):not(.fav-empty):not(.watch-empty))) .logo i { width: 30px; height: 30px; }
  .bar-top:not(:has(.watch-link:not(.hidden):not(.fav-empty):not(.watch-empty))) .top-links { flex: 0 0 auto; gap: 4px; }
  .bar-top:not(:has(.watch-link:not(.hidden):not(.fav-empty):not(.watch-empty))) .mobile-menu > summary { position: static; padding: 0 9px; gap: 5px; font-size: 14px; }
  .bar-top:not(:has(#watch-link:not(.hidden):not(.watch-empty))) .fav-link { flex: 0 0 auto; }
  .bar-top:not(:has(#watch-link:not(.hidden):not(.watch-empty))) .fav-link > button { width: auto; padding: 0 10px; }
  .top-links button:focus-visible, .mobile-menu summary:focus-visible, .mobile-menu a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
}

.purchase-filter-value { display: none; }

/* Читаемые поля и доступные действия на узком экране. */
@media (max-width: 640px) {
  .wrap { width: calc(100% - 24px); padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: max(40px, env(safe-area-inset-bottom)); }
  .top-links { gap: 4px; }
  .hero { padding: 24px 0 12px; text-align: left; }
  .hero h1 { margin-left: 0; font-size: clamp(28px, 7.6vw, 36px); line-height: 1.12; overflow-wrap: anywhere; }
  .hero p { font-size: 16px; line-height: 1.55; margin-bottom: 18px; }
  .hero-badge { max-width: 100%; font-size: 11px; padding: 7px 10px; gap: 7px; }
  .hero-badge i { flex: none; }
  .search form, body.inner .search form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 8px; border-radius: 18px; }
  .search input, body.inner .search input { width: 100%; min-height: 44px; padding: 8px; font-size: 16px; }
  .search .go, body.inner .search .go { width: 100%; min-height: 46px; height: auto; padding: 11px 16px; border-radius: 12px; }
  body.variant-page .search form { grid-template-columns: minmax(0, 1fr) auto; padding: 4px; }
  body.variant-page .search .go { min-height: 44px; }
  .search .go, .buy { color: var(--surface); }
  .search [data-report-search] { margin-top: 8px; }
  .search .prefetch:empty { display: none; }
  .suggest button { min-height: 48px; padding: 10px 8px; gap: 6px; overflow-wrap: anywhere; }
  .suggest small { white-space: normal; flex: none; max-width: 38%; }
  .popular { margin-top: 14px; padding-bottom: 8px; }
  .popular .chip { min-height: 44px; }
  .hero-actions { justify-content: flex-start; }
  .crumbs { line-height: 1.7; overflow-wrap: anywhere; }
  .crumbs a { display: inline-block; padding: 4px 0; }
  .card { padding: 14px; }
  .card, .seo, .deal, .stat, .headline-offer, .best-card, .pick-panel { min-width: 0; }
  .card h2, .card h3, .deal-q, .deal-tiers, .headline-offer, .best-card, .watch-delivery, .tg-card { overflow-wrap: anywhere; }
  .ghost, .buy, .refine-live, .refine-choice > a, .result-links a, .result-links button, .watch-mine, .watch-text-button { min-height: 44px; }
  .ghost, .buy { display: inline-flex; align-items: center; justify-content: center; }
  .more { display: flex; width: 100%; }
  .chip { min-height: 40px; max-width: 100%; }
  .pick-groups .chip, .pick-finals .chip { white-space: normal; text-align: left; }
  .secondary > summary, .purchase-checks > summary, .history.watch-callout summary, .faq summary, details.fold > summary { min-height: 44px; padding-top: 11px; padding-bottom: 11px; }
  .tools input, .tools select, .variant-tools select, .purchase-filters select, #attach-url, #feedback-dialog select, #feedback-dialog textarea { font-size: 16px; min-height: 44px; }
  .tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tools .seg { display: flex; width: 100%; }
  .tools .seg button { flex: 1; min-height: 44px; }
  .tools select, .tools input[type="search"], .tools .share-link { width: 100%; }
  .tools label, .access-check label { min-height: 44px; }
  .tools label { display: flex; align-items: center; gap: 8px; }
  input[type="checkbox"] { width: 18px; height: 18px; flex: none; }
  .variant-tools { gap: 10px; }
  .variant-tools label { max-width: none; }
  .purchase-filters label { min-width: 0; }
  .purchase-filters-wrap, .purchase-filters-wrap label { display: grid; grid-template-columns: minmax(0, 1fr); }
  .purchase-filters-wrap select, .purchase-filters-wrap .purchase-filter-value { grid-area: 2 / 1; font-size: max(16px, 1rem); }
  /* Нативный список принимает нажатия и фокус, выбранный текст под ним переносится по словам. */
  .purchase-filters-wrap select { min-width: 0; z-index: 1; opacity: 0; }
  .purchase-filters-wrap .purchase-filter-value {
    display: flex; align-items: center; justify-content: space-between; gap: .6em; min-height: 44px;
    padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
    overflow-wrap: anywhere; text-align: start; pointer-events: none;
  }
  .purchase-filter-value::after {
    content: ""; flex: none; width: .4em; height: .4em; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg);
  }
  .purchase-filters-wrap select:focus-visible + .purchase-filter-value { outline: 2px solid var(--accent); outline-offset: 2px; }
  .hero:has(#purchase-hero) ~ #seo-top :is(p, li) { overflow-wrap: anywhere; }
  .access-tools, .access-tools.has-unknown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-tools button { min-width: 0; min-height: 64px; padding: 10px 8px; }
  .result-heading > div { flex-basis: 100%; }
  .headline-offer { padding: 14px; gap: 12px; }
  .headline-offer > div { min-width: 0; }
  .headline-offer > .buy { width: 100%; }
  .headline-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .headline-actions .ghost { white-space: normal; text-align: left; }
  .best { display: grid; grid-template-columns: minmax(0, 1fr); overflow: visible; margin: 0 0 14px; padding: 0; gap: 10px; }
  .best-card { width: 100%; }
  .stat b { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .stat.date b { font-size: 13px; }
  .history.watch-callout { padding: 14px; }
  .history.watch-callout .watch-submit, .history.watch-callout .tg-offer a { white-space: normal; text-align: center; }
  .result-links { gap: 4px 12px; }
  .filter-summary { gap: 6px; }
  .found-count { margin-left: 0; }
  .status-text { flex-basis: calc(100% - 74px); min-width: 0; }
  .status-text h2, .status-text p { overflow-wrap: anywhere; }
  .deal-q { display: block; overflow: visible; -webkit-line-clamp: unset; }
  .deal b, .services .deal b { font-size: 20px; overflow-wrap: anywhere; }
  .deal-off, .deal-low, .deal-check { flex-wrap: wrap; }
  .links a { min-height: 44px; overflow-wrap: anywhere; }
  .links small { max-width: 48%; white-space: normal; text-align: right; }
  .foot-grid a { min-height: 44px; padding: 10px 0; }
  .foot-grid { gap: 16px; }
  #feedback-dialog, #compare-dialog { width: calc(100% - 16px); max-width: none; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
  #feedback-form > button { width: 100%; margin-top: 8px; }
  .compare-head { align-items: flex-start; }
  .compare-head .ghost { flex: none; }
  #compare-dialog .compare-grid:has(.is-current) { display: block; overflow: visible; }
  #compare-dialog .compare-grid:has(.is-current) > .compare-card:not(.is-current) { display: none; }
  .compare-switch { display: grid; gap: 4px; margin-bottom: 10px; font-size: 14px; font-weight: 700; }
  .compare-switch select { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 10px;
    background: var(--surface); color: var(--ink); font: inherit; font-size: max(16px, 1rem); }
  .compare-switch select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .compare-grid.static { grid-auto-columns: auto; }
  .compare-bar { flex-wrap: wrap; justify-content: center; width: max-content; max-width: calc(100% - 16px); border-radius: 16px;
    gap: 6px; padding: 6px 8px 6px 10px; font-size: 12px; bottom: max(8px, env(safe-area-inset-bottom)); }
  #compare-bar > span { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .compare-prefix { display: none; }
  .compare-bar .buy, .compare-bar .ghost { padding: 6px 10px; font-size: 12px; flex: none; }
  .cookie { bottom: max(8px, env(safe-area-inset-bottom)); }
  .cookie .ghost { flex: none; }
  body.cookie-open .compare-bar { bottom: calc(116px + env(safe-area-inset-bottom)); }
  body.variant-page.cookie-open .compare-bar { bottom: max(8px, env(safe-area-inset-bottom)); }
  .variant-page .hero .stats { gap: 6px; margin-bottom: 10px; }
  .variant-page .hero .stat { padding: 8px 10px; }
  .variant-page .hero #variant-buy { min-width: 140px; margin-bottom: 2px; }
  .purchase-hero { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; }
  .purchase-hero-price { display: flex; align-items: baseline; gap: 8px; }
  .purchase-hero-terms { gap: 6px 16px; }
  .purchase-hero-terms dt { font-size: 12px; }
  .purchase-hero-terms dd { margin-top: 0; font-size: 14px; }
  .purchase-hero-actions { display: grid; grid-template-columns: auto minmax(min-content, 1fr); gap: 4px 12px; }
  #purchase-hero #variant-buy { min-width: 0; padding-inline: 12px; white-space: normal; }
  #matching-offers-link { line-height: 1.3; }
  .purchase-hero-copy { min-height: 44px; }
  .hit-toast { grid-template-columns: minmax(0, 1fr) auto; }
  .hit-toast > span { grid-column: 1 / -1; }
  .hit-toast button { min-height: 44px; min-width: 44px; }

  /* Действия предложения занимают собственную строку карточки. */
  table.cards-sm { display: block; width: 100%; }
  table.cards-sm tbody { display: block; }
  table.cards-sm tbody tr { gap: 8px; padding: 16px 0; }
  table.cards-sm td { overflow-wrap: anywhere; }
  table.cards-sm td.price { padding-right: 0; max-width: 100%; white-space: normal; }
  table.cards-sm td.price .price-note { white-space: normal; }
  table.cards-sm td.reviews small { margin-left: 5px; }
  table.cards-sm td.name { flex-basis: 100%; line-height: 1.5; }
  table.cards-sm td.cell-buy { position: static; order: 10; flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; text-align: left; padding: 4px 0 0; }
  table.cards-sm td.cell-buy .buy { flex: 1 1 100%; padding: 10px 16px; }
  .cards-sm td.cell-buy .report-row, .cards-sm td.cell-buy .cmp { width: auto; margin: 0; min-height: 44px; padding: 8px; }
  .cards-sm td.cell-buy .cmp { margin-left: auto; }
  table.cards-sm td.seller, table.cards-sm td.kind-cell { max-width: 100%; }
  table.cards-sm.hub-table td.price { flex: 1 1 100%; }

  table.compact-offers tbody tr { gap: 4px 10px; padding-block: 10px; }
  table.compact-offers td.name { display: block; overflow: visible; -webkit-line-clamp: unset; line-height: 1.35; }
  table.compact-offers td.reviews { flex: 1 1 100%; }
  .compact-offers td.seller br + .mark { margin-left: .3em; }
  .compact-offers td.reviews .review-source, .compact-offers td.reviews .review-value { display: inline; margin: 0; }
  .compact-offers td.reviews .review-source { margin-right: 5px; }
  .compact-offers .offer-review-button { min-height: 44px; }
  table.compact-offers td.cell-buy { gap: 4px 6px; padding-top: 2px; }
  table.compact-offers td.cell-buy .buy { flex: 0 1 auto; }
  #snapshot table.compact-offers td.cell-buy { order: 2; flex: 0 1 auto; padding: 0; }
  .compact-offers td.cell-buy .report-row, .compact-offers td.cell-buy .cmp { padding-inline: 6px; }
  .hero-showcase { margin-top: 16px; border-radius: 18px; }
  .reel-inner { padding: 14px; gap: 12px; }
  .reel-stage { min-height: 170px; }
  .reel-row { flex-wrap: wrap; gap: 4px 8px; }
  .reel-tabs { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .reel-tabs button { width: 100%; min-width: 0; min-height: 40px; white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 380px) {
  .bar-top:not(:has(.watch-link:not(.hidden):not(.fav-empty):not(.watch-empty))) { padding: 6px; gap: 2px; }
  .bar-top:not(:has(.watch-link:not(.hidden):not(.fav-empty):not(.watch-empty))) .logo { min-width: 0; font-size: 15px; gap: 5px; padding: 0; }
  .bar-top:not(:has(.watch-link:not(.hidden):not(.fav-empty):not(.watch-empty))) .logo i { width: 26px; height: 26px; font-size: 14px; border-radius: 8px; }
  .bar-top:not(:has(.watch-link:not(.hidden):not(.fav-empty):not(.watch-empty))) .top-links { gap: 2px; }
  .bar-top:not(:has(.watch-link:not(.hidden):not(.fav-empty):not(.watch-empty))) .top-links > .icon-btn { width: 36px; height: 44px; }
  .bar-top:not(:has(.watch-link:not(.hidden):not(.fav-empty):not(.watch-empty))) .mobile-menu > summary { padding: 0 7px; gap: 4px; font-size: 13px; }
  .bar-top:not(:has(.watch-link:not(.hidden):not(.fav-empty):not(.watch-empty))) .mobile-menu > summary svg { width: 15px; height: 15px; }
  .purchase-hero-actions { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 0; }
  #watch-toggle .wl { display: none; }
  .deal-grid { grid-template-columns: minmax(0, 1fr); }
  .purchase-filters label, .variant-tools label { flex-basis: 100%; }
  .meter-line { grid-template-columns: 62px minmax(0, 1fr) 62px; gap: 6px; }
}

.suggest.suggest-viewport { position: fixed; right: auto; bottom: auto; z-index: 60; overflow-y: auto; overscroll-behavior: contain; }
.suggest-viewport button { min-height: 48px; overflow-wrap: anywhere; }
.suggest-viewport small { white-space: normal; flex: none; max-width: 38%; }
body.compact-form-focus .compare-bar { display: none; }
