/* =========================================================
   花时 · HANA TOKI
   昼夜樱花动态壁纸 / 无外部依赖
   ========================================================= */

:root {
  --font-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --font-ui: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  --ease-silk: cubic-bezier(.22, 1, .36, 1);
  --ease-page: cubic-bezier(.76, 0, .24, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --night: 1;
  --day: 0;
}

html[data-theme="night"] {
  --ink: #fbecf2;
  --ink-soft: rgba(251, 236, 242, .66);
  --ink-faint: rgba(251, 236, 242, .34);
  --ink-ghost: rgba(251, 236, 242, .10);
  --accent: #f3a6c1;
  --accent-deep: #d9779b;
  --accent-pale: #ffd8e3;
  --gold: #eed3a4;
  --glow: rgba(244, 155, 187, .38);
  --line: rgba(255, 216, 229, .16);
  --line-soft: rgba(255, 216, 229, .08);
  --glass: rgba(30, 17, 33, .42);
  --glass-deep: rgba(22, 12, 25, .64);
  --glass-solid: #1a101d;
  --panel: rgba(24, 14, 28, .78);
  --panel-line: rgba(255, 218, 231, .13);
  --ridge-1: rgba(23, 12, 28, .42);
  --ridge-2: rgba(11, 7, 15, .76);
  --mist: rgba(244, 178, 201, .12);
  --clock-1: #fff3f7;
  --clock-2: #f3a7c2;
  --clock-glint: rgba(255, 229, 238, .85);
  --orb-a: #fff7e9;
  --orb-b: #f6d9d1;
  --orb-glow: rgba(255, 214, 226, .34);
  --star: rgba(255, 238, 246, .9);
  --toast-bg: rgba(29, 16, 31, .9);
  --shadow: 0 26px 80px rgba(0, 0, 0, .42);
  --card-sheen: rgba(255, 255, 255, .07);
  --theme-color: #170f1c;
  color-scheme: dark;
}

html[data-theme="day"] {
  --ink: #502a3b;
  --ink-soft: rgba(80, 42, 59, .68);
  --ink-faint: rgba(80, 42, 59, .38);
  --ink-ghost: rgba(80, 42, 59, .08);
  --accent: #b14f73;
  --accent-deep: #8c3458;
  --accent-pale: #6e2747;
  --gold: #9a6b46;
  --glow: rgba(190, 105, 141, .25);
  --line: rgba(108, 49, 76, .18);
  --line-soft: rgba(108, 49, 76, .09);
  --glass: rgba(255, 245, 248, .42);
  --glass-deep: rgba(255, 240, 245, .66);
  --glass-solid: #fff4f7;
  --panel: rgba(255, 244, 247, .8);
  --panel-line: rgba(120, 52, 83, .15);
  --ridge-1: rgba(205, 137, 160, .25);
  --ridge-2: rgba(148, 76, 104, .3);
  --mist: rgba(255, 247, 249, .42);
  --clock-1: #5b2c40;
  --clock-2: #b15776;
  --clock-glint: rgba(255, 255, 255, .55);
  --orb-a: #fff9e8;
  --orb-b: #ffe7bd;
  --orb-glow: rgba(255, 230, 178, .6);
  --star: rgba(255, 255, 255, .75);
  --toast-bg: rgba(255, 244, 247, .94);
  --shadow: 0 26px 80px rgba(118, 66, 86, .18);
  --card-sheen: rgba(255, 255, 255, .4);
  --theme-color: #f6dde4;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--theme-color);
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  transition: color .9s var(--ease-silk);
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: rgba(240, 154, 186, .35); color: var(--ink); }

.skip-link {
  position: fixed;
  left: 18px;
  top: -80px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--theme-color);
  text-decoration: none;
  font-size: 13px;
  transition: top .2s;
}
.skip-link:focus { top: 18px; }

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------------- 昼夜风景 ---------------- */
.scenery {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky-base,
.sky-wash {
  position: absolute;
  inset: 0;
  transition: opacity 1.4s var(--ease-silk);
}

.sky-base {
  opacity: 1;
  background:
    radial-gradient(110% 70% at 78% 4%, rgba(111, 47, 73, .5) 0%, rgba(48, 22, 48, .28) 34%, transparent 68%),
    radial-gradient(90% 60% at 16% 86%, rgba(101, 42, 64, .32) 0%, transparent 62%),
    linear-gradient(180deg, #0d0912 0%, #19101f 36%, #2b1529 64%, #3d1d33 100%);
}

.sky-base::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 40% at 50% 58%, rgba(255, 174, 202, .07), transparent 70%),
    linear-gradient(180deg, transparent 45%, rgba(9, 5, 12, .45) 100%);
}

.sky-wash {
  opacity: 0;
  background:
    radial-gradient(80% 56% at 78% 8%, rgba(255, 247, 231, .9) 0%, rgba(255, 218, 216, .46) 36%, transparent 70%),
    radial-gradient(90% 66% at 12% 80%, rgba(255, 232, 238, .7) 0%, transparent 64%),
    linear-gradient(180deg, #f9e8ec 0%, #f6d9e1 32%, #efbfce 64%, #e3a5ba 100%);
}

html[data-theme="day"] .sky-base { opacity: 0; }
html[data-theme="day"] .sky-wash { opacity: 1; }

.stars {
  position: absolute;
  inset: 0;
  opacity: 1;
  transition: opacity 1.4s var(--ease-silk);
}
html[data-theme="day"] .stars { opacity: 0; }

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--star);
  box-shadow: 0 0 6px 1px rgba(255, 232, 244, .35);
  animation: twinkle var(--dur, 5s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes twinkle {
  0%, 100% { opacity: var(--min, .18); transform: scale(.8); }
  50% { opacity: var(--max, .9); transform: scale(1.25); }
}

.orb-wrap {
  position: absolute;
  top: max(9vh, 64px);
  right: clamp(6vw, 10vw, 15vw);
  width: clamp(94px, 13vw, 178px);
  aspect-ratio: 1;
  transition: transform 1.6s var(--ease-silk);
}

.orb-glow {
  position: absolute;
  inset: -110%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orb-glow) 0%, transparent 62%);
  filter: blur(8px);
  animation: breathe 8s ease-in-out infinite;
}

.orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .94), transparent 34%),
    radial-gradient(circle at 40% 36%, var(--orb-a), var(--orb-b) 72%);
  box-shadow:
    0 0 58px 8px var(--orb-glow),
    inset -14px -18px 34px rgba(150, 77, 100, .14);
  transition: background 1.2s var(--ease-silk), box-shadow 1.2s var(--ease-silk);
}

.orb-crater {
  position: absolute;
  border-radius: 50%;
  background: rgba(172, 113, 129, .14);
  filter: blur(1px);
  transition: opacity .8s;
}
.orb-crater.c1 { width: 18%; height: 18%; top: 27%; left: 24%; }
.orb-crater.c2 { width: 11%; height: 11%; top: 57%; left: 58%; background: rgba(172, 113, 129, .1); }
.orb-crater.c3 { width: 8%; height: 8%; top: 42%; left: 68%; background: rgba(172, 113, 129, .08); }

html[data-theme="day"] .orb {
  background:
    radial-gradient(circle at 38% 34%, #fffef4, #fff3cf 58%, #ffdda0 100%);
  box-shadow: 0 0 72px 20px var(--orb-glow), 0 0 160px 70px rgba(255, 224, 172, .24);
}
html[data-theme="day"] .orb-crater { opacity: 0; }
html[data-theme="day"] .orb-wrap { transform: translateY(2vh) scale(1.05); }

@keyframes breathe {
  0%, 100% { opacity: .72; transform: scale(.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

.cloud {
  position: absolute;
  height: 12vh;
  border-radius: 50%;
  filter: blur(26px);
  opacity: .5;
  transition: opacity 1.4s;
}
.cloud-a {
  width: 46vw; left: -8vw; top: 24%;
  background: linear-gradient(90deg, transparent, var(--mist), transparent);
  animation: drift 46s linear infinite;
}
.cloud-b {
  width: 38vw; right: -6vw; top: 46%;
  background: linear-gradient(90deg, transparent, var(--mist), transparent);
  animation: drift 62s linear infinite reverse;
  opacity: .34;
}
.cloud-c {
  width: 58vw; left: 18vw; bottom: 14%;
  background: linear-gradient(90deg, transparent, var(--mist), transparent);
  animation: drift 80s linear infinite;
  opacity: .22;
}
@keyframes drift {
  0% { transform: translateX(-4vw); }
  50% { transform: translateX(4vw); }
  100% { transform: translateX(-4vw); }
}

.ridge {
  position: absolute;
  left: -1%;
  width: 102%;
  height: auto;
}
.ridge-back {
  bottom: 7vh;
  fill: var(--ridge-1);
  filter: blur(1.5px);
  transition: fill 1.2s;
}
.ridge-front {
  bottom: -5vh;
  fill: var(--ridge-2);
  transition: fill 1.2s;
}

.mist {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 28vh;
  background: radial-gradient(60% 60% at 50% 50%, var(--mist), transparent 72%);
  filter: blur(22px);
  opacity: .55;
}
.mist-a { bottom: 2vh; animation: mistMove 28s ease-in-out infinite; }
.mist-b { bottom: 18vh; height: 18vh; opacity: .3; animation: mistMove 38s ease-in-out infinite reverse; }
@keyframes mistMove {
  0%, 100% { transform: translateX(-3%) scaleY(1); }
  50% { transform: translateX(3%) scaleY(1.12); }
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 48%, transparent 46%, rgba(8, 4, 10, .36) 100%),
    linear-gradient(180deg, rgba(7, 4, 9, .26) 0%, transparent 20%, transparent 78%, rgba(7, 4, 9, .3) 100%);
  transition: opacity 1.2s;
}
html[data-theme="day"] .vignette {
  background:
    radial-gradient(120% 90% at 50% 48%, transparent 50%, rgba(130, 63, 88, .16) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .12) 0%, transparent 20%, transparent 80%, rgba(133, 67, 91, .12) 100%);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* ---------------- 画布与指针 ---------------- */
.petal-canvas,
.fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.petal-canvas { z-index: 1; transition: opacity .8s, filter .8s; }
.fx-canvas { z-index: 3; }
body.is-playing .petal-canvas { opacity: .38; filter: blur(1px); }
body.is-playing .pointer-halo { opacity: 0 !important; }

.pointer-halo {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 198, 219, .115) 0%, rgba(255, 183, 210, .05) 32%, transparent 67%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
  will-change: transform;
  mix-blend-mode: screen;
}
html[data-theme="day"] .pointer-halo { mix-blend-mode: multiply; background: radial-gradient(circle, rgba(255, 255, 255, .4), transparent 65%); }

/* ---------------- 布局 ---------------- */
.app {
  position: relative;
  z-index: 5;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(22px + var(--safe-top)) clamp(20px, 4vw, 52px) 18px;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  pointer-events: auto;
  opacity: .9;
  transition: opacity .3s;
}
.brand:hover { opacity: 1; }
.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
  filter: drop-shadow(0 0 12px var(--glow));
}
.brand-cn {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .28em;
  text-indent: .28em;
}
.brand-en {
  font-size: 8px;
  letter-spacing: .32em;
  color: var(--ink-faint);
  margin-left: 2px;
  padding-top: 4px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
}

.zone-chip {
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--ink-faint);
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  transition: color .3s, border-color .3s;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-radius: 999px;
  padding: 5px 13px 5px 5px;
  cursor: pointer;
  transition: background .4s, border-color .4s, transform .4s var(--ease-silk);
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle:active { transform: scale(.97); }

.theme-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--ink-ghost);
  border: 1px solid var(--line-soft);
  display: block;
}
.theme-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--theme-color);
  display: grid;
  place-items: center;
  transition: transform .55s var(--ease-silk), background .5s, color .5s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
}
html[data-theme="day"] .theme-knob { transform: translateX(18px); }
.theme-knob .icon { position: absolute; width: 12px; height: 12px; transition: opacity .4s, transform .5s; }
.theme-knob .icon-sun { opacity: 0; transform: rotate(-70deg) scale(.5); }
.theme-knob .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="day"] .theme-knob .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="day"] .theme-knob .icon-moon { opacity: 0; transform: rotate(70deg) scale(.5); }
.theme-label { font-size: 11px; letter-spacing: .2em; color: var(--ink-soft); min-width: 1em; }

/* ---------------- 翻页 ---------------- */
.pages {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 1.05s var(--ease-page);
  will-change: transform;
}
.app[data-page="menu"] .pages { transform: translateY(-100%); }
.app[data-page="status"] .pages { transform: translateY(-200%); }

.page {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.page-dots {
  position: fixed;
  right: clamp(16px, 2.6vw, 34px);
  top: 50%;
  z-index: 28;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.page-dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--ink-faint);
  background: transparent;
  cursor: pointer;
  transition: background .4s, border-color .4s, transform .4s;
}
.page-dot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
}
.page-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--glow);
  transform: scale(1.25);
}
.page-dot:hover { border-color: var(--accent); }

/* ---------------- 时间页 ---------------- */
.time-page {
  display: grid;
  place-items: center;
  padding: calc(70px + var(--safe-top)) 18px calc(70px + var(--safe-bottom));
}

.enso {
  position: absolute;
  width: min(74vmin, 690px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  opacity: .7;
  animation: ensoSpin 120s linear infinite;
  pointer-events: none;
}
.enso::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px dashed var(--line-soft);
  opacity: .55;
}
.enso::after {
  content: "";
  position: absolute;
  top: 6.5%;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px 4px var(--glow);
}
@keyframes ensoSpin { to { transform: rotate(360deg); } }

.time-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  width: min(94vw, 1180px);
  transition: opacity .8s var(--ease-silk), transform .9s var(--ease-silk), filter .8s;
}
.app[data-page="menu"] .time-inner,
.app[data-page="status"] .time-inner {
  opacity: 0;
  transform: translateY(-36px) scale(.96);
  filter: blur(4px);
}

.kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 clamp(14px, 2.6vh, 28px);
  font-size: 10px;
  letter-spacing: .54em;
  text-indent: .54em;
  color: var(--ink-faint);
  font-weight: 400;
}
.kicker-line {
  width: clamp(22px, 4vw, 54px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-faint));
}
.kicker-line:last-child { background: linear-gradient(90deg, var(--ink-faint), transparent); }

.clock-wrap { position: relative; display: inline-block; }

.clock-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112%;
  height: 160%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, var(--glow) 0%, transparent 66%);
  filter: blur(34px);
  opacity: .7;
  pointer-events: none;
  animation: clockBreathe 9s ease-in-out infinite;
}
@keyframes clockBreathe {
  0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.97); }
  50% { opacity: .82; transform: translate(-50%, -50%) scale(1.03); }
}

.clock {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 18px);
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  line-height: .78;
  color: transparent;
  -webkit-text-stroke: 1px var(--clock-glint);
  text-shadow: 0 0 46px var(--glow);
}

.clock-hm {
  display: block;
  font-size: clamp(4.9rem, 19vw, 16.8rem);
  font-weight: 300;
  letter-spacing: -.055em;
  background: linear-gradient(172deg, var(--clock-1) 0%, var(--clock-1) 38%, var(--clock-2) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0;
  filter: drop-shadow(0 0 42px var(--glow));
  text-shadow:
    0 1px 0 rgba(255, 255, 255, .08),
    0 0 90px var(--glow);
  padding-right: .02em;
}

.clock-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding-bottom: clamp(9px, 2.2vw, 34px);
  color: var(--ink-soft);
}
.clock-sec {
  font-size: clamp(1.05rem, 2.3vw, 2.05rem);
  font-weight: 300;
  letter-spacing: .06em;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  text-align: left;
  text-shadow: 0 0 20px var(--glow);
}
.clock-sec-label {
  font-family: var(--font-ui);
  font-size: 8px;
  letter-spacing: .32em;
  color: var(--ink-faint);
  padding-left: 2px;
}

.date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(14px, 2.6vh, 30px);
  font-size: clamp(11px, 1.05vw, 13px);
  letter-spacing: .14em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.date-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .7;
  box-shadow: 0 0 8px var(--glow);
}
#tzText { font-size: .86em; letter-spacing: .18em; color: var(--ink-faint); max-width: 100%; overflow-wrap: anywhere; }

.poem {
  margin: clamp(13px, 3vh, 30px) 0 0;
  font-family: var(--font-display);
  font-size: clamp(12px, 1.25vw, 16px);
  letter-spacing: .32em;
  text-indent: .32em;
  color: var(--ink-faint);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(26px + var(--safe-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  border: 0;
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 8px 16px;
  transition: color .4s, opacity .6s;
  animation: cueFloat 4.2s ease-in-out infinite;
}
.scroll-cue:hover { color: var(--ink-soft); }
.scroll-cue-text { font-size: 9px; letter-spacing: .34em; text-indent: .34em; }
.scroll-cue-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, var(--accent), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -100%;
  width: 100%;
  height: 60%;
  background: var(--ink);
  animation: cueDrop 2.4s ease-in-out infinite;
}
@keyframes cueDrop {
  0% { top: -70%; opacity: 0; }
  30% { opacity: .9; }
  70% { top: 100%; opacity: 0; }
  100% { top: 100%; opacity: 0; }
}
@keyframes cueFloat {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 5px); }
}
.app[data-page="menu"] .scroll-cue { opacity: 0; pointer-events: none; }

.time-foot {
  position: absolute;
  right: clamp(24px, 4vw, 56px);
  bottom: calc(32px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 7px;
  letter-spacing: .3em;
  color: var(--ink-ghost);
  transition: opacity .5s;
}
.time-foot-line { width: 30px; height: 1px; background: var(--line); }
.app[data-page="menu"] .time-foot { opacity: 0; }

.reveal-1, .reveal-2, .reveal-3, .reveal-4 {
  opacity: 0;
  animation: riseIn 1.3s var(--ease-silk) forwards;
}
.reveal-1 { animation-delay: .12s; }
.reveal-2 { animation-delay: .28s; }
.reveal-3 { animation-delay: .5s; }
.reveal-4 { animation-delay: .68s; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ---------------- 花间小筑 ---------------- */
.menu-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(76px + var(--safe-top)) clamp(20px, 4vw, 52px) calc(64px + var(--safe-bottom));
}

.menu-inner {
  width: min(880px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity .8s var(--ease-silk), transform 1s var(--ease-silk);
}
.app[data-page="time"] .menu-inner,
.app[data-page="status"] .menu-inner {
  opacity: 0;
  transform: translateY(-50px);
  pointer-events: none;
}
.app[data-page="menu"] .menu-inner { opacity: 1; transform: translateY(0); }

.menu-head { text-align: center; margin-bottom: clamp(18px, 3.2vh, 34px); }
.menu-head .kicker { margin-bottom: 13px; }
.menu-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.4vw, 4.5rem);
  font-weight: 300;
  letter-spacing: .1em;
  line-height: 1.1;
  color: var(--ink);
  text-shadow: 0 0 60px var(--glow);
}
.menu-title .accent {
  background: linear-gradient(150deg, var(--accent), var(--accent-pale));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px var(--glow));
}
.menu-sub {
  margin: clamp(10px, 1.8vh, 18px) auto 0;
  max-width: 480px;
  font-size: clamp(11px, 1.05vw, 13px);
  line-height: 1.9;
  letter-spacing: .12em;
  color: var(--ink-soft);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(11px, 1.5vw, 16px);
  width: 100%;
}

.game-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 20px;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "icon copy arrow"
    "icon meta arrow";
  align-items: center;
  column-gap: clamp(13px, 1.5vw, 18px);
  row-gap: 10px;
  min-height: clamp(132px, 18vh, 166px);
  padding: clamp(18px, 2.2vw, 26px);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(135deg, var(--card-sheen), transparent 44%),
    var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(115%);
  backdrop-filter: blur(20px) saturate(115%);
  cursor: pointer;
  overflow: hidden;
  color: var(--ink);
  transition:
    transform .55s var(--ease-silk),
    border-color .5s,
    background .5s,
    box-shadow .5s;
  opacity: 0;
  transform: translateY(26px);
}
.app[data-page="menu"] .game-card {
  animation: cardIn .85s var(--ease-silk) forwards;
}
.app[data-page="menu"] .game-card:nth-child(1) { animation-delay: .15s; }
.app[data-page="menu"] .game-card:nth-child(2) { animation-delay: .23s; }
.app[data-page="menu"] .game-card:nth-child(3) { animation-delay: .31s; }
.app[data-page="menu"] .game-card:nth-child(4) { animation-delay: .39s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 130% at 8% 0%, var(--tint, rgba(255, 180, 205, .18)), transparent 55%);
  opacity: .55;
  transition: opacity .6s, transform .8s var(--ease-silk);
}
.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow .5s;
}
.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--tint-line, rgba(255, 190, 213, .42));
  box-shadow: 0 24px 50px -22px rgba(0, 0, 0, .55), 0 0 40px -14px var(--tint, rgba(255, 180, 205, .3));
  outline: none;
}
.game-card:hover::before { opacity: 1; transform: scale(1.1); }
.game-card:active { transform: translateY(-1px) scale(.995); }
.game-card:focus-visible { box-shadow: 0 0 0 2px var(--accent), 0 24px 50px -22px rgba(0, 0, 0, .5); }

.game-card[data-game="catch"] { --tint: rgba(248, 154, 187, .26); --tint-line: rgba(255, 183, 209, .55); --tint-ink: #f2a6c0; }
.game-card[data-game="memory"] { --tint: rgba(236, 195, 156, .22); --tint-line: rgba(244, 212, 176, .5); --tint-ink: #e8c79e; }
.game-card[data-game="moon"] { --tint: rgba(183, 168, 240, .24); --tint-line: rgba(204, 190, 248, .5); --tint-ink: #c3b2f0; }
.game-card[data-game="merge"] { --tint: rgba(244, 129, 160, .24); --tint-line: rgba(252, 165, 190, .52); --tint-ink: #f18dad; }
html[data-theme="day"] .game-card[data-game="catch"] { --tint-ink: #b94c72; }
html[data-theme="day"] .game-card[data-game="memory"] { --tint-ink: #9b6a3d; }
html[data-theme="day"] .game-card[data-game="moon"] { --tint-ink: #7057aa; }
html[data-theme="day"] .game-card[data-game="merge"] { --tint-ink: #ad3f62; }

.card-icon-wrap {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 255, 255, .07), transparent), var(--ink-ghost);
  color: var(--tint-ink);
  transition: transform .6s var(--ease-silk), border-color .5s;
}
.game-card:hover .card-icon-wrap { transform: rotate(-5deg) scale(1.05); border-color: var(--tint-line); }
.card-icon { width: 39px; height: 39px; opacity: .92; filter: drop-shadow(0 0 10px var(--tint)); }

.card-copy { grid-area: copy; display: flex; flex-direction: column; min-width: 0; align-self: center; }
.card-no {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--ink-faint);
  margin-bottom: 3px;
}
.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.22rem, 1.75vw, 1.65rem);
  font-weight: 400;
  letter-spacing: .12em;
  line-height: 1.2;
}
.card-desc {
  margin-top: 4px;
  font-size: clamp(10px, .88vw, 11.5px);
  letter-spacing: .04em;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 8.5px;
  letter-spacing: .16em;
  color: var(--ink-faint);
  white-space: nowrap;
}
.meta-dot { width: 2px; height: 2px; border-radius: 50%; background: currentColor; opacity: .6; }
.card-arrow {
  grid-area: arrow;
  align-self: start;
  justify-self: end;
  font-size: 17px;
  line-height: 1;
  color: var(--ink-faint);
  transition: transform .5s var(--ease-silk), color .4s;
}
.game-card:hover .card-arrow { transform: translate(2px, -2px); color: var(--tint-ink); }

.menu-foot {
  margin: clamp(15px, 2.6vh, 26px) 0 0;
  font-size: 8px;
  letter-spacing: .28em;
  color: var(--ink-ghost);
  text-align: center;
}

.back-up {
  position: absolute;
  left: 50%;
  bottom: calc(16px + var(--safe-bottom));
  transform: translateX(-50%);
  border: 0;
  background: none;
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: .24em;
  padding: 8px 14px;
  cursor: pointer;
  transition: color .4s;
}
.back-up:hover { color: var(--ink); }
.back-up span { display: inline-block; transition: transform .4s var(--ease-silk); }
.back-up:hover span { transform: translateY(-3px); }

.menu-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 2px 4px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: none;
  color: var(--ink-faint);
  font-family: var(--font-ui);
  font-size: 9px;
  cursor: pointer;
  transition: color .4s, border-color .4s, letter-spacing .4s;
}
.menu-next:hover { color: var(--ink-soft); border-color: var(--line); letter-spacing: .34em; }
.menu-next span { font-size: 11px; line-height: 1; }

/* ---------------- 观星台 ---------------- */
.app[data-page="status"] .scroll-cue,
.app[data-page="status"] .time-foot { opacity: 0; pointer-events: none; }

.status-page {
  display: grid;
  place-items: center;
  padding: calc(78px + var(--safe-top)) clamp(18px, 4vw, 52px) calc(68px + var(--safe-bottom));
}

.status-inner {
  position: relative;
  z-index: 2;
  width: min(1040px, 100%);
  text-align: center;
  opacity: 0;
  transform: translateY(48px);
  pointer-events: none;
  transition: opacity .8s var(--ease-silk), transform 1s var(--ease-silk);
}
.app[data-page="status"] .status-inner {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.status-head .kicker { margin-bottom: clamp(12px, 2.2vh, 20px); }
.status-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  font-weight: 300;
  letter-spacing: .1em;
  color: var(--ink);
  text-shadow: 0 0 42px var(--glow);
}
.status-sub {
  margin: clamp(10px, 1.8vh, 16px) auto 0;
  max-width: 600px;
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: .12em;
  color: var(--ink-soft);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 20px);
  margin: clamp(20px, 3.4vh, 34px) 0 0;
}
.metric-card {
  position: relative;
  overflow: hidden;
  padding: clamp(16px, 2.2vw, 28px) clamp(14px, 2vw, 24px);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(115%);
  backdrop-filter: blur(22px) saturate(115%);
  box-shadow: var(--shadow);
}
.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  opacity: .6;
}
.metric-label {
  margin: 0;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .2em;
  color: var(--ink-faint);
}
.metric-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 9px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
}
.metric-value small {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .14em;
  color: var(--ink-faint);
}
.metric-track {
  height: 2px;
  overflow: hidden;
  background: var(--line);
}
.metric-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(var(--bar, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  transition: transform 1s var(--ease-silk), background .4s;
}
.metric-fill.is-high { background: linear-gradient(90deg, #b34b65, #e08a9f); }
.metric-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 11px 0 0;
  font-size: 8px;
  line-height: 1.6;
  letter-spacing: .08em;
  color: var(--ink-faint);
}
.metric-meta b { font-weight: 400; color: var(--ink-soft); }

.status-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(12px, 2.4vw, 28px);
  margin: clamp(14px, 2.2vh, 20px) 0 0;
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--ink-faint);
}
.status-strip b { font-weight: 400; color: var(--ink-soft); }
.status-note {
  min-height: 1.4em;
  margin: 14px 0 0;
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--ink-faint);
}
.status-note.is-error { color: var(--accent); }

.status-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
.status-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  background: var(--glass);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: .14em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: color .4s, border-color .4s, background .4s;
}
.status-action:hover { color: var(--ink); border-color: var(--accent); }
.status-action-ghost { background: transparent; color: var(--ink-faint); }

.status-foot {
  position: absolute;
  left: 50%;
  bottom: calc(14px + var(--safe-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  font-size: 7px;
  letter-spacing: .3em;
  color: var(--ink-faint);
  opacity: .7;
}
.status-foot .time-foot-line { width: 26px; }

@media (max-width: 680px) {
  .status-page { padding: calc(66px + var(--safe-top)) 14px calc(42px + var(--safe-bottom)); }
  .status-title { font-size: clamp(2.1rem, 9vw, 3.2rem); }
  .status-sub { max-width: 320px; font-size: 9px; line-height: 1.8; }
  .metric-grid { gap: 8px; margin-top: 18px; }
  .metric-card { padding: 14px 11px; border-radius: 16px; }
  .metric-label { font-size: 7.5px; letter-spacing: .12em; }
  .metric-value { gap: 4px; margin: 8px 0 10px; font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .metric-value small { font-size: 7.5px; }
  .metric-meta { gap: 3px; font-size: 7px; letter-spacing: 0; }
  .status-strip { gap: 10px; font-size: 8px; letter-spacing: .08em; }
  .status-note { font-size: 8px; letter-spacing: .08em; }
  .status-action { padding: 8px 14px; font-size: 9px; }
  .status-foot { display: none; }
}

@media (max-width: 360px) {
  .metric-card { padding: 12px 9px; }
  .metric-meta { font-size: 6.5px; }
  .status-strip { gap: 7px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .status-page { align-items: start; overflow-y: auto; padding: 48px 24px 20px; }
  .status-head .kicker { margin-bottom: 6px; }
  .status-title { font-size: 1.7rem; }
  .status-sub { display: none; }
  .metric-grid { margin-top: 10px; }
  .metric-card { padding: 10px 14px; border-radius: 14px; }
  .metric-value { margin: 5px 0 7px; font-size: 2rem; }
  .metric-meta { margin-top: 6px; }
  .status-strip { margin-top: 8px; padding: 6px; }
  .status-note { margin-top: 7px; }
  .status-actions { margin-top: 8px; }
  .status-foot { display: none; }
}

/* ---------------- 游戏舞台 ---------------- */
.game-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 5, 11, .52);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  backdrop-filter: blur(10px) saturate(110%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s var(--ease-silk), visibility .45s;
}
html[data-theme="day"] .game-layer { background: rgba(92, 48, 65, .22); }
.game-layer[hidden] { display: none; }
.game-layer.is-open { opacity: 1; visibility: visible; }

.game-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  height: min(800px, calc(100vh - 36px));
  height: min(800px, calc(100dvh - 36px));
  border: 1px solid var(--panel-line);
  border-radius: 26px;
  background:
    radial-gradient(90% 70% at 50% -10%, var(--tint, rgba(246, 167, 193, .12)), transparent 60%),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .07);
  overflow: hidden;
  transform: translateY(26px) scale(.97);
  opacity: 0;
  transition: transform .6s var(--ease-silk), opacity .5s;
  -webkit-backdrop-filter: blur(26px);
  backdrop-filter: blur(26px);
}
.game-layer.is-open .game-shell { transform: translateY(0) scale(1); opacity: 1; }
html[data-theme="day"] .game-shell {
  background:
    radial-gradient(90% 70% at 50% -10%, var(--tint, rgba(246, 167, 193, .16)), transparent 62%),
    linear-gradient(155deg, rgba(255, 249, 251, .94), rgba(255, 236, 243, .92));
}

.game-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  z-index: 0;
}

.game-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px clamp(18px, 2.8vw, 30px) 14px;
  border-bottom: 1px solid var(--line-soft);
  flex: 0 0 auto;
}
.game-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--ink-ghost);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 10px;
  letter-spacing: .16em;
  cursor: pointer;
  color: var(--ink-soft);
  transition: border-color .3s, color .3s, background .3s;
}
.game-back:hover { border-color: var(--accent); color: var(--ink); }
.game-back span:first-child { font-size: 14px; line-height: 1; }
.game-heading { min-width: 0; }
.game-eyebrow {
  margin: 0 0 2px;
  font-size: 7.5px;
  letter-spacing: .34em;
  color: var(--ink-faint);
}
.game-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 400;
  letter-spacing: .13em;
  line-height: 1.2;
}
.game-hud {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.hud-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--ink-ghost);
  white-space: nowrap;
}
.hud-label { font-size: 7px; letter-spacing: .22em; color: var(--ink-faint); }
.hud-value {
  font-family: var(--font-display);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
}
.hud-value.is-warn { color: #f08a83; }

.game-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  z-index: 1;
}
.game-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px clamp(18px, 2.8vw, 30px);
  border-top: 1px solid var(--line-soft);
  font-size: 8.5px;
  letter-spacing: .1em;
  color: var(--ink-faint);
  flex: 0 0 auto;
}
.game-quit {
  border: 0;
  background: none;
  font-size: 8.5px;
  letter-spacing: .18em;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 4px;
  transition: color .3s;
}
.game-quit:hover { color: var(--ink); }

/* 通用舞台与控制 */
.stage-fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.stage-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.2vw, 26px);
  overflow: auto;
  overscroll-behavior: contain;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 128px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: .2em;
  transition: transform .35s var(--ease-silk), background .35s, border-color .35s, box-shadow .35s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #24101a;
  border-color: transparent;
  box-shadow: 0 10px 30px -12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35);
  font-weight: 600;
}
html[data-theme="night"] .btn-primary { color: #2a1220; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px var(--glow); }
.btn-ghost {
  background: var(--ink-ghost);
  border-color: var(--line);
  color: var(--ink-soft);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }

.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: radial-gradient(80% 70% at 50% 45%, rgba(20, 11, 24, .3), rgba(20, 11, 24, .72));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s, visibility .4s;
}
html[data-theme="day"] .game-overlay { background: radial-gradient(80% 70% at 50% 45%, rgba(255, 245, 248, .45), rgba(255, 238, 244, .88)); }
.game-overlay.is-visible { opacity: 1; visibility: visible; }
.overlay-mark {
  width: 54px;
  height: 54px;
  color: var(--accent);
  margin-bottom: 14px;
  filter: drop-shadow(0 0 18px var(--glow));
  animation: markFloat 5s ease-in-out infinite;
}
@keyframes markFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}
.overlay-eyebrow { margin: 0 0 8px; font-size: 8px; letter-spacing: .36em; color: var(--ink-faint); }
.overlay-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 400;
  letter-spacing: .14em;
  line-height: 1.3;
}
.overlay-desc {
  margin: 10px 0 0;
  max-width: 380px;
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: .06em;
  color: var(--ink-soft);
}
.overlay-stats {
  display: flex;
  gap: 30px;
  margin: 22px 0 24px;
}
.overlay-stat { display: flex; flex-direction: column; gap: 4px; }
.overlay-stat span:first-child { font-size: 7.5px; letter-spacing: .25em; color: var(--ink-faint); }
.overlay-stat span:last-child {
  font-family: var(--font-display);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.overlay-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* 倒计时提示 */
.count-flash {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 9rem);
  color: var(--accent);
  text-shadow: 0 0 60px var(--glow);
}
.count-flash.is-pop { animation: countPop .8s var(--ease-silk) forwards; }
@keyframes countPop {
  0% { opacity: 0; transform: scale(.7); }
  25% { opacity: 1; transform: scale(1); }
  80% { opacity: .9; }
  100% { opacity: 0; transform: scale(1.18); }
}

/* ---------------- 拾樱 ---------------- */
.catch-stage {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 52% at 50% 108%, rgba(245, 165, 195, .16), transparent 70%),
    linear-gradient(180deg, transparent, rgba(12, 7, 15, .16));
}
.catch-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: none;
}
html[data-theme="day"] .catch-stage {
  background:
    radial-gradient(60% 52% at 50% 108%, rgba(216, 132, 163, .12), transparent 70%),
    linear-gradient(180deg, transparent, rgba(177, 79, 115, .05));
}
.catch-score-pop {
  position: absolute;
  pointer-events: none;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent-pale);
  text-shadow: 0 0 14px var(--glow);
  animation: scoreFloat 0.9s var(--ease-silk) forwards;
  z-index: 5;
}
@keyframes scoreFloat {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.7); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(1); }
}

/* ---------------- 花笺 ---------------- */
.memory-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.5vw, 26px);
  overflow: auto;
}
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.3vw, 13px);
  width: min(600px, 100%);
  perspective: 1100px;
}
.memory-card {
  position: relative;
  aspect-ratio: 3 / 3.85;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  perspective: 900px;
  -webkit-user-select: none;
  user-select: none;
}
.memory-card-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-silk);
  border-radius: clamp(10px, 1.4vw, 14px);
}
.memory-card.is-flipped .memory-card-inner,
.memory-card.is-matched .memory-card-inner { transform: rotateY(180deg); }
.memory-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border: 1px solid var(--line);
  overflow: hidden;
}
.memory-back {
  background:
    radial-gradient(80% 70% at 28% 18%, rgba(255, 255, 255, .09), transparent 55%),
    linear-gradient(145deg, var(--glass), rgba(45, 23, 42, .7));
  box-shadow: inset 0 0 0 1px var(--line-soft), 0 10px 22px -16px rgba(0, 0, 0, .7);
}
html[data-theme="day"] .memory-back { background: linear-gradient(145deg, rgba(255, 250, 251, .9), rgba(242, 205, 216, .85)); }
.memory-back::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--line-soft);
  border-radius: inherit;
}
.memory-back svg { width: 38%; height: 38%; color: var(--accent); opacity: .55; filter: drop-shadow(0 0 10px var(--glow)); }
.memory-front {
  transform: rotateY(180deg);
  background:
    radial-gradient(90% 80% at 50% 12%, var(--face-glow, rgba(246, 166, 195, .2)), transparent 64%),
    linear-gradient(155deg, var(--glass-deep), var(--glass));
}
html[data-theme="day"] .memory-front { background: radial-gradient(90% 80% at 50% 12%, var(--face-glow, rgba(240, 160, 190, .28)), transparent 66%), linear-gradient(155deg, rgba(255, 251, 252, .96), rgba(250, 228, 235, .94)); }
.memory-front::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--face-line, var(--line-soft));
  border-radius: inherit;
}
.memory-glyph {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 300;
  line-height: 1;
  color: var(--face-color, var(--accent));
  text-shadow: 0 0 30px var(--face-glow, var(--glow));
  transform: translateY(-2px);
}
.memory-flower {
  position: absolute;
  right: 9%;
  bottom: 8%;
  font-size: clamp(8px, 1vw, 10px);
  letter-spacing: .14em;
  color: var(--face-color, var(--accent));
  opacity: .5;
}
.memory-card.is-matched .memory-front { box-shadow: inset 0 0 26px var(--face-glow, var(--glow)); }
.memory-card.is-matched { animation: matchedPulse .8s var(--ease-silk); }
@keyframes matchedPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.memory-card:focus-visible .memory-card-inner { box-shadow: 0 0 0 2px var(--accent); }
.memory-card.is-locked { cursor: default; }

/* ---------------- 月下点花 ---------------- */
.moon-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.4vw, 24px);
  overflow: hidden;
}
.moon-stage::before {
  content: "";
  position: absolute;
  width: min(70vh, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  box-shadow: 0 0 120px -40px var(--glow) inset;
  opacity: .7;
  pointer-events: none;
}
.moon-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(7px, 1.2vw, 12px);
  width: min(540px, 86vmin, 100%);
  aspect-ratio: 1;
  z-index: 1;
}
.moon-cell {
  position: relative;
  border-radius: clamp(14px, 2.2vw, 22px);
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(70% 60% at 34% 26%, rgba(255, 255, 255, .07), transparent 60%),
    linear-gradient(160deg, var(--ink-ghost), transparent);
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
}
.moon-cell::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  opacity: .5;
  box-shadow: 0 0 30px -14px var(--glow) inset;
}
.moon-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, var(--glow), transparent 64%);
  opacity: 0;
  transition: opacity .3s;
}
.moon-cell.has-bloom::after { opacity: .6; }
.moon-cell:hover { border-color: var(--line); }
html[data-theme="day"] .moon-cell {
  border-color: rgba(119, 54, 83, .17);
  background:
    radial-gradient(70% 60% at 34% 26%, rgba(255, 255, 255, .72), transparent 60%),
    linear-gradient(160deg, rgba(177, 79, 115, .13), rgba(177, 79, 115, .04));
}
html[data-theme="day"] .moon-cell::before {
  border-color: rgba(177, 79, 115, .24);
  box-shadow: 0 0 30px -14px rgba(177, 79, 115, .38) inset;
}
.bloom,
.shade {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58%;
  height: 58%;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
  animation: bloomIn .28s var(--ease-silk);
  touch-action: manipulation;
}
.bloom::before {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: .3;
  animation: bloomRing var(--life, 1.25s) linear forwards;
}
.bloom svg { width: 88%; height: 88%; filter: drop-shadow(0 0 14px currentColor); }
.bloom[data-kind="gold"] svg { animation: goldSpin 5s linear infinite; }
.shade { animation: shadeIn .3s var(--ease-silk); }
.shade svg { width: 77%; height: 77%; color: #3a2138; filter: drop-shadow(0 0 12px rgba(100, 48, 85, .8)); }
html[data-theme="day"] .shade svg { color: #6d4a5c; }
@keyframes bloomIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.35) rotate(-20deg); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
}
@keyframes bloomRing {
  from { transform: scale(1); opacity: .55; }
  to { transform: scale(1.65); opacity: 0; }
}
@keyframes goldSpin { to { transform: rotate(360deg); } }
@keyframes shadeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.bloom.is-hit,
.shade.is-hit { animation: hitOut .3s var(--ease-silk) forwards; pointer-events: none; }
@keyframes hitOut {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  45% { opacity: 1; transform: translate(-50%, -50%) scale(1.26) rotate(5deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(22deg); }
}
.moon-combo {
  position: absolute;
  left: 50%;
  top: 13%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .18em;
  color: var(--accent-pale);
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 20px var(--glow);
}
.moon-combo.is-show { animation: comboShow .8s var(--ease-silk); }
@keyframes comboShow {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.85); }
  25% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -16px) scale(1.03); }
}

/* ---------------- 花合 ---------------- */
.merge-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.6vh, 16px);
  padding: clamp(12px, 2vw, 22px);
  overflow: auto;
}
.merge-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: clamp(7px, 1vw, 10px);
  width: min(440px, 82vmin, 100%);
  aspect-ratio: 1;
  padding: clamp(8px, 1.2vw, 12px);
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--ink-ghost);
  box-shadow: inset 0 0 50px -20px var(--glow);
  touch-action: none;
}
.merge-cell {
  border-radius: 12px;
  background: var(--line-soft);
  position: relative;
}
.merge-tile {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  border: 1px solid var(--tile-line, transparent);
  background: var(--tile-bg, var(--glass));
  color: var(--tile-ink, var(--ink));
  font-family: var(--font-display);
  font-size: clamp(16px, 3vw, 30px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .16);
  overflow: hidden;
}
.merge-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 70% at 30% 20%, rgba(255, 255, 255, .2), transparent 60%);
  opacity: .7;
}
.merge-tile .tile-num { position: relative; z-index: 1; }
.merge-tile.is-new { animation: tileNew .22s var(--ease-silk); }
.merge-tile.is-merged { animation: tileMerge .3s var(--ease-silk); }
@keyframes tileNew {
  from { transform: scale(.2); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes tileMerge {
  0% { transform: scale(.82); }
  55% { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.merge-tile.v2 { --tile-bg: linear-gradient(145deg, rgba(255, 226, 235, .22), rgba(247, 172, 198, .18)); --tile-ink: var(--ink); }
.merge-tile.v4 { --tile-bg: linear-gradient(145deg, rgba(249, 197, 216, .38), rgba(240, 143, 179, .3)); --tile-ink: var(--ink); }
.merge-tile.v8 { --tile-bg: linear-gradient(145deg, #f3a9c3, #de7ca0); --tile-ink: #2a101b; }
.merge-tile.v16 { --tile-bg: linear-gradient(145deg, #ef91b2, #cd5f89); --tile-ink: #2b0d19; }
.merge-tile.v32 { --tile-bg: linear-gradient(145deg, #e57a9f, #b83f6d); --tile-ink: #fff8fb; }
.merge-tile.v64 { --tile-bg: linear-gradient(145deg, #d8618c, #952b55); --tile-ink: #fff7fb; }
.merge-tile.v128 { --tile-bg: linear-gradient(145deg, #c98a63, #9a5a36); --tile-ink: #fff9ef; }
.merge-tile.v256 { --tile-bg: linear-gradient(145deg, #e0b47b, #b88343); --tile-ink: #2c1a0c; }
.merge-tile.v512 { --tile-bg: linear-gradient(145deg, #f0d59b, #c79a4e); --tile-ink: #2e1d08; }
.merge-tile.v1024 { --tile-bg: linear-gradient(145deg, #b8a2ee, #7d63c4); --tile-ink: #fff; }
.merge-tile.v2048 { --tile-bg: linear-gradient(145deg, #9c84e8, #5d3fa6); --tile-ink: #fff; }
html[data-theme="day"] .merge-tile.v2,
html[data-theme="day"] .merge-tile.v4 { --tile-ink: #5b2c40; }
html[data-theme="day"] .merge-board {
  border-color: rgba(108, 49, 76, .22);
  background: rgba(143, 67, 99, .1);
  box-shadow: inset 0 0 50px -20px rgba(177, 79, 115, .3);
}
html[data-theme="day"] .merge-cell {
  background: rgba(255, 255, 255, .4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}
html[data-theme="day"] .merge-tile.v2 { --tile-bg: linear-gradient(145deg, #f7ccda, #efb2c7); }
html[data-theme="day"] .merge-tile.v4 { --tile-bg: linear-gradient(145deg, #efafc6, #df8dab); }
.merge-hint {
  font-size: 8px;
  letter-spacing: .22em;
  color: var(--ink-faint);
  text-align: center;
}
.merge-win .overlay-title { color: var(--gold); }

/* ---------------- 提示与无障碍 ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  z-index: 90;
  transform: translate(-50%, 18px);
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--toast-bg);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .12em;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s, transform .45s var(--ease-silk), visibility .35s;
  box-shadow: 0 12px 40px -18px #000;
}
.toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.noscript {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
  background: #170f1c;
  color: #f8e8ee;
  font-family: var(--font-display);
  letter-spacing: .1em;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .zone-chip { display: none; }
  .time-foot { display: none; }
  .game-shell { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
  .game-layer { padding: 0; }
  .game-head { padding-top: calc(14px + var(--safe-top)); }
  .game-foot { padding-bottom: calc(10px + var(--safe-bottom)); }
}

@media (max-width: 680px) {
  .brand-en { display: none; }
  .brand-cn { font-size: 15px; }
  .brand-mark { width: 23px; height: 23px; }
  .topbar { padding-left: 18px; padding-right: 18px; }
  .theme-toggle { gap: 0; padding: 5px 5px 5px 5px; }
  .theme-label { display: none; }

  .time-page { padding-top: calc(60px + var(--safe-top)); padding-bottom: calc(58px + var(--safe-bottom)); }
  .clock-hm { font-size: clamp(4.6rem, 28vw, 9rem); }
  .clock-side { padding-bottom: 8px; }
  .clock-sec { font-size: 1rem; }
  .clock-sec-label { font-size: 6px; }
  .poem { letter-spacing: .2em; text-indent: .2em; }
  .enso { width: 88vw; }
  .time-foot { display: none; }

  .menu-page { padding: calc(64px + var(--safe-top)) 16px calc(50px + var(--safe-bottom)); }
  .menu-head { margin-bottom: 14px; }
  .menu-title { font-size: clamp(2rem, 9.4vw, 2.8rem); }
  .menu-sub { display: none; }
  .game-grid { gap: 9px; }
  .game-card {
    grid-template-columns: 44px minmax(0, 1fr) 14px;
    grid-template-rows: 1fr auto;
    min-height: 118px;
    padding: 14px 13px;
    border-radius: 16px;
    column-gap: 10px;
    row-gap: 6px;
  }
  .card-icon-wrap { width: 44px; height: 44px; border-radius: 13px; }
  .card-icon { width: 29px; height: 29px; }
  .card-title { font-size: 1.1rem; letter-spacing: .08em; }
  .card-desc { font-size: 9px; letter-spacing: 0; }
  .card-meta { font-size: 7.5px; gap: 6px; }
  .card-no { display: none; }
  .card-arrow { font-size: 13px; }
  .menu-foot { margin-top: 12px; font-size: 7px; }
  .back-up { bottom: calc(8px + var(--safe-bottom)); }

  .page-dots { right: 12px; gap: 12px; }
  .page-dot { width: 6px; height: 6px; }

  .game-head { gap: 10px; padding: 12px 14px 10px; }
  .game-back { padding: 7px 10px; font-size: 9px; }
  .game-heading { flex: 1; }
  .game-title { font-size: 1.15rem; }
  .game-eyebrow { display: none; }
  .game-hud { gap: 5px; }
  .hud-chip { padding: 5px 8px; gap: 4px; }
  .hud-label { font-size: 6px; letter-spacing: .12em; }
  .hud-value { font-size: 13px; }
  .game-foot { padding: 8px 14px calc(8px + var(--safe-bottom)); font-size: 7.5px; gap: 8px; }
  .game-foot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .game-quit { font-size: 7.5px; white-space: nowrap; }

  .memory-grid { gap: 7px; width: min(440px, 100%); }
  .memory-glyph { font-size: clamp(1.7rem, 9vw, 2.5rem); }
  .moon-board { width: min(88vw, 62vh, 100%); }
  .merge-board { width: min(86vw, 62vh, 100%); }
  .overlay-stats { gap: 22px; margin: 16px 0 20px; }
  .overlay-stat span:last-child { font-size: 22px; }
  .overlay-mark { width: 44px; height: 44px; }
}

/* 窄屏改为单列，完整呈现每张花笺的说明，不再截断。 */
@media (max-width: 560px) {
  .menu-page {
    align-items: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .orb-wrap { width: clamp(74px, 21vw, 82px); top: max(8.4vh, 66px); right: -6px; }
  .menu-inner { max-height: none; }
  .menu-head { margin-bottom: 12px; }
  .menu-title { font-size: clamp(2rem, 10.5vw, 2.55rem); }
  .game-grid { grid-template-columns: 1fr; gap: 9px; width: min(440px, 100%); }
  .game-card {
    min-height: 88px;
    padding: 11px 14px;
    grid-template-columns: 46px minmax(0, 1fr) 14px;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 3px;
  }
  .card-icon-wrap { width: 46px; height: 46px; border-radius: 13px; }
  .card-icon { width: 28px; height: 28px; }
  .card-title { font-size: 1.12rem; }
  .card-desc {
    margin-top: 2px;
    font-size: 9.5px;
    line-height: 1.5;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .card-meta { font-size: 7.5px; }
  .menu-foot { margin-top: 10px; }
}

@media (max-width: 560px) and (max-height: 620px) {
  .menu-page { align-items: flex-start; }
}

/* 手机横屏：压缩游戏棋盘，避免只露出一半。 */
@media (max-height: 560px) and (orientation: landscape) {
  .game-head { padding: 8px 14px 7px; }
  .game-eyebrow { display: none; }
  .game-title { font-size: 1.05rem; }
  .game-foot { padding: 5px 14px calc(5px + var(--safe-bottom)); }
  .game-overlay { overflow-y: auto; padding: 14px; }
  .memory-stage { padding: 6px; }
  .memory-grid { width: min(440px, 72vh, 100%); gap: 6px; }
  .memory-glyph { font-size: clamp(1.25rem, 4.2vh, 1.9rem); }
  .moon-board { width: min(360px, 70vh, 88vw); }
  .merge-board { width: min(340px, 70vh, 88vw); }
}

html[data-theme="day"] .clock-sec { color: var(--accent-deep); font-weight: 500; }

@media (max-height: 700px) and (min-width: 681px) {
  .menu-head { margin-bottom: 12px; }
  .menu-title { font-size: clamp(2rem, 3.8vw, 3rem); }
  .menu-sub { display: none; }
  .game-card { min-height: 112px; padding: 15px 18px; }
  .card-icon-wrap { width: 48px; height: 48px; border-radius: 14px; }
  .card-icon { width: 31px; height: 31px; }
  .game-grid { gap: 10px; }
  .menu-foot { margin-top: 10px; }
  .clock-hm { font-size: clamp(4.4rem, 15vw, 9.5rem); }
}

@media (max-height: 620px) and (max-width: 680px) {
  .menu-page { padding-top: 52px; padding-bottom: 42px; }
  .menu-title { font-size: 1.7rem; }
  .menu-head { margin-bottom: 8px; }
  .menu-head .kicker { margin-bottom: 6px; }
  .game-card { min-height: 82px; padding: 9px 12px; }
  .card-desc { display: none; }
  .card-meta { display: none; }
  .menu-foot { display: none; }
  .time-page { padding-top: 54px; padding-bottom: 46px; }
  .clock-hm { font-size: clamp(3.6rem, 20vw, 7rem); }
  .poem { display: none; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .menu-page { padding-top: 56px; padding-bottom: 40px; }
  .menu-head { display: none; }
  .game-card { min-height: 92px; }
  .game-grid { width: min(760px, 92vw); }
  .time-page { padding-top: 50px; }
  .clock-hm { font-size: clamp(3.5rem, 15vw, 7rem); }
  .poem { display: none; }
  .scroll-cue { bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .enso, .orb-glow, .card-arrow, .scroll-cue { animation: none !important; }
}
