/* Mobile corrections from Vera's phone screenshots, 02.12.2026. */
@media (max-width: 640px) {
  .header-top { gap: 8px; padding-block: 10px; }
  .logo, .header-tools, .shop-nav { display: contents; }
  .logo-names { order: 0; gap: 7px; font-size: 1.05rem; }
  .nav-toggle { order: 1; margin-left: auto; }
  .logo-tagline { order: 5; flex-basis: 100%; }
  .shop-links { order: 6; flex: 1 0 100%; box-sizing: border-box; margin: 0; padding: 3px; justify-content: space-evenly; }
  .shop-links .shop-link { padding: 7px 5px; font-size: .78rem; }
  .shop-link-about, .shop-nav-divider { display: none; }
  .nav-mobile-only { display: block; }
  .bg-audio-widget { order: 3; margin-left: auto; }
  .cart-btn { order: 4; padding: 7px 8px; }
  /* Sound/cart share the top row only where the full logo still fits. */
  .logo-names { flex: 1 0 calc(100% - 130px); }
  .nav-toggle { order: 4; }
  .bg-audio-widget { order: 1; margin-left: 0; }
  .cart-btn { order: 3; }
  .music-ticker { flex-wrap: wrap; column-gap: 8px; row-gap: 0; padding-inline: 12px; }
  .music-ticker__viewport { flex: 1 1 calc(100% - 55px); padding-block: 4px; }
  .music-ticker__play { width: 36px; height: 40px; margin-right: 1px; }
  .music-ticker__item { margin-right: 8px; letter-spacing: .02em; }
  .music-ticker__now { flex: 1 0 100%; justify-content: center; flex-wrap: wrap; padding: 0 0 8px; }
  .music-ticker__go, .music-ticker__follow { font-size: .72rem; }
  #main #news .news-card-image img { aspect-ratio: 16 / 9; object-fit: contain; background: #faf8f2; }
  #main #news .home-grid-4 { grid-auto-rows: auto; }
  #main #news .news-card { min-width: 0; min-height: 0; }
  .podcast-block .podcast-around { display: grid; grid-template-columns: minmax(0, 1fr); }
  .podcast-around-card { min-width: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 12px; align-content: center; }
  .podcast-around-card img { grid-column: 1; grid-row: 1 / span 3; width: 76px; align-self: center; }
  .podcast-around-label, .podcast-around-title, .podcast-around-meta { grid-column: 2; min-width: 0; overflow-wrap: anywhere; }
  .podcast-around-label { font-size: .64rem; letter-spacing: .06em; }
  .podcast-around-title { font-size: .92rem; line-height: 1.4; }
  /* A compact floating arrow remains reachable while reading. */
  #to-top, #to-top:hover { position: fixed; left: auto !important; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; place-items: center; margin: 0; width: 42px !important; height: 42px; padding: 0 !important; border-radius: 50%; transform: none; opacity: 0; pointer-events: none; font-size: 0; letter-spacing: 0; text-shadow: none; box-shadow: 0 2px 6px #0002; }
  #to-top::before {
    content: "";
    width: 18px;
    height: 22px;
    background: currentColor;
    clip-path: polygon(50% 0, 100% 41%, 82% 55%, 61% 38%, 61% 100%, 39% 100%, 39% 38%, 18% 55%, 0 41%);
  }
  #to-top.visible { opacity: .9; pointer-events: auto; transform: none; }
  body.has-listen-bar #to-top { bottom: calc(var(--listen-bar-h) + env(safe-area-inset-bottom, 0px) + 12px); }
  .product-detail a[data-site-goal="sticker_zip_open"] { margin-bottom: 18px; }
  .music-ticker__viewport { -webkit-mask-image: none; mask-image: none; }

}
@media (max-width: 400px) {
  .logo-names { font-size: .86rem; gap: 5px; }
  .header-top { gap: 6px; }
  .logo-names .badge-icon { width: 16px; height: 16px; }
}




@media (max-width: 760px) {
  #main .home-ed-media { aspect-ratio: auto; min-height: 0; }
  #main .home-ed-media img { position: static; width: 100%; height: auto; object-fit: contain; }
}

/* Номера занимают одну колонку, включая заголовки с переносом. */
.chapter-head:has(> .chapter-num) {
  display: grid;
  grid-template-columns: 2ch minmax(0, 1fr) auto;
  column-gap: 16px;
  font-size: 2.4rem;
}
.chapter-head > .chapter-num { font-variant-numeric: tabular-nums; }
.chapter-head > .chapter-title { min-width: 0; overflow-wrap: anywhere; }
#redhead:has(+ #brands-line) { margin-bottom: 20px; }
#brands-line { margin-bottom: 28px; }
#brands-line .btn { margin-top: 8px; }

.track-playlist .track-row-cover { width: 56px; height: 56px; }
.track-playlist .track-row-title { font-size: 1.05rem; overflow-wrap: anywhere; }

.music-related-products {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}
.music-related-products > .product-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 12px;
  padding: 10px;
}
.music-related-products .product-image { grid-row: 1 / span 2; width: 56px; min-width: 0; }
.music-related-products .product-image img,
.music-related-products .product-image .no-image {
  width: 100%;
  max-width: 56px;
  height: 56px;
  aspect-ratio: 1;
  object-fit: contain;
}
.music-related-products .product-name { align-self: end; overflow-wrap: anywhere; }
.music-related-products .product-price { align-self: start; }

@media (max-width: 760px) {
  .chapter-head:has(> .chapter-num) {
    grid-template-columns: 2ch minmax(0, 1fr);
    gap: 8px 12px;
    margin-bottom: 16px;
  }
  .chapter-head:has(> .chapter-num) > .chapter-more { grid-column: 1 / -1; justify-self: start; }
  .chapter-head > .chapter-num { font-size: 1.85rem; }
  .chapter-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter-index__item { align-items: center; min-width: 0; padding-inline: 8px; }
  .chapter-index__num { flex: 0 0 auto; }
  .chapter-index__title { min-width: 0; overflow-wrap: anywhere; }
  #portfolio.chapter, #flips.chapter { margin-bottom: 34px; }
  .chapter-head + .chapter-deck { margin-top: 0; }
}
