/* Luna Coffee Co.: customer theme and safe areas, independent of old tier colors. */
html body:not(.lh-production) :is(.luna-home-card,.luna-member-card,.luna-id-card){--luna-level-bg:#103c32!important;--luna-level-fg:#f2e2cc!important;background:#103c32!important;color:#f2e2cc!important;border:1px solid #d4a5744d;box-shadow:none}
html[data-customer-theme=eclipse] body :is(.luna-home-card,.luna-member-card,.luna-id-card){background:#183f35!important;color:#e0d4c0!important}
html body:not(.lh-production) :is(.luna-dialog,.luna-dialog-header,.luna-dialog-body,.luna-card){background:var(--white,#fcf6ec);color:var(--ink,#103c32);border-color:var(--border)}
html body:not(.lh-production) :is(.luna-home-track,.luna-route-track){background:#f2e2cc30}
html body:not(.lh-production) :is(.luna-home-track>.luna-home-progress,.luna-route-track>span:first-child){background:#d4a574}
html body:not(.lh-production) .luna-milestone i{background:#f2e2cc;color:#103c32;border-color:#d4a574}
html body:not(.lh-production) .luna-home-moon{filter:sepia(.3);color:#d4a574}
html body:not(.lh-production) .luna-id-qr{background:white;border-radius:8px}
html body:not(.lh-production) .customer-locker{background:var(--cream-2,#ead6ba)!important;color:var(--ink,#103c32)!important;border:1px solid var(--border)!important;border-radius:12px;padding:12px!important;font-size:14px!important;line-height:1.5;overflow-wrap:anywhere}
html body:not(.lh-production) .customer-locker :is(strong,span){color:inherit!important;font-size:inherit!important}
html body:not(.lh-production) .cart-item{grid-template-columns:56px minmax(0,1fr);gap:12px;background:var(--white);padding:14px;border:1px solid var(--border);border-radius:14px;box-sizing:border-box;margin:10px 0}
html body:not(.lh-production) .cart-item>div{min-width:0}.cart-item .cart-title{align-items:flex-start}.cart-item .cart-title h4{min-width:0;overflow-wrap:anywhere;line-height:1.4}.cart-item .cart-title>strong{flex-shrink:0;white-space:nowrap}.cart-item .cart-thumb{height:56px}.cart-item .cart-thumb img{max-width:100%;height:100%;object-fit:contain}
html body:not(.lh-production) .customer-order-card{min-width:0;overflow-wrap:anywhere}.customer-order-card .luna-actions{display:flex;flex-wrap:wrap;gap:8px}.customer-order-card .customer-order-top{gap:10px;flex-wrap:wrap}
@media(max-width:760px){
 html body:not(.lh-production) .topbar{position:sticky;top:0;z-index:50;height:auto!important;min-height:calc(84px + env(safe-area-inset-top,0px));padding-top:calc(8px + env(safe-area-inset-top,0px));padding-bottom:8px;box-sizing:border-box;background:var(--cream,#f2e2cc)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
 html body:not(.lh-production) .overlay.center.active{box-sizing:border-box;padding:calc(12px + env(safe-area-inset-top,0px)) 12px calc(12px + env(safe-area-inset-bottom,0px));align-items:center}
 html body:not(.lh-production) .overlay.center :is(.modal,.product-modal){max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);overscroll-behavior:contain;box-sizing:border-box;width:100%;min-height:0}
 html body:not(.lh-production) .luna-product-toolbar{background:var(--cream)!important;backdrop-filter:none;-webkit-backdrop-filter:none;flex-shrink:0}
 html body:not(.lh-production) .luna-dialog{max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);margin-top:max(12px,env(safe-area-inset-top,0px))}
 html body:not(.lh-production) .internal-view{padding-top:20px;padding-inline:max(14px,env(safe-area-inset-left,0px));min-width:0}
 html body:not(.lh-production) .internal-view .panel-head{gap:10px;align-items:center;flex-wrap:wrap}
 html body:not(.lh-production) :is(.input,input,select,textarea){font-size:16px}
}

html body:not(.lh-production) :is(.luna-member-card,.luna-id-card) :is(h3,p,small,strong,b){color:inherit!important}
@media(max-width:760px){html body:not(.lh-production) .overlay.center.active{padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}html body:not(.lh-production) .product-modal .product-actions{padding-bottom:10px}}

/* Vector moons avoid iOS color-emoji filter tiles. */
html body:not(.lh-production) :is(.luna-home-milestone .luna-home-moon,.luna-milestone i){display:grid;place-items:center;background:transparent!important;border:0!important;padding:0;filter:none!important;text-shadow:none;box-shadow:none!important;color:#c6bea9;opacity:.6}
html body:not(.lh-production) :is(.luna-home-milestone.done .luna-home-moon,.luna-milestone.unlocked i,.luna-milestone.claimed i){color:#d4a574;opacity:1}
.luna-moon-vector{display:block;width:100%;height:100%;overflow:visible}
/* Nested light surfaces need their own foreground in both themes. */
html body:not(.lh-production) .luna-id-card .luna-id-stats span{background:#e0d4c0;color:#103c32;border:1px solid #d4a57455}
html body:not(.lh-production) .luna-id-card .luna-id-stats :is(small,b){color:#103c32!important;opacity:1}
html body:not(.lh-production) .luna-id-card .luna-id-qr-wrap small{color:#103c32!important;opacity:1}
html body:not(.lh-production) .luna-id-card .v193-luna-cash-line :is(span,strong){color:#f2e2cc!important;opacity:1}

/* Only the progress fill is gold; milestone wrappers must stay transparent. */
html body:not(.lh-production) .luna-home-track>.luna-home-milestone{background:transparent!important;border:0!important;box-shadow:none!important}
html body:not(.lh-production) .luna-id-qr-button{display:block;padding:0;margin:0;border:0;border-radius:8px;background:white!important;cursor:zoom-in;line-height:0;box-shadow:none}
.luna-id-qr-button:focus-visible{outline:3px solid #103c32;outline-offset:4px}
/* Keep the member card within its grid, even on narrow iPhone screens. */
html body:not(.lh-production) .luna-id-card{grid-template-columns:minmax(0,1fr) auto;min-width:0;box-sizing:border-box}
html body:not(.lh-production) .luna-id-qr-wrap{width:180px;max-width:100%;min-width:0;box-sizing:border-box;justify-self:center}
html body:not(.lh-production) .luna-id-qr-wrap small{max-width:100%;text-align:center;white-space:normal;overflow-wrap:anywhere}
html body:not(.lh-production) .luna-id-copy{min-width:0;max-width:100%;overflow-wrap:anywhere}
html body:not(.lh-production) .luna-id-code-row{align-items:center;justify-content:space-between}
html body:not(.lh-production) .luna-id-code-row strong{font-size:clamp(24px,7vw,34px)}
html body:not(.lh-production) .luna-id-qr-button{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
html body:not(.lh-production) .luna-id-qr-button img{width:100%;max-width:156px;height:auto;aspect-ratio:1;margin:auto}
html body:not(.lh-production) .luna-dialog{outline:none}
@media(max-width:600px){html body:not(.lh-production) .luna-id-card{grid-template-columns:minmax(0,1fr)}}
/* An enlarged floating card above Luna Club, rather than a separate screen. */
html body .luna-qr-expanded{position:fixed;inset:0;margin:auto;width:calc(100% - 32px);max-width:540px;height:max-content;max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 32px);box-sizing:border-box;border:1px solid #d4a57466;border-radius:28px;padding:20px;background:#fff!important;color:#103c32!important;box-shadow:0 24px 80px #0005;overflow:auto;overscroll-behavior:contain;outline:none}
html body .luna-qr-expanded[open]{display:flex;flex-direction:column;align-items:center;gap:14px}
.luna-qr-expanded::backdrop{background:#081f1a80;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
html body .luna-qr-expanded header{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;color:#103c32}
html body .luna-qr-expanded button{padding:8px 14px;border:1px solid #103c3233;border-radius:999px;background:#f2e2cc!important;color:#103c32!important;font:inherit;min-height:44px}
html body .luna-qr-expanded img{display:block;width:min(100%,460px,calc(100dvh - 220px));height:auto;aspect-ratio:1;object-fit:contain;background:white;flex-shrink:0;align-self:center}
html body .luna-qr-expanded strong{font-size:clamp(24px,7vw,36px);letter-spacing:.12em;color:#103c32!important}
@media(orientation:landscape) and (max-height:500px){html body .luna-qr-expanded[open]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;justify-items:center}.luna-qr-expanded header{grid-column:2;grid-row:1}.luna-qr-expanded img{grid-column:1;grid-row:1 / span 2;width:min(100%,65dvh)}.luna-qr-expanded strong{grid-column:2}}
