*{box-sizing:border-box}body{margin:0;background:#fcf5e8;color:#54321d;font:16px/1.4 system-ui,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;min-height:44px;padding:9px 15px;border:1px solid #b68b5d;border-radius:9px;background:#fffaf0;color:#54321d;cursor:pointer;font-weight:650}button:hover:not(:disabled){background:#f5d99c}button:disabled{opacity:.55;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #13777a;outline-offset:3px}a{color:inherit}.primary{background:#6b3d22;color:#fff9ec;border-color:#6b3d22}.primary:hover:not(:disabled){background:#885031}main{max-width:1120px;padding:14px 26px;margin:auto}nav,header,.toolbar,.stats,footer,.about{display:flex;align-items:center;justify-content:space-between;gap:12px}nav{font-size:14px}nav img,footer img{display:block}header{margin:14px 0 12px}h1{font:bold clamp(30px,4vw,46px)/1.1 Georgia,serif;margin:4px 0}h1 em{color:#a76420;font-weight:400}.eyebrow{font-size:12px;letter-spacing:1.6px;font-weight:750;margin:0}.tagline{font:italic 17px Georgia,serif;max-width:170px}.toolbar{justify-content:flex-start;flex-wrap:wrap;margin-bottom:12px}.stats{border-block:1px solid #d8bd95;padding:9px 18px;background:#f3e6ce;margin-bottom:14px;border-radius:8px}.stats>div{display:flex;align-items:baseline;gap:12px}.stats span{font-size:12px;letter-spacing:.5px}.stats strong{font-size:25px;font-variant-numeric:tabular-nums}.workspace{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(270px,1fr);gap:18px}.bakery{position:relative;border:1px solid #caa16e;border-radius:15px;overflow:hidden;background:#f6e5c9}.scene{height:270px;position:relative;overflow:hidden}.scene>img{width:100%;height:100%;object-fit:cover}.scene-label,#brew-lock{position:absolute;background:#fff7e8ed;border:1px solid #c69c66;border-radius:20px;padding:5px 10px;font-size:12px;font-weight:750}.scene-label{top:12px;left:12px}#brew-lock{bottom:10px;right:10px}.production{display:grid;grid-template-columns:1fr 1fr;padding:14px 18px;gap:20px}.station-title{display:flex;justify-content:space-between;gap:5px;font-size:14px}.station-title strong{font-family:Georgia,serif;font-size:20px}.production small{font-size:12px;display:block}.locked{opacity:.55}progress{appearance:none;-webkit-appearance:none;height:12px;display:block;width:100%;border:0;border-radius:8px;overflow:hidden;background:#dec7a5;margin:7px 0}progress::-webkit-progress-bar{background:#dec7a5;border-radius:8px}progress::-webkit-progress-value{background:linear-gradient(90deg,#ae651e,#efb339);border-radius:8px}progress::-moz-progress-bar{background:#cb8d28;border-radius:8px}.care{padding:0 0 4px}.yeast{display:flex;gap:12px;align-items:center;margin-bottom:10px}.yeast>img{width:88px;height:93px;object-fit:contain;mix-blend-mode:multiply}.yeast>div{display:grid;gap:4px}.yeast i{font-size:13px}.yeast strong{font:19px Georgia,serif}.yeast span{font-size:12px}.sugar-heading,.mood-heading{display:flex;justify-content:space-between;font-size:14px}.care button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:4px}button small{font-size:12px;display:block;font-weight:500}.feed{background:#f3e7d0}#bubbly{background:linear-gradient(#ffe6a2,#f0b52e);border:1px solid #b57c1f;box-shadow:0 3px 0 #ae762830}#bubbly.ready{opacity:1;outline:2px solid #e3ad30;outline-offset:2px}.care p{font-size:12px;margin:5px 0 15px;min-height:18px}#instruction{font-weight:650;font-size:14px;margin:12px 0;min-height:20px}.upgrades{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.upgrades button{display:flex;align-items:center;text-align:left;padding:9px;gap:8px;min-width:0;background:#fff9ee}.upgrades img{width:75px;height:76px;object-fit:contain;mix-blend-mode:multiply}.upgrades span{display:grid;gap:3px}.upgrades strong{font-size:14px}.upgrades small{font-size:12px}.upgrades b{font-size:14px;color:#8e571a}.upgrades .owned{border-color:#58775e;background:#edf0df}.footnote{font-size:12px;text-align:center;color:#725b42;margin:15px 0}.overlay{position:absolute;inset:0;background:#fff5e6f5;z-index:3;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:20px;gap:9px}.overlay[hidden]{display:none}h2{font:34px/1.1 Georgia,serif;margin:5px 0}.overlay p{font-size:16px;margin:5px 0 10px;white-space:pre-line;max-width:450px}#stars{font-size:30px;letter-spacing:8px;color:#976015}.about{border-block:1px solid #dbc6a8;padding:24px max(24px,calc((100vw - 1068px)/2));font-size:13px}.about>span{font-size:40px}.about p:last-child{font-size:12px}footer{max-width:1120px;padding:24px 26px;margin:auto;flex-wrap:wrap;font-size:12px}dialog{width:calc(100% - 30px);max-width:620px;max-height:85vh;overflow:auto;border:1px solid #b68b5d;border-radius:14px;padding:24px;background:#fff8eb;color:#54321d}dialog::backdrop{background:#35200ec9}dialog h2{font-size:30px}dialog p{font-size:16px}details{margin:18px 0}summary{font-weight:700;cursor:pointer}#bubble-effect{position:absolute;inset:0;pointer-events:none;display:none}.bursting #bubble-effect{display:block}#bubble-effect i{position:absolute;width:24px;height:24px;border:2px solid #fff4d6;border-radius:50%;background:#ffc83c40;bottom:10%;left:20%;box-shadow:inset 3px 3px 5px #fff8}#bubble-effect i:nth-child(2){left:45%;bottom:55%;width:18px;height:18px}#bubble-effect i:nth-child(3){left:70%;bottom:30%}#bubble-effect i:nth-child(4){left:85%;bottom:70%;width:15px;height:15px}.bursting .bakery{box-shadow:0 0 0 3px #efbc55}
@media(prefers-reduced-motion:no-preference){.bursting #bubble-effect i{animation:bubble 2s ease-in-out infinite alternate}#bubble-effect i:nth-child(2n){animation-delay:-1s}@keyframes bubble{to{transform:translateY(-35px);opacity:.45}}}
@media(min-width:591px) and (max-height:800px){main{padding-top:9px}header{margin:7px 0}h1{font-size:34px}.tagline{margin:4px 0}.toolbar{margin-bottom:8px}.stats{padding:5px 12px;margin-bottom:10px}.scene{height:215px}.yeast{margin-bottom:6px}.yeast>img{height:66px;width:65px}.care p{margin:4px 0 10px}.care button{min-height:40px;padding:6px 9px}.care progress{margin:5px 0}.production{padding:10px 14px}#instruction{margin:8px 0}.upgrades img{height:60px;width:65px}}
@media(max-width:800px){main{padding:12px 16px}.tagline{display:none}.workspace{gap:12px;grid-template-columns:minmax(0,1.3fr) minmax(250px,1fr)}.scene{height:245px}.stats>div{display:block}.stats span{display:block}.production{padding:10px;gap:10px}.station-title{display:block}.upgrades img{width:50px;height:62px}.upgrades button{gap:5px}.yeast>img{width:70px}.care button{padding:8px}.about p:last-child{display:none}}
@media(max-width:590px){main{padding:10px 12px}header{margin:10px 0}h1{font-size:32px}.eyebrow{font-size:11px}.toolbar{gap:5px;margin-bottom:9px}.toolbar button{padding:7px 10px;font-size:14px}.stats{padding:7px 10px;margin-bottom:10px;gap:7px}.stats span{font-size:10px;letter-spacing:0}.stats strong{font-size:22px}.workspace{display:flex;flex-direction:column;gap:10px}.scene{height:170px}.production{padding:8px 10px}.station-title{display:flex}.station-title strong{font-size:18px}.station-title span{font-size:12px}.production small{font-size:10px}.production progress{margin:4px 0;height:9px}.care{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.yeast{display:none}.sugar-heading{grid-column:1;grid-row:1}.mood-heading{grid-column:2;grid-row:1}.care progress{grid-row:2}#sugar{grid-column:1}#mood{grid-column:2}.care button{grid-row:3;display:block;padding:6px 4px;font-size:15px;min-height:49px}.care button small{font-size:10px}#feed{grid-column:1}#bubbly{grid-column:2}.care p{grid-row:4;margin:4px 0 0;font-size:11px;min-height:30px}#sugar-tip{grid-column:1}#mood-tip{grid-column:2}.sugar-heading,.mood-heading{font-size:12px}.overlay{padding:12px;gap:5px}.overlay h2{font-size:28px}.overlay p{font-size:14px;margin:4px 0 6px}.scene-label,#brew-lock{font-size:10px;padding:4px 8px}#instruction{font-size:13px;margin:6px 0 10px;min-height:36px}.upgrades{grid-template-columns:1fr;gap:7px}.upgrades button{padding:5px 10px;gap:12px}.upgrades img{width:55px;height:57px}.upgrades span{grid-template-columns:1fr auto;align-items:center;width:100%}.upgrades strong{grid-column:1}.upgrades small{grid-column:1}.upgrades b{grid-column:2;grid-row:1/3}.footnote{font-size:11px}.footnote span{display:block}.about{padding:16px;gap:15px}footer{padding:18px 16px}.about p{font-size:12px}}
@media(max-width:590px) and (max-height:650px){nav img{width:110px;height:auto}header{margin:7px 0}h1{font-size:27px}header .eyebrow{display:none}.toolbar{gap:4px}.toolbar button{min-height:38px;padding:6px;font-size:12px}.stats{padding:4px 9px;margin-bottom:7px}.stats strong{font-size:20px}.scene{height:112px}.workspace{gap:6px}.production{padding:6px 10px}.care p{min-height:28px}#instruction{margin:5px 0 8px;min-height:36px}.overlay h2{font-size:23px}.overlay p{font-size:12px}.overlay button{min-height:36px;padding:5px 10px}}
@media(max-height:430px) and (min-width:480px){main{padding:6px 12px}nav{position:absolute;right:12px;top:8px}nav img{width:95px;height:auto}nav a:last-child{font-size:12px}header{margin:0 0 6px}h1{font-size:26px}header .eyebrow,.tagline{display:none}.toolbar{gap:5px;margin:5px 0 7px}.toolbar button{min-height:34px;padding:4px 10px;font-size:13px}.stats{position:absolute;right:12px;top:43px;width:235px;padding:2px 7px;margin:0;gap:6px}.stats>div{display:block}.stats span{font-size:9px}.stats strong{font-size:18px}.workspace{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(220px,1fr);gap:12px}.scene{height:112px}.production{padding:6px 9px}.station-title{display:flex;font-size:11px}.station-title strong{font-size:17px}.station-title span{font-size:11px}.production small{font-size:10px}.production progress{height:7px;margin:3px 0}.yeast{display:none}.care{display:block}.care button{min-height:38px;padding:4px 7px}.care p{font-size:10px;margin:2px 0 4px;min-height:14px}.care progress{height:9px;margin:4px 0}.sugar-heading,.mood-heading{font-size:12px}.care button small{font-size:10px}#instruction{margin:6px 0;min-height:20px;font-size:12px}.overlay h2{font-size:25px}.overlay p{font-size:12px;margin:0 0 4px}.overlay{padding:9px;gap:4px}.overlay button{min-height:34px;padding:4px 10px}.upgrades{grid-template-columns:repeat(3,1fr);gap:6px}.upgrades img{width:38px;height:45px}.upgrades button{padding:4px;gap:5px}.upgrades strong{font-size:12px}.upgrades small{font-size:10px}.upgrades b{font-size:11px}.footnote{margin:7px 0}#stars{font-size:23px}.scene-label,#brew-lock{font-size:9px;padding:3px 6px}}

/* Live batch details follow production; all motion stops while paused. */
.live-bread{display:inline-block;position:relative;width:31px;height:19px;vertical-align:middle}.live-bread .dough{position:absolute;left:3px;bottom:3px;width:25px;height:17px;background:radial-gradient(ellipse at 30% 20%,#fff3c9,#dfac56);border:1px solid #c28c42;border-radius:50% 50% 30% 30%;transform-origin:bottom;transform:scaleY(var(--dough-rise,.4))}.live-bread .glass{position:absolute;inset:5px 0 0;border:1px solid #ab8d66;border-top:2px solid #fff7e1;border-radius:0 0 14px 14px;background:linear-gradient(120deg,#ffffff55,transparent 40%,#f6efdc44)}.live-beer{display:inline-block;vertical-align:middle;position:relative;width:15px;height:20px;border:1px solid #bc8d44;border-radius:3px 3px 5px 5px;background:linear-gradient(90deg,#f9cd6d,#d98a18);overflow:hidden}.live-beer i{display:block;position:absolute;left:3px;bottom:3px;width:3px;height:3px;border:1px solid #fff0c3;border-radius:50%}.live-beer i:nth-child(2){left:8px;bottom:10px}.live-beer i:nth-child(3){left:6px;bottom:6px}#sparkle-note{display:none;position:absolute;top:13px;right:14px;background:#ffe7a3;border:1px solid #ad7621;border-radius:16px;padding:5px 10px;font-size:14px;font-weight:750}#sparkle-note.visible{display:block}
@media(prefers-reduced-motion:no-preference){.fermenting .live-beer i{animation:ferment 1.5s linear infinite}.fermenting .live-beer i:nth-child(2){animation-delay:-.7s}.fermenting .live-beer i:nth-child(3){animation-delay:-1.2s}@keyframes ferment{to{transform:translateY(-12px);opacity:.3}}}.locked .live-beer i{display:none}

@media(max-width:590px){.station-title .live-bread,.station-title .live-beer{display:none}}

@media(max-width:590px){.bakery.completed{min-height:280px}}
@media(max-height:430px) and (min-width:480px){.bakery.completed{min-height:214px}#report h2{font-size:22px}#report p{font-size:12px}#report{gap:3px}#report #stars{line-height:1}}

/* State-driven main scene: glass, dough, liquid and equipment are separate layers. */
#dynamic-scene{isolation:isolate;--main-rise:.33;--foam-height:3%;background:#aa6734}
#dynamic-scene .background-plate{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.bowl-unit{position:absolute;left:9%;bottom:9%;width:43%;height:66%;transform-origin:50% 100%;filter:drop-shadow(0 8px 4px #51301444)}
.bowl-unit>img{position:absolute;inset:0;width:100%;height:100%}.bowl-back{opacity:.8}#main-dough{inset:auto 7% 8%;width:86%;height:88%;transform:scaleY(var(--main-rise));transform-origin:50% 100%;object-fit:fill}.bowl-front{clip-path:polygon(0 0,100% 0,100% 12%,92% 12%,85% 50%,72% 75%,50% 88%,25% 75%,10% 35%,8% 12%,0 12%);opacity:.65}
.bread-upgraded .bowl-unit{width:47%;left:7%}
.fermenter-unit{display:none;position:absolute;left:55%;bottom:8%;width:28%;height:88%;filter:drop-shadow(0 6px 5px #4c260947)}
.fermenter-unit>img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}.brew-open .fermenter-unit{display:block}.brew-upgraded .fermenter-unit{width:32%;left:53%}
.brew-liquid{position:absolute;left:7%;right:7%;bottom:20%;height:45%;border-radius:44% 44% 10% 10% / 22% 22% 8% 8%;overflow:hidden;background:linear-gradient(90deg,#c77113,#ffc94c 50%,#d68818);box-shadow:inset 0 0 12px #a45b14,0 0 20px rgba(255,204,75,var(--production-glow));filter:saturate(calc(.85 + var(--brew-progress)*.35))}
.brew-foam{position:absolute;top:0;left:0;right:0;height:var(--foam-height);min-height:4px;background:radial-gradient(circle at 30% 40%,#fff5d6 2px,#eac381 3px,#fff2d1 4px);background-size:8px 6px;border-radius:40%;box-shadow:0 2px 5px #fff0bb99}.fermentation-bubble{position:absolute;bottom:3%;left:14%;width:5px;height:5px;border:1px solid #fff5d0;border-radius:50%;background:#ffe18c44;display:none}.fermentation-bubble[data-visible="true"]{display:block}.fermentation-bubble:nth-of-type(2){left:28%;width:4px;height:4px}.fermentation-bubble:nth-of-type(3){left:42%}.fermentation-bubble:nth-of-type(4){left:57%;width:7px;height:7px}.fermentation-bubble:nth-of-type(5){left:70%}.fermentation-bubble:nth-of-type(6){left:83%}.fermentation-bubble:nth-of-type(7){left:36%;width:3px;height:3px}.fermentation-bubble:nth-of-type(8){left:64%;width:4px;height:4px}
.brew-placeholder{position:absolute;left:57%;bottom:18%;width:23%;height:43%;border:1px dashed #e9c28d;border-radius:40px 40px 12px 12px;background:#fff6e5df;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#754725;text-align:center}.brew-placeholder span{font-size:10px;letter-spacing:1px}.brew-placeholder strong{font:18px Georgia,serif}.brew-placeholder small{font-size:11px}.brew-open .brew-placeholder{display:none}
.scene-inset{position:absolute;right:2%;top:5%;width:15%;height:40%;border:2px solid #fff1c6;border-radius:50%;background:radial-gradient(#fff5cd,#f6d685);box-shadow:0 3px 6px #5d39143d;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center}.scene-inset img{height:74%;max-width:82%;object-fit:contain;mix-blend-mode:multiply}.scene-inset span{font-size:9px;font-weight:750;text-align:center;position:absolute;bottom:4%;line-height:1.1;color:#603813;background:#fff2c9c9;border-radius:8px;padding:1px 4px}
.installed-feeder{display:none;position:absolute;left:1%;bottom:10%;width:12%;height:48%;filter:drop-shadow(0 3px 3px #56321c55)}.feeder-installed .installed-feeder{display:block}.installed-feeder img{position:absolute;width:100%;height:100%;object-fit:fill;mix-blend-mode:multiply}.installed-feeder i{position:absolute;left:26%;top:20%;width:48%;height:30%;background:#fff4ccaa;transform-origin:bottom;pointer-events:none}.installed-feeder span{position:absolute;bottom:-1px;left:10%;right:0;text-align:center;font-size:9px;font-weight:750;background:#fff0d0;border-radius:5px}
.upgrade-seal{display:none;position:absolute;bottom:0;left:18%;right:10%;font-size:9px;text-align:center;font-weight:750;color:#fdf3da;background:#755026;border:1px solid #d7ad69;border-radius:5px}.brew-upgraded .upgrade-seal{display:block}
.sale-notice{position:absolute;z-index:2;bottom:8%;left:35%;height:37%;width:18%;filter:drop-shadow(0 2px 3px #53371e66)}.sale-notice[hidden]{display:none}.sale-notice img{width:100%;height:100%;object-fit:contain}.sale-notice b{position:absolute;right:0;top:10%;background:#fff1c6;color:#573815;border:1px solid #c79644;border-radius:15px;padding:2px 8px;font-size:14px}#beer-sale{left:76%;width:12%;height:24%;bottom:13%}#beer-sale>span{font-size:40px;color:#fff2b6;position:absolute;bottom:0}.boosted .scene-inset{box-shadow:0 0 0 3px #ffc956,0 0 20px #ffe79f}
@media(max-width:590px){.brew-placeholder{gap:2px}.brew-placeholder span{font-size:8px}.brew-placeholder strong{font-size:12px}.brew-placeholder small{font-size:8px}.scene-inset span{font-size:7px}.scene-inset{border-width:1px}.sale-notice b{font-size:10px;padding:1px 4px}.upgrade-seal{font-size:6px}.installed-feeder span{font-size:7px}}
@media(max-height:430px) and (min-width:480px){.brew-placeholder strong{font-size:12px}.brew-placeholder span,.brew-placeholder small{font-size:8px}.scene-inset span{font-size:6px}.upgrade-seal{font-size:6px}.sale-notice b{font-size:10px}}

/* Contents stay inside the glass outline; front labels remain legible. */
.dough-contents{position:absolute;left:7%;right:7%;top:13%;bottom:8%;clip-path:polygon(0 0,100% 0,92% 51%,80% 80%,63% 98%,37% 98%,20% 80%,8% 51%)}
.dough-contents #main-dough{position:absolute;inset:auto 0 0;width:100%;height:100%}.bowl-front{clip-path:inset(82% 0 0);opacity:.6}
.fermenter-unit .brew-liquid{z-index:1;mix-blend-mode:multiply}.brew-brand{position:absolute;z-index:2;top:61%;left:15%;right:12%;padding:0 2px;border:1px solid #b97b35;border-radius:12px;text-align:center;font:bold clamp(9px,1.35vw,18px)/1.25 Georgia,serif;color:#5b3016;background:linear-gradient(#fff5d1,#eec585);box-shadow:0 1px 2px #55321c44}.upgrade-seal{z-index:2}.installed-feeder{filter:none}
@media(max-width:590px){.brew-brand{font-size:8px;border-radius:6px}.brew-placeholder span,.brew-placeholder small{display:none}.brew-placeholder strong{font-size:10px}.brew-placeholder{height:33%;bottom:23%;border-radius:18px 18px 8px 8px}.scene-inset span{font-size:6px}}
@media(max-height:430px) and (min-width:480px){.brew-brand{font-size:8px}}

.brew-brand{top:58.3%;height:11%;display:flex;align-items:center;justify-content:center}

.installed-feeder img{mix-blend-mode:normal}.installed-feeder i{display:none}
