@font-face{font-family:GardenMusic;src:url('/game-assets/beat-workshop/v2/Bravura.otf') format('opentype');font-display:block}
*{box-sizing:border-box}body{margin:0;min-height:100svh;color:#163f36;background:#34573e url('./garden.webp') center/cover fixed;font:500 1rem/1.45 system-ui,'PingFang TC',sans-serif}body::before{content:'';position:fixed;inset:0;background:linear-gradient(#f8f6de25,#214a2520);z-index:-1}header{display:flex;gap:1rem;align-items:center;padding:.65rem 1.6rem;background:#143e35ef;color:#fff6dc;box-shadow:0 5px 25px #173e3040}header div{flex:1}header strong{font-size:1.15rem}header small{display:block;letter-spacing:.18em;font-size:.6rem}header a{color:#fff6dc;min-height:44px;display:grid;align-items:center}nav{display:flex;gap:.4rem}
button,select{font:inherit;color:#173f35;background:#fff8de;border:1px solid #93a281;border-radius:12px;min-height:44px;padding:.55rem .85rem}button{font-weight:800;cursor:pointer;box-shadow:0 3px 0 #28472c40;touch-action:manipulation}button:hover:enabled{background:#e1eeca;color:#143d30}button:active:enabled,button[aria-pressed=true]{background:#bbdacb;color:#123c30;box-shadow:0 1px 0 #28472c40}button:disabled{background:#e4e9db;color:#64735e;cursor:default;box-shadow:none}.primary{background:#1c594a;color:#fff9df;border-color:#1c594a}.primary:hover:enabled,.primary:active:enabled{background:#287360;color:#fffbe7}header button{background:#224f45;color:#fff9e4;border-color:#85a895}main{max-width:1480px;margin:auto;padding:clamp(.5rem,2vw,1.5rem)}.brief{width:fit-content;max-width:100%;margin:0 auto .8rem;text-align:center;background:#fff9e8f2;padding:.65rem 2rem;border-radius:20px;box-shadow:0 8px 25px #243c2440}.eyebrow{font-size:.75rem;font-weight:850;letter-spacing:.17em;color:#487361;margin:.1rem 0}.brief h1{margin:.2rem 0;font-size:clamp(1.2rem,3vw,2rem)}.brief p{margin:.2rem 0}.pattern{font-weight:800;letter-spacing:.15em;font-size:.88rem}.gardens{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem}.gardens.duo{grid-template-columns:repeat(2,minmax(0,1fr))}.plot{position:relative;min-width:0;padding:clamp(.65rem,2vw,1.35rem);border:1px solid #f4efc5ab;border-radius:26px;background:linear-gradient(150deg,#f8ffe8e8,#dbe6cbd9);box-shadow:0 10px 45px #173b2e65;backdrop-filter:blur(6px)}.plot h2{margin:0;font-size:1rem;text-align:center}.plot h2 span{font-weight:500}.plot:nth-child(2){background:linear-gradient(150deg,#fff3e9eb,#efe0cbdc)}.plot p{text-align:center;margin:.4rem 0}.trail{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem 1.3rem;padding:1rem .7rem;margin:.5rem 0;background:#4f765a24;border-radius:20px;border:1px solid #81957273}.trail::before{content:'';position:absolute;top:29%;left:12%;right:12%;height:44%;border:8px solid #98afa0;border-left:0;border-radius:0 30px 30px 0;pointer-events:none}.stone{z-index:1;position:relative;min-width:0;min-height:75px;border-radius:45% 42% 35% 40%;background:linear-gradient(#fff9e5,#e0d4ac);border:2px solid #b7a67b;box-shadow:0 5px 0 #61765280;font-size:1.45rem;padding:.6rem .3rem}.stone small{display:block;font-size:.65rem;font-weight:600}.stone:nth-child(n+5){grid-row:2}.stone:nth-child(5){grid-column:4}.stone:nth-child(6){grid-column:3}.stone:nth-child(7){grid-column:2}.stone:nth-child(8){grid-column:1}.stone[aria-pressed=true]{background:#185b4c;color:#fff9de;border-color:#185b4c;box-shadow:0 5px 0 #093a2c}.stone.wrong{background:#f6d2cb;color:#802a35;border-color:#ba6d6d}.stone.right{border-color:#317b63}.stone.bloom::after{content:'✿';position:absolute;right:-7px;top:-12px;font-size:1.6rem;color:#a83e68;text-shadow:0 1px 2px #fff}.stone .music{font:1.4rem GardenMusic;display:inline-block;margin-right:.35rem;vertical-align:middle}.seed-bank{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.3rem}.seed{padding:.5rem .1rem;border-radius:50% 50% 35% 35%;min-height:54px;font-size:1.15rem;background:#f7f1cd}.seed kbd{display:block;font:600 .6rem system-ui;color:inherit}.accidentals{display:flex;justify-content:center;gap:.35rem;margin:.6rem 0}.accidentals button{flex:1;max-width:100px}.plot-actions{display:flex;justify-content:center;gap:.5rem;margin-top:.7rem;flex-wrap:wrap}.plot-message{min-height:2.8em;font-size:.88rem}.status{width:fit-content;max-width:100%;margin:.8rem auto;background:#fff8e8f3;border-radius:14px;padding:.5rem 1rem;text-align:center}.status:empty{display:none}.actions{display:flex;justify-content:center;gap:.5rem;flex-wrap:wrap}.actions button{box-shadow:0 5px 12px #173b2e55}.summary-row{padding:.6rem;background:#e3ebd6;border-radius:10px;margin:.5rem 0}.flow .trail::before{border-color:#35aba6;box-shadow:0 0 20px #75fff5}.flow .stone{animation:grow .4s ease-out both}.flow .stone:nth-child(2n){animation-delay:.12s}@keyframes grow{from{transform:scale(.9)}to{transform:scale(1)}}dialog{width:min(680px,calc(100% - 1.5rem));max-height:90svh;overflow:auto;border:1px solid #a7ac7c;border-radius:26px;padding:clamp(1rem,4vw,2.2rem);background:#fff9e9;color:#173f35;box-shadow:0 20px 90px #123e3155}dialog::backdrop{background:#173c328c;backdrop-filter:blur(7px)}dialog h2{margin:.3rem 0 1rem;font-size:clamp(1.4rem,4vw,2rem)}.fields{display:grid;grid-template-columns:1fr 1fr;gap:.8rem;margin:1rem 0}label{display:grid;gap:.35rem;font-weight:750}select{width:100%;min-width:0}input[type=range]{min-height:44px;width:100%;accent-color:#1c594a}.check{display:flex;align-items:center;gap:.5rem}.check input{width:22px;height:22px}summary{min-height:44px;display:list-item;padding:.7rem 0;font-weight:800;cursor:pointer}details{border-block:1px solid #bdc7a6}.dialog-actions{display:flex;justify-content:flex-end;gap:.7rem;margin-top:1rem}.error{color:#9b3442}button:focus-visible{outline:3px solid #267c96;outline-offset:3px}[hidden]{display:none!important}
@media(min-width:1050px){.gardens:not(.duo) .plot{max-width:850px;width:100%;margin:auto}.trail{gap:.9rem 1.8rem}.stone{min-height:86px}.gardens:not(.duo){margin-top:3svh}}
@media(max-width:650px){header{padding:.45rem .6rem;gap:.6rem;flex-wrap:wrap}header nav{justify-content:center;width:100%}header nav button{padding:.4rem .65rem;font-size:.85rem}.brief{padding:.5rem .85rem}.brief p{font-size:.85rem}.gardens.duo{gap:.4rem}.plot{padding:.5rem;border-radius:18px}.trail{gap:.35rem;padding:.5rem .2rem}.stone{min-height:58px;font-size:1.05rem}.stone .music{display:none}.stone small{font-size:.55rem}.seed-bank{grid-template-columns:repeat(4,minmax(0,1fr))}.seed{min-height:46px;font-size:1rem}.seed kbd{display:none}.accidentals{flex-wrap:wrap}.accidentals button{min-width:44px;padding:.3rem}.plot-actions button{padding:.45rem .65rem}.plot-message{font-size:.77rem}.pattern{letter-spacing:0;font-size:.77rem}}
@media(max-height:800px) and (min-width:800px){.brief{padding:.35rem 1rem;margin-bottom:.4rem}.brief h1{font-size:1.4rem}.plot{padding:.7rem}.trail{margin:.35rem 0;padding:.65rem}.stone{min-height:64px}.seed{min-height:46px}.plot p{margin:.25rem 0}.gardens:not(.duo){margin-top:0}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}body.reduced *,body.reduced *::before{animation:none!important;transition:none!important}

.plot{background:linear-gradient(145deg,#254c3866,#28583733);backdrop-filter:blur(2px)}.plot:nth-child(2){background:linear-gradient(145deg,#5f403866,#28583733)}.plot h2{width:fit-content;margin:auto;background:#fff7ddeb;padding:.35rem 1rem;border-radius:20px}.trail{background:#184b3433;border-color:#fff4d28c}.stone{height:82px;min-height:82px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.15rem}.stone .music{position:absolute;left:14%;top:22px;width:22px;height:22px;line-height:1;font-size:25px;margin:0;opacity:.75}.plot-message{background:#fff8e4ef;border-radius:12px;padding:.4rem .6rem}.seed{background:linear-gradient(#fffbe2,#e8dfac)}
@media(max-width:650px){.stone{height:64px;min-height:64px}.plot h2{font-size:.85rem}.plot-message{min-height:3.8em}.gardens.duo .trail{gap:.3rem .15rem}.gardens.duo .stone{font-size:.95rem}}
@media(max-height:800px) and (min-width:800px){.stone{height:68px;min-height:68px}.stone .music{top:15px}}
/* Keep navigation anchored; only the game area scrolls on small screens. */
body{height:100svh;overflow:hidden;display:flex;flex-direction:column}header{flex:none}main{flex:1;min-height:0;width:100%;overflow-y:auto;scrollbar-gutter:stable}
@media(max-width:650px){
 .gardens.duo .plot{max-height:calc(100svh - 330px);min-height:300px;overflow-y:auto;scrollbar-width:thin;overscroll-behavior:contain}
 .gardens.duo .trail{grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem;padding:.45rem .2rem}
 .gardens.duo .stone{grid-column:auto;grid-row:auto;height:54px;min-height:54px}
 .gardens.duo .stone:nth-child(1){grid-column:1;grid-row:1}.gardens.duo .stone:nth-child(2){grid-column:2;grid-row:1}
 .gardens.duo .stone:nth-child(3){grid-column:2;grid-row:2}.gardens.duo .stone:nth-child(4){grid-column:1;grid-row:2}
 .gardens.duo .stone:nth-child(5){grid-column:1;grid-row:3}.gardens.duo .stone:nth-child(6){grid-column:2;grid-row:3}
 .gardens.duo .stone:nth-child(7){grid-column:2;grid-row:4}.gardens.duo .stone:nth-child(8){grid-column:1;grid-row:4}
 .gardens.duo .trail::before{left:23%;right:23%;top:12%;height:75%;border-right:0;border-radius:0;border-top:0;border-bottom:0;border-left:5px solid #a0bca3}
 .gardens.duo .seed-bank{grid-template-columns:repeat(3,minmax(0,1fr))}
 .gardens.duo .plot h2{position:sticky;top:-.5rem;z-index:3;font-size:.76rem;padding:.4rem .5rem}
 .gardens.duo .plot-actions{display:grid;grid-template-columns:1fr}.gardens.duo .plot-message{font-size:.8rem}
}
@media(min-width:651px) and (max-width:1000px){.gardens.duo .seed-bank{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-height:800px) and (min-width:800px){main{padding:.65rem .9rem}.seed{padding:.3rem .1rem;font-size:1rem;line-height:1.15}.seed kbd{font-size:.55rem}.plot-message{min-height:2em}.trail{padding:.45rem}}
