:root{--paper:#fbf5e6;--ink:#285941;--rust:#c0523e;--line:#d8cfb7}
*{box-sizing:border-box}
body{margin:0;background:#e7e7d6;color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}
button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button{font:inherit;cursor:pointer}
button:focus-visible,a:focus-visible{outline:2px solid var(--rust);outline-offset:3px}
.atelier{position:relative;max-width:430px;height:100svh;min-height:660px;max-height:960px;margin:auto;padding:max(10px,env(safe-area-inset-top)) 20px max(14px,env(safe-area-inset-bottom));background:var(--paper);display:flex;flex-direction:column;overflow:hidden}
.navigation{height:38px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between}
.back,.sound{width:44px;height:44px;display:grid;place-items:center;background:none;border:0;color:var(--ink);padding:11px;text-decoration:none}
.back{margin-left:-11px}
.sound{margin-right:-11px}
.navigation svg{width:22px;height:22px;stroke:currentColor;stroke-width:1.5;fill:none;stroke-linecap:round;stroke-linejoin:round}
.sound[aria-pressed=true] .sound-off{display:none}
.edition{font-size:10px;letter-spacing:1px;color:#7a8367}
.identity{min-height:100px;display:flex;align-items:center;justify-content:center;gap:15px;flex-shrink:0;padding:4px 0 12px;position:relative}
.identity h1{font:700 42px "Kaiti SC","STKaiti","Songti SC",serif;letter-spacing:1px;margin:0;line-height:1.18;white-space:nowrap}
.identity h1 span{display:inline-block}
.identity h1 span:nth-child(1){transform:rotate(-7deg)}
.identity h1 span:nth-child(2){transform:translateY(2px) rotate(3deg)}
.identity h1 span:nth-child(3){transform:rotate(-3deg)}
.identity h1 span:nth-child(4){transform:translateY(-2px) rotate(5deg)}
.sun{width:48px;height:48px;transform:rotate(-9deg);align-self:center}
.sun svg{width:100%;height:100%}
.subtitle{font-size:11px;letter-spacing:3px;margin:8px 0 0;text-align:center;color:#8c795c}
.season-mark{border:1px solid #cb775b;color:#b55a40;font:9px/1.3 "Songti SC",serif;padding:4px 3px;transform:rotate(5deg);margin-left:1px}
.work{display:flex;flex-direction:column;min-height:0;flex:1}
.ledger{display:flex;justify-content:space-between;align-items:center;min-height:40px;padding:0 3px;flex-shrink:0}
.score-ledger,.move-ledger{display:flex;align-items:baseline;gap:9px}
.ledger-label{font-size:11px;letter-spacing:1px}
.score-line{display:inline-flex;align-items:baseline;gap:5px}
.score-line strong,.move-ledger strong{font:italic 29px/1 Georgia,serif;font-variant-numeric:tabular-nums;min-width:20px}
.score-line>span{font:12px Georgia,serif;color:#8b8e72}
.move-ledger strong{color:var(--rust)}
.move-ledger{gap:6px}
.move-ledger .ledger-label{font-size:10px;letter-spacing:0}
.progress{height:3px;background:#e7deca;margin:5px 3px 13px;flex-shrink:0}
.progress span{display:block;height:100%;width:0;background:var(--rust);transition:width .2s}
.field-edge{height:5px;background:repeating-linear-gradient(90deg,#b1b99a 0 8px,transparent 8px 13px);opacity:.65;flex-shrink:0}
.board{position:relative;aspect-ratio:1;width:100%;flex-shrink:0;touch-action:none;overflow:hidden;background:#f2e9d4;border-bottom:1px solid #cfd1b1}
.board canvas,.cells{position:absolute;inset:0;width:100%;height:100%}
.cells{display:grid;grid-template:repeat(7,1fr)/repeat(7,1fr)}
.cell{background:none;border:0;padding:0;touch-action:none}
.cell:focus-visible{outline:2px solid var(--rust);outline-offset:-3px}
.status{font-size:11px;color:#7c7158;min-height:28px;line-height:1.6;text-align:center;margin:0;padding-top:8px;flex-shrink:0}
.harvest-dock{position:relative;flex:1;min-height:124px;max-height:180px;display:grid;grid-template-columns:1fr 106px 1fr;align-items:center;column-gap:10px}
.harvest-center{display:flex;flex-direction:column;align-items:center;align-self:center}
.basket{width:106px;height:106px;position:relative;margin-top:-12px}
.garden-tool{appearance:none;position:relative;justify-self:center;width:90px;height:100px;padding:0 1px 5px;border:0;background:none;color:var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:flex-end;border-radius:0}
.tool-art{display:block;width:88px;height:76px;overflow:visible;pointer-events:none}
.tool-face{transform-origin:44px 65px;transition:transform 110ms ease-out}
.tool-label{font-size:12px;font-weight:600;letter-spacing:1px;line-height:20px;position:relative}
.tool-label:after{content:"";display:block;height:2px;background:#a7b393;clip-path:polygon(0 30%,100% 0,95% 100%,4% 70%);margin:2px -3px 0}
.garden-tool:not(:disabled):active .tool-face,.play-again:active .tool-face{transform:translateY(3px) rotate(-4deg)}
.seed-tool:not(:disabled):active .tool-face{transform:translateY(3px) rotate(3deg)}
.garden-tool:not(:disabled):active .tool-label{color:var(--rust)}
.garden-tool:disabled{cursor:default;color:#71745b}
.garden-tool:disabled .tool-art{filter:grayscale(.8);opacity:.48}
.garden-tool:focus-visible{outline-offset:1px}
.sound[aria-pressed=false] .sound-on{display:none}
.navigation svg{stroke-width:2}
.navigation a:active svg,.navigation button:active svg{transform:translateY(2px)}
.basket-front{position:absolute;inset:0;background:url('../assets/basket-front.svg') center/contain no-repeat;z-index:2;pointer-events:none}
.basket-crops{position:absolute;inset:0;clip-path:polygon(13.28125% 0,87.5% 0,87.5% 39.0625%,78.90625% 80.46875%,20.3125% 82.03125%,13.28125% 40.625%);pointer-events:none;z-index:1}
.basket-caption{font-size:9px;letter-spacing:2px;color:#917c54;position:relative;margin-top:-5px}
.basket-crop{position:absolute;width:31.25%;height:31.25%;background-image:url('../assets/crops-cut.svg');background-size:300% 200%}
.harvest-flight{position:fixed;z-index:8;width:36px;height:36px;background-image:url('../assets/crops-cut.svg');background-size:300% 200%;pointer-events:none}
.instructions{flex-shrink:0;text-align:center;font-size:10px;color:#85846d;margin:10px 0 0;line-height:1.4}
dialog{border:0;background:var(--paper);color:var(--ink);width:300px;max-width:90%;border-radius:0;text-align:center;padding:25px 24px 20px;box-shadow:0 15px 80px #31473540}
dialog:before{content:"";position:absolute;inset:8px;pointer-events:none;border:1px solid #ccc3a6;clip-path:polygon(0 0,42% 0,42% 1%,58% 1%,58% 0,100% 0,100% 100%,0 100%)}
dialog:after{content:"";position:absolute;top:0;left:calc(50% - 17px);width:34px;height:8px;background:#bd6246;clip-path:polygon(0 0,100% 0,97% 100%,3% 80%)}
dialog::backdrop{background:#334b385c;backdrop-filter:blur(2px)}
.close-result{position:absolute;right:5px;top:3px;background:none;border:0;width:44px;height:44px;font-size:24px;color:#738164}
.result-basket{width:85px;height:85px;margin:0 auto;position:relative}
.result-eyebrow{font-size:9px;letter-spacing:1px;margin:8px 0 12px}
dialog h2{font:700 30px "Kaiti SC","Songti SC",serif;margin:12px 0}
#result-copy{font-size:12px;line-height:1.9;color:#7c8169}
.result-score{display:flex;flex-direction:column;gap:6px;margin:20px}
.result-score strong{font:italic 37px Georgia,serif;color:var(--rust)}
.result-score span{font-size:10px}
.close-result svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:3}
.play-again{appearance:none;border:0;background:none;color:var(--ink);padding:0 14px 6px;font-size:14px;font-weight:600;min-height:70px;display:inline-flex;align-items:center;gap:4px}
.play-again .tool-art{width:66px;height:57px}
.play-again>span{border-bottom:2px solid #a7b393;padding:5px 3px}
.result-score{margin:16px}
.result-score strong{font-size:35px}
@media(min-width:600px){.atelier{height:880px;margin:20px auto;box-shadow:0 8px 50px #3b4f3020;border-radius:5px}
}
@media(max-height:780px){.atelier{padding-top:max(6px,env(safe-area-inset-top));padding-bottom:max(10px,env(safe-area-inset-bottom))}
.navigation{height:34px}
.identity{min-height:82px;padding-bottom:8px}
.identity h1{font-size:39px}
.sun{width:42px;height:42px}
.subtitle{margin-top:5px}
.harvest-dock{min-height:122px}
.status{min-height:25px;padding-top:5px}
.progress{margin-bottom:9px}
.instructions{margin-top:6px}
}
@media(max-height:700px){.identity{min-height:68px}
.identity h1{font-size:34px}
.sun{width:36px;height:36px}
.season-mark{font-size:8px}
.harvest-dock{min-height:114px;grid-template-columns:1fr 90px 1fr;gap:3px}
.basket{width:90px;height:90px;margin-top:-8px}
.basket-caption{font-size:8px}
.instructions{font-size:9px}
.ledger{min-height:36px}
.status{font-size:10px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}
}

@media(max-width:350px){.atelier{padding-left:14px;padding-right:14px}
.identity{gap:9px}
.identity h1{font-size:34px}
.season-mark{display:none}
}


/* Shared coordinates for the handle, interior mask, produce and opaque rim. */
.basket,.result-basket{isolation:isolate;background:url('../assets/basket-back.svg') center/contain no-repeat}


@media(max-height:700px){.garden-tool{height:96px}
.tool-art{width:80px;height:69px}
}
