:root { color-scheme: light; font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif; background: #f3f3ef; color: #292d29; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid #626e52; outline-offset: 3px; }
.game-page { height: 100dvh; overflow: hidden; }
.game-shell { width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.game-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-inline: 24px; min-height: 56px; flex-shrink: 0; border-bottom: 1px solid #d4d7cc; }
.game-toolbar a, .game-toolbar button { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; text-decoration: none; }
.game-toolbar button { border: 0; background: transparent; color: #626e52; }
.game-toolbar h1 { margin: 0; font-size: 14px; font-weight: 500; }
.game-toolbar h1 span { margin-left: 10px; font-size: 11px; font-weight: 400; color: #62675f; }
.game-tip { margin: 0; padding: 8px 24px; font-size: 11px; line-height: 1.7; color: #62675f; flex-shrink: 0; }
.game-tip a { white-space: nowrap; }
.game-stage { position: relative; flex: 1; min-height: 0; background: #21332f; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.game-page:fullscreen .game-toolbar, .game-page:fullscreen .game-tip { display: none; }
iframe { display: block; width: 100%; height: 100%; border: 0; }
.game-runtime { width: 100vw; height: 100dvh; overflow: hidden; background: #21332f; touch-action: none; }
#canvas { display: block; margin: 0; padding: 0; border: 0; outline: none; }
.loading { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: #f3f3ef; text-align: center; }
.loading[hidden] { display: none; }
.loading-name { font-size: 30px; letter-spacing: .1em; margin: 0 0 16px; }
#loading-message { max-width: 420px; font-size: 13px; line-height: 1.9; }
progress { width: min(260px, 80vw); height: 5px; margin: 16px 0; accent-color: #626e52; }
#retry { margin-top: 20px; font-size: 13px; }
@media (max-width: 639px) {
  .game-toolbar { gap: 10px; padding-inline: 14px; min-height: 50px; }
  .game-toolbar h1 span { display: none; }
  .game-tip { padding: 6px 14px; font-size: 10px; }
}
@media (max-width: 639px) and (orientation: portrait) {
  .game-shell {
    position: fixed; top: 0; left: 0;
    width: 100dvh; height: 100dvw;
    transform-origin: top left;
    transform: translateX(100dvw) rotate(90deg);
  }
  .game-toolbar { min-height: 44px; padding-inline: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-bottom)); }
  .game-tip { display: none; }
  .game-stage { padding: env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left) env(safe-area-inset-top); }
}
@media (max-height: 500px) and (orientation: landscape) {
  .game-toolbar { min-height: 44px; }
  .game-tip { display: none; }
}
