@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');

:root { color-scheme: light; }
* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  background: linear-gradient(#c7efff, #f8fcff 60%, #dcefc7);
  color: #41332d;
  font-family: Fredoka, ui-rounded, "Arial Rounded MT Bold", sans-serif;
}
main { width: min(100%, 1060px); padding: 18px; }
#game-shell {
  position: relative;
  overflow: hidden;
  border: 8px solid #fffdf5;
  border-radius: 28px;
  box-shadow: 0 12px 0 #96b27c, 0 19px 35px #50705b55;
  background: #bcecff;
}
canvas { display: block; width: 100%; height: auto; }
.screen { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; background: #416b5375; transition: opacity .2s; }
.screen { overflow-y: auto; }
.screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.sound-controls { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.secondary { background: #526e51; box-shadow: 0 3px 0 #354b36; font-family: inherit; }
#song-button { display: block; margin: 15px auto 0; font-size: .95rem; }
#song-panel { margin-top: 16px; }
#song-player iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; }
.song-credit { font-size: .8rem; margin: 8px 0 0; }
.song-credit a { color: #526e51; }
.card { margin: auto; }
button:focus-visible, a:focus-visible { outline: 3px solid #8b572b; outline-offset: 5px; }
.card { width: min(100%, 510px); padding: 28px 30px 25px; text-align: center; border: 5px solid #fff; border-radius: 28px; background: #fff9e9; box-shadow: 0 8px 0 #c6875a; }
h1 { margin: 4px 0 9px; color: #a14332; font-size: clamp(2rem, 5vw, 3.25rem); line-height: .95; }
p { margin: 0 0 20px; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.tio-icon, .gift { font-size: 64px; line-height: 1; }
.controls { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; margin: 18px 0 22px; }
.controls span { padding: 8px 10px; border-radius: 12px; background: #dcefc7; font-size: .95rem; }
.controls b { display: inline-grid; place-items: center; min-width: 25px; height: 25px; margin-right: 4px; border-radius: 6px; background: #fff; box-shadow: 0 2px 0 #9bad88; }
button { cursor: pointer; padding: 13px 20px; border: 0; border-radius: 15px; background: #e86848; box-shadow: 0 5px 0 #a94333; color: #fff; font: 600 1.05rem inherit; }
button:active { transform: translateY(4px); box-shadow: 0 1px 0 #a94333; }
.help { margin: 18px 0 0; text-align: center; color: #4c6b51; font-weight: 600; }
@media (max-width: 560px) { main { padding: 8px; } #game-shell { border-width: 4px; border-radius: 18px; } .card { padding: 21px 16px; } .help { font-size: .86rem; } }
