/* The scene, plan and opening action are three separate layers of the home. */
#game[data-mode="home"]{position:relative;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:56px 76px minmax(130px,1fr) auto auto;min-height:520px;height:100dvh;max-height:1000px;overflow:hidden;background:#fffaf0}
#game[data-mode="home"]>.topbar{grid-area:1/1;height:auto;align-items:center;padding:8px 18px;border-bottom:1px solid #dde4d8}
#game[data-mode="home"]>.shop-title,#game[data-mode="home"]>.order-zone{display:none}
#home-caption{grid-area:2/1;padding:12px 20px 4px;background:#fffaf0;z-index:1;pointer-events:none}
#home-chapter{display:block;font-size:10px;letter-spacing:.1em;color:#7c8876;margin-bottom:3px}
#home-heading{font-size:24px;font-weight:750;line-height:1.25;letter-spacing:.02em}
#home-subtitle{font-size:11px;color:#7b8c79;margin-top:5px}
#game[data-mode="home"]>.scene-wrap{grid-area:3/1;min-height:0!important;max-height:none;margin:8px 12px 0;border-radius:24px 24px 8px 8px;overflow:hidden}
#game[data-mode="home"] #home-goals{grid-area:4/1;padding:13px 18px 7px;background:transparent}
.home-section-label{display:flex;align-items:center;justify-content:space-between;margin:0 1px 7px;font-size:10px;color:#7d8976;letter-spacing:.06em}
#game[data-mode="home"] #comfort-label{display:inline;margin:0;font-size:10px;letter-spacing:0}
#game[data-mode="home"] #next-target{border-radius:14px;padding:10px 12px;background:#eef0e4;gap:14px;min-height:48px}
#game[data-mode="home"] #next-target b{font-size:13px;flex:1}
#game[data-mode="home"] #next-target small{font-size:11px;max-width:42%;text-align:right}
#game[data-mode="home"] #home-daily{margin:7px 2px;font-size:11px;line-height:1.4}
#game[data-mode="home"] #journal-home{border-radius:0;border-top:1px solid #e0e5d6;background:transparent;margin:0;padding:9px 2px;min-height:44px}
#game[data-mode="home"] #journal-home b{font-size:12px;max-width:48%}
#game[data-mode="home"] #journal-home small{font-size:11px}
#game[data-mode="home"]>.action-zone{grid-area:5/1;display:flex;flex-direction:column;padding:6px 18px calc(12px + env(safe-area-inset-bottom,0px));background:#fffaf0;gap:0;border-top:0}
#game[data-mode="home"] #main-action{width:100%;min-height:50px;height:50px;max-height:none;border-radius:17px;font-size:17px;box-shadow:0 3px 0 #125b4c}
#game[data-mode="home"] #home-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin-top:13px}
#game[data-mode="home"] #home-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:3px 0;min-height:51px;border-radius:12px;background:transparent}
#home-nav button>span{font-size:19px;line-height:23px}#home-nav button>b{font-size:11px;font-weight:600}
#store-page{width:min(calc(100% - 24px),430px);max-height:calc(100dvh - 24px);padding:0;overflow:hidden;text-align:left;border-radius:26px}
#store-page[open]{display:flex;flex-direction:column}
.store-header{display:flex;align-items:center;gap:10px;padding:18px 18px 14px;flex-shrink:0;border-bottom:1px solid #e0e5d6}
#store-page .back{display:block;position:static;float:none;margin:0;padding:0;min-width:38px;width:38px;background:transparent}
.store-header>div{flex:1;min-width:0}.store-header small{font-size:10px;color:#788775;letter-spacing:.12em}
#store-page h2{font-size:19px;margin:3px 0 0;padding:0;line-height:1.35}
#store-level-tag{font-size:12px;font-weight:750;white-space:nowrap;border-left:1px solid #d7dfd0;padding-left:12px}
.store-scroll{padding:18px 20px;overflow-y:auto;overscroll-behavior:contain;min-height:0;scrollbar-width:thin}
#store-journey{display:flex;list-style:none;padding:0;margin:0 0 17px;gap:0}
#store-journey li{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:10px;color:#92a18f}
#store-journey li:before{content:'';position:absolute;top:13px;left:-50%;width:100%;height:1px;background:#dfe5d5}
#store-journey li:first-child:before{display:none}#store-journey li>span{display:grid;place-items:center;position:relative;width:27px;height:27px;border:1px solid #d7dfcf;border-radius:50%;background:#fffaf0;font-size:11px}
#store-journey li.current{color:var(--green);font-weight:750}#store-journey li.current>span{color:white;background:var(--green);border-color:var(--green)}#store-journey li.complete>span{color:var(--green);background:#e6ecde}
#store-current{font-size:11px;color:#768773;margin:0 0 18px}
.store-next-heading small{font-size:10px;color:#7d8976}.store-next-heading h3{font-size:24px;line-height:1.3;margin:4px 0 17px}
.store-comparison{margin:0;display:grid;gap:0}.store-comparison>div{display:flex;align-items:center;justify-content:space-between;min-height:46px;border-bottom:1px solid #e0e5d6}
.store-comparison dt{font-size:12px;color:#6c806e}.store-comparison dd{display:flex;gap:15px;align-items:baseline;margin:0}.store-comparison dd>span{font-size:13px;color:#879680}.store-comparison i{font-style:normal;font-size:11px;color:#9da895}.store-comparison b{font-size:20px}.store-comparison b small{font-size:10px;margin-left:4px;font-weight:400}
#store-details-toggle{display:flex;justify-content:space-between;width:100%;min-height:44px;margin:10px 0 0;padding:10px 0;background:transparent;text-align:left;font-size:12px;font-weight:650}
#store-details-toggle i{font-style:normal;transition:transform .21s}#store-details-toggle[aria-expanded=true] i{transform:rotate(180deg)}
#store-details{height:0;overflow:hidden}#store-unlocks{padding:0 0 9px}#store-unlocks p{display:flex;gap:9px;font-size:12px;line-height:1.8;margin:6px 0}#store-unlocks span{color:#7e9b77}
#milestone-next{font-size:10px;color:#8b937e;line-height:1.7;padding-top:9px}
.store-footer{flex-shrink:0;padding:14px 20px 18px;background:#eef0e4;border-top:1px solid #dfe5d5}
#store-readiness>div{display:flex;align-items:baseline;justify-content:space-between;font-size:11px}#store-readiness strong{font-size:23px}#store-readiness strong small{font-size:11px;font-weight:400}
#store-readiness progress{display:block;width:100%;height:4px;margin:9px 0;border:0;border-radius:4px;overflow:hidden;accent-color:var(--green);background:#dce3d2}#store-readiness progress::-webkit-progress-bar{background:#dce3d2}#store-readiness progress::-webkit-progress-value{background:var(--green)}
#store-readiness p{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#7a886f;line-height:1.5;margin-bottom:12px}
#store-confirm-open{min-height:48px;border-radius:16px;font-size:14px}#store-confirm-open:disabled{background:#dbe2d1;color:#7a8872;box-shadow:none;opacity:1}
.store-complete b{font-size:24px}.store-complete p{margin:18px 0;font-size:14px;line-height:1.9}
.author-optout{display:flex;align-items:center;gap:10px;text-align:left;min-height:50px;padding:3px 8px;margin:0 0 9px;cursor:pointer;border-radius:12px;background:#edf0e3}
.author-optout input{width:18px;height:18px;min-height:18px;flex:none;accent-color:var(--green)}.author-optout span{font-size:12px;font-weight:650}.author-optout small{display:block;font-size:10px;font-weight:400;color:#7b8873;margin-top:3px}
@media(max-height:700px){#game[data-mode="home"]{grid-template-rows:48px 67px minmax(105px,1fr) auto auto}#home-caption{padding:9px 16px 0}#home-heading{font-size:21px}#home-subtitle{font-size:10px;margin-top:3px}#game[data-mode="home"]>.scene-wrap{margin-top:5px}#game[data-mode="home"] #home-goals{padding:8px 14px 3px}#game[data-mode="home"]>.action-zone{padding:4px 14px 8px}#game[data-mode="home"] #home-nav{margin-top:8px}#game[data-mode="home"] #main-action{min-height:46px;height:46px}#game[data-mode="home"] #home-daily{font-size:10px;margin:5px 2px}#game[data-mode="home"] #next-target{min-height:44px;padding:8px 10px}.store-scroll{padding:14px 16px}.store-header{padding:12px 12px 10px}.store-footer{padding:12px 16px 14px}.store-next-heading h3{font-size:21px;margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){#store-details-toggle i{transition:none}#store-page[open]{animation:none}}
