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

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

:root {
  --bg-main: linear-gradient(135deg, #fff2f7 0%, #ffe4f0 100%);
  --bg-spot-1: rgba(255, 130, 190, 0.18);
  --bg-spot-2: rgba(255, 180, 220, 0.26);
  --container-bg: rgba(255, 255, 255, 0.86);
  --container-border: rgba(255, 255, 255, 0.7);
  --title-color: #ff4f9f;
  --subtitle-color: #8f5a78;
  --text-main: #523042;
  --days-bg: linear-gradient(135deg, #ffd8ea, #ffe7f2);
  --days-text: #b31f69;
  --card-bg: linear-gradient(160deg, #fff9fc 0%, #fff1f7 100%);
  --card-border: rgba(255, 132, 192, 0.26);
  --card-title: #ef3f93;
  --shadow-main: 0 14px 34px rgba(213, 106, 164, 0.25);
  --shadow-card: 0 8px 16px rgba(230, 115, 172, 0.26);
  --shadow-card-hover: 0 14px 26px rgba(227, 94, 156, 0.38);
}

body.theme-night {
  --bg-main: linear-gradient(135deg, #171322 0%, #241b37 100%);
  --bg-spot-1: rgba(153, 112, 255, 0.22);
  --bg-spot-2: rgba(255, 90, 191, 0.2);
  --container-bg: rgba(25, 20, 39, 0.84);
  --container-border: rgba(124, 88, 170, 0.42);
  --title-color: #ffb2df;
  --subtitle-color: #dfd0f4;
  --text-main: #fff8ff;
  --days-bg: linear-gradient(135deg, #3a2952, #4f346f);
  --days-text: #ffe9f7;
  --card-bg: linear-gradient(160deg, #2f2343 0%, #3a2a55 100%);
  --card-border: rgba(195, 145, 255, 0.3);
  --card-title: #ffc0e7;
  --shadow-main: 0 16px 40px rgba(8, 4, 18, 0.5);
  --shadow-card: 0 8px 18px rgba(5, 2, 15, 0.4);
  --shadow-card-hover: 0 14px 30px rgba(0, 0, 0, 0.55);
}

body {
  font-family: "Microsoft YaHei", sans-serif;
  text-align: center;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 26px 14px;
  background: var(--bg-main);
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.stars::before,
.stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: repeat;
}

.stars::before {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 1.2px, transparent 2px),
    radial-gradient(circle, rgba(255, 228, 247, 0.85) 1px, transparent 1.8px);
  background-size: 180px 180px, 260px 260px;
  background-position: 0 0, 60px 100px;
  animation: twinkleA 5.5s ease-in-out infinite;
}

.stars::after {
  background-image:
    radial-gradient(circle, rgba(255, 245, 255, 0.92) 1px, transparent 1.7px),
    radial-gradient(circle, rgba(198, 176, 255, 0.75) 1.2px, transparent 2px);
  background-size: 220px 220px, 300px 300px;
  background-position: 110px 40px, 20px 180px;
  animation: twinkleB 7.5s ease-in-out infinite;
}

body.theme-night .stars {
  opacity: 1;
}

.moon {
  position: fixed;
  right: 7%;
  top: 8%;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: translateY(-8px) scale(0.92);
  transition: opacity 0.45s ease, transform 0.45s ease;
  background: radial-gradient(circle at 30% 30%, #fffefc 0%, #f9ecff 55%, #dcc7ff 100%);
  box-shadow: 0 0 24px rgba(218, 185, 255, 0.42), 0 0 56px rgba(181, 132, 255, 0.24);
}

.moon::before,
.moon::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(205, 179, 242, 0.28);
}

.moon::before {
  width: 14px;
  height: 14px;
  left: 22px;
  top: 24px;
}

.moon::after {
  width: 10px;
  height: 10px;
  right: 22px;
  top: 42px;
}

body.theme-night .moon {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.day-decor {
  position: fixed;
  inset: 0;
  transform: translateY(-14px);
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.day-heart {
  position: absolute;
  line-height: 1;
  opacity: var(--heart-opacity, 0.75);
  transform: translate(0, 0) rotate(var(--heart-tilt, 0deg)) scale(var(--heart-scale, 1));
  filter: drop-shadow(0 7px 12px rgba(244, 167, 204, 0.26));
  animation: heartScatter var(--heart-duration, 9s) ease-in-out infinite;
  animation-delay: var(--heart-delay, 0s);
}

.day-heart::before {
  display: block;
  content: "\2764";
  font-size: var(--heart-size, 22px);
  color: var(--heart-color, #f6b3d4);
  text-shadow: 0 0 8px rgba(248, 182, 216, 0.45);
}

.heart-a {
  left: 6%;
  top: 8%;
  --heart-size: 23px;
  --heart-color: #f6b6d6;
  --heart-opacity: 0.9;
  --heart-duration: 10.2s;
  --heart-delay: -2.4s;
  --heart-tilt: -8deg;
  --heart-scale: 1.04;
  --drift-x: 10px;
  --drift-y: -9px;
}

.heart-b {
  left: 23%;
  top: 9%;
  --heart-size: 21px;
  --heart-color: #f7bddb;
  --heart-opacity: 0.82;
  --heart-duration: 11.6s;
  --heart-delay: -6.1s;
  --heart-tilt: 9deg;
  --drift-x: -12px;
  --drift-y: 7px;
  animation-name: heartScatterAlt;
}

.heart-c {
  left: 40%;
  top: 8%;
  --heart-size: 19px;
  --heart-color: #f5b0d1;
  --heart-opacity: 0.78;
  --heart-duration: 8.4s;
  --heart-delay: -1.3s;
  --heart-tilt: -4deg;
  --drift-x: 7px;
  --drift-y: -11px;
}

.heart-d {
  left: 58%;
  top: 10%;
  --heart-size: 18px;
  --heart-color: #f5b2d2;
  --heart-opacity: 0.72;
  --heart-duration: 9.5s;
  --heart-delay: -4.9s;
  --heart-tilt: 11deg;
  --drift-x: -8px;
  --drift-y: 8px;
  animation-name: heartScatterAlt;
}

.heart-e {
  left: 75%;
  top: 9%;
  --heart-size: 20px;
  --heart-color: #f6aed0;
  --heart-opacity: 0.76;
  --heart-duration: 10.8s;
  --heart-delay: -3.5s;
  --heart-tilt: -10deg;
  --drift-x: 9px;
  --drift-y: -7px;
}

.heart-f {
  left: 90%;
  top: 8%;
  --heart-size: 17px;
  --heart-color: #f7b8d7;
  --heart-opacity: 0.67;
  --heart-duration: 9.1s;
  --heart-delay: -7.2s;
  --heart-tilt: 6deg;
  --drift-x: -6px;
  --drift-y: -8px;
}

.heart-g {
  left: 10%;
  top: 28%;
  --heart-size: 16px;
  --heart-color: #f4aacc;
  --heart-opacity: 0.62;
  --heart-duration: 12.2s;
  --heart-delay: -8.4s;
  --heart-tilt: -12deg;
  --drift-x: -10px;
  --drift-y: 9px;
  animation-name: heartScatterAlt;
}

.heart-h {
  left: 27%;
  top: 30%;
  --heart-size: 15px;
  --heart-color: #f5afd1;
  --heart-opacity: 0.66;
  --heart-duration: 11.4s;
  --heart-delay: -5.7s;
  --heart-tilt: 8deg;
  --drift-x: 7px;
  --drift-y: -6px;
}

.heart-i {
  left: 44%;
  top: 27%;
  --heart-size: 20px;
  --heart-color: #f6b5d5;
  --heart-opacity: 0.8;
  --heart-duration: 9.8s;
  --heart-delay: -1.8s;
  --heart-tilt: -9deg;
  --drift-x: 9px;
  --drift-y: -7px;
}

.heart-j {
  left: 61%;
  top: 30%;
  --heart-size: 18px;
  --heart-color: #f4a9cd;
  --heart-opacity: 0.74;
  --heart-duration: 10.7s;
  --heart-delay: -3.1s;
  --heart-tilt: 10deg;
  --drift-x: -8px;
  --drift-y: 8px;
  animation-name: heartScatterAlt;
}

.heart-k {
  left: 78%;
  top: 28%;
  --heart-size: 17px;
  --heart-color: #f7b6d6;
  --heart-opacity: 0.71;
  --heart-duration: 12.5s;
  --heart-delay: -8.8s;
  --heart-tilt: 5deg;
  --drift-x: 7px;
  --drift-y: -9px;
}

.heart-l {
  left: 8%;
  top: 50%;
  --heart-size: 16px;
  --heart-color: #f5b1d2;
  --heart-opacity: 0.69;
  --heart-duration: 9.3s;
  --heart-delay: -4.2s;
  --heart-tilt: -6deg;
  --drift-x: -7px;
  --drift-y: 7px;
  animation-name: heartScatterAlt;
}

.heart-m {
  left: 25%;
  top: 52%;
  --heart-size: 15px;
  --heart-color: #f6b2d3;
  --heart-opacity: 0.68;
  --heart-duration: 10.1s;
  --heart-delay: -6.6s;
  --heart-tilt: -11deg;
  --drift-x: 8px;
  --drift-y: -6px;
}

.heart-n {
  left: 42%;
  top: 49%;
  --heart-size: 19px;
  --heart-color: #f7b5d6;
  --heart-opacity: 0.77;
  --heart-duration: 11.8s;
  --heart-delay: -2.9s;
  --heart-tilt: 12deg;
  --drift-x: -10px;
  --drift-y: 8px;
  animation-name: heartScatterAlt;
}

.heart-o {
  left: 59%;
  top: 52%;
  --heart-size: 18px;
  --heart-color: #f4abcf;
  --heart-opacity: 0.75;
  --heart-duration: 8.9s;
  --heart-delay: -7.9s;
  --heart-tilt: 7deg;
  --drift-x: 7px;
  --drift-y: -8px;
}

.heart-p {
  left: 76%;
  top: 50%;
  --heart-size: 21px;
  --heart-color: #f6b4d4;
  --heart-opacity: 0.83;
  --heart-duration: 10.9s;
  --heart-delay: -5.4s;
  --heart-tilt: -8deg;
  --drift-x: -9px;
  --drift-y: 7px;
  animation-name: heartScatterAlt;
}

.heart-q {
  left: 12%;
  top: 73%;
  --heart-size: 17px;
  --heart-color: #f5b1d2;
  --heart-opacity: 0.78;
  --heart-duration: 10.4s;
  --heart-delay: -2.1s;
  --heart-tilt: -7deg;
  --drift-x: 7px;
  --drift-y: -6px;
}

.heart-r {
  left: 45%;
  top: 75%;
  --heart-size: 18px;
  --heart-color: #f6b6d6;
  --heart-opacity: 0.8;
  --heart-duration: 9.7s;
  --heart-delay: -4.8s;
  --heart-tilt: 8deg;
  --drift-x: -8px;
  --drift-y: 7px;
  animation-name: heartScatterAlt;
}

.heart-s {
  left: 80%;
  top: 73%;
  --heart-size: 16px;
  --heart-color: #f4abcf;
  --heart-opacity: 0.76;
  --heart-duration: 11.2s;
  --heart-delay: -6.3s;
  --heart-tilt: -10deg;
  --drift-x: 8px;
  --drift-y: -7px;
}

.heart-t {
  left: 16%;
  top: 18%;
  --heart-size: 15px;
  --heart-color: #f5b4d4;
  --heart-opacity: 0.7;
  --heart-duration: 9.6s;
  --heart-delay: -3.2s;
  --heart-tilt: -9deg;
  --drift-x: 6px;
  --drift-y: -7px;
}

.heart-u {
  left: 33%;
  top: 19%;
  --heart-size: 17px;
  --heart-color: #f6b8d7;
  --heart-opacity: 0.74;
  --heart-duration: 10.7s;
  --heart-delay: -5.2s;
  --heart-tilt: 11deg;
  --drift-x: -7px;
  --drift-y: 7px;
  animation-name: heartScatterAlt;
}

.heart-v {
  left: 50%;
  top: 19%;
  --heart-size: 16px;
  --heart-color: #f4adcf;
  --heart-opacity: 0.72;
  --heart-duration: 8.8s;
  --heart-delay: -2.4s;
  --heart-tilt: -8deg;
  --drift-x: 8px;
  --drift-y: -6px;
}

.heart-w {
  left: 68%;
  top: 20%;
  --heart-size: 15px;
  --heart-color: #f7bbda;
  --heart-opacity: 0.7;
  --heart-duration: 11.1s;
  --heart-delay: -7.1s;
  --heart-tilt: 10deg;
  --drift-x: -8px;
  --drift-y: 8px;
  animation-name: heartScatterAlt;
}

.heart-x {
  left: 86%;
  top: 19%;
  --heart-size: 14px;
  --heart-color: #f5b2d3;
  --heart-opacity: 0.68;
  --heart-duration: 10.2s;
  --heart-delay: -4.7s;
  --heart-tilt: -10deg;
  --drift-x: 7px;
  --drift-y: -8px;
}

.heart-y {
  left: 18%;
  top: 41%;
  --heart-size: 16px;
  --heart-color: #f6b6d6;
  --heart-opacity: 0.73;
  --heart-duration: 9.4s;
  --heart-delay: -1.5s;
  --heart-tilt: 9deg;
  --drift-x: -7px;
  --drift-y: 6px;
  animation-name: heartScatterAlt;
}

.heart-z {
  left: 35%;
  top: 42%;
  --heart-size: 15px;
  --heart-color: #f4aecd;
  --heart-opacity: 0.69;
  --heart-duration: 10.5s;
  --heart-delay: -6.8s;
  --heart-tilt: -7deg;
  --drift-x: 7px;
  --drift-y: -7px;
}

.heart-aa {
  left: 52%;
  top: 42%;
  --heart-size: 16px;
  --heart-color: #f7bcd9;
  --heart-opacity: 0.72;
  --heart-duration: 11.4s;
  --heart-delay: -3.6s;
  --heart-tilt: 8deg;
  --drift-x: -8px;
  --drift-y: 7px;
  animation-name: heartScatterAlt;
}

.heart-ab {
  left: 70%;
  top: 43%;
  --heart-size: 15px;
  --heart-color: #f5b1d1;
  --heart-opacity: 0.7;
  --heart-duration: 9.9s;
  --heart-delay: -5.5s;
  --heart-tilt: -9deg;
  --drift-x: 8px;
  --drift-y: -6px;
}

.heart-ac {
  left: 88%;
  top: 42%;
  --heart-size: 14px;
  --heart-color: #f6b7d7;
  --heart-opacity: 0.68;
  --heart-duration: 10.9s;
  --heart-delay: -8.1s;
  --heart-tilt: 10deg;
  --drift-x: -6px;
  --drift-y: 6px;
  animation-name: heartScatterAlt;
}

.heart-ad {
  left: 30%;
  top: 66%;
  --heart-size: 15px;
  --heart-color: #f4aacb;
  --heart-opacity: 0.69;
  --heart-duration: 9.2s;
  --heart-delay: -2.7s;
  --heart-tilt: -8deg;
  --drift-x: 7px;
  --drift-y: -8px;
}

.heart-ae {
  left: 64%;
  top: 66%;
  --heart-size: 16px;
  --heart-color: #f7bddb;
  --heart-opacity: 0.73;
  --heart-duration: 10.8s;
  --heart-delay: -6.4s;
  --heart-tilt: 8deg;
  --drift-x: -7px;
  --drift-y: 7px;
  animation-name: heartScatterAlt;
}

.day-glow {
  position: absolute;
  left: 12%;
  bottom: 12%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 203, 229, 0.22) 0%, rgba(255, 203, 229, 0) 70%);
}

body.theme-night .day-decor {
  opacity: 0;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin-top: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

.hero {
  position: relative;
  margin: 0 auto 20px;
  max-width: 760px;
  padding-top: 2px;
}

.hero-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  border-radius: 999px;
  color: var(--card-title);
  background: rgba(255, 133, 207, 0.14);
}

h1 {
  font-size: 2.6rem;
  color: var(--title-color);
  text-shadow: 0 8px 18px rgba(255, 105, 180, 0.24);
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

.hero-subtitle {
  color: var(--subtitle-color);
  margin: 0 auto 12px;
  font-size: 1.03rem;
  line-height: 1.8;
  max-width: 36em;
}

#days {
  display: inline-block;
  font-size: 1.8rem;
  color: var(--days-text);
  font-weight: bold;
  margin-bottom: 6px;
  padding: 8px 14px;
  border-radius: 14px;
  background: var(--days-bg);
}

#time_detail {
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  color: var(--subtitle-color);
  margin: 0;
}

.home-widgets {
  width: min(1088px, 100%);
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.carousel-widget,
.music-widget,
.countdown-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  backdrop-filter: none;
}

.carousel-widget h3,
.music-widget h3,
.countdown-section h3 {
  color: var(--card-title);
  margin-bottom: 10px;
  font-size: 1.02rem;
}

.carousel {
  --carousel-card-width: 170px;
  --carousel-gap: 12px;
  position: relative;
  width: min(100%, calc(var(--carousel-card-width) * 6 + var(--carousel-gap) * 5));
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: transparent;
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  align-items: center;
  gap: var(--carousel-gap);
  width: max-content;
  padding: 10px 0;
  line-height: 0;
}

.carousel-track img {
  width: var(--carousel-card-width);
  height: calc(var(--carousel-card-width) * 1.3);
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 6px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ctext x='3' y='21' font-size='20'%3E%F0%9F%94%8D%3C/text%3E%3C/svg%3E") 8 20, pointer;
}

.carousel-dots {
  display: none;
}

.carousel-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(242, 110, 176, 0.35);
}

.carousel-dots span.active {
  background: var(--card-title);
}

.preview-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  padding: 20px;
  z-index: 9999;
}

.preview-box {
  position: relative;
  max-width: 92vw;
  width: 460px;
  text-align: center;
}

.preview-box img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.65);
}

.close-btn {
  position: absolute;
  right: -10px;
  top: -42px;
  font-size: 34px;
  color: #fff;
  cursor: pointer;
}

.corner-tools {
  position: fixed;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.music-panel {
  position: fixed;
  right: 12px;
  bottom: 48px;
  width: 160px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 18px rgba(160, 99, 132, 0.18);
  z-index: 3;
}

.music-track-name {
  font-size: 0.75rem;
  color: var(--subtitle-color);
  margin-bottom: 7px;
  width: 100%;
  height: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.music-track-line {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.music-track-line-text {
  display: inline-block;
  will-change: transform;
}

.music-track-line.marquee .music-track-line-text {
  animation: musicMarquee var(--marquee-duration, 8s) linear infinite;
}

.music-controls {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.music-controls button {
  flex: 1;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--subtitle-color);
  font-size: 0.9rem;
  line-height: 1;
  padding: 7px 0;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.music-controls button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.music-controls button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.theme-toggle,
.music-fab {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  color: var(--subtitle-color);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover,
.music-fab:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.theme-toggle:active,
.music-fab:active {
  transform: translateY(0);
}

.theme-toggle {
  opacity: 0.95;
}

.music-fab.playing {
  opacity: 0.95;
  color: var(--card-title);
}

body.theme-night .music-panel {
  background: rgba(255, 245, 255, 0.9);
  border-color: rgba(145, 103, 192, 0.35);
}

body.theme-night .music-track-name,
body.theme-night .music-controls button {
  color: #4b3066;
}

body.theme-night .music-controls button {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(145, 103, 192, 0.35);
}

body.theme-night .theme-toggle,
body.theme-night .music-fab {
  background: rgba(255, 245, 255, 0.9);
  color: #4b3066;
  border: 1px solid rgba(145, 103, 192, 0.3);
}

body.theme-night .home-section-collapse-btn {
  background: rgba(255, 245, 255, 0.9);
  color: #4b3066;
  border-color: rgba(145, 103, 192, 0.3);
}

body.theme-night .music-fab.playing {
  color: #6c2f83;
}

body.theme-night .home-section-viewer {
  border-color: rgba(168, 130, 214, 0.42);
  background:
    radial-gradient(circle at 12% 16%, rgba(154, 114, 219, 0.22) 0%, transparent 42%),
    radial-gradient(circle at 86% 10%, rgba(242, 147, 205, 0.15) 0%, transparent 38%),
    linear-gradient(160deg, #2a1f3d 0%, #34264d 100%);
}

body.theme-night .home-media-card,
body.theme-night .home-record-item {
  background: linear-gradient(160deg, #2f2343 0%, #3b2a58 100%);
  border-color: rgba(174, 137, 222, 0.38);
}

body.theme-night .home-media-info h4,
body.theme-night .home-record-head h4 {
  color: #ffd5ee;
}

body.theme-night .home-media-info p,
body.theme-night .home-record-time,
body.theme-night .home-record-meta,
body.theme-night .home-record-note,
body.theme-night .home-page-info,
body.theme-night .home-section-footer,
body.theme-night .home-empty {
  color: #eee3ff;
}

body.theme-night .home-page-btn {
  background: rgba(43, 32, 64, 0.95);
  border-color: rgba(174, 137, 222, 0.45);
  color: #f5ecff;
}

.countdown-section {
  width: min(1088px, 100%);
  margin: 18px auto 18px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.countdown-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
  padding: 10px 8px;
}

.countdown-card h4 {
  color: var(--card-title);
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.countdown-card p:first-of-type {
  font-weight: 700;
  color: var(--days-text);
  margin-bottom: 5px;
}

.countdown-card p:last-of-type {
  font-size: 0.78rem;
  color: var(--subtitle-color);
}

.footer {
  text-align: center;
  margin-top: 26px;
  padding: 16px 0 8px;
  font-size: 0.95rem;
  border-top: 1px solid var(--card-border);
}

.nav-cards {
  width: min(1088px, 100%);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  font: inherit;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  color: var(--text-main);
  padding: 12px 10px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}

.card img {
  width: min(100%, 120px);
  height: 102px;
  margin-bottom: 8px;
  object-fit: fill;
}

.card h2 {
  color: var(--card-title);
  margin-bottom: 2px;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.card p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--subtitle-color);
  min-height: 2.7em;
}

.section-tab.is-active {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
  border-color: rgba(239, 63, 147, 0.5);
}

.home-section-viewer {
  --panel-accent: #ef3f93;
  --panel-accent-soft: rgba(239, 63, 147, 0.2);
  --panel-glow-a: rgba(255, 148, 202, 0.22);
  --panel-glow-b: rgba(255, 210, 236, 0.14);
  width: min(1088px, 100%);
  margin: 18px auto 18px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 16%, var(--panel-glow-a) 0%, transparent 42%),
    radial-gradient(circle at 86% 10%, var(--panel-glow-b) 0%, transparent 38%),
    var(--card-bg);
  padding: 18px;
  box-shadow: 0 14px 28px rgba(176, 94, 142, 0.2), var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.home-section-viewer.is-switching {
  transform: translateY(2px);
  box-shadow: 0 9px 18px rgba(176, 94, 142, 0.14), var(--shadow-card);
}

.home-section-head-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 10px;
  margin-bottom: 8px;
  min-height: 32px;
  padding-right: 52px;
}

.home-section-head h3 {
  color: var(--card-title);
  font-size: 1.35rem;
  text-align: center;
  width: 100%;
  margin-bottom: 0;
  letter-spacing: 0.02em;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.home-section-head-top > .home-section-collapse-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.home-section-head-top > .home-section-collapse-btn:hover {
  transform: translateY(calc(-50% - 1px));
}

@media (min-width: 721px) {
  #homeSectionTitle {
    position: relative;
    left: 25px;
  }
}

@media (max-width: 720px) {
  #homeSectionTitle {
    position: relative;
    left: 25px;
  }
}

.home-section-collapse-btn,
.home-page-btn {
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--subtitle-color);
  font-size: 0.8rem;
  line-height: 1;
  padding: 6px 8px;
  min-width: 42px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.home-section-collapse-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

#homeSectionSubtitle {
  color: var(--subtitle-color);
  margin-bottom: 10px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#homeSectionCount {
  display: inline-block;
  margin: 0 auto 16px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--days-text);
  background: linear-gradient(115deg, var(--panel-accent-soft), rgba(255, 255, 255, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.home-section-content {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  transition: opacity 0.22s ease, transform 0.28s ease;
}

.home-section-content.is-switching {
  opacity: 0.3;
  transform: translateY(8px) scale(0.995);
}

.home-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.home-media-card {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.67));
  box-shadow: 0 9px 18px rgba(160, 99, 132, 0.12);
  cursor: pointer;
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
  animation: sectionCardRise 0.45s ease both;
}

.home-media-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 16px 26px rgba(160, 99, 132, 0.2);
  border-color: color-mix(in srgb, var(--panel-accent) 38%, var(--card-border));
}

.home-media-cover {
  width: 100%;
  height: 220px;
  object-fit: fill;
  object-position: center;
  display: block;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.home-section-viewer[data-section="movies"] .home-media-cover,
.home-section-viewer[data-section="books"] .home-media-cover,
.home-section-viewer[data-section="games"] .home-media-cover,
.home-section-viewer[data-section="foods"] .home-media-cover {
  object-fit: cover;
}

.home-media-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--card-title);
  background: rgba(255, 255, 255, 0.86);
}

.home-media-info {
  padding: 10px 11px 12px;
}

.home-media-info h4 {
  font-size: 1rem;
  color: var(--card-title);
  margin-bottom: 5px;
}

.home-media-info p {
  font-size: 0.84rem;
  color: var(--subtitle-color);
}

.home-record-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-record-item {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68));
  padding: 12px;
  animation: sectionCardRise 0.44s ease both;
}

.home-record-item.is-clickable {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-record-item.is-clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 18px rgba(160, 99, 132, 0.18);
  border-color: color-mix(in srgb, var(--panel-accent) 34%, var(--card-border));
}

.home-record-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.home-record-item.has-thumb .home-record-main {
  grid-template-columns: 82px 1fr;
  align-items: start;
}

.home-record-item.has-thumb .home-record-body {
  display: flex;
  flex-direction: column;
}

.home-record-body {
  text-align: left;
}

.home-record-thumb {
  width: 82px;
  height: 72px;
  align-self: end;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
}

.home-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
}

.home-record-head h4 {
  color: var(--card-title);
  font-size: 1rem;
  font-weight: 700;
}

.home-detail-head h4 {
  color: #111;
  font-size: 1rem;
  font-weight: 700;
}

.home-record-head .home-status-badge {
  margin-left: auto;
  flex-shrink: 0;
}

.home-record-time,
.home-record-meta,
.home-record-note {
  color: var(--subtitle-color);
  text-align: left;
}

.home-record-time {
  font-size: 0.84rem;
  margin-top: 4px;
}

.home-record-meta {
  font-size: 0.9rem;
  margin-top: 3px;
}

.home-record-note {
  font-size: 0.9rem;
  margin-top: 2px;
  line-height: 1.55;
}

.home-pagination {
  margin-top: auto;
  padding-top: 12px;
  padding-right: 72px;
  width: 100%;
  position: relative;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.home-pagination > .home-section-collapse-btn {
  position: absolute;
  right: 0;
  top: calc(50% + 5.3px);
  transform: translateY(-50%);
}

.home-pagination > .home-section-collapse-btn:hover {
  transform: translateY(calc(-50% - 1px));
}

.home-pagination-only-collapse {
  min-height: 40px;
  padding-right: 0;
}

.home-pagination-only-collapse > .home-section-collapse-btn {
  margin-left: 0;
}

.home-page-info {
  text-align: center;
  font-size: 0.88rem;
  color: var(--subtitle-color);
  min-width: 72px;
}

.home-page-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  opacity: 0.9;
}

.home-page-btn.prev {
  margin-left: 75px;
}

.home-page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.home-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
}

.home-status-badge.status-done {
  background: linear-gradient(95deg, #1e9e63, #3fcf8e);
}

.home-status-badge.status-progress {
  background: linear-gradient(95deg, #2f7bde, #62b2ff);
}

.home-status-badge.status-pending {
  background: linear-gradient(95deg, #f2992e, #ffbe63);
}

.home-empty {
  border: 1px dashed var(--card-border);
  border-radius: 12px;
  padding: 38px 10px;
  color: var(--subtitle-color);
}

.home-section-footer {
  margin-top: 12px;
  color: var(--subtitle-color);
  font-size: 0.88rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.home-section-viewer.is-switching .home-section-head h3,
.home-section-viewer.is-switching #homeSectionSubtitle,
.home-section-viewer.is-switching #homeSectionCount,
.home-section-viewer.is-switching .home-section-footer {
  opacity: 0.55;
  transform: translateY(4px);
}

.home-media-card:nth-child(1),
.home-record-item:nth-child(1) { animation-delay: 0.03s; }
.home-media-card:nth-child(2),
.home-record-item:nth-child(2) { animation-delay: 0.06s; }
.home-media-card:nth-child(3),
.home-record-item:nth-child(3) { animation-delay: 0.09s; }
.home-media-card:nth-child(4),
.home-record-item:nth-child(4) { animation-delay: 0.12s; }
.home-media-card:nth-child(5),
.home-record-item:nth-child(5) { animation-delay: 0.15s; }
.home-media-card:nth-child(6),
.home-record-item:nth-child(6) { animation-delay: 0.18s; }
.home-media-card:nth-child(7),
.home-record-item:nth-child(7) { animation-delay: 0.21s; }
.home-media-card:nth-child(8),
.home-record-item:nth-child(8) { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .home-section-viewer,
  .home-section-viewer::before,
  .home-section-viewer::after,
  .home-section-content,
  .home-media-card,
  .home-record-item {
    animation: none !important;
    transition: none !important;
  }
}

.home-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  padding: 16px;
}

.home-overlay-box {
  position: relative;
  width: min(500px, 92vw);
  border-radius: 14px;
  background: #fff;
  color: #333;
  text-align: center;
  padding: 14px;
}

.home-overlay-box img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 10px;
}

.home-overlay-box p {
  margin-top: 10px;
}

.home-overlay-placeholder {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 2rem;
  background: #f6f6f6;
}

.home-overlay-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.home-detail-modal {
  width: min(560px, 95vw);
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  color: #333;
  text-align: left;
}

.home-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.home-detail-time {
  margin-top: 6px;
  font-size: 0.88rem;
  color: #666;
}

.home-detail-image {
  width: 100%;
  max-height: 70vh;
  margin-top: 10px;
  border-radius: 10px;
  object-fit: contain;
  background: #f6f6f6;
}

.home-detail-content {
  margin-top: 10px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.home-detail-close {
  position: static;
  width: auto;
  height: auto;
  display: block;
  padding: 8px 16px;
  border-radius: 999px;
  margin-top: 14px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.9rem;
  background: linear-gradient(95deg, #ff4f9f, #ff84ba);
}

@media (max-width: 720px) {
  body {
    display: block;
    padding: 14px 10px;
  }

  .container {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
  }

  .home-widgets {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .carousel {
    --carousel-gap: 10px;
    width: min(100%, calc(var(--carousel-card-width) * 2 + var(--carousel-gap)));
  }

  .carousel-track img {
    width: var(--carousel-card-width);
    height: calc(var(--carousel-card-width) * 0.9);
  }

  .countdown-grid {
    grid-template-columns: 1fr;
  }

  .nav-cards {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    justify-content: stretch;
  }

  .card {
    width: 100%;
    min-width: 0;
    padding: 12px 10px;
    border-radius: 14px;
  }

  .card img {
    width: min(100%, 112px);
    height: 96px;
    margin-bottom: 8px;
  }

  .card h2 {
    margin-bottom: 0;
    font-size: 1rem;
  }

  .home-section-viewer {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    padding: 12px;
    border-radius: 16px;
  }

  .home-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .home-media-cover {
    height: auto;
    aspect-ratio: 1 / 1;
    object-position: center;
  }

  .home-media-card {
    border-radius: 12px;
  }

  .home-media-info {
    padding: 8px 8px 10px;
  }

  .home-media-info h4 {
    font-size: 0.96rem;
    line-height: 1.3;
    margin-bottom: 0;
    min-height: 1.3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .home-record-item.has-thumb .home-record-main {
    grid-template-columns: 66px 1fr;
  }

  .home-record-thumb {
    width: 66px;
    height: 66px;
  }

  .home-record-head {
    flex-direction: row;
    align-items: flex-start;
  }

  h1 {
    font-size: 2.1rem;
  }

  #days {
    font-size: 1.4rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .moon {
    width: 64px;
    height: 64px;
    right: 5%;
    top: 7%;
  }

  body:not(.theme-night) .day-heart {
    display: none;
    opacity: 0.48;
    filter: drop-shadow(0 3px 6px rgba(247, 207, 225, 0.16));
    --heart-size: 15px;
    --heart-color: #FCE5F0;
  }

  body:not(.theme-night) .day-heart::before {
    font-size: calc(var(--heart-size, 15px) * 0.72);
    color: var(--heart-color, #FCE5F0);
    text-shadow: 0 0 4px rgba(249, 215, 232, 0.2);
  }

  body:not(.theme-night) .heart-a,
  body:not(.theme-night) .heart-c,
  body:not(.theme-night) .heart-e,
  body:not(.theme-night) .heart-g,
  body:not(.theme-night) .heart-i,
  body:not(.theme-night) .heart-k,
  body:not(.theme-night) .heart-m,
  body:not(.theme-night) .heart-o,
  body:not(.theme-night) .heart-q,
  body:not(.theme-night) .heart-s,
  body:not(.theme-night) .heart-u,
  body:not(.theme-night) .heart-w,
  body:not(.theme-night) .heart-y,
  body:not(.theme-night) .heart-aa {
    display: block;
  }

  body:not(.theme-night) .heart-a { left: 8%; top: 10%; }
  body:not(.theme-night) .heart-c { left: 32%; top: 12%; }
  body:not(.theme-night) .heart-e { left: 56%; top: 9%; }
  body:not(.theme-night) .heart-g { left: 80%; top: 11%; }
  body:not(.theme-night) .heart-i { left: 14%; top: 35%; }
  body:not(.theme-night) .heart-k { left: 38%; top: 38%; }
  body:not(.theme-night) .heart-m { left: 62%; top: 34%; }
  body:not(.theme-night) .heart-o { left: 86%; top: 37%; }
  body:not(.theme-night) .heart-q { left: 10%; top: 63%; }
  body:not(.theme-night) .heart-s { left: 34%; top: 66%; }
  body:not(.theme-night) .heart-u { left: 58%; top: 61%; }
  body:not(.theme-night) .heart-w { left: 82%; top: 64%; }
  body:not(.theme-night) .heart-y { left: 20%; top: 86%; }
  body:not(.theme-night) .heart-aa { left: 54%; top: 84%; }

  .corner-tools {
    right: 10px;
    bottom: 10px;
    gap: 5px;
  }

  .music-panel {
    right: 10px;
    bottom: 44px;
    width: 150px;
  }

  .theme-toggle,
  .music-fab {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 980px) {
  .countdown-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 460px) {
  .nav-cards {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .card {
    padding: 10px 8px;
  }

  .card img {
    width: min(100%, 92px);
    height: 82px;
    margin-bottom: 6px;
  }

  .card h2 {
    font-size: 0.95rem;
  }

  .home-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .home-media-info {
    padding: 7px 7px 9px;
  }

  .home-media-info h4 {
    font-size: 0.9rem;
    min-height: 1.28em;
  }
}

@keyframes twinkleA {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  50% {
    opacity: 0.95;
    transform: translateY(-2px);
  }
}

@keyframes twinkleB {
  0%,
  100% {
    opacity: 0.2;
    transform: translateY(0);
  }
  50% {
    opacity: 0.8;
    transform: translateY(2px);
  }
}

@keyframes heartScatter {
  0%,
  100% {
    transform: translate(0, 0) rotate(var(--heart-tilt, 0deg)) scale(var(--heart-scale, 1));
  }
  35% {
    transform: translate(calc(var(--drift-x, 8px) * 0.6), calc(var(--drift-y, -8px) * 0.6))
      rotate(calc(var(--heart-tilt, 0deg) + 4deg)) scale(calc(var(--heart-scale, 1) + 0.04));
  }
  70% {
    transform: translate(var(--drift-x, 8px), var(--drift-y, -8px))
      rotate(calc(var(--heart-tilt, 0deg) - 5deg)) scale(calc(var(--heart-scale, 1) + 0.08));
  }
}

@keyframes heartScatterAlt {
  0%,
  100% {
    transform: translate(0, 0) rotate(var(--heart-tilt, 0deg)) scale(var(--heart-scale, 1));
  }
  30% {
    transform: translate(calc(var(--drift-x, -8px) * 0.7), calc(var(--drift-y, 8px) * 0.5))
      rotate(calc(var(--heart-tilt, 0deg) - 6deg)) scale(calc(var(--heart-scale, 1) + 0.03));
  }
  68% {
    transform: translate(var(--drift-x, -8px), var(--drift-y, 8px))
      rotate(calc(var(--heart-tilt, 0deg) + 6deg)) scale(calc(var(--heart-scale, 1) + 0.07));
  }
}

@keyframes sectionGlowFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-16px, 12px, 0) scale(1.06);
  }
}

@keyframes sectionGlowFloatAlt {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(14px, -10px, 0) scale(1.05);
  }
}

@keyframes sectionCardRise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes musicMarquee {
  0%,
  10% {
    transform: translateX(0);
  }
  45% {
    transform: translateX(calc(-1 * var(--marquee-distance, 0px)));
  }
  60% {
    transform: translateX(calc(-1 * var(--marquee-distance, 0px)));
  }
  90%,
  100% {
    transform: translateX(0);
  }
}
