:root { color-scheme: light; color: #222; background: #fff; font-family: 'Comic Sans MS', 'Chalkboard SE', cursive; }
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overscroll-behavior: none; overflow: hidden; -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
button { color: inherit; font: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 2px dashed #777; outline-offset: 6px; }
.game { display: flex; flex-direction: column; align-items: center; width: 100%; height: 100%; height: 100dvh; padding: max(18px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom)); }
.logo { flex: 0 0 auto; width: clamp(205px, 25vw, 285px); max-width: 70vw; margin: 0; padding: 0; border: 0; background: transparent; color: #161616; }
.logo svg { display: block; width: 100%; height: auto; overflow: visible; }
.stage { --bubble-space: 18px; flex: 1 1 auto; min-height: 0; position: relative; width: min(100%, 760px); max-height: 690px; }
#oliver { display: block; width: 100%; height: 100%; background: transparent; border: 0; outline: none; touch-action: none; }
.milk { position: absolute; z-index: 2; right: 12%; bottom: 16px; width: clamp(72px, 14vw, 100px); padding: 0; border: 0; background: transparent; transform-origin: 50% 15%; }
.milk svg { display: block; width: 100%; height: auto; overflow: visible; }
.milk:not(:disabled):hover { transform: rotate(-7deg); }
.milk:disabled { cursor: default; }
.milk-label { position: absolute; top: 45%; left: 20%; width: 60%; max-height: 34%; overflow: hidden; padding: 2px; background: #fffdf5; border: 1px solid #d2c7ad; border-radius: 3px; color: #3d6880; font-size: clamp(10px, 2vw, 14px); font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; transform: rotate(-3deg); }
.milk-liquid { transform-box: view-box; transform-origin: 50px 127px; transform: scaleY(var(--milk-fill, 1)); }
.speech { position: absolute; z-index: 1; top: 16px; left: 50%; width: 224px; padding: 15px 20px; pointer-events: none; }
.speech-outline { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.speech-outline path { fill: #fff; stroke: #282622; stroke-width: 2; stroke-linejoin: round; }
.speech p { position: relative; margin: 0; text-align: center; font-size: 18px; font-weight: 600; line-height: 1.3; }
.game-footer { flex: 0 0 auto; display: flex; justify-content: center; width: 100%; margin-top: 8px; font-family: ui-sans-serif, system-ui, sans-serif; }
#restart { padding: 8px 16px; font-size: 12px; border: 0; background: transparent; color: #888; }
#restart:hover { color: #111; }
.loading, .load-error { position: absolute; left: 0; right: 0; top: 50%; text-align: center; font-family: system-ui, sans-serif; font-size: 13px; color: #777; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 740px) {
  .milk { right: 1%; }
  .game { padding-top: max(13px, env(safe-area-inset-top)); }
  .logo { width: 218px; }
  .stage { --bubble-space: 105px; }
  .speech { width: min(252px, 92%); padding: 13px 20px; }
  .speech p { font-size: 17px; }
}
@media (max-height: 500px) and (min-width: 601px) {
  .game { padding-top: 4px; padding-bottom: 4px; }
  .logo { width: 165px; }
  .stage { --bubble-space: 18px; }
  .speech { width: 185px; padding: 12px 18px; }
  .speech p { font-size: 15px; }
  .game-footer { margin-top: 0; }
}

