:root { color-scheme: dark; --ink: #e9fffa; --muted: #9dc7d4; --coral: #ff8668; --gold: #ffcf70; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; background: #041d30; color: var(--ink); font-family: "Microsoft YaHei", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
.game-header { width: min(1200px, 100%); margin: auto; padding: max(18px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 18px max(24px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { font-weight: 900; font-size: 21px; white-space: nowrap; }
.wordmark > span { color: var(--coral); font-size: 27px; vertical-align: -2px; margin-right: 7px; }
.wordmark small { margin-left: 14px; color: #6d9caa; font-size: 10px; letter-spacing: .18em; }
.account-tools { display: flex; align-items: center; gap: 24px; font-size: 12px; color: var(--muted); }
#player-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-tools a { color: #c5eee5; }
.game-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.dashboard { display: flex; align-items: center; gap: 32px; padding: 15px 25px; background: #0b344a; border: 1px solid #1b5264; border-bottom: 0; border-radius: 20px 20px 0 0; }
.dashboard > div { min-width: 70px; }
.dashboard span { display: block; font-size: 10px; letter-spacing: .1em; color: #9ac6ce; }
.dashboard strong { display: block; margin-top: 2px; font-size: 27px; font-variant-numeric: tabular-nums; }
.dashboard strong small { font-size: 13px; margin-left: 4px; color: var(--muted); }
#score { color: var(--gold); }
.dashboard .time-stat { margin-right: auto; }
.quiet-button { padding: 10px 14px; background: #123e52; color: #d8f6ed; border: 1px solid #386171; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.ocean-stage { position: relative; height: clamp(420px, calc(100dvh - 212px), 760px); overflow: hidden; border: 1px solid #1b5264; border-radius: 0 0 20px 20px; background: #086782; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; }
.sea-label { pointer-events: none; position: absolute; top: 19px; left: 23px; color: #bdece5; font-size: 10px; letter-spacing: .12em; display: flex; align-items: center; gap: 12px; opacity: .8; }
.sea-label span { color: #fff4c4; }
.sea-label i { width: 3px; height: 3px; background: #aadcd5; border-radius: 50%; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; overflow-y: auto; background: #021d38b8; backdrop-filter: blur(8px); }
.panel { width: min(430px, 100%); margin: auto; padding: 30px; text-align: center; border: 1px solid #447988; border-radius: 24px; background: linear-gradient(150deg, #12445b, #082a43); box-shadow: 0 22px 80px #01172777; }
.eyebrow { margin: 0 0 14px; font-size: 9px; color: #85dcd2; letter-spacing: .22em; }
h1 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
#overlay-copy { margin: 13px 0 21px; color: #b5d4d8; font-size: 13px; line-height: 1.8; }
#login-form { display: grid; gap: 14px; text-align: left; }
label { display: grid; gap: 7px; font-size: 12px; color: #d2e8e8; }
input { min-width: 0; width: 100%; padding: 12px; color: white; background: #082b40; border: 1px solid #477584; border-radius: 10px; outline-offset: 2px; }
input::placeholder { color: #90aeb7; font-size: 12px; }
.primary-button, .secondary-button { display: block; width: 100%; padding: 14px 12px; border-radius: 12px; font-size: 14px; font-weight: 800; }
.primary-button { border: 0; color: #3e281b; background: linear-gradient(100deg, #ffd78d, #ffa77e); box-shadow: 0 7px 22px #ffac5530; }
.secondary-button { margin-top: 10px; background: transparent; color: #d2e8e8; border: 1px solid #4a7280; }
.register-link { text-align: center; font-size: 12px; color: #a9e5dd; padding: 5px; }
.panel-note { margin: 19px 0 0; font-size: 10px; line-height: 1.9; color: #8eafb9; }
#login-message { margin: 12px 0; font-size: 12px; color: #ffb5a3; }
.round-summary { margin: 4px 0 22px; color: var(--gold); font-size: 21px; font-weight: bold; }
.game-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 4px max(16px, env(safe-area-inset-bottom)); font-size: 11px; color: #719fac; }
.game-footer p { margin: 0; }.game-footer b { margin-right: 10px; color: #bededc; }
.accessibility-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media(max-width: 620px) {
  .game-header { padding: max(13px, env(safe-area-inset-top)) 14px 13px; }
  .wordmark { font-size: 17px; }.wordmark small { display: none; }
  .account-tools { gap: 12px; font-size: 11px; }#player-name { max-width: 90px; }
  .game-shell { width: calc(100% - 16px); }
  .dashboard { gap: 8px; padding: 12px 10px; border-radius: 14px 14px 0 0; }
  .dashboard > div { min-width: 42px; }.dashboard span { font-size: 9px; }.dashboard strong { font-size: 23px; }
  .quiet-button { font-size: 10px; padding: 10px 8px; }
  .ocean-stage { height: max(440px, calc(100dvh - 180px)); border-radius: 0 0 14px 14px; }
  .sea-label { top: 15px; left: 15px; font-size: 9px; gap: 8px; }
  .panel { padding: 24px 20px; border-radius: 19px; }h1 { font-size: 27px; }
  .game-footer { padding: 13px 4px max(13px, env(safe-area-inset-bottom)); font-size: 10px; }.game-footer > span { display: none; }
}
@media(max-height: 520px) and (orientation: landscape) {
  .game-header { padding-top: 8px; padding-bottom: 8px; }.dashboard { padding: 6px 16px; }
  .dashboard strong { font-size: 20px; }.ocean-stage { height: max(260px, calc(100dvh - 136px)); }
  .panel { padding: 18px; }.panel-note { margin-top: 10px; }h1 { font-size: 24px; }
}
