/* Shared chrome for ChangeLog + Blogs: theme dropdown, fonts, sakura match to index */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=M+PLUS+Rounded+1c:wght@400;500;700&display=swap');


/* ===== Unified fluent backgrounds (match index — no seams) ===== */
html {
  height: 100%;
  background-color: #050810; /* fallback while CSS paints */
}
html[data-theme="light"] { background-color: #e9f0f7; }
html[data-theme="sakura"] { background-color: #fdf6f8; }

body {
  min-height: 100vh;
  background-color: #050810;
  background-image:
    radial-gradient(ellipse at 15% 18%, rgba(0, 47, 167, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 75%, rgba(0, 200, 255, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 35%, rgba(0, 30, 80, 0.22) 0%, transparent 70%),
    linear-gradient(180deg, #050810 0%, #0a1220 50%, #060a14 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: 0 0;
  background-attachment: fixed;
  color: #e6e6e6;
}
html[data-theme="light"] body {
  background-color: #e9f0f7;
  background-image:
    radial-gradient(ellipse at 15% 18%, rgba(0, 120, 255, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 75%, rgba(0, 200, 255, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #f2f6fb 0%, #e3edf7 50%, #eaf1f8 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: 0 0;
  background-attachment: fixed;
  color: #1b2a38;
}
html[data-theme="sakura"] body {
  background-color: #fdf6f8;
  background-image:
    radial-gradient(ellipse at 20% 15%, rgba(255, 200, 220, 0.55) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(255, 230, 240, 0.5) 0%, transparent 50%),
    linear-gradient(180deg, #fff8fa 0%, #fdf2f5 50%, #faf0f3 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: 0 0;
  background-attachment: fixed;
  color: #3d2a32;
  font-family: "Nunito", "M PLUS Rounded 1c", "Helvetica Neue", sans-serif;
}

/* Single soft vignette — no double stacking cracks */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  box-shadow: inset 0 0 140px rgba(0, 10, 30, 0.7);
  pointer-events: none;
  z-index: 1;
}
html[data-theme="light"] body::after {
  box-shadow: inset 0 0 100px rgba(20, 50, 90, 0.06);
}
/* Content above vignette — keep music-ctrl fixed at top-right */
.log-page,
.site-footer {
  position: relative;
  z-index: 2;
}
.music-ctrl {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 40;
}

@media (prefers-reduced-motion: reduce) {
  body { background-attachment: scroll; }
}

.music-ctrl {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
@media (max-width: 720px) {
  .music-ctrl { top: 14px; right: 14px; gap: 8px; }
}

.theme-wrap { position: relative; display: inline-block; }
.theme-btn .chev {
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
  margin-left: 2px;
  transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.theme-wrap.open .theme-btn .chev,
.theme-wrap:focus-within .theme-btn .chev,
.theme-wrap:hover .theme-btn .chev {
  transform: rotate(180deg);
}
.theme-btn svg { width: 16px; height: 16px; display: block; fill: currentColor; }
.theme-btn .icon-sun,
.theme-btn .icon-sakura { display: none; }
.theme-btn .icon-moon { display: block; }
html[data-theme="light"] .theme-btn .icon-moon { display: none; }
html[data-theme="light"] .theme-btn .icon-sun { display: block; }
html[data-theme="light"] .theme-btn .icon-sakura { display: none; }
html[data-theme="sakura"] .theme-btn .icon-moon { display: none; }
html[data-theme="sakura"] .theme-btn .icon-sun { display: none; }
html[data-theme="sakura"] .theme-btn .icon-sakura { display: block; }

.theme-menu {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 100%;
  width: max-content;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transform-origin: top right;
  pointer-events: none;
  transition:
    opacity 0.32s cubic-bezier(0.165, 0.84, 0.44, 1),
    transform 0.32s cubic-bezier(0.165, 0.84, 0.44, 1),
    visibility 0.32s;
  z-index: 50;
}
.theme-menu::before {
  content: "";
  position: absolute;
  top: 8px; left: 0; right: 0; bottom: 0;
  background: rgba(5, 12, 28, 0.94);
  border: 1px solid rgba(0, 200, 255, 0.22);
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 180, 255, 0.12);
  backdrop-filter: blur(12px);
  z-index: -1;
}
.theme-menu::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -14px;
  height: 14px;
  background: transparent;
}
.theme-menu li {
  position: relative;
  border-bottom: 1px solid rgba(0, 200, 255, 0.08);
}
.theme-menu li:last-child { border-bottom: none; }
.theme-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 22px;
  background: transparent;
  border: none;
  color: #e8eef4;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  white-space: nowrap;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  transition: background 0.22s ease, color 0.22s ease, text-shadow 0.22s ease, padding-left 0.25s ease;
}
.theme-menu button:hover {
  background: rgba(0, 180, 255, 0.12);
  color: #00e5ff;
  padding-left: 28px;
  text-shadow:
    0 0 8px rgba(0, 229, 255, 0.9),
    0 0 18px rgba(0, 180, 255, 0.65),
    0 0 32px rgba(0, 140, 255, 0.4);
}
.theme-menu button.active {
  color: #00e5ff;
  background: rgba(0, 180, 255, 0.1);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}
.theme-wrap.open .theme-btn,
.theme-wrap:focus-within .theme-btn,
.theme-wrap:hover .theme-btn {
  border-color: #00d4ff;
  color: #00e5ff;
  background: rgba(0, 180, 255, 0.08);
  box-shadow: 0 0 18px rgba(0, 200, 255, 0.25);
}
.theme-wrap.open .theme-menu,
.theme-wrap:focus-within .theme-menu,
.theme-wrap:hover .theme-menu,
.theme-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

html[data-theme="light"] .theme-menu::before {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(0, 90, 140, 0.25);
  box-shadow: 0 16px 40px rgba(20, 50, 90, 0.2);
}
html[data-theme="light"] .theme-menu li { border-bottom-color: rgba(0, 90, 140, 0.1); }
html[data-theme="light"] .theme-menu button { color: #14212e; }
html[data-theme="light"] .theme-menu button:hover {
  background: rgba(0, 148, 200, 0.1);
  color: #006a94;
  text-shadow: none;
}
html[data-theme="light"] .theme-menu button.active {
  color: #006a94;
  background: rgba(0, 148, 200, 0.12);
  text-shadow: none;
}
html[data-theme="light"] .theme-wrap.open .theme-btn,
html[data-theme="light"] .theme-wrap:focus-within .theme-btn,
html[data-theme="light"] .theme-wrap:hover .theme-btn {
  border-color: #0094c8;
  color: #006a94;
  background: rgba(0, 148, 200, 0.08);
  box-shadow: 0 0 18px rgba(0, 148, 200, 0.2);
}

/* Sakura theme menu + page chrome — match index */
html[data-theme="sakura"] {
  color-scheme: light;
  --accent: #d46a8c;
  --accent-bright: #c4456e;
  --accent-mid: #e891ad;
  --panel-bar: #d46a8c;
}
html[data-theme="sakura"] body {
  font-family: "Nunito", "M PLUS Rounded 1c", "Helvetica Neue", sans-serif;
}
html[data-theme="sakura"] body::after {
  box-shadow: inset 0 0 100px rgba(255, 220, 230, 0.35);
}
html[data-theme="sakura"] .music-btn,
html[data-theme="sakura"] .log-back {
  border-color: rgba(212, 106, 140, 0.4);
  color: #3d2a32;
  background: rgba(255, 255, 255, 0.55);
  font-family: "Nunito", "M PLUS Rounded 1c", "Helvetica Neue", sans-serif;
}
html[data-theme="sakura"] .music-btn:hover,
html[data-theme="sakura"] .log-back:hover,
html[data-theme="sakura"] .theme-wrap.open .theme-btn,
html[data-theme="sakura"] .theme-wrap:focus-within .theme-btn,
html[data-theme="sakura"] .theme-wrap:hover .theme-btn {
  border-color: #d46a8c;
  color: #c4456e;
  background: rgba(212, 106, 140, 0.1);
  box-shadow: 0 0 18px rgba(212, 106, 140, 0.25);
}
html[data-theme="sakura"] .theme-menu::before {
  background: rgba(255, 252, 253, 0.97);
  border-color: rgba(212, 106, 140, 0.28);
  box-shadow: 0 16px 40px rgba(180, 100, 130, 0.15);
}
html[data-theme="sakura"] .theme-menu li { border-bottom-color: rgba(212, 106, 140, 0.12); }
html[data-theme="sakura"] .theme-menu button {
  color: #2a1a22;
  font-family: "Nunito", "M PLUS Rounded 1c", sans-serif;
}
html[data-theme="sakura"] .theme-menu button:hover {
  background: rgba(212, 106, 140, 0.1);
  color: #c4456e;
  text-shadow: none;
}
html[data-theme="sakura"] .theme-menu button.active {
  color: #c4456e;
  background: rgba(212, 106, 140, 0.12);
  text-shadow: none;
}
html[data-theme="sakura"] .log-page-title {
  color: #2a1a22;
  text-shadow: none;
  font-family: "M PLUS Rounded 1c", "Nunito", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}
html[data-theme="sakura"] .log-page-sub {
  color: #9a7a85;
  font-family: "Nunito", "M PLUS Rounded 1c", sans-serif;
}
html[data-theme="sakura"] .site-footer {
  color: rgba(61, 42, 50, 0.55);
  font-family: "Nunito", sans-serif;
}


/* ---- Light / Sakura: no text glow; theme-menu entries stay flat ---- */
html[data-theme="light"] .theme-menu button,
html[data-theme="light"] .theme-menu button:hover,
html[data-theme="light"] .theme-menu button.active,
html[data-theme="light"] .music-btn:hover,
html[data-theme="light"] .theme-btn:hover {
  text-shadow: none !important;
  filter: none !important;
}
html[data-theme="sakura"] .theme-menu button,
html[data-theme="sakura"] .theme-menu button:hover,
html[data-theme="sakura"] .theme-menu button.active,
html[data-theme="sakura"] .music-btn:hover,
html[data-theme="sakura"] .theme-btn:hover,
html[data-theme="sakura"] .log-back:hover {
  text-shadow: none !important;
  filter: none !important;
}
/* Sakura theme-menu: never draw a pill/rectangle around dropdown items */
html[data-theme="sakura"] .theme-menu button {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}
html[data-theme="sakura"] .theme-menu button:hover,
html[data-theme="sakura"] .theme-menu button:focus-visible,
html[data-theme="sakura"] .theme-menu button.active {
  background: rgba(212, 106, 140, 0.1) !important;
  color: #c4456e !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
/* Soft sakura hover for the theme trigger itself (not menu items) */
html[data-theme="sakura"] .theme-btn:hover,
html[data-theme="sakura"] .theme-wrap.open .theme-btn,
html[data-theme="sakura"] .theme-wrap:hover .theme-btn {
  box-shadow: 0 4px 14px rgba(196, 69, 110, 0.14) !important;
  text-shadow: none !important;
}
html[data-theme="light"] .theme-btn:hover,
html[data-theme="light"] .theme-wrap.open .theme-btn,
html[data-theme="light"] .theme-wrap:hover .theme-btn {
  box-shadow: 0 4px 14px rgba(30, 105, 145, 0.12) !important;
  text-shadow: none !important;
}
