:root {
  --ice: #7ec8e3;
  --ice-soft: #c8ebf8;
  --ice-deep: #2f6f96;
  --pink: #ffb6c8;
  --pink-soft: #ffe4ec;
  --cream: #fff8f5;
  --white: #fffcfb;
  --ink: #2a3f55;
  --line: #bfe4f4;
  --card: #ffffff;
  --header-h: 64px;
  --radius: 16px;
  --shadow: 4px 4px 0 rgba(90, 170, 205, 0.28);
  --font: "M PLUS Rounded 1c", "Zen Maru Gothic", "PingFang SC", "Microsoft YaHei", sans-serif;
  --page-tint: rgba(238, 249, 255, 0.78);
  --header-bg: linear-gradient(180deg, rgba(255,252,251,0.92), rgba(232,246,255,0.88));
  --nav-active: linear-gradient(135deg, #9fd8ef, #ffe0ea);
  --explore-bg: linear-gradient(135deg, #fff 0%, #ffe4ec 55%, #d8f1fb 100%);
  --explore-fg: #1f4d6b;
  --link-chip: linear-gradient(135deg, #e8f7ff, #ffe4ec);
  --circle-btn: linear-gradient(135deg, #9fd8ef, #ffc4d4);
  --about-bg: linear-gradient(180deg, #fff, #f4fbff);
  --gallery-panel: rgba(255, 252, 251, 0.82);
  --wp-shade: linear-gradient(180deg, rgba(255,248,245,0.04) 0%, rgba(40,70,95,0.18) 48%, rgba(238,249,255,0.55) 100%);
  --hero-local-shade: linear-gradient(180deg, rgba(255,248,245,0.04) 0%, rgba(40,70,95,0.22) 55%, rgba(20,40,60,0.45) 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background: var(--page-tint);
  min-height: 100%;
}

.site-wallpaper {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #9fd4ea;
}
.site-wallpaper .wp {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity .55s ease;
}
html[data-theme="day"] .wp-day { opacity: 1; }
html[data-theme="night"] .wp-night { opacity: 1; }
.wp-shade {
  position: absolute;
  inset: 0;
  background: var(--wp-shade);
}
.wp-stars {
  display: none;
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.9), transparent),
    radial-gradient(1.5px 1.5px at 28% 42%, rgba(180,230,255,.8), transparent),
    radial-gradient(1px 1px at 63% 22%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.2px 1.2px at 81% 58%, rgba(210,190,255,.85), transparent),
    radial-gradient(1px 1px at 44% 76%, rgba(255,255,255,.55), transparent),
    radial-gradient(2px 2px at 91% 12%, rgba(150,220,255,.65), transparent);
  animation: twinkle 4.2s ease-in-out infinite;
}
html[data-theme="night"] .wp-stars { display: block; }

.page-deco {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(90, 170, 205, 0.35) 1px, transparent 0);
  background-size: 22px 22px;
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--hero-local-shade);
}
.hero-sparkles {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 18% 28%, rgba(255,255,255,0.55) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 22%, rgba(255,255,255,0.45) 0 2px, transparent 3px),
    radial-gradient(circle at 66% 68%, rgba(255,182,200,0.55) 0 3px, transparent 4px);
  animation: twinkle 3.6s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.hero-inner {
  --type-ink: #fffdf8;
  --type-soft: #ffe4f0;
  --type-glow: rgba(126, 200, 227, 0.55);
  --type-panel: rgba(255, 252, 251, 0.16);
  --type-border: rgba(255, 255, 255, 0.72);
  --type-caret: #7ec8e3;
  position: relative;
  z-index: 1;
  width: min(92vw, 720px);
  margin: 0 auto;
  text-align: center;
  color: var(--type-ink);
  padding: 1.6rem 1.4rem 1.8rem;
  border: 2px solid var(--type-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,182,200,0.28), transparent 42%),
    radial-gradient(circle at 80% 100%, rgba(126,200,227,0.25), transparent 46%),
    var(--type-panel);
  backdrop-filter: blur(8px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12) inset,
    0 12px 40px rgba(30, 70, 110, 0.18),
    0 0 28px var(--type-glow);
  text-shadow: 0 2px 14px rgba(0,0,0,0.22);
  transform-origin: center center;
  transition: opacity .55s ease, transform .7s cubic-bezier(.2,.8,.2,1), filter .55s ease;
}
.hero-inner[hidden] { display: none !important; }
.hero-inner.is-exit {
  opacity: 0;
  transform: scale(0.88) translateY(-18px);
  filter: blur(6px);
  pointer-events: none;
}
.type-line {
  margin: 0.55rem 0;
  min-height: 1.45em;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.55;
  opacity: 0.28;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease, color .25s ease;
}
.type-line:nth-child(1) {
  font-size: clamp(1.35rem, 3.6vw, 2rem);
  color: var(--type-ink);
}
.type-line:nth-child(2) {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  color: var(--type-soft);
  font-weight: 700;
}
.type-line:nth-child(3) {
  font-size: clamp(1rem, 2.3vw, 1.22rem);
  color: var(--type-soft);
  font-weight: 700;
}
.type-line.is-active,
.type-line.is-done {
  opacity: 1;
  transform: translateY(0);
}
.type-line.is-active {
  animation: typePop .35s ease;
}
@keyframes typePop {
  0% { transform: translateY(8px) scale(0.98); }
  60% { transform: translateY(-2px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}
.type-caret {
  display: inline-block;
  width: 0.12em;
  height: 1.05em;
  margin-left: 0.12em;
  vertical-align: -0.12em;
  background: var(--type-caret);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--type-caret);
  animation: caretBlink 0.75s steps(1) infinite;
}
.hero-inner.is-complete .type-caret { opacity: 0; }
@keyframes caretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.type-kaomoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.18em;
  padding: 0.08em 0.42em 0.16em;
  vertical-align: -0.18em;
  font-size: 0.92em;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--type-ink);
  border: 2px solid var(--emoji-border, #ffb3c9);
  border-radius: 999px;
  background: var(--emoji-bg, rgba(255, 236, 244, 0.92));
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.35) inset,
    2px 2px 0 var(--emoji-shadow, rgba(255, 155, 190, 0.45));
  transform: translateY(1px) rotate(-2deg);
  animation: kaomojiPop .5s cubic-bezier(.2,.9,.2,1);
}
@keyframes kaomojiPop {
  0% { transform: translateY(8px) scale(0.55) rotate(-10deg); opacity: 0; }
  70% { transform: translateY(-2px) scale(1.08) rotate(2deg); opacity: 1; }
  100% { transform: translateY(1px) scale(1) rotate(-2deg); opacity: 1; }
}
html[data-theme="day"] .hero-inner {
  --type-ink: #ffffff;
  --type-soft: #fff0f6;
  --type-glow: rgba(255, 179, 201, 0.45);
  --type-panel: rgba(255, 250, 252, 0.18);
  --type-border: #ffb3c9; /* 阿洛娜·樱粉 */
  --type-caret: #ff9eb8;
  --emoji-border: #ff9eb8;
  --emoji-bg: rgba(255, 240, 246, 0.95);
  --emoji-shadow: rgba(255, 158, 184, 0.5);
  box-shadow:
    0 0 0 1px rgba(255, 179, 201, 0.35) inset,
    0 12px 40px rgba(90, 160, 210, 0.18),
    0 0 28px rgba(255, 179, 201, 0.35);
}
html[data-theme="night"] .hero-inner {
  --type-ink: #eef8ff;
  --type-soft: #c9f6ff;
  --type-glow: rgba(255, 61, 154, 0.35);
  --type-panel: rgba(12, 16, 30, 0.42);
  --type-border: #ff3d9a; /* 普拉娜·光环 */
  --type-caret: #ff3d9a;
  --emoji-border: #ff3d9a;
  --emoji-bg: rgba(28, 18, 40, 0.92);
  --emoji-shadow: rgba(255, 61, 154, 0.45);
  box-shadow:
    0 0 0 1px rgba(255,61,154,0.2) inset,
    0 12px 40px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(255, 61, 154, 0.28);
}
/* 参考 mikupara：硬阴影字 + 整体轻弹跳 */
.hero-scroll {
  --scroll-ink: #ffffff;
  --scroll-hard: #ffb3c9;
  --scroll-chevron: #9fd8ef;
  --scroll-chevron-hard: #ff9eb8;
  position: absolute;
  left: 50%;
  bottom: max(1.4rem, env(safe-area-inset-bottom));
  z-index: 2;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  color: var(--scroll-ink);
  text-decoration: none;
  opacity: 0.96;
  animation: scrollBounce 2.2s ease infinite;
}
.hero-scroll-label {
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-shadow:
    2px 2px 0 var(--scroll-hard),
    0 0 8px rgba(0, 0, 0, 0.35);
}
.hero-scroll-chevrons {
  display: grid;
  place-items: center;
  color: var(--scroll-chevron);
  filter: drop-shadow(2px 2px 0 var(--scroll-chevron-hard));
}
.hero-scroll:hover {
  animation-duration: 1.4s;
}
@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}
html[data-theme="day"] .hero-scroll {
  --scroll-ink: #ffffff;
  --scroll-hard: #ff9eb8;      /* 阿洛娜樱粉硬阴影 */
  --scroll-chevron: #7ec8e3;   /* 阿洛娜冰蓝 */
  --scroll-chevron-hard: #ffb3c9;
}
html[data-theme="night"] .hero-scroll {
  --scroll-ink: #eef8ff;
  --scroll-hard: #ff3d9a;      /* 普拉娜光环硬阴影 */
  --scroll-chevron: #9cefff;   /* 发色冰青 */
  --scroll-chevron-hard: #ff3d9a;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--line);
  box-shadow: 0 6px 0 rgba(190, 230, 245, 0.25);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1rem;
  flex-wrap: wrap;
}
.logo {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ice-deep);
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
}
.logo small {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: #7aa9c4;
  font-weight: 700;
}
.nav, .header-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.nav { flex: 1; }
.nav button, .header-actions button {
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  box-shadow: 2px 2px 0 rgba(126, 200, 227, 0.25);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.nav button.active {
  background: var(--nav-active);
  border-color: var(--ice);
  color: var(--explore-fg);
  transform: translateY(-1px);
}
.theme-toggle {
  min-width: 4.4rem;
}
.header-actions button:hover, .nav button:hover {
  border-color: var(--pink);
  transform: translateY(-1px);
}

.gallery {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.4rem 1rem 4.5rem;
  min-height: 70vh;
}
.gallery::before {
  content: "";
  position: absolute;
  inset: 0 -1rem;
  z-index: -1;
  background: var(--gallery-panel);
  border-radius: 28px 28px 0 0;
}
.gallery-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.1rem;
}
.gallery-title h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--ice-deep);
}
.ribbon {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border: 2px solid #fff;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ice), var(--pink));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
}

/* 真实瀑布流：多列 flex，JS 往最短列追加，无批次空洞、追加不重排其它列 */
.masonry {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.masonry-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (max-width: 760px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "actions"
      "nav";
    gap: 0.5rem;
    align-items: stretch;
    padding: 0.6rem 0.75rem 0.7rem;
  }
  .logo {
    grid-area: logo;
    justify-self: start;
  }
  .header-actions {
    grid-area: actions;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    width: 100%;
  }
  .nav {
    grid-area: nav;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    width: 100%;
    flex: none;
    order: unset;
  }
  .nav button,
  .header-actions button {
    width: 100%;
    padding: 0.42rem 0.2rem;
    font-size: 0.82rem;
    text-align: center;
    white-space: nowrap;
  }
  .hero-inner {
    width: min(94vw, 720px);
    padding: 1.15rem 0.95rem 1.25rem;
    border-radius: 18px;
  }
  .type-line { margin: 0.42rem 0; letter-spacing: 0.02em; }
  .type-line:nth-child(1) { font-size: clamp(1.05rem, 5vw, 1.45rem); }
  .type-line:nth-child(2),
  .type-line:nth-child(3) { font-size: clamp(0.92rem, 3.8vw, 1.1rem); }
  .type-kaomoji {
    font-size: 0.78em;
    padding: 0.06em 0.32em 0.12em;
    margin: 0 0.1em;
  }
  .hero-scroll-label {
    font-size: 0.76rem;
    letter-spacing: 0.1em;
  }
  .hero-scroll-chevrons svg {
    width: 30px;
    height: 30px;
  }
  .gallery {
    padding: 1rem 0.75rem 3.5rem;
  }
  .gallery::before {
    inset: 0 -0.45rem;
    border-radius: 20px 20px 0 0;
  }
}
@media (max-width: 420px) {
  .nav button,
  .header-actions button {
    font-size: 0.78rem;
    padding: 0.4rem 0.15rem;
  }
}

.card {
  margin: 0;
  width: 100%;
  background: var(--card);
  border: 3px solid #fff;
  outline: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 rgba(90, 170, 205, 0.32);
}
.card img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .28s ease;
  background: linear-gradient(135deg, #e7f4fb, #ffe8f0);
}
.card:hover img { transform: scale(1.03); }
.card .author {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.7rem 0.8rem;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  background: linear-gradient(180deg, transparent, rgba(30,55,80,0.78));
  opacity: 0;
  transition: opacity .2s ease;
}
.card:hover .author { opacity: 1; }
@media (hover: none) {
  .card .author { opacity: 0.95; padding-top: 1.5rem; }
}

.sentinel { height: 1px; }

.modal[hidden], .about[hidden] { display: none !important; }
.modal, .about {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
}
.modal-backdrop, .about-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.07) 1px, transparent 0) 0 0/16px 16px,
    rgba(18, 34, 52, 0.82);
}
.modal-panel {
  position: relative;
  z-index: 2;
  width: min(92vw, 980px);
  max-height: 92vh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.85rem;
  padding: 0.9rem;
  border: 3px solid #fff;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
  pointer-events: auto;
}
.modal-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
}
.modal-media {
  position: relative;
  width: 100%;
  min-height: 36vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(126,200,227,0.18), rgba(255,182,200,0.16)),
    rgba(0,0,0,0.22);
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 16px;
  overflow: hidden;
}
.modal-media img {
  max-width: min(82vw, 860px);
  max-height: 68vh;
  object-fit: contain;
  display: block;
}
.modal-meta {
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.modal-meta h2 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}
.modal-meta p { margin: 0.18rem 0; opacity: 0.95; font-weight: 500; }
.modal-links {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.modal-links a {
  color: var(--explore-fg);
  background: var(--link-chip);
  text-decoration: none;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-weight: 800;
  box-shadow: 2px 2px 0 rgba(255,255,255,0.25);
}
.modal-links a:hover { transform: translateY(-1px); }

.modal-close, .modal-nav, .about-close {
  border: 3px solid #fff;
  background: var(--circle-btn);
  color: var(--explore-fg);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
  transition: transform .15s ease;
  pointer-events: auto;
}
.modal-close:hover, .modal-nav:hover, .about-close:hover {
  transform: scale(1.06);
}
.modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 6;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
}
/* 左右键贴在弹窗图片两侧 */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
}
.modal-nav.prev { left: 0.55rem; }
.modal-nav.next { right: 0.55rem; }
.modal-nav:hover { transform: translateY(-50%) scale(1.06); }

.spinner {
  position: absolute;
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.about-card {
  position: relative;
  z-index: 1;
  width: min(94vw, 720px);
  max-height: min(86vh, 900px);
  overflow: auto;
  background: var(--about-bg);
  border: 3px solid #fff;
  outline: 3px solid var(--ice);
  border-radius: 22px;
  padding: 1.55rem 1.25rem 1.25rem;
  box-shadow: 8px 8px 0 rgba(122,190,214,0.35);
}
.about-badge {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.15rem 0.55rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ice), var(--pink));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.about-card h2 {
  margin: 0 0 0.65rem;
  color: var(--ice-deep);
  letter-spacing: 0.1em;
}
.about-card p { margin: 0.45rem 0; line-height: 1.6; }
.about-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
}

.about-api {
  margin-top: 1.15rem;
  padding-top: 0.95rem;
  border-top: 1px dashed rgba(47, 111, 150, 0.28);
}
.about-api-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--ice-deep);
  letter-spacing: 0.04em;
}
.about-api-note {
  margin: 0 0 0.85rem !important;
  font-size: 0.88rem;
  opacity: 0.9;
}
.api-box {
  margin: 0 0 0.75rem;
  padding: 0.85rem 0.9rem 0.7rem;
  border: 1.5px dashed rgba(255, 160, 185, 0.85);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
}
.api-box-h,
.api-box-v,
.api-box-s {
  border-color: rgba(126, 200, 227, 0.9);
}
.api-box-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}
.api-box-head h4 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
}
.api-box-mix .api-box-head h4,
.api-box-mix .api-ico { color: #e87a9a; }
.api-box-h .api-box-head h4,
.api-box-h .api-ico,
.api-box-v .api-box-head h4,
.api-box-v .api-ico,
.api-box-s .api-box-head h4,
.api-box-s .api-ico { color: #3f8fb3; }
.api-ico {
  display: inline-flex;
  flex-shrink: 0;
}
.api-box ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  list-style: disc;
}
.api-box li {
  margin: 0.28rem 0;
  line-height: 1.45;
  word-break: break-all;
}
.api-box li span {
  display: inline-block;
  min-width: 5.2em;
  margin-right: 0.35rem;
  font-weight: 700;
  opacity: 0.85;
}
.api-box a {
  color: #2f8eab;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.api-box a:hover { color: #1f6f8a; }
.api-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.api-grid .api-box { margin: 0; }

@media (max-width: 720px) {
  .api-grid { grid-template-columns: 1fr; }
  .about-card { width: min(96vw, 720px); padding: 1.25rem 0.95rem 1rem; }
}

@media (max-width: 720px) {
  .modal-nav {
    width: 46px;
    height: 46px;
    font-size: 1.45rem;
  }
  .modal-panel { width: min(96vw, 980px); padding: 0.65rem; }
  .modal-media img { max-height: 58vh; }
}

/* 普拉娜：夜空深蓝 + 发色冰青 + 光环品红 */
html[data-theme="night"] {
  --halo: #ff3d9a;
  --halo-soft: rgba(255, 61, 154, 0.55);
  --ice: #9cefff;
  --ice-soft: #15263a;
  --ice-deep: #e8f9ff;
  --pink: #ff3d9a;
  --pink-soft: #3a1a32;
  --cream: #0a0e1a;
  --white: #14182a;
  --ink: #eef8ff;
  --line: #ff3d9a;
  --card: rgba(14, 18, 32, 0.78);
  --shadow: 4px 4px 0 rgba(255, 61, 154, 0.18);
  --page-tint: rgba(8, 12, 22, 0.12);
  --header-bg: linear-gradient(180deg, rgba(12, 16, 30, 0.88), rgba(16, 20, 36, 0.82));
  --nav-active: linear-gradient(135deg, #1a3a52, #6a2850);
  --explore-bg: linear-gradient(135deg, #152a42 0%, #5a2048 50%, #163848 100%);
  --explore-fg: #eef8ff;
  --link-chip: linear-gradient(135deg, #163248, #5a2848);
  --circle-btn: linear-gradient(135deg, #1c4860, #d04090);
  --about-bg: linear-gradient(180deg, #141c30, #0c1220);
  --gallery-panel: rgba(8, 12, 22, 0.42);
  --wp-shade: linear-gradient(180deg, rgba(8, 12, 22, 0.02) 0%, rgba(8, 12, 22, 0.08) 52%, rgba(8, 10, 18, 0.38) 100%);
  --hero-local-shade: linear-gradient(180deg, rgba(8, 12, 22, 0) 0%, rgba(8, 12, 22, 0.1) 72%, rgba(8, 10, 18, 0.26) 100%);
}
html[data-theme="night"] .site-wallpaper { background: #0a0e1a; }
html[data-theme="night"] .site-header {
  border-bottom-color: var(--halo);
  box-shadow: 0 0 18px rgba(255, 61, 154, 0.18);
}
html[data-theme="night"] .logo { color: #e8f9ff; }
html[data-theme="night"] .logo small { color: #9cefff; }
html[data-theme="night"] .nav button,
html[data-theme="night"] .header-actions button {
  background: rgba(16, 22, 38, 0.82);
  color: var(--ink);
  border-color: var(--halo-soft);
  box-shadow: 0 0 0 1px rgba(255, 61, 154, 0.08), 2px 2px 0 rgba(0, 0, 0, 0.35);
}
html[data-theme="night"] .nav button.active {
  color: #fff;
  border-color: var(--halo);
  background: linear-gradient(135deg, rgba(28, 70, 96, 0.95), rgba(120, 40, 90, 0.9));
  box-shadow: 0 0 14px rgba(255, 61, 154, 0.35);
}
html[data-theme="night"] .header-actions button:hover,
html[data-theme="night"] .nav button:hover {
  border-color: var(--halo);
}
html[data-theme="night"] .card {
  border-color: var(--halo);
  outline-color: rgba(156, 239, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 61, 154, 0.2), 4px 4px 0 rgba(0, 0, 0, 0.35);
}
html[data-theme="night"] .card:hover {
  box-shadow: 0 0 18px rgba(255, 61, 154, 0.28), 6px 6px 0 rgba(0, 0, 0, 0.4);
}
html[data-theme="night"] .card img {
  background: linear-gradient(135deg, #101628, #1a1430);
}
html[data-theme="night"] .modal-panel {
  border-color: var(--halo);
  background: linear-gradient(180deg, rgba(18, 24, 40, 0.92), rgba(10, 14, 26, 0.95));
  box-shadow: 0 0 28px rgba(255, 61, 154, 0.2);
}
html[data-theme="night"] .modal-media {
  border-color: rgba(255, 61, 154, 0.45);
  background:
    linear-gradient(135deg, rgba(40, 90, 120, 0.2), rgba(160, 40, 110, 0.16)),
    rgba(0, 8, 16, 0.42);
}
html[data-theme="night"] .modal-links a,
html[data-theme="night"] .modal-close,
html[data-theme="night"] .modal-nav,
html[data-theme="night"] .about-close {
  border-color: var(--halo);
}
html[data-theme="night"] .about-card {
  border-color: var(--halo);
  outline-color: rgba(156, 239, 255, 0.35);
  color: var(--ink);
}
html[data-theme="night"] .about-api {
  border-top-color: rgba(255, 61, 154, 0.35);
}
html[data-theme="night"] .api-box {
  background: rgba(10, 14, 26, 0.55);
  border-color: rgba(255, 61, 154, 0.55);
}
html[data-theme="night"] .api-box-h,
html[data-theme="night"] .api-box-v,
html[data-theme="night"] .api-box-s {
  border-color: rgba(156, 239, 255, 0.55);
}
html[data-theme="night"] .api-box-mix .api-box-head h4,
html[data-theme="night"] .api-box-mix .api-ico { color: #ff7ab8; }
html[data-theme="night"] .api-box-h .api-box-head h4,
html[data-theme="night"] .api-box-h .api-ico,
html[data-theme="night"] .api-box-v .api-box-head h4,
html[data-theme="night"] .api-box-v .api-ico,
html[data-theme="night"] .api-box-s .api-box-head h4,
html[data-theme="night"] .api-box-s .api-ico { color: #9cefff; }
html[data-theme="night"] .api-box a { color: #9cefff; }
html[data-theme="night"] .api-box a:hover { color: #ff7ab8; }
html[data-theme="night"] .ribbon {
  background: linear-gradient(135deg, #1c4a60, #ff3d9a);
  border-color: var(--halo);
}
html[data-theme="night"] .gallery-title h2 { color: #e8f9ff; }
html[data-theme="night"] .wp-stars {
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.85), transparent),
    radial-gradient(1.5px 1.5px at 28% 42%, rgba(156,239,255,.7), transparent),
    radial-gradient(1px 1px at 63% 22%, rgba(255,255,255,.65), transparent),
    radial-gradient(1.2px 1.2px at 81% 58%, rgba(255,61,154,.55), transparent),
    radial-gradient(1px 1px at 44% 76%, rgba(255,255,255,.45), transparent),
    radial-gradient(2px 2px at 91% 12%, rgba(156,239,255,.5), transparent);
}
@media (prefers-reduced-motion: reduce) {
  .wp-stars, .hero-sparkles { animation: none; }
  .type-caret, .type-line.is-active, .type-kaomoji, .hero-scroll { animation: none; }
  .hero-inner.is-exit { transition: opacity .3s ease; transform: none; filter: none; }
}
