:root {
  --gold: #ffd16b;
  --blue: #4daaff;
  --text: #f8f7f3;
  --muted: #dce8fa;
  --line: rgba(255, 255, 255, .3);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", sans-serif;
  color: var(--text);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  align-items: safe center;
  padding: 16px;
  background: linear-gradient(145deg, #dcecff, #f5f8ff 55%, #fff0cf);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 720px);
}

.radio-card {
  position: relative;
  overflow: hidden;
  padding: 22px 30px 18px;
  border: 1px solid #e8bd69;
  border-radius: 30px;
  background: linear-gradient(145deg, #24477e, #142b52);
  box-shadow: 0 20px 55px rgba(28, 57, 106, .25);
}

.radio-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(
    90deg, transparent, var(--gold) 32%, #64aaff 70%, transparent
  );
}

.radio-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.station-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.header-logo {
  display: block;
  flex: none;
  width: 155px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, .35));
}

.station-copy {
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--gold);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .1em;
  line-height: 1.5;
}

.signal-mark {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff3545;
  box-shadow: 0 0 10px #ff3545;
}

body.stream-error .signal-mark {
  width: 13px;
  height: 13px;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

body.stream-error .signal-mark::before {
  content: "✕";
  display: block;
  color: #ff7880;
  font-size: 16px;
  font-weight: 900;
  line-height: 13px;
}

body.stream-error .eyebrow {
  color: #ffadb3;
}

.status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-btn,
.round-control,
.play-control {
  color: var(--text);
}

.icon-btn.power {
  position: relative;
  z-index: 5;
  flex: none;
  width: 48px;
  height: 48px;
  border: 2px solid #ff7880;
  border-radius: 15px;
  background: #b92d37;
  color: #fff;
  box-shadow: 0 0 16px rgba(225, 54, 67, .35);
  transition: transform .2s, filter .2s, background .2s;
}

body:not(.power-off) .icon-btn.power {
  border-color: #73ed9d;
  background: #218a52;
  box-shadow: 0 0 18px rgba(50, 220, 120, .4);
}

.icon-btn.power:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
}

.power-symbol {
  display: block;
  width: 24px;
  height: 24px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.display {
  position: relative;
  isolation: isolate;
  height: 260px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 209, 107, .22);
  border-radius: 25px;
  background: radial-gradient(
    circle at 50% 42%, #4772ad, #244777 65%, #172e55
  );
}

.display::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent 0 18px, rgba(255, 255, 255, .018) 19px 20px
  );
  pointer-events: none;
}

.display-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 40%, rgba(255, 203, 76, .14), transparent 40%
  );
  pointer-events: none;
}

.speaker {
  position: absolute;
  top: 28%;
  z-index: 1;
  width: clamp(90px, 24%, 150px);
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 50%;
  background: linear-gradient(
    145deg, #657389, #080e1d 39%, #000 67%, #66738b
  );
  box-shadow: 0 13px 32px #000b, 0 0 18px #5da2f633;
}

.speaker-left {
  left: 5%;
}

.speaker-right {
  right: 5%;
}

.speaker-ring,
.speaker-cone,
.speaker-center {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.speaker-ring {
  padding: 11%;
  border: 2px solid #768296;
  background: radial-gradient(circle, #151d32 15%, #050913 70%);
}

.speaker-cone {
  padding: 31%;
  background: radial-gradient(
    circle, #253a60 0, #0b152c 35%, #111c34 57%, #020710 77%
  );
  box-shadow: inset 0 0 14px #02040c;
}

.speaker-center {
  background: radial-gradient(
    circle at 35% 32%, #43577c, #080e1b 65%
  );
  box-shadow: 0 2px 8px #000;
}

.sound-rays {
  position: absolute;
  z-index: 0;
  top: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 80px;
  height: 100px;
  opacity: .3;
}

.sound-rays-left {
  left: 0;
}

.sound-rays-right {
  right: 0;
}

.sound-rays i {
  display: block;
  width: 3px;
  height: 28px;
  border-radius: 5px;
  background: var(--blue);
  box-shadow: 0 0 12px var(--blue);
}

.sound-rays i:nth-child(2) {
  height: 55px;
}

.sound-rays i:nth-child(3) {
  height: 38px;
}

.equalizer {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 47%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  width: 38%;
  height: 118px;
  padding: 12px 10px;
  transform: translate(-50%, -50%);
  border: 2px solid #78a9d8;
  border-radius: 12px;
  background: linear-gradient(#122847, #07192f);
  overflow: hidden;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .65),
    0 0 22px rgba(68, 177, 255, .35);
}

.equalizer span {
  flex: 1;
  width: auto;
  max-width: 10px;
  height: 14px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(
      to top, transparent 0 7px, #0b2039 7px 10px
    ),
    linear-gradient(
      to top,
      #25e05a 0%,
      #55ed42 35%,
      #f4e83b 65%,
      #ff9d28 82%,
      #f44336 100%
    );
  box-shadow: 0 0 7px rgba(64, 233, 112, .45);
}

.now-playing {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 18px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(
    90deg, rgba(7, 12, 27, .97), rgba(15, 28, 51, .93)
  );
}

.live-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5866;
  box-shadow: 0 0 0 4px #ff586622;
}

.live-dot.off {
  background: #83899c;
  box-shadow: none;
}

.marquee {
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg, transparent, #000 5%, #000 95%, transparent
  );
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 35px;
  white-space: nowrap;
  color: #d8e0f1;
  font-size: .78rem;
}

.main-controls {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  gap: 12px;
  max-width: 300px;
  margin: 16px auto 0;
}

/* La cuarta posición solo se reserva cuando Chromecast es visible. */
.main-controls:has(.cast-slot > :not(.hidden)) {
  grid-template-columns: 1fr 1.2fr 1fr 1fr;
  max-width: 365px;
}

.cast-slot {
  display: none;
  place-items: center;
}
.main-controls:has(.cast-slot > :not(.hidden)) .cast-slot {
  display: grid;
}

.cast-slot > * {
  grid-area: 1 / 1;
}

.round-control,
.cast-button {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 52px;
  height: 52px;
  border: 2px solid #9ec7ff;
  border-radius: 17px;
  background: #3b659d;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .25);
  transition: transform .2s, background .2s;
}

.round-control {
  font-size: 1.25rem;
}

.cast-fallback svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.round-control:hover {
  background: #527fba;
  transform: translateY(-2px);
}

.cast-button {
  --connected-color: #ffd16b;
  --disconnected-color: #e1e8f4;
  --hover-color: #fff;
  padding: 12px;
}

.play-control {
  display: grid;
  place-items: center;
  padding: 0;
  justify-self: center;
  width: 72px;
  height: 72px;
  border: 2px solid #ffe3a0;
  border-radius: 50%;
  background: linear-gradient(
    145deg, #ffe196, #e5a83b 65%, #ab7020
  );
  color: #141626;
  font-size: 1.6rem;
  box-shadow: 0 12px 36px #f4b94644, 0 0 0 7px #f4b94618;
  transition: transform .2s, box-shadow .2s;
}

.play-control:hover {
  transform: scale(1.06);
}

.play-control:active {
  transform: scale(.96);
}

.control-icon,
.control-icon svg {
  display: block;
  width: 27px;
  height: 27px;
}

.playback-icon,
.playback-icon svg {
  width: 31px;
  height: 31px;
}

.speaker-body {
  fill: currentColor;
}

.volume-wave,
.volume-slash {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.volume-slash,
.volume-muted .volume-wave,
.volume-low .wave-two {
  display: none;
}

.volume-muted .volume-slash,
.playback-icon.is-playing .pause-shape {
  display: block;
}

.play-shape,
.pause-shape {
  fill: currentColor;
}

.pause-shape,
.playback-icon.is-playing .play-shape {
  display: none;
}

.volume-panel {
  margin-top: 13px;
  padding: 12px 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .12);
}

.volume-copy {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.volume-copy strong {
  color: var(--gold);
  font-size: .86rem;
}

#volumeSlider {
  --level: 70%;
  --level-color: #f1b94e;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--level-color) 0 var(--level),
    #71829e var(--level) 100%
  );
  cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 19px;
  height: 19px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--level-color);
  box-shadow: 0 0 10px var(--level-color);
}

#volumeSlider::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--level-color);
  box-shadow: 0 0 10px var(--level-color);
}


.info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  min-height: 29px;
  margin-top: 11px;
}

.weather-panel,
.online-counter {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #dce8fa;
  font-size: .86rem;
}

.online-counter {
  white-space: nowrap;
}

.online-counter strong {
  color: var(--gold);
}

.online-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #45d878;
  box-shadow: 0 0 8px rgba(69, 216, 120, .6);
}

.weather-place {
  font-weight: 650;
}

.weather-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.weather-temp {
  color: var(--gold);
  font-size: .94rem;
}

.ministry-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
  padding: 11px 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
}

.ministry-footer img {
  display: block;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: white;
  object-fit: cover;
}

.developer-credit {
  margin-top: 12px;
  color: #dce8fa;
  font-size: .75rem;
  text-align: center;
}

.developer-credit a {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

.developer-credit a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.playing .speaker-cone {
  animation: woofer .28s ease-in-out infinite alternate;
}

.playing .speaker-right .speaker-cone {
  animation-duration: .36s;
  animation-delay: -.18s;
}

.playing .sound-rays {
  animation: ray-glow 1.1s ease-in-out infinite alternate;
}

.playing .equalizer span {
  animation: equalizer-a .48s steps(8, end) infinite alternate;
}

.playing .equalizer span:nth-child(2n) {
  animation-name: equalizer-b;
  animation-duration: .36s;
  animation-delay: -.16s;
}

.playing .equalizer span:nth-child(3n) {
  animation-name: equalizer-c;
  animation-duration: .62s;
  animation-delay: -.37s;
}

.playing .equalizer span:nth-child(5n) {
  animation-duration: .43s;
  animation-delay: -.25s;
}

.playing .marquee-track {
  animation: marquee 16s linear infinite;
}

.playing .signal-mark {
  animation: red-blink 1s ease-in-out infinite;
}

body.is-muted .speaker-cone,
body.is-muted .equalizer span,
body.is-muted .sound-rays {
  animation: none !important;
}

body.is-muted .sound-rays {
  opacity: .15;
}

body.power-off .station-heading,
body.power-off .display,
body.power-off .main-controls,
body.power-off .volume-panel,
body.power-off .ministry-footer {
  opacity: .45;
  filter: brightness(.7) saturate(.55);
}

body.power-off .icon-btn.power {
  opacity: 1;
  filter: none;
}

@keyframes woofer {
  from { transform: scale(.88); }
  to { transform: scale(1.14); }
}

@keyframes ray-glow {
  to {
    opacity: .95;
    filter: drop-shadow(0 0 8px #58aaff);
  }
}

@keyframes equalizer-a {
  from { height: 18%; }
  to { height: 90%; }
}

@keyframes equalizer-b {
  from { height: 36%; }
  to { height: 96%; }
}

@keyframes equalizer-c {
  from { height: 12%; }
  to { height: 75%; }
}

@keyframes marquee {
  to { transform: translateX(calc(-50% - 17.5px)); }
}

@keyframes red-blink {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 12px #ff3545;
  }
  50% {
    opacity: .25;
    box-shadow: 0 0 2px #ff3545;
  }
}

@media (min-width: 601px) {
  .header-logo {
    width: 190px;
    height: 145px;
  }

  .radio-card {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 32px);
  }

  .volume-panel {
    margin-top: auto;
  }

  .info-strip {
    margin-bottom: auto;
  }

  .ministry-footer {
    margin-top: 15px;
  }
}

@media (min-width: 601px) and (max-height: 850px) {
  body {
    padding: 10px;
  }

  .radio-card {
    min-height: calc(100dvh - 20px);
    padding-top: clamp(10px, 2dvh, 22px);
    padding-bottom: clamp(10px, 2dvh, 18px);
  }

  .header-logo {
    height: clamp(105px, 17dvh, 145px);
  }

  .display {
    height: clamp(170px, 28dvh, 260px);
    margin-top: 8px;
  }

  .speaker {
    top: 18%;
    width: clamp(100px, 15dvh, 125px);
  }

  .equalizer {
    height: min(118px, 16dvh);
  }

  .main-controls {
    margin-top: 10px;
  }

  .volume-panel {
    margin-top: auto;
  }

  .info-strip {
    margin-top: 7px;
  }

  .ministry-footer {
    margin-top: 10px;
    padding-top: 8px;
  }

  .developer-credit {
    margin-top: 8px;
  }
}

@media (max-width: 600px) {
  html {
    background: #142b52;
  }

  body {
    display: block;
    min-height: 0;
    padding: 0;
    background: #142b52;
  }

  .app-shell {
    width: 100%;
  }

  .radio-card {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding: 22px 18px;
    border: 0;
    border-radius: 0;
  }

  .main-controls {
    margin-bottom: 20px;
  }

  .volume-panel {
    margin-top: auto;
  }

  .info-strip {
    margin-bottom: auto;
  }

  .ministry-footer {
    margin-top: 12px;
  }

  .header-logo {
    width: 135px;
    height: 100px;
    object-fit: cover;
  }

  .station-heading {
    gap: 9px;
  }

  .eyebrow {
    font-size: .62rem;
  }

  .display {
    height: 250px;
  }

  .speaker {
    top: 31%;
    width: 26%;
    padding: 5px;
  }

  .speaker-ring {
    padding: 8%;
  }

  .equalizer {
    width: 39%;
    height: 105px;
    gap: 3px;
    padding: 10px 7px;
  }

  .now-playing {
    gap: 11px;
    padding: 12px;
  }

  .marquee-track {
    font-size: .7rem;
  }
}

@media (max-width: 390px) {
  .radio-card {
    padding: 20px 14px;
  }

  .header-logo {
    width: 120px;
    height: 90px;
  }

  .eyebrow {
    font-size: .56rem;
  }

  .display {
    height: 235px;
  }

  .live-row {
    font-size: .6rem;
  }

  .ministry-footer {
    gap: 9px;
    font-size: .78rem;
  }

  .ministry-footer img {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 600px) and (max-height: 820px) {
  .radio-card {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .header-logo {
    height: 100px;
  }

  .display {
    height: clamp(190px, 28dvh, 230px);
    margin-top: 8px;
  }

  .speaker {
    top: 27%;
  }

  .equalizer {
    height: clamp(80px, 12dvh, 98px);
  }

  .main-controls {
    margin-top: 10px;
    margin-bottom: 16px;
  }

  .play-control {
    width: 64px;
    height: 64px;
  }

  .volume-panel {
    margin-top: auto;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .info-strip {
    min-height: 24px;
    margin-top: 7px;
    margin-bottom: auto;
  }

  .ministry-footer {
    padding-top: 8px;
  }

  .developer-credit {
    margin-top: 8px;
  }
}

@media (max-width: 390px) {
  .info-strip { gap: 6px; }
  .weather-panel,
  .online-counter { gap: 4px; font-size: .7rem; }
  .weather-temp { font-size: .78rem; }
  .weather-icon { font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* Vista previa de mensajes: controles inactivos hasta habilitar el servicio */
.messages-toggle svg { width: 25px; height: 25px; }
.messages-panel {
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: 50%;
  width: min(92vw, 430px);
  max-height: min(85dvh, 650px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(255,209,107,.65);
  border-radius: 18px;
  background: linear-gradient(145deg, #24477e, #142b52);
  box-shadow: 0 18px 65px rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform-origin: center center;
  transform: translate(-50%, -50%) scaleX(.025) scaleY(.012);
  filter: brightness(2.2);
  transition:
    transform 650ms cubic-bezier(.22,.75,.22,1),
    opacity 420ms ease,
    filter 650ms ease,
    visibility 0s linear 650ms;
  will-change: transform, opacity;
}
.messages-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scaleX(1) scaleY(1);
  filter: brightness(1);
  transition:
    transform 700ms cubic-bezier(.18,.85,.2,1),
    opacity 550ms ease,
    filter 700ms ease,
    visibility 0s;
}
@media (prefers-reduced-motion: reduce) {
  .messages-panel, .messages-panel.is-open {
    transition-duration: .01ms;
    transition-delay: 0ms;
    filter: none;
  }
}
.messages-panel h2 { margin: 0 0 8px; font-size: 1.05rem; color: var(--gold); }
.messages-notice { margin: 0 0 14px; font-weight: 650; }
.messages-form { display: grid; gap: 8px; }
.messages-form label { font-size: .85rem; }
.messages-form input, .messages-form textarea { width: 100%; padding: 11px 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.12); color: #fff; font: inherit; resize: vertical; }
.messages-form input:disabled, .messages-form textarea:disabled { opacity: .65; cursor: not-allowed; }
.messages-form button { justify-self: end; border: 0; border-radius: 9px; padding: 10px 20px; background: #b9c5d6; color: #334155; opacity: .7; cursor: not-allowed; }

/* Mensajes: listado principal y vista previa del formulario */
.messages-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.messages-header h2 { margin: 0; }
.messages-close { flex: none; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.45); border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 1.65rem; line-height: 1; }
.messages-view[hidden] { display: none !important; }
.messages-list { min-height: 160px; max-height: 45dvh; overflow-y: auto; padding: 16px; border: 1px solid rgba(255,255,255,.25); border-radius: 12px; background: rgba(255,255,255,.07); }
.messages-empty { margin: 0; color: #e2eaf7; line-height: 1.5; text-align: center; }
.messages-action { display: block; width: 100%; margin-top: 14px; padding: 12px; border: 1px solid #e8bd69; border-radius: 10px; background: #e8bd69; color: #142b52; font-weight: 700; }
.messages-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.messages-form-actions .messages-back { border: 1px solid rgba(255,255,255,.5); border-radius: 9px; padding: 10px 14px; background: transparent; color: #fff; cursor: pointer; }

.message-entry { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.2); }
.message-entry:last-child { border-bottom: 0; }
.message-entry strong { color: #ffd16b; overflow-wrap: anywhere; }
.message-entry p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.messages-action[hidden] { display: none; }
.messages-retry { width: 100%; padding: 10px; border: 1px solid #ffd16b; border-radius: 9px; color: #fff; background: transparent; }

/* Resaltar el cierre de mensajes al pasar el puntero. */
.messages-close { cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.messages-close:hover { background: #b91c1c; border-color: #ef4444; color: #fff; }
.messages-close:focus-visible { outline: 2px solid #ef4444; outline-offset: 3px; }

/* Selector de emojis en el formulario de mensajes */
.emoji-picker-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.messages-form .emoji-toggle { justify-self: start; opacity: 1; cursor: pointer; border: 1px solid rgba(255,209,107,.7); border-radius: 10px; padding: 7px 12px; background: rgba(255,255,255,.12); color: #fff; font: inherit; }
.emoji-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; width: 100%; padding: 9px; border: 1px solid rgba(255,209,107,.4); border-radius: 12px; background: #17365f; }
.emoji-picker[hidden] { display: none; }
.messages-form .emoji-choice { justify-self: stretch; opacity: 1; cursor: pointer; border: 0; border-radius: 8px; background: rgba(255,255,255,.09); color: #fff; padding: 8px 0; font-size: 1.35rem; }
.messages-form .emoji-choice:hover { background: rgba(255,209,107,.25); }
