* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

.image-section {
  flex: 0 0 75%;
  overflow: hidden;
  background: #000;
}

.image-frame {
  position: relative;
  height: 100%;
  aspect-ratio: 392 / 565;
  width: min(100%, calc(100vh * 0.52));
  margin: 0 auto;
}

.mary-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  background: #000;
}

.menu-toggle {
  position: absolute;
  top: 108px;
  left: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(14, 31, 47, 0.78);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  cursor: pointer;
  z-index: 3;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: white;
}

.menu-overlay[hidden] {
  display: none;
}

.menu-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.28);
}

.menu-panel {
  position: absolute;
  top: 30px;
  left: 14px;
  width: min(320px, calc(100% - 28px));
  max-height: calc(100% - 44px);
  overflow-y: auto;
  border-radius: 18px;
  background: rgba(14, 31, 47, 0.96);
  color: white;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  font-family: 'Cinzel', Georgia, serif;
}

.menu-nav {
  display: flex;
  gap: 8px;
  padding: 14px 14px 0;
}

.menu-nav-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

.menu-nav-btn.is-active {
  background: rgba(107, 163, 212, 0.26);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.menu-content {
  padding: 14px;
}

.menu-section {
  display: none;
}

.menu-section.is-active {
  display: block;
}

.menu-home-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.02em;
}

/* Keep serif caps for a readable capital I, but preserve lowercase radio. */
.menu-home-title-caps {
  font-family: 'Cinzel', Georgia, serif;
}

.menu-home-title-radio {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.08em;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
}

.menu-home-copy {
  font-size: 15px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.86);
}

.info-block + .info-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.info-block p {
  font-size: 14px;
  line-height: 1.5;
}

.info-heading {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.menu-email {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-variant: normal;
  letter-spacing: normal;
}

.mobile-only-link {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

.station-sub-label {
  display: block;
  margin-top: 2px;
  font-size: 8px;
  letter-spacing: 0.02em;
}

.control-section {
  flex: 0 0 25%;
  background: linear-gradient(135deg, #6ba3d4 0%, #5a94c2 100%);
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  overflow-y: auto;
}

.stations-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 500px;
}

.station-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: opacity 0.2s;
}

.station-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.station-btn:not(:disabled):hover {
  opacity: 0.8;
}

.station-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(100, 150, 220, 0.9);
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 12px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.station-btn.is-active .station-circle {
  border-color: #000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.28);
}

.station-label {
  font-size: 10px;
  color: white;
  text-align: center;
  line-height: 1.2;
}

.station-freq {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: bold;
}

.player-section {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .image-frame {
    width: 100%;
  }

  .menu-toggle {
    top: 104px;
    left: 28px;
  }

  body.is-iphone .menu-toggle {
    top: 104px;
    left: 28px;
  }

  body.is-android .menu-toggle {
    top: 116px;
    left: 14px;
  }

  .menu-panel {
    top: 24px;
    left: 10px;
    width: min(300px, calc(100% - 20px));
    max-height: calc(100% - 34px);
  }

  .mobile-only-link {
    color: #d9efff;
    text-decoration: underline;
    pointer-events: auto;
  }

  .image-section {
    flex: 0 0 68%;
  }

  .mary-image {
    object-fit: contain;
    padding-bottom: 0;
  }

  .control-section {
    flex: 0 0 32%;
    padding: 8px 10px 8px;
    gap: 6px;
  }

  .stations-grid {
    gap: 8px;
    max-width: 360px;
  }

  .station-btn {
    gap: 4px;
  }

  .station-circle {
    width: 52px;
    height: 52px;
    font-size: 11px;
  }

  .station-label {
    font-size: 9px;
    line-height: 1.1;
  }

  .station-sub-label {
    font-size: 7px;
  }

  .player-section {
    margin-top: 4px;
  }

  #audio-player {
    max-width: 260px !important;
  }
}
