@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');
@font-face{font-family:'Fredoka';font-style:normal;font-weight:600;font-display:swap;src:url('assets/fredoka-semibold.ttf') format('truetype')}
:root{--ink:#403334;--secondary:#736464;--muted:#7b6e69;--accent:#a83e57;--paper:#f7f4ee;--surface:#fffcf7;--line:#e4dbd2;--curve:cubic-bezier(.22,1,.36,1)}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:400 16px/24px 'Manrope',sans-serif;min-height:100svh}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:4px}button{transition:background-color .3s var(--curve),transform .3s var(--curve),opacity .3s var(--curve)}button:active:not(:disabled){transform:translateY(1px)}.defs{position:absolute;width:0;height:0;overflow:hidden}.ui-icon,.icon-btn svg,.tool-art svg,.trail-number svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.skip-link{position:absolute;top:-80px;left:16px;padding:12px;background:var(--surface);z-index:10}.skip-link:focus{top:8px}.landscape{position:fixed;inset:0;z-index:-1;pointer-events:none;background:var(--paper) url('assets/candy-land.png') center bottom/cover no-repeat}.landscape:after{content:'';position:absolute;inset:0;background:var(--paper);opacity:.4}
header{height:80px;max-width:1280px;padding:0 32px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{display:flex;align-items:center;gap:4px;color:var(--ink);text-decoration:none;font-size:24px;line-height:32px;font-weight:700;letter-spacing:-1px;white-space:nowrap}.brand svg{width:40px;height:40px}.brand-dot{color:var(--accent)}.header-note{font-size:14px;color:var(--secondary)}.top-actions{display:flex;align-items:center;gap:8px}.icon-btn{height:44px;min-width:44px;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--surface);display:flex;align-items:center;justify-content:center;gap:4px}.icon-btn span{font-size:12px;line-height:16px}.icon-btn[aria-pressed=false] svg{opacity:.6}.icon-btn:hover{background:#eee7df}#mobile-map{display:none}
main{display:grid;grid-template-columns:minmax(180px,1fr) minmax(360px,480px) minmax(180px,1fr);align-items:center;gap:48px;max-width:1280px;padding:24px 32px;margin:auto}.eyebrow{font-size:12px;line-height:16px;font-weight:600;color:var(--secondary);letter-spacing:0}h1,h2,h3,p{margin:0;text-wrap:pretty}h1,h2,h3{text-wrap:balance}h1{font-size:36px;line-height:40px;letter-spacing:-1px;font-weight:600;margin:16px 0 24px}.journal p{font-size:14px;line-height:24px;color:var(--secondary)}.mascot{width:160px;text-align:center;margin-top:32px}.mascot svg{width:144px;height:136px}.mascot span{display:block;font-size:12px;line-height:16px;color:var(--secondary);margin-top:8px}.text-btn{display:flex;align-items:center;gap:8px;border:0;background:none;padding:16px 0;font-size:14px;font-weight:600}.text-btn svg{width:20px;height:20px}.level-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.level-heading .eyebrow{color:var(--accent)}h2{font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.5px}.level-heading h2{margin-top:4px}.level-steps{display:flex;gap:4px;flex-shrink:0}.level-step{width:8px;height:8px;background:#ddd4cc;border-radius:50%}.level-step.complete{background:var(--accent)}.level-step.current{background:var(--accent);outline:1px solid var(--accent);outline-offset:3px;margin:0 4px}
.game-panel{padding:16px 12px 12px;background:var(--surface);border:1px solid var(--line);border-radius:24px;box-shadow:0 4px 0 #e4dbd2;position:relative}.stats{display:flex;align-items:center;gap:16px;padding:0 4px 16px}.move-stat{width:80px;flex-shrink:0;text-align:center;padding:8px;border:1px solid #edd8da;background:#faeef0;border-radius:12px}.stat-label{display:block;font-size:12px;line-height:16px;color:var(--secondary);font-weight:500}.move-stat strong{display:block;font-size:36px;line-height:40px;color:var(--accent);font-weight:700;font-variant-numeric:tabular-nums}.score-stat{flex:1;min-width:0}.score-stat>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:8px}#score{font-size:20px;line-height:28px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}#score small{font-size:12px;line-height:16px;color:var(--secondary);font-weight:400}.progress{height:8px;border-radius:4px;background:#ebe3db;position:relative;margin:12px 8px 8px 0}.progress>div{height:100%;background:var(--accent);border-radius:4px;transform:scaleX(0);transform-origin:left;transition:transform .3s var(--curve)}.target-star{position:absolute;right:-8px;top:-6px;width:20px;height:20px;fill:#edc977;stroke:#a77829;stroke-width:1.4}.score-caption{font-size:12px;line-height:16px;color:var(--secondary)}.goals{display:none;gap:16px;padding:0 4px;margin-bottom:12px}.goals.active{display:flex}.goal{display:flex;align-items:center;gap:4px;font-size:12px;line-height:16px;font-variant-numeric:tabular-nums}.goal svg{width:24px;height:24px}.frost-icon{width:20px;height:20px;background:#e3d9ed;border:2px solid #c9b5d5;box-shadow:inset 0 0 0 2px white;border-radius:4px}
.board-wrap{position:relative}#board{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;padding:4px;background:#e4d9cf;border:4px solid #e4d9cf;border-radius:16px;aspect-ratio:1;touch-action:none;user-select:none}.tile{padding:0;aspect-ratio:1;border:0;border-radius:8px;background:#f1e8df;position:relative;display:grid;place-items:center;min-width:0;touch-action:none}.tile:nth-child(even){background:#f9f2ea}.tile:disabled{opacity:1}.tile svg{width:100%;height:100%;pointer-events:none;filter:drop-shadow(0 2px 0 #40333418)}.tile.selected{background:#f6d4b6;outline:2px solid #a83e57;outline-offset:-2px;transform:scale(.94)}.tile.hint{animation:hint .7s var(--curve) 3}.tile.frost{background:#e3d9ed;box-shadow:inset 0 0 0 3px #ffffffb0}.tile.clearing{animation:pop .24s var(--curve) forwards}.tile.fresh svg{animation:drop .25s var(--curve)}.special{position:absolute;inset:0;pointer-events:none;display:grid;place-items:center;border-radius:8px}.special.row:after,.special.col:after{content:'';position:absolute;width:72%;height:5px;background:#fff8d8;border:1px solid #b89070;border-radius:4px;transform:rotate(-12deg)}.special.col:after{transform:rotate(78deg)}.special.rainbow{background:#fff4d3;inset:12%;border:3px dashed #a83e57;border-radius:50%;box-shadow:inset 0 0 0 3px #b6d3b1}.special.rainbow:after{content:'';width:44%;height:44%;border:3px solid #a995cb;border-radius:50%}#combo{position:absolute;left:50%;top:43%;transform:translate(-50%,-50%);font-size:24px;line-height:32px;font-weight:700;color:var(--accent);background:#fffcf7ef;padding:8px 16px;border-radius:12px;white-space:nowrap;pointer-events:none;opacity:0;z-index:4}#combo.show{animation:combo .9s var(--curve)}
.tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-top:12px}.tool{border:1px solid var(--line);border-radius:12px;background:#f8f4ed;display:flex;align-items:center;flex-direction:column;font-size:12px;line-height:16px;font-weight:600;gap:4px;padding:12px 4px 8px;min-height:96px}.tool-art{display:grid;place-items:center;color:var(--ink);height:28px}.tool-art svg{width:28px;height:28px}.tool small{font-size:12px;line-height:16px;font-weight:400;color:var(--secondary)}.tool.active{border-color:var(--accent);background:#faeef0;color:var(--accent)}.tool.active .tool-art{color:var(--accent)}.under-board{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-top:12px;min-height:48px;font-size:12px;line-height:20px;color:var(--secondary)}#status{padding:8px 0}#restart{display:flex;align-items:center;gap:4px;padding:8px 0 8px 8px;min-height:44px;border:0;background:none;font-size:12px;line-height:20px;white-space:nowrap}#restart svg{width:20px;height:20px}
.trail h3{font-size:24px;line-height:32px;font-weight:600;margin:12px 0 24px;letter-spacing:-.5px}.trail-item{border:0;background:none;text-align:left;padding:8px 0;display:flex;align-items:center;gap:12px;position:relative;width:100%;min-height:64px}.trail-item:disabled{opacity:1;color:var(--secondary)}.trail-item:after{content:'';position:absolute;top:52px;left:19px;height:24px;border-left:2px dashed #ddd1c7}.trail-item:last-child:after{display:none}.trail-number{width:40px;height:40px;border-radius:12px;background:#eee7df;border:1px solid var(--line);display:grid;place-items:center;font-size:16px;line-height:24px;font-weight:600;flex-shrink:0}.trail-number svg{width:18px;height:18px}.current .trail-number{background:var(--accent);color:white;border-color:var(--accent);box-shadow:0 3px 0 #792b3d}.trail-text{font-size:12px;line-height:16px;font-weight:600}.trail-text small{display:flex;align-items:center;gap:4px;font-size:12px;line-height:16px;color:var(--secondary);font-weight:400;margin-top:4px}.current .trail-text small{color:var(--accent)}.trail-stars svg{width:14px;height:14px;fill:#e7c27a;stroke:#a77829;stroke-width:1.5}.trail-stars svg.empty{fill:none;stroke:#a89989}.trail-footer{display:flex;gap:8px;margin-top:24px;padding:16px 0}.trail-footer svg{width:20px;height:20px;color:#987330}.trail-footer p{font-size:12px;line-height:20px;color:var(--secondary)}footer{max-width:1280px;margin:0 auto;padding:16px 32px 24px;display:flex;justify-content:space-between;gap:16px;font-size:12px;line-height:16px;color:var(--secondary)}
dialog{border:1px solid var(--line);border-radius:24px;background:var(--surface);color:var(--ink);width:min(92vw,440px);max-height:88svh;padding:32px 24px;text-align:center;box-shadow:0 16px 64px #40333420}dialog::backdrop{background:#30282866;backdrop-filter:blur(4px)}.modal-close{position:absolute;right:8px;top:8px;background:none;border:0;display:grid;place-items:center;width:44px;height:44px}dialog h2{margin:12px 0 16px}dialog p{font-size:14px;line-height:24px;color:var(--secondary)}dialog .modal-candy{height:80px;width:80px}dialog .stars{display:flex;justify-content:center;gap:8px;margin:16px 0}dialog .stars svg{width:40px;height:40px;fill:#edc977;stroke:#a77829;stroke-width:1.3}dialog .stars svg.empty{fill:none;stroke:#aa9c8f}.primary{border:1px solid #8c2f45;background:var(--accent);color:white;padding:12px 24px;border-radius:12px;font-size:16px;line-height:24px;font-weight:600;margin-top:16px;min-height:48px;box-shadow:0 3px 0 #792b3d}.secondary{border:1px solid var(--line);background:#f3eee6;border-radius:12px;padding:12px 24px;font-size:14px;line-height:20px;min-height:44px;margin-top:16px}.help-lines{text-align:left;display:grid;gap:16px;font-size:14px;line-height:24px}.help-lines b{color:var(--accent)}.result-stats{background:#f1eae2;padding:16px;border-radius:12px;margin:16px 0;font-size:14px;line-height:24px;font-variant-numeric:tabular-nums}.modal-map{margin-top:16px}.modal-map .trail-item:after{display:none}.modal-map .trail-text{font-size:14px;line-height:20px}body.hammer-mode .tile{cursor:crosshair}body.hammer-mode #board{outline:3px solid var(--accent);outline-offset:3px}
@media(hover:hover){.tile:hover{background:#fffaf5}.tool:hover:not(:disabled){background:#eee6db}.trail-item:hover:not(:disabled) .trail-number{border-color:var(--accent)}.primary:hover{background:#92334a}.secondary:hover{background:#eae1d6}}
@keyframes pop{to{transform:scale(.15) rotate(20deg);opacity:0}}@keyframes drop{from{transform:translateY(-16px);opacity:.4}to{transform:translateY(0);opacity:1}}@keyframes hint{50%{transform:scale(.88);background:#f6d4b6}}@keyframes combo{0%{opacity:0;transform:translate(-50%,0) scale(.9)}20%,70%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-80%)}}
@media(max-width:1100px){main{gap:32px;grid-template-columns:minmax(180px,1fr) minmax(340px,480px);max-width:960px}.trail{display:none}#mobile-map{display:flex}.header-note{display:none}}
@media(max-width:700px){header{height:64px;padding:0 16px;gap:8px}.brand{font-size:20px;line-height:28px;letter-spacing:-.5px}.brand svg{width:32px;height:32px}.top-actions{gap:4px}.icon-btn{height:44px;min-width:44px;border:0;background:none;padding:8px}.icon-btn span{display:none}main{display:block;padding:12px 12px 0;max-width:480px}.journal,.trail{display:none}.level-heading{padding:0 4px;margin-bottom:16px}.level-heading h2{font-size:20px;line-height:28px;margin-top:4px}.level-steps{gap:4px}.level-step{width:6px;height:6px}.game-panel{padding:12px 8px 8px;border-radius:24px}.stats{gap:12px;padding:0 4px 12px}.move-stat{width:72px;padding:4px 8px}.move-stat strong{font-size:30px;line-height:36px}.score-caption{font-size:12px;line-height:16px}#score{font-size:18px;line-height:28px}#board{gap:4px;padding:4px;border:0;border-radius:16px}.tile{border-radius:8px}.tools{gap:8px;padding-top:8px}.tool{padding:8px 4px;min-height:88px;gap:4px}.tool-art{height:24px}.tool-art svg{width:24px;height:24px}.under-board{padding:0 4px;margin-top:8px}.goals{gap:12px;margin-bottom:8px}footer{max-width:480px;padding:8px 16px max(16px,env(safe-area-inset-bottom));margin:auto;justify-content:center}footer>span:first-child{display:none}dialog{padding:32px 24px}.modal-map .trail-item{min-height:64px}}
@media(max-width:360px){header{padding:0 8px}.brand{font-size:18px}.brand svg{width:28px}.top-actions{gap:0}main{padding:8px 8px 0}.level-steps{display:none}.stats{gap:8px}.score-stat>div:first-child{gap:4px}.score-caption{display:none}.tools{gap:4px}.tool{font-size:12px}.under-board{gap:8px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
/* Keep boosters within reach on compact phones, including 320px screens. */
@media(max-height:700px) and (max-width:700px){header{height:56px}main{padding-top:8px}.level-heading{margin-bottom:8px}.game-panel{padding-top:8px}.stats{padding-bottom:8px}.move-stat strong{font-size:24px;line-height:32px}.tool{min-height:80px;padding-top:8px}.under-board{min-height:44px}footer{padding-top:0}}

@media(max-height:600px) and (max-width:360px){.tool{gap:2px;padding:4px;min-height:72px}}
/* Start screen and the winding level trail. */
[hidden]{display:none!important}body[data-screen="home"] footer{display:none}body[data-screen="home"] #mobile-map{display:none}body[data-screen="game"] #mobile-map{display:flex}body[data-screen="home"] .landscape:after{opacity:.26}.start-screen{max-width:1080px;margin:auto;padding:24px 32px 48px;display:grid;grid-template-columns:1fr minmax(320px,440px);gap:80px;align-items:start}.start-intro{position:sticky;top:24px;display:flex;flex-direction:column;align-items:center;text-align:center;padding-top:40px}.start-intro h1{font-size:48px;line-height:1;margin:12px 0 8px;letter-spacing:-1.5px}.start-mascot{width:240px;height:256px;overflow:visible}.start-intro p{font-size:14px;line-height:24px;color:var(--ink);margin-top:8px}.start-intro .primary{display:flex;align-items:center;justify-content:center;gap:16px;min-width:208px;margin-top:24px}.start-star-total{display:flex;align-items:center;gap:8px;font-size:12px;line-height:16px;color:var(--ink);margin-top:24px}.start-star-total svg{height:20px;width:20px;fill:#edc977;stroke:#9c722c;stroke-width:1.5}.trail-map-panel{background:#fffcf7ed;border:1px solid #e4dbd2;border-radius:24px;padding:24px 16px 0;box-shadow:0 4px 0 #4033340d}.map-heading{text-align:center}.map-heading h2{font-size:20px;line-height:28px}.map-heading p{font-size:12px;line-height:20px;color:var(--secondary);margin-top:4px}.home-trail{position:relative;height:780px;width:100%;margin:16px auto 0;max-width:400px}.trail-track{position:absolute;inset:0;width:100%;height:100%;overflow:visible;fill:none;stroke-linecap:round;stroke-linejoin:round}.track-edge{stroke:#e4d9cc;stroke-width:28}.track-road{stroke:#f0e5d5;stroke-width:22}.track-dashes{stroke:#c7b49e;stroke-width:2;stroke-dasharray:3 9}.track-progress{stroke:#b5697d;stroke-width:5;stroke-dasharray:2 9}.map-stop{position:absolute;transform:translateX(-50%);width:148px;display:flex;flex-direction:column;align-items:center;gap:4px;padding:0;border:0;background:none;line-height:20px;isolation:isolate}.map-stop:active:not(:disabled){transform:translateX(-50%) translateY(2px)}.map-stop:disabled{opacity:1;cursor:default}.stop-disc{position:relative;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;border:3px solid #fffcf7;background:#c3b8ab;color:#fff;font-size:24px;line-height:32px;font-weight:700;box-shadow:0 4px 0 #a79989,0 0 0 1px #d9cbbc}.stop-disc>svg{width:22px;height:22px;fill:none;stroke:#fffcf7;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.map-stop:not(:disabled) .stop-disc{background:#a83e57;box-shadow:0 4px 0 #792b3d,0 0 0 1px #c9a6a7}.map-stop.current .stop-disc{outline:2px solid #a83e57;outline-offset:4px}.map-stop.completed .stop-disc{background:#916444;box-shadow:0 4px 0 #68452e}.stop-name{font-size:12px;line-height:16px;font-weight:600;background:#fffcf7f2;padding:4px 4px 0;border-radius:4px}.map-stop small{font-size:12px;line-height:16px;color:var(--secondary);background:#fffcf7ef;padding:0 4px;border-radius:4px}.map-stop.current small{color:var(--accent)}.map-stop .trail-stars{display:flex;gap:4px;background:#fffcf7ed;border-radius:4px}.crown-mark{position:absolute;right:-8px;top:-12px;color:#a77828}.crown-mark svg{height:24px;width:24px;fill:#edc977;stroke:currentColor;stroke-width:1.5}.mascot svg{width:160px;height:172px}.start-screen:not([hidden]){animation:screen-in .5s var(--curve)}#game-screen:not([hidden]){animation:screen-in .45s var(--curve)}
/* Candy motion stays inside a clipped board; effects sit above it. */
#board{overflow:hidden}.tile>.candy{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;will-change:transform}.candy>svg{width:100%;height:100%}.tile.matched{background:#f8dfb8;box-shadow:inset 0 0 0 2px #d5aa62}.tile.special-created{animation:special-made .7s var(--curve)}.tile.fresh svg{animation-duration:.75s;animation-timing-function:var(--curve)}#effects{position:absolute;inset:0;pointer-events:none;z-index:3;overflow:visible}.candy-particle{position:absolute;width:7px;height:7px;border-radius:2px;pointer-events:none}.line-beam{position:absolute;background:#fff0b9;border:2px solid #d5a347;border-radius:8px;box-shadow:0 0 0 5px #fffaf2a6;pointer-events:none}.line-beam.row{height:12px;left:0;right:0;margin-top:-6px;transform-origin:center}.line-beam.col{width:12px;top:0;bottom:0;margin-left:-6px;transform-origin:center}.special-halo{position:absolute;width:56px;height:56px;border-radius:50%;border:3px solid #d5a347;box-shadow:0 0 0 6px #fff7df99;pointer-events:none}#combo{font-size:20px;line-height:28px;white-space:normal;text-align:center;min-width:160px;max-width:90%;top:40%}#combo.show{animation-duration:1.5s}#hint:disabled small{color:var(--secondary)}
@keyframes screen-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes special-made{0%{transform:scale(.75)}55%{transform:scale(1.06)}100%{transform:scale(1)}}
@media(max-width:700px){.start-screen{display:flex;flex-direction:column;gap:24px;padding:8px 12px 32px;max-width:480px}.start-intro{position:static;padding:0;width:100%;display:grid;grid-template-columns:1fr 116px;text-align:left;align-items:center;column-gap:8px}.start-intro .eyebrow{grid-column:1;grid-row:1}.start-intro h1{grid-column:1;grid-row:2;font-size:30px;line-height:36px;margin:4px 0 8px;letter-spacing:-.5px}.start-mascot{grid-column:2;grid-row:1/4;width:116px;height:144px}.start-intro p{grid-column:1;grid-row:3;font-size:12px;line-height:20px;margin:0}.start-intro p br{display:none}.start-intro .primary{grid-column:1/3;width:100%;margin-top:16px;min-height:48px}.start-star-total{grid-column:1/3;justify-self:center;margin-top:16px}.trail-map-panel{width:100%;padding:16px 8px 0}.map-heading h2{font-size:18px;line-height:28px}.home-trail{margin-top:12px}.map-stop{width:132px}.stop-disc{width:56px;height:56px}.mascot svg{width:144px;height:156px}#combo{font-size:18px;line-height:28px;padding:8px 12px}.special-halo{width:44px;height:44px}}
@media(prefers-reduced-motion:reduce){.start-screen:not([hidden]),#game-screen:not([hidden]),.tile.special-created{animation:none}.tile>.candy{will-change:auto}}

/* Rounded display lettering for the candy world; small controls stay readable. */
.start-intro h1,.brand,.level-heading h2,.map-heading h2,.trail h3,dialog h2,#combo,.stop-disc{font-family:'Fredoka','Manrope',sans-serif;font-weight:600;letter-spacing:0}
.start-intro h1{letter-spacing:0;line-height:1.05}.start-intro .primary{font-family:'Fredoka','Manrope',sans-serif;font-size:20px;line-height:28px;letter-spacing:.2px}
@media(max-width:700px){.start-intro h1{font-size:30px;line-height:36px}}
/* Berry plays the tune: separate body, fingers, feet, and floating notes. */
.berry-character{overflow:visible}.berry-character .berry-body{transform-origin:140px 254px;animation:berry-sway 4s var(--curve) infinite}.berry-character .berry-leaves{transform-origin:145px 62px;animation:berry-leaf 4s var(--curve) infinite}.berry-character .berry-eye{transform-origin:113px 112px;animation:berry-blink 5.6s var(--curve) infinite}.berry-character .berry-strum{transform-origin:159px 207px;animation:berry-strum 3.2s var(--curve) infinite}.berry-character .berry-foot-right{transform-origin:180px 258px;animation:berry-tap 3.2s var(--curve) infinite}.berry-character .berry-shadow{transform-origin:142px 282px;animation:berry-shadow 4s var(--curve) infinite}.berry-character .berry-note{opacity:.45}.music-playing .berry-character .berry-strum{animation-duration:1.12s}.music-playing .berry-character .berry-foot-right{animation-duration:1.12s}.music-playing .berry-character .berry-note{animation:berry-note 3.36s var(--curve) infinite}.music-playing .berry-character .note-two{animation-delay:1.68s}.page-hidden .berry-character *,[hidden] .berry-character *{animation-play-state:paused!important}
@keyframes berry-sway{0%,100%{transform:translateY(0) rotate(-1.5deg)}50%{transform:translateY(-3px) rotate(1.5deg)}}@keyframes berry-leaf{0%,100%{transform:rotate(-2deg)}50%{transform:rotate(2deg)}}@keyframes berry-blink{0%,90%,97%,100%{transform:scaleY(1)}94%{transform:scaleY(.08)}}@keyframes berry-strum{0%,40%,100%{transform:translate(0,0) rotate(-5deg)}18%,60%{transform:translate(-7px,9px) rotate(14deg)}78%{transform:translate(1px,-2px) rotate(-9deg)}}@keyframes berry-tap{0%,55%,100%{transform:rotate(0)}25%{transform:rotate(-9deg) translateY(-2px)}}@keyframes berry-shadow{0%,100%{transform:scaleX(1);opacity:.14}50%{transform:scaleX(.94);opacity:.1}}@keyframes berry-note{0%{transform:translate(0,5px) rotate(-5deg);opacity:0}22%,55%{opacity:.8}100%{transform:translate(5px,-24px) rotate(12deg);opacity:0}}
.sound-mascot{width:152px;height:164px;display:block;margin:0 auto 8px}.sound-choices{display:flex;flex-direction:column;gap:12px;margin-top:24px}.sound-choices .primary,.sound-choices .secondary{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin:0}.sound-note{display:block;font-size:12px;line-height:20px;color:var(--secondary);margin-top:16px}dialog:has(.sound-choices){padding-top:24px}dialog:has(.sound-choices) h2{margin:8px 0 12px}dialog[open]{animation:dialog-in .35s var(--curve)}@keyframes dialog-in{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
/* Each booster explains its action with its own board effect. */
.tool.activated{animation:booster-press .8s var(--curve)}@keyframes booster-press{0%,100%{background:#f8f4ed}40%{background:#fae4bc}}
.hint-ring{position:absolute;border:3px solid #bb822d;border-radius:8px;box-shadow:0 0 0 3px #fff9e9d9;transform:translate(-50%,-50%);animation:hint-frame .85s var(--curve) 3;pointer-events:none}.hint-swap{position:absolute;display:grid;place-items:center;width:28px;height:28px;border:1px solid #bb822d;background:#fff9e9;color:#926021;border-radius:8px;transform:translate(-50%,-50%) rotate(var(--angle));box-shadow:0 2px 4px #40333420;animation:hint-arrow .85s var(--curve) 3}.hint-swap svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}@keyframes hint-frame{0%,100%{opacity:.7;transform:translate(-50%,-50%) scale(1)}45%{opacity:1;transform:translate(-50%,-50%) scale(1.08)}}@keyframes hint-arrow{0%,100%{opacity:.75;transform:translate(-50%,-50%) rotate(var(--angle)) scale(.9)}45%{opacity:1;transform:translate(-50%,-50%) rotate(var(--angle)) scale(1.08)}}
.spoon-guide{position:absolute;top:8px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:8px 12px;background:#fffaf2;color:var(--ink);border:1px solid #d6b783;border-radius:12px;font-size:12px;line-height:20px;white-space:nowrap;box-shadow:0 2px 8px #40333418}.spoon-guide svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7}.scoop-spoon{position:absolute;width:56px;height:56px;color:#825735;filter:drop-shadow(0 3px 0 #fffaf2);z-index:2}.scoop-spoon svg{width:100%;height:100%;fill:#f7e5bd;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.scooped-candy{position:absolute;display:block;z-index:1}.scooped-candy svg{width:100%;height:100%}.shuffle-vortex{position:absolute;left:50%;top:50%;display:grid;place-items:center;width:112px;height:112px;background:#fffcf7e8;border:3px dashed #bb822d;border-radius:50%;color:var(--accent);box-shadow:0 0 0 8px #fffcf780;z-index:3}.shuffle-vortex svg{width:48px;height:48px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:360px),(max-height:650px){.sound-mascot{width:112px;height:120px}.sound-choices{margin-top:16px}dialog:has(.sound-choices){padding:24px 16px}.sound-note{margin-top:12px}}
@media(prefers-reduced-motion:reduce){.berry-character *,.hint-ring,.hint-swap,.tool.activated,dialog[open]{animation:none!important}.berry-character .berry-note{opacity:.6}}
/* A detached booster rack, with candy tokens and small inventory badges. */
.tools{position:relative;isolation:isolate;display:flex;justify-content:center;align-items:flex-start;gap:24px;width:min(100%,336px);margin:16px auto 0;padding:8px 12px 0}.tools:before{content:'';position:absolute;z-index:-1;top:32px;left:16px;right:16px;height:32px;border:1px solid #d7c5af;border-radius:999px;background:#eee0cc;box-shadow:0 3px 0 #d4c3ad}.tools .tool{position:relative;flex:0 0 80px;min-width:0;min-height:96px;padding:0 0 4px;gap:12px;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--ink);opacity:1}.tools .tool:hover:not(:disabled),.tools .tool.active{background:transparent}.tools .tool-art{--boost-face:#f3d58e;--boost-edge:#ac803d;--boost-ink:#705021;position:relative;display:grid;place-items:center;width:64px;height:64px;border:2px solid var(--boost-edge);border-radius:50%;color:var(--boost-ink);background:var(--boost-face);box-shadow:inset 0 3px 0 #fff8,0 5px 0 var(--boost-edge),0 7px 0 #40333414;transition:transform .3s var(--curve),background-color .3s var(--curve)}.tools #hammer .tool-art{--boost-face:#f0c2cc;--boost-edge:#a95d72;--boost-ink:#80374c}.tools #shuffle .tool-art{--boost-face:#c4ddca;--boost-edge:#729780;--boost-ink:#3e6c51}.tools .tool-art svg{width:32px;height:32px;stroke-width:1.8}.tools #hint .tool-art>svg{fill:#fff2cb}.tools #hammer .tool-art>svg{fill:#fff1df}.tools .booster-count{position:absolute;right:-5px;top:-6px;display:grid;place-items:center;min-width:24px;height:24px;padding:0 4px;border:2px solid #fffaf2;border-radius:50%;background:var(--accent);color:#fff;font-family:'Fredoka','Manrope',sans-serif;font-size:14px;line-height:20px;font-weight:600;box-shadow:0 2px 0 #792b3d;font-variant-numeric:tabular-nums}.tools .tool-label{font-family:'Fredoka','Manrope',sans-serif;font-size:14px;line-height:20px;font-weight:600;color:var(--ink);white-space:nowrap}.tools .tool.active .tool-art{outline:3px solid var(--accent);outline-offset:4px}.tools .tool[data-empty="true"] .tool-art{filter:grayscale(.9);opacity:.6;box-shadow:inset 0 2px 0 #fff8,0 3px 0 var(--boost-edge)}.tools .tool[data-empty="true"] .booster-count{background:#75665a;box-shadow:none}.tools .tool[data-empty="true"] .tool-label{color:var(--secondary)}.tools .tool.activated{animation:none}.tools .tool.activated .tool-art:after{content:'';position:absolute;inset:-4px;border:2px solid var(--boost-edge);border-radius:50%;animation:booster-token-ring .8s var(--curve) forwards;pointer-events:none}.tools .tool:active:not(:disabled){transform:none}.tools .tool:active:not(:disabled) .tool-art{transform:translateY(3px);box-shadow:inset 0 2px 0 #fff8,0 2px 0 var(--boost-edge)}.under-board{margin-top:4px}
@keyframes booster-token-ring{from{transform:scale(.95);opacity:.8}to{transform:scale(1.4);opacity:0}}
@media(hover:hover){.tools .tool:hover:not(:disabled) .tool-art{background:#fff4d5}.tools #hammer:hover:not(:disabled) .tool-art{background:#f9d6dd}.tools #shuffle:hover:not(:disabled) .tool-art{background:#dbeddf}}
@media(max-width:700px){.tools{gap:24px;max-width:320px;margin-top:12px;padding:8px 8px 0}.tools .tool{min-height:92px}.tools .tool-art{width:60px;height:60px}.tools .tool-art svg{width:32px;height:32px}.tools:before{top:30px;height:32px}}
@media(max-width:360px),(max-height:700px) and (max-width:700px){.tools{gap:16px;margin-top:8px}.tools .tool{min-height:84px;gap:8px;flex-basis:76px}.tools .tool-art{width:56px;height:56px}.tools .tool-art svg{width:28px;height:28px}.tools:before{top:28px;height:28px}.tools .booster-count{height:22px;min-width:22px;right:-4px;top:-4px}.tools .tool-label{font-size:12px;line-height:16px}}
@media(prefers-reduced-motion:reduce){.tools .tool.activated .tool-art:after{animation:none;opacity:0}}
/* Focus belongs to the visible control, not its larger label wrapper. */
button:focus-visible,a:focus-visible{outline-width:2px;outline-offset:3px}#dialog-title:focus{outline:none}.map-stop.current .stop-disc{outline:none;background:var(--accent);border-color:#fffcf7;box-shadow:0 4px 0 #792b3d}.map-stop.current:before{content:'';position:absolute;left:50%;top:-14px;transform:translateX(-50%);width:12px;height:8px;background:var(--accent);clip-path:polygon(0 0,100% 0,50% 100%)}.map-stop:focus-visible,.tools .tool:focus-visible{outline:none}.map-stop:focus-visible .stop-disc:after,.tools .tool:focus-visible .tool-art:before{content:'';position:absolute;inset:-6px;border:2px solid var(--accent);border-radius:50%;pointer-events:none}.tools .tool.active .tool-art{outline:none;border-color:var(--boost-ink);box-shadow:inset 0 0 0 3px #fff9,0 5px 0 var(--boost-edge),0 7px 0 #40333414}.tile:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.primary:focus-visible,.secondary:focus-visible{outline:none;box-shadow:0 0 0 3px var(--surface),0 0 0 5px var(--accent)}
