/* Mobile presentation; playback and desktop layout remain shared. */
.hero-player, .mobile-news-label, .more-news, .mobile-presenter { display: none; }
.news-index { padding: 24px; }
.news-index h1 { margin-bottom: 20px; }
.news-index-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.news-index-grid .news-card { position: relative; min-height: 220px; }
@media (max-width: 700px) {
  :root { font-family: 'DM Sans', sans-serif; --mobile-edge: 15px; background: #101115; }
  main { background: #101115; }
  header { isolation: isolate; height: auto; padding: 64px var(--mobile-edge) 20px; background: #590c10 url('/assets/mobile-hero.png') center / 100% 100% no-repeat; overflow: visible; isolation: auto; }
  header::before, header::after { content: none; }
  .mobile-brand { position: fixed; z-index: 60; top: 0; left: 0; right: 0; padding: 0 var(--mobile-edge); height: 64px; display: flex; align-items: center; justify-content: center; }
  .mobile-brand > a { display: block; }
  .mobile-brand .logo { width: 68px; height: 43px; }
  .mobile-brand .header-phone { position: absolute; right: 10px; top: 9px; width: 44px; height: 44px; display: grid; place-items: center; }
  .header-phone svg { width: 29px; height: 29px; }
  #menu { position: absolute; top: 10px; left: 10px; width: 44px; height: 44px; background: transparent; }
  #menu span { left: 5px; width: 32px; height: 3px; top: 20px; }
  #menu span:nth-child(2) { width: 38px; --line-delay: 32ms; }
  #menu span:first-child { transform: translateY(-10px); }
  #menu span:last-child { transform: translateY(10px); --line-delay: 64ms; }
  .mobile-menu > #menu { left: 10px; top: 10px; }
  .menu-panel { background: #171719; }
  .mobile-menu a:focus-visible { outline: none; text-decoration: underline; text-underline-offset: .2em; }
  #menu:focus-visible span:nth-child(2) { width: 27px; }

  @media (prefers-reduced-motion: no-preference) {
    #menu span {
      overflow: hidden;
      background: transparent;
    }
    #menu span::before {
      content: '';
      position: absolute;
      inset: 0 auto 0 0;
      width: calc(200% + 5px);
      background: linear-gradient(to right, white calc(50% - 2.5px), transparent calc(50% - 2.5px) calc(50% + 2.5px), white calc(50% + 2.5px));
    }
    .mobile-menu.is-open #menu span::before {
      animation: menu-line-through .36s ease-in-out var(--line-delay,0ms);
    }
    .mobile-menu[open]:not(.is-open) #menu span::before {
      animation: menu-line-back .18s ease-in-out var(--line-delay,0ms);
    }
    @keyframes menu-line-through {
      from { transform: translateX(calc(-50% - 2.5px)); }
      to { transform: translateX(0); }
    }
    @keyframes menu-line-back {
      from { transform: translateX(0); }
      to { transform: translateX(calc(-50% - 2.5px)); }
    }
  }
  .cover { display: none; }
  .on-air { position: relative; inset: auto; width: 100%; max-width: none; min-height: 0; padding: 0; margin: 36px 0; gap: 13px; background: transparent; }
  .on-air .show-art { display: grid; width: 40%; height: auto; aspect-ratio: 1; border-radius: 8px; background: #ffffff09; }
  .show-art > img { width: 100%; height: 100%; object-fit: cover; }
  .show-art .logo { width: 75%; height: 55%; }
  .show-copy { min-width: 0; flex: 1; }
  .mobile-now { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; line-height: 1.3; color: #b9b4b5; margin-bottom: 3px; }
  .mobile-now::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #df262b; }
  .show-copy h1 { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; hyphens: auto; text-transform: uppercase; font-size: clamp(20px,5.6vw,32px); font-weight: 750; line-height: .98; letter-spacing: -.045em; }
  .mobile-presenter:not(:empty) {
    display: block;
    margin: 2px 0 0;
    color: #dbd5d7;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .on-air .show-actions { display: none; }
  .hero-player { position: relative; display: flex; align-items: center; gap: 13px; min-height: 70px; border-radius: 9px; background: #271b1b; overflow: hidden; }
  .hero-player .mini-cover { width: 70px; height: 70px; border-radius: 8px; overflow: hidden; background: #411d21; }
  .hero-track { flex: 1; min-width: 0; }
  .hero-track-label { display: block; color: #bdb7b7; font-size: 13px; line-height: 1.2; margin-bottom: 3px; font-weight: 500; }
  .hero-track-line { white-space: nowrap; overflow: hidden; font-size: 19px; line-height: 1.2; letter-spacing: -.04em; mask-image: linear-gradient(to right,black 85%,transparent); }
  .hero-track-line strong { font-weight: 750; }
  .hero-play { display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; padding: 0; margin-right: 12px; border-radius: 50%; color: white; background: #d92528; }
  .hero-play svg { width: 33px; height: 33px; }
  .hero-player [data-radio-ad-progress] { position: absolute; left: 70px; bottom: 0; width: calc(100% - 70px); height: 4px; appearance: none; border: 0; background: transparent; color: #ffdb00; }
  .hero-player [data-radio-ad-progress]::-webkit-progress-bar { background: transparent; }
  .hero-player [data-radio-ad-progress]::-webkit-progress-value { background: #ffdb00; }
  .hero-player [data-radio-ad-progress]::-moz-progress-bar { background: #ffdb00; }
  .hero-player [data-radio-ad-progress][hidden] { display: none; }
  .mobile-intro { display: none; }
  .news { touch-action: pan-y pinch-zoom; background: #d92528; padding: 11px 0 15px; }
  .news > .section-heading { margin: 0 0 5px; padding: 0 var(--mobile-edge); }
  .news .ribbon { background: transparent; padding: 0; font-size: 24px; line-height: 1.1; letter-spacing: -.035em; font-weight: 750; }
  .desktop-news-label, .news > .section-heading > span { display: none; }
  .mobile-news-label { display: inline; }
  .news-grid {
    display: grid;
    grid-template-columns: minmax(0,64%) minmax(0,1fr);
    grid-template-rows: 104px 64px;
    gap: 8px;
    height: auto;
    padding-inline: var(--mobile-edge);
  }
  .news-grid .news-card { display: block; height: auto; min-height: 0; border-radius: 8px; }
  .news-grid .news-0 { grid-column: 1; grid-row: 1 / 3; }
  .news-grid .news-1 {
    grid-column: 2;
    grid-row: 1;
    margin-right: calc(-1 * var(--mobile-edge));
    border-radius: 8px 0 0 8px;
    mask-image: linear-gradient(to right, black 38%, rgba(0,0,0,.65) 67%, transparent 99%);
    -webkit-mask-image: linear-gradient(to right, black 38%, rgba(0,0,0,.65) 67%, transparent 99%);
  }
  .news-grid .news-1::before {
    content: '';
    position: absolute;
    inset: 0 0 0 48%;
    z-index: 2;
    pointer-events: none;
    -webkit-backdrop-filter: blur(2.5px);
    backdrop-filter: blur(2.5px);
    -webkit-mask-image: linear-gradient(to right, transparent, black 80%);
    mask-image: linear-gradient(to right, transparent, black 80%);
  }
  .news-grid .news-1 h3 { width: calc((100vw - 2 * var(--mobile-edge)) * .64 - 22px); }
  .news-grid .news-2, .news-grid .news-3 { display: none; }
  .news-card h3, .news-0 h3 { font-size: 22px; line-height: 1.02; letter-spacing: -.04em; font-weight: 700; bottom: 12px; left: 11px; right: 11px; }
  .news-1 h3 { font-size: 20px; bottom: 10px; }
  .news-kicker, .news-end { display: none; }
  .more-news { position: relative; display: flex; align-items: center; grid-column: 2; grid-row: 2; width: 100%; padding: 8px; border-radius: 8px; font-size: clamp(18px,5.9vw,23px); font-weight: 700; letter-spacing: -.04em; line-height: .95; background: #a71f20; color: white; }
  .more-news svg { margin-left: auto; width: 20px; height: 26px; }
  .ad-mobile { background: #1c1d23; padding: 0 var(--mobile-edge); }
  .ad-mobile .ad-label { margin: 0 calc(-1 * var(--mobile-edge)) 0; padding: 11px var(--mobile-edge) 3px; background: #101115; text-align: left; font-size: 13px; letter-spacing: .025em; font-weight: 400; color: #929298; }
  .contact-section { padding-top: 20px; }
  .contact-section .ribbon, .programme .ribbon { background: transparent; font-size: 21px; letter-spacing: -.025em; }
  .contact-section .section-heading > span { display: none; }
  .programme { padding-top: 12px; }
  .bottom-player { height: 62px; background: #211a1d; box-shadow: 0 -1px 0 #ffffff12; }
  .bottom-player .round { background: var(--red); color: white; }
  .bottom-player .mini-cover { height: 62px; width: 62px; }
  .news-index { padding: 20px var(--mobile-edge); }
  .news-index-grid { grid-template-columns: 1fr; gap: 12px; }
  .news-index-grid .news-card { height: 185px; min-height: 0; border-radius: 9px; }
  footer { background: #151519; }
  .startup-screen { animation-delay: .25s; }
  .startup-screen .logo { animation: startup-logo .25s ease both; }
}
@media (min-width: 500px) and (max-width: 700px) {
  .news-grid { grid-template-rows: 145px 85px; }
}
@media (prefers-reduced-motion: reduce) {
  .news-grid { scroll-behavior: auto; }
}

/* One transform-driven progress indicator for mobile and desktop. */
[data-radio-ad-progress] { overflow: hidden; }
.ad-progress-fill { display: block; width: 100%; height: 100%; background: #ffdb00; transform: scaleX(0); transform-origin: left center; }
[data-radio-ad-progress][hidden] { display: none; }
@media (max-width:700px) {
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  body.page-scrolled .mobile-brand { background: #20171bf5; box-shadow: 0 1px 5px #0002; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .home-page > .contact-section, .home-page > .programme { display: none; }
  .bottom-player.hero-player { position: fixed; z-index: 50; left: var(--mobile-edge); right: var(--mobile-edge); bottom: max(10px, env(safe-area-inset-bottom)); height: 70px; min-height: 70px; padding: 0; margin: 0; border-radius: 9px; background: #271b1b; gap: 13px; box-shadow: 0 0 8px #0006; }
  .bottom-player.hero-player .mini-cover { width: 70px; height: 70px; }
  .hero-player [data-radio-ad-progress], #radio-ad-progress { top: auto; bottom: 0; left: 70px; width: calc(100% - 70px); height: 4px; background: transparent; }
  .hero-player .ad-progress-fill { background: #ffdb00; }
  .news-index, .article { scroll-margin-top: 74px; }
}

/* Scroll controls enter gently and reverse cleanly when returning to the top. */
@media (max-width:700px) {
  .mobile-brand { transition: background-color .38s ease-in-out, box-shadow .38s ease-in-out; }
  .bottom-player.hero-player {
    opacity: 0;
    transform: translate3d(0,calc(100% + max(10px,env(safe-area-inset-bottom)) + 8px),0);
    visibility: hidden;
    pointer-events: none;
    transition: opacity .26s ease-out, transform .48s cubic-bezier(.25,.65,.3,1), visibility 0s linear .48s;
  }
  body.player-revealed .bottom-player.hero-player {
    opacity: 1;
    transform: translate3d(0,0,0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: .12s, .12s, 0s;
  }
}
@media (max-width:700px) and (prefers-reduced-motion: reduce) {
  .mobile-brand { transition-duration: .12s; }
  .bottom-player.hero-player {
    transform: none;
    transition: opacity .12s ease, visibility 0s linear .12s;
  }
  body.player-revealed .bottom-player.hero-player { transform: none; transition-delay: 0s; }
}

@media (max-width:700px) {
  .hero-player .mini-cover { z-index: 1; }
  .hero-player [data-radio-ad-progress], #radio-ad-progress {
    left: 60px;
    width: calc(100% - 60px);
    z-index: 0;
  }
}

.image-credit { display: block; }
.image-details { margin-top: 5px; }
.image-details summary { cursor: pointer; width: fit-content; color: inherit; }
.image-details p { margin-top: 6px; }
@media (max-width:700px) {
  .bottom-player.hero-player { background: #1d161a; }
  body.news-view header { padding: 64px 0 0; background: #101115; }
  body.news-view header .on-air, body.news-view header .hero-player { display: none; }
  body.news-view .mobile-brand { background: #d92528; box-shadow: 0 1px 5px #0002; }
  body.news-view .page-bar { height: 46px; }
  body.news-view .page-back { height: 46px; width: 46px; }
  .page-back svg { width: 34px; height: 34px; }
  body.news-view .page-path { font-family: 'DM Sans',sans-serif; font-size: 24px; line-height: 1; font-weight: 700; text-transform: uppercase; letter-spacing: -.025em; }
  body.news-view .bottom-player.hero-player { opacity: 1; transform: translate3d(0,0,0); visibility: visible; pointer-events: auto; transition-delay: 0s; }
}
