/* 心桥主页左上角的全局星球音乐播放器。 */
.home-music-player {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 8px;
  z-index: 2147483000;
  display: flex;
  width: 122px;
  height: 32px;
  min-width: 0;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(160, 222, 255, .34);
  border-radius: 999px;
  color: #f0fff0;
  background: rgba(8, 20, 15, .78);
  box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 8px 22px rgba(0, 0, 0, .26);
  pointer-events: auto;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  transition: width 180ms ease, background 180ms ease;
}

@media (orientation: landscape) {
  .home-music-player { left: max(8px, calc(50vw - 222px)); }
}

.home-music-player.is-expanded {
  width: min(282px, calc(100vw - 16px));
  background: rgba(8, 20, 15, .92);
}

.home-music-player > button {
  display: grid;
  width: 26px;
  min-width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: rgba(255, 255, 255, .08);
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
}

.home-music-player > button:active { transform: scale(.9); }

.home-music-player .home-music-toggle {
  color: #071006;
  background: linear-gradient(135deg, #c5ffad, #74ff52);
  box-shadow: 0 0 12px rgba(116, 255, 82, .28);
  font-size: 10px;
}

.home-music-player.is-playing .home-music-toggle { animation: home-music-pulse 2.2s ease-in-out infinite; }

.home-music-player.is-voice-paused .home-music-toggle {
  color: #eaffdf;
  background: rgba(255, 255, 255, .1);
  box-shadow: none;
  animation: none;
}

.home-music-player > .home-music-title {
  display: grid;
  width: 26px;
  min-width: 26px;
  height: 26px;
  flex: 0 0 26px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: rgba(237, 255, 232, .82);
  background: transparent;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .01em;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-music-player.is-expanded > .home-music-title {
  display: block;
  width: auto;
  min-width: 0;
  flex: 1;
  padding: 0 8px 0 5px;
  border-radius: 999px;
  line-height: 26px;
  text-align: left;
}

@keyframes home-music-pulse {
  50% { box-shadow: 0 0 17px rgba(116, 255, 82, .62); }
}

@media (max-width: 360px) {
  .home-music-player.is-expanded > .home-music-title {
    padding-right: 4px;
    font-size: 9px;
  }
}

/* 心桥主页星球电视：电视外壳贴边，屏幕与原图旋钮精确叠加。 */
.home-tv-area { padding: 18px 18px 4px; }
.home-tv-area[hidden] { display: none; }

.home-tv-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.home-tv-heading h2 {
  margin: 0;
  color: rgba(255, 255, 255, .96);
  font-size: 15px;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .32);
}

.home-tv-heading span {
  min-width: 0;
  overflow: hidden;
  color: rgba(232, 244, 255, .72);
  font-size: 11px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-tv-set {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 240 / 233;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #8b542d;
  box-shadow: 0 22px 52px rgba(0, 0, 0, .4);
}

.home-tv-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.home-tv-screen {
  position: absolute;
  left: 13.2%;
  top: 7.4%;
  z-index: 2;
  width: 75.2%;
  height: 59.2%;
  overflow: hidden;
  border: 1px solid rgba(164, 218, 232, .14);
  border-radius: 17% / 14%;
  color: #eaffff;
  background: radial-gradient(circle at 50% 42%, rgba(31, 79, 86, .24), transparent 62%), rgba(2, 7, 8, .72);
  box-shadow: inset 0 0 26px rgba(0, 0, 0, .82);
  opacity: .28;
  pointer-events: none;
  transition: opacity 220ms ease, background 260ms ease, box-shadow 260ms ease;
}

.home-tv-set.is-on .home-tv-screen {
  opacity: 1;
  pointer-events: auto;
  background: linear-gradient(rgba(255, 255, 255, .022) 50%, rgba(0, 0, 0, .055) 50%), radial-gradient(circle at 50% 48%, #143e43 0%, #082327 58%, #02090a 100%);
  background-size: 100% 4px, 100% 100%;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, .72), 0 0 20px rgba(87, 238, 233, .3);
}

.home-tv-set.is-on::after {
  position: absolute;
  left: 18%;
  top: 12%;
  z-index: 1;
  width: 65%;
  height: 46%;
  border-radius: 50%;
  background: rgba(119, 255, 241, .13);
  filter: blur(28px);
  content: "";
  pointer-events: none;
}

.home-tv-power {
  position: absolute;
  left: 74.6%;
  top: 72.5%;
  z-index: 4;
  display: grid;
  width: 12.1%;
  aspect-ratio: 1;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  color: #fff7df;
  background: rgba(25, 15, 7, .54);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .28), 0 2px 8px rgba(0, 0, 0, .32);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.home-tv-power svg {
  width: 53%;
  height: 53%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.home-tv-power:active { transform: scale(.9) rotate(7deg); }

.home-tv-power.is-on {
  color: #eaffdb;
  background: rgba(40, 103, 31, .82);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25), 0 0 15px rgba(128, 255, 100, .68);
}

.home-tv-news {
  display: grid;
  width: 100%;
  height: 100%;
  padding: 7.5% 8% 8%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 5%;
}

.home-tv-news header {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 5%;
  border-bottom: 1px solid rgba(177, 255, 250, .2);
  padding-bottom: 4%;
}

.home-tv-news header span {
  color: #ff8178;
  font-size: clamp(7px, 2vw, 10px);
  font-weight: 950;
  white-space: nowrap;
  animation: home-tv-blink 1.5s steps(2) infinite;
}

.home-tv-news header strong {
  overflow: hidden;
  color: #e9fffd;
  font-size: clamp(8px, 2.55vw, 12px);
  font-weight: 900;
  letter-spacing: .06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-tv-news header button {
  display: grid;
  width: clamp(22px, 6.5vw, 30px);
  aspect-ratio: 1;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(210, 255, 252, .3);
  border-radius: 50%;
  color: #eafffd;
  background: rgba(255, 255, 255, .08);
  font-size: clamp(9px, 2.8vw, 13px);
}

.home-tv-news header button.is-muted {
  color: rgba(234, 255, 253, .58);
  background: rgba(0, 0, 0, .24);
}

.home-tv-news p {
  display: grid;
  min-width: 0;
  min-height: 0;
  margin: 0;
  place-items: center;
  overflow: hidden;
  color: #f3ffdf;
  font-size: clamp(11px, 3.8vw, 17px);
  font-weight: 860;
  line-height: 1.58;
  text-align: center;
  text-shadow: 0 0 12px rgba(151, 255, 238, .25);
  animation: home-tv-headline-in 360ms ease both;
}

.home-tv-news small {
  overflow: hidden;
  color: rgba(205, 255, 249, .58);
  font-size: clamp(7px, 2vw, 9px);
  font-weight: 750;
  letter-spacing: .12em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes home-tv-blink { 50% { opacity: .42; } }
@keyframes home-tv-headline-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 360px) {
  .home-tv-area { padding-inline: 14px; }
  .home-tv-set { border-radius: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-music-player.is-playing .home-music-toggle,
  .home-tv-screen,
  .home-tv-news p,
  .home-tv-news header span {
    animation: none;
    transition: none;
  }

  .home-music-player { transition: none; }
}
