/* The app is a viewport, not a document. Menus own their scrolling. */
@font-face{font-family:FoldumiSerif;src:url('/assets/fonts/NimbusRoman-Regular.otf') format('opentype');font-display:swap}
.app-home .home-tagline{margin-left:clamp(50px,16vw,76px)}
#board-stage{flex:1;min-height:0;display:grid;place-items:center}#board-stage .board-wrap{flex:none;max-width:100%;max-height:100%}
html,body{height:100%;overscroll-behavior:none}body{overflow:hidden;-webkit-tap-highlight-color:transparent}button,svg,.app-home{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}button,a{touch-action:manipulation}button{transition:transform .16s,background .2s;appearance:none;-webkit-appearance:none}button:active:not(:disabled){transform:scale(.96)}#app{height:100%;height:100dvh;overflow:hidden;background:var(--paper)}
.shell{height:100%;max-width:560px;display:flex;flex-direction:column;padding: max(12px,env(safe-area-inset-top)) 22px max(10px,env(safe-area-inset-bottom));gap:8px}.shell>header{height:46px;flex-shrink:0;gap:12px}.shell>header .brand{margin-right:auto}.brand .game-brand-lockup{width:108px}.shell>header #daily,.shell>header #sound{display:none}.shell>main{margin:0;display:flex;flex:1;min-height:0;flex-direction:column}.level-header{align-items:center;padding:10px 2px}.level-header h1{font-size:24px;margin-top:3px}.eyebrow{font-size:10px;letter-spacing:1.5px}.hearts{gap:7px;padding:0}.hearts svg{width:20px;height:22px}.board-wrap{flex:1;min-height:0;aspect-ratio:auto;max-height:none;max-width:none;width:100%;margin:0}.board-wrap #board{position:absolute;inset:0;overflow:visible}.board-meta{margin:9px 0;font-size:11px}.progress-track{flex-shrink:0}.message{min-height:36px;margin:12px 0 0;font-size:12px;line-height:1.5}.tools{flex-shrink:0;margin:4px 0 0;padding:10px 0 2px;border-top:1px solid var(--line);gap:10px}.tools button{border-radius:18px;background:var(--soft);min-height:62px;font-size:10px;gap:7px}.tools button svg{height:22px;width:22px}.shell>footer{margin:0;justify-content:center;font-size:10px;min-height:22px}.shell>footer #saved{display:none}.shell>.app-extras{display:none}
.app-home{height:100%;max-width:560px;margin:auto;display:flex;flex-direction:column;padding:max(20px,env(safe-area-inset-top)) 24px 0;animation:screen-in .3s ease}.home-top{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;height:40px;font-size:10px;letter-spacing:1.7px;color:var(--muted)}.home-top button{border:0;background:none;padding:8px;letter-spacing:0}.home-center{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px}.home-logo{width:clamp(180px,57vw,250px);height:auto}.dark .home-logo{filter:invert(1)}.home-tagline{font-family:FoldumiSerif,Georgia,'Times New Roman',serif;font-size:18px;color:var(--muted);margin:0}.home-preview{width:min(42vw,170px);height:min(42vw,170px);margin:12px 0 0;position:relative;border-radius:50%;background:var(--soft);overflow:hidden}.home-preview svg{height:100%;width:100%;padding:20px}.home-preview .line{stroke-width:8}.home-preview .joint{stroke-width:4}.home-level{margin:2px 0 0;font-size:12px;color:var(--muted);letter-spacing:.3px}.home-level strong{color:var(--ink)}.home-actions{width:100%;padding:12px 0 20px;flex-shrink:0}.home-play{width:100%;border-radius:24px;min-height:60px;font-size:18px;display:flex;align-items:center;justify-content:center;gap:16px}.home-play svg{width:18px;height:18px}.home-daily{margin:12px 0 0;display:flex;align-items:center;text-align:left;gap:14px;width:100%;border-radius:20px;padding:15px 18px;background:var(--soft);border:0}.home-daily>span{flex:1}.home-daily strong{font-size:14px;font-weight:500;display:block}.home-daily small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.home-daily>svg{width:22px;height:22px}.home-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;border-top:1px solid var(--line);padding:12px 0 max(14px,env(safe-area-inset-bottom));flex-shrink:0}.home-tabs button{display:flex;flex-direction:column;align-items:center;gap:7px;border:0;padding:8px 2px;font-size:10px;color:var(--muted);background:none}.home-tabs button:first-child{color:var(--ink)}.home-tabs button svg{width:22px;height:22px}
dialog{border:0;box-shadow:0 22px 100px #0002;border-radius:28px;padding:24px;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 30px);overscroll-behavior:contain;animation:sheet-in .24s ease-out}dialog::backdrop{background:#0005;backdrop-filter:blur(7px)}.dialog-head h2{font-weight:550;font-size:23px}.setting button{font-size:12px;border-radius:40px;min-width:64px}.wide{min-height:50px;border-radius:17px}.result-icon{margin:0 auto;width:86px;height:86px;display:grid;place-items:center;border-radius:50%;background:var(--soft)}.result-icon svg{height:45px;width:45px}.result h3{font-size:28px}.result-stats{gap:28px;margin:22px 0}.result-time{font-size:40px}.sound-test{display:flex;gap:10px;align-items:center;margin-top:16px}.sound-test button{flex-shrink:0}.sound-status{font-size:12px;line-height:1.5;color:var(--muted)}.support-copy{font-size:12px;color:var(--muted);line-height:1.7}.support-copy a{color:inherit}.clear-confetti{height:0;position:relative;pointer-events:none}.clear-confetti i{position:absolute;left:50%;top:80px;width:4px;height:10px;background:var(--ink);border-radius:2px;animation:confetti .85s ease-out both;animation-delay:var(--delay);opacity:0}.board-wrap.bump{animation:blocked-shake .28s}.hearts.pulse{animation:heart-pulse .3s}.shell.entering .board-wrap{animation:screen-in .3s ease-out}.hinge.hint span{animation:hinge-pulse 1.3s ease-in-out infinite}
@keyframes sheet-in{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}@keyframes screen-in{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}@keyframes blocked-shake{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}@keyframes heart-pulse{50%{transform:scale(.9)}}@keyframes hinge-pulse{50%{box-shadow:0 0 0 7px var(--paper),0 0 0 9px var(--line)}}@keyframes confetti{10%{opacity:.7}to{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--spin))}}
@media(max-height:700px){.home-preview{width:100px;height:100px;margin:0}.home-center{gap:8px}.home-logo{width:190px}.home-actions{padding:8px 0 12px}.home-daily{padding:10px 16px}.home-play{min-height:50px}.home-tabs{padding-top:6px}.shell{gap:3px;padding-top:max(5px,env(safe-area-inset-top))}.level-header{padding:2px}.shell>header{height:40px}.message{margin-top:5px;min-height:32px}.tools button{min-height:50px}.tools{padding-top:6px}.level-header h1{font-size:21px}}
@media(orientation:landscape) and (max-height:550px){body{overflow:auto}#app{min-height:640px;height:640px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}body.reduced *,body.reduced *::before,body.reduced *::after{animation:none!important;transition:none!important}
