:root{font-family:"Microsoft YaHei",sans-serif;color:#3f473b;background:#f7f5ed}*{box-sizing:border-box}body{margin:0}header{max-width:1080px;margin:auto;padding:28px 32px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e6e4d9}header #logo{font-weight:700;font-size:22px;color:inherit;text-decoration:none}header span{color:#8a8d7e;font-size:12px}main{max-width:760px;margin:48px auto;padding:0 24px}h1{font-size:44px;font-weight:500;line-height:1.4;letter-spacing:1px;margin:12px 0}em{font-style:normal;color:#a56b4e}.eyebrow{font-size:11px;letter-spacing:3px;color:#92957f}.muted,.card p{color:#7d8273;font-size:14px;line-height:1.9}.card{margin-top:30px;background:#fffdf7;border:1px solid #e9e6d8;border-radius:28px;overflow:hidden;display:grid;grid-template-columns:1fr 1fr;box-shadow:0 15px 45px #5b624409}.art{background:#fff6ea;display:flex;align-items:center}.art img{display:block;width:100%;height:auto;object-fit:contain}.cardbody{padding:32px 24px}.tag{color:#9b7659;font-size:12px}h2{font-size:23px;font-weight:500}button{font:inherit;cursor:pointer;border:0;border-radius:40px;padding:16px 25px;background:#697b60;color:white;font-size:15px;min-height:48px}button:hover{filter:brightness(.94)}button:focus-visible,a:focus-visible{outline:3px solid #b48154;outline-offset:4px}button span{margin-left:20px}.parts{margin-top:32px}h3{font-size:16px;font-weight:500}.chips{display:flex;gap:10px;flex-wrap:wrap}.chips button{background:#e6eada;color:#59674e;padding:11px 24px}.chips button:disabled{background:#eeede5;color:#a09f95;cursor:default}.foot{text-align:center;color:#959887;font-size:12px;margin-top:32px}#exercise,#done{text-align:center;max-width:540px;margin:auto}.exercise-art{border-radius:28px;margin:24px 0}.exercise-art svg{max-height:285px}#instruction{line-height:1.9;font-size:15px}.safety{color:#928b7b;font-size:12px}.timer{margin:26px 0}.timer span{display:block;font-size:60px;font-weight:400;font-variant-numeric:tabular-nums}.timer small{color:#939783}.controls{display:flex;justify-content:center;gap:12px}.secondary{background:#e9e9dd;color:#68725d}.flower{position:relative;font-size:190px;color:#d1a067;line-height:1.5}.flower span{position:absolute;font-size:22px;color:#6d654f;left:50%;top:48%;transform:translate(-50%,-50%)}#done h1{font-size:30px}#done>button{display:block;min-width:240px;margin:16px auto}[hidden]{display:none!important}@media(max-width:600px){header{padding:22px}header span{display:none}main{margin:32px auto;padding:0 22px}h1{font-size:36px}.card{display:block}.art img{max-height:250px}.cardbody{padding:24px}.cardbody button{width:100%}.chips button{padding:10px 18px}#done h1{font-size:27px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}



/* M1: preserve comfortable touch targets and uncropped artwork on narrow screens. */
.art{background:#f7f5ed}
.controls{flex-wrap:wrap}
.controls button{min-width:112px}
#done>button{min-width:0;width:min(100%,280px)}
@media(max-width:360px){main{padding:0 16px}h1{font-size:32px}.cardbody{padding:22px 18px}.chips{gap:8px}.chips button{padding:10px 14px}}
/* Compact mobile home; other screens retain their existing layout. */
@media(max-width:600px){
 body:has(#home:not([hidden])) header{padding:10px 20px;border-bottom:0}
 body:has(#home:not([hidden])) header #logo{font-size:15px}
 body:has(#home:not([hidden])) main{margin:8px auto 16px;padding:0 20px}
 #home>.eyebrow{display:none}
 #home>h1{font-size:28px;line-height:1.3;margin:0 0 6px;letter-spacing:0}
 #home>h1 br{display:none}
 #home>.muted{font-size:13px;line-height:1.5;margin:0 0 14px}
 #home .card{margin-top:0;border-radius:22px}
 #home .art img{height:clamp(140px,28svh,220px);max-height:none;object-fit:contain}
 #home .cardbody{padding:16px 18px}
 #home h2{font-size:21px;line-height:1.4;margin:8px 0 12px}
 #home .cardbody p{display:none}
 #home .cardbody button{padding:12px 20px;min-height:48px}
 #home .parts{margin-top:18px}
 #home .parts h3{font-size:15px;line-height:1.5;margin:0 0 12px}
 #home .chips{display:flex;flex-wrap:wrap;gap:8px}
 #home .chips button{padding:10px 12px;font-size:13px;min-height:44px}
 #home>.foot{display:none}
}
@media(max-width:360px){
 body:has(#home:not([hidden])) main{padding:0 16px}
 #home>h1{font-size:25px}
 #home .chips{gap:6px}
 #home .chips button{padding:10px}
}
/* Mobile exercise and completion: keep the controls close to the artwork. */
@media(max-width:600px){
 body:has(#exercise:not([hidden])) header{display:none}
 body:has(#done:not([hidden])) header{padding:10px 20px;border-bottom:0}
 body:has(#done:not([hidden])) header #logo{font-size:15px}
 body:has(#done:not([hidden])) main{margin:12px auto 16px}
 #done>.eyebrow{display:none}
 #done .flower{font-size:120px;line-height:1.3}
 #done>h1{font-size:25px;line-height:1.4;margin:12px 0}
 #done>.muted{margin:10px 0}
 #done>button{margin:12px auto}
 #done>.foot{margin-top:16px}
}

/* Match the illustration edge color without cropping the figure. */
#home .art{background:#fef5ea}

/* Small spacing-only adjustment to bring exercise controls into view. */
@media(max-width:600px){
 body:has(#exercise:not([hidden])) main{margin:20px auto 16px}
 #exercise>.eyebrow{margin:6px 0}
 #exercise>h1{margin:8px 0}
 #exercise>.muted{margin:8px 0}
 #exercise .exercise-art{margin:16px 0}
 #exercise #instruction{margin:10px 0}
 #exercise .safety{margin:8px 0}
 #exercise .timer{margin:16px 0}
}
/* Give the home illustration more room and anchor choices within the viewport. */
@media(max-width:600px){
 #home{min-height:calc(100svh - 62px);display:flex;flex-direction:column}
 #home .card{flex-shrink:0}
 #home .art{height:clamp(220px,36svh,310px);justify-content:center}
 #home .art img{height:100%;width:100%;max-height:none;object-fit:contain}
 #home .parts{margin-top:auto;padding-top:14px;padding-bottom:8px}
 #home #part-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #home .chips button{padding:10px 4px;min-height:44px;white-space:nowrap}
}
/* Mobile exercise: soften the title and leave breathing room at both ends. */
@media(max-width:600px){
 body:has(#exercise:not([hidden])) main{margin:32px auto 0;padding-bottom:max(28px,env(safe-area-inset-bottom))}
 #exercise>h1{font-size:30px;line-height:1.4}
}
/* Two available body parts use the existing chip layout. */
.chips button[aria-pressed="false"]{background:#eeede5;color:#68725d}

/* One intact frame uses the full illustration area, without a side-by-side split. */
.art{min-width:0;justify-content:center}
.exercise-art{overflow:hidden}
.exercise-art img{width:100%;height:auto;max-height:330px;object-fit:contain}
.timer[data-phase="preparing"] span{font-size:72px;color:#a56b4e}
#action-options{margin-top:12px}
#action-options button{white-space:normal;text-align:left}
@media(max-width:600px){
 .exercise-art img{height:min(250px,36svh);max-height:none}
 .exercise-art.two-frames img{height:min(300px,40svh)}
 #home #action-options{display:flex}
 #home #action-options button{padding:10px 14px;white-space:normal}
}

/* Overlap invisible full-length copies so switching text never collapses the row.
   Grid recalculates wrapping naturally when viewport width or font size changes. */
#instruction{display:grid}
#instruction>span{grid-area:1 / 1;min-width:0}
#instruction .instruction-reserve{visibility:hidden;pointer-events:none;user-select:none}

/* Short mobile exercise view: keep pause accessible without changing the home layout. */
@media(max-width:600px) and (max-height:620px){
 body:has(#exercise:not([hidden])) main{margin:16px auto 0;padding-bottom:max(16px,env(safe-area-inset-bottom))}
 #exercise>h1{font-size:28px;line-height:1.35;margin:6px 0}
 #exercise .exercise-art{margin:12px 0}
 #exercise .exercise-art img,#exercise .exercise-art.two-frames img{height:clamp(120px,29svh,180px)}
 #exercise #instruction{font-size:14px;line-height:1.75;margin:8px 0}
 #exercise .timer{margin:12px 0}
 #exercise .timer span{font-size:54px}
 #exercise .timer[data-phase="preparing"] span{font-size:64px}
 #exercise .controls button{padding:14px 20px;min-height:48px}
}

/* Keep the start label centered; one shared reminder remains visible on mobile. */
#start{display:inline-flex;align-items:center;justify-content:center;text-align:center}
#home .cardbody #home-safety{display:block;font-size:12px;line-height:1.6;color:#7d8273;margin:10px 0 0;text-align:left}

/* Balance short guidance without reducing type size; reserves use the same wrapping. */
#instruction>span{text-wrap:balance;word-break:normal;overflow-wrap:normal}

/* Static brand mark: retain its appearance without navigation or tap feedback. */
#logo{cursor:default;-webkit-tap-highlight-color:transparent}

/* Noninteractive copy only: leave button taps, focus, scrolling and zoom untouched. */
#logo,header>span,main>section>h1,main>section>p,
#home h2,#home .tag,#home .parts h3,#home .safety,
#instruction,#instruction>span,#time,#timer-status,#done .flower,#done .flower span{
 -webkit-user-select:none;user-select:none;
 -webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;
}
/* Let the homepage use the viewport's actual remaining space, with natural overflow as a fallback. */
@media(max-width:600px){
 body:has(#home:not([hidden])){min-height:100svh;display:flex;flex-direction:column;justify-content:center}
 body:has(#home:not([hidden])) header{width:100%;margin:0 auto;padding:max(22px,env(safe-area-inset-top)) 20px 6px;flex-shrink:0}
 body:has(#home:not([hidden])) main{width:100%;flex:0 0 auto;display:flex;margin:4px auto 0;padding:0 20px max(22px,env(safe-area-inset-bottom))}
 #home{min-height:0;flex:1}
 #home>.muted{margin-bottom:10px}
 #home .art{height:clamp(140px,calc(100svh - 440px),380px)}
 #home .parts{margin-top:24px;padding-top:0;padding-bottom:0;flex-shrink:0}
}
@media(max-width:360px){body:has(#home:not([hidden])) main{padding-left:16px;padding-right:16px}}
@media(max-width:600px) and (max-height:620px){
 #home .cardbody{padding:16px}
 #home h2{margin:8px 0 12px}
 #home .cardbody #home-safety{margin-top:12px;text-wrap:balance}
 #home .chips button{min-height:44px;padding:10px 4px}
}

/* Use a consistent spacing rhythm without compressing artwork or locking page scrolling. */
@media(max-width:600px){#home .cardbody #home-safety{margin-top:12px}}
