/* Телефон. Раскладку включает класс body.phone — его ставит ui.js, когда экран узкий: разделы уходят вниз,
   плеер становится строкой над ними и разворачивается во весь экран, очередь, меню и диалоги выезжают
   листами снизу. Всё, что связано с пальцем вместо мыши, — под классом body.touch.
   На компьютере с окном обычной ширины этот файл ничего не меняет. */

/* ---------- палец вместо мыши ---------- */
html.touch { overscroll-behavior: none; }                           /* без «потянуть, чтобы обновить»: у нас своё смахивание */
body.touch { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; overscroll-behavior: none; touch-action: manipulation; }
body.touch input, body.touch textarea, body.touch .menu .field { font-size: 16px; }     /* мельче нельзя: айфон приближает страницу при вводе */
body.touch ::-webkit-scrollbar { display: none; }
body.touch * { scrollbar-width: none; }
/* под пальцем нет «наведения»: без этого кнопка оставалась бы подсвеченной после нажатия */
body.touch .ibtn:not(.on):hover { color: var(--ink-2); background: none; }
body.touch .row:not(.playing):not(.menu-open):hover { background: none; }
body.touch .row:not(.playing):not(.menu-open):active { background: var(--fill-1); }
body.touch .prof-pl:hover { background: none; }
body.touch .prof-pl:active { background: var(--fill-1); }
body.touch .card:not(.playing):hover .card-art { transform: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 14px 30px -18px #000; }
body.touch .artist:hover .artist-pic { transform: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 14px 30px -18px #000; }
body.touch .mix:not(.playing):hover { transform: none; filter: saturate(.92) brightness(.9); }
body.touch .mix:hover .mix-play { background: rgba(255, 255, 255, .18); color: inherit; transform: none; }
body.touch .lib-tile:hover, body.touch .prof-stat:hover, body.touch .ar:hover .ar-pic { transform: none; }
body.touch .dk-play:hover { transform: none; }
body.touch .dk-play:active { transform: scale(.94); }
body.touch .card:active .card-art, body.touch .mix:active, body.touch .lib-tile:active, body.touch .prof-stat:active { transform: scale(.97); }
/* сердечко и «⋯» у трека видны сразу — и на планшете тоже: навести палец нельзя */
body.touch .row .like, body.touch .row .row-more { opacity: 1; }
body.touch .row .like:not(.on) { color: var(--ink-3); }
/* айфон и айпад: громкость — только кнопками на корпусе, ползунок на странице ничего не меняет */
body.ios .vol { display: none; }
/* в очереди крестик «убрать» виден сразу */
body.touch .row-tail.has-x .row-x { opacity: 1; }
body.touch .row-tail.has-x .row-dur { opacity: 0; }
/* окна поверх занимают то, что видно над клавиатурой */
body.touch #layers { top: var(--vvt, 0px); bottom: auto; height: var(--vvh, 100%); }
body.touch .login { top: var(--vvt, 0px); bottom: auto; height: var(--vvh, 100%); }

/* ---------- размеры ---------- */
body.phone {
  --gap: 10px;
  --side-w: 0px;
  --top-h: 44px;
  --tabs-h: 58px;
  --mini-h: 58px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --lift: max(10px, calc(var(--safe-b) - 10px));                         /* от края экрана до строки разделов */
  --under: calc(var(--lift) + var(--tabs-h));                            /* занято внизу, когда плеера нет */
  --dock-h: calc(var(--under) + var(--mini-h) - 4px);                    /* над этим всплывают подсказки */
  --wave-f: calc((100vw - 32px) / 7.92);                                 /* «Моя волна» — во всю ширину экрана */
}

/* ---------- каркас ---------- */
body.phone #app, body.phone #layers { left: env(safe-area-inset-left, 0px); right: env(safe-area-inset-right, 0px); }     /* телефон на боку: вырез экрана сбоку */
body.phone #side { display: none; }
body.phone #main {
  padding: calc(var(--safe-t) + var(--top-h) + 20px) 16px calc(var(--under) + var(--mini-h) + 30px);
  scrollbar-gutter: auto; overscroll-behavior: contain;
}
body.phone:not(.has-track) #main { padding-bottom: calc(var(--under) + 24px); }
body.phone[data-page='library'] #main, body.phone[data-page='profile'] #main { padding-top: calc(var(--safe-t) + 16px); }
body.phone.queue-open #main { padding-right: 16px; }

body.phone .h1 { font-size: 27px; }
body.phone .h2 { font-size: 17.5px; }
body.phone .section { margin-top: 28px; }
body.phone .empty { padding: 40px 8px; }
/* кнопки у заголовка раздела — значками: подписи в строку не помещаются */
body.phone .section-head .btn.sm { width: 38px; height: 38px; padding: 0; }
body.phone .section-head .btn.sm > span:not(.ico) { display: none; }

/* строка сверху: «назад» на внутренних экранах, поиск — на экране поиска */
body.phone #top, body.phone.queue-open #top { left: 12px; right: 12px; top: calc(var(--safe-t) + 8px); height: auto; min-height: var(--top-h); }
body.phone #top::before { left: -12px; right: -12px; top: calc(-1 * (var(--safe-t) + 8px)); height: calc(var(--safe-t) + 92px); }
body.phone .top-in { flex-wrap: wrap; height: auto; gap: 8px; }
body.phone .navbtn { width: 44px; height: 44px; }
body.phone .nav-fwd, body.phone .search { display: none; }
body.phone[data-page='search'] .search { display: block; flex: 1 1 0; min-width: 0; margin: 0; }
body.phone[data-page='home'] .nav-back, body.phone[data-page='search'] .nav-back,
body.phone[data-page='library'] .nav-back, body.phone[data-page='profile'] .nav-back { display: none; }
body.phone .net { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 30px); margin: 0; transform: translateX(-50%); max-width: calc(100vw - 24px); white-space: nowrap; }

/* ---------- разделы внизу ---------- */
body.phone #tabs {
  position: absolute; z-index: 7; left: 10px; right: 10px; bottom: var(--lift); height: var(--tabs-h);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 6px;
  border-radius: 29px; --glass-blur: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, .035) 34%, rgba(255, 255, 255, .03) 70%, rgba(255, 255, 255, .06) 100%), rgba(9, 9, 13, .62);
  transition: transform .45s var(--ease), opacity .3s;
}
.tab { display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 0; color: var(--ink-3); font-size: 10.5px; font-weight: 600; letter-spacing: .01em; border-radius: 22px; transition: color .16s, transform .18s var(--spring); }
.tab .ico { width: 23px; height: 23px; }
.tab:active { transform: scale(.92); }
.tab.active { color: #fff; }
.tab.active .ico { filter: drop-shadow(0 0 7px rgba(255, 255, 255, .55)); }
.tab-pic { width: 24px; height: 24px; margin-bottom: -1px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--fill-3); font: 700 10px var(--font-display); opacity: .7; }
.tab-pic img { width: 100%; height: 100%; object-fit: cover; }
.tab.active .tab-pic { opacity: 1; box-shadow: 0 0 0 1.5px #000, 0 0 0 3px #fff; }
body.phone.stage-open #tabs { transform: translateY(calc(100% + var(--lift) + 12px)); opacity: 0; pointer-events: none; }

/* ---------- плеер: строка над разделами ---------- */
body.phone #dock {
  left: 10px; right: 10px; bottom: calc(var(--under) + 8px); height: var(--mini-h);
  grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr); gap: 4px;
  padding: 0 8px; border-radius: 29px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, .035) 34%, rgba(255, 255, 255, .03) 70%, rgba(255, 255, 255, .06) 100%), rgba(9, 9, 13, .62);
}
body.phone:not(.has-track) #dock { display: none; }
/* экономный режим: без размытия плашки плотные — иначе сквозь них ничего не прочесть */
body.eco.phone #tabs, body.eco.phone #dock { background: linear-gradient(180deg, rgba(31, 31, 39, .975), rgba(13, 13, 18, .985)); }
body.phone #dock .dk-now { gap: 11px; align-self: stretch; cursor: pointer; }
body.phone #dock .dk-art { width: 42px; height: 42px; border-radius: 12px; }
body.phone #dock .dk-title { font-size: 14px; }
body.phone #dock .dk-sub { font-size: 12.5px; }
body.phone #dock .dk-expand, body.phone #dock .dk-flags, body.phone #dock .dk-side,
body.phone #dock .dk-ctrl .mode, body.phone #dock .dk-prev { display: none; }
body.phone #dock .dk-mid { display: contents; }
body.phone #dock .dk-ctrl { position: relative; z-index: 4; gap: 0; }
body.phone #dock .dk-play { width: 42px; height: 42px; color: #fff; background: none; box-shadow: none; }
body.phone #dock .dk-play .ico { width: 24px; height: 24px; }
body.phone #dock .dk-play.loading::after { inset: 1px; }
body.phone #dock .dk-next { width: 42px; height: 42px; color: var(--ink); }
/* сколько трека прошло — тонкой линией по нижней кромке */
body.phone #dock .dk-seek { position: absolute; z-index: 4; left: 27px; right: 27px; bottom: 0; display: block; width: auto; pointer-events: none; }
body.phone #dock .dk-seek > span, body.phone #dock .seek-knob, body.phone #dock .seek-tip, body.phone #dock .dk-seek .seek-buf { display: none; }
body.phone #dock .dk-seek .seek { height: 2px; }
body.phone #dock .dk-seek .seek-track { top: 0; height: 2px; background: rgba(255, 255, 255, .12); }

/* телефон на боку: высоты мало — плеер и разделы встают в одну строку, слева плеер, справа разделы */
@media (max-height: 500px) and (orientation: landscape) {
  body.phone { --dock-h: calc(var(--under) - 4px); }
  body.phone.has-track #tabs { left: calc(50% + 5px); }
  body.phone:not(.stage-open) #dock { right: calc(50% + 5px); bottom: var(--lift); }
  body.phone #main { padding-bottom: calc(var(--under) + 24px); }
}

/* ---------- плеер во весь экран ---------- */
body.phone #stage {
  display: flex; flex-direction: column; align-items: stretch;
  padding: calc(var(--safe-t) + 4px) 24px calc(var(--safe-b) + 222px);
  background: radial-gradient(110% 58% at 50% 26%, rgba(var(--tint), .26), transparent 72%), rgba(0, 0, 0, .36);
  transform: translateY(26px); transition: opacity .35s var(--ease), transform .45s var(--ease);
}
body.phone #stage.in { transform: none; }
body.phone #stage, body.phone.stage-open #dock { touch-action: none; }    /* смахивание по плееру — наше, браузер страницу не тянет */
body.phone .st-more { display: inline-grid; }
body.phone .st-bar { position: static; flex: none; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; height: 44px; margin: 0 -10px; }
body.phone .st-bar .ibtn { width: 44px; height: 44px; color: var(--ink); }
body.phone .st-close .ico { display: none; }
body.phone .st-close .ico + .ico { display: inline-flex; width: 26px; height: 26px; }
body.phone .st-bar-ctx { display: block; flex: 1; text-align: center; color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
body.phone .st-box { flex: 1; min-height: 0; flex-direction: column; align-items: center; justify-content: space-evenly; gap: 14px; max-width: none; text-align: left; }
body.phone .st-art { width: min(100%, calc(100vh - var(--safe-t) - var(--safe-b) - 430px)); min-width: 150px; border-radius: 26px; }
body.phone .st-art { width: min(100%, calc(100dvh - var(--safe-t) - var(--safe-b) - 430px)); }
body.phone .st-text { width: 100%; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; justify-items: start; align-items: center; text-align: left; }
body.phone .st-ctx { display: none; }
body.phone .st-title { grid-column: 1; font: 800 22px/1.16 var(--font-display); letter-spacing: -.02em; -webkit-line-clamp: 2; }
body.phone .st-artist { grid-column: 1; justify-self: start; font-size: 15.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.phone .st-like-box { display: block; grid-column: 2; grid-row: 1 / span 2; }
body.phone .st-like { width: 46px; height: 46px; }
body.phone .st-like .ico { width: 26px; height: 26px; }
body.phone .st-reason { grid-column: 1 / -1; justify-self: start; margin-top: 8px; height: auto; min-height: 34px; padding: 7px 14px; border-radius: 17px; white-space: normal; line-height: 1.3; }
@media (max-height: 700px) {
  body.phone .st-reason { display: none; }
  body.phone .st-title { -webkit-line-clamp: 1; }
  body.phone .st-art { width: min(100%, calc(100vh - var(--safe-t) - var(--safe-b) - 366px)); }
  body.phone .st-art { width: min(100%, calc(100dvh - var(--safe-t) - var(--safe-b) - 366px)); }
}
@media (max-height: 500px) { body.phone .st-art { display: none; } }

/* кнопки большого плеера — это тот же плеер, только развёрнутый: перемотка, управление, действия с треком */
body.phone.stage-open #dock {
  left: 0; right: 0; bottom: 0; height: auto;
  grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: auto; justify-items: center; gap: 14px 0;
  padding: 0 24px calc(var(--safe-b) + 18px);
  border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  animation: full-in .45s var(--ease) both;
}
@keyframes full-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
body.phone.stage-open #dock::before, body.phone.stage-open #dock::after, body.phone.stage-open #dock .dk-glow,
body.phone.stage-open #dock .dk-art, body.phone.stage-open #dock .dk-meta, body.phone.stage-open #dock .vol,
body.phone.stage-open #dock .dk-full, body.phone.stage-open #dock .dk-flags .like { display: none; }
body.phone.stage-open #dock .dk-now, body.phone.stage-open #dock .dk-flags, body.phone.stage-open #dock .dk-side { display: contents; }
body.phone.stage-open #dock .dk-seek {
  position: relative; left: auto; right: auto; bottom: auto; grid-column: 1 / -1; grid-row: 1; width: 100%; pointer-events: auto;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: 'bar bar' 'now all'; gap: 2px 0; font-size: 12px;
}
body.phone.stage-open #dock .dk-seek > span { display: block; grid-area: all; text-align: right; }
body.phone.stage-open #dock .dk-seek > span:first-child { grid-area: now; text-align: left; }
body.phone.stage-open #dock .dk-seek .seek { grid-area: bar; height: 28px; }
body.phone.stage-open #dock .dk-seek .seek-track { top: 12px; height: 4px; background: rgba(255, 255, 255, .16); }
body.phone.stage-open #dock .dk-seek .seek.active .seek-track { top: 11px; height: 6px; }
body.phone.stage-open #dock .dk-seek .seek-buf { display: block; }
body.phone.stage-open #dock .seek-knob { display: block; top: 7px; width: 14px; height: 14px; margin-left: -7px; opacity: 1; transform: none; }
body.phone.stage-open #dock .seek.active .seek-knob { transform: scale(1.3); }
body.phone.stage-open #dock .dk-ctrl { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-content: center; gap: clamp(6px, 5vw, 26px); }
body.phone.stage-open #dock .dk-ctrl .mode { display: inline-grid; width: 44px; height: 44px; }
body.phone.stage-open #dock .dk-ctrl .mode .ico { width: 20px; height: 20px; }
body.phone.stage-open #dock .dk-ctrl .mode.on::after { margin-top: 34px; }
body.phone.stage-open #dock .dk-prev, body.phone.stage-open #dock .dk-next { display: inline-grid; width: 56px; height: 56px; color: #fff; }
body.phone.stage-open #dock .dk-prev .ico, body.phone.stage-open #dock .dk-next .ico { width: 32px; height: 32px; }
body.phone.stage-open #dock .dk-play { width: 72px; height: 72px; color: #000; background: #fff; box-shadow: 0 0 0 1px #fff, 0 10px 40px -8px rgba(255, 255, 255, .5); }
body.phone.stage-open #dock .dk-play .ico { width: 30px; height: 30px; }
body.phone.stage-open #dock .dk-play.loading::after { inset: -6px; }
body.phone.stage-open #dock .dk-ban, body.phone.stage-open #dock .dk-radio, body.phone.stage-open #dock .dk-add,
body.phone.stage-open #dock .dk-queue, body.phone.stage-open #dock .ibtn.sleep { display: inline-grid; grid-row: 3; width: 44px; height: 44px; }
body.phone.stage-open #dock .ibtn.sleep.on { display: inline-flex; width: auto; height: 36px; }
body.phone.stage-open #dock .dk-side .ibtn .ico, body.phone.stage-open #dock .dk-ban .ico { width: 22px; height: 22px; }
@media (max-height: 500px) {            /* телефон на боку: обложки нет, кнопки плотнее */
  body.phone #stage { padding-bottom: calc(var(--safe-b) + 196px); }
  body.phone.stage-open #dock { gap: 6px 0; padding-bottom: calc(var(--safe-b) + 10px); }
  body.phone.stage-open #dock .dk-play { width: 60px; height: 60px; }
}

/* ---------- очередь: лист снизу ---------- */
body.phone.queue-open #qscrim { display: block; position: absolute; inset: 0; z-index: 8; background: rgba(0, 0, 0, .52); animation: fade-in .25s both; }
body.phone #queue, body.phone.stage-open #queue {
  left: 0; right: 0; top: auto; bottom: 0; width: auto; height: min(76%, 660px); z-index: 9;
  padding: 16px 8px var(--safe-b); border-radius: 28px 28px 0 0;
  opacity: 1; pointer-events: auto;
  background: linear-gradient(180deg, rgba(34, 34, 44, .94), rgba(12, 12, 17, .96));
  animation: sheet-in .4s var(--ease) both;
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(46px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
body.phone .q-list { padding-bottom: 20px; }

/* ---------- «Моя волна» ---------- */
body.phone .wave { height: clamp(472px, calc(100vh - 250px), 640px); margin-top: calc(-1 * (var(--top-h) + 20px)); }
body.phone .wave { height: clamp(472px, calc(100svh - var(--safe-t) - var(--under) - var(--mini-h) - 34px), 640px); }
body.phone .wave-title, body.phone.queue-open .wave-title { font-size: var(--wave-f); }
body.phone .wave-glow { top: calc(55% + var(--wave-f) * .46); }
body.phone .wave-ui { top: calc(55% + var(--wave-f) * .88 + 18px); gap: 12px; }
body.phone .wave-prism { width: min(520px, 84%); }
body.phone .wave-hit { width: 48%; min-width: 0; }
body.phone .wave-row { flex-direction: column; flex-wrap: nowrap; gap: 12px; width: 100%; min-width: 0; }
body.phone .wave-sep { display: none; }
/* настроения — лентой во всю ширину экрана: если не помещаются, листаются вбок */
body.phone .wave-moods { display: flex; gap: 8px; width: 100vw; overflow-x: auto; padding: 2px 16px; }
body.phone .wave-moods > .chip { flex: none; }
body.phone .wave-moods > :first-child { margin-left: auto; }
body.phone .wave-moods > :last-child { margin-right: auto; }
body.phone .wave-sub { max-width: 100%; padding: 0 6px; font-size: 13.5px; }
@media (max-height: 500px) {            /* телефон на боку: буквы не во всю ширину, иначе сцена не помещается */
  body.phone { --wave-f: min(calc((100vw - 32px) / 7.92), 58px); }
  body.phone .wave { height: 430px; }
}

/* ---------- полки и карточки ---------- */
body.phone .shelf { margin-top: 26px; }
body.phone .shelf-row { grid-auto-columns: 138px; gap: 12px; margin: -8px -16px 0; padding: 8px 16px 14px; scroll-padding: 0 16px; }
body.phone .shelf-row.mixes { grid-auto-columns: 164px; gap: 10px; }
body.phone .shelf-row.artists { grid-auto-columns: 100px; gap: 14px; }
body.phone .shelf-nav .ibtn, body.phone .card-play { display: none; }
body.phone .card, body.phone .card-art { border-radius: 16px; }
body.phone .card-title { margin-top: 9px; font-size: 13.5px; }
body.phone .card-sub { font-size: 12.5px; }
body.phone .mix { height: 96px; border-radius: 22px; }
body.phone .mix-name { left: 14px; right: 48px; bottom: 13px; font-size: 13.5px; }
body.phone .mix-play { right: 11px; bottom: 11px; width: 32px; height: 32px; }
body.phone .genres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body.phone .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
body.phone .grid.artists { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }

/* ---------- список треков: обложка, название, сердечко и «⋯» ---------- */
body.phone .rows:not(.compact) .row { grid-template-columns: 48px minmax(0, 1fr) 36px 36px; gap: 8px; height: 62px; margin: 0 -6px; padding: 0 0 0 6px; border-radius: 14px; }
body.phone .rows:not(.compact) .row-n, body.phone .rows:not(.compact) .row-note, body.phone .rows:not(.compact) .row-dur,
body.phone .sk-row > span:first-child { display: none; }
body.phone .rows:not(.compact) .row-art { width: 48px; height: 48px; }
body.phone .rows:not(.compact) .row-main { padding-left: 4px; }
body.phone .row .like, body.phone .row .row-more { opacity: 1; width: 36px; height: 36px; }
body.phone .row .like:not(.on) { color: var(--ink-3); }
body.phone .row .like .ico, body.phone .row .row-more .ico { width: 19px; height: 19px; }
body.phone .rows:not(.compact) .row.playing .row-art .eq { display: flex; padding: 15px 0; background: rgba(0, 0, 0, .5); }

/* ---------- шапка страницы ---------- */
body.phone .hero { flex-direction: column; align-items: center; gap: 16px; min-height: 0; padding: 4px 0 20px; text-align: center; }
body.phone .hero::before { left: -20%; top: -150px; width: 140%; }
body.phone .hero-pic { width: 176px; height: 176px; border-radius: 24px; }
body.phone .hero-pic.round { border-radius: 50%; }
body.phone .hero-text { flex: none; width: 100%; justify-items: center; gap: 8px; }
body.phone .hero-actions { justify-content: center; margin-top: 6px; }

/* ---------- коллекция и профиль ---------- */
body.phone .lib { gap: 10px; }
body.phone .lib-tile { padding: 14px; border-radius: 22px; }
body.phone .lib-tile b { font-size: 14.5px; }
body.phone .lib-tile small { font-size: 12.5px; }
body.phone .lib-tile > .ico { left: 14px; top: 14px; }
body.phone .lib-tile .collage { width: 104px; height: 104px; }
body.phone .prof-head { flex-direction: column; gap: 12px; padding: 14px 0 20px; text-align: center; }
body.phone .prof-pic { width: 92px; height: 92px; font-size: 34px; }
body.phone .prof-id { flex: none; width: 100%; justify-items: center; }
body.phone .prof-name { max-width: 100%; }
body.phone .prof-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body.phone .prof-stat { padding: 14px 16px; }
body.phone .prof-pl { margin: 0 -6px; }
body.phone .app-box { flex-wrap: wrap; margin-top: 26px; }
body.phone .app-box .btn { flex: 1 1 100%; }

/* ---------- меню: лист снизу ---------- */
body.phone .menu-guard { background: rgba(0, 0, 0, .52); animation: fade-in .2s both; }
body.phone .menu {
  left: 8px !important; right: 8px; top: auto !important; bottom: calc(var(--safe-b) + 8px);
  min-width: 0; max-width: none; max-height: min(80%, calc(100% - var(--safe-t) - var(--safe-b) - 90px)); overflow-y: auto;     /* сверху всегда остаётся место, чтобы закрыть лист нажатием мимо */
  padding: 8px; border-radius: 26px; transform-origin: 50% 100%;
  animation: sheet-in .32s var(--ease) both;
}
body.phone .menu::before, body.phone .menu::after { display: none; }       /* кромка стекла уезжала бы вместе с прокруткой — вместо неё простая рамка */
body.phone .menu { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13), 0 -20px 60px -20px #000; }
body.phone .menu-item { height: 48px; padding: 0 14px; gap: 14px; border-radius: 14px; font-size: 15.5px; }
body.phone .menu-item .ico { width: 20px; height: 20px; }
body.phone .menu-head { padding: 8px 12px 12px; }
body.phone .menu-title { padding: 10px 14px 2px; font-size: 16px; }
body.phone .menu-note { padding: 0 14px 10px; font-size: 13px; }
body.phone .menu-sep { margin: 5px 14px; }
body.phone .menu .field { height: 46px; border-radius: 14px; }
body.phone .menu-form .btn { width: 46px; height: 46px; }
body.phone .menu-scroll { max-height: 36vh; }

/* ---------- диалоги: лист снизу ---------- */
body.phone .scrim { place-items: end center; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); padding: 0; }     /* клетка — ровно в экран: длинная строка не раздвинет её вширь, высокий диалог не уйдёт за край, а прокрутится внутри */
body.phone .modal, body.phone .modal.wide {
  width: 100%; max-height: calc(100% - var(--safe-t) - 14px);
  padding: 22px 20px calc(var(--safe-b) + 20px); border-radius: 28px 28px 0 0;
  transform: translateY(46px);
}
body.phone .scrim.in .modal { transform: none; }
body.phone .modal-foot .btn { flex: 1; padding: 0 14px; }
body.phone .keys { grid-template-columns: 1fr; }
body.phone .sheet-scrim { padding: 0; }
body.phone .sheet { width: 100%; height: 100%; border-radius: 0; padding-top: var(--safe-t); }

/* ---------- «Кого вы слушаете?» ---------- */
body.phone .ob { padding: calc(var(--safe-t) + 26px) 14px calc(var(--safe-b) + 14px); }
body.phone .ob-title { font-size: 25px; }
body.phone .ob-sub { margin-top: 10px; font-size: 14px; }
body.phone .ob-search { margin-top: 16px; }
body.phone .ob-scroll { margin-top: 12px; padding: 8px 2px 24px; }
body.phone .ar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 8px; }
body.phone .ar-pic { width: 88px; height: 88px; }
body.phone .ob-foot { width: 100%; gap: 8px; margin-top: 12px; }
body.phone .ob-foot .btn { flex: 1; min-width: 0; padding: 0 12px; }
body.phone .ob-foot .btn.solid { flex: 2.2; }

/* ---------- вход и мелочи ---------- */
body.phone .login-card { padding: 30px 22px 22px; border-radius: 30px; }
body.phone #toast { max-width: calc(100vw - 32px); width: max-content; }
body.phone .splash-mark { width: 112px; height: 117px; }
body.phone .splash-word { font-size: 26px; }
