html, body { margin: 0; height: 100%; background: #bfe1ee; color: #4a3a2e; overflow: hidden;
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  -webkit-user-select: none; user-select: none; touch-action: none; -webkit-touch-callout: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: env(safe-area-inset-top) 16px calc(env(safe-area-inset-bottom) + 16px); text-align: center; }
.screen[hidden] { display: none; }

#title { background: rgba(253, 246, 232, 0.55); }
.card { background: #fffaf0; border: 3px solid #5b4536; border-radius: 28px; padding: 22px 32px 26px; max-width: 420px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: 0 6px 0 rgba(91, 69, 54, 0.25); }
h1 { margin: 0; font-size: clamp(30px, 6vw, 48px); font-weight: 800; letter-spacing: 0.01em; color: #5b4536; }
.card p { margin: 0; font-size: 16px; line-height: 1.4; color: #6b5646; }
button.big { font: inherit; font-weight: 700; font-size: 20px; padding: 12px 44px; border: 3px solid #5b4536; border-radius: 99px;
  background: #f7c96c; color: #4a3a2e; cursor: pointer; box-shadow: 0 4px 0 #5b4536; }
button.big:active { transform: translateY(3px); box-shadow: 0 1px 0 #5b4536; }

#ui { position: fixed; top: calc(env(safe-area-inset-top) + 10px); right: calc(env(safe-area-inset-right) + 10px); display: flex; gap: 10px; }
#ui[hidden] { display: none; }
button.icon { width: 46px; height: 46px; border-radius: 50%; border: 3px solid #5b4536; background: #fffaf0; padding: 0;
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 3px 0 rgba(91, 69, 54, 0.35); }
button.icon:active { transform: translateY(2px); box-shadow: none; }
button.icon svg { width: 24px; height: 24px; fill: none; stroke: #5b4536; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#sound .cross { display: none; }
#sound.off .cross { display: inline; }
#sound.off .wave { display: none; }

#rotate { display: none; background: #fdf6e8; z-index: 50; }
#rotate svg { fill: none; stroke: #5b4536; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
#rotate p { font-size: 18px; font-weight: 700; margin: 0; }
@media (orientation: portrait) and (max-width: 600px) { #rotate { display: flex; } }

#errline { position: fixed; left: 0; right: 0; top: 0; z-index: 99999; background: #a00; color: #fff;
  font: 12px/1.3 monospace; padding: 4px 8px; white-space: pre-wrap; pointer-events: none; }
