:root { color-scheme: dark; font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: #fff5df; background: #102444; }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.landscape, .landscape img, .shade, canvas { position: fixed; inset: 0; width: 100%; height: 100%; }
.landscape img { object-fit: cover; object-position: center; }
.shade { pointer-events: none; background: linear-gradient(180deg, rgb(5 17 39 / 30%), transparent 28%, transparent 65%, rgb(5 15 32 / 72%)); }
canvas { touch-action: none; cursor: grab; }
canvas.holding { cursor: grabbing; }
header { position: fixed; inset: calc(24px + env(safe-area-inset-top)) calc(32px + env(safe-area-inset-right)) auto calc(32px + env(safe-area-inset-left)); display: flex; align-items: start; justify-content: space-between; gap: 20px; pointer-events: none; }
header a, header button { pointer-events: auto; }
.heading { position: absolute; top: 66px; left: 0; }
.heading p { margin: 0 0 9px; color: #d5dddf; font-size: 11px; letter-spacing: .22em; }
h1 { margin: 0; font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", serif; font-size: 46px; letter-spacing: .08em; font-weight: 600; text-shadow: 0 3px 18px #102444; }
.back { color: #eee8db; text-decoration: none; font-size: 13px; padding: 11px 0; }
button { min-height: 46px; padding: 0 21px; border: 1px solid rgb(242 231 211 / 30%); border-radius: 28px; background: rgb(16 36 60 / 75%); color: inherit; font: inherit; font-size: 14px; cursor: pointer; touch-action: manipulation; backdrop-filter: blur(12px); }
button:disabled { opacity: .6; cursor: wait; }
button:hover { background: rgb(42 62 84 / 90%); }
button:focus-visible, a:focus-visible { outline: 3px solid #ffd794; outline-offset: 5px; }
.sound { font-size: 12px; min-height: 40px; padding: 0 16px; }
.sound[aria-pressed="true"] { color: #c7cdd2; }
.sound-controls { position: relative; display: flex; align-items: flex-start; gap: 8px; }
.sound-controls { pointer-events: none; }
.sound-controls button { pointer-events: auto; }
#voice { max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-menu { position: absolute; top: calc(100% + 9px); right: 0; z-index: 20; display: grid; gap: 3px; width: 218px; padding: 9px; border: 1px solid rgb(242 231 211 / 22%); border-radius: 18px; background: rgb(11 27 47 / 94%); box-shadow: 0 18px 42px rgb(3 10 22 / 55%); pointer-events: auto; }
.voice-menu button { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-height: 38px; padding: 0 11px; border: 1px solid transparent; border-radius: 12px; background: transparent; font-size: 13px; text-align: left; }
.voice-menu button:hover { background: rgb(255 255 255 / 9%); }
.voice-menu button[aria-checked="true"] { border-color: #efc18a; color: #ffe0ab; }
.voice-menu small { color: #c6d0d5; font-size: 10px; white-space: nowrap; }
.invitation { position: fixed; left: 20px; right: 20px; top: 70%; margin: 0; text-align: center; font-size: 17px; letter-spacing: .12em; pointer-events: none; text-shadow: 0 2px 12px #102444; transition: opacity .5s; }
.invitation span { display: block; margin-top: 10px; font-size: 11px; letter-spacing: .06em; color: #d1dbe0; }
.invitation.dismissed { opacity: 0; }
.dock { position: fixed; width: min(410px, calc(100% - 40px)); left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); }
.readings { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin: 0 12px 17px; }
.readings p { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.readings span { font-size: 11px; color: #dee2df; }
.readings strong { color: #ffe0ab; font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.buttons { display: flex; justify-content: center; gap: 10px; }
.buttons button { flex: 1; white-space: nowrap; }
.buttons .primary { background: #efc18a; border-color: #efc18a; color: #1b2b3a; font-weight: 600; }
.primary:hover { background: #ffdaa7; }
.primary span { display: inline-block; font-size: 21px; margin-right: 5px; vertical-align: -1px; }
#motion[aria-pressed="true"] { border-color: #efc18a; color: #ffe0ab; }
.status { margin: 13px -6px 0; color: #c6d0d5; font-size: 10px; text-align: center; min-height: 16px; line-height: 1.6; }
.disclaimer { margin: 1px -6px 0; color: #9fb0ba; font-size: 10px; letter-spacing: .18em; text-align: center; }
.unlock { position: fixed; top: 27%; left: 50%; transform: translateX(-50%); white-space: nowrap; background: #efc18a; color: #172c42; }
.no-script { position: fixed; top: 42%; left: 10%; right: 10%; text-align: center; }
@media (max-width: 600px) {
  header { inset: calc(16px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) auto calc(20px + env(safe-area-inset-left)); }
  .heading { top: 62px; }
  h1 { font-size: 37px; }
  .heading p { font-size: 10px; }
  .invitation { top: 66%; font-size: 15px; }
  .dock { bottom: calc(18px + env(safe-area-inset-bottom)); }
  .readings { margin-bottom: 14px; }
  .buttons button { padding: 0 14px; }
}
@media (max-height: 500px) {
  .heading { top: 43px; }
  h1 { font-size: 28px; }
  .heading p, .invitation { display: none; }
  .dock { width: 340px; bottom: calc(8px + env(safe-area-inset-bottom)); }
  .readings { margin-bottom: 6px; }
  .readings strong { font-size: 20px; }
  .status { margin-top: 5px; }
  button { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
