/* App shell / meta game. Landscape-first and visually continuous with the painted stall. */
.app-shell{position:fixed;inset:0;z-index:80;overflow:hidden;background:#342318;color:#56331e;font-family:Patrick,'Segoe UI',Tahoma,sans-serif}
.app-screen{position:absolute;inset:0;overflow:hidden}
.boot-splash{position:fixed;z-index:150;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 43%,#6b472c,#372319 52%,#21150f 100%);color:#fff0d3;transition:opacity .38s ease,visibility .38s ease}.boot-splash:after{content:'';position:absolute;inset:18px;border:1px solid #ddb87955;border-radius:24px}.boot-splash.done{opacity:0;visibility:hidden;pointer-events:none}.splash-cup{width:82px;height:82px;border-radius:50%;display:grid;place-items:center;background:#f3d18f;color:#5b371f;border:4px solid #805231;box-shadow:0 7px 0 #25150d77;font-size:40px;animation:splashFloat 1.4s ease-in-out infinite}.boot-splash strong{font-size:44px;font-weight:400;margin-top:17px;text-shadow:0 3px 0 #25150d}.boot-splash span{font-size:18px;color:#d8bd98}.boot-splash:before{content:'';position:absolute;left:50%;top:calc(50% - 67px);width:44px;height:44px;border-top:3px solid #e7cfaa66;border-radius:50%;transform:translateX(-50%);animation:splashSteam 1.7s ease-in-out infinite}@keyframes splashFloat{50%{transform:translateY(-5px)}}@keyframes splashSteam{0%{opacity:0;transform:translate(-50%,8px) scale(.8)}50%{opacity:.7}100%{opacity:0;transform:translate(-50%,-15px) scale(1.2)}}
.entry-screen,.profile-screen,.home-screen{background:#68452d url('assets/market.png') center 44%/cover no-repeat}
.entry-screen:after,.profile-screen:after,.home-screen:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#2d1e16d9 0,#3a2618a6 34%,#281a12c9 100%),radial-gradient(circle at 56% 40%,#f7d99d26 0,#0000 44%),linear-gradient(#2c1d1029,#2c1d10a8)}
.entry-atmosphere,.home-wash{position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,#ffe3a818 0,#0000 34%,#20150da6 100%)}
.entry-atmosphere:before,.home-wash:before{content:'';position:absolute;left:9%;right:9%;top:0;height:17px;background:repeating-linear-gradient(90deg,#f0d3a8 0 72px,#b8753e 72px 144px);clip-path:polygon(0 0,100% 0,97% 100%,3% 100%);filter:drop-shadow(0 5px 8px #2a170c6b);opacity:.82}
.entry-copy{position:absolute;z-index:3;left:7vw;top:50%;transform:translateY(-51%);width:min(42vw,660px);color:#fff0d2;text-align:center}
.entry-kicker{display:inline-flex;align-items:center;gap:8px;font-size:clamp(12px,1.2vw,18px);letter-spacing:.18em;color:#f0c984;text-shadow:0 2px 3px #28160d;margin-bottom:17px}
.entry-kicker:before,.entry-kicker:after{content:'✦';font-size:.8em;opacity:.85}
.entry-sign{position:relative;display:inline-block;min-width:min(38vw,570px);padding:24px 54px 31px;background:linear-gradient(180deg,#754724f2,#4e2e1bf4);border:4px solid #d4a05f;border-radius:14px 18px 12px 17px;box-shadow:inset 0 0 0 7px #4a2a18,0 14px 30px #1b100aa1;transform:rotate(-1deg)}
.entry-sign:before,.entry-sign:after{content:'';position:absolute;top:-52px;width:5px;height:55px;background:#6e482d;border-radius:4px;box-shadow:0 0 0 2px #2f1c11}.entry-sign:before{left:18%}.entry-sign:after{right:18%}
.entry-sign h1{font-size:clamp(52px,6.4vw,96px);line-height:.74;margin:10px 0 21px;font-weight:400;letter-spacing:-.035em;text-shadow:0 4px 0 #321b0f;color:#fff0cb}
.entry-sign h1 em{font-style:normal;color:#f5c678;font-size:.83em}
.entry-sign p{margin:0;font-size:clamp(18px,1.8vw,27px);line-height:1.15;color:#e8d1ab}
.entry-steam{position:absolute;right:42px;top:22px;font:56px Georgia;color:#ead4af66;transform:rotate(-7deg)}
.entry-caption{margin:24px auto 0;display:flex;align-items:center;justify-content:center;gap:13px;font-size:clamp(16px,1.4vw,22px);color:#ead6b5;text-shadow:0 2px 2px #26150c}.entry-caption i{width:44px;height:1px;background:#deb77b88}
.entry-book{position:absolute;z-index:4;right:7vw;top:50%;transform:translateY(-50%) rotate(.45deg);width:min(38vw,560px);padding:42px 44px 30px;background:linear-gradient(115deg,#fff1d2,#f3d9aa);border:3px solid #9a6637;border-radius:15px 21px 17px 13px;box-shadow:0 13px 0 #4b2a19a8,0 23px 42px #1c0f0a96,inset 0 0 0 7px #fff7e270}
.entry-book:before{content:'';position:absolute;inset:14px;border:1px dashed #aa794b72;border-radius:9px 14px 11px 10px;pointer-events:none}
.book-pin{position:absolute;width:24px;height:24px;top:18px;right:25px;border-radius:50%;background:radial-gradient(circle at 35% 32%,#fff3c5 0 19%,#d98f50 20% 51%,#7b4328 52% 100%);box-shadow:0 3px 5px #5a341e88}
.book-eyebrow{position:relative;display:block;font-size:clamp(13px,1.15vw,17px);letter-spacing:.15em;color:#785334;margin-bottom:5px}
.entry-book h2{position:relative;font-size:clamp(38px,4vw,58px);font-weight:400;line-height:1.15;margin:8px 0 12px;color:#61391f}.entry-book>p{position:relative;margin:0 0 21px;font-size:clamp(19px,1.65vw,25px);line-height:1.3;color:#7b583b}
.continue-card{position:relative;display:flex;align-items:center;gap:14px;padding:13px 15px;margin:4px 0 18px;border:2px solid #b9844d;border-radius:13px;background:#fff8e4a6;box-shadow:inset 0 0 0 2px #fff7dd,0 3px 0 #c7965c55}
.continue-avatar{width:60px;height:60px;flex:none;border-radius:50%;display:grid;place-items:center;font-size:30px;background:#754a2e;color:#fff1d6;border:3px solid #d5a766}
.continue-card div:last-child{display:flex;min-width:0;flex-direction:column;align-items:flex-start}.continue-card small{font-size:12px;letter-spacing:.13em;color:#73563b}.continue-card strong{font-size:27px;line-height:1.15;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400;color:#5c351d}.continue-card span{font-size:17px;color:#755538;margin-top:4px}.continue-card b{font-weight:400}
.entry-actions{position:relative;display:flex;gap:12px;align-items:stretch}.shell-primary,.shell-secondary{min-height:58px;border-radius:12px;padding:10px 22px;font-size:23px;line-height:1.15;border:2px solid;transition:transform .18s ease,filter .18s ease,box-shadow .18s ease}.shell-primary{flex:1;background:linear-gradient(#5f7d38,#4c6630);border-color:#50632e;color:#fff8de;box-shadow:0 5px 0 #45552a}.shell-primary span{float:right;font-size:27px}.shell-secondary{background:#fff3d8cc;border-color:#9e7043;color:#6d4529;box-shadow:0 4px 0 #ad7b493d}.shell-primary:hover,.shell-secondary:hover{transform:translateY(-1px);filter:brightness(1.04)}.shell-primary:active,.shell-secondary:active{transform:translateY(3px);box-shadow:none}
.entry-book footer{position:relative;margin-top:22px;display:flex;justify-content:center;gap:10px;font-size:15px;color:#70573f}.entry-book footer i{font-style:normal;color:#bd9872}

/* Profile creation */
.profile-screen:after{background:linear-gradient(90deg,#2b1b11dd 0,#3c2819bd 43%,#23160fd9 100%),linear-gradient(#2c1c1020,#2c1c108c)}
.profile-scene{position:absolute;inset:0;z-index:3;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:5vw;padding:5vh 9vw}
.shell-back{position:absolute;left:max(28px,4vw);top:max(22px,4vh);width:54px;height:54px;border-radius:50%;background:#fff0d5e6;border:2px solid #9c693a;box-shadow:0 4px 0 #4d2e1f77;color:#704526;font-size:30px}
.profile-intro{color:#fff1d5;max-width:560px}.profile-intro h2{font-size:clamp(53px,6vw,90px);font-weight:400;line-height:1.15;margin:10px 0 25px;text-shadow:0 4px 0 #28160d}.profile-intro p{max-width:480px;font-size:clamp(19px,1.8vw,28px);line-height:1.3;color:#e1c8a6;text-shadow:0 2px 2px #28160d}
.profile-stamp{display:inline-block;margin-top:22px;padding:10px 20px;border:2px solid #e7be7f99;border-radius:50%;font-size:18px;line-height:1.25;text-align:center;color:#f2d7ad;transform:rotate(-6deg)}.profile-stamp b{font-weight:400;font-size:23px}
.profile-paper{position:relative;width:min(42vw,620px);padding:42px 46px 31px;background:linear-gradient(120deg,#fff3d6,#efd3a5);border:3px solid #9c6739;border-radius:17px 23px 16px 20px;box-shadow:0 17px 0 #432818a8,0 25px 50px #160d08a8,inset 0 0 0 7px #fff8e165;transform:rotate(.7deg)}
.paper-tape{position:absolute;top:-17px;left:50%;width:130px;height:38px;transform:translateX(-50%) rotate(-2deg);background:#e9d29eaa;border-left:1px dashed #bb9a63;border-right:1px dashed #bb9a63;box-shadow:0 2px 6px #6245282d}
.profile-paper label,.modal-paper label{display:block;margin-bottom:16px;color:#825d3c;font-size:17px;letter-spacing:.03em}.profile-paper label span{display:block;margin:0 0 5px 8px}.profile-paper input,.modal-paper input{width:100%;height:58px;padding:5px 15px;background:#fffaf0c2;border:2px solid #ba8a56;border-radius:12px;outline:none;font:27px Patrick,'Segoe UI',Tahoma,sans-serif;color:#58321c;box-shadow:inset 0 2px 6px #7c55301a}.profile-paper input:focus,.modal-paper input:focus{border-color:#7f9b4f;box-shadow:0 0 0 3px #a6be7750,inset 0 2px 6px #7c55301a}
.profile-preview{margin:21px 0 16px;padding:14px 18px;text-align:center;color:#fff3d5;background:linear-gradient(#76502e,#58361f);border:2px solid #a97a48;box-shadow:inset 0 0 0 3px #402718;border-radius:9px;transform:rotate(-.3deg)}.profile-preview small{display:block;font-size:12px;letter-spacing:.17em;color:#dfc197}.profile-preview strong{display:block;margin:1px 0;font-size:31px;font-weight:400}.profile-preview span{font-size:15px;color:#e4cfad}.profile-submit{width:100%;margin-top:1px}.form-note{text-align:center;color:#70573d;font-size:15px;margin:14px 0 0}

/* Home hub */
.home-screen{background-position:center 35%}.home-screen:after{background:linear-gradient(90deg,#2e1f15da 0,#2a1a1091 43%,#2a1a10c4 100%),linear-gradient(#2d1c0c1f,#23160e9a)}
.home-topbar{position:absolute;z-index:4;left:50%;top:max(18px,2.4vh);width:min(93vw,1540px);height:70px;transform:translateX(-50%);display:grid;grid-template-columns:minmax(170px,1fr) minmax(0,auto) minmax(300px,1fr);gap:16px;align-items:center;color:#fff1d7}
.owner-chip{justify-self:start;display:flex;align-items:center;gap:10px;min-width:160px;padding:6px 15px 6px 7px;border-radius:34px;background:#4c2e1dd9;border:2px solid #a87749;color:#fff0d1;box-shadow:0 4px 10px #20110866}.owner-mark{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#f0cc88;color:#5a361f;font-size:24px;border:2px solid #fff0c0}.owner-chip span:last-child{display:flex;flex-direction:column;align-items:flex-start}.owner-chip small{font-size:12px;letter-spacing:.13em;color:#d9b788}.owner-chip b{font-weight:400;font-size:21px;line-height:1.15}
.home-brand{min-width:0;text-align:center;text-shadow:0 2px 3px #2b170d}.home-brand small{display:block;font-size:12px;letter-spacing:.18em;color:#e2bd82}.home-brand strong{display:block;font-size:32px;font-weight:400;max-width:min(38vw,620px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-stats{justify-self:end;display:flex;gap:8px;align-items:center}.stat-pill{height:54px;min-width:83px;padding:6px 14px;border-radius:30px;display:flex;flex-direction:column;justify-content:center;text-align:center;background:#fff0d9e8;border:2px solid #a36e3e;color:#603a21;box-shadow:0 4px 0 #4b2b1c70}.stat-pill small{font-size:12px;letter-spacing:.12em;color:#785437}.stat-pill b{font-weight:400;font-size:23px;line-height:1.15}.cash-pill{min-width:148px}.home-icon{width:54px;height:54px;border-radius:50%;background:#6c492e;border:2px solid #c59a62;color:#f5dfb7;font-size:24px;box-shadow:0 4px 0 #3b241777}
.home-content{position:absolute;z-index:3;left:50%;top:112px;bottom:61px;width:min(91vw,1460px);transform:translateX(-50%);display:grid;grid-template-columns:minmax(260px,.72fr) minmax(0,1.28fr);gap:clamp(22px,3vw,52px);align-items:stretch}
.home-story{min-width:0;max-width:470px;align-self:stretch;display:flex;flex-direction:column;justify-content:center;padding:2vh 0;color:#fff0d2;text-shadow:0 2px 2px #28170e}.story-eyebrow{font-size:13px;letter-spacing:.17em;color:#e9c487;margin-bottom:8px}.home-story h2{font-size:clamp(46px,5vw,76px);font-weight:400;line-height:1.15;margin:5px 0 17px}.home-story>p{font-size:clamp(18px,1.45vw,23px);line-height:1.25;color:#dec6a5;max-width:440px;margin:0 0 14px}.next-goal{display:flex;align-items:center;gap:10px;width:max-content;max-width:100%;padding:7px 14px 7px 9px;border:1px solid #e0ba7c70;border-radius:12px;background:#40271991;color:#f0d5a8;margin-bottom:16px}.next-goal>span{width:35px;height:35px;border-radius:50%;display:grid;place-items:center;background:#e7bd76;color:#54321c;text-shadow:none}.next-goal div{display:flex;min-width:0;flex-direction:column}.next-goal small{font-size:12px;letter-spacing:.13em;color:#d8b482}.next-goal b{display:block;max-width:100%;font-size:18px;font-weight:400;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.open-shop-button{margin-top:clamp(18px,3vh,30px);width:min(100%,480px);min-height:84px;padding:11px 17px;display:grid;grid-template-columns:58px minmax(0,1fr) 30px;align-items:center;gap:10px;border-radius:16px;background:linear-gradient(#8eaa5c,#6f8c45);border:3px solid #53652f;box-shadow:0 7px 0 #44562a,0 14px 30px #170d078f;color:#fff8df;text-align:left}.open-shop-cup{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;background:#fff2d5;color:#684026;border:2px solid #557033;font-size:29px}.open-shop-button>span:nth-child(2){display:flex;min-width:0;flex-direction:column}.open-shop-button small{font-size:12px;letter-spacing:.14em;color:#e3efc9}.open-shop-button b{font-weight:400;font-size:29px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.open-shop-button i{font-style:normal;font-size:31px}
.hub-stack{min-width:0;width:100%;max-width:900px;justify-self:end;align-self:center;display:grid;grid-template-rows:auto minmax(0,auto);gap:12px;height:auto;max-height:min(100%,760px)}
.hub-grid{min-width:0;width:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:15px;min-height:0}
.hub-card{position:relative;overflow:hidden;display:flex;align-items:flex-end;min-width:0;padding:24px 23px;text-align:left;border:3px solid #8d5b34;border-radius:17px 22px 16px 20px;background:linear-gradient(150deg,#fff0cceF,#e6bd84ed);box-shadow:0 8px 0 #4327189e,0 14px 28px #160c0770,inset 0 0 0 5px #fff5df5f;color:#5b351d;transition:transform .18s,filter .18s}.hub-card:hover{transform:translateY(-3px) rotate(-.2deg);filter:brightness(1.04)}.hub-card:before{content:'';position:absolute;inset:10px;border:1px dashed #9e714667;border-radius:11px 15px 10px 14px;pointer-events:none}.menu-card{background:linear-gradient(145deg,#ebefcbef,#c8d28de8)}.upgrade-card{background:linear-gradient(145deg,#f6d3b6ef,#d39b6ce8)}.ledger-card{background:linear-gradient(145deg,#e8d4b7f2,#ceb084ea)}
.hub-badge{position:absolute;z-index:3;right:13px;top:12px;padding:4px 9px 3px;border-radius:8px;background:#694129;color:#f6dbad;font-size:12px;letter-spacing:.12em;transform:rotate(2deg);box-shadow:0 2px 0 #412819}.hub-badge.quiet{background:#876c4d}
.hub-card-copy{position:relative;z-index:2;display:flex;flex-direction:column;min-width:0;text-shadow:0 1px #fff4d5}.hub-card-copy small{font-size:12px;letter-spacing:.13em;color:#775535}.hub-card-copy b{font-size:clamp(28px,2.4vw,39px);line-height:1.15;font-weight:400}.hub-card-copy em{font-size:15px;font-style:normal;color:#75563e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px}.hub-prop{position:absolute;right:19px;bottom:24px;width:105px;height:116px;background-image:url('assets/props.png');background-repeat:no-repeat;background-size:400% 300%;filter:drop-shadow(0 7px 5px #5d381e45);opacity:.9;transform:rotate(3deg)}.hub-prop-box{background-position:0 50%;width:118px}.hub-prop-drink{background-position:33.333% 100%;height:126px;width:90px}.hub-prop-kettle{background-position:0 0;width:126px;height:118px;transform:rotate(-4deg)}
.ledger-lines{position:absolute;right:19px;bottom:27px;width:110px;height:107px;opacity:.56;background:repeating-linear-gradient(180deg,transparent 0 17px,#89623f 18px 19px),linear-gradient(90deg,transparent 0 27px,#b8785b88 28px 29px,transparent 30px);transform:rotate(-2deg)}
.hub-tools{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.hub-tools button{position:relative;min-width:0;min-height:72px;padding:9px 10px 8px;display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-rows:auto auto;column-gap:9px;align-items:center;text-align:left;border:2px solid #9c6a3e;border-radius:12px;background:linear-gradient(145deg,#f8e7c8ed,#dcb98eed);color:#613c24;box-shadow:0 4px 0 #4327188a,inset 0 0 0 2px #fff7df55;transition:transform .16s,filter .16s}.hub-tools button:hover{transform:translateY(-2px);filter:brightness(1.04)}.hub-tools button>span{grid-row:1/3;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#6c462c;color:#f8dfad;font-size:18px}.hub-tools button>b{min-width:0;font-size:18px;font-weight:400;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hub-tools button>small{font-size:12px;color:#73573e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hub-tools .review-tool{background:linear-gradient(145deg,#edf0cced,#ceda9eed);border-color:#82944f}.hub-tools .review-tool>span{background:#738a47}.hub-tools .journey-tool{background:linear-gradient(145deg,#e5eac5ed,#c7d49bed);border-color:#788d4a}.hub-tools .orders-tool{background:linear-gradient(145deg,#f2dcc1ed,#d6b184ed);border-color:#9a693e}.hub-tools em{position:absolute;right:5px;top:5px;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#a8513b;color:#fff5dc;font:12px/20px Arial,sans-serif;text-align:center;box-shadow:0 2px 0 #63301f}
.home-footer{position:absolute;z-index:4;left:4vw;right:4vw;bottom:12px;height:40px;display:flex;align-items:center;gap:14px;color:#ebd3b1}.home-footer button{background:none;color:#f0d9b8;font-size:16px;padding:5px 8px;text-shadow:0 2px 2px #28160e}.home-footer>i{height:18px;width:1px;background:#d3ac7770}.home-save-state{margin-left:auto;font-size:14px;color:#cfb18a}.home-save-state b{display:inline-block;width:8px;height:8px;border-radius:50%;background:#9fbd69;box-shadow:0 0 0 3px #536532;margin-right:6px}

/* Main menu: the next shift is the focus; preparation and the full notebook are separate layers. */
.home-prepare{min-width:0}.home-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:0 3px 9px;color:#fff0d2;text-shadow:0 2px 3px #28160e}.home-section-heading span{font-size:20px}.home-section-heading small{font-size:13px;color:#dfc19a}.home-prepare .hub-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(180px,1fr);gap:12px}.home-prepare .hub-card{min-height:205px;padding:19px 17px}.home-prepare .hub-card-copy b{font-size:34px}.home-prepare .hub-prop{right:11px;bottom:18px;width:88px;height:99px}.home-prepare .hub-prop-box{width:96px}.home-prepare .hub-prop-drink{width:72px;height:100px}.home-prepare .hub-prop-kettle{width:98px;height:92px}.home-ledger-shortcut{position:relative;display:grid;grid-template-columns:72px minmax(0,1fr) 30px;align-items:center;gap:12px;width:100%;min-height:78px;margin-top:12px;padding:10px 16px;overflow:hidden;border:2px solid #9d7248;border-radius:13px;background:linear-gradient(145deg,#f3dfbfef,#dcb98eed);box-shadow:0 4px 0 #4327188a,inset 0 0 0 2px #fff7df55;color:#613c24;text-align:left;transition:transform .16s,filter .16s}.home-ledger-shortcut:hover{transform:translateY(-2px);filter:brightness(1.04)}.home-ledger-shortcut .ledger-lines{position:relative;right:auto;bottom:auto;width:58px;height:47px}.home-ledger-shortcut>span{position:relative;z-index:1;display:flex;min-width:0;flex-direction:column}.home-ledger-shortcut small{font-size:12px;letter-spacing:.13em;color:#75553b}.home-ledger-shortcut b{font-size:26px;line-height:1.15;font-weight:400}.home-ledger-shortcut em{font-size:14px;font-style:normal;color:#75563e;margin-top:3px}.home-ledger-shortcut>i{position:relative;z-index:1;font-style:normal;font-size:29px;text-align:center}.home-more{min-width:0;min-height:0;display:flex;flex-direction:column;border:2px solid #845735;border-radius:14px;background:#4d2d1edb;box-shadow:0 5px 0 #25140d77;overflow:hidden}.home-more summary{display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:center;gap:10px;min-height:64px;padding:10px 11px;color:#fff1d5;cursor:pointer;list-style:none}.home-more summary::-webkit-details-marker{display:none}.home-more summary>span{display:flex;min-width:0;flex-direction:column}.home-more summary small{font-size:12px;letter-spacing:.13em;color:#dfb87e}.home-more summary b{font-size:20px;line-height:1.15;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.home-more summary i{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#7c9b4b;color:#fff7da;font-size:27px;font-style:normal;line-height:1.15;transition:transform .18s}.home-more[open] summary{border-bottom:1px solid #c69a6470}.home-more[open] summary i{transform:rotate(45deg)}.home-more .hub-tools{padding:11px;background:#3b2318a6;grid-template-columns:repeat(4,minmax(0,1fr));min-height:0;overflow:auto}.home-more .hub-tools button{min-height:62px}.home-more:focus-within{outline:3px solid #f7dc91;outline-offset:3px}

/* Small functional labels use a calmer face than the handwritten display font. */
.home-section-heading small,.home-prepare .hub-card-copy small,.home-prepare .hub-card-copy em,.home-ledger-shortcut small,.home-ledger-shortcut em,.home-more summary small{font-family:var(--font-body);font-weight:600;letter-spacing:.025em;line-height:1.35}.home-prepare .hub-card-copy small{font-size:12px}.home-prepare .hub-card-copy em{font-size:14px}.home-ledger-shortcut em{font-size:14px}.home-prepare .hub-card-copy{max-width:calc(100% - 82px)}.home-prepare .hub-prop{top:35px;bottom:auto;right:12px;width:78px;height:82px}.home-prepare .hub-prop-box{top:40px;width:78px;height:76px}.home-prepare .hub-prop-drink{top:27px;width:108px;height:106px}.home-prepare .hub-prop-kettle{top:41px;width:86px;height:80px}
.home-prepare .hub-card-copy em{display:block;overflow:visible;font-weight:600;white-space:normal;text-overflow:clip}

/* Shared shell overlays */
.shell-toast{position:fixed;z-index:110;left:50%;bottom:27px;transform:translate(-50%,18px);opacity:0;pointer-events:none;max-width:520px;padding:10px 20px;border-radius:12px;background:#fff0d9f5;border:2px solid #99663b;color:#623c24;box-shadow:0 8px 30px #1e100a80;font-size:20px;text-align:center;transition:.22s}.shell-toast.show{opacity:1;transform:translate(-50%,0)}
.shell-modal{position:fixed;z-index:120;inset:0;display:grid;place-items:center;background:#24150daa;backdrop-filter:blur(5px)}.modal-paper{position:relative;width:min(560px,80vw);padding:37px 42px 31px;border-radius:18px 23px 17px;background:linear-gradient(120deg,#fff2d3,#ecd09f);border:3px solid #9a6538;box-shadow:0 14px 0 #412719b0,0 22px 50px #160c08aa,inset 0 0 0 7px #fff7df63}.modal-paper h2{font-size:42px;font-weight:400;margin:3px 0 21px}.modal-paper label{font-size:15px}.modal-paper input{height:50px;font-size:24px}.modal-close{position:absolute;right:15px;top:10px;background:none;font-size:36px;color:#694126}.modal-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:20px 0}.modal-stats span{padding:10px;text-align:center;background:#fff7e4aa;border:1px solid #b88857;border-radius:10px}.modal-stats small{display:block;color:#74563c}.modal-stats b{font-size:29px;font-weight:400}.modal-paper .shell-primary{width:100%}
/* Scrollbars share the paper palette, not a bright white native gutter. */
.shell-modal .modal-paper,.day-summary-paper,.story-event-card{scrollbar-width:thin;scrollbar-color:#b88e5d #eed8b1;overscroll-behavior:contain}
.shell-modal .modal-paper::-webkit-scrollbar,.day-summary-paper::-webkit-scrollbar,.story-event-card::-webkit-scrollbar{width:8px}
.shell-modal .modal-paper::-webkit-scrollbar-track,.day-summary-paper::-webkit-scrollbar-track,.story-event-card::-webkit-scrollbar-track{background:#eed8b1;border-radius:10px}
.shell-modal .modal-paper::-webkit-scrollbar-thumb,.day-summary-paper::-webkit-scrollbar-thumb,.story-event-card::-webkit-scrollbar-thumb{background:#b88e5d;border:2px solid #eed8b1;border-radius:10px}
.backup-modal .backup-paper>.modal-close{z-index:5;display:grid;place-items:center;min-width:44px;min-height:44px;padding:0;border:1.5px solid #bd9564;border-radius:50%;background:#fff4d9;line-height:1.15}
.backup-modal .backup-paper>.book-eyebrow,.backup-modal .backup-paper>h2{padding-right:42px}
#arcade-modal .arcade-paper,#season-modal .season-paper{max-height:calc(100dvh - 22px);overflow-y:auto;overflow-x:hidden}
#arcade-modal .arcade-paper h2,#season-modal .season-paper h2{padding-right:45px;line-height:1.15}
#arcade-modal .arcade-paper>.modal-close,#season-modal .season-paper>.modal-close{
  z-index:5;display:grid;place-items:center;width:44px;height:44px;padding:0;
  border:1.5px solid #bd9564;border-radius:50%;background:#fff4d9;line-height:1.15
}
@media(orientation:portrait) and (max-width:480px){
  #arcade-modal .arcade-paper h2,#season-modal .season-paper h2{font-size:28px}
}
@media(orientation:landscape) and (max-height:500px){
  #arcade-modal .arcade-paper,#season-modal .season-paper{padding:14px 24px 14px}
  #arcade-modal .arcade-paper h2,#season-modal .season-paper h2{margin:0 37px 6px 0;font-size:27px;line-height:1.15}
  #arcade-modal .arcade-paper .book-eyebrow,#season-modal .season-paper .book-eyebrow{margin-bottom:2px;font-size:11px}
  #arcade-modal .arcade-paper .loto-note,#season-modal .season-paper .loto-note{margin:3px 0 7px;font-size:13px;line-height:1.25}
  #arcade-modal .arcade-paper .dc-songs{gap:6px;margin:7px 0}
  #arcade-modal .arcade-paper .dc-song{padding:7px 10px;min-height:53px}
  #arcade-modal .arcade-paper .dc-song b{font-size:19px}
  #arcade-modal .arcade-paper .dc-song small{font-size:11px}
  #arcade-modal .arcade-paper .loto-actions{margin:8px 0 2px}
  #arcade-modal .arcade-paper .shell-primary{min-height:44px;padding:7px;font-size:17px}
  #arcade-modal .arcade-paper .modal-close,#season-modal .season-paper .modal-close{top:7px;right:8px;min-width:44px;min-height:44px;line-height:1.15}
}
.pause-menu{display:block;margin:17px auto 0;background:transparent;border:0;color:#765234;font-size:21px;text-decoration:underline;text-decoration-color:#b8936e;text-underline-offset:5px}
.pause-end-day{display:block;min-width:220px;margin:14px auto 0;padding:9px 22px;border:2px solid #8d5b3d;border-radius:11px;background:#c9875f;color:#fff8e8;box-shadow:0 3px 0 #74452f;font-size:21px}
@media(orientation:landscape) and (max-height:600px){.pause-end-day{min-height:120px;min-width:300px;font-size:29px}}

/* Functional management modules */
.module-screen{background:#5a3a27 url('assets/market.png') center 35%/cover no-repeat}.module-screen:after{content:'';position:absolute;inset:0;background:linear-gradient(#281912bb,#281912e8),radial-gradient(circle at 50% 32%,#d7ad6e22,#0000 45%);pointer-events:none}.module-wash{position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,#f4d59a10,#0000 35%,#160d08a8);pointer-events:none}.module-topbar{position:absolute;z-index:4;left:50%;top:18px;transform:translateX(-50%);width:min(92vw,1460px);height:78px;display:grid;grid-template-columns:70px 1fr auto;gap:16px;align-items:center;color:#fff0d1}.module-back{width:54px;height:54px;border-radius:50%;background:#fff0d6;border:2px solid #9f6b3a;box-shadow:0 4px 0 #3a2116;color:#6a4327;font-size:30px}.module-heading{min-width:0}.module-heading small{display:block;font-size:12px;letter-spacing:.17em;color:#e7be7f}.module-heading h2{font-size:38px;font-weight:400;line-height:1.15;margin:0}.module-heading p{font-size:15px;color:#d7bd9a;margin:1px 0 0}.module-wallet{min-width:150px;padding:8px 18px;border-radius:28px;background:#fff0d9ed;border:2px solid #a36e3e;color:#603a21;text-align:center;box-shadow:0 4px 0 #3e261985}.module-wallet small{display:block;font-size:12px;letter-spacing:.13em;color:#76553a}.module-wallet b{font-size:24px;font-weight:400}.module-body{position:absolute;z-index:3;left:50%;top:105px;bottom:28px;transform:translateX(-50%);width:min(92vw,1460px);overflow:auto;padding:4px 4px 18px;scrollbar-width:thin;scrollbar-color:#a97a4b55 transparent}.module-summary{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-bottom:14px}.module-summary>div,.ledger-summary span{padding:13px 17px;border-radius:13px;background:#f7e7c9eb;border:2px solid #9f6c3e;box-shadow:0 5px 0 #3b24177a,inset 0 0 0 3px #fff5df6b;color:#674025}.module-summary small,.ledger-summary small{display:block;font-size:12px;letter-spacing:.13em;color:#75553b}.module-summary b,.ledger-summary b{display:block;font-size:27px;font-weight:400;line-height:1.15}.module-summary span{font-size:14px;color:#72553d}.stock-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.stock-card{display:grid;grid-template-columns:62px minmax(0,1fr) 112px;gap:13px;align-items:center;min-height:93px;padding:12px 14px;border:2px solid #9d6a3d;border-radius:14px;background:#f9e9cce9;box-shadow:0 4px 0 #3b24176b,inset 0 0 0 3px #fff7e372}.stock-icon{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:#6d472d;color:#fff2d9;border:2px solid #d1a369;font-size:27px}.stock-copy{min-width:0;display:flex;flex-direction:column}.stock-copy small{font-size:12px;letter-spacing:.12em;color:#75563b}.stock-copy b{font-size:24px;font-weight:400;line-height:1.15}.stock-copy span{font-size:14px;color:#74553c}.stock-copy i,.mission-item i{display:block;height:6px;margin-top:5px;background:#c9a77b;border-radius:10px;overflow:hidden}.stock-copy i u,.mission-item i u{display:block;height:100%;background:#85a855;border-radius:10px;text-decoration:none}.stock-card button,.recipe-card button,.upgrade-item button,.setting-action,.setting-toggle{min-height:46px;border-radius:10px;border:2px solid #4a5c2b;background:#5c7a33;color:#fff7dc;box-shadow:0 3px 0 #4b5d2d;font-size:17px}.stock-card button{display:flex;flex-direction:column;justify-content:center;align-items:center}.stock-card button small{font-size:12px}.stock-card button b{font-size:16px;font-weight:400}.stock-card button:disabled,.recipe-card button:disabled,.upgrade-item button:disabled{background:#bca98d;border-color:#8f7d67;box-shadow:none;color:#eee1cf}.recipe-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.recipe-card{position:relative;display:grid;grid-template-columns:58px minmax(0,1fr) 110px;gap:12px;align-items:center;padding:15px;border:2px solid #9d6a3d;border-radius:14px;background:#f8e8caeb;box-shadow:0 4px 0 #3b24176b}.recipe-card.featured{background:#eef0caeb;border-color:#81944d}.recipe-mark{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#6b4329;color:#f5d08a;font-size:24px}.recipe-card>div{min-width:0}.recipe-card small{font-size:12px;color:#785537}.recipe-card b{display:block;font-size:26px;font-weight:400;line-height:1.15}.recipe-card p{margin:4px 0 1px;font-size:14px;color:#75563e}.recipe-card em{font-style:normal;font-size:12px;color:#6e5641}.upgrade-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.upgrade-item{position:relative;min-height:210px;padding:20px 17px 16px;display:flex;flex-direction:column;border:2px solid #965f38;border-radius:15px;background:linear-gradient(145deg,#f5d1b1e9,#d9a77fe9);box-shadow:0 5px 0 #3b24176b,inset 0 0 0 3px #fff1db55}.upgrade-stamp{position:absolute;right:12px;top:11px;padding:4px 8px;border-radius:9px;background:#74482c;color:#f5d7aa;font-size:12px}.upgrade-item small{font-size:12px;letter-spacing:.13em;color:#77543b}.upgrade-item b{display:block;font-size:27px;font-weight:400}.upgrade-item p{font-size:14px;color:#735540;line-height:1.25;margin:7px 0 14px}.upgrade-item button{margin-top:auto;width:100%}.ledger-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-bottom:13px}.ledger-sheet{border:2px solid #95633b;border-radius:14px;background:#f8e9cce8;box-shadow:0 5px 0 #3b24176b;overflow:hidden}.ledger-row{min-height:56px;display:flex;justify-content:space-between;align-items:center;padding:9px 16px;border-bottom:1px dashed #b78d6290}.ledger-row:last-child{border-bottom:0}.ledger-row span{display:flex;flex-direction:column}.ledger-row small{font-size:12px;color:#73573e}.ledger-row b{font-size:18px;font-weight:400}.ledger-row strong{font-size:20px;font-weight:400}.ledger-row.income strong{color:#617d36}.ledger-row.expense strong{color:#894b32}.empty-note{padding:32px;text-align:center;color:#e8d2ab;font-size:18px}.mission-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.mission-item{display:grid;grid-template-columns:46px 1fr;gap:10px;padding:18px;border:2px solid #9c693b;border-radius:14px;background:#f7e7cae9;box-shadow:0 5px 0 #3b24176b}.mission-item>span{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#d8b36f;color:#5c3a22;font-size:20px}.mission-item.done{background:#e6ecc8e9;border-color:#7d914c}.mission-item.done>span{background:#819e53;color:#fff}.mission-item b{font-size:22px;font-weight:400}.mission-item p{font-size:14px;color:#75563f;margin:4px 0}.mission-item small{font-size:12px;color:#71573f}.achievement-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.achievement{min-height:190px;display:flex;flex-direction:column;align-items:center;text-align:center;padding:20px 15px;border:2px solid #876f59;border-radius:15px;background:#c8b9a4d9;color:#776652;filter:saturate(.45)}.achievement.unlocked{background:#f5dfb7e9;border-color:#a46e3d;color:#694027;filter:none;box-shadow:0 5px 0 #3b24176b}.achievement>span{font-size:39px}.achievement b{font-size:24px;font-weight:400}.achievement p{font-size:14px;margin:6px 0;color:inherit}.achievement small{margin-top:auto}.settings-sheet{display:grid;grid-template-columns:1fr 1fr;gap:14px}.settings-sheet article{min-height:175px;padding:20px;display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;border:2px solid #9b6739;border-radius:15px;background:#f7e6c7e9;box-shadow:0 5px 0 #3b24176b}.settings-sheet small{font-size:12px;letter-spacing:.14em;color:#76573b}.settings-sheet b{display:block;font-size:27px;font-weight:400}.settings-sheet p{font-size:14px;color:#755640;margin:6px 0}.setting-toggle,.setting-action{padding:0 16px;min-width:132px}.setting-toggle span{display:inline-block;width:18px;height:18px;border-radius:50%;vertical-align:middle;margin-right:7px;background:#d7c5a7}.setting-toggle.on span{background:#e8f3c8;box-shadow:0 0 0 3px #52652f}.setting-toggle.on{background:#54702e}

.settings-full{grid-template-columns:1fr 1fr}.settings-audio>div{min-width:0}.settings-audio input[type="range"]{width:100%;margin-top:9px;accent-color:#7f9850}.backup-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.setting-action.secondary{background:#fff0d8;color:#68442a;border-color:#9f744d;box-shadow:0 3px 0 #7b5837}.backup-paper{width:min(760px,86vw)}.backup-paper>p{font-size:17px;color:#755640;line-height:1.35}.backup-code{width:100%;height:190px;resize:none;padding:12px 14px;border:2px solid #b28454;border-radius:11px;background:#fff9eccf;color:#59351f;font:13px/1.35 Consolas,monospace;word-break:break-all;outline:none}.backup-code:focus{border-color:#78924a;box-shadow:0 0 0 3px #91aa6250}.backup-modal-actions{display:flex;gap:10px;margin-top:14px}.backup-modal-actions .shell-primary,.backup-modal-actions .shell-secondary{flex:1}

@media(max-width:1050px), (max-height:600px){
  .entry-copy{left:5vw;width:44vw}.entry-sign{min-width:40vw;padding:17px 34px 23px}.entry-sign h1{font-size:clamp(42px,6.8vw,66px)}.entry-sign p{font-size:17px}.entry-kicker{font-size:11px;margin-bottom:10px}.entry-caption{font-size:13px;margin-top:12px}
  .entry-book{right:5vw;width:42vw;padding:26px 28px 20px}.entry-book h2{font-size:34px;margin:6px 0}.entry-book>p{font-size:16px;margin-bottom:10px}.continue-card{padding:7px 9px;margin-bottom:9px}.continue-avatar{width:44px;height:44px;font-size:21px}.continue-card strong{font-size:21px}.continue-card span{font-size:13px}.entry-actions{gap:7px}.shell-primary,.shell-secondary{min-height:47px;font-size:18px;padding:7px 14px}.entry-book footer{font-size:11px;margin-top:13px}
  .profile-scene{padding:5vh 7vw}.profile-intro h2{font-size:52px}.profile-intro p{font-size:17px}.profile-stamp{font-size:13px;margin-top:10px}.profile-paper{width:43vw;padding:25px 29px 17px}.profile-paper label{font-size:13px;margin-bottom:8px}.profile-paper input{height:44px;font-size:21px}.profile-preview{margin:9px 0;padding:6px 10px}.profile-preview strong{font-size:23px}.profile-preview span{font-size:11px}.form-note{font-size:11px;margin-top:7px}
  .home-topbar{top:7px;width:92vw;height:49px;grid-template-columns:minmax(130px,1fr) minmax(0,auto) minmax(225px,1fr);gap:8px}.owner-chip{padding:3px 10px 3px 4px;min-width:130px}.owner-mark{width:36px;height:36px;font-size:18px}.owner-chip b{font-size:17px}.home-brand strong{font-size:23px;max-width:34vw}.stat-pill{height:42px;min-width:62px;padding:3px 10px}.stat-pill b{font-size:18px}.cash-pill{min-width:112px}.home-icon{width:42px;height:42px;font-size:18px}
  .home-content{top:65px;bottom:43px;width:92vw;grid-template-columns:minmax(215px,.72fr) minmax(0,1.28fr);gap:clamp(14px,2.5vw,28px)}.home-story{max-width:330px}.home-story h2{font-size:44px;margin-bottom:10px}.home-story>p{font-size:15px;margin-bottom:8px}.story-eyebrow{font-size:11px}.next-goal{padding:4px 9px;margin-bottom:8px}.next-goal>span{width:28px;height:28px}.next-goal b{font-size:14px}.open-shop-button{margin-top:10px;min-height:59px;grid-template-columns:42px minmax(0,1fr) 24px;padding:6px 10px}.open-shop-cup{width:39px;height:39px;font-size:20px}.open-shop-button b{font-size:21px}.open-shop-button small{font-size:11px}.open-shop-button i{font-size:24px}
  .hub-stack{height:100%;gap:6px;grid-template-rows:minmax(0,1fr) 52px}.hub-grid{height:auto;gap:8px}.hub-card{padding:14px 15px;border-width:2px}.hub-card:before{inset:6px}.hub-card-copy small{font-size:11px}.hub-card-copy b{font-size:26px}.hub-card-copy em{font-size:11px}.hub-badge{font-size:11px;top:8px;right:8px}.hub-prop{right:8px;bottom:11px;width:70px;height:78px}.hub-prop-box{width:78px}.hub-prop-drink{width:57px;height:84px}.hub-prop-kettle{width:83px;height:78px}.ledger-lines{right:10px;bottom:12px;width:72px;height:68px;background-size:auto}.hub-tools{gap:5px}.hub-tools button{min-height:52px;padding:5px 6px;grid-template-columns:28px minmax(0,1fr);column-gap:5px;border-width:1px}.hub-tools button>span{width:27px;height:27px;font-size:13px}.hub-tools button>b{font-size:13px}.hub-tools button>small{font-size:11px}.hub-tools em{right:2px;top:2px;min-width:16px;height:16px;line-height:16px;font-size:11px;padding:0 4px}
  .home-footer{height:31px;bottom:4px}.home-footer button{font-size:12px}.home-save-state{font-size:11px}
  .modal-paper{max-height:88vh;padding:25px 32px 19px}.modal-paper h2{font-size:31px;margin:2px 0 12px}.modal-paper label{font-size:12px;margin-bottom:8px}.modal-paper input{height:42px;font-size:20px}.modal-stats{margin:10px 0}.modal-stats b{font-size:22px}
  .module-topbar{top:7px;width:92vw;height:50px;grid-template-columns:48px 1fr auto;gap:8px}.module-back{width:42px;height:42px;font-size:24px}.module-heading small{font-size:11px}.module-heading h2{font-size:26px}.module-heading p{font-size:11px}.module-wallet{min-width:112px;padding:4px 10px}.module-wallet b{font-size:18px}.module-body{top:63px;bottom:9px;width:92vw}.module-summary{gap:7px;margin-bottom:8px}.module-summary>div{padding:7px 10px}.module-summary b{font-size:19px}.module-summary span{font-size:11px}.stock-grid,.recipe-grid{gap:7px}.stock-card{grid-template-columns:43px minmax(0,1fr) 84px;gap:7px;min-height:68px;padding:7px}.stock-icon{width:38px;height:38px;font-size:18px}.stock-copy b{font-size:17px}.stock-copy span{font-size:11px}.stock-card button{min-height:37px;font-size:12px}.recipe-card{grid-template-columns:38px minmax(0,1fr) 80px;padding:8px;gap:7px}.recipe-mark{width:34px;height:34px;font-size:16px}.recipe-card b{font-size:18px}.recipe-card p{font-size:11px}.recipe-card em{font-size:11px}.recipe-card button{min-height:37px;font-size:12px}.upgrade-list{gap:8px}.upgrade-item{min-height:135px;padding:12px 10px 9px}.upgrade-item b{font-size:19px}.upgrade-item p{font-size:11px;margin:4px 0 7px}.upgrade-item button{min-height:37px;font-size:12px}.ledger-summary{gap:7px}.ledger-summary span{padding:7px 9px}.ledger-summary b{font-size:18px}.ledger-row{min-height:40px;padding:5px 10px}.ledger-row b,.ledger-row strong{font-size:14px}.mission-list{gap:8px}.mission-item{padding:10px;grid-template-columns:32px 1fr}.mission-item>span{width:30px;height:30px;font-size:14px}.mission-item b{font-size:16px}.mission-item p{font-size:11px}.achievement-grid{gap:8px}.achievement{min-height:120px;padding:10px}.achievement>span{font-size:24px}.achievement b{font-size:17px}.achievement p{font-size:11px}.settings-sheet{gap:8px}.settings-sheet article{min-height:105px;padding:11px}.settings-sheet b{font-size:19px}.settings-sheet p{font-size:11px}.setting-toggle,.setting-action{min-width:105px;min-height:37px;font-size:12px}.backup-paper{width:min(760px,90vw);max-height:90vh}.backup-paper>p{font-size:12px}.backup-code{height:110px;font-size:11px}.backup-modal-actions{margin-top:8px}
}

@media(max-width:1050px), (max-height:600px){.home-prepare .hub-prop{top:31px;bottom:auto;right:10px;width:66px;height:71px}.home-prepare .hub-prop-box{width:66px;height:64px}.home-prepare .hub-prop-drink{top:22px;width:90px;height:91px}.home-prepare .hub-prop-kettle{top:33px;width:73px;height:68px}.home-prepare .hub-card-copy{max-width:calc(100% - 67px)}.home-prepare .hub-card-copy small{font-size:11px}.home-prepare .hub-card-copy em{font-size:12px;line-height:1.25}}

@media(orientation:portrait) and (max-width:1100px){#app-shell,#viewport{visibility:hidden!important;pointer-events:none!important}}
@media(prefers-reduced-motion:reduce){.hub-card,.shell-primary,.shell-secondary,.shell-toast{transition:none!important}}

/* Hành trình là một chuyến đi qua các bến chợ, không phải một hàng thẻ cấp bậc. */
.journey-map{padding:4px 0 14px;color:#674025}.journey-map-overview{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(280px,.82fr);gap:18px;align-items:stretch;margin-bottom:7px}.journey-now{position:relative;display:grid;grid-template-columns:74px minmax(0,1fr);gap:13px;align-items:center;padding:16px 18px 15px;border-radius:18px 13px 22px 12px;background:linear-gradient(105deg,#f8e8c7,#dfe7b2);border:2px solid #728543;box-shadow:0 5px 0 #4d613278,inset 0 0 0 3px #fff7df73;overflow:hidden}.journey-now:after{content:'';position:absolute;right:-28px;bottom:-35px;width:170px;height:102px;border:2px solid #78925136;border-radius:50%;transform:rotate(-15deg);pointer-events:none}.journey-now-icon{position:relative;z-index:1;display:grid;place-items:center;width:66px;height:66px;border:2px solid #8c6a3c;border-radius:48% 52% 45% 55%;background:#fff5dc;color:#674025;font-size:37px;box-shadow:0 4px 0 #8b663b5e;transform:rotate(-3deg)}.journey-now>div{position:relative;z-index:1;min-width:0}.journey-now small,.journey-destination small,.journey-stop small{display:block;font:600 12px/1.25 "Segoe UI",Tahoma,Arial,sans-serif;letter-spacing:.11em;color:#775736}.journey-now b{display:block;margin-top:2px;font-size:31px;line-height:1.15;font-weight:400}.journey-now p{max-width:54ch;margin:5px 0 0;font-size:14px;line-height:1.32}.journey-now em{display:block;margin-top:5px;font:600 12px/1.3 "Segoe UI",Tahoma,Arial,sans-serif;color:#5d7737}.journey-destination{padding:15px 16px 13px;border-left:3px solid #aa794d;background:linear-gradient(90deg,#f3dfbdc9,#f3dfbd20);border-radius:4px 13px 13px 4px}.journey-destination b{display:block;margin:4px 0 7px;font-size:24px;line-height:1.15;font-weight:400}.journey-destination>div{display:flex;flex-wrap:wrap;gap:6px}.journey-destination>div span{padding:4px 8px;border-radius:5px;background:#fff6dfbd;border:1px solid #bc8b5c;color:#754d2f;font:600 12px/1.25 "Segoe UI",Tahoma,Arial,sans-serif}.journey-destination.complete{border-left-color:#71884a}.journey-route-wrap{position:relative;min-height:265px;padding:31px 10px 13px;overflow:hidden;border-top:1px dashed #a77a4f80;border-bottom:1px dashed #a77a4f80;background:linear-gradient(90deg,#e6ca9a47,#fff1cf78 35%,#e6ca9a47)}.journey-river{position:absolute;z-index:0;left:4%;right:4%;top:47%;height:64px;transform:translateY(-50%) rotate(-1deg);border-top:12px solid #75a7ac70;border-bottom:12px solid #75a7ac50;border-radius:48% 52% 44% 56%;filter:drop-shadow(0 3px 0 #446a6a25)}.journey-river:before,.journey-river:after{content:'';position:absolute;left:4%;right:2%;height:5px;border-top:2px dashed #e7f3e786;border-radius:50%}.journey-river:before{top:15px}.journey-river:after{bottom:14px}.journey-river i{position:absolute;width:18px;height:8px;border-top:2px solid #eaf6ebaa;border-radius:50%;animation:river-drift 4s linear infinite}.journey-river i:nth-child(1){left:15%;top:22px}.journey-river i:nth-child(2){left:49%;top:35px;animation-delay:-1.2s}.journey-river i:nth-child(3){right:12%;top:17px;animation-delay:-2.4s}@keyframes river-drift{0%{transform:translateX(-8px);opacity:.4}50%{opacity:1}100%{transform:translateX(18px);opacity:.4}}.journey-route{position:relative;z-index:1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;align-items:center;min-height:214px;margin:0;padding:0;list-style:none}.journey-stop{position:relative;display:flex;flex-direction:column;align-items:center;min-width:0}.journey-stop:nth-child(odd){transform:translateY(-30px)}.journey-stop:nth-child(even){transform:translateY(31px)}.journey-marker{position:relative;z-index:2;display:grid;place-items:center;width:54px;height:54px;margin-bottom:8px;border:3px solid #8d693f;border-radius:50% 45% 50% 43%;background:#fae7bd;color:#694227;font-size:26px;box-shadow:0 4px 0 #704a2e7a,0 0 0 5px #fff0d67a;transform:rotate(-4deg);transition:transform .2s,filter .2s}.journey-stop:nth-child(even) .journey-marker{order:2;margin:8px 0 0;transform:rotate(4deg)}.journey-stop article{width:100%;min-height:91px;padding:8px 9px 7px;border-left:2px solid #a97a4d;background:#f7e5c5df;color:#70472a;box-shadow:0 3px 0 #68402743;transition:transform .2s,filter .2s}.journey-stop:nth-child(odd) article{border-radius:5px 11px 11px 5px}.journey-stop:nth-child(even) article{order:1;border-radius:11px 5px 5px 11px}.journey-stop b{display:block;margin:2px 0;font-size:18px;line-height:1.25;font-weight:400}.journey-stop p{display:none;margin:3px 0;font:12px/1.28 "Segoe UI",Tahoma,Arial,sans-serif}.journey-stop em{display:block;font:600 12px/1.25 "Segoe UI",Tahoma,Arial,sans-serif;color:#72553d}.journey-stop.future{filter:saturate(.15);opacity:.58}.journey-stop.current .journey-marker{width:66px;height:66px;border-color:#597637;background:#eef1c8;color:#4d6b30;box-shadow:0 5px 0 #48622f8a,0 0 0 7px #dcebb28a;animation:current-berth 1.8s ease-in-out infinite}.journey-stop.current article{border-left-width:4px;border-left-color:#69873e;background:#f2f0c9;box-shadow:0 4px 0 #5d773d5c}.journey-stop.current p{display:block}.journey-stop.reached .journey-marker:after{content:'✓';position:absolute;right:-5px;bottom:-5px;display:grid;place-items:center;width:20px;height:20px;border:2px solid #fff5de;border-radius:50%;background:#6c8c45;color:#fff;font:700 13px Arial,sans-serif}.journey-stop:hover .journey-marker,.journey-stop:hover article{filter:brightness(1.05);transform:translateY(-3px) rotate(0)}@keyframes current-berth{50%{transform:translateY(-4px) rotate(2deg);filter:brightness(1.06)}}
@media(max-width:1050px),(max-height:600px){.journey-map-overview{gap:10px}.journey-now{grid-template-columns:53px minmax(0,1fr);padding:9px 11px}.journey-now-icon{width:47px;height:47px;font-size:27px}.journey-now b{font-size:21px}.journey-now p{font-size:11px}.journey-now em{font-size:11px}.journey-destination{padding:9px 10px}.journey-destination b{font-size:17px}.journey-destination>div span{padding:3px 5px;font-size:11px}.journey-route-wrap{min-height:176px;padding:18px 5px 6px}.journey-river{height:45px;border-top-width:8px;border-bottom-width:8px}.journey-route{gap:5px;min-height:145px}.journey-stop:nth-child(odd){transform:translateY(-19px)}.journey-stop:nth-child(even){transform:translateY(21px)}.journey-marker{width:37px;height:37px;margin-bottom:5px;border-width:2px;font-size:18px;box-shadow:0 2px 0 #704a2e7a,0 0 0 3px #fff0d67a}.journey-stop:nth-child(even) .journey-marker{margin-top:5px}.journey-stop article{min-height:58px;padding:5px 6px;box-shadow:0 2px 0 #68402743}.journey-stop small{font-size:11px}.journey-stop b{font-size:12px}.journey-stop em{font-size:11px}.journey-stop.current .journey-marker{width:45px;height:45px;box-shadow:0 3px 0 #48622f8a,0 0 0 4px #dcebb28a}.journey-stop.current p{display:none}}
@media(orientation:portrait) and (max-width:1100px){.journey-map-overview{grid-template-columns:1fr}.journey-destination{border-left:0;border-top:3px solid #aa794d;border-radius:4px 4px 12px 12px}.journey-route-wrap{min-height:0;padding:17px 4px 10px;background:linear-gradient(90deg,#e6ca9a47,#fff1cf78)}.journey-river{left:31px;top:18px;bottom:12px;right:auto;width:48px;height:auto;transform:none;border:0;border-left:10px solid #75a7ac70;border-right:10px solid #75a7ac50;border-radius:50%;}.journey-river:before,.journey-river:after{display:none}.journey-river i{display:none}.journey-route{display:grid;grid-template-columns:1fr;gap:10px;min-height:0;padding-left:62px}.journey-stop,.journey-stop:nth-child(odd),.journey-stop:nth-child(even){display:grid;grid-template-columns:52px minmax(0,1fr);align-items:center;gap:10px;transform:none}.journey-stop:nth-child(even) .journey-marker{order:0;margin:0}.journey-marker{margin:0}.journey-stop article,.journey-stop:nth-child(even) article{order:0;min-height:0;border-radius:7px 12px 12px 7px}.journey-stop p,.journey-stop.current p{display:block}.journey-stop.current .journey-marker{width:53px;height:53px}.journey-stop:hover .journey-marker,.journey-stop:hover article{transform:none}}

/* Day loop, reviews, events, regulars and mobile polish */
.mission-engine{display:grid;gap:14px}.mission-hero .mission-item{background:linear-gradient(145deg,#eef0ca,#d6dfa6);border-color:#7e934d}.mission-item small{display:block;font-size:12px;letter-spacing:.13em;color:#75553b}.mission-item em{display:block;margin-top:4px;font-size:12px;font-style:normal;color:#74563c}.mission-note{padding:11px 15px;border:1px dashed #b78b5d;border-radius:11px;background:#f5e6c8aa;color:#755640;font-size:14px}
.review-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:13px}.review-summary span{padding:11px 15px;border:2px solid #9c693b;border-radius:13px;background:#f8e8cae9;box-shadow:0 4px 0 #3b24176b}.review-summary small{display:block;font-size:12px;letter-spacing:.13em;color:#75553b}.review-summary b{font-size:26px;font-weight:400}.review-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.review-card{padding:15px;border:2px solid #9d6a3d;border-radius:15px;background:#f8e9cce9;box-shadow:0 4px 0 #3b24176b}.review-card header{display:grid;grid-template-columns:44px 1fr auto;gap:10px;align-items:center}.review-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#6e462b;color:#fff0d4;font-size:21px}.review-card header div{display:flex;min-width:0;flex-direction:column}.review-card header b{font-size:20px;font-weight:400}.review-stars{color:#7b531f;letter-spacing:1px}.review-issue{align-self:start;padding:3px 7px;border-radius:8px;background:#b56747;color:#fff0dd;font-size:12px}.review-issue.good{background:#4f6b2d}.review-text{font-size:16px;line-height:1.3;margin:12px 0;color:#6c4930}.review-thread{padding:7px 9px;margin:6px 0;border-radius:10px}.review-thread small{display:block;font-size:12px;letter-spacing:.1em}.review-thread p{margin:2px 0;font-size:13px;line-height:1.3}.review-thread.shop{margin-left:12%;background:#e4ebc7}.review-thread.customer{margin-right:12%;background:#f0d8b8}.review-reply-form{display:grid;grid-template-columns:1fr auto;gap:7px;margin-top:10px}.review-reply-form textarea{min-height:56px;resize:vertical;padding:8px 10px;border:1px solid #b48759;border-radius:9px;background:#fffaf0;font:14px Patrick,'Segoe UI',Tahoma,sans-serif;color:#58351f;outline:none}.review-reply-form button{min-width:112px;border-radius:9px;background:#7f9951;color:#fff7dc;border:2px solid #60743e;box-shadow:0 3px 0 #45572b}.review-closed,.review-recovered{margin-top:8px;font-size:12px;color:#71573d}.review-recovered{padding:6px 8px;border-radius:8px;background:#dfe9be;color:#587034}
.regular-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.regular-card{display:grid;grid-template-columns:72px 1fr;gap:13px;padding:16px;border:2px solid #9b683b;border-radius:15px;background:#f6e5c7e9;box-shadow:0 4px 0 #3b24176b}.regular-card.tier-2,.regular-card.tier-3{background:#e8ebc9e9;border-color:#80944f}.regular-avatar{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:#6b432a;color:#f5dfb5;font-size:31px;border:3px solid #d3a56b}.regular-card div{min-width:0}.regular-card small{font-size:12px;letter-spacing:.12em;color:#76553b}.regular-card b{display:block;font-size:25px;font-weight:400}.regular-card p{font-size:13px;color:#755641;margin:4px 0}.regular-card em{font-style:normal;font-size:12px;color:#7c5a40}.regular-card i{display:block;height:6px;margin:8px 0 4px;border-radius:9px;background:#c7a477;overflow:hidden}.regular-card i u{display:block;height:100%;background:#83a452;text-decoration:none}.regular-card div>span{font-size:12px;color:#73563e}
.stock-alert{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:11px;padding:10px 14px;border-radius:12px;border:2px solid}.stock-alert.warn{background:#f4d8b9;border-color:#aa6941;color:#79472c}.stock-alert.ok{background:#e5ebc8;border-color:#7c914e;color:#5a7137}.stock-card.stock-low{border-color:#bb754a;background:#f5dcc0}.stock-card.stock-empty{border-color:#a75342;background:#eec7b8}.recipe-card.oos{border-color:#ae6546;background:#eed2c0}.recipe-card.locked{filter:saturate(.3);opacity:.7}
.story-event-overlay{position:fixed;z-index:260;inset:0;display:grid;place-items:center;padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));background:#21140db8;backdrop-filter:blur(5px)}.story-event-card{position:relative;width:min(650px,88vw);padding:30px 34px 26px;border:3px solid #976039;border-radius:18px 23px 16px;background:linear-gradient(135deg,#fff0d1,#ebcca0);box-shadow:0 13px 0 #3b2417a8,0 25px 55px #160c08b0,inset 0 0 0 6px #fff8e05c;text-align:center;color:#603a22}.story-event-icon{display:grid;place-items:center;width:64px;height:64px;margin:-7px auto 7px;border-radius:50%;background:#6d472d;color:#fff2d4;font-size:32px;border:3px solid #c7985f}.story-event-card small{font-size:12px;letter-spacing:.16em;color:#765437}.story-event-card h2{font-size:38px;font-weight:400;line-height:1.15;margin:6px 0 11px}.story-event-card>p{font-size:19px;line-height:1.35;color:#79573d}.story-event-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:17px}.story-event-choices button,.event-continue{min-height:58px;padding:8px 12px;border-radius:11px;border:2px solid #667c40;background:#89a758;color:#fff8df;box-shadow:0 4px 0 #4b5d2d}.story-event-choices button:disabled{background:#b8a78d;border-color:#8f7c64;box-shadow:none;color:#eee0cb}.story-event-choices button b{display:block;font-size:18px;font-weight:400}.story-event-choices button span{display:block;font-size:12px}
.event-outcome-finance{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}.event-outcome-finance>span{padding:9px 10px;border:1px solid #b78351;border-radius:10px;background:#fff8e6a8}.event-outcome-finance small{display:block;font-size:12px;letter-spacing:.11em}.event-outcome-finance b{display:block;margin-top:2px;font-size:18px;font-weight:700}.event-outcome-finance em{display:block;margin-top:2px;font-size:12px;font-style:normal;color:#74573c}.event-outcome-finance .good{color:#607e37}.event-outcome-finance .bad{color:#8c4833}
.day-summary-overlay{z-index:250}.day-summary-paper{width:min(900px,90vw);max-height:88vh;overflow:auto;padding:30px 34px;border:3px solid #976039;border-radius:18px 23px 17px;background:linear-gradient(135deg,#fff0d1,#e8c99d);box-shadow:0 14px 0 #3c2518a8,0 27px 60px #160c08b0,inset 0 0 0 7px #fff8e05a;color:#603a22}.day-summary-paper h2{font-size:42px;font-weight:400;margin:5px 0 9px}.summary-modifier{display:inline-flex;align-items:center;gap:6px;margin:0 0 13px;padding:5px 10px;border:1px solid #b68551;border-radius:999px;background:#fff6dda8;font-size:13px;box-shadow:inset 0 1px #fff9}.summary-modifier b{font-weight:700}.summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.summary-grid span{padding:10px 12px;border:1px solid #b78351;border-radius:11px;background:#fff8e6a8}.summary-grid small{display:block;font-size:12px;letter-spacing:.12em;color:#74553b}.summary-grid b{display:block;font-size:21px;font-weight:400}.summary-grid .good b{color:#607e37}.summary-grid .bad b{color:#8c4833}.summary-note{margin:13px 0;padding:11px 14px;border-radius:11px;background:#e4d2b2;font-size:15px;line-height:1.45}.summary-actions{display:flex;gap:10px}.summary-actions button{flex:1}
@supports(padding:max(0px)){.home-topbar,.module-topbar{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}.home-footer{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}}
@media(max-width:1050px),(max-height:600px){
  .review-list,.regular-grid{gap:7px}.review-card{padding:8px}.review-card header{grid-template-columns:32px 1fr auto;gap:6px}.review-avatar{width:30px;height:30px;font-size:15px}.review-card header b{font-size:14px}.review-stars{font-size:11px}.review-text{font-size:11px;margin:6px 0}.review-thread{padding:4px 6px;margin:4px 0}.review-thread p{font-size:11px}.review-reply-form textarea{min-height:38px;font-size:11px}.review-reply-form button{min-width:78px;font-size:11px}.regular-card{grid-template-columns:44px 1fr;padding:8px;gap:7px}.regular-avatar{width:40px;height:40px;font-size:20px}.regular-card b{font-size:17px}.regular-card p{font-size:11px}.regular-card em,.regular-card div>span{font-size:11px}.story-event-card{width:min(620px,90vw);max-height:88vh;overflow:auto;padding:17px 20px}.story-event-icon{width:44px;height:44px;font-size:22px}.story-event-card h2{font-size:27px}.story-event-card>p{font-size:13px}.story-event-choices button{min-height:45px}.day-summary-paper{width:min(840px,92vw);padding:17px 21px}.day-summary-paper h2{font-size:29px;margin-bottom:5px}.summary-modifier{font-size:11px;margin-bottom:7px;padding:4px 8px}.summary-grid span{padding:6px 8px}.summary-grid b{font-size:15px}.summary-note{font-size:11px;margin:8px 0;padding:7px 9px}.summary-actions button{min-height:44px;font-size:14px}.home-footer{gap:6px}.home-footer button{font-size:11px;padding:4px}.home-footer>i{height:14px}
  .event-outcome-finance{gap:6px;margin:9px 0}.event-outcome-finance>span{padding:6px 7px}.event-outcome-finance b{font-size:13px}.event-outcome-finance em{font-size:11px}
}


.recipe-actions{display:grid;gap:6px}.recipe-actions button{min-height:40px;border-radius:9px;border:2px solid #4a5c2b;background:#5c7a33;color:#fff7dc;box-shadow:0 3px 0 #4b5d2d;font:14px Patrick,'Segoe UI',Tahoma,sans-serif}.recipe-actions button+button{background:#fff0d4;color:#6c462b;border-color:#a67a4f;box-shadow:0 3px 0 #7a5739}.recipe-actions button:disabled{background:#bca98d;color:#eee1cf;border-color:#8f7d67;box-shadow:none}
@media(orientation:landscape) and (max-height:460px){
  .module-body{bottom:max(8px,env(safe-area-inset-bottom));padding-bottom:max(14px,env(safe-area-inset-bottom))}
  .home-footer{left:max(2vw,env(safe-area-inset-left));right:max(2vw,env(safe-area-inset-right));bottom:max(3px,env(safe-area-inset-bottom));overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:none}.home-footer::-webkit-scrollbar{display:none}.home-footer .home-save-state{position:sticky;right:0;padding-left:8px;background:linear-gradient(90deg,transparent,#2b1a11 22%)}
  .stock-card button,.recipe-card button,.upgrade-item button,.setting-action,.setting-toggle,.review-reply-form button,.story-event-choices button,.event-continue,.summary-actions button{min-height:44px}
  .recipe-actions{gap:4px}.recipe-actions button{min-height:44px;font-size:11px}
  .review-list{grid-template-columns:1fr 1fr}.review-card{max-height:none}.review-reply-form textarea{min-height:44px}
  .story-event-overlay,.shell-modal{padding-top:max(10px,env(safe-area-inset-top));padding-right:max(10px,env(safe-area-inset-right));padding-bottom:max(10px,env(safe-area-inset-bottom));padding-left:max(10px,env(safe-area-inset-left))}
  .story-event-card,.day-summary-paper{max-height:calc(100dvh - max(20px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));overflow:auto}
}

/* Review chat actions ported from Tiệm Tà Tữa interaction model */
.review-reply-actions{display:grid;gap:6px;align-content:end}.review-reply-form button{min-height:42px;padding:6px 10px}.review-reply-form .review-close-chat{background:#fff0d7;color:#6b472e;border-color:#a87d56;box-shadow:0 3px 0 #7b583a}.review-thread em{display:block;margin-top:3px;font-size:12px;font-style:normal;color:#6a5846}
.review-suggest{grid-column:1/-1;margin-bottom:2px}
.review-suggest>small{display:block;font-size:12px;letter-spacing:.06em;color:#75553b;margin-bottom:5px}
.review-suggest-chips{display:flex;flex-wrap:wrap;gap:6px}
.review-suggest-chip{flex:1 1 calc(50% - 6px);text-align:left;padding:7px 10px;border:1.5px solid #c49a63;border-radius:10px;background:#fff6e6;color:#5c3a22;font:12px Patrick,'Segoe UI',Tahoma,sans-serif;line-height:1.3;cursor:pointer;box-shadow:0 2px 0 #d8b483;min-width:0}
.review-suggest-chip:hover,.review-suggest-chip:active{background:#ffe9c6;border-color:#a87d56}
.review-suggest-more{flex:0 0 auto;padding:7px 12px;border:1.5px dashed #b48759;border-radius:10px;background:transparent;color:#71573d;font:12px Patrick,'Segoe UI',Tahoma,sans-serif;cursor:pointer}
.review-dropped{margin-top:8px;padding:6px 8px;border-radius:8px;background:#f3d4c3;color:#9a4a2a;font-size:12px}
@media(max-width:1050px),(max-height:600px){.review-reply-actions{gap:4px}.review-reply-form button{min-width:86px;min-height:44px;font-size:11px}}

/* Persistent achievement collection */
.hub-tools .achievement-tool{background:linear-gradient(145deg,#f2dfbfed,#dcc18fed);border-color:#9c793e}.hub-tools .achievement-tool>span{background:#8b672f}.achievement-summary>div:last-child{background:#eef0caeb;border-color:#81944d}.achievement .achievement-state{margin:2px 0 5px;font-size:12px;letter-spacing:.12em;color:#8a7763}.achievement.unlocked .achievement-state{color:#71813f}.achievement i{display:block;width:100%;height:7px;margin-top:auto;background:#9f927f66;border-radius:10px;overflow:hidden}.achievement i u{display:block;height:100%;background:#91815d;border-radius:10px;text-decoration:none}.achievement.unlocked i u{background:#85a855}.achievement em{margin-top:5px;font-size:12px;font-style:normal;color:inherit}.achievement p{margin-bottom:10px}
@media(max-width:1050px),(max-height:600px){.achievement-summary>div{min-height:52px}.achievement .achievement-state{font-size:11px;margin:1px 0 3px}.achievement i{height:5px}.achievement em{font-size:11px}.achievement p{margin-bottom:5px}}

/* P1 retention, progression and economy systems */
.regular-note{padding:6px 8px;border-left:3px solid #a98558;background:#fff4d8b8;border-radius:5px}.regular-story{margin-top:10px;padding:10px;border:1px dashed #9d734d;border-radius:10px;background:#fff4d8b0}.regular-story strong{display:block;font-size:16px;font-weight:400}.regular-story>div,.preorder-card>div,.haggle-card>div{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.regular-story button,.preorder-card button,.haggle-card button,.pricing-row button{min-height:38px;padding:6px 10px;border:1.5px solid #4c5f2d;border-radius:9px;background:#5c7a33;color:#fff8df;font:13px Patrick,'Segoe UI',Tahoma,sans-serif;box-shadow:0 2px 0 #4d6030}.journey-hero,.journey-next,.preorder-card,.forecast-card,.haggle-card,.economy-analytics>span{padding:16px 18px;margin-bottom:12px;border:2px solid #9b683b;border-radius:14px;background:#f7e7cae9;box-shadow:0 4px 0 #3b24176b;color:#674025}.journey-hero{background:linear-gradient(145deg,#e9edca,#cfdba0);border-color:#7d914c}.journey-hero small,.journey-next small,.preorder-card small,.forecast-card small,.haggle-card small,.economy-analytics small{display:block;font-size:12px;letter-spacing:.13em;color:#74573c}.journey-hero>b,.journey-next h3,.preorder-card>b,.forecast-card>b,.haggle-card>b,.economy-analytics b{display:block;font-size:27px;font-weight:400;line-height:1.15}.journey-hero p,.journey-next p,.preorder-card p,.forecast-card p,.haggle-card p{margin:5px 0;color:#735540;font-size:14px}.journey-hero em,.preorder-card em,.economy-analytics em{display:block;font-style:normal;font-size:12px;color:#72563e}.journey-next>div{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}.journey-next>div span{padding:5px 9px;border-radius:999px;background:#fff5df;border:1px solid #b88b5d;font-size:12px}.journey-list{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.journey-rank{min-height:155px;padding:13px;border:2px solid #887868;border-radius:13px;background:#c8baa8df;color:#766757;filter:saturate(.45)}.journey-rank.done{background:#f2dfb9e9;border-color:#9d6d40;color:#694128;filter:none}.journey-rank>span{font-size:29px}.journey-rank small{display:block;font-size:12px;letter-spacing:.12em}.journey-rank b{display:block;font-size:20px;font-weight:400}.journey-rank p{font-size:12px;margin:5px 0}.journey-rank em{font-size:12px;font-style:normal}.preorder-card.active{background:#e9edcae9;border-color:#80934f}.preorder-card button+button{background:#fff1d8;color:#70492e;border-color:#a57a51;box-shadow:0 2px 0 #785639}.preorder-history-list{padding:13px;border:2px solid #96643c;border-radius:13px;background:#f5e4c6df}.preorder-history-list h3{margin:0 0 7px;font-weight:400}.preorder-history{display:flex;justify-content:space-between;gap:10px;padding:7px 4px;border-top:1px dashed #b48b63}.preorder-history span{display:flex;flex-direction:column}.preorder-history small{font-size:12px;color:#72573f}.preorder-history b{font-size:15px;font-weight:400}.preorder-history em{font-size:12px;font-style:normal;color:#745640}.forecast-card,.haggle-card{display:inline-block;width:calc(50% - 7px);vertical-align:top}.forecast-card{margin-right:10px}.pricing-row{display:flex;gap:4px;margin-top:7px}.pricing-row button{min-height:30px;padding:3px 8px;background:#fff2d8;color:#70482d;border-color:#ad8055;box-shadow:none;font-size:12px}.pricing-row button.active{background:#4f6b2d;color:#fff;border-color:#5d713d}.recipe-card.hot-item{border-color:#b97943;box-shadow:0 4px 0 #56301d6b,inset 0 0 0 2px #f1c27b55}.order-bulk{margin-left:5px;padding:1px 5px;border-radius:5px;background:#af6544;color:#fff6df;font-style:normal;font-size:.72em}.economy-analytics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}.economy-analytics>span{margin:0}.economy-analytics em{margin-top:4px}.upgrade-item.locked{filter:saturate(.45);opacity:.72}
.hub-tools button{padding:8px 6px;grid-template-columns:30px minmax(0,1fr);column-gap:5px}.hub-tools button>span{width:30px;height:30px;font-size:15px}.hub-tools button>b{font-size:15px}.hub-tools button>small{font-size:12px}
@media(max-width:1050px),(max-height:600px){.hub-tools{grid-template-columns:repeat(7,minmax(0,1fr))}.hub-tools button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;text-align:center;padding:2px 1px;min-height:52px}.hub-tools button>span{width:24px;height:24px;font-size:12px;flex:none}.hub-tools button>b{font-size:11px;line-height:1.25;white-space:nowrap;overflow:visible;text-overflow:clip}.hub-tools button>small{display:none}.regular-story{padding:6px;margin-top:5px}.regular-story strong{font-size:12px}.regular-story button,.preorder-card button,.haggle-card button{min-height:36px;font-size:11px}.journey-hero,.journey-next,.preorder-card,.forecast-card,.haggle-card,.economy-analytics>span{padding:9px 10px;margin-bottom:7px}.journey-hero>b,.preorder-card>b,.forecast-card>b,.haggle-card>b{font-size:18px}.journey-list{gap:5px}.journey-rank{min-height:98px;padding:7px}.journey-rank>span{font-size:19px}.journey-rank b{font-size:14px}.journey-rank p{font-size:11px}.economy-analytics{gap:6px}.economy-analytics b{font-size:16px}}

/* Portrait shell: management screens remain usable instead of being hidden behind the
   old rotate-only gate. Landscape keeps the denser two-column layout above. */
@media(orientation:portrait) and (max-width:1100px){
  #app-shell,#viewport{visibility:visible!important;pointer-events:auto!important}
  .app-screen{overflow:auto}
  .entry-copy{display:none}.entry-book{left:5vw;right:5vw;top:50%;width:auto;max-width:560px;margin:auto;transform:translateY(-50%);padding:30px 28px 24px}.entry-book h2{font-size:38px}.entry-book>p{font-size:18px}.entry-actions{flex-direction:column}
  .profile-scene{display:block;overflow:auto;padding:88px 5vw 40px}.profile-intro{display:none}.profile-paper{width:min(90vw,560px);margin:0 auto;transform:none;padding:30px 28px 22px}
  .home-screen{overflow:auto}.home-topbar{position:relative;left:auto;top:auto;transform:none;width:94vw;height:auto;margin:10px auto 0;grid-template-columns:1fr auto;grid-template-areas:'owner stats' 'brand brand';gap:8px}.owner-chip{grid-area:owner}.home-brand{grid-area:brand}.home-stats{grid-area:stats}.home-brand strong{max-width:90vw}.cash-pill{min-width:108px}.stat-pill{min-width:58px;padding-inline:8px}.home-icon{width:44px;height:44px}.home-content{position:relative;left:auto;top:auto;bottom:auto;transform:none;width:92vw;margin:12px auto 72px;display:block}.home-story{max-width:none;padding:10px 0 18px}.home-story h2{font-size:42px;line-height:1.15}.open-shop-button{width:100%;margin-top:12px}.hub-stack{height:auto;max-width:none}.hub-grid{grid-template-columns:1fr 1fr;grid-template-rows:none;grid-auto-rows:minmax(135px,auto)}.hub-tools{grid-template-columns:1fr 1fr}.home-footer{position:fixed;left:3vw;right:3vw;bottom:5px;height:38px;padding:0 8px;border-radius:12px;background:#2f1d14d9;backdrop-filter:blur(6px)}
  .module-screen{overflow:auto}.module-topbar{position:sticky;left:auto;top:0;transform:none;width:94vw;height:70px;margin:0 auto;grid-template-columns:50px 1fr auto;background:#2b1a12e8;border-radius:0 0 14px 14px;padding:8px;backdrop-filter:blur(7px)}.module-back{width:48px;height:48px;min-width:48px;min-height:48px}.module-wallet{min-width:105px}.module-body{position:relative;left:auto;top:auto;bottom:auto;transform:none;width:94vw;margin:10px auto 28px;overflow:visible}.module-summary,.ledger-summary,.economy-analytics{grid-template-columns:1fr}.stock-grid,.recipe-grid,.upgrade-list,.mission-list,.review-list,.regular-grid,.settings-sheet,.settings-full,.journey-list{grid-template-columns:1fr}.achievement-grid{grid-template-columns:1fr 1fr}.stock-card,.recipe-card{grid-template-columns:48px minmax(0,1fr) 94px}.story-event-choices{grid-template-columns:1fr}.review-summary{grid-template-columns:1fr 1fr 1fr}.review-reply-form{grid-template-columns:1fr}.review-reply-actions{grid-template-columns:1fr}.modal-paper{width:min(90vw,560px)}.forecast-card,.haggle-card{display:block;width:100%;margin-right:0}.pricing-row{flex-wrap:wrap}
  .event-outcome-finance{grid-template-columns:1fr}
}

/* P2A — chợ sáng: giá thị trường, dự toán nhập và mặc cả theo đúng một sạp. */
.market-morning{display:grid;grid-template-columns:minmax(220px,.72fr) minmax(0,1.28fr);gap:12px;margin-bottom:12px;padding:15px 17px;border:2px solid #9b683b;border-radius:15px;background:linear-gradient(145deg,#f6dfb9ed,#d8b37ded);box-shadow:0 5px 0 #3b24176b,inset 0 0 0 3px #fff4d65e;color:#674025}.market-morning>div:first-child small{display:block;font-size:12px;letter-spacing:.14em;color:#74553b}.market-morning>div:first-child b{display:block;font-size:26px;font-weight:400;line-height:1.15}.market-morning p{margin:5px 0 0;font-size:13px;line-height:1.3;color:#74553c}.market-price-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.market-price-strip>span{min-width:0;padding:8px 6px;border:1px solid #ad8257;border-radius:10px;background:#fff5dfbd;text-align:center}.market-price-strip small,.market-price-strip em{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.market-price-strip small{font-size:12px;color:#74573c}.market-price-strip b{display:block;font-size:15px;font-weight:400}.market-price-strip em{font-size:12px;font-style:normal;color:#705741}.market-price-strip .high b,.market-trend.high{color:#924631}.market-price-strip .low b,.market-trend.low{color:#5d7e37}.market-trend{font-weight:700}.market-reason{display:block;margin-top:2px;font-size:12px;font-style:normal;color:#725740}.stock-market-actions{display:grid;gap:5px}.stock-market-actions>button{width:100%}.stock-market-actions .market-haggle-pick{min-height:31px;background:#fff0d2;color:#6c462b;border-color:#aa7b4e;box-shadow:0 2px 0 #7b5738;font-size:12px}.stock-card.haggle-selected{border-color:#80954e;box-shadow:0 4px 0 #3b24176b,inset 0 0 0 3px #dce8ad}.haggle-card>em{display:block;margin-top:8px;font-size:12px;font-style:normal;color:#65783e}.haggle-card>div button{display:flex;min-width:118px;flex-direction:column;align-items:center;justify-content:center}.haggle-card>div button b{font-size:13px;font-weight:400}.haggle-card>div button span{font-size:12px;opacity:.86}
.regular-social-overlay .social-card{width:min(620px,90vw)}.social-effect{margin:12px 0;padding:9px 12px;border:1px dashed #91a05f;border-radius:10px;background:#e7edc9;color:#5c7138;font-size:14px}.chat-choice-list{grid-template-columns:1fr}.chat-choice-list button{text-align:left}.regular-guess-choices{grid-template-columns:1fr 1fr}
@media(max-width:1050px),(max-height:600px){.market-morning{grid-template-columns:.8fr 1.2fr;padding:8px 10px;gap:7px}.market-morning>div:first-child b{font-size:18px}.market-morning p{font-size:11px}.market-price-strip{gap:3px}.market-price-strip>span{padding:5px 3px}.market-price-strip b{font-size:11px}.market-price-strip small,.market-price-strip em{font-size:11px}.stock-market-actions{gap:3px}.stock-market-actions .market-haggle-pick{min-height:35px;font-size:11px}.haggle-card>div button{min-width:100px}.social-effect{font-size:11px}}
@media(orientation:portrait) and (max-width:1100px){.market-morning{grid-template-columns:1fr}.market-price-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.regular-guess-choices{grid-template-columns:1fr}}

/* --- Settings v2: expanded settings, changelog, QR, restore --- */
.settings-wide{grid-column:1/-1}
.checkpoint-list{display:flex;flex-wrap:wrap;gap:6px}.ckpt-btn{min-width:auto;padding:6px 12px;font-size:13px}
.settings-note{font-size:13px;color:#73573e;font-style:italic}
.danger-btn{background:#c0543e;border-color:#8c3a28;color:#fff7dc;box-shadow:0 3px 0 #6b2c1d}.danger-btn:hover{background:#a84534}
.changelog-modal .changelog-paper,.qr-modal .qr-paper{width:min(660px,90vw);max-height:85vh;overflow-y:auto}
/* The generic × glyph is drawn by button-alignment.css with font-size:0.
   Give static shell dialogs their own REAL 44px close target; otherwise the
   close control on changelog/QR collapses to 0×0 and is not touchable. */
.shell-modal .modal-paper>.modal-close{
  position:absolute;right:12px;top:10px;z-index:5;
  width:44px;height:44px;min-width:44px;min-height:44px;
  display:grid;place-items:center;padding:0;
  border:1.5px solid #b88b5a;border-radius:50%;
  background:#fff6de;color:#674027;
}
.changelog-paper>.book-eyebrow,.changelog-paper>h2,
.qr-paper>.book-eyebrow,.qr-paper>h2,
.settings-tutorial-paper>.book-eyebrow,.settings-tutorial-paper>h2{padding-right:42px}
.settings-tutorial-paper{width:min(620px,calc(100vw - 30px));max-height:calc(100dvh - 30px);overflow-y:auto}
.settings-tutorial-paper h2{line-height:1.17}
.settings-tutorial-paper p{font-size:18px;line-height:1.45;color:#633f26}
.settings-tutorial-paper .shell-primary{margin-top:12px;min-height:48px}
@media(max-width:400px) and (max-height:680px){
  .qr-modal .qr-paper{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:25px 18px 16px}
  .qr-modal .qr-paper h2{font-size:30px;line-height:1.15;margin:3px 0 8px}
  .qr-modal .qr-paper>p{font-size:13px;line-height:1.32;margin:5px 0}
  .qr-modal .qr-container{margin:8px 0}
  .qr-modal .qr-container canvas{width:172px;height:172px;image-rendering:pixelated}
  .qr-modal .backup-modal-actions{margin-top:10px}
  .qr-modal .backup-modal-actions button{min-height:44px}
  .settings-tutorial-paper{padding:24px 19px 18px}
  .settings-tutorial-paper p{font-size:16px;line-height:1.36}
}
.changelog-list{display:flex;flex-direction:column;gap:14px;margin:14px 0}
.changelog-entry{padding:14px 16px;border:2px solid #b28454;border-radius:12px;background:#fff5e8}
.changelog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.changelog-head b{font-size:20px;color:#6a4327}.changelog-head small{color:#73573e;font-size:13px}
.changelog-entry ul{margin:0;padding-left:20px}.changelog-entry li{font-size:14px;color:#755640;line-height:1.6}
.qr-container{display:flex;justify-content:center;margin:18px 0}.qr-container canvas{border-radius:8px;border:2px solid #b28454}
.qr-url{text-align:center;font-size:12px;color:#73573e;word-break:break-all;margin:0}
.entry-restore-area{margin-top:10px;display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.entry-restore-label{width:100%;text-align:center;font-size:12px;letter-spacing:.12em;color:#76573b;margin-bottom:2px}
.entry-restore-btn{padding:6px 14px;border-radius:8px;background:#fff0d8;color:#68442a;border:1.5px solid #9f744d;font-size:13px;cursor:pointer;box-shadow:0 2px 0 #7b5837}.entry-restore-btn:hover{background:#f5e4c7}
@media(max-width:1050px),(max-height:600px){.changelog-entry{padding:8px 10px}.changelog-head b{font-size:16px}.changelog-entry li{font-size:11px}.settings-wide{grid-column:1/-1}.checkpoint-list{gap:4px}.ckpt-btn{font-size:11px;padding:4px 8px}}
@media(orientation:portrait) and (max-width:1100px){.settings-wide{grid-column:1/-1}.checkpoint-list{gap:4px}}
.sfx-preview{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}
.sfx-preview button{min-height:34px;border:1px solid #ccb392;border-radius:8px;background:#fff9ec;color:#64452e;padding:5px 9px;font:inherit;font-size:13px;cursor:pointer}
.sfx-preview button:active{transform:translateY(1px);background:#f3e1c6}

/* Huy hiệu BẬC trên HUD màn chính — kiểu chỉ số level của game MMO, bấm mở Hành trình */
.rank-pill{cursor:pointer;font:inherit;position:relative;background:linear-gradient(#ffe9b0,#f6cd77);border-color:#c38a33;color:#6a4218;box-shadow:0 4px 0 #9a6a2e}
.rank-pill small{color:#8a5a1e}
.rank-pill b{color:#5a3410;font-weight:700}
.rank-pill:before{content:'★';position:absolute;top:-7px;right:-5px;width:20px;height:20px;line-height:20px;text-align:center;font-size:12px;border-radius:50%;background:#e8912f;color:#fff6da;box-shadow:0 1px 2px #5a340e88}
.rank-pill:hover{filter:brightness(1.05)}
.rank-pill:active{transform:translateY(2px);box-shadow:0 2px 0 #9a6a2e}
@media(max-width:1050px),(max-height:600px){.rank-pill:before{width:16px;height:16px;line-height:16px;font-size:11px;top:-5px}}

/* HUD stat pills đồng bộ thành một bộ: CẤP (vàng) · NGÀY (nắng) · TIỀN QUÁN (xu) */
.home-stats .stat-pill{background:linear-gradient(#fff7ea,#f3e1c2);border:2px solid #b4824a;box-shadow:0 4px 0 #6a4423,inset 0 1px 0 #fffdf6}
.home-stats .stat-pill small{color:#795430;font-weight:700}
.home-stats .stat-pill b{color:#5a3410}
.home-stats .stat-pill:not(.rank-pill):before{content:'';position:absolute;top:-7px;right:-5px;width:20px;height:20px;line-height:20px;text-align:center;font-size:12px;border-radius:50%;box-shadow:0 1px 2px #5a340e88}
.day-pill,.cash-pill{position:relative}
.day-pill:before{content:'☀';background:#f1b24a;color:#fff6da}
.cash-pill{background:linear-gradient(#f4efd4,#e4e6b4)!important;border-color:#9aa24e!important;box-shadow:0 4px 0 #616b2e,inset 0 1px 0 #fffef2!important}
.cash-pill small{color:#616b2e!important}
.cash-pill b{color:#44611f!important}
.cash-pill:before{content:'₫';background:#cdb24a;color:#4a3a12;font-weight:700}
@media(max-width:1050px),(max-height:600px){.home-stats .stat-pill:not(.rank-pill):before{width:16px;height:16px;line-height:16px;font-size:11px;top:-5px}}
