/* Плеер: своего «стиля игры» у него нет — тёмное стекло и бумажные билеты, характер даёт картинка впечатления */
@font-face {
  font-family: 'Jost'; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(../vendor/fonts/jost-var-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Jost'; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(../vendor/fonts/jost-var-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --paper: #f3f0ea; --ink: #1b1b1d; --mute: #77757a; --line: #d9d4ca; --accent: #e2553a; --night: #141012;
  --glass: rgba(20, 20, 22, .72); --font: 'Jost', 'Futura PT', 'Futura', 'Century Gothic', 'Montserrat', Arial, sans-serif;
  --sb: env(safe-area-inset-bottom, 0px); --sr: env(safe-area-inset-right, 0px);
}
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); font-family: var(--font); overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

/* В iframe env(safe-area-inset-*) всегда ноль, поэтому игру ставим внутрь безопасной зоны сами: на телефоне с вырезом по краю — тёмная полоса */
#stage { position: fixed; inset: 0; background: var(--night); }
#stage iframe { position: absolute; border: 0; display: block; background: var(--night);
  left: env(safe-area-inset-left, 0px); right: env(safe-area-inset-right, 0px); top: env(safe-area-inset-top, 0px); bottom: env(safe-area-inset-bottom, 0px);
  width: calc(100% - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); height: calc(100% - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }

/* Веки: сходятся сверху и снизу, на тёмном — название следующего впечатления */
#lids { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
#lids .lid { position: absolute; left: -10%; width: 120%; height: 64%; background: var(--night);
  transition: transform .7s cubic-bezier(.6, 0, .3, 1); }
#lids .top { top: 0; border-radius: 0 0 50% 50% / 0 0 18vh 18vh; transform: translateY(-105%); }
#lids .bottom { bottom: 0; border-radius: 50% 50% 0 0 / 18vh 18vh 0 0; transform: translateY(105%); }
#lids.shut .lid { transform: none; }
#lids.shut { pointer-events: auto; }
#splash { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--paper);
  opacity: 0; transition: opacity .4s; }
#lids.shut.titled #splash { opacity: 1; transition-delay: .35s; }
#splash b { display: block; font: 400 clamp(26px, 5vw, 44px) var(--font); letter-spacing: .3em; text-transform: uppercase; padding-left: .3em; }
#splash small { display: block; margin-top: 10px; font: 400 16px var(--font); opacity: .6; }

/* Свёрнуто: в углу — то, что идёт сейчас, и стопка следующих */
#mini { position: fixed; right: calc(20px + var(--sr)); bottom: calc(20px + var(--sb)); z-index: 20; display: flex; align-items: center; gap: 10px;
  background: rgba(20, 20, 22, .6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--paper);
  border-radius: 12px; padding: 6px 10px 6px 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 24px rgba(0, 0, 0, .35);
  transition: opacity .6s; }
#mini.idle { opacity: .12; }
#mini.idle:hover { opacity: 1; }
#mini .mp { width: 56px; height: 38px; border-radius: 5px; background: center / cover; }
#mini .mn { font: 500 17px var(--font); white-space: nowrap; }
#mini .stack { display: flex; margin-left: 6px; }
#mini .stack i { width: 26px; height: 38px; border-radius: 4px; margin-left: -8px; background: center / cover; box-shadow: 0 0 0 2px rgba(20, 20, 22, .9); }
#mini .stack i:first-child { margin-left: 0; }
#mini kbd { font: 600 11px var(--font); border: 1.5px solid rgba(243, 240, 234, .6); border-radius: 4px; padding: 1px 5px; opacity: .8; }
#mini .chev { display: none; opacity: .7; font-size: 14px; }

/* Открыто: панель справа, листается вниз */
#panel { position: fixed; z-index: 25; top: 16px; right: calc(16px + var(--sr)); max-height: calc(100% - 32px - var(--sb)); width: 372px; max-width: calc(100vw - 32px);
  border-radius: 14px; background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(.6); backdrop-filter: blur(18px) saturate(.6);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 60px rgba(0, 0, 0, .45); display: flex; flex-direction: column; color: var(--paper);
  animation: slide .25s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
#panel .handle { display: none; }
.ph { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px 16px 6px; }
#search { flex: 1; min-width: 0; background: rgba(255, 255, 255, .1); border: 0; border-radius: 8px; padding: 9px 12px; font: 400 15px var(--font); color: var(--paper); outline: none; }
#search::placeholder { color: rgba(243, 240, 234, .5); }
#close { margin-left: auto; width: 32px; height: 32px; font-size: 24px; line-height: 1; opacity: .7; }
#close:hover { opacity: 1; }
#chips { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
#chips:empty { display: none; }
#chips button { font: 500 13px var(--font); padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: rgba(243, 240, 234, .8); }
#chips button.on { background: var(--paper); color: var(--ink); }
#list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 14px 14px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.sec { font: 500 12px var(--font); letter-spacing: .18em; text-transform: uppercase; color: rgba(243, 240, 234, .55); margin: 14px 4px 7px; display: flex; justify-content: space-between; }
.empty { margin: 24px 4px; font-size: 15px; opacity: .6; }

/* Билет: картинка, название, корешок с номером; вырезы — по линии отрыва */
.tk { --cut: calc(100% - 59px); position: relative; display: flex; align-items: center; width: 100%; height: 68px; text-align: left;
  background: var(--paper); color: var(--ink); border-radius: 6px; margin-bottom: 8px;
  -webkit-mask: radial-gradient(circle 7px at var(--cut) 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 7px at var(--cut) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 7px at var(--cut) 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 7px at var(--cut) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  transition: transform .15s; }
.tk:hover, .tk:focus-visible { transform: translateX(-4px); outline: none; }
.tk .pic { width: 92px; height: 56px; margin-left: 6px; border-radius: 3px; background: #999 center / cover; flex: none; }
.tk .tx { flex: 1; min-width: 0; padding: 0 10px 0 12px; }
.tk .nm { font: 600 19px/1.1 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk .sb { font: 400 13.5px/1.3 var(--font); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk .no { width: 58px; align-self: stretch; border-left: 2px dashed var(--line); display: flex; align-items: center; justify-content: center; font: 500 20px var(--font); color: var(--mute); flex: none; }
.tk .no small { font-size: 11px; margin-right: 1px; }
.tk.now { box-shadow: inset 0 0 0 2px var(--accent); }
.tk.now .no { color: var(--accent); }
.tk .tag { position: absolute; right: 66px; top: 6px; font: 600 9.5px var(--font); letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--accent); padding: 2px 6px; border-radius: 3px; }
.tk .tag.draft { background: #6b6870; }
.tk.draft .pic { filter: grayscale(.6); }

/* Кнопка звука: слева от карточки, такое же стекло; полоски — спектр радио, лежат, когда оно выключено */
#snd { position: fixed; z-index: 20; right: calc(20px + var(--sr) + var(--miniw, 260px) + 10px); bottom: calc(20px + var(--sb)); width: 50px; height: 50px;
  border-radius: 12px; background: rgba(20, 20, 22, .6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--paper);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 24px rgba(0, 0, 0, .35); display: grid; place-items: center; transition: opacity .6s; }
#snd.idle { opacity: .12; }
#snd.idle:hover { opacity: 1; }
#snd.open { opacity: 1; box-shadow: inset 0 0 0 2px var(--accent), 0 8px 24px rgba(0, 0, 0, .35); }
#snd .eq { display: flex; gap: 3px; align-items: flex-end; height: 18px; pointer-events: none; }
#snd .eq i { width: 4px; height: 3px; border-radius: 2px; background: var(--paper); }
#snd.off .eq i { height: 3px !important; opacity: .55; }

/* Окно звука: над кнопкой, то же тёмное стекло */
#sound { position: fixed; z-index: 25; right: calc(16px + var(--sr)); bottom: calc(82px + var(--sb)); width: 348px; max-width: calc(100vw - 32px);
  max-height: calc(100% - 98px - var(--sb)); overflow-y: auto; box-sizing: border-box;
  border-radius: 14px; background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(.6); backdrop-filter: blur(18px) saturate(.6);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 20px 60px rgba(0, 0, 0, .45); color: var(--paper); padding: 12px 16px 18px;
  animation: lift .2s ease-out; }
@keyframes lift { from { transform: translateY(12px); opacity: 0; } }
#sound .handle { display: none; }
#sound .hd { display: flex; align-items: center; margin-bottom: 8px; }
#sound .hd b { font: 500 12px var(--font); letter-spacing: .18em; text-transform: uppercase; color: rgba(243, 240, 234, .55); }
#sound .x { margin-left: auto; width: 32px; height: 32px; font-size: 24px; line-height: 1; opacity: .7; }
#sound .x:hover { opacity: 1; }
#sound .sec { margin: 16px 2px 6px; }

/* В эфире: бумажный билет, на корешке — выключатель */
.air { --cut: calc(100% - 71px); display: flex; align-items: stretch; height: 74px; background: var(--paper); color: var(--ink); border-radius: 6px;
  -webkit-mask: radial-gradient(circle 7px at var(--cut) 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 7px at var(--cut) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 7px at var(--cut) 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 7px at var(--cut) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; }
.air .tx { flex: 1; min-width: 0; padding: 10px 12px 0 14px; }
.air .lv { font: 600 9.5px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.air .lv::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.air .st { font: 600 18px/1.25 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.air .tr { font: 400 13.5px/1.3 var(--font); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.air .pw { width: 70px; border-left: 2px dashed var(--line); display: grid; place-items: center; flex: none; }
.air .sw { width: 40px; height: 24px; border-radius: 99px; background: var(--accent); position: relative; transition: background .2s; }
.air .sw::after { content: ''; position: absolute; top: 3px; left: 19px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: left .2s; }
.air .pw:focus-visible { outline: none; }
.air .pw:focus-visible .sw { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.air.off .lv { color: var(--mute); }
.air.off .lv::before { background: var(--mute); }
.air.off .st { color: var(--mute); }
.air.off .sw { background: #c9c3b8; }
.air.off .sw::after { left: 3px; }

/* Станции */
.sts { display: flex; flex-direction: column; gap: 6px; }
.stn { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 6px; background: rgba(255, 255, 255, .07); font: 500 15px var(--font); color: rgba(243, 240, 234, .85); text-align: left; }
.stn:hover { background: rgba(255, 255, 255, .12); }
.stn small { margin-left: auto; font: 400 12.5px var(--font); color: var(--accent); }
.stn .dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(243, 240, 234, .5); flex: none; }
.stn.on { background: rgba(243, 240, 234, .16); color: var(--paper); }
.stn.on .dot { background: var(--accent); box-shadow: none; }

/* Громкость */
.vol { display: grid; grid-template-columns: 74px 1fr 32px; align-items: center; gap: 10px; margin-top: 10px; }
.vol .nm { font: 500 15px var(--font); }
.vol .nm small { display: block; font: 400 11.5px var(--font); color: rgba(243, 240, 234, .45); margin-top: 1px; }
.vol .n { font: 500 14px var(--font); color: rgba(243, 240, 234, .6); text-align: right; font-variant-numeric: tabular-nums; }
.vol input { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: none; cursor: pointer; --v: 50%; }
.vol input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(var(--paper), var(--paper)) 0 / var(--v) 100% no-repeat, rgba(255, 255, 255, .14); }
.vol input::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(var(--paper), var(--paper)) 0 / var(--v) 100% no-repeat, rgba(255, 255, 255, .14); }
.vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); border: 0; }
.vol input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); border: 0; }
.vol input:focus-visible { outline: none; }
.vol input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(226, 85, 58, .7); }
.vol.dim .nm, .vol.dim .n { opacity: .45; }
.vol.dim input::-webkit-slider-runnable-track { background: linear-gradient(#8d8a86, #8d8a86) 0 / var(--v) 100% no-repeat, rgba(255, 255, 255, .14); }
.vol.dim input::-webkit-slider-thumb { background: #8d8a86; }

/* Телефон: таблетка внизу по центру и шторка снизу */
@media (pointer: coarse), (max-width: 600px) {
  #mini { right: auto; left: 50%; transform: translateX(-50%); border-radius: 99px; padding: 5px 14px 5px 5px; }
  #mini .mp { width: 34px; height: 34px; border-radius: 50%; }
  #mini .mn { font-size: 15px; }
  #mini .stack, #mini kbd { display: none; }
  #mini .chev { display: block; }
  #mini.idle { opacity: .35; }
  #panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: min(78vh, 640px); border-radius: 18px 18px 0 0;
    padding-bottom: var(--sb); animation-name: rise; }
  @keyframes rise { from { transform: translateY(40px); opacity: 0; } }
  #panel .handle { display: block; width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .35); margin: 8px auto 0; }
  .tk { --cut: calc(100% - 51px); }
  .tk .no { width: 50px; }
  .tk .tag { right: 58px; }
  .tk:hover { transform: none; }
  #snd { right: calc(16px + var(--sr)); width: 46px; height: 46px; border-radius: 50%; }
  #snd.idle { opacity: .35; }
  #sound { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: min(86vh, 640px); border-radius: 18px 18px 0 0;
    padding: 0 18px calc(18px + var(--sb)); animation-name: rise; }
  #sound .handle { display: block; width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .35); margin: 8px auto 6px; }
  .vol { grid-template-columns: 70px 1fr 32px; margin-top: 14px; }
  .vol input { height: 30px; }
  .vol input::-webkit-slider-thumb { width: 24px; height: 24px; margin-top: -10px; }
  .vol input::-moz-range-thumb { width: 24px; height: 24px; }
}
