/* 昼夜切替（18:00–4:59 = night / 5:00–17:59 = day） */

html[data-theme="night"] {
  --sumi: #f2efe9;
  --sumi-soft: #e4dfd6;
  --ink: #d8d2c8;
  --muted: #a39e96;
  --paper: #000000;
  --line: rgba(255, 255, 255, 0.12);
  color-scheme: dark;
}

html[data-theme="night"] body {
  background-color: #000;
  color: var(--sumi);
}

html[data-theme="night"] #background-video,
html[data-theme="night"] #video-fallback,
html[data-theme="night"] .video-veil {
  opacity: 0 !important;
  visibility: hidden !important;
}

html[data-theme="night"] #background-video {
  background-color: #000;
  filter: brightness(0.55) contrast(1.05) saturate(0.85);
}

html[data-theme="night"] .content-wrapper,
html[data-theme="night"] .header,
html[data-theme="night"] .about-tamanoi-section,
html[data-theme="night"] .people-section,
html[data-theme="night"] .access-section,
html[data-theme="night"] .footer-container,
html[data-theme="night"] .person-image,
html[data-theme="night"] .google-calendar {
  background-color: #000;
}

html[data-theme="night"] .hero-brand-name {
  color: #f2efe9;
}

html[data-theme="night"] .hero-brand-name::after {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(196, 80, 84, 0.7) 18%,
    rgba(196, 80, 84, 0.7) 82%,
    transparent 100%
  );
}

html[data-theme="night"] .vertical-text {
  color: #c8c2b8;
}

html[data-theme="night"] .vertical-text .accent {
  color: #d45a5e;
}

html[data-theme="night"] .hero-lead,
html[data-theme="night"] .person-role,
html[data-theme="night"] .copyright,
html[data-theme="night"] .page-top-label {
  color: #9a948c;
}

html[data-theme="night"] .hero-cta {
  color: #c8c2b8;
  border-bottom-color: rgba(196, 80, 84, 0.55);
}

html[data-theme="night"] .hero-cta:hover {
  color: #e07074;
  border-bottom-color: rgba(224, 112, 116, 0.85);
}

html[data-theme="night"] .section-eyebrow {
  color: #d45a5e;
}

html[data-theme="night"] .section-title,
html[data-theme="night"] .person-name,
html[data-theme="night"] .footer-poem-line,
html[data-theme="night"] .access-address {
  color: #f2efe9;
}

html[data-theme="night"] .section-subtitle {
  color: #c8c2b8;
}

html[data-theme="night"] .title-rule {
  background: rgba(196, 80, 84, 0.7);
}

html[data-theme="night"] .contact-btn {
  background: #b3282c;
}

html[data-theme="night"] .contact-btn:hover {
  background: #9a1f22;
}

html[data-theme="night"] .slick-dots li button:before {
  color: rgba(255, 255, 255, 0.45);
}

html[data-theme="night"] .slick-dots li.slick-active button:before {
  color: #d45a5e;
}

@media (max-width: 768px) {
  html[data-theme="night"] body {
    background-color: #000;
  }
}

/* ---------- Starfield (night only) ---------- */
.starfield {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  overflow: hidden;
  background: transparent;
  mix-blend-mode: screen;
}

html[data-theme="night"] .starfield {
  display: block;
}

html[data-theme="night"] body {
  background-color: #000;
}

html[data-theme="night"] #site-container {
  position: relative;
  z-index: 1;
}

html[data-theme="night"] #loading-screen {
  z-index: 1000;
}

html[data-theme="night"] #page-top {
  z-index: 90;
}

.starfield-star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  animation-name: starTwinkle;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.starfield-star.is-bright {
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.55);
}

@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.85);
  }
  50% {
    opacity: var(--peak, 0.9);
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .starfield-star {
    animation: none !important;
    opacity: 0.55;
  }
}
