@font-face {
    font-family: "KOTRadio";
    src: url("KOT-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

:root {
    --volume-ui: #373737;
    --volume-mute-scale: 1;
}

img{
  max-width:100%;
  height:auto;
}

.title {
    color: black;
}

.background {
  position: fixed;
  inset: 0;

  background-image: url('https://baghshiv.art/images/radio/zadnik.gif');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;

  z-index: -1;
}


.radio-wrapper{
  position: fixed;
  left: 50%;
  /*top: 52%; */
  top: 230px;  
  transform: translateX(-50%);
  /*transform: translate(-50%, -50%);*/
  z-index: 10;
  /*
  width: min(920px, 95vw);  контейнер почти во всю ширину на мобиле 
  min-width: 400px;
  */
  
width: clamp(400px, 90vw, 520px);  /*max-width: 520px;*/

  
}
.radio-inner{
    position: relative;
}

.plashka{
  /*width: 100%;*/
      width:100%;
    max-width:100%;
    height: auto;
  display: block;
}

.play-btn{
    position: absolute;
    left: 8%;
    top: 26%;
      width: 11%;      /* размер зависит от ширины плашки */
    /*width: clamp(36px, 11%, 64px);*/
    height: auto;
    cursor: pointer;
    z-index: 2;
}

.now-playing {
    position: absolute;
    left: 22%;
    right: 22%;
    top: 23%;
    text-align: center;
    z-index: 4;
    pointer-events: none;
    min-width: 0;
}

.on-air-badge {
    display: block;
    margin: 0 auto 6px;
    width: auto;
    height: clamp(16px, 3.8vw, 28px);
    max-width: min(160px, 55%);
}

.track-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
}

.track-line {
    width: 100%;
    min-height: 1.3em;
}

.track-shell {
    overflow: hidden;
    width: 100%;
    min-height: 1.3em;
    line-height: 1.25;
    /* rgba вместо transparent — иначе iOS Safari часто скрывает весь текст */
    -webkit-mask-image: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 1) 8%,
        rgba(0, 0, 0, 1) 92%,
        rgba(0, 0, 0, 0) 100%
    );
    mask-image: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 1) 8%,
        rgba(0, 0, 0, 1) 92%,
        rgba(0, 0, 0, 0) 100%
    );
}

/* На iOS маска по-прежнему ломает отображение — только overflow */
@supports (-webkit-touch-callout: none) {
    .track-shell {
        -webkit-mask-image: none;
        mask-image: none;
    }
}

.track-shell.is-centered {
    text-align: center;
}

.track-rail {
    display: inline-block;
    white-space: nowrap;
    vertical-align: top;
}

.track-rail.is-scroll {
    will-change: transform;
}

.track-chunk {
    display: inline-block;
    padding: 0 1.25rem;
    white-space: nowrap;
    font-family: "KOTRadio", system-ui, -apple-system, sans-serif;
    font-size: clamp(10px, 2.6vw, 13px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.02em;
}

.track-line--artist .track-chunk {
    color: #4a4a4a;
    -webkit-text-fill-color: #4a4a4a;
}

.track-line--title .track-chunk {
    color: #0a0a0a;
}

.track-gap {
    display: inline-block;
    width: 1.5rem;
    flex-shrink: 0;
}

.about-panel {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 46%;
    bottom: 5%;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(8px, 2.5vw, 18px);
    align-items: stretch;
    pointer-events: none;
}

.about-col--text {
    pointer-events: auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.about-heading-img {
    display: block;
    width: clamp(72px, 24%, 120px);
    height: auto;
    margin-bottom: 6px;
    max-width: 100%;
    flex-shrink: 0;
}

.about-explication {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(9px, 2.1vw, 12px);
    font-weight: 500;
    line-height: 1.35;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.about-explication.is-placeholder {
    opacity: 0.55;
}

.about-col--gallery {
    justify-self: stretch;
    align-self: start;
    width: 100%;
    min-width: 0;
    pointer-events: auto;
}

.gallery-thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    max-width: none;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.gallery-thumb:hover {
    filter: brightness(1.05);
    transform: scale(1.01);
}

.gallery-thumb:focus-visible {
    outline: 2px solid var(--volume-ui);
    outline-offset: 3px;
}

.gallery-thumb--placeholder {
    object-fit: contain;
    padding: 12%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.35);
    cursor: default;
    pointer-events: none;
}

.gallery-thumb--placeholder:hover {
    filter: none;
    transform: none;
}

/* Иконка + ползунок одной колонкой: общий правый край, линия не шире иконки */
.volume-stack {
    position: absolute;
    right: 8%;
    top: 24%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    width: clamp(48px, 13vw, 76px);
    pointer-events: auto;
}

/* Слот фиксирован по loud.svg (61.6×59.57): иначе kolonka выше в потоке и сдвигает ползунок */
.volume-icon-slot {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: calc(100% * 59.57 / 61.6);
    flex-shrink: 0;
    overflow: visible;
    cursor: pointer;
}

.volume-icon-slot:focus {
    outline: none;
}

.volume-icon-slot:focus-visible {
    outline: 2px solid var(--volume-ui);
    outline-offset: 3px;
}

.volume-icon-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
    object-position: top right;
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.1s linear;
}

.volume-icon-layer--loud {
    opacity: 1;
}

.volume-icon-layer--mute {
    opacity: 0;
    transform: scale(var(--volume-mute-scale));
}

.volume-stack .volume-range {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    max-width: 100%;
    height: 18px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    color: var(--volume-ui);
    accent-color: var(--volume-ui);
}

.volume-stack .volume-range::-webkit-slider-runnable-track {
    height: 2px;
    background: var(--volume-ui);
    border: none;
}

.volume-stack .volume-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    margin-top: -4px;
    border-radius: 50%;
    background: var(--volume-ui);
    border: none;
    box-shadow: none;
}

.volume-stack .volume-range::-moz-range-track {
    height: 2px;
    background: var(--volume-ui);
    border: none;
}

.volume-stack .volume-range::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: var(--volume-ui);
    box-shadow: none;
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.88);
    padding: 4vmin;
    box-sizing: border-box;
    animation: lightbox-fade-in 0.18s ease-out;
}

.lightbox[hidden] {
    display: none;
}

@keyframes lightbox-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox__stage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.lightbox__image {
    max-width: 92vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.55);
    border-radius: 4px;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font: 400 28px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
    padding: 0;
}

.lightbox__close:hover,
.lightbox__nav:hover {
    background: rgba(0, 0, 0, 0.75);
}

.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.lightbox__close {
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    font-size: 30px;
}

.lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    font-size: 38px;
}

.lightbox__nav:hover {
    transform: translateY(-50%) scale(1.05);
}

.lightbox__nav--prev {
    left: 18px;
}

.lightbox__nav--next {
    right: 18px;
}

.lightbox__nav[hidden] {
    display: none;
}

.lightbox__counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font: 400 14px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
    letter-spacing: 0.04em;
    background: rgba(0, 0, 0, 0.45);
    padding: 6px 12px;
    border-radius: 999px;
    pointer-events: none;
}

.lightbox__counter:empty {
    display: none;
}

@media (max-width: 600px) {
    .lightbox__nav {
        width: 44px;
        height: 44px;
        font-size: 30px;
    }
    .lightbox__nav--prev {
        left: 8px;
    }
    .lightbox__nav--next {
        right: 8px;
    }
    .lightbox__close {
        top: 10px;
        right: 10px;
    }
}
