* { box-sizing: border-box; }
.sound-slide-shell { margin: 0; padding: 0; min-height: 100vh; background: #278bd1 url("../images/games/sound-slide/background.webp") center center / cover fixed no-repeat; font-family: "Trebuchet MS", Arial, sans-serif; color: #542506; }
.sound-slide-shell[data-sound-slide-theme="grade4-6"] { background-image: url("../images/games/sound-slide/themes/grade4-6/background.webp"); }
.sound-slide-app { min-height: 100dvh; position: relative; overflow: hidden; padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(12px, env(safe-area-inset-left)); }
.sound-slide-app::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(4, 49, 93, .2), transparent 20%, rgba(13, 51, 30, .12)); }
.sound-slide-header { max-width: 700px; margin: 0 auto; min-height: 70px; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 5px; position: relative; z-index: 2; }
.sound-slide-logo { width: min(100%, 340px); max-height: 94px; object-fit: contain; justify-self: center; filter: drop-shadow(0 5px 3px #66371473); }
.sound-slide-home, .sound-slide-mute, .sound-slide-stars { border: 3px solid #fff9d4; box-shadow: 0 5px 0 #034f91, 0 9px 18px #073a6c72; border-radius: 999px; color: white; background: linear-gradient(#4bd3ff, #066acc); min-width: 58px; min-height: 58px; display: inline-flex; align-items: center; justify-content: center; font-size: 38px; text-decoration: none; cursor: pointer; }
.sound-slide-home:active, .sound-slide-mute:active { transform: translateY(3px); box-shadow: 0 2px 0 #034f91; }
.sound-slide-tools { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sound-slide-mute { font-size: 28px; position: relative; }
.sound-slide-mute input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.sound-slide-mute:has(input:not(:checked)) { filter: grayscale(1); }
.sound-slide-stars { gap: 3px; min-height: 42px; min-width: 72px; font-size: 22px; background: linear-gradient(#375378, #142c56); box-shadow: 0 3px 0 #102441; }
.sound-slide-stars span:first-child { color: #ffe234; text-shadow: 0 1px 2px #a65900; }
.sound-slide-stage { width: min(100%, 600px); margin: 0 auto; padding: 2px 0 0; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; z-index: 1; }
.sound-slide-progress { width: min(88%, 400px); display: flex; align-items: center; gap: 12px; color: white; text-shadow: 0 2px 3px #284c53; font-weight: 900; font-size: 19px; white-space: nowrap; }
.sound-slide-progress-track { flex: 1; height: 15px; overflow: hidden; border: 2px solid #fff9d4; border-radius: 20px; background: #2d6071a8; box-shadow: 0 2px 8px #043e50; }
.sound-slide-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(#fff89c, #ffc825); transition: width .4s ease; }
.sound-slide-picture-card { width: min(86vw, 350px); height: clamp(145px, 24dvh, 235px); position: relative; display: flex; justify-content: center; align-items: center; border: 7px solid #fffae5; border-radius: 36px; background: radial-gradient(circle at 50% 35%, #f8ffffed, #99e9fbe8 70%, #4ab9dbea); box-shadow: 0 9px 0 #7b521b, 0 14px 28px #203d4e80, inset 0 0 22px #ffffff; }
.sound-slide-picture-card img { max-width: 93%; max-height: 96%; object-fit: contain; filter: drop-shadow(0 12px 8px #6a5b3f40); user-select: none; }
.sound-slide-picture-card.is-celebrating img { animation: sound-slide-image .9s ease-in-out 2; }
.sound-slide-picture-card[data-animation="jump"].is-celebrating img { animation-name: sound-slide-jump; }
.sound-slide-picture-card[data-animation="wiggle"].is-celebrating img { animation-name: sound-slide-wiggle; }
.sound-slide-picture-card[data-animation="pulse"].is-celebrating img { animation-name: sound-slide-pulse; }
.sound-slide-replay { position: absolute; right: -12px; bottom: -12px; min-width: 76px; min-height: 76px; border-radius: 50%; border: 5px solid white; background: linear-gradient(#4de0ff, #0074e9); color: white; font-size: 33px; box-shadow: 0 5px 0 #0c4e92, 0 9px 18px #18537b8f; cursor: pointer; }
.sound-slide-replay:active { transform: scale(.94); }
.sound-slide-board { width: 100%; position: relative; padding: 14px 9px 11px; border: 5px solid #a76126; border-radius: 28px; background: linear-gradient(110deg, #a75722, #dc9b52 18%, #b46b32 48%, #e0a25a 79%, #915020); box-shadow: inset 0 4px 0 #ffcf8a, inset 0 -7px 0 #75401c, 0 9px 20px #2f351f91; text-align: center; }
.sound-slide-board h1 { display: inline-block; margin: -27px auto 12px; padding: 6px 26px 8px; border: 3px solid #e8ab67; border-radius: 18px; background: linear-gradient(#ffd893, #dc8f45); box-shadow: 0 4px 0 #8e4a21; font-size: clamp(22px, 5vw, 31px); line-height: 1.1; }
.sound-slide-slots { width: 100%; display: grid; grid-template-columns: repeat(var(--slot-count), minmax(0, 1fr)); gap: clamp(2px, .55vw, 5px); }
.sound-slide-slot { width: 100%; min-width: 0; height: clamp(54px, 14vw, 76px); display: flex; align-items: center; justify-content: center; padding: 0; border: 4px dashed #d0a481; border-radius: 17px; background: linear-gradient(#fff8eb, #f5d6b9); font-family: inherit; font-size: clamp(26px, 7vw, 42px); color: #086ab8; font-weight: 1000; text-shadow: 0 2px white; box-shadow: inset 0 2px 7px #957a5b45; }
.sound-slide-slot.is-given { border-style: solid; border-color: #f8e2b6; background: #fff7e1; }
.sound-slide-slot.is-filled { border-style: solid; border-color: #8be6ff; background: linear-gradient(#ffffff, #c9f6ff); animation: sound-slide-snap .35s ease-out; }
.sound-slide-slot.is-active, .sound-slide-slot.is-hint { border-color: #fff571; box-shadow: 0 0 0 5px #ffef7066, inset 0 2px 7px #957a5b45; }
.sound-slide-tile:focus-visible, .sound-slide-next:focus-visible { outline: 4px solid #fff571; outline-offset: 4px; }
.sound-slide-slot.is-sounding { transform: translateY(-6px) scale(1.06); background: #ffef83; }
.sound-slide-slots.is-blending .sound-slide-slot { box-shadow: 0 0 20px #ffe54d, inset 0 0 12px white; }
.sound-slide-blend { position: absolute; height: 7px; bottom: 7px; left: 12%; right: 12%; border-radius: 999px; background: linear-gradient(90deg, transparent, #fff95f, #ffffff, #fff95f, transparent); opacity: 0; transform: scaleX(0); transform-origin: left; }
.sound-slide-board.is-blending .sound-slide-blend { opacity: 1; transform: scaleX(1); transition: transform .4s ease-out; }
.sound-slide-choices { width: 100%; display: flex; justify-content: center; align-content: center; flex-wrap: wrap; column-gap: 6px; row-gap: 9px; margin-top: 8px; }
.sound-slide-app[data-phase="ROUND_CELEBRATION"] .sound-slide-choices { display: none; }
.sound-slide-tile { width: clamp(60px, 16vw, 76px); height: clamp(60px, 16vw, 76px); border: 0; padding: 0; background: transparent; position: relative; cursor: pointer; touch-action: none; filter: drop-shadow(0 8px 5px #4e3b2577); transition: transform .16s ease, opacity .2s ease; }
.sound-slide-tile img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.sound-slide-tile span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border: 4px solid #f8e5ff; border-radius: 22px; background: linear-gradient(#f6c5ff, #a959ef); color: #622bb2; font-size: clamp(26px, 7vw, 40px); font-weight: 1000; text-shadow: 0 2px white; }
.sound-slide-tile:active, .sound-slide-tile.is-speaking { transform: scale(1.09); filter: drop-shadow(0 0 13px #fff375); }
.sound-slide-tile.is-shaking { animation: sound-slide-shake .34s ease; }
.sound-slide-tile.is-hint { animation: sound-slide-hint 1s ease-in-out infinite; }
.sound-slide-tile.is-used { opacity: .18; pointer-events: none; transform: scale(.7); }
.sound-slide-flying-tile { position: fixed; z-index: 20; pointer-events: none; padding: 0; border: 0; background: transparent; }
.sound-slide-flying-tile img, .sound-slide-flying-tile span { width: 100%; height: 100%; object-fit: contain; }
.sound-slide-sparkles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sound-slide-sparkles span { position: absolute; top: 48%; left: 48%; color: #fff72f; font-size: 28px; text-shadow: 0 0 12px white, 0 2px #ef9e20; animation: sound-slide-sparkle 1s ease-out both; }
.sound-slide-owl-wrap { position: fixed; left: max(4px, calc(50vw - 480px)); bottom: max(6px, env(safe-area-inset-bottom)); width: clamp(74px, 15vw, 125px); pointer-events: none; filter: drop-shadow(0 12px 9px #093c4a75); animation: sound-slide-float 3s ease-in-out infinite; z-index: 3; }
.sound-slide-shell[data-sound-slide-theme="grade4-6"] .sound-slide-owl-wrap { width: clamp(150px, 38vw, 180px); }
.sound-slide-owl-wrap img { width: 100%; display: block; }
.sound-slide-owl-wrap.is-happy { animation: sound-slide-snap .45s ease; }
.sound-slide-owl-wrap.is-thinking { animation: sound-slide-wiggle .45s ease; }
.sound-slide-owl-wrap.is-helping { transform: rotate(-8deg); }
.sound-slide-owl-wrap.is-celebrating { animation: sound-slide-jump .7s ease-in-out 2; }
.sound-slide-feedback { min-height: 24px; text-align: center; color: #fff; font-size: 20px; font-weight: 900; text-shadow: 0 2px 4px #345422; }
.sound-slide-round-stars { font-size: 38px; color: #ffe23e; text-shadow: 0 3px #b57714, 0 0 13px white; letter-spacing: 5px; animation: sound-slide-snap .5s ease; }
.sound-slide-next { min-width: 170px; min-height: 58px; border: 4px solid #f7ffc6; border-radius: 999px; color: white; background: linear-gradient(#88e928, #1fb713); box-shadow: 0 6px 0 #237019, 0 12px 18px #1a461f77; font-size: 28px; font-weight: 1000; cursor: pointer; }
.sound-slide-next:not([hidden]) { animation: sound-slide-next-enter .42s ease-out both, sound-slide-next-breathe 1.6s ease-in-out .42s infinite; }
.sound-slide-next:active { transform: translateY(3px); box-shadow: 0 3px 0 #237019; }
.sound-slide-message, .sound-slide-session-celebrate { position: absolute; z-index: 5; inset: 85px 10px 10px; max-width: 600px; margin: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; text-align: center; border: 7px solid #fff8cd; border-radius: 36px; background: linear-gradient(#fffdf2f5, #a2e8fff0); box-shadow: 0 12px 40px #123c648c; padding: 20px; }
.sound-slide-message img { width: min(55%, 190px); }
.sound-slide-message h2, .sound-slide-session-celebrate h2 { font-size: clamp(23px, 6vw, 35px); margin: 0; }
.sound-slide-message-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: min(100%, 320px); }
.sound-slide-message-primary, .sound-slide-message-secondary { box-sizing: border-box; width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 999px; font-size: clamp(18px, 4vw, 22px); font-weight: 900; line-height: 1.15; text-align: center; cursor: pointer; }
.sound-slide-message-primary { border: 3px solid #dff5ff; background: linear-gradient(#24a9f4, #087dcc); color: white; box-shadow: 0 5px 0 #07548b, 0 8px 14px #123c6438; font-family: inherit; }
.sound-slide-message-primary:active { transform: translateY(2px); box-shadow: 0 3px 0 #07548b; }
.sound-slide-message-secondary { border: 3px solid #9bdcff; background: #ffffffd9; color: #075b8f; text-decoration: none; box-shadow: 0 3px 0 #68b9e6; }
.sound-slide-message-primary:focus-visible, .sound-slide-message-secondary:focus-visible { outline: 4px solid #ffd84d; outline-offset: 3px; }
.sound-slide-session-owl { width: min(55%, 220px); animation: sound-slide-jump .8s ease-in-out infinite; }
#soundSlideSessionStars { color: #ffd026; font-size: 38px; font-weight: 1000; text-shadow: 0 3px #ad6816; }
.sound-slide-completed-images { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; }
.sound-slide-completed-images img { width: clamp(54px, 14vw, 86px); height: clamp(54px, 14vw, 86px); object-fit: contain; }
[hidden] { display: none !important; }
@keyframes sound-slide-snap { 0% { transform: scale(.7); } 60% { transform: scale(1.16); } 100% { transform: scale(1); } }
@keyframes sound-slide-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-7px) rotate(-5deg); } 75% { transform: translateX(7px) rotate(5deg); } }
@keyframes sound-slide-hint { 50% { filter: drop-shadow(0 0 16px #ffff82); } }
@keyframes sound-slide-float { 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes sound-slide-image { 50% { transform: translateY(-10px) scale(1.06); } }
@keyframes sound-slide-jump { 45% { transform: translateY(-24px) rotate(5deg) scale(1.08); } }
@keyframes sound-slide-wiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes sound-slide-pulse { 50% { transform: scale(1.14); filter: drop-shadow(0 0 17px #fff88e); } }
@keyframes sound-slide-sparkle { 100% { transform: rotate(var(--angle)) translateX(120px) scale(.4); opacity: 0; } }
@keyframes sound-slide-next-enter { from { opacity: .4; transform: translateY(12px) scale(.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes sound-slide-next-breathe { 50% { box-shadow: 0 6px 0 #237019, 0 0 30px 9px #f7ff8caa, 0 12px 24px #1a461f99; filter: brightness(1.12) saturate(1.12); } }
@media (max-width: 420px) { .sound-slide-header { grid-template-columns: 55px minmax(0, 1fr) 58px; min-height: 68px; } .sound-slide-logo { max-height: 68px; } .sound-slide-home, .sound-slide-mute { min-width: 50px; min-height: 50px; } .sound-slide-tools { gap: 3px; } .sound-slide-stars { min-height: 34px; min-width: 56px; font-size: 18px; } .sound-slide-stage { gap: 6px; } .sound-slide-board { padding-inline: 6px; } .sound-slide-picture-card { height: clamp(140px, 20dvh, 180px); } .sound-slide-replay { min-width: 57px; min-height: 57px; font-size: 26px; } .sound-slide-owl-wrap { width: 92px; } }
@media (max-width: 420px) { .sound-slide-shell[data-sound-slide-theme="grade4-6"] .sound-slide-owl-wrap { left: 8px; } }
@media (max-height: 800px) { .sound-slide-picture-card { height: 145px; } .sound-slide-header { min-height: 60px; } .sound-slide-stage { gap: 5px; } .sound-slide-board { padding-top: 11px; padding-bottom: 8px; } .sound-slide-board h1 { margin-bottom: 7px; } }
.sound-slide-app[data-length="long"] .sound-slide-picture-card { height: min(16dvh, 125px); }
.sound-slide-app[data-length="long"] .sound-slide-stage { gap: 4px; }
.sound-slide-app[data-length="long"] .sound-slide-board { padding-top: 8px; padding-bottom: 6px; }
.sound-slide-app[data-length="long"] .sound-slide-board h1 { margin-bottom: 5px; }
.sound-slide-app[data-length="long"] .sound-slide-slot { height: clamp(46px, 12vw, 56px); font-size: clamp(18px, 4.8vw, 32px); border-width: 3px; border-radius: 11px; }
.sound-slide-app[data-length="long"] .sound-slide-choices { column-gap: 4px; row-gap: 8px; margin-top: 3px; }
.sound-slide-app[data-length="long"] .sound-slide-tile { width: clamp(52px, 13vw, 64px); height: clamp(52px, 13vw, 64px); }
.sound-slide-app[data-length="long"] .sound-slide-feedback { min-height: 14px; }
.sound-slide-app[data-length="long"] .sound-slide-round-stars { font-size: 30px; }
.sound-slide-app[data-length="long"] .sound-slide-next { min-height: 50px; }
@media (max-width: 420px) {
  .sound-slide-app[data-length="long"] .sound-slide-picture-card { height: 106px; }
  .sound-slide-app[data-length="long"] .sound-slide-slot { height: 45px; font-size: clamp(17px, 4.7vw, 22px); border-width: 2px; border-radius: 8px; }
  .sound-slide-app[data-length="long"] .sound-slide-tile { width: 52px; height: 52px; }
  .sound-slide-app[data-length="long"] .sound-slide-replay { min-width: 48px; min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .sound-slide-next:not([hidden]) { animation: none; } }
