:root{font-family:'Noto Sans TC',sans-serif;color:#364339;background:#ece8dc}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,a,input,select{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;border:0}button:focus-visible{outline:3px solid #cb753d;outline-offset:4px}button:disabled{opacity:.6}#world{position:fixed;inset:0;width:100%;height:100%}header{position:fixed;top:30px;left:42px;right:42px;display:flex;align-items:center;justify-content:space-between}.brand{font-weight:900;font-size:32px;letter-spacing:-2px;color:#354e42;text-decoration:none;line-height:1}.brand span{display:block;font-size:9px;letter-spacing:2.5px;margin-top:9px}.top{display:flex;align-items:center;gap:10px}.top button,#backend{font-size:11px;padding:10px 13px;background:#fff9;border-radius:24px;backdrop-filter:blur(12px)}#backend{color:#5a6b56}.panel{position:fixed;top:50%;left:6%;transform:translateY(-50%);width:310px;padding:30px 28px;background:#fffaf0e8;border:1px solid #fff;border-radius:24px;box-shadow:0 20px 80px #50473312;backdrop-filter:blur(12px)}.eyebrow{font-size:9px;letter-spacing:2px;color:#8c977d;font-weight:700}h1{font-size:52px;letter-spacing:-3px;line-height:1.17;margin:22px 0}h1 span{display:block;font-family:Georgia,serif;font-weight:400;font-style:italic;font-size:27px;letter-spacing:0;color:#b88b58;margin-top:13px}.panel p{font-size:13px;line-height:1.9;color:#72786b}.primary{background:#3e5948;color:#fff;width:100%;padding:16px;border-radius:12px;font-weight:700;margin:15px 0}.primary:hover{background:#52765c}.instructions{font-size:10px;line-height:1.9;color:#858878}small{display:block;font-size:9px;color:#989b8c;margin-top:20px}footer{position:fixed;bottom:25px;left:42px;right:42px;display:flex;justify-content:space-between;font-size:10px;letter-spacing:2px;color:#778271}#hud{position:fixed;top:110px;left:50%;transform:translateX(-50%);text-align:center;pointer-events:none}.pill{background:#fff9;border-radius:40px;padding:12px 22px;font-size:12px;backdrop-filter:blur(10px)}#timer{font-weight:700;margin-left:30px;font-variant-numeric:tabular-nums}#hint{background:#fff9;border-radius:20px;padding:10px 18px;white-space:nowrap;font-size:12px}#options{position:fixed;right:40px;top:90px;width:245px;background:#fffaf2f5;border-radius:18px;padding:22px;font-size:12px;box-shadow:0 20px 60px #0001}#options h3{margin-top:0}label{display:block;margin:15px 0}input,select{display:block;width:100%;margin-top:8px;accent-color:#54735a}#options p{color:#929682;line-height:2}#options button{padding:10px;width:100%;border-radius:8px}#mobile{position:fixed;bottom:65px;left:35px;right:35px;display:flex;align-items:end;justify-content:space-between;pointer-events:none}.pad{display:none;grid-template-columns:repeat(3,44px);gap:4px;pointer-events:auto}.pad button,#search{background:#fff9;border:1px solid #fff;border-radius:14px;color:#3c5645;touch-action:none}.pad button{height:44px;font-size:22px}.pad button:first-child{grid-column:2}.pad button:nth-child(2){grid-column:1}#search{pointer-events:auto;padding:15px 28px;margin-left:auto;font-size:15px;font-weight:700}#search span{font-size:8px;display:block;letter-spacing:2px;margin-top:3px}[hidden]{display:none!important}h2{font-size:32px}@media(pointer:coarse){.pad{display:grid}}@media(max-width:700px){header{top:20px;left:20px;right:20px}.brand{font-size:25px}.top{gap:5px}.top button,#backend{font-size:9px;padding:8px}.panel{left:20px;top:auto;bottom:110px;transform:none;width:270px;padding:22px}h1{font-size:38px;margin:12px 0}.panel p{font-size:12px}.eyebrow{font-size:8px}.instructions{font-size:9px}small{margin-top:10px}footer{bottom:18px;left:20px;right:20px;font-size:8px;letter-spacing:1px}footer span:last-child{display:none}#hud{top:85px;width:90%}#hint{white-space:normal}#options{right:20px;top:75px}#mobile{left:20px;right:20px;bottom:50px}}

.characters{display:flex;gap:8px;margin:16px 0}.characters button{display:flex;align-items:center;justify-content:center;gap:8px;flex:1;border:1px solid #ddd9c9;background:#eeeadd;padding:12px 8px;border-radius:12px;font-size:12px}.characters button[aria-pressed="true"]{background:#e2e9d9;border:2px solid #6d8565}.characters i{width:16px;height:16px;border-radius:50%;display:inline-block}.orange{background:#dc8d45}.blue{background:#344b66}#count{display:block;font-size:10px;color:#819174;margin-top:7px}.secondary{width:100%;padding:12px;border-radius:12px;color:#53694f;background:#e8ecdf}.panel .brief{font-size:11px}#intro h1{font-size:44px;margin:15px 0}#intro{max-height:82vh;overflow:auto}@media(max-height:720px){#intro{padding:20px;top:90px;transform:none}#intro h1{font-size:30px;margin:8px 0}#intro h1 br{display:none}#intro .primary{margin:8px 0}#intro small{margin-top:8px}}

/* Oversized toy alarm-clock countdown. */
#hud{top:100px;display:flex;flex-direction:column;align-items:center;width:auto;max-width:90vw}.countdown{--clock-accent:#729174;position:relative;width:150px;height:158px;margin:12px 0 8px;filter:drop-shadow(0 7px 8px #52644b20)}.clock-face{position:absolute;inset:8px 3px 7px;border:5px solid #e4b879;border-radius:50%;background:#fffaf0;box-shadow:inset 0 -5px 0 #f3e8d4,0 3px 0 #b98d56;display:flex;align-items:center;flex-direction:column;justify-content:center}.clock-ring{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}.ring-track,.ring-value{fill:none;stroke-width:5}.ring-track{stroke:#ece7d8}.ring-value{stroke:var(--clock-accent);stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:0;transition:stroke-dashoffset .5s linear,stroke .3s}.clock-caption{font-size:10px;font-weight:700;letter-spacing:2px;color:#92957d;margin-top:2px;z-index:1}#timer{display:block;font-family:ui-rounded,'Arial Rounded MT Bold',sans-serif;font-size:35px;font-weight:900;letter-spacing:-1px;font-variant-numeric:tabular-nums;margin:3px 0 0;line-height:1.15;color:#405b48;z-index:1}.clock-bell{position:absolute;top:0;width:45px;height:24px;background:#edc48a;border:3px solid #c69c65;border-radius:28px 28px 7px 7px}.bell-left{left:4px;transform:rotate(-33deg)}.bell-right{right:4px;transform:rotate(33deg)}.clock-foot{position:absolute;bottom:0;width:10px;height:22px;background:#bb9565;border-radius:6px}.foot-left{left:29px;transform:rotate(25deg)}.foot-right{right:29px;transform:rotate(-25deg)}.clock-smile{display:flex;gap:8px;align-items:center;height:16px;margin-top:4px}.clock-smile i{width:4px;height:5px;border-radius:50%;background:#7d8d72}.clock-smile b{width:12px;height:7px;border:2px solid #7d8d72;border-top:0;border-radius:0 0 9px 9px}.countdown.is-low{--clock-accent:#dc8b43}.countdown.is-low #timer{color:#b16b30}.countdown.is-low .clock-caption{color:#b16b30}.countdown.is-urgent{--clock-accent:#cf7254}.countdown.is-urgent .clock-bell{animation:bell-wiggle .45s ease-in-out infinite alternate}.countdown.is-urgent .bell-right{animation-direction:alternate-reverse}.countdown.is-urgent #timer{color:#bc654b}#hud .pill{padding:9px 20px;font-size:11px}#hud #count{margin-top:3px}#hud #hint{margin:7px 0;max-width:100%;white-space:normal;font-size:11px;padding:8px 16px}@keyframes bell-wiggle{from{rotate:-7deg}to{rotate:7deg}}@media(prefers-reduced-motion:reduce){.countdown.is-urgent .clock-bell{animation:none}.ring-value{transition:none}}@media(max-width:700px){#hud{top:76px;width:92%}.countdown{width:124px;height:132px;margin:8px 0 5px}.clock-face{border-width:4px}.clock-bell{width:37px;height:21px}.clock-caption{font-size:8px;letter-spacing:1px}#timer{font-size:29px}.clock-smile{margin-top:2px;gap:6px}.clock-foot{height:18px;width:8px}.foot-left{left:24px}.foot-right{right:24px}#hud .pill{padding:6px 14px}#hud #hint{font-size:10px;margin-top:5px}}@media(max-height:540px) and (min-width:701px){#hud{top:84px;left:auto;right:24px;transform:none;max-width:260px}.countdown{width:124px;height:132px}#timer{font-size:29px}}

#hud .countdown{position:fixed;left:32px;bottom:76px;top:auto;margin:0;pointer-events:none}#hud .pill{margin-top:0}@media(max-width:700px){#hud .countdown{left:16px;bottom:204px;transform:scale(.83);transform-origin:bottom left}}#options{max-height:calc(100vh - 100px);overflow:auto}
#hud{left:0;right:0;width:100%;max-width:none;transform:none}#hud .countdown{position:fixed;left:32px;bottom:76px}@media(max-width:700px){#hud{left:0;right:0;width:100%}#hud .countdown{left:16px;bottom:204px}}@media(max-height:540px) and (min-width:701px){#hud{left:0;right:0;max-width:none}}

#reveal-marker{position:fixed;z-index:5;transform:translate(-50%,-100%);padding:9px 16px;background:#fff5d6;border:2px solid #dfaa67;border-radius:18px;color:#604f37;font-weight:900;font-size:15px;box-shadow:0 5px 18px #59432344;pointer-events:none;white-space:nowrap}#reveal-marker span{display:block;position:absolute;bottom:-16px;left:50%;transform:translateX(-50%);color:#dfaa67;font-size:15px}

.weather-controls{position:fixed;right:42px;top:88px;z-index:4;display:flex;gap:8px;align-items:flex-start}.weather-group{display:flex;gap:3px;padding:5px 6px;align-items:center;border:1px solid #fff;background:#fffaf0e8;border-radius:16px;box-shadow:0 4px 18px #594d2812;backdrop-filter:blur(10px)}.weather-group-label{font-size:10px;font-weight:700;color:#788770;padding:0 5px}.weather-group button{background:transparent;border:1px solid transparent;border-radius:10px;min-width:43px;min-height:44px;padding:3px 5px;font-size:19px;line-height:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.weather-group button span{font-size:9px;color:#62705e}.weather-group button[aria-pressed="true"]{background:#e4ecdd;border-color:#9bb090;box-shadow:inset 0 0 0 1px #fff}.weather-group button:hover{background:#eff2e8}@media(max-width:850px){.weather-controls{top:72px;right:12px;gap:5px;flex-direction:column;align-items:flex-end}.weather-group{padding:3px}.weather-group-label{font-size:9px;padding:0 3px}.weather-group button{min-width:36px;min-height:39px;font-size:16px;padding:2px}.weather-group button span{font-size:8px}#hud{top:170px}#options{top:175px}}@media(max-width:400px){.weather-controls{top:68px;right:8px}.weather-group button{min-width:32px}#hud{top:164px}}

.weather-group button{color:#657764}.weather-group button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;display:block;flex:none}.weather-group button[aria-pressed="true"]{color:#365642}.weather-group button[aria-pressed="true"] span{color:#365642;font-weight:700}@media(max-width:850px){.weather-group button svg{width:19px;height:19px}}
/* Keep the end-of-round panel away from the centre of the garden. */
#result{top:auto;left:24px;bottom:38px;transform:none;width:min(300px,calc(100vw - 48px));padding:22px 24px;max-height:calc(100dvh - 80px);overflow:auto}
#result h2{margin:12px 0;font-size:28px}
#result p{margin:8px 0;font-size:12px;line-height:1.7}
#result .primary{margin:10px 0;padding:13px}
#result .secondary{padding:10px}
@media(max-width:700px){#result{left:14px;bottom:24px;width:min(250px,calc(100vw - 28px));padding:16px 18px;max-height:45dvh}#result h2{font-size:23px;margin:7px 0}#result p{font-size:11px;margin:5px 0}#result .primary{padding:10px;margin:7px 0}#result .secondary{padding:8px}}

#loading-overlay{position:fixed;inset:0;z-index:100;display:grid;place-items:center;background:#e9ebdff2;backdrop-filter:blur(8px)}#loading-overlay[hidden]{display:none}.loading-card{width:min(290px,calc(100vw - 48px));padding:30px 24px;text-align:center;border:1px solid #fff;border-radius:24px;background:#fffaf2;box-shadow:0 16px 50px #4c59421c;color:#405746;display:flex;flex-direction:column;align-items:center;gap:10px}.loading-card strong{font-size:19px}.loading-card span{font-size:12px;line-height:1.6;color:#788572}.loading-card button{padding:10px 20px;border-radius:10px;background:#49654e;color:white}.hourglass{width:64px;height:64px;animation:hourglass-turn 2.4s ease-in-out infinite}.hourglass svg{width:100%;height:100%;fill:none;stroke:#6d876d;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.hourglass .sand{fill:#dfb77e;stroke:none;opacity:.85}@keyframes hourglass-turn{0%,35%{transform:rotate(0)}50%,85%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.hourglass{animation:none}}

#weather-toggle{display:none}
@media(max-width:700px){body{-webkit-text-size-adjust:100%}header{top:12px;left:14px;right:14px}.brand{font-size:21px}.brand span{font-size:8px;margin-top:5px}.top{gap:4px}.top button,#backend{font-size:9px;padding:8px 9px;color:#405746}#weather-toggle{display:block;position:fixed;right:14px;top:55px;z-index:12;padding:9px 12px;border-radius:18px;background:#fffaf2ed;color:#405746;font-size:11px;border:1px solid #fff}.weather-controls{display:none;top:99px;right:14px;z-index:11}.weather-open .weather-controls{display:flex}#options{top:100px;right:14px;z-index:13;max-height:calc(100dvh - 130px)}#mobile{display:none}body.game-active #mobile{display:flex;bottom:max(20px,env(safe-area-inset-bottom));left:14px;right:14px;z-index:4}.pad{grid-template-columns:repeat(3,42px)}.pad button{height:42px}#search{padding:12px 20px}#search span{display:none}#intro{top:auto;bottom:max(20px,env(safe-area-inset-bottom));left:14px;width:min(270px,calc(100vw - 28px));max-height:min(65dvh,560px);overflow:auto;padding:16px 18px;z-index:5}#intro h1{font-size:32px;line-height:1.05;margin:10px 0}#intro h1 span{font-size:20px;margin-top:5px}#intro p{margin:8px 0}.characters{margin:8px 0}.characters button{padding:9px 6px}.primary{margin:8px 0;padding:12px}#intro small{margin-top:8px}#result{left:14px;bottom:max(20px,env(safe-area-inset-bottom));z-index:8;max-height:50dvh}#hud{top:65px}#hud #hint{max-width:65vw}#hud .countdown{left:12px;bottom:145px;transform:scale(.72);transform-origin:bottom left}footer{display:none}}

#tilt-controls{display:none}@media(max-width:700px){body.game-active #tilt-controls{display:flex;position:fixed;left:14px;bottom:155px;z-index:6;gap:6px;align-items:center;max-width:calc(100vw - 28px);flex-wrap:wrap}#tilt-controls button{background:#fffaf1ed;color:#405746;border:1px solid #fff;border-radius:15px;padding:9px 11px;font-size:11px;min-height:38px}#tilt-controls button[aria-pressed="true"]{background:#e0ecdc;border-color:#8aa284}#tilt-controls span{flex-basis:100%;font-size:10px;color:#405746;background:#fffaf1e8;padding:4px 8px;border-radius:9px;width:max-content;max-width:250px}#hud .countdown{bottom:220px}}
@media(max-width:700px){.pad{grid-template-columns:repeat(3,48px)}.pad button{height:48px;touch-action:none}body.game-active #tilt-controls{bottom:176px}#hud .countdown{bottom:240px}}
@media(max-width:700px){body.game-active #tilt-controls{position:fixed;left:auto;right:14px;bottom:calc(max(20px, env(safe-area-inset-bottom)) + 82px);z-index:30;display:flex;flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:6px;width:min(180px,48vw);max-width:none;pointer-events:auto}#tilt-controls button{display:block;width:100%;min-height:52px;padding:12px 14px;font-size:14px;font-weight:700;border:2px solid #8ba188;box-shadow:0 3px 12px #354b3026;touch-action:manipulation;-webkit-appearance:none;appearance:none}#tilt-controls button[hidden]{display:none}#tilt-controls span{flex-basis:auto;max-width:none;width:100%;font-size:10px;line-height:1.4;text-align:center;padding:6px 8px}#hud .countdown{bottom:155px;left:12px;transform:scale(.65);pointer-events:none}body.game-active #mobile{z-index:4}}

@media(max-width:700px){.pad,.pad button{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.pad button{cursor:pointer}}

/* Touch camera gestures stay on the garden; controls receive their own events. */
#world{touch-action:none}header{pointer-events:none}header .brand,header .top>*{pointer-events:auto}footer{pointer-events:none}

@media(max-width:700px){header{gap:8px;align-items:flex-start}.brand{flex:none}.top{justify-content:flex-end;flex-wrap:wrap;max-width:calc(100vw - 100px)}.top button,#backend{white-space:nowrap;padding:7px 8px}#weather-toggle{top:78px}.weather-controls{top:120px}#options{top:120px}}

/* Use the same logo image and framing as the YONO Daily home page. */
header .brand{display:block;position:relative;width:125px;height:77px;overflow:hidden;mix-blend-mode:multiply;flex:none}
header .brand img{display:block;position:absolute;width:125px;height:125px;max-width:none;top:-23px;left:0}
@media(max-width:700px){header .brand{width:90px;height:56px}header .brand img{width:90px;height:90px;top:-16.5px}.top{max-width:calc(100vw - 126px)}}

/* Separate the header controls from the time and weather controls. */
@media(min-width:701px){header{align-items:flex-start}.top{margin-top:10px;gap:10px}.weather-controls{top:92px;gap:10px}.weather-group{gap:4px}}
@media(max-width:700px){.top{row-gap:6px;column-gap:6px}#weather-toggle{top:84px}.weather-controls{top:128px;gap:8px}#options{top:128px}}

.result-stars{color:#d79b3e;font-size:28px;letter-spacing:5px;margin-top:10px;line-height:1.2}

/* The garden remains visible around the transparent victory artwork. */
#victory-art{position:fixed;z-index:7;inset:5vh 6vw 5vh 25vw;display:grid;place-items:center;pointer-events:none}
#victory-image{position:relative;z-index:1;width:min(62vw,68vh,700px);max-width:100%;max-height:78vh;object-fit:contain;filter:drop-shadow(0 10px 16px #273c293d);animation:victory-pop .65s cubic-bezier(.2,1.35,.4,1) both}
.celebration{position:absolute;inset:8% 12%;overflow:hidden}
.celebration i{position:absolute;top:-8%;left:var(--x);width:10px;height:17px;border-radius:2px;background:var(--c);opacity:0;animation:confetti-fall 2.7s ease-in var(--delay) both}
.celebration i:nth-child(1){--x:8%;--c:#ef9b55;--delay:.1s}
.celebration i:nth-child(2){--x:21%;--c:#a6c58f;--delay:.4s}
.celebration i:nth-child(3){--x:32%;--c:#6ca8cf;--delay:.2s}
.celebration i:nth-child(4){--x:46%;--c:#f4cc72;--delay:.6s}
.celebration i:nth-child(5){--x:58%;--c:#eeaa7d;--delay:.3s}
.celebration i:nth-child(6){--x:70%;--c:#8dbd9b;--delay:.7s}
.celebration i:nth-child(7){--x:82%;--c:#7baacd;--delay:.2s}
.celebration i:nth-child(8){--x:94%;--c:#f2bf69;--delay:.5s}
@keyframes victory-pop{from{opacity:0;transform:translateY(28px) scale(.82)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes confetti-fall{0%{opacity:0;transform:translateY(0) rotate(0)}12%{opacity:1}85%{opacity:1}100%{opacity:0;transform:translateY(60vh) rotate(400deg)}}
@media(max-width:700px){#victory-art{inset:8vh 2vw 31vh;z-index:7}#victory-image{width:min(90vw,52vh);max-height:54vh}#result{z-index:8}}
@media(prefers-reduced-motion:reduce){#victory-image{animation:none}.celebration{display:none}}

/* Attach the illustration to the top of the result card. */
#result.has-victory{overflow:visible}
#result #victory-art{position:absolute;inset:auto;bottom:calc(100% - 6px);left:50%;width:min(100%,32dvh);height:auto;transform:translateX(-50%);display:grid;place-items:center;z-index:1}
#result #victory-image{display:block;width:100%;height:auto;max-width:100%;max-height:32dvh;object-fit:contain}
#result .celebration{inset:0;overflow:visible}
@media(max-width:700px){#result #victory-art{width:min(100%,30dvh)}#result #victory-image{max-height:30dvh}}
@media(max-height:540px){#result #victory-art{width:min(80%,24dvh)}#result #victory-image{max-height:24dvh}}
