:root {
  color-scheme: light;
  color: #2a2328;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; }
[hidden] { display: none !important; }
main { max-width: 450px; margin: auto; padding: 4px 12px calc(8px + env(safe-area-inset-bottom)); }
button {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: #f3f4f6;
  color: inherit;
  font: inherit;
  font-size: 13px;
  touch-action: manipulation;
}
button:disabled { opacity: .45; }
button:focus-visible { outline: 2px solid #aa4269; outline-offset: 2px; }
.partner { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.partner img { width: 48px; height: 48px; object-fit: contain; flex: none; }
.partner strong { font-size: 12px; }
.partner p { margin: 3px 0; font-size: 13px; line-height: 1.45; }
.hud { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; }
#time { margin-left: auto; font-variant-numeric: tabular-nums; }
.arena {
  position: relative;
  height: min(calc(100svh - 212px - env(safe-area-inset-bottom)), 560px);
  min-height: 280px;
  overflow: hidden;
  border-radius: 8px;
  background: #faf6f0;
}
canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.panel { position: absolute; inset: 0; padding: 28px 8px; background: #fff; text-align: center; }
.panel h1 { margin: 0 0 16px; font-size: 20px; line-height: 1.4; }
.panel p { margin: 12px 0; font-size: 14px; line-height: 1.65; white-space: pre-line; }
.panel #extra { color: #6e626a; font-size: 12px; }
.panel #record { color: #6e626a; font-size: 12px; margin: 20px 0 8px; }
.panel button { display: block; width: min(100%, 280px); margin: 12px auto 0; min-height: 48px; font-weight: 700; }
.bottom { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; }
.bottom span { flex: 1; font-variant-numeric: tabular-nums; }
main:not([data-view="playing"]) .hud,
main:not([data-view="playing"]) .bottom,
main:not([data-view="playing"]) canvas { display: none; }
main:not([data-view="playing"]) .arena { height: auto; min-height: 0; background: #fff; border-radius: 0; }
main:not([data-view="playing"]) .panel { position: static; }
main[data-view="paused"] #record { display: none; }
#saveNote { margin: 6px 0; color: #8a354c; font-size: 12px; }
.game-sound-toggle { width: 44px; min-width: 44px; }
.game-sound-toggle .material-icons { font-size: 0; }
.game-sound-toggle:after { content: '音♪'; font-size: 12px; }
.game-sound-toggle[aria-pressed="false"]:after { content: '音×'; }
