/* 今夜的视觉主题：海边暮色、午夜星空与温柔金色。 */
:root {
  color-scheme: dark;
  --night: #101321;
  --night-2: #171a2a;
  --ink: #f3ede7;
  --muted: #b6b0bd;
  --faint: #777589;
  --gold: #e8c895;
  --gold-light: #f5dfb7;
  --rose: #dba9a6;
  --blue: #a5b5cd;
  --line: rgba(241, 225, 204, .15);
  --line-bright: rgba(232, 200, 149, .38);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --width: 1160px;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: radial-gradient(ellipse at 9% 11%, rgba(120, 93, 119, .16), transparent 36rem),
              radial-gradient(ellipse at 92% 62%, rgba(61, 100, 122, .12), transparent 38rem), var(--night);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.75;
}
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .14;
  background-image: radial-gradient(1px 1px at 8% 18%, #fff 50%, transparent 55%), radial-gradient(1px 1px at 74% 11%, #fff 50%, transparent 55%), radial-gradient(1px 1px at 44% 54%, #fff 50%, transparent 55%), radial-gradient(1px 1px at 91% 76%, #fff 50%, transparent 55%);
  background-size: 320px 290px, 440px 380px, 390px 350px, 500px 450px;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* 固定的导航与恋爱日数，切换场景后仍能回到星图。 */
.site-header { position: sticky; z-index: 20; top: 0; display: flex; width: min(var(--width), calc(100% - 54px)); min-height: 78px; align-items: center; justify-content: space-between; margin: 0 auto; border-bottom: 1px solid var(--line); background: rgba(16, 19, 33, .78); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(232, 200, 149, .42); border-radius: 50%; color: var(--gold); font-size: 16px; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.brand strong { color: #ece4db; font-size: 9px; font-weight: 500; letter-spacing: .2em; }
.brand small { margin-top: 4px; color: var(--muted); font-family: var(--serif); font-size: 11px; letter-spacing: .04em; }
.main-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; margin-right: 34px; }
.nav-button { padding: 7px 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; letter-spacing: .08em; transition: color .2s ease; }
.nav-button:hover, .nav-button.is-current { color: var(--gold-light); }
.day-pill { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 9px; letter-spacing: .05em; white-space: nowrap; }
.day-pill strong { color: var(--gold-light); font-weight: 400; }
.day-pill b { font-family: var(--serif); font-size: 14px; font-weight: 400; }
.screen { width: min(var(--width), calc(100% - 54px)); min-height: calc(100vh - 135px); margin: 0 auto; padding: 56px 0 78px; animation: screen-in .45s ease both; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 15px; color: var(--gold); font-size: 8px; font-weight: 500; letter-spacing: .22em; }
.eyebrow > span:first-child { display: inline-block; width: 23px; height: 1px; background: var(--gold); }
.eyebrow i { color: var(--rose); font-size: 10px; font-style: normal; }
.button { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; gap: 15px; padding: 0 18px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; letter-spacing: .07em; transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { cursor: default; opacity: .36; }
.button-gold { color: #1c1d28; background: linear-gradient(115deg, #f0d7ae, #d9b586); box-shadow: 0 7px 28px rgba(217, 181, 134, .14); font-size: 11px; }
.button-gold:hover:not(:disabled) { box-shadow: 0 10px 34px rgba(217, 181, 134, .26); }
.button-outline { min-height: 38px; border-color: var(--line-bright); color: var(--gold-light); background: rgba(232, 200, 149, .05); font-size: 10px; }
.button-outline:hover:not(:disabled) { background: rgba(232, 200, 149, .12); }
.text-button { padding: 5px 0; border: 0; color: var(--gold); background: transparent; cursor: pointer; font-size: 10px; letter-spacing: .08em; }
.text-button:hover { color: var(--gold-light); }

/* 来信首页：实际海边影子照为主视觉，缺图时使用绘制好的暮色海岸。 */
.intro-screen { display: grid; grid-template-columns: 1fr .83fr; min-height: calc(100vh - 78px); align-items: center; gap: 8%; padding-top: 38px; padding-bottom: 76px; }
.intro-copy { position: relative; z-index: 1; }
.intro-copy h1 { margin: 0 0 14px; font-family: var(--serif); font-size: clamp(48px, 6vw, 76px); font-weight: 400; line-height: 1.2; letter-spacing: .05em; }
.intro-copy h1 em, .birthday-heading h1 em { color: var(--gold-light); font-style: normal; }
.intro-subtitle { max-width: 490px; margin: 0 0 22px; color: var(--muted); font-family: var(--serif); font-size: 13px; letter-spacing: .04em; }
.letter-card { max-width: 520px; padding: 19px 21px 16px; border: 1px solid rgba(232, 200, 149, .23); background: linear-gradient(135deg, rgba(232, 200, 149, .065), rgba(255, 255, 255, .02)); box-shadow: 0 18px 45px rgba(0, 0, 0, .1); }
.letter-topline { display: flex; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--gold); font-size: 9px; letter-spacing: .12em; }
.letter-topline span:last-child { color: var(--faint); font-size: 8px; }
.letter-card p { margin: 11px 0 0; color: #d3ccd2; font-family: var(--serif); font-size: 12px; line-height: 1.9; }
.letter-card .letter-opening { color: var(--gold-light); font-size: 13px; }
.letter-hidden { animation: reveal .35s ease both; }
.letter-card .letter-signoff { color: var(--rose); }
.letter-open-button { margin-top: 12px; }
.letter-open-button span { display: inline-block; transition: transform .2s ease; }
.letter-open-button.is-open span { transform: rotate(180deg); }
#enter-map { margin-top: 17px; }
.intro-day { display: flex; align-items: center; gap: 8px; margin-top: 25px; color: var(--faint); font-size: 10px; letter-spacing: .08em; }
.intro-day strong { color: var(--gold); font-family: var(--serif); font-size: 16px; font-weight: 400; }
.tiny-orbit { color: var(--rose); font-size: 15px; }
.opening-photo { width: min(100%, 430px); margin: 0 0 0 auto; }
.photo-frame { position: relative; min-height: 550px; overflow: hidden; border: 1px solid rgba(241, 219, 188, .34); border-radius: 49% 49% 5px 5px / 39% 39% 5px 5px; background: #414251; box-shadow: 0 25px 80px rgba(0, 0, 0, .32); }
.photo-frame::after { position: absolute; z-index: 3; inset: 12px; border: 1px solid rgba(255, 255, 255, .13); border-radius: inherit; content: ""; pointer-events: none; }
.beach-art { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, #b78f98 0%, #837d91 31%, #4d6074 55%, #283347 100%); transition: opacity .6s ease; }
.beach-art::before { position: absolute; top: 44%; right: -15%; left: -15%; height: 1px; background: rgba(249, 222, 192, .7); box-shadow: 0 7px 22px 3px rgba(245, 201, 160, .37); content: ""; }
.art-moon { position: absolute; top: 18%; left: 50%; width: 68px; height: 68px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 38% 35%, #fff3d8, #efd5b2 68%, rgba(238, 207, 166, .3)); box-shadow: 0 0 58px 16px rgba(235, 201, 174, .24); }
.art-horizon { position: absolute; top: 42%; left: 14%; width: 72%; height: 1px; background: rgba(250, 224, 193, .45); }
.art-water { position: absolute; top: 45%; left: 13%; width: 74%; height: 25%; background: repeating-linear-gradient(180deg, transparent 0 12px, rgba(243, 216, 190, .15) 13px 14px, transparent 15px 24px); }
.art-shore { position: absolute; right: -20%; bottom: -18%; left: -16%; height: 48%; transform: rotate(-7deg); border-radius: 48% 52% 0 0; background: linear-gradient(158deg, #77727d, #424252 58%, #252e3f); }
.art-shadows { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; opacity: .78; }
.art-label { position: absolute; z-index: 2; right: 25px; bottom: 28px; color: rgba(255, 247, 237, .76); font-family: var(--serif); font-size: 11px; letter-spacing: .13em; }
.opening-image { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.photo-frame.has-photo .opening-image { opacity: 1; }
.photo-frame.has-photo .beach-art { opacity: 0; }
.photo-moon-stamp { position: absolute; z-index: 4; top: 21%; right: 13%; color: var(--gold-light); font-size: 17px; text-shadow: 0 0 15px var(--gold); }
.photo-date-stamp { position: absolute; z-index: 4; top: 46px; right: 29px; display: flex; width: 49px; height: 49px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(247, 224, 194, .58); border-radius: 50%; color: #fff1df; background: rgba(20, 26, 42, .28); backdrop-filter: blur(4px); line-height: 1.05; }
.photo-date-stamp small { font-size: 6px; letter-spacing: .13em; }.photo-date-stamp strong { font-family: var(--serif); font-size: 17px; font-weight: 400; }
.opening-photo figcaption { display: flex; justify-content: space-between; margin-top: 12px; padding: 0 7px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.opening-photo figcaption span:first-child { color: var(--gold); font-size: 8px; letter-spacing: .2em; }
.intro-bottom { position: absolute; right: 0; bottom: 26px; display: flex; align-items: center; gap: 11px; color: var(--faint); font-family: var(--serif); font-size: 11px; }
.intro-bottom span { width: 32px; height: 1px; background: var(--line); }

/* 星图地图：四个礼物地点绕着她的中心星排列。 */
.map-screen, .chapter-screen, .gallery-screen, .birthday-screen { padding-top: 55px; }
.screen-heading { text-align: center; }
.screen-heading .eyebrow { justify-content: center; }
.screen-heading h1, .gallery-title-row h1, .chapter-heading h1, .birthday-heading h1 { margin: 0; font-family: var(--serif); font-size: clamp(30px, 4vw, 44px); font-weight: 400; letter-spacing: .08em; }
.screen-heading > p:last-child, .gallery-title-row > div > p:last-child { margin: 8px 0 0; color: var(--muted); font-family: var(--serif); font-size: 12px; }
.galaxy-map { position: relative; width: min(100%, 720px); height: 470px; margin: 7px auto 2px; }
.map-orbit { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 1px solid rgba(232, 200, 149, .13); border-radius: 50%; pointer-events: none; }
.orbit-a { width: 250px; height: 250px; }.orbit-b { width: 390px; height: 390px; transform: translate(-50%, -50%) rotate(28deg) scaleY(.76); border-color: rgba(164, 181, 205, .16); }.orbit-c { width: 550px; height: 430px; transform: translate(-50%, -50%) rotate(-18deg); border-color: rgba(232, 200, 149, .09); }
.map-center { position: absolute; z-index: 2; top: 50%; left: 50%; display: flex; width: 134px; height: 134px; transform: translate(-50%, -50%); flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(232, 200, 149, .35); border-radius: 50%; background: radial-gradient(circle, rgba(232, 200, 149, .17), rgba(23, 26, 42, .96) 70%); box-shadow: 0 0 60px rgba(232, 200, 149, .1); }
.center-halo { position: absolute; inset: -11px; border: 1px solid rgba(232, 200, 149, .13); border-radius: 50%; animation: breathe 5s ease-in-out infinite; }
.center-star { color: var(--gold-light); font-size: 21px; text-shadow: 0 0 17px var(--gold); }
.map-center strong { margin-top: 1px; font-family: var(--serif); font-size: 21px; font-weight: 400; }
.map-center small { color: var(--muted); font-size: 8px; letter-spacing: .13em; }
.planet { position: absolute; z-index: 3; display: flex; min-width: 130px; flex-direction: column; align-items: center; padding: 3px 10px 6px; border: 0; color: var(--muted); background: transparent; cursor: pointer; transition: transform .25s ease, color .25s ease, opacity .25s ease; }
.planet:hover:not(:disabled) { transform: scale(1.06); color: var(--gold-light); }
.planet:disabled { cursor: default; opacity: .36; }
.planet-icon { display: grid; width: 46px; height: 46px; margin-bottom: 4px; place-items: center; border: 1px solid rgba(232, 200, 149, .31); border-radius: 50%; color: var(--gold); background: radial-gradient(circle at 38% 30%, rgba(232, 200, 149, .19), rgba(24, 27, 43, .95) 75%); box-shadow: 0 0 26px rgba(232, 200, 149, .08); font-size: 17px; transition: .25s ease; }
.planet.is-unlocked .planet-icon { border-color: rgba(232, 200, 149, .75); box-shadow: 0 0 26px rgba(232, 200, 149, .18); }
.planet.is-complete .planet-icon { color: var(--night); background: var(--gold); box-shadow: 0 0 28px rgba(232, 200, 149, .25); }
.planet-name { color: #ded8df; font-family: var(--serif); font-size: 11px; letter-spacing: .08em; }
.planet small { color: var(--faint); font-size: 7px; letter-spacing: .16em; }
.planet-one { top: 2%; left: 50%; transform: translateX(-50%); }.planet-one:hover:not(:disabled) { transform: translateX(-50%) scale(1.06); }
.planet-two { top: 50%; right: 0; transform: translateY(-50%); }.planet-two:hover:not(:disabled) { transform: translateY(-50%) scale(1.06); }
.planet-three { bottom: 0; left: 50%; transform: translateX(-50%); }.planet-three:hover:not(:disabled) { transform: translateX(-50%) scale(1.06); }
.planet-four { top: 50%; left: 0; transform: translateY(-50%); }.planet-four:hover:not(:disabled) { transform: translateY(-50%) scale(1.06); }
.map-footer-row { display: flex; align-items: center; justify-content: space-between; max-width: 720px; margin: -5px auto 18px; padding: 0 12px; }
.map-message { min-height: 24px; margin: 0; color: var(--muted); font-family: var(--serif); font-size: 11px; }
.map-progress { display: flex; align-items: baseline; gap: 10px; color: var(--faint); font-size: 9px; letter-spacing: .06em; }
.map-progress strong { color: var(--gold); font-family: var(--serif); font-size: 18px; font-weight: 400; }
.birthday-portal { display: flex; width: min(100%, 720px); min-height: 69px; align-items: center; gap: 14px; margin: 0 auto; padding: 10px 18px; border: 1px solid var(--line-bright); color: var(--ink); background: linear-gradient(110deg, rgba(232, 200, 149, .08), rgba(255, 255, 255, .02)); cursor: pointer; text-align: left; transition: .25s ease; }
.birthday-portal:disabled { border-color: var(--line); cursor: default; opacity: .46; }
.birthday-portal:not(:disabled):hover { border-color: var(--gold); background: rgba(232, 200, 149, .12); }
.portal-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(232, 200, 149, .38); border-radius: 50%; color: var(--gold); font-size: 17px; }
.birthday-portal > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; line-height: 1.4; }
.birthday-portal small { color: var(--faint); font-size: 7px; letter-spacing: .18em; }
.birthday-portal strong { color: var(--gold-light); font-family: var(--serif); font-size: 14px; font-weight: 400; letter-spacing: .08em; }
.portal-status { color: var(--muted); font-size: 9px; }.portal-arrow { color: var(--gold); font-size: 16px; }

/* 关卡页面：一次呈现一项游戏和对应的现实礼物交接。 */
.chapter-screen { max-width: 850px; padding-top: 35px; }
.back-button { display: inline-flex; align-items: center; gap: 9px; padding: 5px 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; letter-spacing: .07em; }
.back-button:hover { color: var(--gold-light); }
.chapter-progress { display: flex; justify-content: space-between; margin: 24px 0 9px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 8px; letter-spacing: .16em; }
.chapter-progress span:last-child { color: var(--gold); }.chapter-progress b { font-family: var(--serif); font-size: 12px; font-weight: 400; }
.chapter-panel { padding: 15px 0 25px; animation: screen-in .4s ease both; }
.chapter-heading { margin-bottom: 22px; }
.chapter-heading .eyebrow { margin-bottom: 6px; }
.chapter-heading h1 { font-size: clamp(28px, 4vw, 38px); }
.chapter-heading > p:last-child { margin: 7px 0 0; color: var(--muted); font-family: var(--serif); font-size: 12px; }
.game-surface { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(135deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012)); }
.shore-puzzle { height: 340px; background: #263144; }
.shore-fallback { position: absolute; inset: 0; background: linear-gradient(180deg, #7f7588 0%, #556478 47%, #28364a 100%); }
.shore-fallback::before { position: absolute; top: 48%; right: 0; left: 0; height: 1px; background: rgba(248, 224, 196, .45); box-shadow: 0 10px 22px rgba(247, 218, 183, .18); content: ""; }
.shore-fallback::after { position: absolute; right: -5%; bottom: -34%; left: -5%; height: 63%; transform: rotate(-2deg); border-radius: 47% 53% 0 0; background: linear-gradient(160deg, #646575, #283246); content: ""; }
.shore-moon { position: absolute; top: 18%; left: 72%; width: 54px; height: 54px; border-radius: 50%; background: #eed7b7; box-shadow: 0 0 50px rgba(238, 215, 183, .26); }
.shore-glimmer { position: absolute; top: 48%; right: 15%; left: 10%; height: 22%; background: repeating-linear-gradient(180deg, transparent 0 9px, rgba(242, 218, 190, .1) 10px 11px, transparent 12px 19px); }
.shore-photo { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.shore-puzzle.has-photo .shore-photo { opacity: .74; }
.shore-path { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; overflow: visible; }
.shore-path path { fill: none; stroke: rgba(247, 226, 197, .26); stroke-width: 1.2; stroke-dasharray: 4 7; }
.shore-path .shore-path-glow { stroke: var(--gold-light); stroke-width: 2; stroke-dasharray: 0 2000; filter: drop-shadow(0 0 5px var(--gold)); transition: stroke-dasharray .4s ease; }
.shore-puzzle[data-progress="1"] .shore-path-glow { stroke-dasharray: 175 2000; }.shore-puzzle[data-progress="2"] .shore-path-glow { stroke-dasharray: 355 2000; }.shore-puzzle[data-progress="3"] .shore-path-glow { stroke-dasharray: 530 2000; }.shore-puzzle[data-progress="4"] .shore-path-glow { stroke-dasharray: 810 2000; }
.shore-star { position: absolute; z-index: 3; top: var(--y); left: var(--x); display: flex; width: 36px; height: 36px; transform: translate(-50%, -50%); flex-direction: column; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 50%; color: rgba(245, 228, 205, .7); background: rgba(20, 24, 38, .17); cursor: pointer; font-size: 13px; transition: .2s ease; }
.shore-star small { margin-top: -3px; font-size: 6px; opacity: .75; }
.shore-star:hover:not(:disabled), .shore-star.is-lit { border-color: rgba(245, 223, 185, .65); color: #fff0d3; background: rgba(23, 27, 41, .68); box-shadow: 0 0 22px rgba(232, 200, 149, .52); }
.shore-star:disabled { cursor: default; opacity: .8; }
.shore-caption { position: absolute; z-index: 3; bottom: 14px; left: 18px; color: rgba(255, 247, 236, .74); font-family: var(--serif); font-size: 10px; letter-spacing: .08em; text-shadow: 0 1px 7px #131726; }
.chapter-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.game-feedback { min-height: 24px; margin: 12px 0; color: var(--muted); font-family: var(--serif); font-size: 11px; }
.game-feedback.is-success { color: var(--gold-light); }.game-feedback.is-error { color: #e7b1ad; }
.hint-button { padding: 6px 0; border: 0; color: var(--faint); background: none; cursor: pointer; font-size: 9px; white-space: nowrap; }.hint-button:hover { color: var(--gold); }
.hint-copy { margin: -2px 0 12px; color: var(--rose); font-family: var(--serif); font-size: 10px; }
.gift-unlock { display: flex; align-items: center; gap: 15px; margin-top: 19px; padding: 17px; border: 1px solid var(--line-bright); background: linear-gradient(110deg, rgba(232, 200, 149, .075), rgba(255, 255, 255, .02)); animation: reveal .45s ease both; }
.gift-orb { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(232, 200, 149, .38); border-radius: 50%; color: var(--gold-light); font-size: 19px; }
.gift-unlock > div { display: flex; flex: 1; flex-direction: column; line-height: 1.5; }
.gift-unlock small { color: var(--rose); font-size: 8px; letter-spacing: .13em; }
.gift-unlock strong { margin-top: 3px; color: var(--ink); font-family: var(--serif); font-size: 13px; font-weight: 400; }
.gift-unlock p { margin: 2px 0 0; color: var(--muted); font-family: var(--serif); font-size: 10px; }

/* 星环解谜。 */
.orbit-game-wrap { display: flex; min-height: 400px; flex-direction: column; align-items: center; justify-content: center; padding: 25px; background: radial-gradient(circle at 50% 48%, rgba(232, 200, 149, .1), transparent 38%), rgba(255, 255, 255, .018); }
.orbit-board { position: relative; width: 310px; height: 310px; display: grid; place-items: center; }
.board-north-star { position: absolute; z-index: 7; top: -4px; left: 50%; transform: translateX(-50%); color: var(--gold-light); font-size: 18px; text-shadow: 0 0 14px var(--gold); }
.orbit-core { position: relative; z-index: 6; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(232, 200, 149, .55); border-radius: 50%; color: var(--gold-light); background: var(--night-2); font-family: var(--serif); font-size: 14px; box-shadow: 0 0 28px rgba(232, 200, 149, .16); }
.turning-orbit { position: absolute; display: block; padding: 0; border: 1px solid rgba(203, 195, 197, .25); border-radius: 50%; background: transparent; cursor: pointer; transition: transform .5s cubic-bezier(.2,.8,.2,1), border-color .2s ease; }
.turning-orbit:hover { border-color: rgba(232, 200, 149, .7); }
.orbit-outer { inset: 0; }.orbit-middle { inset: 17%; border-color: rgba(232, 200, 149, .25); }.orbit-inner { inset: 34%; border-style: dashed; border-color: rgba(232, 200, 149, .25); }
.turning-orbit span { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); color: var(--rose); font-size: 15px; text-shadow: 0 0 10px rgba(220, 168, 165, .65); }
.turning-orbit[data-position="0"] span { color: var(--gold-light); text-shadow: 0 0 14px var(--gold); }
.orbit-legend { display: flex; gap: 20px; color: var(--faint); font-size: 8px; letter-spacing: .08em; }.orbit-legend i { margin-right: 4px; color: var(--gold); font-style: normal; }
.legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--rose); }
.chapter-screen > .hint-button { display: block; margin-top: 2px; }

/* 书页解谜。 */
.book-puzzle { display: flex; min-height: 260px; flex-direction: column; align-items: center; justify-content: center; padding: 28px 18px; background: radial-gradient(ellipse at 50% 15%, rgba(200, 153, 154, .13), transparent 60%), rgba(255, 255, 255, .025); }
.book-emblem { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--gold); font-size: 17px; }
.book-instruction { margin: 12px 0 3px; color: var(--muted); font-family: var(--serif); font-size: 11px; }
.word-answer { display: flex; min-height: 41px; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; width: min(100%, 500px); margin-top: 4px; border-bottom: 1px solid var(--line-bright); color: var(--gold-light); font-family: var(--serif); font-size: 14px; }
.word-answer > span:first-child:last-child { color: var(--faint); font-size: 10px; }
.word-chip { padding: 2px 7px; border: 1px solid rgba(232, 200, 149, .23); background: rgba(232, 200, 149, .06); }
.word-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 15px; }
.word-tile { padding: 6px 12px; border: 1px solid var(--line); border-radius: 2px; color: #ded6d1; background: rgba(255, 255, 255, .03); cursor: pointer; font-family: var(--serif); font-size: 11px; transition: .2s ease; }
.word-tile:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-light); }
.word-tile:disabled { opacity: .3; cursor: default; }
.book-controls { display: flex; gap: 17px; align-items: center; margin-top: 16px; }

/* 照片线索。 */
.archive-clues { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; padding: 17px; }
.archive-card { position: relative; display: flex; min-height: 184px; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line); color: var(--muted); background: linear-gradient(145deg, #705d69, #3f4b61 58%, #273449); cursor: pointer; transition: border-color .25s ease, transform .25s ease; }
.archive-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.archive-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.archive-card .archive-index, .archive-card .archive-label, .archive-card .archive-reveal { position: relative; z-index: 1; }
.archive-index { color: var(--gold-light); font-family: var(--serif); font-size: 20px; }
.archive-label { margin-top: 5px; font-size: 9px; letter-spacing: .08em; }
.archive-reveal { position: absolute; top: 10px; right: 12px; color: var(--gold-light); opacity: 0; text-shadow: 0 0 14px var(--gold); transition: opacity .2s ease; }
.archive-card.is-found { border-color: var(--gold); box-shadow: inset 0 0 30px rgba(232, 200, 149, .12); }.archive-card.is-found .archive-reveal { opacity: 1; }
.archive-count { color: var(--faint); font-size: 9px; }.archive-count b { color: var(--gold); font-family: var(--serif); font-size: 14px; font-weight: 400; }

/* 照片星图与筛选、收藏。 */
.gallery-screen { max-width: 1120px; }
.gallery-title-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.gallery-title-row .eyebrow { margin-bottom: 8px; }.gallery-title-row h1 { font-size: clamp(31px, 4.2vw, 45px); }
.gallery-total { display: flex; flex-direction: column; align-items: end; color: var(--gold); font-family: var(--serif); font-size: 34px; line-height: 1; }.gallery-total small { margin-top: 5px; color: var(--faint); font-family: var(--sans); font-size: 7px; letter-spacing: .2em; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 28px 0 23px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.filter-button { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; transition: .2s ease; }
.filter-button small { color: var(--faint); font-size: 8px; }.filter-button:hover, .filter-button.is-selected { border-color: var(--line-bright); color: var(--gold-light); background: rgba(232, 200, 149, .06); }.filter-button.is-selected small { color: var(--gold); }
.gallery-group { margin-top: 20px; padding: 20px 20px 22px; border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(110deg, rgba(255, 255, 255, .027), rgba(255, 255, 255, .008)); }
.gallery-group > header { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }.gallery-group > header > span:first-child { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--line-bright); border-radius: 50%; color: var(--gold); font-family: var(--serif); font-size: 10px; }
.gallery-group h2 { margin: 0; color: #e8e1dc; font-family: var(--serif); font-size: 15px; font-weight: 400; letter-spacing: .07em; }.gallery-group header p { margin: 1px 0 0; color: var(--faint); font-size: 8px; }.gallery-group header > small { margin-left: auto; color: var(--faint); font-size: 7px; letter-spacing: .16em; }
.photo-grid { display: grid; gap: 11px; }.photo-grid-four { grid-template-columns: repeat(4, 1fr); }.photo-grid-three { grid-template-columns: repeat(3, 1fr); }
.photo-card { position: relative; display: block; min-width: 0; padding: 0; overflow: hidden; border: 1px solid rgba(235, 219, 199, .15); border-radius: 3px; color: var(--ink); background: #282b3a; cursor: pointer; text-align: left; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.photo-card:hover { z-index: 1; transform: translateY(-3px); border-color: rgba(232, 200, 149, .58); box-shadow: 0 12px 28px rgba(0, 0, 0, .24); }
.photo-open { display: block; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; }
.card-favorite { position: absolute; z-index: 4; top: 8px; right: 8px; display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(255, 246, 230, .37); border-radius: 50%; color: #f2e5d6; background: rgba(16, 19, 33, .55); cursor: pointer; font-size: 14px; backdrop-filter: blur(4px); }
.card-favorite:hover, .card-favorite.is-favorite { border-color: var(--gold); color: var(--gold-light); background: rgba(16, 19, 33, .8); }
.photo-art { position: relative; display: grid; aspect-ratio: 1.12 / 1; place-items: center; overflow: hidden; background: linear-gradient(145deg, #9b747c, #555368 54%, #29334a); }
.photo-grid-four .photo-art { aspect-ratio: .9 / 1; }.photo-card[data-group="couple"] .photo-art { background: linear-gradient(145deg, #786d80, #4d526b 56%, #27374a); }.photo-card[data-group="moments"] .photo-art { background: linear-gradient(145deg, #8c786e, #5a6270 55%, #28384a); }
.photo-art::before { position: absolute; top: 14%; right: 16%; width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle, rgba(250, 224, 191, .4), transparent 70%); content: ""; }
.photo-art::after { position: absolute; right: -14%; bottom: -38%; left: -12%; height: 68%; border-top: 1px solid rgba(241, 219, 188, .18); border-radius: 50% 50% 0 0; background: linear-gradient(170deg, rgba(217, 172, 157, .17), rgba(33, 44, 64, .72)); content: ""; }
.photo-art img { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }.photo-card.has-photo .photo-art img { opacity: 1; }
.photo-symbol { position: relative; z-index: 1; color: rgba(250, 229, 198, .8); font-size: 20px; text-shadow: 0 0 18px rgba(241, 204, 161, .4); }.photo-card.has-photo .photo-symbol { opacity: 0; }
.photo-art-label { position: absolute; z-index: 3; right: 8px; bottom: 6px; color: rgba(255, 250, 243, .72); font-size: 7px; letter-spacing: .11em; text-shadow: 0 1px 5px #111; }
.photo-caption { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 9px; color: #d0c8d0; font-family: var(--serif); font-size: 9px; }.photo-caption small { color: var(--gold); font-family: var(--sans); font-size: 7px; }
.gallery-empty { grid-column: 1 / -1; padding: 30px; color: var(--faint); text-align: center; font-family: var(--serif); font-size: 11px; }
.gallery-footnote { margin: 26px 0 15px; color: var(--muted); font-family: var(--serif); font-size: 11px; text-align: center; }.gallery-footnote span { margin-right: 8px; color: var(--gold); }.gallery-back { display: flex; margin: 0 auto; }

/* 生日仪式：三根烛光、愿望投递与试穿尾声。 */
.birthday-screen { display: flex; flex-direction: column; align-items: center; text-align: center; }
.birthday-heading { margin: 0 auto; }.birthday-heading .eyebrow { justify-content: center; }.birthday-heading h1 { font-size: clamp(32px, 4.4vw, 49px); }.birthday-heading > p:last-child { margin: 8px 0 0; color: var(--muted); font-family: var(--serif); font-size: 12px; }.birthday-heading strong { color: var(--gold); font-size: 15px; font-weight: 400; }
.cake-stage { position: relative; display: flex; width: 330px; height: 275px; flex-direction: column; align-items: center; justify-content: end; margin: 25px auto 2px; }
.cake-stars { position: absolute; inset: 0; color: rgba(232, 200, 149, .6); }.cake-stars i { position: absolute; font-style: normal; animation: twinkle 2.8s ease-in-out infinite alternate; }.cake-stars i:nth-child(1) { top: 14%; left: 15%; }.cake-stars i:nth-child(2) { top: 28%; right: 13%; animation-delay: .5s; }.cake-stars i:nth-child(3) { top: 8%; right: 35%; animation-delay: 1s; }.cake-stars i:nth-child(4) { top: 42%; left: 8%; animation-delay: .8s; }
.candles { position: absolute; z-index: 4; top: 43px; display: flex; align-items: end; gap: 30px; }
.candle { position: relative; width: 15px; height: 57px; padding: 0; border: 1px solid rgba(245, 224, 200, .55); border-radius: 4px 4px 1px 1px; background: repeating-linear-gradient(135deg, #d8a7a2 0 5px, #edd2bb 5px 9px); cursor: pointer; }.candle:nth-child(2) { height: 68px; }.candle:nth-child(3) { height: 51px; }
.candle .wick { position: absolute; top: -6px; left: 50%; width: 1px; height: 7px; transform: translateX(-50%); background: #352e36; }.flame { position: absolute; top: -28px; left: 50%; transform: translateX(-50%) scale(.5); color: #ffe5aa; font-size: 20px; opacity: 0; filter: drop-shadow(0 0 7px #f1ba6d); transition: .25s ease; }.candle.is-lit .flame { transform: translateX(-50%) scale(1); opacity: 1; animation: flicker .65s ease-in-out infinite alternate; }
.cake-top { position: relative; z-index: 2; width: 202px; height: 42px; border: 1px solid rgba(250, 225, 203, .65); border-radius: 50%; background: linear-gradient(180deg, #f2d8c6, #dba9a5); box-shadow: 0 0 35px rgba(219, 169, 165, .22); }.cake-body { position: relative; z-index: 1; display: grid; width: 190px; height: 79px; margin-top: -18px; place-items: center; border: 1px solid rgba(250, 225, 203, .38); border-top: 0; border-radius: 0 0 17px 17px; color: #f8e8d5; background: linear-gradient(90deg, #765d70, #b87e86 48%, #725d75); box-shadow: inset 0 -13px 18px rgba(38, 32, 49, .2); }.cake-body span { margin-top: -3px; font-family: var(--serif); font-size: 16px; letter-spacing: .14em; }.cake-plate { width: 225px; height: 14px; margin-top: -2px; border: 1px solid rgba(240, 220, 198, .42); border-radius: 50%; background: linear-gradient(90deg, #777789, #c1acaa, #62697c); }
.candle-hint { min-height: 24px; margin: 12px 0 13px; color: var(--muted); font-family: var(--serif); font-size: 11px; }.blow-button { min-width: 200px; }
.cake-stage.is-blown .candles { opacity: .24; transition: opacity .6s ease; }.cake-stage.is-blown .cake-body { box-shadow: 0 0 36px rgba(232, 200, 149, .2), inset 0 -13px 18px rgba(38, 32, 49, .2); }
.wish-panel { width: min(100%, 530px); margin-top: 32px; padding: 27px 24px; border: 1px solid var(--line-bright); background: radial-gradient(ellipse at 50% 0, rgba(232, 200, 149, .12), transparent 65%), rgba(255, 255, 255, .025); animation: reveal .55s ease both; }.wish-panel .eyebrow { justify-content: center; margin-bottom: 7px; }.wish-panel h2 { margin: 0; font-family: var(--serif); font-size: 25px; font-weight: 400; }.wish-panel > p:not(.eyebrow) { margin: 6px 0 16px; color: var(--muted); font-family: var(--serif); font-size: 11px; }
#wish-form { display: flex; gap: 8px; }.wish-panel input { min-width: 0; flex: 1; padding: 0 11px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: rgba(4, 8, 17, .28); font-size: 10px; }.wish-panel input::placeholder { color: var(--faint); }.wish-feedback { min-height: 20px; margin: 9px 0 0; color: var(--gold-light); font-family: var(--serif); font-size: 11px; }
.birthday-note { margin-top: 22px; padding-top: 19px; border-top: 1px solid var(--line); animation: reveal .5s ease both; }.note-star { color: var(--gold-light); font-size: 20px; text-shadow: 0 0 15px var(--gold); }.birthday-note p { margin: 7px auto 16px; color: #e9d8c6; font-family: var(--serif); font-size: 14px; line-height: 2; }.try-on-note { margin-top: 20px; color: var(--muted); font-family: var(--serif); font-size: 12px; animation: reveal .4s ease both; }.try-on-note p { margin: 0 0 7px; }

/* 页脚与照片放大查看器。 */
.site-footer { display: flex; width: min(var(--width), calc(100% - 54px)); min-height: 66px; align-items: center; justify-content: space-between; gap: 15px; margin: 0 auto; border-top: 1px solid var(--line); color: var(--faint); font-size: 7px; letter-spacing: .15em; }.site-footer button { padding: 4px 0; border: 0; color: var(--gold); background: none; cursor: pointer; font-size: 8px; letter-spacing: .06em; }
.photo-dialog { position: relative; width: min(560px, calc(100% - 28px)); max-width: 560px; padding: 14px; overflow: visible; border: 1px solid var(--line-bright); border-radius: 4px; color: var(--ink); background: #171a2a; box-shadow: 0 30px 100px rgba(0, 0, 0, .65); }.photo-dialog::backdrop { background: rgba(7, 9, 18, .8); backdrop-filter: blur(8px); }.dialog-close { position: absolute; z-index: 5; top: 8px; right: 8px; display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; color: white; background: rgba(14, 17, 28, .55); cursor: pointer; font-size: 20px; line-height: 1; }.dialog-art { position: relative; display: grid; min-height: 250px; max-height: 58vh; aspect-ratio: 1.2 / 1; place-items: center; overflow: hidden; background: linear-gradient(145deg, #826f76, #3c4a60); }.dialog-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #101321; }.dialog-star { color: var(--gold); font-size: 30px; }.dialog-copy { padding: 16px 7px 5px; }.dialog-copy .eyebrow { margin-bottom: 4px; font-size: 7px; }.dialog-copy h2 { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 400; }.dialog-copy > p:last-of-type { margin: 5px 0 0; color: var(--muted); font-family: var(--serif); font-size: 11px; }.dialog-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }.dialog-actions button { padding: 5px 9px; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; }.dialog-actions button:hover, .dialog-actions button.is-favorite { border-color: var(--line-bright); color: var(--gold-light); }.dialog-actions > div { display: flex; gap: 6px; }

@keyframes screen-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes reveal { from { transform: translateY(6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes breathe { 0%, 100% { transform: scale(.96); opacity: .45; } 50% { transform: scale(1.07); opacity: .95; } }
@keyframes flicker { from { filter: drop-shadow(0 0 5px #f1ba6d); } to { filter: drop-shadow(0 0 11px #ffe5aa); } }
@keyframes twinkle { from { opacity: .35; transform: scale(.8); } to { opacity: 1; transform: scale(1.15); } }

/* 手机和平板适配，同时尊重减少动态效果的系统设置。 */
@media (max-width: 900px) {
  .site-header, .screen, .site-footer { width: min(100% - 40px, var(--width)); }
  .intro-screen { grid-template-columns: 1fr .82fr; gap: 5%; }.photo-frame { min-height: 460px; }.intro-copy h1 { font-size: clamp(45px, 6vw, 64px); }.letter-card p { font-size: 11px; }
  .galaxy-map { max-width: 640px; }.orbit-c { width: 500px; }
}
@media (max-width: 680px) {
  .site-header, .screen, .site-footer { width: calc(100% - 30px); }
  .site-header { min-height: 65px; gap: 9px; }.brand { gap: 7px; }.brand-mark { width: 29px; height: 29px; font-size: 13px; }.brand strong { font-size: 7px; }.brand small { font-size: 9px; }.main-nav { gap: 10px; margin-right: 0; }.nav-button { font-size: 8px; }.day-pill { display: none; }
  .screen { min-height: calc(100vh - 110px); padding-top: 34px; padding-bottom: 58px; }.intro-screen { display: flex; flex-direction: column; align-items: stretch; gap: 27px; padding-top: 35px; }.intro-copy h1 { margin-bottom: 10px; font-size: clamp(43px, 12vw, 59px); }.intro-subtitle { font-size: 11px; }.letter-card { padding: 15px 14px 12px; }.letter-topline span:first-child { font-size: 8px; }.letter-card p { font-size: 10px; }.opening-photo { width: min(83%, 330px); margin: 0 auto; }.photo-frame { min-height: 400px; }.intro-bottom { right: 0; bottom: 18px; left: 0; justify-content: center; font-size: 9px; }
  .screen-heading h1, .chapter-heading h1 { font-size: 28px; }.screen-heading > p:last-child { font-size: 10px; }
  .galaxy-map { width: 100%; height: 360px; margin-top: 20px; }.map-orbit.orbit-a { width: 170px; height: 170px; }.map-orbit.orbit-b { width: 290px; height: 260px; }.map-orbit.orbit-c { width: 335px; height: 310px; }.map-center { width: 105px; height: 105px; }.map-center strong { font-size: 17px; }.planet { min-width: 100px; padding: 2px 4px; }.planet-icon { width: 36px; height: 36px; font-size: 14px; }.planet-name { font-size: 9px; }.planet small { font-size: 6px; }.planet-one { top: 0; }.planet-two { right: -7px; }.planet-three { bottom: -2px; }.planet-four { left: -7px; }.map-footer-row { align-items: start; gap: 12px; margin: 0 auto 14px; padding: 0; }.map-message { font-size: 9px; }.map-progress { gap: 6px; font-size: 8px; }.map-progress strong { font-size: 15px; }.birthday-portal { min-height: 60px; gap: 9px; padding: 8px 10px; }.portal-icon { width: 31px; height: 31px; font-size: 14px; }.birthday-portal strong { font-size: 12px; }.portal-status { max-width: 90px; font-size: 7px; text-align: right; }
  .chapter-screen { padding-top: 25px; }.chapter-heading { margin-bottom: 17px; }.chapter-heading > p:last-child { font-size: 10px; }.shore-puzzle { height: 260px; }.shore-star { width: 31px; height: 31px; }.shore-caption { right: 10px; bottom: 10px; left: 10px; font-size: 8px; }.chapter-actions { gap: 9px; }.game-feedback { font-size: 9px; }.hint-button { font-size: 8px; }.gift-unlock { flex-wrap: wrap; gap: 10px; padding: 12px; }.gift-unlock > div { min-width: calc(100% - 56px); }.gift-unlock .button { width: 100%; }.orbit-game-wrap { min-height: 330px; }.orbit-board { width: 250px; height: 250px; }.archive-clues { gap: 7px; padding: 9px; }.archive-card { min-height: 125px; }.archive-label { font-size: 7px; }.book-puzzle { min-height: 250px; padding-inline: 10px; }.word-tile { padding: 6px 8px; font-size: 10px; }
  .gallery-title-row h1 { font-size: 29px; }.gallery-title-row > div > p:last-child { max-width: 270px; font-size: 10px; }.gallery-total { font-size: 26px; }.gallery-filters { gap: 3px; margin-top: 20px; }.filter-button { gap: 4px; padding: 6px 8px; font-size: 8px; }.gallery-group { padding: 14px 9px; }.gallery-group header { gap: 7px; }.gallery-group header > span:first-child { width: 25px; height: 25px; }.gallery-group h2 { font-size: 13px; }.gallery-group header p { font-size: 7px; }.gallery-group header > small { font-size: 6px; }.photo-grid { gap: 6px; }.photo-grid-four { grid-template-columns: repeat(2, 1fr); }.photo-grid-four .photo-art { aspect-ratio: 1 / 1.08; }.photo-grid-three { grid-template-columns: repeat(3, 1fr); }.photo-caption { padding: 6px 5px; font-size: 7px; }.photo-caption small { font-size: 6px; }
  .birthday-heading h1 { font-size: 31px; }.cake-stage { transform: scale(.9); transform-origin: top center; margin-bottom: -20px; }.wish-panel { padding: 21px 13px; }.wish-panel h2 { font-size: 21px; }#wish-form { flex-direction: column; }.wish-panel input { min-height: 40px; }.wish-panel .button { width: 100%; }.birthday-note p { font-size: 12px; }
  .site-footer { min-height: 61px; flex-wrap: wrap; justify-content: center; padding: 12px 0; font-size: 6px; }.site-footer button { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
