:root{--ink:#37474f;--muted:#607d8b;--paper:#fff;--bg:#fff8ec;--accent:#5c6bc0;--accent-dark:#283593;--danger:#c62828;--radius:16px;color:var(--ink);background:var(--bg);font-family:ui-rounded,Nunito,Segoe UI,system-ui,sans-serif}*{box-sizing:border-box}html{-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}html,body{overscroll-behavior:none}body{margin:0}.app-header{padding:max(12px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 12px max(24px, env(safe-area-inset-left));background:var(--paper);justify-content:space-between;align-items:center;display:flex;box-shadow:0 2px 8px #00000014}.brand{color:var(--accent-dark);font-size:1.6rem;font-weight:800;text-decoration:none}.app-header nav{gap:12px;display:flex}.app-main{max-width:1200px;margin:0 auto;padding:24px}button,.button{background:var(--accent);color:#fff;min-height:44px;font:inherit;cursor:pointer;border:0;border-radius:999px;justify-content:center;align-items:center;gap:6px;padding:8px 18px;font-weight:700;text-decoration:none;display:inline-flex}button,.button,select,input,label,.fruit-key{touch-action:manipulation}@media (hover:hover) and (pointer:fine){button:hover,.button:hover{background:var(--accent-dark)}}button:active:not(:disabled),.button:active{background:var(--accent-dark)}button:disabled{opacity:.5;cursor:default}button.secondary,.button.secondary{color:var(--accent-dark);background:#e8eaf6}button.danger{color:var(--danger);background:#ffebee}button[aria-pressed=true]{outline:3px solid #ffca28}.panel{background:var(--paper);border-radius:var(--radius);padding:20px;box-shadow:0 2px 10px #0000000f}.alert{background:#fff3e0;border:2px solid #ffb74d;border-radius:12px;padding:12px 16px}.alert.error{background:#ffebee;border-color:#e57373}.toolbar{flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:16px;display:flex}input[type=text],select,textarea{font:inherit;background:#fff;border:2px solid #cfd8dc;border-radius:12px;padding:8px 12px}input,select,textarea{font-size:max(16px,1em)}.song-grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;display:grid}.song-card{flex-direction:column;gap:10px;display:flex}.song-card h3{margin:0}.song-card .actions{flex-wrap:wrap;gap:8px;display:flex}.song-pages{flex-direction:column;align-items:center;gap:24px;display:flex}.page-svg{background:#fff;border-radius:4px;width:100%;max-width:900px;height:auto;box-shadow:0 4px 16px #0000001f}.fruit-keyboard{grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;display:grid}.fruit-key{border-radius:var(--radius);min-width:0;min-height:88px;color:var(--ink);background:#fff;border:3px solid #eceff1;flex-direction:column}@media (hover:hover) and (pointer:fine){.fruit-key:hover{background:#f5f5f5;border-color:#b0bec5}}.fruit-key:active:not(:disabled){background:#f5f5f5;border-color:#b0bec5}.fruit-key svg{width:48px;height:48px}.crash{text-align:center;gap:12px;max-width:600px;margin:80px auto;display:grid}@media print{@page{margin:0}body,.app-main{background:#fff;max-width:none;margin:0;padding:0}.no-print{display:none!important}.song-pages{gap:0}.page-svg{width:100%;max-width:none;box-shadow:none;break-after:page;border-radius:0}}.fruit-strip{width:auto;max-width:100%;height:32px}.muted{color:var(--muted);margin:0}.songbook section{margin-bottom:32px}.editor-controls{gap:12px;margin-bottom:20px;display:grid}.octave-controls{align-items:center;gap:12px;margin-bottom:8px;font-weight:700;display:flex}.hint{color:var(--muted);margin:0;font-size:.9rem}.print-options{margin-bottom:20px}.print-options h1{margin-top:0}.print-options label{align-items:center;gap:6px;font-weight:600;display:inline-flex}.app-editor{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;flex-direction:column;height:100dvh;display:flex;overflow:clip hidden}.app-editor input[type=text],.app-editor textarea{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}.app-editor .app-main{flex:1;width:100%;min-width:0;max-width:none;min-height:0;padding:0;display:flex}.editor{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.editor-topbar{background:var(--paper);border-bottom:1px solid #eceff1;flex:none;margin:0;padding:10px 24px}.editor-topbar input[type=text]{flex:220px;min-width:0}.draft-offer{flex-wrap:wrap;flex:none;align-items:center;gap:10px;margin:10px 24px 0;display:flex}.sheet-scroll{overscroll-behavior:contain;flex:1;justify-content:center;align-items:flex-start;min-height:0;padding:12px 24px;scroll-padding-block:16px;display:flex;overflow-y:auto}.sheet-svg{border-radius:var(--radius);background:#fff;width:100%;max-width:960px;height:auto;box-shadow:0 2px 10px #0000000f}.note-target{cursor:pointer;touch-action:pan-y}.note-target.selected{touch-action:none}@media (hover:hover) and (pointer:fine){.note-target:hover{fill:#5c6bc014}}.gap-target{cursor:text}.playing-halo{transform-box:fill-box;transform-origin:50%}@media (prefers-reduced-motion:no-preference){.playing-halo{animation:.25s ease-out playing-pop}.measure-flash{animation:1.2s ease-out forwards measure-flash}.cursor-blink{animation:1.2s ease-in-out infinite cursor-blink}}@keyframes cursor-blink{50%{opacity:.2}}@keyframes playing-pop{0%{transform:scale(.7)}to{transform:scale(1)}}@keyframes measure-flash{0%{opacity:1}to{opacity:0}}.editor-dock{background:var(--paper);flex:none;gap:8px;min-width:0;padding:10px 24px 14px;display:grid;position:relative;box-shadow:0 -2px 10px #00000014}.dock-row,.fruit-keyboard-wrap{min-width:0}.dock-row{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.dock-row .toolbar{margin:0}.editor-dock .octave-controls{margin-bottom:4px}.editor-dock .fruit-key{min-height:64px}.editor-dock .fruit-key svg{width:36px;height:36px}.playback-controls{align-items:center;gap:10px;display:flex}.play-button{min-width:132px}.tempo{align-items:center;gap:6px;font-size:1.3rem;display:inline-flex}.tempo input{width:110px}.help{margin-left:auto;position:relative}.help-button{width:44px;padding:0;font-size:1.2rem}.help-popover{overscroll-behavior:contain;z-index:10;width:min(420px,90vw);max-height:calc(100dvh - 24px);position:absolute;bottom:calc(100% + 8px);right:0;overflow-y:auto}.help-popover ul{gap:6px;margin:0;padding-left:18px;display:grid}.toast-region{z-index:20;pointer-events:none;width:max-content;max-width:min(640px,92vw);position:absolute;bottom:calc(100% + 8px);left:50%;transform:translate(-50%)}.toast{pointer-events:auto;background:#e8f5e9;border:2px solid #81c784;border-radius:12px;align-items:center;gap:12px;padding:10px 14px;display:flex;box-shadow:0 4px 16px #00000026}.toast.error{background:#ffebee;border-color:#e57373}.sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.editor-topbar,.sheet-scroll,.editor-dock{padding-left:max(24px, env(safe-area-inset-left));padding-right:max(24px, env(safe-area-inset-right))}.editor-dock{padding-bottom:max(14px, env(safe-area-inset-bottom))}@media (width<=800px){.editor-topbar,.editor-dock,.sheet-scroll{padding-left:max(12px, env(safe-area-inset-left));padding-right:max(12px, env(safe-area-inset-right))}.editor-dock .fruit-keyboard{gap:4px}.editor-dock .fruit-key{min-height:52px;padding:4px}.editor-dock .fruit-key svg{width:28px;height:28px}}@media (width<=360px){.editor-dock .fruit-keyboard{grid-template-columns:repeat(4,minmax(0,1fr))}.editor-dock .fruit-key{flex-direction:row;gap:4px;min-height:44px}.editor-dock .fruit-key svg{width:24px;height:24px}}@media (width<=800px),(orientation:landscape) and (height<=500px){.help-popover{top:max(12px, env(safe-area-inset-top));bottom:auto;left:max(12px, env(safe-area-inset-left));right:max(12px, env(safe-area-inset-right));width:auto;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));position:fixed}}@media (width<=600px),(orientation:landscape) and (height<=500px){.editor-dock{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"play help""len len""oct edit""keys keys";gap:6px;padding-top:8px}.editor-dock .dock-row,.editor-dock .fruit-keyboard-wrap{display:contents}.editor-dock .playback-controls{grid-area:play;min-width:0}.editor-dock .help{grid-area:help;justify-self:end;margin:0}.editor-dock .duration-picker{grid-area:len;gap:6px}.editor-dock .edit-actions{flex-wrap:nowrap;grid-area:edit;gap:6px}.editor-dock .duration-picker button{flex:1 0 auto;padding-inline:10px}.editor-dock .edit-actions button{padding-inline:12px}.editor-dock .octave-controls{grid-area:oct;justify-content:space-evenly;gap:6px;margin:0}.editor-dock .fruit-keyboard{grid-area:keys;gap:2px}.play-button{min-width:96px}.tempo{flex:1;min-width:0}.tempo input{touch-action:pan-x;flex:1;width:auto;min-width:60px;height:44px}}@media (width<=600px){.app-header{padding-top:max(4px, env(safe-area-inset-top));padding-bottom:4px;padding-left:max(12px, env(safe-area-inset-left));padding-right:max(12px, env(safe-area-inset-right));gap:8px}.brand{white-space:nowrap;font-size:1.2rem}.app-header nav{flex-wrap:nowrap;gap:6px}.app-header nav .button{white-space:nowrap;padding:4px 12px}.editor-topbar{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding-top:6px;padding-bottom:6px;display:grid}.editor-topbar input[type=text]{grid-column:1/4}.editor-topbar select{grid-column:4}.editor-topbar button{padding-inline:6px}}@media (orientation:landscape) and (height<=500px){.app-header{padding-top:max(4px, env(safe-area-inset-top));padding-bottom:4px}.brand{white-space:nowrap;font-size:1.1rem}.app-header nav{flex-wrap:nowrap}.app-header nav .button{white-space:nowrap;min-height:36px;padding:4px 12px}.editor{grid-template:"top top""offer offer""sheet dock"minmax(0,1fr)/minmax(0,1fr) clamp(296px,42vw,400px);display:grid}.editor-topbar{flex-wrap:nowrap;grid-area:top;gap:6px;padding-top:4px;padding-bottom:4px}.editor-topbar button{flex:none;padding-inline:10px}.draft-offer{grid-area:offer}.sheet-scroll{grid-area:sheet;padding-right:12px}.editor-dock{overscroll-behavior:contain;min-height:0;padding:8px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) 12px;grid-area:dock;align-content:start;overflow-y:auto;box-shadow:-2px 0 10px #00000014}.editor-dock .fruit-keyboard{grid-template-columns:repeat(4,minmax(0,1fr))}.editor-dock .fruit-key{flex-direction:row;gap:4px;min-height:44px}.editor-dock .fruit-key svg{width:24px;height:24px}.toast-region{bottom:max(8px, env(safe-area-inset-bottom));position:fixed}}@media (width<=360px),(orientation:landscape) and (height<=500px) and (width<=952px){.editor-dock .duration-picker,.editor-dock .edit-actions{gap:4px}.editor-dock .duration-picker button,.editor-dock .edit-actions button,.editor-dock .octave-controls{font-size:.9rem}.editor-dock .duration-picker button,.editor-dock .edit-actions button{padding-inline:6px}.editor-dock .edit-actions button{min-width:44px}}@media (orientation:landscape) and (width>=1000px) and (height<=900px) and (pointer:coarse){.editor-dock{grid-template-columns:auto minmax(0,1fr) auto auto auto;grid-template-areas:"play len edit oct help""keys keys keys keys keys";align-items:center;gap:8px;padding-top:8px}.editor-dock .dock-row,.editor-dock .fruit-keyboard-wrap{display:contents}.editor-dock .playback-controls{grid-area:play}.editor-dock .duration-picker{flex-wrap:nowrap;grid-area:len;gap:8px}.editor-dock .edit-actions{flex-wrap:nowrap;grid-area:edit;gap:8px}.editor-dock .duration-picker button,.editor-dock .edit-actions button{flex:none;padding-inline:12px}.editor-dock .octave-controls{grid-area:oct;margin:0}.editor-dock .help{grid-area:help;margin:0}.editor-dock .fruit-keyboard{grid-area:keys}.editor-dock .fruit-key{min-height:56px}}@media print{.app-editor{height:auto;overflow:visible}.sheet-scroll{padding:0;overflow:visible}.sheet-svg{box-shadow:none}}
