/* 心伴星晴，爱助童行 · 首页样式
   配色：首屏保留深色星空，界面部分（按钮、链接、卡片、内容区）走白底蓝点缀。
   想换色只改下面 :root 这一块。 */

:root {
  /* 深色星空区（取自首屏那张星空图的深靛蓝） */
  --space: #101c42;
  --star-text: #eef3ff;
  --star-dim: rgba(238, 243, 255, 0.76);

  /* 白底内容区 + 蓝色点缀（取自同一张图的宝蓝） */
  --blue: #2f6fd0;
  --blue-strong: #1f57ab;
  --blue-soft: #e8eefc;
  --blue-light: #86b0f0;
  --paper: #ffffff;
  --paper-2: #f3f6fd;
  --ink: #0f1f45;
  --ink-2: #54688f;
  --line: #dbe4f6;
  --card: #ffffff;

  --radius: 14px;
  --header-h: 68px;
  --star-hit: 130px;
  --star-size: 108px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.25; }
p { margin: 0; }

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--blue);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- 顶部导航（压在星空上，浅色字） ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 52px);
  color: var(--star-text);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
/* 下翻后：无色毛玻璃，只模糊背景、不给它染色 */
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: transparent;
  box-shadow: none;
}
/* 毛玻璃挪到白色内容区上方时，文字换深色才看得清 */
.site-header.is-over-light {
  color: var(--ink);
  border-bottom-color: rgba(15, 31, 69, 0.08);
}
.site-header.is-over-light .brand-dots i { background: var(--blue); }
.site-header.is-over-light .site-nav a { color: var(--ink-2); }
.site-header.is-over-light .site-nav a:hover,
.site-header.is-over-light .site-nav a:focus-visible { color: var(--blue-strong); }
.site-header.is-over-light .site-nav a.is-current { color: var(--ink); border-bottom-color: var(--blue); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-dots { display: inline-flex; gap: 3px; }
.brand-dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--star-text); opacity: 0.85; display: block;
}
.brand-dots i:nth-child(2) { opacity: 0.6; }
.brand-dots i:nth-child(3) { opacity: 0.34; }
.brand-name { font-size: 17px; }

.site-nav { display: flex; gap: clamp(14px, 2.4vw, 32px); font-size: 15px; }
.site-nav a {
  text-decoration: none;
  color: var(--star-dim);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.site-nav a:hover, .site-nav a:focus-visible { color: #fff; }
.site-nav a.is-current { color: #fff; border-bottom-color: var(--blue-light); }

/* ---------- 首屏：深色星空 ---------- */

.hero {
  position: relative;
  height: 360vh;
  height: 360svh;
  color: var(--star-text);
}

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  background: var(--space) url("assets/home-illustration-sky-20261128.png") center / cover no-repeat;
  overflow: hidden;
  isolation: isolate;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(8, 15, 38, 0.70) 0%, rgba(8, 15, 38, 0.38) 36%, rgba(8, 15, 38, 0.04) 66%, rgba(8, 15, 38, 0.12) 100%),
    radial-gradient(120% 90% at 12% 78%, rgba(8, 15, 38, 0.24) 0%, rgba(8, 15, 38, 0) 60%);
}

.hero-children {
  position: absolute;
  left: 2%;
  bottom: 2%;
  width: min(38vw, 560px);
  height: auto;
  pointer-events: none;
}


.hero-children-holding { opacity: var(--holding-opacity, 1); }
.hero-children-throwing { opacity: var(--throwing-opacity, 0); }
.hero-thrown-star {
  position: absolute;
  z-index: 2;
  left: var(--throw-x, 0px);
  top: var(--throw-y, 0px);
  width: var(--throw-size, 0px);
  aspect-ratio: 1;
  opacity: var(--throw-opacity, 0);
  transform: translate(-50%, -50%) rotate(var(--throw-rotate, 0deg));
  background: url("assets/home-star-20261128.png") center / contain no-repeat;
  pointer-events: none;
  will-change: left, top, width, opacity, transform;
}

.hero-inner {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  align-items: start;
  padding: calc(var(--header-h) + 8vh) clamp(16px, 4vw, 52px) 64px;
}

.hero-copy {
  max-width: 34rem;
  opacity: var(--hero-copy-opacity, 1);
  transform: translateY(var(--hero-copy-shift, 0px));
}
.hero-copy.is-hidden { visibility: hidden; }

.eyebrow {
  font-size: 14px;
  letter-spacing: 0.16em;
  color: rgba(238, 243, 255, 0.66);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 68px);
  letter-spacing: 0.01em;
  color: var(--star-text);
  text-wrap: balance;
}

.lede {
  margin-top: 20px;
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--star-dim);
  line-height: 1.7;
}

.hero-actions { margin-top: 34px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 15px 30px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(47, 111, 208, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.btn-primary:hover { background: #3d81e0; transform: translateY(-1px); box-shadow: 0 14px 30px rgba(47, 111, 208, 0.46); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible { outline: 3px solid rgba(134, 176, 240, 0.65); outline-offset: 3px; }
.btn-primary::after { content: "↗"; font-weight: 400; }

.hero-hint {
  margin-top: 18px;
  font-size: 13.5px;
  color: rgba(238, 243, 255, 0.52);
  max-width: 30rem;
}
.hint-mobile { display: none; }

.hero-scroll {
  position: absolute;
  left: clamp(16px, 4vw, 52px);
  bottom: 22px;
  font-size: 13px;
  color: rgba(238, 243, 255, 0.70);
  opacity: var(--hero-copy-opacity, 1);
}

/* 星点：位置由 app.js 给 --x / --y，透明点击区比光点大 */

.starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }

.star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: var(--star-hit);
  height: var(--star-hit);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--star-text);
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  cursor: pointer;
}
.star:focus { outline: none; }
.star:focus-visible {
  outline: 2px solid var(--blue-light);
  outline-offset: 2px;
}

/* 外圈柔光，让星点从银河里跳出来 */
.star::before {
  content: "";
  position: absolute;
  width: calc(var(--star-size) * 2.1);
  height: calc(var(--star-size) * 2.1);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(214, 232, 255, 0.3) 0%,
    rgba(180, 210, 255, 0.11) 36%,
    rgba(180, 210, 255, 0) 68%);
  pointer-events: none;
  transition: opacity 0.22s ease;
  animation: star-breathe 7s ease-in-out infinite;
}
.star:nth-child(2n)::before { animation-delay: -2.3s; }
.star:nth-child(3n)::before { animation-delay: -4.1s; }

@keyframes star-breathe {
  0%, 100% { opacity: 0.72; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.04); }
}

/* 星体：沿用那张透明星芒图 */
.star-body {
  width: var(--star-size);
  height: var(--star-size);
  background: url("assets/home-star-20261128.png") center / contain no-repeat;
  filter: drop-shadow(0 0 14px rgba(226, 238, 255, 0.42)) brightness(1.04);
  animation: star-sway 5s ease-in-out var(--delay, 0s) infinite;
  transition: filter 0.22s ease;
}

@keyframes star-sway {
  0%, 100% { opacity: .55; transform: translateY(0) rotate(-13deg) scale(.78); filter: brightness(.8); }
  50% { opacity: 1; transform: translateY(-9px) rotate(13deg) scale(1.23); filter: brightness(1.35); }
}
.decor-star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  background: url("assets/home-star-20261128.png") center / contain no-repeat;
  animation: decor-twinkle 4.5s ease-in-out var(--delay, 0s) infinite;
  pointer-events: none;
}
@keyframes decor-twinkle {
  0%, 100% { opacity: .35; transform: translate(-50%, -50%) rotate(-18deg) scale(.65); filter: brightness(.75); }
  50% { opacity: 1; transform: translate(-50%, -70%) rotate(18deg) scale(1.4); filter: brightness(1.45); }
}

.star:hover .star-body,
.star:focus-visible .star-body {
  transform: scale(1.12);
  filter: drop-shadow(0 0 20px rgba(232, 242, 255, 0.7)) brightness(1.1);
}
.star:hover::before,
.star:focus-visible::before {
  background: radial-gradient(circle,
    rgba(214, 232, 255, 0.45) 0%,
    rgba(180, 210, 255, 0.18) 36%,
    rgba(180, 210, 255, 0) 68%);
}

.star-label {
  position: absolute;
  left: 50%;
  top: calc(100% - 8px);
  transform: translate(-50%, 8px);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--star-text);
  background: rgba(12, 22, 52, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.star:hover .star-label,
.star:focus-visible .star-label { opacity: 1; transform: translate(-50%, 0); }

.star.is-read .star-body { filter: drop-shadow(0 0 9px rgba(226, 238, 255, 0.22)) brightness(0.88); }
.star.is-read::after {
  content: "";
  position: absolute;
  right: 22%;
  top: 20%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-light);
}

/* ---------- 故事列表（白底蓝链接） ---------- */

.stories {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(48px, 7vw, 96px) clamp(16px, 5vw, 64px) clamp(40px, 6vw, 80px);
}

.section-head { max-width: 62ch; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 38px); }
.section-sub { margin-top: 12px; color: var(--ink-2); }

.group { margin-top: clamp(32px, 4vw, 52px); }

.group-title {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.cards {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover, .card:focus-visible {
  transform: translateY(-2px);
  border-color: #b8cdf2;
  box-shadow: 0 12px 26px rgba(16, 32, 80, 0.1);
}
.card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.card-date { font-size: 13px; color: var(--ink-2); letter-spacing: 0.02em; }
.card-title { font-size: 19px; font-weight: 700; }
.card-summary { font-size: 15px; color: var(--ink-2); }
.card-more { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 700; color: var(--blue-strong); }

.card.is-read .card-title::after {
  content: "已读";
  margin-left: 10px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  vertical-align: 2px;
}

/* ---------- 关于项目 ---------- */

.about {
  background: var(--paper-2);
  color: var(--ink);
  padding: clamp(44px, 6vw, 88px) clamp(16px, 5vw, 64px);
}
.about-inner { max-width: 74ch; margin: 0 auto; }
.about h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 22px; }
.about p + p { margin-top: 16px; }
.about p { color: #22345c; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin: 30px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}
.facts dt { font-size: 13px; color: var(--ink-2); letter-spacing: 0.06em; }
.facts dd { margin: 6px 0 0; font-size: 16px; font-weight: 700; }

.notice {
  margin-top: 34px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(16, 32, 80, 0.06);
}
.notice h3 { font-size: 15px; margin-bottom: 10px; }
.notice ul { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; }
.notice li + li { margin-top: 6px; }

/* ---------- 页脚：星空上压一层白色毛玻璃 ---------- */

.site-footer {
  position: relative;
  isolation: isolate;
  background: var(--space) url("assets/galaxy-illustrated.png") center / cover no-repeat fixed;
  color: var(--ink-2);
  padding: 36px clamp(16px, 5vw, 64px);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-top: 1px solid rgba(15, 31, 69, 0.08);
}
.footer-dim { color: #7b8aa8; }

/* ---------- 阅读卡 ---------- */

.reader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 40px);
  background: rgba(8, 15, 38, 0.74);
  backdrop-filter: blur(6px);
  animation: fade-in 0.16s ease;
}
.reader[hidden] { display: none; }

.reader-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86vh, 100%);
  overflow-y: auto;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: 0 30px 70px rgba(6, 14, 36, 0.45);
  animation: panel-in 0.18s ease;
}
.reader-panel:focus { outline: none; }

.reader-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #f2f6fd;
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.reader-close:hover { background: var(--blue-soft); color: var(--blue-strong); }
.reader-close:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.reader-date { font-size: 13.5px; color: var(--ink-2); letter-spacing: 0.04em; }
.reader-title { margin-top: 10px; font-size: clamp(23px, 3vw, 30px); padding-right: 44px; }
.reader-body { margin-top: 20px; }
.reader-body p { color: #22345c; }
.reader-body p + p { margin-top: 14px; }

.reader-question {
  margin-top: 26px;
  padding: 16px 18px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
  border-radius: 0 10px 10px 0;
  color: #123a78;
  font-size: 16px;
}
.reader-source { margin-top: 22px; font-size: 13.5px; color: var(--ink-2); }
.reader-link-wrap { margin-top: 14px; }
.reader-link {
  display: inline-block;
  color: var(--blue-strong);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 87, 171, 0.42);
  padding-bottom: 2px;
}
.reader-link:hover { border-bottom-color: var(--blue-strong); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  :root { --header-h: 60px; --star-hit: 88px; --star-size: 74px; }

  .site-nav { font-size: 14px; }
  .brand-name { font-size: 16px; }

  .hero-inner {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 8px;
    padding-top: calc(var(--header-h) + 20px);
    padding-bottom: 32px;
  }
  .hero-copy { max-width: none; }
  .hero-children { width: min(52vw, 300px); left: 1%; bottom: 1%; }
  .hero h1 { font-size: clamp(32px, 9vw, 46px); }
  .lede { margin-top: 14px; }
  .hero-actions { margin-top: 26px; }
  .hero-hint { max-width: none; }
  .hero-scroll { display: none; }

  .star, .decor-star { left: var(--xm); top: var(--ym); }
  .star-label { display: none; }
  .hint-desktop { display: none; }
  .hint-mobile { display: inline; }
}

@media (max-width: 520px) {
  body { font-size: 15.5px; }
  .btn-primary { padding: 14px 24px; font-size: 16px; }
  .hero-inner { padding-left: 18px; padding-right: 18px; }
  .cards { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .facts { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
}

@media (max-width: 900px) and (max-height: 700px) {
  .hero { height: auto; }
  .hero-stage { position: relative; height: auto; min-height: 100svh; }
  .hero-copy { opacity: 1; transform: none; visibility: visible; }
  .hero-children-holding { opacity: 1; }
  .hero-children-throwing, .hero-thrown-star { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .star-body, .star::before, .decor-star { animation: none; }
  html { scroll-behavior: auto; }
  .hero { height: auto; }
  .hero-stage { position: relative; height: auto; min-height: 100svh; }
  .hero-copy { opacity: 1; transform: none; visibility: visible; }
  .hero-children-holding { opacity: 1; }
  .hero-children-throwing, .hero-thrown-star { opacity: 0; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* 第一版：咨询准备与帮助入口 */
.support { padding: clamp(48px, 7vw, 96px) clamp(16px, 5vw, 64px); scroll-margin-top: 75px; }
.support h2 { font-size: clamp(26px, 3.2vw, 38px); }
.section-kicker { color: var(--blue-strong); font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 32px; }
.support-card, .service-example { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.support-card span { color: var(--blue-strong); font-weight: 700; }
.support-card h3, .service-example h3 { font-size: 19px; margin: 12px 0; }
.support-card p, .service-example p { color: var(--ink-2); }
.support-note { margin-top: 20px; color: var(--ink-2); font-size: 14px; }
.section-link { display: inline-block; margin-top: 22px; color: var(--blue-strong); font-weight: 700; }
.services { background: var(--paper-2); }
.service-example { margin-top: 32px; max-width: 760px; }
.example-tag { color: var(--blue-strong); background: var(--blue-soft); border-radius: 20px; padding: 5px 12px; font-size: 13px; }
@media (max-width: 600px) { .site-header { gap: 8px; } .site-nav { gap: 12px; overflow-x: auto; white-space: nowrap; } .brand { flex-shrink: 0; } .site-nav a { font-size: 13px; } }

.filters { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:28px; }
.filters input, .filters select, #chatInput { font:inherit; color:var(--ink); background:#fff; border:1px solid #aebfdb; border-radius:10px; padding:10px 12px; }
.service-results { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:16px; margin-top:18px; }
.service-results .service-example { margin:0; }
.ai-section { background:#fff; }
.chat-box { max-width:800px; margin-top:30px; border:1px solid var(--line); border-radius:18px; padding:clamp(18px,3vw,30px); background:var(--paper-2); }
.ai-status { color:var(--blue-strong); font-weight:700; }
.chat-log { max-height:380px; overflow:auto; margin:18px 0; display:flex; flex-direction:column; gap:12px; }
.chat-message { padding:13px 16px; border-radius:14px; white-space:pre-wrap; overflow-wrap:anywhere; max-width:90%; background:#fff; }
.chat-message.user { align-self:flex-end; background:var(--blue-soft); }
.quick-questions, .chat-actions { display:flex; flex-wrap:wrap; gap:10px; margin:16px 0; }
.quick-questions button, .secondary-button { font:inherit; color:var(--blue-strong); background:white; border:1px solid #b8cbe8; border-radius:10px; padding:10px 14px; cursor:pointer; }
#chatForm > label:first-child { display:block; font-weight:700; margin-bottom:8px; }
#chatInput { width:100%; resize:vertical; }
.consent { display:flex; gap:8px; align-items:flex-start; font-size:14px; margin-top:12px; }
.consent input { margin-top:6px; }
button:disabled { opacity:.55; cursor:wait; }

[hidden] { display:none !important; }
main section[id] { scroll-margin-top:var(--header-h); }
.nav-toggle { display:none; }
#resultCount, .source-note { font-size:14px; color:var(--ink-2); margin-top:16px; }
#resetFilter { margin-top:12px; }
.service-example details { margin-top:16px; }
.service-example summary { cursor:pointer; font-weight:700; color:var(--blue-strong); }
.service-example details p { font-weight:700; margin-top:6px; }
.service-example a { color:var(--blue-strong); }
.demo-tag { color:#555; background:#f1f2f5; }
.site-header.is-over-light { background:rgba(255,255,255,.94); }
@media(max-width:600px) {
  .nav-toggle { display:block; color:inherit; border:1px solid currentColor; border-radius:8px; font:inherit; background:transparent; padding:6px 14px; }
  .site-nav { display:none; }
  .site-nav.expanded { display:grid; grid-template-columns:1fr 1fr; position:absolute; top:100%; left:0; right:0; padding:12px 18px; background:#142448; gap:4px 12px; }
  .site-header .site-nav.expanded a { color:white; font-size:15px; padding:10px; }
  .filters { display:grid; grid-template-columns:auto minmax(0,1fr); }
  .filters input { min-width:0; }
}

/* 比赛展示：延续星空的轻盈感，同时让故事和操作更容易被看见。 */
.hero-hint { color: rgba(238, 243, 255, .78); font-size: 15px; }
.star:first-child .star-label { opacity: 1; transform: translate(-50%, 0); }
.star:first-child .star-body { filter: drop-shadow(0 0 20px rgba(235, 244, 255, .75)) brightness(1.2); }
.stories { background: linear-gradient(180deg, #edf3fc 0, #fff 240px); }
.section-kicker { letter-spacing: .12em; }
.section-head h2 { letter-spacing: .01em; }
.section-sub { font-size: clamp(16px, 1.35vw, 18px); line-height: 1.8; }
.group-title { color: #425a83; }
.card { height: 100%; padding: 26px; box-shadow: 0 8px 26px rgba(25, 54, 101, .04); }
.card-date { font-size: 14px; }
.card-summary { font-size: 16px; line-height: 1.8; }
.card-more { font-size: 15px; }
#listLocal > li:first-child .card {
  background: linear-gradient(145deg, #eaf2ff, #f8fbff 72%);
  border-color: #bdcfee;
  box-shadow: 0 12px 30px rgba(30, 74, 143, .1);
}
#listLocal > li:first-child .card-title { font-size: 23px; }
#listLocal > li:first-child .card-date::before { content: '从这里开始 · '; font-weight: 700; color: var(--blue-strong); }
.support-card, .service-example { box-shadow: 0 10px 28px rgba(25, 54, 101, .045); }
.support-card span { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--blue-soft); }
.support-card p, .service-example p { line-height: 1.8; }
.services { background: linear-gradient(145deg, #eef4fd, #f7f9fe); }
.ai-section { background: linear-gradient(120deg, #f9fbff, #fff 62%); }
.chat-box { box-shadow: 0 18px 45px rgba(35, 68, 122, .08); }
@media (min-width: 901px) {
  #listLocal { grid-template-columns: 1.4fr 1fr 1fr; }
  #listLocal > li:first-child .card { padding: 30px; }
  .ai-section { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); gap: clamp(40px, 6vw, 100px); align-items: start; }
  .ai-section .section-head { position: sticky; top: calc(var(--header-h) + 32px); }
  .ai-section .chat-box { width: 100%; margin-top: 0; }
}
@media (max-width: 900px) { .star:first-child .star-label { display: none; } }

/* 点击大星星后，从原位置飞到屏幕中央。 */
.star-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.star-dialog::backdrop { background: rgba(4, 10, 32, .55); animation: star-backdrop-in 1.5s ease both; }
@keyframes star-backdrop-in { from { background: rgba(4, 10, 32, 0); } to { background: rgba(4, 10, 32, .55); } }
.star-dialog-scene { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
.star.is-flying {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  transform-origin: center;
}
.star.is-flying .star-body { animation: none; }
.star.is-flying::before { animation: star-glow-out 1.5s ease both; }
@keyframes star-glow-out { from { opacity: .8; } to { opacity: 0; } }
.star-dialog-shape {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.star-dialog-content {
  width: min(78vw, 760px);
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 8px rgba(4, 10, 32, .9);
  pointer-events: auto;
  animation: star-content-in .35s 1.2s both;
}
.star-dialog-kicker { font-size: clamp(12px, 2vw, 15px); font-weight: 700; }
.star-dialog-content h2 { margin: .25em 0; font-size: clamp(18px, 3vw, 29px); color: #fff; }
.star-dialog-content p { line-height: 1.5; font-size: clamp(12px, 1.7vw, 16px); }
.star-dialog-close {
  margin-top: 12px;
  border: 1px solid rgba(83, 48, 8, .35);
  border-radius: 999px;
  padding: 8px 17px;
  background: rgba(255, 255, 255, .78);
  color: #473018;
  font: inherit;
  cursor: pointer;
}
.star-dialog-close:focus-visible { outline: 3px solid #365ec3; outline-offset: 3px; }
@keyframes star-content-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .star-dialog-content, .star-dialog::backdrop, .star.is-flying::before { animation: none; }
  .star.is-flying::before { opacity: 0; }
}

.brand-logo { display: block; width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; }
