:root {
  --bg: #1b0c36;
  --purple: #c86aff;
  --lav: #e6c6ff;
  --muted: #c6a9d8;
  --white: #fff;
  --line: rgba(222, 154, 255, 0.23);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: white;
  background: #1b0c36;
  font-family: Outfit, "FC Vision", sans-serif;
  overflow-x: hidden;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible {
  outline: 2px solid #efc4ff;
  outline-offset: 3px;
}
.page {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  background: radial-gradient(ellipse at 23% 17%, #4c1678 0%, transparent 34%),
    radial-gradient(ellipse at 87% 28%, #34135c 0%, transparent 43%),
    linear-gradient(180deg, #1a0a32 0%, #2a104b 48%, #210d3c 74%, #1b0b35 100%);
}
.aurora {
  position: absolute;
  inset: 0 0 auto;
  height: 860px;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}
.aurora:before,
.aurora:after {
  content: "";
  position: absolute;
  width: 56vw;
  height: 42vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.19;
  animation: drift 16s ease-in-out infinite alternate;
}
.aurora:before {
  background: #d83aff;
  left: -22%;
  top: 4%;
}
.aurora:after {
  background: #7349f5;
  right: -23%;
  top: 9%;
  animation-delay: -8s;
}
@keyframes drift {
  to {
    transform: translate(11%, 13%) scale(1.12);
  }
}
.container {
  width: min(1160px, calc(100% - 72px));
  margin: auto;
}
.brand {
  padding: 44px 0 40px;
  display: flex;
  justify-content: center;
}
.brand-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  line-height: 1.12;
}
.brand-symbol {
  width: 130px;
  height: 100px;
  position: relative;
  display: grid;
  place-items: center;
}
.brand-c {
  font: 800 98px/0.8 Outfit;
  color: #f10b22;
  letter-spacing: -12px;
  transform: translateX(-5px);
}
.brand-chip {
  position: absolute;
  right: -9px;
  top: 34px;
  background: #e51024;
  color: white;
  border-radius: 20px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.brand-name {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.8px;
}
.brand-fm {
  font-size: 11px;
  letter-spacing: 1.1px;
  color: #e2c8f3;
}
.hero {
  min-height: 490px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  position: relative;
  padding: 20px 0 65px;
}
.art-stage {
  height: 435px;
  display: grid;
  place-items: center;
  position: relative;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: transform 0.35s ease-out;
}
.halo {
  position: absolute;
  width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(206, 116, 255, 0.34);
  animation: slowspin 24s linear infinite;
}
.halo:before {
  content: "";
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  border: 1px solid rgba(223, 151, 255, 0.18);
}
.halo:after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  box-shadow: 0 0 18px 7px #d05cff;
  border-radius: 50%;
  left: 50%;
  top: -5px;
}
@keyframes slowspin {
  to {
    transform: rotate(360deg);
  }
}
.artwork {
  width: min(365px, 82%);
  aspect-ratio: 1;
  position: relative;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(
    from 20deg,
    #ffffff,
    #c35dff,
    #6b3aff,
    #ffe0ff,
    #ae42f5,
    #ffffff
  );
  box-shadow: 0 0 18px #c960ff, 0 0 70px #a229ff80, 0 20px 80px #090317;
  animation: float 6s ease-in-out infinite;
}
.artwork img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  filter: saturate(1.06);
}
.artwork:after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: linear-gradient(
    130deg,
    rgba(255, 255, 255, 0.26),
    transparent 35%,
    transparent 65%,
    rgba(255, 255, 255, 0.06)
  );
  pointer-events: none;
}
@keyframes float {
  50% {
    transform: translateY(-11px);
  }
}
.hero-info {
  position: relative;
  z-index: 2;
}
.watermark {
  position: absolute;
  right: -30px;
  top: -55px;
  font: 800 clamp(120px, 18vw, 230px) / 0.8 Outfit;
  color: #ab55ec;
  opacity: 0.12;
  z-index: -1;
  letter-spacing: -20px;
}
.watermark small {
  font-size: 0.23em;
  letter-spacing: 0;
  display: block;
  text-align: right;
  margin-top: 18px;
}
.live {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #dfb1ff;
  font-size: 13px;
  letter-spacing: 2px;
}
.live i {
  width: 11px;
  height: 11px;
  background: #f20d38;
  box-shadow: 0 0 16px #f20d38;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.4;
    box-shadow: 0 0 25px #ff5e82;
  }
}
h1 {
  font-size: clamp(34px, 4.2vw, 60px);
  margin: 20px 0 0;
  line-height: 1.3;
  letter-spacing: -2px;
}
h2 {
  margin: 0;
}
.artist {
  font-size: clamp(25px, 3vw, 36px);
  color: #d8a9ff;
  margin: 0 0 25px;
}
.equalizer {
  height: 57px;
  display: flex;
  align-items: end;
  gap: 4px;
  margin: 8px 0 31px;
  max-width: 450px;
}
.bar {
  flex: 1;
  max-width: 7px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(#f89bff, #9333e7);
  height: var(--h);
  animation: eq var(--dur) ease-in-out infinite alternate;
  transform-origin: bottom;
}
.paused .bar {
  animation-play-state: paused;
}
@keyframes eq {
  to {
    height: 12%;
  }
}
.controls {
  display: flex;
  align-items: center;
  gap: 26px;
}
.round {
  border: 1px solid #8d55ac;
  background: #ffffff08;
  color: #fff;
  border-radius: 50%;
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  transition: 0.2s;
}
.round:hover {
  background: #ffffff1e;
  transform: translateY(-2px);
}
.round.active {
  color: #fa8bdf;
}
.play {
  width: 72px;
  height: 72px;
  border: 1px solid #ffc9ff;
  border-radius: 50%;
  background: linear-gradient(145deg, #e86cff, #9022e8);
  color: white;
  box-shadow: 0 0 24px #d346fa90;
  font-size: 28px;
}
.volume {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e5c8f3;
}
.volume input {
  width: 125px;
  accent-color: #d76cff;
}
.section-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  letter-spacing: 7px;
  color: #e2c6f7;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 14px;
}
.section-line:before,
.section-line:after {
  content: "";
  height: 1px;
  width: 190px;
  background: linear-gradient(90deg, transparent, #ad5fda80);
}
.section-line:after {
  transform: rotate(180deg);
}
.mountains {
  height: 160px;
  position: relative;
  margin-top: -25px;
  pointer-events: none;
  overflow: hidden;
}
.mountains svg {
  width: 100%;
  height: 100%;
  display: block;
}
.charts {
  padding: 15px 0 40px;
}
#recentSongs { margin-bottom: 30px; }
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}
.section-heading h2 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.8px;
}
.section-heading h2:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 23px;
  background: #d36aff;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 12px;
}
.section-heading strong {
  font-weight: 700;
}
.ghost-link {
  border: 0;
  background: none;
  color: #dcb4fa;
  font-size: 13px;
}
.song-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
}
.song {
  text-align: center;
  min-width: 0;
}
.song img {
  width: min(100%, 140px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 11px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.song:hover img {
  transform: translateY(-5px);
  box-shadow: 0 0 25px #c65bff88;
}
.song b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song span {
  display: block;
  font-size: 12px;
  color: #c6a9d8;
}
.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 26px 0 8px;
}
.dots i {
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: #7b4b9b;
}
.dots i:first-child {
  background: #e37cff;
  box-shadow: 0 0 12px #e37cff;
}
.lower {
  background: linear-gradient(
    180deg,
    rgba(25, 9, 47, 0.1),
    rgba(33, 12, 60, 0.65)
  );
  padding: 10px 0 90px;
}
.banner {
  position: relative;
  min-height: 210px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #9c49ca70;
  border-radius: 27px;
  background: radial-gradient(ellipse at 70% 70%, #8532a577, transparent 48%),
    linear-gradient(120deg, #3c165f, #45166c 50%, #2c124e);
  box-shadow: inset 0 1px 0 #ffffff20;
  padding: 36px 62px;
}
.banner:after {
  content: "";
  position: absolute;
  right: -80px;
  top: -190px;
  width: 600px;
  height: 500px;
  border: 1px solid #ffffff17;
  transform: rotate(35deg);
  background: linear-gradient(90deg, transparent, #ffffff0d, transparent);
}
.banner small {
  font-size: 15px;
}
.banner h2 {
  font-size: clamp(32px, 4vw, 53px);
  line-height: 1.02;
  margin: 7px 0 14px;
  letter-spacing: -2px;
}
.banner h2 span {
  color: #dc9bff;
}
.banner p {
  margin: 0;
  font-size: 16px;
  color: #e4c9f1;
}
.banner-glow {
  position: absolute;
  right: 6%;
  top: 15%;
  width: 260px;
  height: 140px;
  border-radius: 50%;
  background: #bb53f4;
  filter: blur(95px);
  opacity: 0.23;
}
.panels {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 25px;
  margin-top: 27px;
}
.panel {
  min-width: 0;
  border: 1px solid #bc5ce677;
  border-radius: 26px;
  background: linear-gradient(140deg, #64247950, #2e104c99 60%, #4c176f88);
  box-shadow: inset 0 1px 0 #ffffff25, 0 15px 50px #0a031526;
  padding: 25px;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.bubble-icon {
  height: 57px;
  width: 57px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 29px;
  background: linear-gradient(145deg, #8f36c7, #371054);
  border: 1px solid #db76ff;
  box-shadow: 0 0 17px #d049fc66;
}
.panel h2 {
  font-size: 24px;
  margin: 0 0 2px;
}
.panel p {
  margin: 0;
  color: #e5c8f1;
  font-size: 13px;
  line-height: 1.6;
}
.online {
  margin-left: auto;
  white-space: nowrap;
  font-size: 13px;
  color: #e8d4f1;
}
.online:before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #18df80;
  margin-right: 7px;
}
.chat-log {
  height: 210px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 3px 2px 12px;
  scrollbar-color: #9851b0 transparent;
}
.msg-row {
  display: flex;
  gap: 9px;
  align-items: flex-end;
}
.avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: #774c96;
  display: grid;
  place-items: center;
  font-size: 17px;
}
.avatar.station {
  background: #f11229;
  font-size: 12px;
  font-weight: 800;
}
.msg {
  background: #ffffff19;
  padding: 10px 14px;
  border-radius: 18px 18px 18px 4px;
  max-width: 80%;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.msg.station {
  background: linear-gradient(115deg, #9220cb, #6d14b3);
}
.timestamp {
  font-size: 10px;
  color: #b99bce;
  white-space: nowrap;
}
.chat-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.chat-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid #a85ccc55;
  background: #1b0a3277;
  border-radius: 28px;
  color: white;
  padding: 12px 18px;
  font-size: 13px;
}
.chat-form input::placeholder {
  color: #c1a4d3;
}
.send {
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid #dc83ff;
  background: linear-gradient(140deg, #d859fa, #8724df);
  border-radius: 50%;
  color: white;
  font-size: 19px;
}
.contact-items {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}
.contact-item {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #ffffff0c;
  border-radius: 25px;
  padding: 13px 17px;
  color: #f0dafa;
  text-decoration: none;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.contact-item svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.footer {
  padding: 20px;
  text-align: center;
  color: #a98cbd;
  font-size: 11px;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #35124e;
  border: 1px solid #a95ed8;
  color: white;
  padding: 12px 20px;
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 10;
  font-size: 13px;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 850px) {
  .container {
    width: min(100% - 36px, 680px);
  }
  .hero {
    gap: 10px;
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 0 0 50px;
  }
  .brand {
    padding: 27px 0 10px;
  }
  .art-stage {
    height: 380px;
  }
  .halo {
    width: 340px;
  }
  .artwork {
    width: 300px;
  }
  .hero-info {
    text-align: center;
  }
  .live,
  .controls {
    justify-content: center;
  }
  .equalizer {
    margin: 10px auto 25px;
  }
  .watermark {
    right: 2%;
    top: -10px;
    font-size: 150px;
  }
  .song-grid {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 26px;
  }
  .panels {
    grid-template-columns: 1fr;
  }
  .mountains {
    height: 130px;
  }
  .banner {
    padding: 30px;
  }
  .section-line:before,
  .section-line:after {
    width: 75px;
  }
}
@media (max-width: 480px) {
  .art-stage {
    height: 320px;
  }
  .halo {
    width: 290px;
  }
  .artwork {
    width: 260px;
  }
  .brand-symbol {
    transform: scale(0.85);
  }
  .brand {
    padding-bottom: 5px;
  }
  .hero {
    padding-bottom: 34px;
  }
  h1 {
    font-size: 38px;
  }
  .artist {
    font-size: 25px;
  }
  .controls {
    gap: 14px;
  }
  .volume input {
    width: 75px;
  }
  .play {
    width: 64px;
    height: 64px;
  }
  .song-grid {
    gap: 13px;
  }
  .song b {
    font-size: 11px;
  }
  .song span {
    font-size: 10px;
  }
  .section-heading h2 {
    font-size: 15px;
  }
  .banner {
    min-height: 180px;
  }
  .panel {
    padding: 18px;
  }
  .panel h2 {
    font-size: 20px;
  }
  .online {
    font-size: 11px;
  }
  .msg {
    max-width: 75%;
  }
  .mountains {
    margin-top: 0;
  }
  .section-line {
    font-size: 10px;
    letter-spacing: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Chiang Mai scenic assets — replace independently without touching layout */
.mountains {
  height: 315px;
  margin-top: -34px;
  background: linear-gradient(180deg, transparent 0%, #1b0c36 100%);
  overflow: visible;
}
.mountains::before {
  content: "";
  position: absolute;
  inset: -5px 0 -20px;
  background: url("../images/cm-mountain.png") center bottom/cover no-repeat;
  opacity: 0.9;
  pointer-events: none;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 34%,
    #000 82%,
    transparent 100%
  );
}
.banner {
  background: linear-gradient(
      90deg,
      rgba(37, 11, 68, 0.92) 0%,
      rgba(51, 17, 82, 0.68) 52%,
      rgba(45, 15, 79, 0.2) 100%
    ),
    url("../images/cm-mountain.png") center 58% / cover no-repeat;
  min-height: 210px;
}
.banner:after {
  opacity: 0.25;
}
@media (max-width: 700px) {
  .mountains {
    height: 140px;
  }
  .mountains::after {
    width: 120px;
    height: 140px;
  }
  .banner {
    background-position: center, center;
  }
}

/* Independent reusable glass frame; album images contain no frame effects. */
.artwork {
  isolation: isolate;
  overflow: hidden;
}
.artwork img {
  position: relative;
  z-index: 0;
}
.artwork::after {
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.06) 21%,
    transparent 44%,
    transparent 70%,
    rgba(233, 187, 255, 0.13) 100%
  );
  box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.12);
}

/* v3 — independent glass sheen and travelling highlight over dynamic cover */
.artwork {
  overflow: visible;
  isolation: isolate;
}
.artwork img {
  position: relative;
  z-index: 1;
  clip-path: circle(50% at 50% 50%);
}
.artwork::after {
  z-index: 2;
  inset: 7px;
  border-radius: 50%;
  background: linear-gradient(
      148deg,
      rgba(255, 255, 255, 0.31) 0%,
      rgba(255, 255, 255, 0.13) 14%,
      rgba(255, 255, 255, 0.025) 35%,
      transparent 53%
    ),
    radial-gradient(
      ellipse at 30% 9%,
      rgba(255, 255, 255, 0.26),
      transparent 49%
    ),
    linear-gradient(340deg, rgba(230, 185, 255, 0.11), transparent 45%);
  box-shadow: inset 0 12px 28px rgba(255, 255, 255, 0.11),
    inset 0 -12px 25px rgba(30, 8, 55, 0.2);
  pointer-events: none;
}
.artwork::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 278deg,
    rgba(255, 255, 255, 0.12) 302deg,
    rgba(255, 255, 255, 0.95) 316deg,
    rgba(246, 212, 255, 0.75) 322deg,
    transparent 345deg
  );
  -webkit-mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 9px),
    #000 calc(100% - 6px)
  );
  mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 9px),
    #000 calc(100% - 6px)
  );
  filter: drop-shadow(0 0 6px #fff);
  animation: glass-edge-sweep 11s linear infinite;
  pointer-events: none;
}
@keyframes glass-edge-sweep {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .artwork::before {
    animation: none;
  }
}

/* V5: retain V3 landscape dimensions; blend only, never upscale the source. */
.mountains {
  height: 315px;
  margin-top: -34px;
  overflow: visible;
  background: transparent;
}
.mountains::before {
  inset: -5px 0 -20px;
  background-size: cover;
  background-position: center bottom;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 34%,
    #000 68%,
    rgba(0, 0, 0, 0.75) 80%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 34%,
    #000 68%,
    rgba(0, 0, 0, 0.75) 80%,
    transparent 100%
  );
}
.mountains::after {
  left: 2%;
  bottom: 12px;
  width: 230px;
  height: 230px;
  opacity: 0.75;
  -webkit-mask-image: radial-gradient(
    ellipse at 44% 53%,
    #000 35%,
    rgba(0, 0, 0, 0.85) 53%,
    transparent 78%
  );
  mask-image: radial-gradient(
    ellipse at 44% 53%,
    #000 35%,
    rgba(0, 0, 0, 0.85) 53%,
    transparent 78%
  );
}
.charts {
  position: relative;
  background: linear-gradient(
    to bottom,
    rgba(23, 8, 42, 0.46) 0%,
    rgba(27, 12, 54, 0.2) 85px,
    transparent 180px
  );
}
@media (max-width: 700px) {
  .mountains {
    height: 140px;
  }
  .mountains::after {
    width: 120px;
    height: 140px;
  }
}

/* Sponsor carousel — three square tiles on desktop, one on mobile */
.sponsors {
  margin: 20px 0 42px;
}
.sponsor-heading {
  margin-bottom: 22px;
}
.sponsor-controls {
  display: flex;
  gap: 9px;
}
.sponsor-controls button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(210, 133, 255, 0.5);
  background: rgba(81, 32, 113, 0.45);
  color: #f6e6ff;
  font-size: 27px;
  line-height: 1;
}
.sponsor-controls button svg {
	height: 0.7em;
	width:100%;
	margin-bottom: 3px;
}
.sponsor-controls button:hover {
  background: #7b319e;
}
.sponsor-window {
  overflow: hidden;
  touch-action: pan-y;
  outline-offset: 5px;
}
.sponsor-track {
  display: flex;
  gap: 20px;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.sponsor-card {
  flex: 0 0 calc((100% - 40px) / 3);
  aspect-ratio: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(205, 132, 255, 0.28);
  background: #241039;
  box-shadow: 0 12px 32px #0d061a36;
}
.sponsor-image-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #e9eff7;
  cursor: zoom-in;
}
.sponsor-image-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sponsor-placeholder {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 75% 25%, #7945a1, #30154e 55%, #210d3c);
}
.sponsor-alt {
  background: radial-gradient(circle at 25% 15%, #7244a4, #30124c 65%);
}
.sponsor-alt2 {
  background: radial-gradient(circle at 80% 75%, #68318d, #231039 65%);
}
.placeholder-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 30px;
  color: #e8c5ff;
}
.placeholder-inner span {
  font-size: 12px;
  letter-spacing: 2px;
}
.placeholder-inner strong {
  font-size: clamp(26px, 3.2vw, 45px);
  line-height: 1.04;
  letter-spacing: -1px;
  color: white;
}
.placeholder-inner small {
  font-size: 13px;
}
.sponsor-pagination {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
}
.sponsor-pagination button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #77508f;
}
.sponsor-pagination button.active {
  background: #d56eff;
  box-shadow: 0 0 12px #c35aff;
}
.sponsor-dialog {
  max-width: min(92vw, 850px);
  max-height: 92vh;
  padding: 14px;
  border: 1px solid #a75acf;
  border-radius: 18px;
  background: #1b0c36;
  color: white;
}
.sponsor-dialog::backdrop {
  background: #0a031bdc;
  backdrop-filter: blur(8px);
}
.sponsor-dialog img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  margin: auto;
}
.dialog-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #481b68;
  color: white;
  font-size: 24px;
}
@media (max-width: 900px) {
  .sponsor-card {
    flex-basis: calc((100% - 20px) / 2);
  }
}
@media (max-width: 600px) {
  .sponsor-track {
    gap: 14px;
  }
  .sponsor-card {
    flex-basis: 100%;
  }
  .sponsors {
    margin: 12px 0 30px;
  }
  .placeholder-inner {
    padding: 25px;
  }
  .placeholder-inner strong {
    font-size: 42px;
  }
}

/* Live chat: preserve existing message bubbles and distinguish sender names */
.chat-message-group{min-width:0;max-width:calc(100% - 115px)}
.chat-message-group .msg{overflow-wrap:anywhere}
.chat-nickname{font-size:12px;color:#d6b3e4;margin:0 0 5px 6px}
.msg-row:has(.avatar.station) .chat-nickname{color:#ff879a;font-weight:700}

/* Chat message layout fix */
#chatLog .chat-bubble,
#chatLog .chat-message,
#chatLog .bubble {
    width: fit-content;
    max-width: min(85%, 520px);
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
}

/* Prevent flex children from being squeezed */
#chatLog .chat-row,
#chatLog .message-row {
    min-width: 0;
    width: 100%;
}

/* Live Chat - Fix message bubble width */

#chatLog .msg-row {
    display: flex;
    align-items: flex-end;
    width: 100%;
    min-width: 0;
    gap: 9px;
}

#chatLog .chat-message-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 0 1 auto;
    width: max-content;
    max-width: calc(100% - 100px);
    min-width: 0;
}

#chatLog .chat-nickname {
    font-size: 12px;
    color: #c9a6d8;
    margin: 0 0 5px 8px;
}

#chatLog .msg {
    box-sizing: border-box;
    width: fit-content;
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
}

#chatLog .timestamp {
    flex: none;
    white-space: nowrap;
}


/* DJ Online / Offline Indicator */

/* Online = Green (ใช้สีเดิม) */
.online:not(.dj-offline)::before {
    background: #00df83 !important;
}

/* Offline = Gray */
.online.dj-offline::before {
    background: #888397 !important;
    box-shadow: none !important;
}

/* Chiang Mai Radio - Actual Chat Mobile Header */
@media (max-width: 767px) {

  .panel[aria-label="Chat with Us"] .panel-head {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 16px;
    align-items: center;
    margin-bottom: 20px;
  }

  /* Chat icon */
  .panel[aria-label="Chat with Us"] .bubble-icon {
    grid-column: 1;
    grid-row: 1;
    width: 54px;
    height: 54px;
  }

  /* Title and subtitle */
  .panel[aria-label="Chat with Us"] .panel-head > div:nth-child(2) {
    grid-column: 2 / 4;
    grid-row: 1;
    min-width: 0;
  }

  .panel[aria-label="Chat with Us"] .panel-head h2 {
    font-size: clamp(18px, 5vw, 24px);
    line-height: 1.2;
    white-space: nowrap;
  }

  /* DJ status - second row left */
  .panel[aria-label="Chat with Us"] .online {
    grid-column: 1 / 3;
    grid-row: 2;
    margin: 0;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Chat user count - second row right */
  .panel[aria-label="Chat with Us"] #chatListenerCount {
    grid-column: 3;
    grid-row: 2;
    margin: 0 !important;
    font-size: 13px !important;
    white-space: nowrap;
    text-align: right;
  }
  
  .panel[aria-label="Chat with Us"] .panel-head {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .panel[aria-label="Chat with Us"] .panel-head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(215, 165, 240, 0.25);
  }  
  
}


/* Chiang Mai Radio Chat V2.6 - Avatar color picker only */
.panel[aria-label="Chat with Us"] .chat-form{align-items:center;position:relative}
.cm-avatar-picker{position:relative;flex:0 0 36px;display:flex;align-items:center;justify-content:center}
.cm-avatar-button{width:36px;height:36px;border:1px solid rgba(255,255,255,.27);border-radius:50%;padding:0;display:grid;place-items:center;box-shadow:0 0 0 2px rgba(255,255,255,.05);transition:transform .18s ease}
.cm-avatar-button:hover{transform:scale(1.07)}
.cm-avatar-dot{display:block;width:9px;height:9px;background:#fff;border-radius:50%}
.cm-avatar-palette{position:absolute;z-index:20;left:0;bottom:calc(100% + 12px);display:flex;align-items:center;gap:9px;padding:12px;background:#35164f;border:1px solid #9c5db9;border-radius:22px;box-shadow:0 12px 32px rgba(10,3,25,.55);width:max-content;max-width:calc(100vw - 48px)}
.cm-avatar-palette[hidden]{display:none!important}
.cm-avatar-swatch{flex:0 0 29px;width:29px;height:29px;border-radius:50%;padding:0;border:2px solid transparent;box-shadow:inset 0 0 0 1px #ffffff35}
.cm-avatar-swatch.selected{border-color:#fff;outline:2px solid #d88eff;outline-offset:2px}
.cm-avatar-swatch:hover{transform:scale(1.08)}
@media(max-width:480px){.cm-avatar-picker{flex-basis:32px}.cm-avatar-button{width:32px;height:32px}.cm-avatar-palette{gap:6px;padding:10px}.cm-avatar-swatch{width:27px;height:27px;flex-basis:27px}}

/* V1.1.7 — Recently Played Heading */
#recentSongs .section-line {
    margin-top: 0;
    margin-bottom: 30px;
    width: 100%;
}
