/* Swichi — V3: ivory and champagne-gold surfaces, near-black text, coral used sparingly. */
:root {
  --bg: #faf5ec;
  --surface: #fffdf8;
  --header: rgba(255, 253, 248, .9);
  --gold: #c9a35a;
  --gold-ink: #8a6a2c;
  --gold-line: #e3d1ab;
  --champagne: #f3e7cf;
  --text: #2a2420;
  --muted: #6a6058;
  --line: #ebe0cc;
  --line-strong: #d9c9ad;
  --accent: #d63a22;
  --accent-ink: #b52d18;
  --accent-soft: #fbe9e3;
  --ok: #3f8a5a;
  --warn: #b7791f;
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Nunito Variable", "Noto Sans SC Variable", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --wrap: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; color-scheme: light; scrollbar-color: #d9c9ad #faf5ec; }
body {
  margin: 0;
  background: var(--bg) radial-gradient(1200px 620px at 50% -120px, #fffaf0 0%, rgba(250, 245, 236, 0) 70%) no-repeat;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; background: var(--text); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 40px); margin-inline: auto; padding-inline: 20px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--gold-line); }
.header-nav { display: flex; gap: 4px; margin-inline: auto 8px; }
.header-nav a { min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; color: #4a423b; font-size: .9375rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.header-nav a:hover { color: var(--accent-ink); background: var(--accent-soft); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; max-width: 1180px; }
.brand { display: inline-flex; align-items: center; border-radius: 8px; }
.brand img { display: block; height: 52px; width: auto; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; background: var(--surface); }
.lang a { min-width: 44px; min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: .875rem; font-weight: 600; text-decoration: none; color: var(--muted); }
.lang a[aria-current="true"] { background: var(--text); color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 650; font-size: .9375rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: rgba(255, 253, 248, .8); border-color: var(--gold); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-mp { min-height: 40px; padding: 0 16px; }
.btn-mp .short { display: none; }

/* Hero + search */
.hero { padding: 44px 0 8px; }
.hero-compact { padding-top: 24px; }
.hero h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.05rem); line-height: 1.3; font-weight: 700; letter-spacing: .005em; }
.hero-sub { margin-top: 6px; color: var(--muted); font-size: 1rem; }
.search { display: flex; gap: 8px; margin-top: 22px; padding: 6px; background: var(--surface); border: 1px solid var(--gold); border-radius: 999px; box-shadow: 0 10px 30px rgba(160, 122, 53, .1); }
.hero-compact .search { margin-top: 0; }
.search:focus-within { border-color: var(--text); }
.search input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.0625rem; border-radius: 999px; }
.search input::placeholder { color: #8a7f75; }
.search input:focus-visible { outline: none; }
.search .btn { min-height: 48px; padding: 0 24px; }

.sync { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-left: 6px; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.sync[data-state="ok"] .dot { background: var(--ok); }
.sync[data-state="stale"] .dot, .sync[data-state="withheld"] .dot { background: var(--warn); }
.sync[data-state="error"] .dot { background: var(--accent); }
.sync.flash #sync-text { color: var(--text); }

/* Feed */
.feed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 10px; }
.feed-head h2 { font-size: 1.0625rem; font-weight: 700; }
.feed-count { color: var(--muted); font-size: .875rem; }
.feed { display: grid; gap: 12px; }
.page-home .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--gold-line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--gold); box-shadow: 0 8px 24px rgba(160, 122, 53, .1); }
.card.is-new { border-color: var(--accent); }
.card-link { display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 16px 18px; text-decoration: none; border-radius: var(--radius); }
.card-text { flex: 1; min-width: 0; }
.card-title { font-size: 1.0625rem; line-height: 1.45; font-weight: 650; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.card-summary { margin-top: 4px; color: #4a423b; font-size: .9375rem; line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.meta { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.meta .sep { color: var(--line-strong); }
.tag { color: var(--accent-ink); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; font-weight: 650; font-size: .75rem; }
.badge { border: 1px solid var(--line-strong); padding: 0 6px; border-radius: 999px; font-size: .6875rem; font-weight: 600; }
.thumb { flex: none; width: 84px; height: 84px; border-radius: var(--radius-sm); overflow: hidden; background: #efe6d8; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.more { margin-top: 16px; text-align: center; }
.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 32px 20px; text-align: center; color: var(--muted); }
.empty-title { color: var(--text); font-weight: 650; }
.empty-page { margin-top: 40px; display: grid; gap: 12px; justify-items: center; }
.empty-page h1 { font-size: 1.375rem; color: var(--text); }

/* Mini Program call to action */
.cta { margin: 28px 0 0; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); }
.cta p { flex: 1 1 260px; }

/* About */
.about { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.about h2 { font-size: 1.125rem; font-weight: 700; }
.about-lead { margin-top: 8px; color: #4a423b; }
.features { margin-top: 16px; display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.features li { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.features h3 { font-size: .9375rem; font-weight: 700; }
.features p { margin-top: 4px; color: var(--muted); font-size: .875rem; line-height: 1.6; }
.about-note { margin-top: 12px; color: var(--muted); font-size: .875rem; }

/* Detail */
.backline { margin: 22px 0 12px; font-size: .9375rem; }
.backline a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.backline a:hover { color: var(--text); }
.detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 30px; }
.detail h1 { font-size: clamp(1.3125rem, 1.1rem + .9vw, 1.625rem); line-height: 1.4; font-weight: 700; }
.detail > .meta { margin-top: 10px; }
.notice { display: inline-block; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px; background: #f3ead9; color: #5b4a2a; font-size: .8125rem; }
.facts { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbf7ef; display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 5.5em 1fr; gap: 10px; }
.facts dt { color: var(--muted); font-size: .875rem; }
.facts dd { font-variant-numeric: tabular-nums; }
.facts small { display: block; color: var(--muted); font-size: .75rem; }
.body { margin-top: 22px; font-size: 1.0625rem; line-height: 1.85; }
.body p, .body div, .body ul, .body ol, .body blockquote { margin: 0 0 .7em; }
.body p:empty { display: none; }
.body ul, .body ol { padding-left: 1.4em; list-style: revert; }
.body strong, .body b { font-weight: 700; }
.body a { color: var(--accent-ink); }
.gallery { margin-top: 20px; display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.gallery a { display: block; border-radius: var(--radius-sm); overflow: hidden; background: #efe6d8; aspect-ratio: 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery.single { grid-template-columns: 1fr; }
.gallery.single a { aspect-ratio: auto; max-width: 520px; }
.gallery.single img { height: auto; object-fit: contain; }
.source { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.source a { color: var(--accent-ink); }
.cta-detail { margin-top: 14px; }

/* Footer + Mini Program block */
.site-footer { margin-top: 72px; padding: 0 0 40px; }
.mp-section { padding: 36px 40px; border: 1px solid var(--gold-line); border-radius: 26px; background: linear-gradient(120deg, #fffdf8 0%, var(--champagne) 100%); box-shadow: 0 20px 50px rgba(160, 122, 53, .1); }
.mp { display: flex; gap: 40px; align-items: center; }
/* Phone mock-up: the unmodified logo and the real Mini Program code, nothing else. */
.mp-phone { flex: none; width: 216px; padding: 26px 16px 22px; display: grid; gap: 14px; justify-items: center; background: #fff; border: 6px solid #2a2420; border-radius: 34px; box-shadow: 0 18px 40px rgba(42, 36, 32, .16); position: relative; }
.mp-phone::before { content: ""; position: absolute; top: 8px; left: 50%; width: 56px; height: 6px; margin-left: -28px; border-radius: 999px; background: #2a2420; }
.mp-logo { width: 96px; height: auto; display: block; }
.mp-qr { width: 168px; height: 168px; display: block; }
.mp-title { font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); line-height: 1.35; font-weight: 750; margin-bottom: 8px; }
.mp-text p { color: #4a423b; font-size: .9375rem; margin-top: 4px; }
.mp-text .mp-note { color: var(--muted); font-size: .8125rem; }
.scope { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.foot-line { margin-top: 6px; color: var(--muted); font-size: .875rem; }
.preview-note { font-size: .75rem; letter-spacing: .04em; }

.mp-dialog { width: min(92vw, 440px); border: 1px solid var(--line-strong); border-radius: 18px; padding: 26px 24px 24px; background: var(--surface); color: var(--text); }
.mp-dialog::backdrop { background: rgba(42, 36, 32, .38); }
.mp-dialog .mp { flex-direction: column; text-align: center; gap: 14px; }
.mp-dialog .mp-phone { border: 0; box-shadow: none; padding: 0; width: auto; }
.mp-dialog .mp-phone::before, .mp-dialog .mp-logo, .mp-dialog .kicker { display: none; }
.mp-dialog .mp-qr { width: 220px; height: 220px; }
.dialog-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 50%; }
.dialog-close:hover { color: var(--text); }

/* Intro (home): what Swichi is + Mini Program entry */
.intro { padding: 44px 0 4px; }
.intro h1 { font-size: clamp(1.625rem, 1.15rem + 2vw, 2.375rem); line-height: 1.25; font-weight: 750; letter-spacing: .005em; }
.eyebrow { margin-bottom: 8px; color: var(--accent-ink); font-size: .875rem; font-weight: 700; letter-spacing: .02em; }
.intro .about-lead { margin-top: 14px; font-size: 1.0625rem; max-width: 40em; }
.intro-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-search { padding-top: 40px; }
.hero-search .search { margin-top: 0; }
.cta.is-end { border-color: var(--line-strong); border-left-color: var(--accent); background: #fff; }

/* Translation state (English pages) */
.tr-chip { display: inline-block; margin-bottom: 6px; padding: 1px 9px; border-radius: 999px; background: #f3ead9; color: #5b4a2a; font-size: .75rem; font-weight: 600; line-height: 1.6; }
.tr-chip[data-translation="error"], .notice[data-translation="error"] { background: var(--accent-soft); color: var(--accent-ink); }
.tr-status { margin-top: 4px; padding-left: 21px; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.tr-note { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.tr-note a { color: var(--accent-ink); }

/* Community constellation */
.star { margin-top: 28px; }
.star-lead { margin-top: 6px; color: #4a423b; }
.star-meta { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; color: var(--muted); font-size: .8125rem; }
.star-meta strong { color: var(--text); font-size: 1.0625rem; font-weight: 700; }
.star-meta .sep { color: var(--line-strong); }
.star-meta.is-fixture strong { color: var(--accent-ink); font-size: .9375rem; }
.star-stage { position: relative; margin-top: 14px; height: clamp(320px, 24vw, 350px); width: 100%; border: 1px solid var(--gold-line); border-radius: 28px; overflow: hidden; isolation: isolate; background: radial-gradient(60% 92% at 50% 50%, #a68a60 0%, #8f7450 30%, #7a6345 62%, #6c583e 100%); box-shadow: 0 24px 60px rgba(160, 122, 53, .14); }
/* Galaxy and shooting stars are drawn by constellation.js on these two canvases. Decoration only:
   never a member node, never clickable. Only the red dots on .star-canvas are members. */
.star-galaxy, .star-meteors { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.star-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; outline-offset: -4px; border-radius: 28px; }
.star-canvas:focus-visible { outline-color: var(--accent); }
.star-canvas:active { cursor: grabbing; }
.star-canvas.can-pick { cursor: pointer; }
.star-labels, .star-ring { position: absolute; left: 0; top: 0; pointer-events: none; }
.star-label { position: absolute; left: 0; top: 0; padding: 1px 9px; border-radius: 999px; background: rgba(255, 250, 238, .84); border: 1px solid rgba(160, 118, 66, .45); color: #5a5048; font-size: .75rem; font-weight: 650; white-space: nowrap; will-change: transform; }
.star-ring { border: 1.5px solid #fffaf0; border-radius: 50%; box-shadow: 0 0 0 2px rgba(44, 20, 8, .7), inset 0 0 0 1px rgba(44, 20, 8, .5); will-change: transform; }
.star-tools { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 24px); }
.star-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(255, 253, 248, .92); color: var(--text); font: inherit; font-size: 1.0625rem; font-weight: 700; line-height: 1; cursor: pointer; }
.star-btn:hover { border-color: var(--text); }
/* Two-line glass card: pearl glass, dark text. */
/* Placed next to the selected star by constellation.js (transform, data-side, --tip-x). */
.star-card { position: absolute; left: 0; top: 0; z-index: 4; width: max-content; max-width: min(300px, calc(100% - 16px)); will-change: transform; padding: 10px 44px 11px 16px; background: rgba(255, 252, 244, .86); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border: 1px solid var(--gold); border-radius: var(--radius); color: var(--text); line-height: 1.4; box-shadow: 0 10px 30px rgba(120, 90, 40, .22), inset 0 1px 0 rgba(255, 255, 255, .6); overflow-wrap: anywhere; }
.star-card p { margin: 0; }
/* the tip: a rotated square clipped to its outer half, pointing at the star */
.star-card::after { content: ""; position: absolute; left: var(--tip-x, 50%); width: 12px; height: 12px; margin-left: -6px; background: rgb(255, 252, 244); border: 1px solid var(--gold); transform: rotate(45deg); pointer-events: none; }
.star-card[data-side="above"]::after { bottom: -7px; border-top: 0; border-left: 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.star-card[data-side="below"]::after { top: -7px; border-right: 0; border-bottom: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
.star-card[data-tip="off"]::after { display: none; }
.star-card .star-card-name { font-size: 1rem; font-weight: 750; }
.star-card .star-card-meta { margin-top: 2px; font-size: .8125rem; font-weight: 500; color: #4a423b; }
.star-card-close { position: absolute; top: 50%; right: 0; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.star-card-close:hover { color: var(--text); }
.star-card-close:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; }
.star-timeline { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 0; background: rgba(255, 253, 248, .92); border: 1px solid var(--line); border-radius: 999px; }
.star-timeline .star-btn { border: 0; background: transparent; font-size: .875rem; flex: none; }
.star-timeline input { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--accent); background: transparent; }
.star-timeline output { flex: none; min-width: 7.5em; text-align: right; color: var(--muted); font-size: .8125rem; }
.star-msg { position: absolute; left: 12px; top: 52px; max-width: 46%; padding: 3px 10px; border-radius: 999px; background: rgba(255, 253, 248, .92); border: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.star-watermark { position: absolute; left: 12px; top: 12px; max-width: calc(100% - 340px); padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); border: 1px solid #f1c9bd; color: var(--accent-ink); font-size: .75rem; font-weight: 700; pointer-events: none; z-index: 1; }
.star-stage.is-failed .star-tools, .star-stage.is-failed .star-timeline { display: none; }
.star-stage.is-expanded { position: fixed; inset: 0; z-index: 60; width: 100vw; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
.star-stage.is-expanded .star-canvas { touch-action: none; border-radius: 0; }
.star-lock, .star-lock body { overflow: hidden; }
.star-hint { margin-top: 10px; color: var(--muted); font-size: .8125rem; }
.star-keys { margin-top: 2px; }
.star-summary { margin-top: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: .875rem; color: #4a423b; }
.star-summary summary { cursor: pointer; font-weight: 650; min-height: 28px; }
.star-summary p { margin-top: 8px; }
.star-summary table { margin-top: 10px; border-collapse: collapse; width: 100%; max-width: 420px; }
.star-summary th, .star-summary td { text-align: left; padding: 4px 12px 4px 0; border-bottom: 1px solid var(--line); }
.star-summary th { color: var(--muted); font-weight: 600; font-size: .8125rem; }
.star-note { margin-top: 10px; color: var(--muted); font-size: .8125rem; }
.star-note a { color: var(--accent-ink); }
.star-empty { margin-top: 14px; padding: 32px 20px; display: grid; gap: 10px; justify-items: center; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.star-empty .btn { white-space: normal; text-align: center; padding: 8px 18px; }

/* ---------- V3 home ---------- */
.page-home { --wrap: 1140px; }
.kicker { color: var(--gold-ink); font-size: .75rem; font-weight: 650; letter-spacing: .2em; text-transform: uppercase; }
/* Headline: a Song/serif face where the system has one (never shipped by us), else the page sans. */
.spark { display: inline-block; margin-left: .2em; color: var(--accent); font-size: .42em; vertical-align: .9em; }
.intro-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.sec { margin-top: 84px; }
.sec-head { max-width: 46em; }
.sec-head h2 { margin-top: 6px; font-size: clamp(1.4375rem, 1.2rem + 1.1vw, 2rem); line-height: 1.3; font-weight: 700; color: #332b25; }
.sec-head h2::after { content: ""; display: block; width: 36px; height: 2px; margin-top: 12px; border-radius: 2px; background: var(--gold); }
.sec-lead { margin-top: 12px; color: #4a423b; }
.about-grid { margin-top: 30px; display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.about-grid li { display: grid; justify-items: center; align-content: start; text-align: center; padding: 26px 18px; border: 1px solid var(--gold-line); border-radius: 22px; background: rgba(255, 253, 248, .7); }
.about-icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold); background: radial-gradient(circle at 35% 30%, #fffdf8 0%, var(--champagne) 100%); color: var(--accent-ink); }
.about-grid h3 { margin-top: 14px; font-size: 1.0625rem; font-weight: 700; }
.about-grid p { margin-top: 4px; color: var(--muted); font-size: .875rem; line-height: 1.6; }
.theme-grid { margin-top: 30px; display: grid; gap: 18px; }
.theme-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.theme-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.theme { border: 1px solid var(--gold-line); border-radius: 22px; overflow: hidden; background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s; }
.theme:hover { border-color: var(--gold); box-shadow: 0 16px 36px rgba(160, 122, 53, .16); transform: translateY(-2px); }
.theme a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.theme img { display: block; width: 100%; height: auto; aspect-ratio: 800 / 520; object-fit: cover; background: var(--champagne); }
.theme-text { display: grid; gap: 4px; padding: 16px 18px 18px; }
.theme-text strong { font-size: 1.0625rem; font-weight: 700; }
.theme-text span { color: var(--muted); font-size: .875rem; line-height: 1.6; }
.theme-text .theme-go { margin-top: 6px; color: var(--accent-ink); font-weight: 650; }
.sec-search .search { max-width: 760px; }
.sec-search .feed-count { margin: 18px 0 12px; }
.sec-search.is-results { margin-top: 36px; }
.sec-search .cta { margin-top: 22px; }
@media (max-width: 1000px) {
  .theme-4, .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-nav a { padding: 0 8px; }
}
@media (max-width: 860px) {
  .page-home .feed { grid-template-columns: 1fr; }
  .header-nav { display: none; }
}

@media (max-width: 640px) {
  .star-stage { height: clamp(300px, 86vw, 380px); border-radius: 20px; }
  .star-canvas { border-radius: 20px; }
  .star-tools { top: 8px; right: 8px; gap: 4px; }
  .star-btn { width: 40px; height: 40px; }
  .star-timeline { left: 8px; right: 8px; bottom: 8px; }
  .star-timeline output { min-width: 0; font-size: .75rem; }
  .star-keys { display: none; }
  .star-msg { max-width: 60%; top: 58px; }
  .star-watermark { top: 58px; max-width: calc(100% - 24px); left: 8px; }
  .star-watermark ~ .star-msg { top: 96px; }
  .tr-status { padding-left: 21px; }
  .wrap { padding-inline: 16px; }
  .header-row { min-height: 60px; gap: 8px; }
  .brand img { height: 46px; }
  .btn-mp .long { display: none; }
  .btn-mp .short { display: inline; }
  .btn-mp { padding: 0 14px; }
  .lang a { min-width: 40px; padding: 0 10px; }
  .hero { padding-top: 28px; }
  .intro { padding-top: 28px; }
  .intro-actions .btn { flex: 1 1 100%; }
  .search .btn { padding: 0 18px; }
  .search input { padding: 0 12px; font-size: 1rem; }
  .card-link { padding: 14px; gap: 12px; }
  .meta { column-gap: 12px; }
  .meta .sep { display: none; }
  .thumb { width: 72px; height: 72px; }
  .features { grid-template-columns: 1fr; }
  .detail { padding: 20px 16px 22px; }
  .body { font-size: 1rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .mp { flex-direction: column; align-items: center; gap: 22px; }
  .mp-section { padding: 26px 18px; border-radius: 20px; }
  .page-home .feed, .theme-4, .theme-3, .about-grid { grid-template-columns: 1fr; }
  .sec { margin-top: 52px; }
  .theme a { flex-direction: row; }
  .theme img { width: 42%; aspect-ratio: 1; }
  .about-grid li { grid-template-columns: 56px 1fr; text-align: left; justify-items: start; column-gap: 14px; }
  .about-icon { grid-row: span 2; width: 56px; height: 56px; }
  .about-grid h3 { margin-top: 0; }
  .header-nav { display: none; }
  .cta .btn { width: 100%; }
}

/* ---------- V3.1 reference-fidelity pass ---------- */
/* header: brand lockup */
.brand { gap: 14px; text-decoration: none; min-width: 0; flex: 0 1 auto; }
.brand img { height: 60px; flex: none; }
/* Two lines beside the logo, always visible: the name, then the positioning line. Together
   they stand about as tall as the logo. The line may break only between its two phrases. */
.brand-text { display: grid; gap: 4px; min-width: 0; padding-left: 14px; border-left: 1px solid var(--gold-line); }
.brand-text strong { font-size: 1.75rem; line-height: 1.15; font-weight: 700; letter-spacing: .1em; color: #332b25; white-space: nowrap; justify-self: start; }
.brand-text small { font-size: .875rem; line-height: 1.4; letter-spacing: .04em; color: var(--gold-ink); }
.brand-text .seg { display: inline-block; max-width: 100%; white-space: pre-wrap; }
.header-row { min-height: 84px; max-width: min(1400px, 100vw); gap: 20px; }
.header-actions { flex: none; }
@media (max-width: 1240px) {
  .header-nav { display: none; }
}
@media (max-width: 900px) {
  .brand img { height: 54px; }
  .brand-text strong { font-size: 1.5rem; }
  .brand-text small { font-size: .8125rem; }
  .header-row { min-height: 76px; gap: 14px; }
}
/* The English line is longer: it gets the room of the section links a little earlier. */
@media (max-width: 1360px) {
  [data-lang="en"] .header-nav { display: none; }
}
/* Phones: language and Mini Program sit on the name's line, the positioning line runs
   underneath across the full width, so nothing is squeezed behind the buttons. */
@media (max-width: 640px) {
  html { scroll-padding-top: 104px; }
  .header-row { position: relative; min-height: 0; padding-block: 8px; }
  .brand { flex: 1 1 100%; gap: 10px; align-items: flex-start; }
  .brand img { height: 48px; margin-top: 2px; }
  .brand-text { gap: 2px; padding-left: 10px; }
  .brand-text strong { font-size: 1.3125rem; line-height: 40px; letter-spacing: .06em; }
  .brand-text small { font-size: .75rem; line-height: 1.35; letter-spacing: .01em; }
  .header-actions { position: absolute; top: 8px; right: 16px; gap: 6px; }
  .lang a { min-width: 40px; min-height: 40px; padding: 0 8px; }
  .lang { padding: 0; }
  .btn-mp { min-height: 40px; padding: 0 12px; font-size: .8125rem; }
  /* "Mini Program" is wider than 小程序: tighten the English row a little */
  [data-lang="en"] .header-actions { gap: 4px; }
  [data-lang="en"] .btn-mp { padding: 0 10px; }
  [data-lang="en"] .lang a { padding: 0 4px; }
  [data-lang="en"] .brand-text strong { letter-spacing: .02em; }
}
/* Very narrow phones, English only: the buttons no longer fit beside the name, so they take a row. */
@media (max-width: 370px) {
  [data-lang="en"] .header-row { flex-wrap: wrap; row-gap: 0; }
  [data-lang="en"] .header-actions { position: static; flex: 1 1 100%; justify-content: flex-end; margin-top: 4px; }
  [data-lang="en"] .brand-text strong { line-height: 1.25; }
}
.header-nav { margin-inline: auto; gap: 14px; }
.header-nav a { font-size: .9375rem; letter-spacing: .04em; }
.lang a[aria-current="true"] { background: #3a3029; }
.btn { font-weight: 600; letter-spacing: .02em; }
.btn-primary { box-shadow: 0 8px 20px rgba(214, 58, 34, .18); }


/* galaxy panel */
.star { margin-top: 22px; }
.star-note { text-align: center; }

/* the airy line under the galaxy: three plain statements, no figures */

/* section rhythm */
.sec { margin-top: 76px; }
.sec-head { max-width: none; text-align: center; }
.sec-head h2 { font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", Georgia, var(--font); font-weight: 600; letter-spacing: .06em; }
.sec-head h2::after { margin: 12px auto 0; width: 28px; height: 1px; background: var(--gold); }
.sec-head h2::before { content: "✦"; display: block; margin-bottom: 8px; color: var(--accent); font-size: .625rem; font-family: var(--font); }
.sec-lead { max-width: 44em; margin: 12px auto 0; color: #6a6058; font-size: .9375rem; }

/* about: four open circles, hairline separators, no boxes */
.about-grid { margin-top: 36px; gap: 0; }
.about-grid li { padding: 4px 26px; border: 0; border-left: 1px solid var(--gold-line); border-radius: 0; background: none; }
.about-grid li:first-child { border-left: 0; }
.about-icon { width: 84px; height: 84px; border: 1px solid var(--gold-line); background: radial-gradient(circle at 35% 28%, #fffefb 0%, #f6ecd8 100%); box-shadow: 0 10px 26px rgba(160, 122, 53, .14), inset 0 0 0 5px rgba(255, 255, 255, .55); color: #b38a3c; }
.about-grid h3 { margin-top: 18px; font-weight: 650; letter-spacing: .04em; }

/* content themes: photo-led cards with outline action */
.theme { border-radius: 18px; border-color: #eadcc0; background: #fffaf0; box-shadow: 0 10px 28px rgba(160, 122, 53, .08); }
.theme-text { padding: 16px 18px 20px; gap: 6px; }
.theme-text strong { font-weight: 650; letter-spacing: .03em; }
.theme-text .theme-go { justify-self: start; margin-top: 10px; padding: 5px 14px; border: 1px solid var(--gold); border-radius: 999px; color: #8a6a2c; font-size: .8125rem; font-weight: 600; }
.theme:hover .theme-go { border-color: var(--accent); color: var(--accent-ink); }

/* activity themes: three compact horizontal cards */
.theme-row a { flex-direction: row; align-items: center; gap: 16px; padding: 12px 16px 12px 12px; }
.theme-row img { flex: none; width: 34%; aspect-ratio: 4 / 3; border-radius: 12px; }
.theme-row .theme-text { flex: 1; min-width: 0; padding: 0; gap: 2px; }
.theme-row .theme-text .theme-go { margin-top: 6px; padding: 0; border: 0; color: #8a6a2c; font-size: .75rem; }
.theme-arrow { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: #8a6a2c; font-size: .875rem; }
.theme-row:hover .theme-arrow { border-color: var(--accent); color: var(--accent-ink); }

/* search + latest: compact three-column cards */
.sec-search .search { margin: 28px auto 0; }
.sec-search .sync, .sec-search .tr-status, .sec-search .feed-count { justify-content: center; text-align: center; padding-left: 0; }
.sec-search.is-results .sec-head h2::before { display: none; }
.page-home .feed { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.page-home .card { border-radius: 16px; border-color: #eadcc0; }
.page-home .card-link { padding: 14px 14px 14px 16px; gap: 12px; }
.page-home .card-title { font-size: .9375rem; font-weight: 650; line-height: 1.45; }
.page-home .card-summary { font-size: .8125rem; line-height: 1.55; color: #6a6058; }
.page-home .meta { font-size: .75rem; margin-top: 6px; }
.page-home .thumb { width: 64px; height: 64px; border-radius: 10px; }
.more .btn { min-height: 40px; padding: 0 22px; border-color: var(--gold); color: #8a6a2c; }
.cta { border: 1px solid #eadcc0; border-left: 1px solid #eadcc0; border-radius: 999px; padding: 10px 12px 10px 24px; background: rgba(255, 250, 240, .8); max-width: 760px; margin-inline: auto; }
.cta p { color: #5a5048; font-size: .9375rem; }
.cta-detail { border-radius: var(--radius); padding: 18px 20px; }
.empty { border-style: solid; border-color: #eadcc0; background: rgba(255, 250, 240, .6); border-radius: 18px; }

/* Mini Program banner: tilted phone, centred copy with three inline actions, real code on the right */
.site-footer { margin-top: 84px; }
.mp-banner { position: relative; display: grid; grid-template-columns: 240px minmax(0, 1fr) 210px; gap: 36px; align-items: center; padding: 40px 48px; border: 1px solid #eadcc0; border-radius: 30px; overflow: hidden; background: radial-gradient(120% 140% at 12% 0%, #fffdf8 0%, #f8eedb 46%, #f1e2c4 100%); box-shadow: 0 24px 60px rgba(160, 122, 53, .12); }
.mp-banner::before, .mp-banner::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(201, 163, 90, .32); pointer-events: none; }
.mp-banner::before { width: 520px; height: 520px; left: -170px; top: -150px; }
.mp-banner::after { width: 360px; height: 360px; right: -120px; bottom: -200px; }
.mp-device { position: relative; z-index: 1; justify-self: center; width: 188px; height: 300px; margin: -8px 0 -70px; padding: 44px 16px 0; display: grid; align-content: start; justify-items: center; gap: 8px; background: linear-gradient(180deg, #fffefb, #fbf3e3); border: 7px solid #2f2824; border-radius: 34px; box-shadow: 0 26px 50px rgba(60, 44, 24, .26); transform: rotate(-7deg); }
.mp-device::before { content: ""; position: absolute; top: 9px; left: 50%; width: 58px; height: 7px; margin-left: -29px; border-radius: 999px; background: #2f2824; }
.mp-device img { width: 112px; height: auto; }
.mp-device strong { margin-top: 6px; font-size: 1.125rem; letter-spacing: .14em; color: #332b25; }
.mp-device span { padding: 3px 12px; border: 1px solid var(--gold-line); border-radius: 999px; color: #8a6a2c; font-size: .6875rem; }
.mp-copy { position: relative; z-index: 1; text-align: center; }
.mp-copy .mp-title { margin: 8px 0 6px; font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", Georgia, var(--font); font-weight: 600; letter-spacing: .05em; }
.mp-lead { color: #5a5048; font-size: .9375rem; }
.mp-actions { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: left; }
.mp-actions li { display: flex; gap: 10px; align-items: flex-start; }
.mp-ico { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; background: rgba(255, 253, 248, .8); color: #b38a3c; }
.mp-actions strong { display: block; font-size: .875rem; font-weight: 650; }
.mp-actions small { display: block; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.mp-copy .mp-note { margin-top: 16px; color: var(--muted); font-size: .75rem; }
.mp-code { position: relative; z-index: 1; justify-self: center; padding: 12px; background: #fff; border: 1px solid #eadcc0; border-radius: 22px; box-shadow: 0 14px 34px rgba(160, 122, 53, .16); }
.mp-code .mp-qr { display: block; width: 176px; height: 176px; }
.scope { text-align: center; border-top: 0; }
.foot-line { text-align: center; }

@media (max-width: 1100px) {
  .page-home .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-banner { grid-template-columns: 200px minmax(0, 1fr); }
  .mp-code { grid-column: 1 / -1; }
  .theme-3 { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .about-grid li:nth-child(3) { border-left: 0; }
  .about-grid { row-gap: 30px; }
}
@media (max-width: 640px) {
  .sec { margin-top: 56px; }
  .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .about-grid li { display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 0 10px; border-left: 0; }
  .about-icon { grid-row: auto; width: 68px; height: 68px; }
  .about-grid h3 { margin-top: 12px; }
  .theme-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .theme-4 .theme a { flex-direction: column; }
  .theme-4 .theme img { width: 100%; aspect-ratio: 800 / 520; }
  .theme-4 .theme-text { padding: 12px 12px 14px; }
  .theme-4 .theme-text > span:not(.theme-go) { display: none; }
  .theme-row img { width: 36%; aspect-ratio: 4 / 3; }
  .page-home .feed { grid-template-columns: 1fr; }
  .cta { border-radius: 20px; padding: 16px; }
  .mp-banner { grid-template-columns: 1fr; gap: 22px; padding: 28px 18px; border-radius: 22px; }
  .mp-device { display: none; }
  .mp-actions { grid-template-columns: 1fr; gap: 12px; }
  .mp-code { grid-row: 1; }
}

/* ---------- V3.2 polish after the second visual review ---------- */

/* left-aligned heading with a tiny coral star and a small action on the right */
.sec-head.is-split { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 24px; text-align: left; }
.sec-head.is-split .sec-title { position: relative; padding-left: 22px; }
.sec-head.is-split .sec-title::before { content: "✦"; position: absolute; left: 0; bottom: .78em; color: var(--accent); font-size: .6875rem; line-height: 1; }
.sec-head.is-split h2 { margin-top: 2px; font-size: clamp(1.3125rem, 1.1rem + .8vw, 1.625rem); }
.sec-head.is-split h2::before, .sec-head.is-split h2::after { display: none; }
.sec-action { align-self: end; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; color: #8a6a2c; font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.sec-action:hover { color: var(--accent-ink); }
.sec-head.is-split .sec-lead { grid-column: 1 / -1; max-width: none; margin: 6px 0 0; padding-top: 10px; border-top: 1px solid var(--gold-line); color: #7a7067; font-size: .8125rem; }
.sec-topics, .sec-acts { margin-top: 64px; }
.theme-grid { margin-top: 20px; }

/* short editorial theme cards */
.theme-4 .theme img { aspect-ratio: 16 / 9; }
.theme-4 .theme-text { padding: 12px 16px 14px; gap: 2px; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
.theme-4 .theme-text strong { grid-column: 1; }
.theme-4 .theme-text > span:not(.theme-go) { grid-column: 1 / -1; grid-row: 2; margin-top: 4px; font-size: .8125rem; line-height: 1.55; }
.theme-4 .theme-text .theme-go { grid-column: 2; grid-row: 1; margin: 0; padding: 3px 12px; font-size: .75rem; white-space: nowrap; }

/* floating golden planets and orbit outlines around the closing banner (decoration only) */
.site-footer { position: relative; overflow: hidden; padding-top: 30px; }
.site-footer .wrap { position: relative; }
.foot-orbs { position: absolute; inset: 0; pointer-events: none; }
.foot-orbs i { position: absolute; border-radius: 50%; }
.foot-orbs i:nth-child(1) { width: 560px; height: 560px; left: -260px; top: 10px; border: 1px solid rgba(201, 163, 90, .28); }
.foot-orbs i:nth-child(2) { width: 760px; height: 760px; right: -420px; top: -160px; border: 1px solid rgba(201, 163, 90, .22); }
.foot-orbs i:nth-child(3) { width: 22px; height: 22px; left: 6%; top: 46px; background: radial-gradient(circle at 34% 30%, #fff8e2, #dcb96e 60%, #b88d3e); box-shadow: 0 0 22px rgba(220, 185, 110, .6); }
.foot-orbs i:nth-child(4) { width: 12px; height: 12px; right: 9%; top: 120px; background: radial-gradient(circle at 34% 30%, #fff8e2, #dcb96e 60%, #b88d3e); box-shadow: 0 0 16px rgba(220, 185, 110, .6); }
.foot-orbs i:nth-child(5) { width: 8px; height: 8px; right: 22%; bottom: 70px; background: radial-gradient(circle at 34% 30%, #fff8e2, #dcb96e 60%, #b88d3e); box-shadow: 0 0 12px rgba(220, 185, 110, .6); }
@media (prefers-reduced-motion: no-preference) {
  .foot-orbs i:nth-child(n+3) { animation: orb-float 9s ease-in-out infinite alternate; }
  .foot-orbs i:nth-child(4) { animation-duration: 12s; }
  .foot-orbs i:nth-child(5) { animation-duration: 7s; }
}
@keyframes orb-float { from { transform: translateY(0); } to { transform: translateY(-10px); } }
@media (max-width: 640px) {
  .sec-head.is-split { grid-template-columns: 1fr; }
  .sec-action { justify-self: start; min-height: 36px; }
  .theme-4 .theme-text { grid-template-columns: 1fr; padding: 10px 12px 12px; }
  .theme-4 .theme-text .theme-go { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
  .foot-orbs i:nth-child(1), .foot-orbs i:nth-child(2) { display: none; }
}

/* ---------- V3.3 third review: ornaments across the page, calmer Mini Program banner ---------- */
/* orbit trails, tiny golden planets and star glints behind the whole page (decoration only) */
.page-body { position: relative; overflow: hidden; overflow: clip; }
.page-body > main { position: relative; z-index: 1; }
.page-sky { position: absolute; inset: 0; pointer-events: none; }
.page-sky i, .page-sky b { position: absolute; display: block; }
.page-sky i { border-radius: 50%; }
.page-sky i:nth-child(-n+5) { border: 1px solid rgba(201, 163, 90, .2); }
.page-sky i:nth-child(1) { width: 900px; height: 900px; left: -520px; top: 17%; }
.page-sky i:nth-child(2) { width: 1300px; height: 1300px; left: -860px; top: 12%; border-color: rgba(201, 163, 90, .12); }
.page-sky i:nth-child(3) { width: 1000px; height: 1000px; right: -640px; top: 36%; }
.page-sky i:nth-child(4) { width: 760px; height: 760px; left: -470px; top: 58%; border-color: rgba(201, 163, 90, .16); }
.page-sky i:nth-child(5) { width: 1100px; height: 1100px; right: -760px; top: 70%; border-color: rgba(201, 163, 90, .14); }
.page-sky i:nth-child(n+6) { background: radial-gradient(circle at 34% 30%, #fff8e2, #dcb96e 60%, #b88d3e); box-shadow: 0 0 18px rgba(220, 185, 110, .55); }
.page-sky i:nth-child(6) { width: 16px; height: 16px; left: 3.5%; top: 24.5%; }
.page-sky i:nth-child(7) { width: 10px; height: 10px; right: 4%; top: 41%; }
.page-sky i:nth-child(8) { width: 13px; height: 13px; left: 5%; top: 63%; }
.page-sky i:nth-child(9) { width: 8px; height: 8px; right: 6.5%; top: 80%; }
.page-sky b { color: #cfa85a; font: 400 .75rem/1 var(--font); opacity: .7; }
.page-sky b:nth-of-type(1) { left: 7%; top: 21%; }
.page-sky b:nth-of-type(2) { right: 8%; top: 27%; font-size: .5625rem; }
.page-sky b:nth-of-type(3) { left: 2.5%; top: 34%; font-size: .5rem; }
.page-sky b:nth-of-type(4) { right: 3%; top: 47%; color: var(--accent); font-size: .5625rem; }
.page-sky b:nth-of-type(5) { left: 8.5%; top: 52%; }
.page-sky b:nth-of-type(6) { right: 9%; top: 60%; font-size: .5rem; }
.page-sky b:nth-of-type(7) { left: 3%; top: 72%; font-size: .5625rem; color: var(--accent); }
.page-sky b:nth-of-type(8) { right: 5%; top: 74%; }
.page-sky b:nth-of-type(9) { left: 9%; top: 86%; font-size: .5rem; }
.page-sky b:nth-of-type(10) { right: 10%; top: 92%; font-size: .5625rem; }
@media (prefers-reduced-motion: no-preference) {
  .page-sky i:nth-child(n+6) { animation: orb-float 10s ease-in-out infinite alternate; }
  .page-sky i:nth-child(7), .page-sky i:nth-child(9) { animation-duration: 7s; }
  .page-sky b { animation: glint 4.2s ease-in-out infinite alternate; }
  .page-sky b:nth-of-type(2n) { animation-duration: 3.1s; animation-delay: -1.4s; }
  .page-sky b:nth-of-type(3n) { animation-duration: 5.3s; animation-delay: -2.2s; }
}
@keyframes glint { from { opacity: .2; transform: scale(.8); } to { opacity: .85; transform: scale(1.15); } }
/* soft section washes, so the cream is not one flat sheet */
.sec-about, .sec-search { position: relative; }
.sec-about::before, .sec-search::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -40px; width: min(1100px, 100vw); height: 340px; margin-left: calc(min(1100px, 100vw) / -2); background: radial-gradient(50% 50% at 50% 50%, rgba(255, 246, 222, .9), rgba(255, 246, 222, 0)); pointer-events: none; }

/* Mini Program banner: more air, three small inline actions, gentle star field */
.mp-banner { grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 44px; padding: 56px 60px; background:
  radial-gradient(3px 3px at 31% 22%, rgba(214, 176, 98, .9), transparent 70%),
  radial-gradient(2px 2px at 44% 80%, rgba(214, 176, 98, .8), transparent 70%),
  radial-gradient(3px 3px at 72% 16%, rgba(214, 176, 98, .8), transparent 70%),
  radial-gradient(2px 2px at 66% 86%, rgba(214, 176, 98, .7), transparent 70%),
  radial-gradient(60% 90% at 50% 40%, rgba(255, 253, 246, .95), rgba(255, 253, 246, 0) 70%),
  radial-gradient(120% 140% at 12% 0%, #fffdf8 0%, #f8eedb 46%, #f1e2c4 100%); }
.mp-device { width: 204px; height: 330px; margin: -14px 0 -96px; transform: rotate(-9deg); }
.mp-device img { width: 124px; }
.mp-copy .mp-title { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); margin: 10px 0 10px; }
.mp-actions { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; }
.mp-actions li { align-items: center; gap: 8px; }
.mp-actions small { display: none; }
.mp-ico { width: 32px; height: 32px; }
.mp-copy .mp-note { margin-top: 22px; }
.site-footer { padding-top: 56px; }
@media (max-width: 1100px) {
  .mp-banner { grid-template-columns: 200px minmax(0, 1fr); padding: 44px 36px; }
}
@media (max-width: 760px) {
  .page-sky i:nth-child(-n+5) { display: none; }
  .page-sky b:nth-of-type(n+6) { display: none; }
  .mp-banner { grid-template-columns: 1fr; gap: 22px; padding: 32px 18px; }
  .mp-actions { gap: 10px 16px; }
  .mp-device { display: none; }
  .site-footer { padding-top: 30px; }
}

/* ---------- V4 deep-navy member galaxy hero ----------
   One midnight panel holds the animated galaxy (canvas) and the hero copy. Everything on
   the canvas is decoration; the status block is a truthful label, never a member count. */
.cosmos { margin-top: 22px; }
/* only the galaxy panel breaks out of the 1140px column (margins, no transform, so the full-screen member map is unaffected) */
@media (min-width: 741px) { .cosmos { margin-inline: calc((100% - min(1540px, 100vw - 80px)) / 2); } }
.cosmos-panel { position: relative; height: clamp(600px, 46vw, 680px); border-radius: 26px; overflow: hidden; color: #eef2f8;
  background: radial-gradient(58% 62% at 52% 64%, #0f2845 0%, #0a1c2e 36%, #050c16 70%, #020812 100%);
  border: 1px solid #1b3350; box-shadow: 0 30px 70px rgba(6, 21, 37, .26), inset 0 0 0 1px rgba(160, 190, 230, .06), inset 0 0 140px rgba(1, 6, 14, .6); }
.star-stage { margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.cosmos-panel > .star-stage.is-decor { position: absolute; inset: 0; height: auto; }
.star-stage.is-expanded { background: radial-gradient(60% 70% at 50% 50%, #10294a 0%, #0b1f31 36%, #061525 68%, #020b17 100%); }
.star-canvas { border-radius: 0; }
.cosmos-copy { position: absolute; z-index: 2; left: 5%; top: 7.5%; width: min(46%, 33rem); pointer-events: none; }
.cosmos-copy a { pointer-events: auto; }
.cosmos-kicker { color: #d9b56a; font-size: .75rem; font-weight: 650; letter-spacing: .3em; }
.cosmos-copy h1 { margin-top: 14px; font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", Georgia, var(--font); font-weight: 600; font-size: clamp(1.625rem, .95rem + 2.35vw, 3rem); line-height: 1.3; letter-spacing: .04em; color: #fbf8f0; text-shadow: 0 2px 26px rgba(2, 11, 23, .85); }
.cosmos-copy h1 .seg { display: block; }
.cosmos-copy h1 em { font-style: normal; color: #f1d9a2; }
.cosmos-sub { margin-top: 14px; max-width: 27.5em; color: #c5d0df; font-size: .9375rem; line-height: 1.75; text-shadow: 0 1px 14px rgba(2, 11, 23, .9); }
.cosmos-cta:focus-visible { outline: 2px solid #f1d9a2; outline-offset: 4px; }
.cosmos-status { position: absolute; z-index: 2; right: 4.5%; top: 8%; text-align: right; pointer-events: none; }
.cosmos-status-dot { display: block; width: 7px; height: 7px; margin: 0 0 10px auto; border-radius: 50%; background: #f1d9a2; box-shadow: 0 0 12px 2px rgba(241, 217, 162, .7); }
.cosmos-status p:first-of-type { font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", Georgia, var(--font); font-size: 1.125rem; letter-spacing: .14em; color: #f6f1e4; }
.cosmos-status p:last-of-type { margin-top: 6px; color: #d9b56a; font-size: .75rem; letter-spacing: .16em; }
.cosmos-mark { position: absolute; z-index: 2; left: 5%; bottom: 5%; display: flex; align-items: center; gap: 14px; margin: 0; color: rgba(214, 224, 240, .66); font-size: .625rem; font-weight: 600; letter-spacing: .3em; line-height: 1.8; pointer-events: none; }
.cosmos-rings { position: relative; flex: none; width: 38px; height: 24px; }
.cosmos-rings i { position: absolute; top: 0; left: 0; width: 24px; height: 24px; border: 1px solid #d9b56a; border-radius: 50%; }
.cosmos-rings i:last-child { left: 14px; }
.cosmos-cta { position: absolute; z-index: 2; right: 4.5%; bottom: 4.5%; display: inline-flex; align-items: center; gap: 14px; min-height: 48px; color: #f6f1e4; font-size: .9375rem; letter-spacing: .1em; text-decoration: none; }
.cosmos-cta > span:first-child { padding-bottom: 5px; border-bottom: 1px solid #d9b56a; }
.cosmos-cta-go { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #e6c98a; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(241, 217, 162, .38), rgba(217, 181, 106, .12)); box-shadow: 0 0 22px rgba(217, 181, 106, .5), inset 0 0 10px rgba(241, 217, 162, .3); color: #fff3d2; font-size: 1.125rem; transition: box-shadow .2s; }
.cosmos-cta:hover .cosmos-cta-go { box-shadow: 0 0 30px rgba(241, 217, 162, .75), inset 0 0 12px rgba(241, 217, 162, .4); }
/* member map (approved data or the local fixture): the interactive stage fills the whole
   panel and the heading floats over it. The stage is not its own stacking context here, so
   its controls (z 3) and the card (z 4) sit above the heading (z 2), and the heading never
   takes a click (pointer-events: none). */
.cosmos-panel.is-members { height: clamp(620px, 48vw, 720px); }
.cosmos-panel.is-members .star-stage:not(.is-expanded) { position: absolute; inset: 0; height: auto; isolation: auto; }
/* the sky covers the panel; the upper arms are only dimmed, so the heading stays readable */
.cosmos-panel.is-members .star-stage:not(.is-expanded) .star-galaxy { -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .55) 0, #000 48%); mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .55) 0, #000 48%); }
.cosmos-panel.is-members .star-tools, .cosmos-panel.is-members .star-timeline, .cosmos-panel.is-members .star-msg, .cosmos-panel.is-members .star-watermark { z-index: 3; }
.cosmos-head { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: start; padding: 44px 4.5% 0 5%; pointer-events: none; }
.cosmos-head::before { content: ""; position: absolute; inset: 0 0 -56px; z-index: -1; background: linear-gradient(to bottom, rgba(2, 8, 18, .5), rgba(2, 8, 18, 0)); }
.cosmos-panel.is-members .cosmos-copy { position: static; width: auto; max-width: 36rem; padding: 0; }
/* the description sits top right, beside the title, below the toolbar (12 + 44 px) */
.cosmos-aside { justify-self: end; max-width: 23rem; margin-top: 30px; padding-left: 18px; border-left: 1px solid rgba(217, 181, 106, .4); }
.cosmos-aside .cosmos-sub { margin-top: 0; max-width: none; }
.cosmos-aside .cosmos-status { position: static; margin-top: 14px; text-align: left; }
.cosmos-aside .cosmos-status-dot { margin: 0 0 8px; }
.star-lead { margin-top: 14px; text-align: center; }
.star-meta { justify-content: center; }
.sec-about { margin-top: 72px; }
@media (max-width: 740px) {
  .cosmos { margin-top: 14px; }
  .cosmos-panel { height: clamp(640px, 170vw, 700px); border-radius: 20px; }
  .cosmos-copy { left: 20px; right: 20px; top: 26px; width: auto; }
  .cosmos-kicker { font-size: .6875rem; letter-spacing: .26em; }
  .cosmos-copy h1 { margin-top: 10px; }
  .cosmos-sub { margin-top: 10px; font-size: .875rem; line-height: 1.7; }
    .cosmos-mark { display: none; }
  .cosmos-status { left: 20px; right: auto; top: auto; bottom: 76px; text-align: left; }
  .cosmos-status-dot { display: none; }
  .cosmos-status p:first-of-type { font-size: .875rem; letter-spacing: .1em; }
  .cosmos-status p:last-of-type { margin-top: 2px; font-size: .6875rem; letter-spacing: .08em; }
  .cosmos-cta { right: 18px; bottom: 16px; font-size: .875rem; gap: 12px; }
  .cosmos-cta-go { width: 44px; height: 44px; }
  /* phones: heading, then the description, under the toolbar; the disc takes the band below */
  .cosmos-panel.is-members { height: clamp(660px, 180vw, 760px); }
  .cosmos-head { display: block; padding: 60px 20px 0; }
  .cosmos-aside { max-width: none; margin-top: 10px; padding-left: 12px; }
  .cosmos-aside .cosmos-status { padding: 0; margin-top: 10px; }
  .cosmos-panel.is-members .star-watermark { top: auto; bottom: 60px; }
  .sec-about { margin-top: 52px; }
}

/* Navigation parity: the English brand line is longer, but both locales must
   retain the same four working section links. Move links beneath the brand
   whenever the one-row header becomes too crowded; never hide them. */
@media (max-width: 1360px) {
  [data-lang="en"] .header-row { flex-wrap: wrap; row-gap: 0; }
  [data-lang="en"] .header-nav {
    display: flex; order: 3; flex: 1 1 100%; min-width: 0;
    justify-content: center; gap: 10px; margin: 0; padding: 0 0 6px;
  }
}
@media (max-width: 1240px) {
  .header-row { flex-wrap: wrap; row-gap: 0; }
  .header-nav {
    display: flex; order: 3; flex: 1 1 100%; min-width: 0;
    justify-content: center; gap: 10px; margin: 0; padding: 0 0 6px;
  }
}
@media (max-width: 640px) {
  .header-nav, [data-lang="en"] .header-nav {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0; width: 100%; padding: 4px 0 6px;
  }
  .header-nav a {
    display: flex; justify-content: center; text-align: center;
    min-width: 0; min-height: 48px; padding: 4px 2px;
    font-size: clamp(.75rem, 2.7vw, .875rem); line-height: 1.25;
    letter-spacing: 0; white-space: normal; overflow-wrap: normal;
  }
  html { scroll-padding-top: var(--anchor-offset, 170px); }
}
@media (max-width: 370px) {
  html { scroll-padding-top: var(--anchor-offset, 220px); }
}

/* The sticky header gains a second line at smaller sizes. Its measured height
   is set by app.js so #about/#topics/#activities/#search are never covered. */

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Footer: iOS app coming-soon strip, between the Mini Program banner and the scope note. */
.app-soon { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; width: fit-content; max-width: 100%; margin: 28px auto 0; padding: 12px 22px; border: 1px solid var(--gold-line); border-radius: 999px; background: linear-gradient(90deg, rgba(255, 250, 238, .9), rgba(246, 234, 206, .9)); box-shadow: 0 10px 28px rgba(160, 122, 53, .12); text-align: center; }
.app-soon-badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: var(--text); color: #fbf3df; font-size: .75rem; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
.app-soon-dot { width: 7px; height: 7px; border-radius: 50%; background: #f1d9a2; box-shadow: 0 0 0 0 rgba(241, 217, 162, .7); animation: app-soon-pulse 1.8s ease-out infinite; }
@keyframes app-soon-pulse { 70% { box-shadow: 0 0 0 7px rgba(241, 217, 162, 0); } 100% { box-shadow: 0 0 0 0 rgba(241, 217, 162, 0); } }
.app-soon-text { color: var(--gold-ink); font-size: .9375rem; font-weight: 600; line-height: 1.6; }
@media (max-width: 640px) {
  .app-soon { border-radius: 20px; padding: 14px 16px; margin-top: 22px; }
  .app-soon-text { font-size: .875rem; }
}
