/* Shop economy (shop-economy.js): one tabbed shop, dual rail, Plus paywall, daily check-in,
   gift composer + unwrap. Colors come only from config/theme.js tokens. */

/* ---------- shared bits ---------- */
.eco-star{display:inline-flex;color:var(--star-icon)}
.eco-star svg{fill:var(--star-fill)}
.eco-lock{display:inline-flex}
.eco-plus-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:999px;background:var(--secret-background);color:var(--on-secret);font-size:.6875rem;font-weight:700;letter-spacing:.02em;line-height:1.5;white-space:nowrap}
.eco-plus-lg{font-size:.8125rem;padding:4px 12px;margin:6px auto 0}
.eco-note{font-size:.8125rem;color:var(--text-secondary);line-height:1.45;margin:14px 2px 0;text-align:center}
.eco-lead{font-size:.9375rem;color:var(--text-secondary);line-height:1.45;margin:14px 2px 12px}
.eco-loading{color:var(--text-secondary);text-align:center;padding:32px 0}

/* ---------- balance card ---------- */
.eco-balance{border-radius:22px;padding:16px 16px 10px;background:linear-gradient(160deg,var(--balance-background),var(--balance-background-end));border:1px solid var(--balance-border);color:var(--balance-text)}
.eco-balance-main{display:flex;align-items:center;gap:12px}
.eco-balance-main b{display:block;font-size:2rem;line-height:1;letter-spacing:-.03em;color:var(--text-primary)}
.eco-balance-main small{font-size:.8125rem;color:var(--balance-text)}
.eco-balance-daily{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;margin-top:10px;padding:0 4px;border:0;border-top:1px solid var(--balance-border);background:none;color:var(--text-primary);font:inherit;font-size:.875rem;font-weight:600;text-align:left;cursor:pointer}
.eco-balance-daily span{flex:1}
.eco-balance-daily svg:first-child{color:var(--gold)}
.eco-gift-list{margin-top:12px}
.eco-gift-tile{background:var(--accent-soft);color:var(--accent)}

/* ---------- tabs ---------- */
.eco-tabs{display:flex;gap:6px;margin:16px 0 0;padding:2px 0 4px;max-width:100%;overflow-x:auto;scrollbar-width:none;position:sticky;top:0;z-index:2;background:var(--page-background)}
.eco-tabs::-webkit-scrollbar{display:none}
.eco-tabs button{flex:none;min-height:40px;padding:0 16px;border-radius:999px;border:1px solid var(--border-default);background:var(--card-background);color:var(--text-primary);font:inherit;font-size:.9375rem;font-weight:600;cursor:pointer}
.eco-tabs button.selected{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}

/* ---------- item grid ---------- */
.eco-homes-list{margin-top:12px}
.eco-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.eco-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-height:186px;padding:10px 12px 12px;border-radius:20px;border:1px solid var(--border-default);background:var(--card-background);color:var(--text-primary);font:inherit;text-align:left;cursor:pointer;box-shadow:0 3px 12px color-mix(in srgb,var(--shadow-color) 8%,transparent)}
.eco-card:active{transform:scale(.98)}
.eco-card b{font-size:.9375rem;line-height:1.25}
.eco-card-art{display:flex;align-items:center;justify-content:center;width:100%;height:104px;border-radius:14px;background:var(--surface-tinted);overflow:hidden}
.eco-card-art img{max-width:100%;max-height:100%;object-fit:contain}
.eco-art-theme img,.eco-art-furniture img{width:100%;height:100%;object-fit:cover}
.eco-art-furniture .eco-room-art{object-position:50% 70%}
.eco-card-status{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:auto;font-size:.8125rem}
.eco-card-status small{color:var(--text-secondary)}
.eco-price{display:inline-flex;align-items:center;gap:3px;font-weight:700;font-size:.9375rem;color:var(--text-primary)}
.eco-or-plus{font-size:.75rem}
.eco-qty{font-size:.75rem;color:var(--success-text);font-weight:600}
.eco-card-ribbon{position:absolute;top:16px;right:16px;z-index:1;display:inline-flex;align-items:center;gap:3px;padding:3px 9px;border-radius:999px;background:var(--secret-background);color:var(--on-secret);font-size:.6875rem;font-weight:700}

/* game art fallback emblem, pets, jars */
.eco-art-game svg{width:84px;height:84px}
.eco-pet-art{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%}
.eco-pet-art .eco-pet-portrait,.eco-pet-art img,.eco-pet-art canvas{max-height:100px;max-width:100%}
.eco-pet-sparkle{position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 22% 30%,var(--sparkle) 0 2px,transparent 3px),radial-gradient(circle at 74% 22%,var(--sparkle) 0 1.5px,transparent 2.5px),radial-gradient(circle at 64% 70%,var(--sparkle) 0 2px,transparent 3px),radial-gradient(circle at 30% 76%,var(--sparkle) 0 1.5px,transparent 2.5px);animation:eco-twinkle 2.4s ease-in-out infinite}
@keyframes eco-twinkle{0%,100%{opacity:.45}50%{opacity:1}}
.eco-jar{position:relative;display:flex;align-items:center;justify-content:center;width:72px;height:72px}
.eco-jar svg{position:relative;fill:color-mix(in srgb,var(--gold) 28%,var(--card-background));stroke:var(--game-gold-dark);stroke-width:2;stroke-linecap:round}
.eco-jar svg circle{fill:var(--gold);stroke:none}
.eco-jar-glow{position:absolute;inset:4px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--gold) 45%,transparent),transparent 70%)}
.eco-furniture{display:flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:18px;background:var(--tile-background);color:var(--accent)}

/* Pet coat finishes: a tint over the breed artwork (shop items pet:coat-*). Placeholder treatment
   until bespoke coat artwork exists; the same rule paints the room, the pet page and previews. */
.eco-pet-art[data-coat="honey"] .eco-pet-portrait,#phone[data-pet-finish="honey"] .room-cat-canvas,#phone[data-pet-finish="honey"] .pet-character,#phone[data-pet-finish="honey"] .pet-actor-stage canvas,#phone[data-pet-finish="honey"] .pet-status-face img,#phone[data-pet-finish="honey"] .petgm-portrait{filter:sepia(.75) saturate(1.9) hue-rotate(-12deg)}
.eco-pet-art[data-coat="moonlit"] .eco-pet-portrait,#phone[data-pet-finish="moonlit"] .room-cat-canvas,#phone[data-pet-finish="moonlit"] .pet-character,#phone[data-pet-finish="moonlit"] .pet-actor-stage canvas,#phone[data-pet-finish="moonlit"] .pet-status-face img,#phone[data-pet-finish="moonlit"] .petgm-portrait{filter:grayscale(.55) sepia(.2) hue-rotate(180deg) saturate(1.3) brightness(1.04)}
.eco-pet-art[data-coat="rosewood"] .eco-pet-portrait,#phone[data-pet-finish="rosewood"] .room-cat-canvas,#phone[data-pet-finish="rosewood"] .pet-character,#phone[data-pet-finish="rosewood"] .pet-actor-stage canvas,#phone[data-pet-finish="rosewood"] .pet-status-face img,#phone[data-pet-finish="rosewood"] .petgm-portrait{filter:sepia(.35) hue-rotate(-28deg) saturate(1.6)}
.eco-pet-art[data-coat="starlight"] .eco-pet-portrait,#phone[data-pet-finish="starlight"] .room-cat-canvas,#phone[data-pet-finish="starlight"] .pet-character,#phone[data-pet-finish="starlight"] .pet-actor-stage canvas,#phone[data-pet-finish="starlight"] .pet-status-face img,#phone[data-pet-finish="starlight"] .petgm-portrait{filter:saturate(.55) brightness(1.1) drop-shadow(0 0 6px var(--sparkle))}
.eco-pet-art[data-coat="aurora"] .eco-pet-portrait,#phone[data-pet-finish="aurora"] .room-cat-canvas,#phone[data-pet-finish="aurora"] .pet-character,#phone[data-pet-finish="aurora"] .pet-actor-stage canvas,#phone[data-pet-finish="aurora"] .pet-status-face img,#phone[data-pet-finish="aurora"] .petgm-portrait{filter:sepia(.3) hue-rotate(115deg) saturate(1.5) drop-shadow(0 0 7px var(--glow))}

/* ---------- Plus banner (rail) ---------- */
.eco-plus-banner{display:flex;align-items:center;gap:12px;width:100%;min-height:60px;margin:0 0 12px;padding:12px 14px;border-radius:18px;border:1px solid var(--secret-background);background:linear-gradient(140deg,var(--secret-background),var(--secret-background-end));color:var(--on-secret);font:inherit;text-align:left;cursor:pointer}
.eco-plus-banner .eco-plus-tag{background:var(--gold);color:var(--text-primary)}
.eco-plus-banner span:nth-child(2){flex:1;display:flex;flex-direction:column;gap:2px}
.eco-plus-banner b{font-size:.9375rem}
.eco-plus-banner small{color:var(--on-secret-muted);font-size:.8125rem;line-height:1.35}

/* ---------- item sheet ---------- */
.eco-sheet,.eco-paywall,.eco-daily,.eco-pick{display:block}
.eco-sheet>*+*,.eco-paywall>*+*,.eco-daily>*+*,.eco-pick>*+*{margin-top:10px}
/* block (not flex): a flex box beside the modal's floated close button would shrink to fit next to it. */
.eco-sheet-art{display:block;height:150px;line-height:150px;text-align:center;border-radius:20px;background:var(--surface-tinted);overflow:clip}
.eco-sheet-art>*{vertical-align:middle;line-height:normal}
.eco-sheet-art .eco-pet-art{display:inline-flex;height:150px;width:100%;vertical-align:top;line-height:normal}
.eco-sheet-art .eco-pet-art .eco-pet-portrait{max-height:136px}
.eco-gift-item .eco-sheet-art{height:72px;line-height:72px}
.eco-gift-item .eco-sheet-art .eco-pet-art{height:72px}
.eco-sheet-art img{max-height:140px;max-width:92%;object-fit:contain}
.eco-sheet-art .eco-jar{display:inline-flex;transform:scale(1.6)}
.eco-sheet-art.eco-art-consumable img{display:block;height:140px;width:auto;margin:5px auto 0}
.eco-sheet-art svg.hub-emblem{display:inline-block!important;width:120px;height:120px;vertical-align:middle;margin:0 auto}
.eco-sheet-art.eco-art-furniture img,.eco-sheet-art.eco-art-theme img{width:100%;height:100%;max-height:none;max-width:none;object-fit:cover}
.eco-sheet-copy{margin:0;color:var(--text-secondary);font-size:.9375rem;line-height:1.45}
.eco-sheet-state{display:flex;align-items:center;gap:8px;margin:0;font-weight:600;color:var(--success-text)}
.eco-ledger{margin:4px 0 0}
.eco-inv{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-radius:14px;background:var(--success-background);color:var(--success-text)}
.eco-inv b{font-size:1rem}
.eco-short{font-size:.875rem;color:var(--text-secondary)}
.eco-rail-plus{display:inline-flex;align-items:center;justify-content:center;gap:8px}

/* ---------- paywall ---------- */
.eco-paywall{text-align:center}
.eco-paywall-mark{display:flex;align-items:center;justify-content:center;width:76px;height:76px;margin:6px auto 0;border-radius:24px;background:linear-gradient(150deg,var(--secret-background),var(--secret-background-end))}
.eco-perks{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:10px;text-align:left}
.eco-perks li{display:flex;align-items:center;gap:12px}
.eco-perks li span:last-child{display:flex;flex-direction:column}
.eco-perks b{font-size:.9375rem}
.eco-perks small{font-size:.8125rem;color:var(--text-secondary);line-height:1.35}

/* ---------- daily check-in ---------- */
.eco-daily{text-align:center}
/* A plain block, not flex: a flex box is its own formatting context and would centre in the space left of
   the sheet's floated close button (the star sat ~26px left of centre). The star is centred inside it. */
.eco-daily-sun{position:relative;display:block;width:84px;height:84px;margin:4px auto 0}
.eco-daily-sun .eco-star{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:1}
.eco-ladder-label{margin:14px 0 0;font-size:.75rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-secondary)}
.eco-daily-sun>span:not(.eco-star){position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--gold) 55%,transparent) 0,color-mix(in srgb,var(--gold) 18%,transparent) 55%,transparent 72%);animation:eco-breathe 3.2s ease-in-out infinite}
@keyframes eco-breathe{0%,100%{transform:scale(.92)}50%{transform:scale(1.06)}}
.eco-daily-amount{margin:0;font-size:1rem;color:var(--text-secondary)}
.eco-daily-amount b{display:block;font-size:2.5rem;line-height:1.05;letter-spacing:-.03em;color:var(--text-primary)}
.eco-daily-delta{display:flex;align-items:center;justify-content:center;gap:6px;margin:0;padding:10px 12px;border-radius:14px;background:var(--surface-tinted);color:var(--text-primary);font-size:.9375rem}
.eco-daily-delta svg{color:var(--gold);flex:none}
.eco-ladder{list-style:none;display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin:4px 0 0;padding:0}
.eco-ladder li{display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 0 6px;border-radius:12px;background:var(--surface-muted);color:var(--text-secondary)}
.eco-ladder li span{font-weight:700;font-size:.9375rem;color:var(--text-primary)}
.eco-ladder li small{font-size:.625rem}
.eco-ladder li.done{background:var(--success-background);color:var(--success-text)}
.eco-ladder li.today{background:var(--accent);color:var(--on-accent);box-shadow:0 4px 12px color-mix(in srgb,var(--accent) 30%,transparent)}
.eco-ladder li.today span{color:var(--on-accent)}
.eco-daily[data-eco-daily-plus="0"] .eco-ladder li{opacity:.92}

@keyframes eco-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ---------- gift box (CSS-drawn, themed by wrap) ---------- */
.eco-box{--w:64px;--paper:var(--wood-light);--paper-2:var(--wood);--rib:var(--clay);position:relative;display:inline-block;width:var(--w);height:calc(var(--w)*.9);flex:none}
.eco-box.sm{--w:44px}.eco-box.md{--w:72px}.eco-box.lg{--w:112px}.eco-box.xl{--w:168px}
.eco-box-body{position:absolute;left:8%;right:8%;bottom:0;height:64%;border-radius:calc(var(--w)*.08);background:repeating-linear-gradient(135deg,var(--paper) 0 calc(var(--w)*.09),var(--paper-2) calc(var(--w)*.09) calc(var(--w)*.18));box-shadow:0 calc(var(--w)*.06) calc(var(--w)*.14) color-mix(in srgb,var(--shadow-color) 22%,transparent)}
.eco-box-lid{position:absolute;left:2%;right:2%;top:14%;height:24%;z-index:2;border-radius:calc(var(--w)*.07);background:var(--paper-2);box-shadow:0 2px 0 color-mix(in srgb,var(--shadow-color) 12%,transparent);transition:transform .7s cubic-bezier(.22,1,.36,1),opacity .7s}
.eco-box-ribbon{position:absolute;z-index:3;left:calc(50% - var(--w)*.06);width:calc(var(--w)*.12);top:14%;bottom:0;background:var(--rib);border-radius:2px}
.eco-box-bow{position:absolute;left:50%;top:-58%;width:calc(var(--w)*.5);height:calc(var(--w)*.26);transform:translateX(-50%)}
.eco-box-bow::before,.eco-box-bow::after{content:"";position:absolute;top:0;width:48%;height:100%;border:calc(var(--w)*.05) solid var(--rib);border-radius:50% 50% 50% 50%/60% 60% 40% 40%}
.eco-box-bow::before{left:0;transform:rotate(-14deg)}.eco-box-bow::after{right:0;transform:rotate(14deg)}
.eco-wrap-blush{--paper:var(--accent-soft);--paper-2:var(--accent-light);--rib:var(--accent)}
.eco-wrap-starry{--paper:var(--secret-background);--paper-2:var(--secret-background-end);--rib:var(--gold)}
.eco-wrap-garden{--paper:var(--success-background);--paper-2:var(--plant-leaf);--rib:var(--heart)}
.eco-wrap-starry .eco-box-body{background:radial-gradient(circle at 25% 35%,var(--sparkle) 0 1.5px,transparent 2px) 0 0/calc(var(--w)*.3) calc(var(--w)*.3),linear-gradient(var(--secret-background),var(--secret-background-end))}
.eco-box.open .eco-box-lid{transform:translateY(-38%) rotate(-12deg)}
.eco-box-float{animation:eco-float 3s ease-in-out infinite}
@keyframes eco-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}

/* ---------- composer ---------- */
.eco-compose-hero{display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px 0 6px;text-align:center}
.eco-compose-hero p{margin:0;color:var(--text-secondary);font-size:.9375rem}
.eco-compose-hero h2{margin:6px 0 0}
.eco-wraps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.eco-wrap-choice{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 4px 10px;border-radius:16px;border:1.5px solid var(--border-default);background:var(--card-background);color:var(--text-primary);font:inherit;font-size:.75rem;font-weight:600;line-height:1.2;cursor:pointer}
.eco-wrap-choice.selected{border-color:var(--accent);background:var(--selected-background)}
.eco-wrap-choice.locked .eco-box{opacity:.7}
.eco-wrap-choice .eco-plus-tag{position:absolute;top:-8px;right:-4px}
.eco-note-field textarea{min-height:84px;resize:vertical}
.eco-pieces{display:flex;flex-direction:column;gap:8px}
.eco-piece{display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 12px;border-radius:16px;border:1px solid var(--border-default);background:var(--card-background);color:var(--text-primary);font:inherit;text-align:left}
.eco-piece .ui-row-main{flex:1;min-width:0}
.eco-piece .secondary,.eco-file{width:auto;min-height:40px;padding:0 14px;flex:none}
.eco-piece-locked{cursor:pointer;background:var(--surface-muted)}
.eco-piece-locked .ui-row-main small{color:var(--text-secondary)}
.eco-file{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;cursor:pointer;font-weight:600}
.eco-file input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.eco-thumb,.eco-thumb-wrap img{width:44px;height:44px;border-radius:10px;object-fit:cover;flex:none}
.eco-compose .eco-plus-banner{margin-top:14px}
.eco-pick-art{width:44px;height:44px;overflow:hidden}
.eco-pick-art img{width:100%;height:100%;object-fit:contain}
.eco-pick-art .eco-pet-portrait{max-height:40px}
.eco-pick .ui-row[aria-disabled="true"]{opacity:.55}

/* ---------- unwrap ---------- */
.eco-unwrap{display:flex;flex-direction:column;align-items:center;gap:8px;padding:24px 0 8px;text-align:center}
.eco-unwrap h2{margin:12px 0 0}
.eco-unwrap p{margin:0;color:var(--text-secondary)}
.eco-unwrap-box{position:relative;border:0;background:none;padding:24px;cursor:pointer;animation:eco-wiggle 2.8s ease-in-out infinite}
@keyframes eco-wiggle{0%,82%,100%{transform:rotate(0)}86%{transform:rotate(-4deg)}90%{transform:rotate(4deg)}94%{transform:rotate(-2deg)}}
.eco-unwrap-box.opening{animation:none}
.eco-unwrap-box.opening .eco-box-lid{transform:translateY(-120%) rotate(-24deg);opacity:0}
.eco-unwrap-box.opening .eco-box-ribbon{transform:scaleY(0);transform-origin:bottom;transition:transform .5s}
.eco-unwrap-box.opening .eco-box-body{animation:eco-pop .7s ease-out both}
@keyframes eco-pop{40%{transform:scale(1.06)}100%{transform:scale(.96)}}
.eco-unwrap-sparkles{position:absolute;inset:0;pointer-events:none}
.eco-unwrap-sparkles i{position:absolute;left:50%;top:45%;width:8px;height:8px;border-radius:50%;background:var(--gold);opacity:0}
.eco-unwrap-box.opening .eco-unwrap-sparkles i{animation:eco-burst .9s ease-out forwards}
.eco-unwrap-sparkles i:nth-child(1){--dx:-70px;--dy:-60px}.eco-unwrap-sparkles i:nth-child(2){--dx:64px;--dy:-72px;background:var(--accent)}.eco-unwrap-sparkles i:nth-child(3){--dx:-90px;--dy:6px;background:var(--sparkle)}.eco-unwrap-sparkles i:nth-child(4){--dx:88px;--dy:-4px}.eco-unwrap-sparkles i:nth-child(5){--dx:-30px;--dy:-96px;background:var(--heart)}.eco-unwrap-sparkles i:nth-child(6){--dx:34px;--dy:-100px;background:var(--plant)}
@keyframes eco-burst{0%{opacity:1;transform:translate(-50%,-50%) scale(.4)}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(1.1)}}
.eco-unwrapped{display:flex;flex-direction:column;gap:12px;padding-top:8px}
.eco-unwrapped-head{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.eco-unwrapped-head h2{margin:0}
.eco-reveal{animation:eco-rise .5s ease-out both;animation-delay:calc(var(--i) * 140ms)}
.eco-unwrapped:not(.fresh) .eco-reveal{animation:none}
.eco-gift-note{margin:0;padding:16px 18px;border-radius:18px;background:var(--letter-paper);border:1px solid var(--letter-border)}
.eco-gift-note blockquote{margin:0;font-size:1.0625rem;line-height:1.5;color:var(--text-primary);white-space:pre-wrap}
.eco-gift-note figcaption{margin-top:8px;color:var(--text-secondary);font-size:.875rem;text-align:right}
.eco-gift-photo{margin:0;border-radius:18px;overflow:hidden;background:var(--image-matte)}
.eco-gift-photo img{display:block;width:100%;max-height:300px;object-fit:cover}
.eco-gift-drawing img{object-fit:contain;background:var(--card-background)}
.eco-gift-photo figcaption{padding:8px 12px;font-size:.8125rem;color:var(--text-secondary);background:var(--card-background)}
.eco-gift-item{display:flex;align-items:center;gap:12px;padding:12px;border-radius:18px;background:var(--success-background);color:var(--success-text)}
.eco-gift-item .eco-sheet-art{width:72px;height:72px;flex:none;border-radius:14px}
.eco-gift-item .eco-sheet-art img{max-height:64px}
.eco-gift-item span:last-child{display:flex;flex-direction:column;gap:2px}
.eco-gift-item b{color:var(--text-primary)}

/* ---------- Play grid: locked games ---------- */
.eco-card-art{position:relative}
.hub-tag.hub-tag-lock{display:inline-flex;align-items:center;gap:3px;background:var(--secret-background);color:var(--on-secret)}
.hub-tag.hub-tag-lock.hub-tag-plus{background:var(--gold);color:var(--text-primary)}

/* ---------- garden: sunshine jar row, locked varieties ---------- */
.garden-jar{display:flex;align-items:center;gap:10px;margin-top:12px;padding:10px 12px;border-radius:16px;background:var(--surface-tinted)}
.garden-jar>span:nth-child(2){flex:1;display:flex;flex-direction:column;line-height:1.3}
.garden-jar small{color:var(--text-secondary);font-size:.8125rem}
.garden-jar .secondary,.garden-jar .text-button{width:auto;min-height:40px;padding:0 12px;flex:none}
.garden-jar-icon{color:var(--gold)}


@media (prefers-reduced-motion:reduce){.eco-pet-sparkle,.eco-daily-sun>span:not(.eco-star),.eco-unwrap-box,.eco-box-float,.eco-reveal{animation:none}}
#phone.reduced-motion .eco-pet-sparkle,#phone.reduced-motion .eco-daily-sun>span:not(.eco-star),#phone.reduced-motion .eco-unwrap-box,#phone.reduced-motion .eco-box-float,#phone.reduced-motion .eco-reveal{animation:none}

/* ---------- mailbox letters: today's stars + unopened gifts (Little notes page) ---------- */
.eco-letter .eco-letter-seal{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;border-radius:50%;background:var(--surface-tinted);color:var(--accent)}
.eco-letters{margin-bottom:14px}.eco-letters .note-item{margin:0;border-top:1px solid var(--row-divider)}.eco-letters .note-item:first-child{border-top:0}.eco-letters .note-row{border-top:0;min-height:60px;gap:12px;padding:10px 12px 10px 12px}.eco-letters .note-row .ui-row-main small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.eco-letter-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--notification)}.eco-letters+.center{margin-top:24px}
/* Streak milestone bonus (final economy plan) */
.eco-daily-bonus{display:flex;align-items:center;justify-content:center;gap:6px;margin:8px 0 0;font-size:.9375rem;color:var(--text-primary)}
.eco-daily-bonus svg{color:var(--gold);flex:none}
.eco-daily-next{margin:8px 0 0;text-align:center;font-size:.875rem;color:var(--text-secondary)}
/* Streak saver (final economy plan) */
.eco-saver{display:flex;align-items:center;justify-content:center;gap:6px;margin:8px 0 0;text-align:center;font-size:.875rem;color:var(--text-secondary);line-height:1.4}
.eco-saver.is-used{color:var(--text-primary)}
.eco-saver svg{color:var(--accent);flex:none}

/* Final plan v5: "or ... now with Plus" shortfall link inside the warm star notice (opens the Plus sheet on tap). */
.eco-shortfall-plus{display:inline;min-height:0;padding:0;margin:0;border:0;background:none;color:var(--accent);font:inherit;font-weight:700;text-decoration:underline;cursor:pointer}
/* Daily stars, 2026-11-19: the 7-day track (one tile per day, a star and its amount). */
.eco-daily .eco-daily-sun{width:68px;height:68px;margin-top:0}
.eco-daily .eco-daily-amount{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:2px}
.eco-daily .eco-daily-amount b{display:inline;font-size:2.5rem}
.eco-daily-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:6px 0 0}
.eco-chip{display:inline-flex;align-items:center;gap:3px;padding:4px 10px;border-radius:99px;background:var(--surface-tinted);font-size:.8125rem;font-weight:700;color:var(--text-primary)}
.eco-chip small{font-weight:500;color:var(--text-secondary);margin-left:3px}
.eco-track{list-style:none;display:grid;grid-template-columns:repeat(6,minmax(0,1fr)) minmax(0,1.3fr);gap:5px;margin:16px 0 0;padding:0}
.eco-day{position:relative;display:flex;flex-direction:column;align-items:center;gap:1px;padding:8px 0 6px;border-radius:14px;background:var(--surface-muted);color:var(--text-primary)}
.eco-day .eco-day-star{display:flex;height:18px;align-items:center}
.eco-day b{font-size:1rem;font-weight:800;line-height:1.15;letter-spacing:-.02em}
.eco-day i{font-style:normal;font-size:.6875rem;font-weight:600;color:var(--text-secondary);margin-top:2px;white-space:nowrap}
.eco-day-plus{display:inline-flex;align-items:center;gap:1px;font-size:.6875rem;font-weight:700;color:var(--accent);opacity:.8}
.eco-day.is-done{background:var(--success-background);color:var(--success-text)}
.eco-day.is-done .eco-day-star{color:var(--success-text)}
.eco-day.is-today{background:var(--card-background);box-shadow:inset 0 0 0 2px var(--accent),0 4px 12px color-mix(in srgb,var(--accent) 22%,transparent)}
.eco-day.is-today i{color:var(--accent);font-weight:800}
.eco-day.is-last{background:color-mix(in srgb,var(--gold) 16%,var(--surface-muted))}
.eco-day.is-last.is-today{background:var(--card-background)}
.eco-day-bonus{position:absolute;top:-8px;left:50%;transform:translateX(-50%);padding:1px 6px;border-radius:99px;background:var(--gold);color:var(--text-primary);font-size:.625rem;font-weight:800;line-height:1.5;white-space:nowrap}
.eco-daily .eco-daily-next{display:flex;align-items:center;justify-content:center;gap:4px;margin:12px 0 0;font-size:.875rem;color:var(--text-secondary)}
.eco-daily .eco-daily-next b{color:var(--text-primary)}
.eco-daily .eco-daily-next .eco-saver{display:inline-flex;gap:3px;margin:0 0 0 10px;font-size:.8125rem;color:var(--text-secondary)}
/* Item sheets, 2026-11-19: no receipt. Centered art, the name, one line, two small counts, the price on the button. */
/* No X on item sheets: grabber swipe-down and a backdrop tap dismiss; the art card spans the full sheet width. */
#modal-root .modal-card:has(>.eco-sheet)>.modal-close{display:none}
.eco-sheet .eco-sheet-art{display:flex;align-items:center;justify-content:center;line-height:normal}
.eco-sheet .eco-sheet-art.eco-art-consumable img{margin:0 auto}
.eco-sheet .sheet-title{text-align:center;margin:14px 0 0}
.eco-sheet .eco-sheet-copy{text-align:center;margin-top:4px}
.eco-stats{display:flex;justify-content:center;gap:8px;margin:12px 0 0}
.eco-stat{display:inline-flex;align-items:baseline;gap:5px;padding:6px 12px;border-radius:99px;background:var(--surface-tinted);font-size:.875rem;color:var(--text-secondary)}
.eco-stat b{font-size:1rem;color:var(--text-primary)}
.eco-have{display:inline-flex;align-items:center;gap:3px;font-size:.8125rem;color:var(--text-secondary)}
.eco-have.eco-short{color:var(--text-primary);font-weight:600}
.eco-shortline{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:3px;text-align:center;font-size:.875rem;color:var(--text-secondary)}
.eco-shortline b{color:var(--text-primary)}
#modal-root .sheet-actions button .eco-star{display:inline-flex;margin-left:-4px}
.eco-track-key{display:flex;align-items:center;justify-content:flex-end;gap:3px;margin:6px 2px 0!important;font-size:.6875rem;font-weight:600;color:var(--accent);opacity:.8}
/* Plants tab (2026-11-19): plant food first, with its 1 / 3 / 10 packs; plant varieties below. */
.eco-food-section{scroll-margin-top:58px}
.eco-food-section .eco-grid{margin-top:10px}
.eco-food-card+.eco-food-card{margin-top:10px}
.eco-food-card{padding:12px;border-radius:20px;border:1px solid var(--border-default);background:var(--card-background);box-shadow:0 3px 12px color-mix(in srgb,var(--shadow-color) 8%,transparent)}
.eco-food-head{display:flex;align-items:center;gap:12px}
.eco-food-head>span:last-child{display:flex;flex-direction:column;gap:2px;min-width:0}
.eco-food-head b{font-size:1rem;color:var(--text-primary)}
.eco-food-head small{font-size:.8125rem;color:var(--text-secondary);line-height:1.35}
.eco-food-art{display:flex;flex:none;align-items:center;justify-content:center;width:56px;height:56px;border-radius:14px;background:var(--surface-tinted);overflow:hidden}
.eco-food-art img{max-width:48px;max-height:48px;object-fit:contain}
.eco-packs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.eco-pack{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:72px;padding:14px 6px 10px;border-radius:16px;border:1.5px solid var(--border-default);background:var(--surface-tinted);color:var(--text-primary);font:inherit;cursor:pointer}
.eco-pack:active{transform:scale(.97)}
.eco-pack b{font-size:1.25rem;line-height:1}
.eco-pack.selected{border-color:var(--accent);background:var(--selected-background,var(--card-background))}
.eco-pack-tag{position:absolute;top:-9px;left:50%;transform:translateX(-50%);padding:1px 8px;border-radius:999px;background:var(--accent);color:var(--on-accent);font-size:.6875rem;font-weight:700;white-space:nowrap;line-height:1.5}
.eco-sheet .eco-sheet-packs{margin-top:16px}
