.privacy-dialog{font-size:14px;line-height:1.7}.privacy-dialog h2{font-size:20px;margin-bottom:14px}.privacy-dialog h3{font-size:14px;margin:18px 0 4px}.privacy-dialog p{margin:8px 0 14px}.privacy-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.privacy-choices button{min-height:48px;padding:10px 8px;background:#fffdf7;color:#42573a;border:1px solid #9da98c;font-weight:600}.privacy-choices button:hover{background:#eaf0de}.privacy-dialog summary{cursor:pointer;padding:10px 0;text-decoration:underline}.privacy-dialog a{color:#42573a}.privacy-close,.privacy-entry{font-size:12px;background:transparent;min-height:44px}.privacy-close{display:block;margin:14px auto 0}.privacy-entry{display:block;margin:12px auto 0}.privacy-title-entry{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));z-index:3;background:#fffdf7ed}.privacy-dialog{box-sizing:border-box;width:min(540px,calc(100% - 24px));max-height:calc(100svh - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;padding:20px;overscroll-behavior:contain}.privacy-dialog ul{padding-left:1.3em;margin:8px 0}.privacy-dialog .privacy-close[hidden]{display:none}.privacy-dialog .privacy-state{font-size:12px}.privacy-dialog .privacy-choices button{touch-action:manipulation}@media(max-width:399px){.privacy-dialog{padding:14px;font-size:12px;line-height:1.5}.privacy-dialog h2{font-size:18px;margin-bottom:10px}.privacy-dialog p{margin:6px 0 10px}.privacy-choices{gap:8px;margin:12px 0}}:root{font-family:Segoe UI,Yu Gothic UI,Meiryo,sans-serif;color:#42543b;background:#f8f7ef;font-synthesis:none;color-scheme:light}*{box-sizing:border-box}body{margin:0;min-height:100vh;min-height:100svh;background:radial-gradient(ellipse at 8% 38%,#e9efd9aa,transparent 42%),radial-gradient(ellipse at 100% 18%,#f8e6db99,transparent 38%)}button{font:inherit;cursor:pointer;border:1px solid #cbd4bc;border-radius:12px;min-height:44px;padding:10px 16px;color:#42573a;background:#fffdf7;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:hover{background:#eaf0de}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #879f54;outline-offset:3px}[hidden]{display:none!important}.spirit-icon{display:block;width:100%;height:100%;object-fit:contain;border-radius:18%}.loading{padding:20vh 30px;text-align:center}.label{display:block;font-size:12px;font-weight:600;color:#69775c;line-height:1.4}.primary{background:#758f50;color:#fffdf4;border-color:#657e43;font-weight:600}.primary:hover{background:#657e43}.game-header{height:64px;max-width:940px;padding:8px 24px;margin:auto;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:9px;font:600 23px Georgia,serif;color:#425c37}.brand .spirit-icon{width:34px;height:34px}.game-main{--board-width:clamp(264px,calc((100svh - 350px)*var(--board-ratio)),384px);max-width:980px;margin:auto;padding:16px 24px max(16px,env(safe-area-inset-bottom))}.game-layout{display:grid;grid-template-columns:168px minmax(264px,var(--board-width)) 120px;grid-template-rows:auto auto;justify-content:center;align-items:start;gap:14px 32px}.hud{grid-column:1;grid-row:1;display:flex;flex-direction:column;gap:24px;padding-top:10px}.hud h1{font-size:22px;letter-spacing:1px;margin:0;line-height:1.2}.score-panel{order:3}.score-panel strong{display:block;font-size:23px;font-weight:500;font-variant-numeric:tabular-nums;margin-top:3px}.goal-card{order:1}.goal-row{display:flex;gap:9px;align-items:center}.goal-row+.goal-row{margin-top:10px}.goal-row .spirit-icon,.goal-symbol{width:44px;height:44px;flex:none}.goal-symbol{display:grid;place-items:center;font-size:25px;color:#a8894b}.goal-row strong{display:block;font-size:20px;font-weight:600;margin-top:2px}.rise-warning{order:2;background:#e8edda;border:1px solid #d3ddbf;border-radius:13px;padding:12px}.rise-warning strong{display:block;font-size:21px;margin-top:3px}.rise-track{height:4px;border-radius:4px;background:#d1d9bf;overflow:hidden;margin-top:10px}.rise-track span{display:block;height:100%;background:#8da15f;transition:width .2s}.rise-warning.imminent{background:#f4e4c9;border-color:#d8bb8c;color:#795222}.imminent .label{color:#805d2f}.imminent .rise-track span{background:#b18542}.rise-warning.urgent{animation:rise-pulse 1.8s ease-in-out infinite}.board-section{grid-column:2;grid-row:1;position:relative;width:100%}.board-frame{padding:8px;background:#dbe3c9;border:1px solid #afbf95;border-radius:15px;box-shadow:0 12px 30px #65774214}canvas{display:block;width:100%;height:auto;border-radius:8px}.wither-preview{display:grid;grid-template-columns:repeat(var(--board-columns),1fr);text-align:center;margin-top:4px;line-height:14px;font-size:10px;color:#bdc5af}.wither-preview .planned{color:#9b7a45}.wither-preview.urgent .planned{color:#815322;font-weight:900}.chain-feedback{position:absolute;left:50%;top:20%;transform:translate(-50%);pointer-events:none;white-space:nowrap;font-size:20px;color:#80622c;text-shadow:0 1px #fff8df;padding:9px 15px;border-radius:24px;background:#fff9e8ed;box-shadow:0 3px 12px #65774212}.chain-feedback:empty{display:none}.next-panel{--next-cell:36px;grid-column:3;grid-row:1;padding:12px 0;display:flex;flex-direction:column;align-items:center;gap:12px}#next{display:grid;gap:2px}#next>span{width:var(--next-cell);height:var(--next-cell)}.touch-controls{grid-column:2;grid-row:2;display:grid;width:100%;gap:10px;justify-items:center}.touch-controls button{padding:8px;font-size:20px;min-width:44px;height:46px}.touch-controls #pause{justify-self:start;width:44px;color:#69775c;background:#f8f7ef;font-size:18px}.movement-controls{display:grid;grid-template-columns:repeat(3,48px);grid-template-rows:46px;gap:6px}.movement-controls [data-action=left]{grid-area:1/1}.movement-controls [data-action=rotate]{grid-area:1/2}.movement-controls [data-action=right]{grid-area:1/3}.touch-controls .hard-drop{width:min(100%,240px);height:48px;margin-top:2px;background:#758f50;color:#fffbed;border-color:#657e43;font-size:15px;font-weight:700;box-shadow:0 3px #5b713622}.touch-controls .hard-drop:hover{background:#657e43}.touch-controls button:active:not(:disabled){transform:translateY(2px);box-shadow:none;filter:brightness(.95)}dialog{width:min(420px,calc(100vw - 32px));max-height:calc(100svh - 40px);padding:26px;border:1px solid #c8d2b6;border-radius:22px;background:#fffdf4;color:#42543b;box-shadow:0 20px 80px #263e342b;overflow-y:auto}dialog::backdrop{background:#34482a66;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}dialog h2{margin:0 0 22px;font-size:23px;text-align:center}.pause-actions{display:grid;gap:10px}.keyboard-hint{font-size:11px;text-align:center;color:#758366;margin:16px 0 0}.growth{display:flex;gap:10px;justify-content:center;margin:24px 0}.growth>span{position:relative;width:46px;height:46px}.growth>span:not(:last-child):after{content:"›";position:absolute;right:-9px;top:12px;color:#8a9b6c}.rules-list{font-size:12px;line-height:1.8;margin:0}.rules-list>div{margin-bottom:12px}.rules-list dt{font-weight:700}.rules-list dd{margin:0;color:#647456}.controls-help{font-size:11px;line-height:1.9;padding-top:12px;border-top:1px solid #e0e5d5}.debug-settings{font-size:11px}.debug-settings button{font-size:11px;margin-top:10px}.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 12px;margin:22px 0}.stats-grid strong{display:block;margin-top:4px;font-size:19px}.stats-grid .label{font-size:11px}#summary p{font-size:13px;line-height:1.8}#result-restart{width:100%}#debug{margin-top:20px;padding:16px;border:1px solid #d1dac1;background:#fffdf4;border-radius:12px;font-size:12px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px}@keyframes rise-pulse{50%{box-shadow:0 0 0 3px #c9994b25}}@media(min-width:700px)and (max-width:1099px){.game-layout{grid-template-columns:148px minmax(264px,var(--board-width));gap:14px 24px}.next-panel{grid-column:1;grid-row:2;flex-direction:row;padding:0;justify-content:center}.game-main{padding-top:8px}}@media(max-width:699px){.game-header{height:48px;padding:2px 14px}.brand{font-size:19px;gap:6px}.brand .spirit-icon{width:28px;height:28px}.game-main{--board-width:min(100%,max(256px,calc((100svh - 450px)*var(--board-ratio))));padding:4px 12px max(10px,env(safe-area-inset-bottom))}.game-layout{display:flex;flex-direction:column;gap:8px;width:var(--board-width);max-width:384px;margin:auto}.hud{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px 10px;width:100%;padding:0;align-items:center}.hud h1{font-size:17px;letter-spacing:.7px}.score-panel{order:0;text-align:right;display:flex;gap:7px;align-items:baseline;justify-content:flex-end}.score-panel .label{font-size:10px}.score-panel strong{font-size:18px;margin:0}.goal-card{order:0;min-width:0}.goal-row{gap:5px}.goal-row .spirit-icon,.goal-symbol{width:30px;height:30px}.goal-row .label{font-size:10px;overflow-wrap:anywhere}.goal-row strong{font-size:16px;margin:0}.goal-row+.goal-row{margin-top:4px}.goal-symbol{font-size:20px}.rise-warning{order:0;text-align:right;padding:5px 9px;border-radius:10px;align-self:stretch;display:flex;flex-direction:column;justify-content:center}.rise-warning .label{font-size:10px}.rise-warning strong{font-size:17px;margin:0}.rise-track{margin-top:4px;height:3px}.board-frame{padding:6px;border-radius:12px}.wither-preview{line-height:12px;margin-top:3px}.next-panel{--next-cell:26px;width:100%;flex-direction:row;justify-content:center;gap:12px;padding:0;min-height:30px}.next-panel .label{font-size:11px}.touch-controls .hard-drop{width:100%}.keyboard-hint{display:none}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}.rise-warning.urgent{animation:none}}.awakening{min-height:100svh;position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;align-items:center;text-align:center;background:radial-gradient(ellipse at 50% 52%,#fffbe4,#f7f5e9 45%,#eaf0de);padding:clamp(24px,5vh,58px) 20px 20px}.morning-light{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;background:linear-gradient(125deg,transparent 25%,#fffdf78a 40%,transparent 58%)}.title-content{position:relative;z-index:2}.title-eyebrow{font-size:10px;letter-spacing:3px;color:#859174;margin:0 0 24px}.title-logo{position:relative;display:inline-block;font-family:Georgia,Times New Roman,serif;font-size:clamp(66px,10vw,108px);font-weight:400;letter-spacing:-5px;line-height:.83;color:#405c39;margin:0;text-shadow:0 3px 0 #ffffffa0}.title-logo>span{display:block}.title-logo>span+span{font-size:.84em;letter-spacing:1px;margin-top:12px;color:#526b42}.logo-leaf{position:absolute;width:30px;height:14px;background:#99b56a;border-radius:100% 0;transform:rotate(-24deg);right:-19px;top:4px;box-shadow:inset -3px -2px #7f9c51}.play-button{min-width:210px;font:600 16px Segoe UI,sans-serif;letter-spacing:4px;color:#fffbea;background:#7b9757;border:1px solid #718d4d;border-radius:40px;padding:18px 30px;box-shadow:0 7px #627d4230,0 12px 28px #798e5225;transition:transform .2s,background .2s}.play-button:hover{background:#89a360;transform:scale(1.03)}.play-button span{margin-left:28px;font-weight:400}.title-hint{font-size:10px;color:#8e987e;margin:17px 0 0}.awakening-garden{position:relative;width:min(620px,100%);height:clamp(210px,33vh,300px);margin-top:8px;flex-shrink:0}.garden-halo{position:absolute;top:5%;right:10%;bottom:0;left:10%;background:radial-gradient(ellipse,#ead99266,transparent 68%)}.title-seed,.title-sprout{position:absolute;z-index:2;bottom:38px;filter:drop-shadow(0 12px 8px #8b865526)}.title-seed{width:clamp(125px,20vw,190px);left:22%}.title-sprout{width:clamp(108px,17vw,154px);right:20%;bottom:42px}.title-seed .spirit-icon,.title-sprout .spirit-icon{border-radius:0;animation:seed-breathe 5s ease-in-out 3s infinite}.title-sprout .spirit-icon{animation-delay:4s}.garden-ground{position:absolute;width:100%;height:70px;bottom:0;border-radius:50%;background:radial-gradient(ellipse,#dce3bd88,transparent 70%)}.title-stone{position:absolute;background:#aaa18f;border:1px solid #c8beab;border-radius:40% 35% 26% 30%;height:27px;width:47px;bottom:20px;box-shadow:0 4px #938a7770}.title-stone:after{content:"";position:absolute;left:42%;top:2px;width:10px;height:17px;border-left:2px solid #807562;border-bottom:2px solid #807562;transform:rotate(-24deg)}.stone-one{left:18%;transform:rotate(-8deg)}.stone-two{right:14%;width:58px;height:33px}.stone-three{right:25%;height:20px;width:34px;bottom:16px}.new-grass{position:absolute;right:24%;bottom:35px;width:3px;height:25px;background:#8da567;transform:rotate(-10deg)}.new-grass:before,.new-grass:after{content:"";position:absolute;width:16px;height:9px;background:#9ab774;border-radius:100% 0;left:0;top:0}.new-grass:after{left:-15px;top:6px;transform:scaleX(-1)}.title-footer{font:italic 14px Georgia;color:#96977b;margin:auto 0 0;padding-top:10px;letter-spacing:1px}.title-petal{position:absolute;width:13px;height:22px;border-radius:90% 10% 85% 15%;background:#eec4b76b;z-index:0;animation:drift 13s ease-in-out infinite}.petal-one{left:20%;top:24%;transform:rotate(40deg)}.petal-two{right:18%;top:45%;width:9px;height:16px;animation-delay:-6s}.bloom-wash{position:absolute;top:0;right:0;bottom:0;left:0;z-index:5;pointer-events:none;opacity:0;background:radial-gradient(circle at 50% 45%,#fff5ca,#fffaf0 65%)}.leaving .bloom-wash{animation:screen-wash .42s ease-out forwards}.leaving .title-content{transition:transform .42s;transform:scale(1.025)}.first-visit .title-seed{animation:seed-arrives .65s .3s both}.first-visit .garden-halo{animation:awakening-glow 1.7s .7s both}.first-visit .title-sprout{animation:sprout-unfold .8s 1s both}.first-visit .new-grass{animation:sprout-unfold .65s 1.4s both;transform-origin:bottom}.first-visit .title-logo{animation:logo-awakens .65s 1.8s both}.first-visit .play-button{animation:play-awakens .4s 2.2s both}.return-visit .title-content{animation:gentle-entry .5s both}.game-enter>header,.game-enter>main{animation:gentle-entry .4s both}@keyframes seed-arrives{0%{opacity:0;transform:translateY(-70px) rotate(-12deg)}70%{opacity:1;transform:translateY(5px) rotate(2deg)}to{transform:translateY(0)}}@keyframes sprout-unfold{0%{opacity:0;transform:scale(.55) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes awakening-glow{0%{opacity:0;transform:scale(.3)}70%{opacity:1;transform:scale(1.1)}to{opacity:.75;transform:scale(1)}}@keyframes logo-awakens{0%{opacity:.7;filter:blur(1px);transform:translateY(5px)}to{opacity:1;filter:blur(0);transform:translateY(0)}}@keyframes play-awakens{0%{opacity:.65;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes seed-breathe{50%{transform:translateY(-5px) rotate(1deg)}}@keyframes drift{50%{transform:translate(16px,35px) rotate(80deg);opacity:.3}}@keyframes screen-wash{to{opacity:1}}@keyframes gentle-entry{0%{opacity:0}to{opacity:1}}@media(max-width:600px){.awakening{padding-top:55px}.title-eyebrow{font-size:8px;letter-spacing:2px;margin-bottom:27px}.title-logo{font-size:80px}.awakening-garden{margin-top:24px;height:240px}.title-seed{left:9%;width:155px}.title-sprout{right:8%;width:128px}.title-hint{font-size:9px}.title-footer{font-size:12px}.petal-one{left:7%}.petal-two{right:6%}}@media(max-height:680px)and (min-width:601px){.awakening{padding-top:22px}.title-logo{font-size:76px}.title-eyebrow{margin-bottom:18px}.awakening-garden{height:200px}.title-seed{width:145px}.title-sprout{width:120px}}@media(prefers-reduced-motion:reduce){.awakening *,.game-enter>header,.game-enter>main{animation:none!important;transition:none!important}.leaving .bloom-wash{opacity:1}}.awakening{height:100vh;height:100svh;height:100dvh;min-height:0;padding:max(18px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));justify-content:center;gap:8px}.title-content{flex:none}.title-eyebrow{margin-bottom:clamp(12px,3dvh,24px)}.title-logo{font-size:clamp(64px,11dvh,108px)}.title-actions{margin-top:clamp(18px,3dvh,28px);display:flex;flex-direction:column;align-items:center;gap:10px}.play-button{padding:14px 28px;min-height:50px;letter-spacing:2px}.settings-button{min-width:180px;min-height:44px;background:#fffdf780;border-color:#bbc7a7;font-size:13px;color:#556748}.title-hint{margin:12px 0 0}.awakening-garden{flex:0 1 280px;min-height:100px;height:clamp(110px,28dvh,280px);margin:0}.title-seed{width:clamp(100px,23dvh,190px);max-height:100%;left:20%;bottom:25px}.title-sprout{width:clamp(88px,19dvh,154px);max-height:100%;right:19%;bottom:29px}.title-footer{flex:none;margin:0;padding:0;font-size:12px}@media(max-width:600px){.title-seed{left:8%;width:clamp(105px,23dvh,155px)}.title-sprout{right:7%;width:clamp(90px,19dvh,128px)}}@media(max-height:580px){.awakening{gap:4px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(10px,env(safe-area-inset-bottom))}.title-logo{font-size:58px}.title-eyebrow{margin-bottom:10px}.title-hint{margin-top:8px}.title-actions{gap:6px}.awakening-garden{flex-basis:120px}.title-seed{width:100px}.title-sprout{width:86px}.title-footer{font-size:11px}}@media(max-height:450px)and (min-width:600px){.awakening{display:grid;grid-template-columns:1fr 1fr;column-gap:24px}.title-content{grid-row:1}.awakening-garden{grid-column:2;grid-row:1;height:220px}.title-footer{grid-column:1 / -1}.title-hint{display:none}}.title-options{display:flex;gap:8px;width:100%;max-width:300px}.title-options>button{min-width:0;flex:1;min-height:44px;padding:10px 12px}#title-settings-dialog{max-height:calc(100dvh - 32px);text-align:left}#title-settings-dialog p{font-size:13px;line-height:1.6}#title-settings-close{width:100%;min-height:44px}.endless-button{min-height:44px;border:1px solid #73865a;border-radius:999px;background:#fbfff0dc;color:#345238;padding:10px 20px;font:600 14px system-ui;cursor:pointer}.endless-button:hover{background:#e7efd8}.endless-button:focus-visible{outline:3px solid #345238;outline-offset:3px}.title-logo{font-family:Hiragino Maru Gothic ProN,Yu Gothic,Meiryo,system-ui,sans-serif;font-size:clamp(44px,9dvh,84px);font-weight:700;letter-spacing:.06em;line-height:1.2;white-space:nowrap}.title-options{width:180px;max-width:100%;justify-content:center}.logo-leaf{right:-10px;top:-3px;width:24px;height:12px}@media(max-width:360px){.title-logo{font-size:clamp(42px,8dvh,62px)}}@media(max-height:450px){.title-logo{font-size:44px}}.audio-controls{display:grid;gap:8px;min-width:0;margin:16px 0}.audio-controls label{display:flex;justify-content:space-between;gap:12px;font-size:15px}.audio-controls output{font-variant-numeric:tabular-nums}.audio-controls input[type=range]{width:100%;min-width:0;min-height:44px;margin:0;accent-color:#517449;touch-action:pan-y}.audio-controls button{min-height:44px}.audio-controls :focus-visible{outline:3px solid #567b42;outline-offset:3px}.phase-a-tag{display:block;margin:12px auto;text-align:center;color:#785b35;font-size:13px;font-weight:700;letter-spacing:1px}.phase-game [data-move=left]{grid-column:1;grid-row:1}.phase-game [data-move=rotate]{grid-column:2;grid-row:1}.phase-game [data-move=right]{grid-column:3;grid-row:1}.phase-game [data-move=down]{grid-column:2;grid-row:2}.phase-game .phase-cell{display:inline-flex;align-items:center;justify-content:center}.phase-mode-label{display:grid;gap:7px;font-size:13px;font-weight:600;max-width:420px}.phase-mode-label select,.phase-bloom-controls select{font:inherit;min-height:44px;max-width:100%;padding:8px;border:1px solid #acba99;border-radius:9px;background:#fffdf7;color:#42543b}.phase-mode-description{font-size:13px;line-height:1.7;padding:10px 14px;border-left:3px solid #92a45c;background:#edf0e2}.phase-bloom-controls{grid-column:1/-1;grid-row:3;display:grid;width:100%;grid-template-columns:1fr 1fr;gap:6px}.phase-bloom-controls p,.phase-bloom-controls select{grid-column:1/-1;font-size:11px;margin:0;line-height:1.6}.phase-bloom-controls #phase-bloom{background:#946c2f;color:#fffaf0;font-size:15px;font-weight:700}.phase-bloom-controls #phase-bloom-cancel{font-size:12px}.phase-bloom-controls button{width:100%}.phase-select{max-width:850px;margin:auto;padding:24px 18px 48px}.phase-select h1{font-family:Georgia,serif;font-size:30px}.phase-intro{font-size:14px;line-height:1.9;max-width:660px}.phase-note{padding:12px 16px;border-radius:12px;background:#edf0e2;font-size:12px;line-height:1.8}.phase-settings{display:flex;flex-wrap:wrap;gap:16px;margin:22px 0}.phase-settings label{font-size:13px;display:grid;gap:6px}.phase-settings input,.phase-settings select,.phase-fixtures select{font:inherit;min-height:44px;padding:9px;border:1px solid #acba99;border-radius:9px;background:#fffdf7;color:#42543b;max-width:100%}.phase-stages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.phase-stage{padding:20px;border:1px solid #c8d2b6;border-radius:18px;background:#fffdf7;display:flex;flex-direction:column;gap:12px}.phase-stage h2{margin:0;font-size:21px}.phase-stage p{font-size:13px;line-height:1.7;margin:0}.phase-stage button{margin-top:auto}.phase-fixtures{margin-top:24px;border-top:1px solid #d2dcc5;padding-top:16px}.phase-fixtures p{font-size:13px;line-height:1.8}.phase-fixtures select{width:100%;margin-bottom:12px}.phase-select summary{cursor:pointer;min-height:44px;padding:10px 0}.phase-game .game-main{--board-width:clamp(264px,calc((100svh - 370px)*var(--board-ratio)),384px)}.phase-game .game-header{height:auto;min-height:54px;gap:10px}.phase-header-note{font-size:11px;text-align:right}.phase-game .hud{gap:15px}.phase-game .hud h1{font-size:19px}.phase-goal strong{font-size:26px}.phase-goal .label{margin-bottom:5px}.phase-meta{font-size:11px;line-height:1.8;overflow-wrap:anywhere}.phase-legend{display:flex;flex-wrap:wrap;gap:6px;font-size:11px}.phase-legend span{white-space:nowrap}.phase-game .next-panel{gap:8px}.phase-piece{display:inline-grid;gap:2px}.phase-cell{display:inline-grid;place-items:center;background:#fffdf4;border:1px solid currentColor;border-radius:8px;width:var(--next-cell,30px);height:var(--next-cell,30px);font-size:15px;font-weight:700}.phase-cell small{font-size:10px;margin-left:2px}.phase-plant{color:#4d793c}.phase-water{color:#26769e}.phase-fire{color:#b64c30}.phase-forecast{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:2px;margin-top:5px;text-align:center}.phase-forecast span{min-height:30px;border-radius:4px;font-size:10px;line-height:1.4;display:grid;place-content:center;background:#f7f5e9}.phase-forecast .stone{border:1px solid #a89f88;background:#e5dfd0;color:#514b42}.phase-forecast small{font-size:9px}.phase-preview{min-height:34px;font-size:11px;line-height:1.5;margin:7px 2px 0;color:#78552d}.phase-game .touch-controls{gap:8px}.phase-top-controls{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px}.phase-top-controls span{font-size:11px}.phase-current{font-size:12px;margin:6px 0}.phase-current .phase-piece{vertical-align:middle;--next-cell:24px}.phase-game .phase-stats{max-width:880px;margin:20px auto 0;padding:12px;border-top:1px solid #cbd4bc}.phase-stats summary{padding:10px;cursor:pointer;font-size:13px}.phase-stats dl,.phase-result-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:12px}.phase-stats dt,.phase-result-stats dt{color:#69775c}.phase-stats dd,.phase-result-stats dd{margin:0;font-weight:600}.phase-stats-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.phase-result-actions{display:grid;gap:9px;margin-top:18px}.phase-rules{font-size:13px;line-height:1.8}.phase-rules li{margin:6px 0}.phase-fixture-badge{background:#fff0c8;color:#7b5226;border-radius:6px;padding:4px 7px;font-size:11px}.phase-game .phase-status{font-size:12px;line-height:1.6;min-height:38px}.phase-select :focus-visible{outline:3px solid #879f54;outline-offset:3px}@media(max-width:699px){.phase-stages{grid-template-columns:1fr}.phase-stage{padding:16px;gap:8px}.phase-select h1{font-size:25px}.phase-select{padding-top:12px}.phase-game .game-header{padding:5px 12px;align-items:center}.phase-header-note{font-size:10px}.phase-game .game-main{--board-width:min(100%,max(256px,calc((100svh - 490px)*var(--board-ratio))));padding-top:3px}.phase-game .hud{gap:6px 10px}.phase-game .phase-meta{grid-column:1/-1;font-size:10px;line-height:1.4}.phase-game .phase-legend{display:none}.phase-game .phase-status{grid-column:1/-1;min-height:20px;font-size:11px}.phase-goal strong{font-size:20px}.phase-goal{order:0}.phase-game .next-panel{flex-wrap:wrap;gap:5px 12px}.phase-preview{font-size:10px}.phase-game .phase-stats{padding:4px 0}.phase-settings{gap:10px}.phase-settings input{width:170px}}@media(max-width:699px){.phase-game .phase-meta,.phase-game .phase-status{display:none}.phase-game .touch-controls{grid-template-columns:44px minmax(0,1fr);gap:6px}.phase-game .phase-top-controls{display:contents}.phase-game .phase-top-controls span{display:none}.phase-game #phase-pause{grid-column:1;grid-row:1}.phase-game .movement-controls{grid-column:2;grid-row:1;width:100%;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:46px;gap:4px}.phase-game .hard-drop{grid-column:1/-1;grid-row:2}.phase-game .phase-preview{min-height:28px;margin-bottom:0}.phase-game .phase-current{margin:0}.phase-game .hud h1{font-size:16px}}.phase-developer{margin:18px 0}.phase-developer>summary{font-size:13px;color:#596b44}.phase-stage-tip{font-size:11px;line-height:1.6;margin:0 0 8px;color:#596b44}#phase-water-preview{font-size:10px;margin:4px 0 0;text-align:center;color:#26769e}.phase-challenges{margin-top:32px;padding-top:20px;border-top:1px solid #c5cbb7}.phase-stage h3{font-size:18px;margin:0}.phase-challenges>p{font-size:13px;line-height:1.7}#phase-board{touch-action:manipulation;user-select:none;-webkit-user-select:none}.campaign-screen{height:100vh;height:100svh;height:100dvh;overflow:hidden}.campaign-select{height:100%;max-width:540px;margin:auto;padding:max(16px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));display:flex;flex-direction:column;gap:16px}.campaign-header{flex:none}.campaign-header h1{font-size:24px;margin:16px 0 0;font-weight:600}.campaign-stages{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;display:flex;flex-direction:column;gap:10px;padding:4px;scroll-padding-block:4px}.campaign-stage{display:flex;flex:none;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:52px;padding:12px 18px;text-align:left;font-size:18px;font-weight:600}.campaign-state{font-size:12px;font-weight:400;white-space:nowrap}.campaign-stage:disabled{opacity:1;background:#eeeee5;color:#68705e;border-color:#d7dbcc}.campaign-save-note{flex:none;margin:0;font-size:12px;line-height:1.5;color:#79552a}@media(max-height:600px){.campaign-select{gap:10px;padding-top:max(10px,env(safe-area-inset-top))}.campaign-header h1{margin-top:10px;font-size:22px}.campaign-stages{gap:8px}}.phase-stage-config{margin:18px 0}.phase-stage-config p{font-size:13px;line-height:1.7}.phase-stage-config label{display:grid;gap:6px}.phase-stage-config select{max-width:100%;min-height:44px;font:inherit}.phase-stage-config pre{max-height:380px;overflow:auto;background:#f4f4ea;padding:12px;font-size:12px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.phase-art{display:inline-block;position:relative;width:100%;height:100%;flex:none;vertical-align:middle;pointer-events:none}.phase-art img{display:block;width:100%;height:100%;object-fit:contain}.phase-art-fallback{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center}.phase-art:not(.is-missing)>.phase-art-fallback{visibility:hidden}.phase-art.is-missing>img{display:none}.phase-cell{position:relative;overflow:hidden}.phase-cell>small{position:absolute;right:0;bottom:0;margin:0;padding:1px 2px;line-height:1;font-size:10px;color:#fff;background:var(--spirit-color);border-radius:3px 0 0}.phase-plant{--spirit-color:#4d793c}.phase-water{--spirit-color:#26769e}.phase-fire{--spirit-color:#b64c30}.phase-legend>span{display:inline-flex;align-items:center;gap:2px}.phase-legend .phase-art{width:24px;height:24px}.phase-stone-art{display:inline-block;position:relative;width:32px;height:32px;flex:none;vertical-align:middle;line-height:1;color:#403a32}.phase-stone-art img{display:block;width:100%;height:100%;object-fit:contain}.phase-stone-hp{position:absolute;top:1px;left:1px;min-width:11px;height:11px;padding:0 2px;text-align:center;background:#fff9e9;color:#403a32;font:700 11px/11px system-ui;border-radius:2px}.phase-stone-fallback{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:end center;padding-bottom:2px;background:#ddd8ca;border:1px solid #817768;border-radius:4px;font:10px system-ui}.phase-stone-art:not(.is-missing)>.phase-stone-fallback{visibility:hidden}.phase-stone-art.is-missing>img{display:none}.phase-forecast>span{display:grid;place-items:center;place-content:center}.phase-forecast .phase-stone-art{display:block;width:100%;height:100%;aspect-ratio:1;min-height:0;background:none;border-radius:0;line-height:1}.phase-forecast>span.stone{display:block;aspect-ratio:1;background:#f7f5e9;border:0}.phase-forecast .phase-stone-hp{font-size:11px}.phase-forecast .phase-stone-fallback{min-height:0;display:grid;place-items:end center;place-content:normal;background:#ddd8ca;border-radius:4px;line-height:1}.phase-stone-legend{display:flex;flex-wrap:wrap;gap:6px 12px;margin:8px 0;font-size:12px}.phase-stone-legend>span{display:inline-flex;align-items:center;gap:4px}.phase-initial-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));width:256px;max-width:100%;background:#e9eddd;border:1px solid #bdcaae}.phase-initial-cell{display:block;aspect-ratio:1;min-width:0;border:.5px solid #bdcaae}.phase-initial-cell>.phase-stone-art,.phase-initial-cell>.phase-cell{width:100%;height:100%;--next-cell:100%}.phase-game .phase-preview{min-height:0;margin:4px 2px;font-size:11px}.phase-game .phase-preview[hidden],.phase-game .phase-note:empty{display:none}.campaign-game .phase-meta,.campaign-game .phase-legend,.campaign-game .phase-status{display:none}.campaign-game .game-header{min-height:42px}.phase-game .next-panel{margin-top:4px}.phase-game .board-frame{background:#866449;border-color:#604832;box-shadow:inset 0 1px #a98a68,0 12px 30px #60483224}.phase-game .primary{background:#2f5945;color:#fffbed;border-color:#244735}.phase-game .primary:hover:not(:disabled){background:#244735}.phase-game button:focus-visible{outline:3px solid #2f5945;outline-offset:3px}.phase-game .game-layout{grid-template-columns:140px minmax(264px,var(--board-width))}.phase-game .hud{display:flex;flex-direction:column;align-items:stretch;gap:14px}.phase-game .hud h1{order:0}.phase-game .score-panel{order:1}.phase-game .hud .next-panel{order:2;display:flex;flex-direction:column;align-items:flex-start;gap:14px;min-height:0;padding:0;margin:0;width:100%;--next-cell:26px}.phase-game .phase-current{margin:0;font-size:inherit}.phase-game .phase-current .phase-piece{--next-cell:26px}.phase-game .phase-current .label,.phase-game .phase-upcoming .label{margin-bottom:5px}.phase-game .phase-goal{order:3}.phase-game .rise-warning{order:4}.phase-game .phase-meta{order:5}.phase-game .phase-legend{order:6}.phase-game .phase-status{order:7}.phase-game .touch-controls{display:grid;grid-template-columns:44px minmax(0,1fr);gap:8px}.phase-game .phase-top-controls{display:contents}.phase-game #phase-pause{grid-column:1;grid-row:1;width:44px;height:46px}.phase-game .movement-controls{grid-column:2;grid-row:1;grid-template-columns:repeat(3,minmax(44px,1fr));grid-template-rows:46px;gap:4px;width:100%}.phase-game .phase-bloom-controls{grid-row:2}.phase-game .phase-bloom-controls p{grid-column:1/-1}#phase-board:focus-visible{outline:3px solid #2f5945;outline-offset:2px}#phase-hidden-options{display:grid;gap:8px;margin-bottom:14px}#phase-hidden-options button{display:flex;align-items:center;gap:8px;text-align:left;font-size:13px}#phase-hidden-options .phase-art{width:36px;height:36px}#phase-hidden-close{width:100%}@media(max-width:699px){.phase-game .game-main{padding:4px max(6px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}.phase-game .game-layout{display:grid;grid-template-columns:70px minmax(0,1fr);grid-template-rows:auto auto;gap:8px 6px;width:100%;max-width:408px;margin:auto}.phase-game .hud{grid-column:1;grid-row:1;gap:12px;padding:2px 0;min-width:0}.phase-game .hud h1{font-size:12px;line-height:1.3;letter-spacing:0;overflow-wrap:anywhere}.phase-game .score-panel{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;min-width:0}.phase-game .score-panel strong{font-size:14px;overflow-wrap:anywhere;max-width:100%}.phase-game .hud .next-panel{gap:12px;align-items:flex-start;--next-cell:22px}.phase-game .phase-current .phase-piece{--next-cell:22px}.phase-game .phase-piece{gap:1px}.phase-game .phase-cell>small{font-size:9px;padding:0 1px}.phase-game .phase-current .label,.phase-game .phase-upcoming .label{font-size:10px;margin-bottom:4px}.phase-game .phase-goal strong{font-size:16px;line-height:1.3;overflow-wrap:anywhere}.phase-game .rise-warning{padding:6px 3px;text-align:center;width:100%;align-self:stretch}.phase-game .rise-warning strong{font-size:12px;line-height:1.4}.phase-game .rise-warning .label{font-size:10px}.phase-game .rise-track{margin-top:5px}.phase-game .board-section{grid-column:2;grid-row:1;min-width:0}.phase-game .touch-controls{grid-column:1/-1;grid-row:2;gap:6px}.phase-game .phase-meta,.phase-game .phase-status{display:none}}@media(max-width:339px){.phase-game .game-main{padding-left:max(4px,env(safe-area-inset-left));padding-right:max(4px,env(safe-area-inset-right))}.phase-game .game-layout{grid-template-columns:66px minmax(0,1fr);column-gap:4px}.phase-game .hud .next-panel,.phase-game .phase-current .phase-piece{--next-cell:20px}}.phase-game .rise-warning strong span{display:block;white-space:nowrap}.campaign-game{min-height:100vh;min-height:100svh;min-height:100dvh;background:#f8f7ef url(/assets/backgrounds/generated/garden_light_v1.png) center top/cover no-repeat}.phase-game .guardian-counts{order:2;display:grid;gap:4px;padding:4px;border-radius:9px;background:#fffdf4dc}.phase-game .guardian-counts[hidden]{display:none}.guardian-count{display:flex;align-items:center;gap:6px;min-width:0;min-height:32px}.guardian-count-icon{display:block;width:32px;height:32px;flex:none}.guardian-count-value{white-space:nowrap;font-size:15px;line-height:1.2;font-variant-numeric:tabular-nums;color:#42543b}.guardian-count-value strong{font-weight:700;margin-left:2px}.phase-game .hud .next-panel{order:3}.phase-game .phase-goal{order:4}.phase-game .rise-warning{order:5}.phase-game .phase-meta{order:6}.phase-game .phase-legend{order:7}.phase-game .phase-status{order:8}@media(max-width:699px){.phase-game .hud{gap:8px}.phase-game .hud .next-panel{gap:10px}.phase-game .guardian-counts{gap:2px;padding:3px}.guardian-count{gap:2px;min-height:26px}.guardian-count-icon{width:26px;height:26px}.guardian-count-value{font-size:12px}.guardian-count-value strong{margin-left:0}}.phase-stone-erasure{position:absolute;top:2px;right:2px;bottom:2px;left:2px;display:grid;place-items:center;background:#96613f;border:2px solid #59331f;border-radius:7px;color:#fff1d2;text-shadow:0 1px #59331f;font:700 17px system-ui;box-shadow:inset 2px 2px #c99b71,inset -2px -2px #70472d}.phase-stone-art[data-stone-kind=spirit-attack]>.phase-stone-attack{background:#59331f}.phase-stone-attack{position:absolute;right:0;bottom:0;min-width:1.8em;padding:0 2px;background:#663b83;color:#fff;font:700 12px/1.25 system-ui;text-align:center}.phase-stone-art[data-stone-kind=spirit-attack].is-missing>.phase-stone-fallback{background:transparent;color:#fff1d2;text-shadow:0 1px #59331f;place-items:center;padding:0;border:0;font:700 17px system-ui}.phase-stone-art[data-stone-kind=spirit-attack]>img{position:relative}.endless-select{max-width:620px}.endless-select li{margin:10px 0;line-height:1.6}.endless-select #endless-start{min-height:48px;width:100%}.endless-record{display:grid;gap:8px;background:#edf1df;border-radius:14px;padding:20px;margin:22px 0}.endless-record strong{font-size:32px;overflow-wrap:anywhere}.endless-game #endless-threshold{display:block;font-size:11px;line-height:1.4;overflow-wrap:anywhere;margin-top:4px}.endless-game .endless-best-label{margin-top:6px}.endless-game #endless-best{font-size:16px}@media(max-width:699px){.endless-game #endless-best{font-size:12px}.endless-game .hud{gap:6px}}@media(max-width:699px){.endless-game .hud{gap:4px}.endless-game .score-panel{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:3px}.endless-game .score-panel>.label:first-child,.endless-game #phase-score{grid-column:1/-1}.endless-game .endless-best-label{margin-top:0;font-size:10px}.endless-game #endless-best{font-size:11px;align-self:center}.endless-game #endless-threshold{font-size:10px;line-height:1.25;margin-top:2px}.endless-game .phase-goal strong{font-size:14px}}.endless-game .board-frame{position:relative}.endless-feedback{position:absolute;z-index:4;top:calc(100% / 13 + 12px);left:8px;right:8px;display:grid;justify-items:center;gap:5px;pointer-events:none}.endless-feedback p{margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#31573b;font:bold clamp(14px,2vw,18px)/1.35 system-ui;box-shadow:none;text-shadow:0 1px 2px #fffdf4,0 0 5px #fffdf4}.endless-feedback p[hidden]{display:none}.phase-game .board-section{position:relative}.phase-game .phase-preview{position:absolute;z-index:3;top:calc(100% / 13 + 12px);left:9px;right:9px;margin:0;padding:3px 5px;border-radius:4px;background:#fff9e9ed;text-align:center;pointer-events:none}.phase-game .board-section:has(.endless-feedback p:not([hidden])) .phase-preview{top:calc(100% / 13 + 90px)}.phase-game .touch-controls{grid-template-columns:44px repeat(3,minmax(44px,1fr))}.phase-game .movement-controls,.phase-game .phase-bloom-controls{display:contents}.phase-game .phase-bloom-controls[hidden]{display:none}.phase-game [data-move=left]{grid-column:2}.phase-game [data-move=rotate]{grid-column:3}.phase-game [data-move=right]{grid-column:4}.phase-game #phase-drop{grid-column:3;grid-row:2;width:100%;font-size:15px;font-weight:700;touch-action:manipulation}.phase-game #phase-bloom{grid-column:1/3;grid-row:2}.phase-game #phase-bloom-cancel{grid-column:4;grid-row:2}.phase-game .movement-controls button{width:100%}
