/* Poqhet Pilot v1.0.11 - product-specific customer visual layer.
   Shared interaction rules are retained, while Poqhet owns its terracotta brand tokens. */
:root{
  color-scheme:light;
  --r-bg:#F8FAFC;--r-surface:#FFFFFF;--r-surface-2:#F7F2F0;--r-brand-soft:#F7E9E5;
  --r-brand:#A85D4C;--r-brand-strong:#874638;--r-accent:#C86F5A;
  --r-text:#1F2937;--r-muted:#6B7280;--r-border:#DDE7E5;--r-danger:#B42318;--r-warning:#A16207;
  --r-shadow:0 10px 28px rgba(31,41,55,.065);--r-shadow-float:0 18px 52px rgba(31,41,55,.14);
  --wire-brand:var(--r-brand);--wire-brand-soft:var(--r-brand-soft);--wire-ink:var(--r-text);--wire-muted:var(--r-muted);--wire-border:var(--r-border);--wire-surface:var(--r-bg);--wire-card:var(--r-surface);
  --bg:var(--r-bg);--bg2:var(--r-bg);--panel:var(--r-surface);--panel2:var(--r-surface-2);--ink:var(--r-text);--muted:var(--r-muted);--jade:var(--r-brand);--jade2:var(--r-brand);--jade-soft:var(--r-brand-soft);--line:var(--r-border);--danger:var(--r-danger);
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --r-bg:#111418;--r-surface:#181D22;--r-surface-2:#20262C;--r-brand-soft:#3A2927;
  --r-brand:#D9826E;--r-brand-strong:#E6A08F;--r-accent:#E39A88;
  --r-text:#F8FAFC;--r-muted:#AAB4C0;--r-border:#2A3A40;--r-danger:#F48B7E;--r-warning:#F2C46D;
  --r-shadow:0 12px 30px rgba(0,0,0,.22);--r-shadow-float:0 22px 60px rgba(0,0,0,.36);
  --wire-brand:var(--r-brand);--wire-brand-soft:var(--r-brand-soft);--wire-ink:var(--r-text);--wire-muted:var(--r-muted);--wire-border:var(--r-border);--wire-surface:var(--r-bg);--wire-card:var(--r-surface);
  --bg:var(--r-bg);--bg2:var(--r-bg);--panel:var(--r-surface);--panel2:var(--r-surface-2);--ink:var(--r-text);--muted:var(--r-muted);--jade:var(--r-brand);--jade2:var(--r-brand);--jade-soft:var(--r-brand-soft);--line:var(--r-border);--danger:var(--r-danger);
}
@media(prefers-color-scheme:dark){:root[data-theme="system"]{
  color-scheme:dark;
  --r-bg:#111418;--r-surface:#181D22;--r-surface-2:#20262C;--r-brand-soft:#3A2927;
  --r-brand:#D9826E;--r-brand-strong:#E6A08F;--r-accent:#E39A88;--r-text:#F8FAFC;--r-muted:#AAB4C0;--r-border:#2A3A40;--r-danger:#F48B7E;--r-warning:#F2C46D;
  --wire-brand:var(--r-brand);--wire-brand-soft:var(--r-brand-soft);--wire-ink:var(--r-text);--wire-muted:var(--r-muted);--wire-border:var(--r-border);--wire-surface:var(--r-bg);--wire-card:var(--r-surface);
  --bg:var(--r-bg);--bg2:var(--r-bg);--panel:var(--r-surface);--panel2:var(--r-surface-2);--ink:var(--r-text);--muted:var(--r-muted);--jade:var(--r-brand);--jade2:var(--r-brand);--jade-soft:var(--r-brand-soft);--line:var(--r-border);--danger:var(--r-danger);
}}
html,body{background:var(--r-bg)!important;color:var(--r-text)!important}
body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;background-image:none!important}
.topbar{background:color-mix(in srgb,var(--r-surface) 96%,transparent)!important;color:var(--r-text)!important;border-bottom:1px solid var(--r-border)!important;box-shadow:none!important;backdrop-filter:blur(16px)}
.recivo-brand,.topbar .brand{color:var(--r-text)!important;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;font-weight:850!important;letter-spacing:-.045em!important}
.topbar .ghost,.app-menu-toggle{background:var(--r-surface)!important;color:var(--r-text)!important;border:1px solid var(--r-border)!important;box-shadow:none!important}
.panel,.metric-card,.points-card,.offer-card,.receipt-accordion,.modal-card,.secondary-details{background:var(--r-surface)!important;color:var(--r-text)!important;border-color:var(--r-border)!important;box-shadow:none!important}
.panel h1,.panel h2,.panel h3,.home-hero h1,.receipt-head h2{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;color:var(--r-text)!important}
.eyebrow{color:var(--r-brand)!important}
.muted,.optional,.microcopy{color:var(--r-muted)!important}
input,select,textarea{background:var(--r-surface)!important;color:var(--r-text)!important;border-color:var(--r-border)!important}
input:focus,select:focus,textarea:focus{border-color:var(--r-brand)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--r-brand) 17%,transparent)!important}
button{background:var(--r-brand)!important;color:#fff!important;box-shadow:none!important}
button.secondary{background:var(--r-surface-2)!important;color:var(--r-text)!important;border:1px solid var(--r-border)!important}
button.ghost{background:transparent!important;color:var(--r-text)!important;border:1px solid var(--r-border)!important}
button.danger{background:var(--r-danger)!important;color:#fff!important}
.notice{background:color-mix(in srgb,var(--r-warning) 13%,var(--r-surface))!important;color:var(--r-text)!important;border:1px solid color-mix(in srgb,var(--r-warning) 34%,var(--r-border))!important}
/* Home: match approved wireframe hierarchy. */
#tab-home{max-width:580px;margin:0 auto}
.wire-home-head{padding:10px 2px 14px!important}.wire-home-head h1{color:var(--r-text)!important}.wire-home-head p{color:var(--r-muted)!important}
.wire-quick-grid{gap:10px!important;margin-bottom:12px!important}.wire-quick-grid button{min-height:92px!important;border-radius:16px!important;background:var(--r-brand-soft)!important;color:var(--r-brand)!important;border:1px solid transparent!important}.wire-quick-grid button.secondary{background:color-mix(in srgb,var(--r-brand-soft) 72%,var(--r-surface))!important;color:var(--r-brand)!important;border-color:transparent!important}.wire-quick-grid strong{font-size:15px!important}
.purchase-insight-panel{padding:14px!important;border-radius:17px!important;background:var(--r-surface)!important;border:1px solid var(--r-border)!important;margin-bottom:10px!important}.purchase-insight-grid{gap:8px!important}.compact-insight{padding:12px!important;border-radius:14px!important;background:var(--r-brand-soft)!important;border:1px solid color-mix(in srgb,var(--r-brand) 9%,var(--r-border))!important}.compact-insight span,.compact-insight small{color:var(--r-muted)!important}.compact-insight strong{color:var(--r-text)!important}
.recent-purchases-panel{background:transparent!important;border:0!important;padding:8px 2px!important}.wire-home-purchase{color:var(--r-text)!important;border-bottom-color:var(--r-border)!important}.wire-home-purchase:hover{background:var(--r-surface-2)!important}.merchant-mark{background:var(--r-brand-soft)!important;color:var(--r-brand)!important}
.text-action{background:transparent!important;color:var(--r-brand)!important;border:0!important;padding:5px!important;min-height:auto!important}
#homeAttentionPanel{background:var(--r-surface)!important;border:1px solid var(--r-border)!important}
.attention-row{color:var(--r-text)!important;border-bottom-color:var(--r-border)!important}
/* Purchases */
#tab-purchases{max-width:720px;margin:0 auto}.purchases-primary-panel{background:transparent!important;border:0!important;padding:8px 0!important}.purchase-title-row h1{color:var(--r-text)!important}
.purchase-search-wire,.wire-month-row input,.wire-calendar-btn,.wire-filter-row button{background:var(--r-surface)!important;border-color:var(--r-border)!important;color:var(--r-text)!important}.wire-filter-row button{color:var(--r-muted)!important}.wire-filter-row button.active-filter{background:var(--r-brand)!important;color:#fff!important;border-color:var(--r-brand)!important}.wire-receipt-list{background:var(--r-surface)!important;border-color:var(--r-border)!important}.receipt-date-group>h3{background:var(--r-surface-2)!important;color:var(--r-muted)!important;border-color:var(--r-border)!important}.receipt-card,.wire-receipt-row .receipt-summary{background:var(--r-surface)!important;color:var(--r-text)!important;border-color:var(--r-border)!important}.receipt-card strong,.wire-receipt-copy strong{color:var(--r-text)!important}.receipt-card small,.wire-receipt-copy small{color:var(--r-muted)!important}.receipt-inline-detail{background:var(--r-surface-2)!important;border-color:var(--r-border)!important}
/* Scan + pass: fit compact phones without clipping. */
.wire-scan-shell{max-width:520px!important;margin:0 auto 10px!important}.wire-scan-head h1{color:var(--r-text)!important}.scan-back,.scan-help{color:var(--r-text)!important}.scan-help{border-color:var(--r-border)!important}.wire-scan-modes{background:var(--r-surface-2)!important;border:1px solid var(--r-border)!important;gap:4px!important}.wire-scan-modes button{background:transparent!important;color:var(--r-muted)!important}.wire-scan-modes button.active{background:var(--r-surface)!important;color:var(--r-brand)!important;box-shadow:0 1px 4px rgba(31,41,55,.08)!important}.wire-camera-frame{height:clamp(280px,50dvh,500px)!important;background:#111820!important;border:1px solid var(--r-border)!important}.wire-camera-frame .scanner-box{background:#111820!important}.wire-scanner-state{background:rgba(15,23,26,.82)!important}.scan-corners{background:linear-gradient(var(--r-accent),var(--r-accent)) left top/34px 3px no-repeat,linear-gradient(var(--r-accent),var(--r-accent)) left top/3px 34px no-repeat,linear-gradient(var(--r-accent),var(--r-accent)) right top/34px 3px no-repeat,linear-gradient(var(--r-accent),var(--r-accent)) right top/3px 34px no-repeat,linear-gradient(var(--r-accent),var(--r-accent)) left bottom/34px 3px no-repeat,linear-gradient(var(--r-accent),var(--r-accent)) left bottom/3px 34px no-repeat,linear-gradient(var(--r-accent),var(--r-accent)) right bottom/34px 3px no-repeat,linear-gradient(var(--r-accent),var(--r-accent)) right bottom/3px 34px no-repeat!important}.wire-camera-trigger{background:var(--r-surface)!important;border-color:var(--r-text)!important;box-shadow:0 0 0 4px var(--r-surface)!important}.wire-scan-foot{color:var(--r-muted)!important}
.pass-card{width:min(100%,440px)!important;max-height:calc(100dvh - 170px)!important;overflow:auto!important;padding:16px!important;background:var(--r-surface)!important;border-color:var(--r-border)!important}.pass-card .notice{display:none!important}.pass-qr{width:min(70vw,40dvh,290px)!important;min-width:0!important;min-height:0!important;aspect-ratio:1/1!important;background:#fff!important;padding:10px!important;border-radius:18px!important}.pass-qr img,.pass-qr canvas{width:100%!important;height:100%!important;object-fit:contain!important}
/* Bottom nav */
.customer-primary-nav{background:color-mix(in srgb,var(--r-surface) 96%,transparent)!important;border-color:var(--r-border)!important;box-shadow:0 12px 30px rgba(31,41,55,.14)!important}.customer-primary-nav button{background:transparent!important;color:var(--r-muted)!important}.customer-primary-nav button.active{background:transparent!important;color:var(--r-brand)!important}.customer-primary-nav button[data-tab="scan"] .nav-glyph{background:#374151!important;color:#fff!important}.customer-primary-nav button[data-tab="scan"].active .nav-glyph{background:var(--r-brand)!important}
/* Drawer */
.app-drawer{background:var(--r-surface)!important;color:var(--r-text)!important;border-color:var(--r-border)!important}.drawer-head,.drawer-profile{border-color:var(--r-border)!important}.drawer-head strong,.drawer-icon{color:var(--r-text)!important}.drawer-section>small,.drawer-section button em,.drawer-profile span{color:var(--r-muted)!important}.drawer-section button{background:transparent!important;color:var(--r-text)!important}.drawer-section button:hover,.drawer-section button.active{background:var(--r-surface-2)!important;color:var(--r-brand)!important}.drawer-theme-control{background:var(--r-surface-2)!important;border-color:var(--r-border)!important}.drawer-theme-control button.active{background:var(--r-surface)!important;color:var(--r-brand)!important}.drawer-count{background:var(--r-brand)!important}
/* Secondary/detail screens */
.offer-card,.warranty-card,.notification-card,.business-row,.activity-row,.catalog-card{background:var(--r-surface)!important;color:var(--r-text)!important;border-color:var(--r-border)!important}.chip,.source-badge.verified,.beta-pill,.beta-inline{background:var(--r-brand-soft)!important;color:var(--r-brand)!important}.benefit{color:var(--r-brand)!important}.notification-card.unread{border-left:3px solid var(--r-accent)!important}.modal{background:rgba(15,23,26,.48)!important}.modal-card{box-shadow:var(--r-shadow-float)!important}
/* Compact handset tuning (Honor X9d / Fold outer class). */
@media(max-width:390px){
  main{padding-left:10px!important;padding-right:10px!important}.topbar{padding-left:10px!important;padding-right:10px!important}.recivo-brand{font-size:23px!important}.brand-mark{width:29px!important;height:29px!important}
  .wire-quick-grid button{min-height:84px!important;padding:12px 8px!important}.purchase-insight-panel{padding:11px!important}.compact-insight{padding:10px!important}.compact-insight strong{font-size:19px!important}.wire-home-head h1{font-size:29px!important}
  .wire-scan-head{height:46px!important}.wire-scan-modes button{font-size:10.5px!important;padding:5px 2px!important}.wire-camera-frame{height:clamp(250px,45dvh,390px)!important}.wire-scanner-state{left:7px!important;right:7px!important;bottom:7px!important}.wire-camera-trigger{width:56px!important;height:56px!important;margin:9px auto 5px!important}.wire-camera-trigger span{width:42px!important;height:42px!important}.pass-card{max-height:calc(100dvh - 155px)!important;margin:8px auto!important;padding:12px!important}.pass-qr{width:min(72vw,36dvh,245px)!important}
  .customer-primary-nav{left:8px!important;right:8px!important;bottom:calc(7px + env(safe-area-inset-bottom))!important;padding:6px!important}.customer-primary-nav button{font-size:9.5px!important;padding-left:2px!important;padding-right:2px!important}
}
/* Fold/tablet inner screen: keep content focused instead of stretching edge-to-edge. */
@media(min-width:760px){#tab-home{max-width:680px}.wire-scan-shell{max-width:600px}.pass-card{max-width:540px}.pass-qr{width:min(42vw,44dvh,340px)!important}}
@media(min-width:1100px){#tab-home{max-width:720px}.purchases-primary-panel{max-width:800px;margin:auto}.wire-scan-shell{max-width:620px}}

/* Approved Poqhet primary navigation: Home, Rewards, Purchases, Offers and Scan. Home shortcuts remain useful status shortcuts, not replacements for navigation. */
.rc5-home-shortcuts{grid-template-columns:repeat(2,1fr)!important;gap:8px!important;margin:0 0 12px!important}.rc5-home-shortcuts button{min-height:66px!important;border:1px solid var(--r-border)!important;border-radius:14px!important;background:var(--r-surface)!important;color:var(--r-text)!important;box-shadow:none!important}.rc5-home-shortcuts button>span{color:var(--r-brand)!important}.rc5-home-shortcuts small{color:var(--r-text)!important;font-weight:750!important}.customer-primary-nav button[data-tab="scan"]>span:last-child{display:none!important}
@media(max-width:760px){.customer-primary-nav{grid-template-columns:repeat(5,1fr)!important}.customer-primary-nav button[data-tab="scan"] .nav-glyph{margin-top:-14px!important}.rc5-home-shortcuts{grid-template-columns:repeat(2,1fr)!important}}

/* RC6 structural navigation + scanner lifecycle correction */
.customer-primary-nav{align-items:center!important}
.customer-primary-nav button{align-self:stretch!important;transform:none!important}
.customer-primary-nav button[data-tab="scan"]{transform:none!important;top:auto!important}
.customer-primary-nav button[data-tab="scan"] .nav-glyph{margin-top:0!important;transform:none!important;width:38px!important;height:38px!important;box-shadow:none!important}
@media(max-width:760px){
  .customer-primary-nav{grid-template-columns:repeat(5,1fr)!important;align-items:center!important;min-height:64px!important}
  .customer-primary-nav button{min-height:52px!important;align-content:center!important}
  .customer-primary-nav button[data-tab="scan"] .nav-glyph{margin-top:0!important}
}
.wire-camera-trigger{display:none!important}
.wire-scanner-state{justify-content:center!important;min-height:42px!important}
.wire-scanner-state small{display:block!important;text-align:center!important;width:100%!important}
#tab-warranty,#tab-vouchers,#tab-rewards,#tab-notifications,#tab-account,#tab-household,#tab-preferences,#tab-restaurant-orders,#tab-appearance,#tab-pay{max-width:760px;margin:0 auto}
.compact-section-intro{padding:14px 16px!important;margin-bottom:12px!important}.compact-section-intro h1{margin:0 0 4px!important}.compact-section-intro p{margin:0!important}
.appearance-theme-control{max-width:420px;margin-top:16px}
.notification-page{max-height:none!important;overflow:visible!important}
#tab-vouchers .rewards-owned-panel,#tab-vouchers #savedCouponsPanel{margin-top:12px!important}
#tab-rewards .rewards-points-details{margin-top:12px!important}
#tab-account>.panel,#tab-appearance>.panel,#tab-warranty>.panel,#tab-notifications>.panel{margin-bottom:12px!important}

/* RC7 controlled drawer backdrop repair. The backdrop is a <button>; override the global themed button fill. */
.drawer-backdrop{background:rgba(7,16,13,.56)!important;color:transparent!important;border:0!important;box-shadow:none!important;filter:none!important}
:root[data-theme="light"] .drawer-backdrop{background:rgba(31,41,55,.34)!important}
@media(prefers-color-scheme:light){:root[data-theme="system"] .drawer-backdrop{background:rgba(31,41,55,.34)!important}}

/* RC8 quick customer navigation fix: Rewards / Offers / Vouchers stay together on Home. */
.rc5-home-shortcuts{grid-template-columns:repeat(3,1fr)!important}
@media(max-width:760px){.rc5-home-shortcuts{grid-template-columns:repeat(3,1fr)!important}}

/* RC18 physical-mobile visibility repair.
   Root cause: the final canonical button rule used !important brand fill/white text.
   Customer Quality cards are <button> elements and theme choices are buttons, so the
   generic rule overrode their intended surface/text colors on physical mobile themes. */
.drawer-theme-control button,
.appearance-theme-control button{
  background:transparent!important;
  color:var(--r-text)!important;
  border:1px solid transparent!important;
  box-shadow:none!important;
}
.drawer-theme-control button.active,
.appearance-theme-control button.active{
  background:var(--r-surface)!important;
  color:var(--r-brand)!important;
  border-color:var(--r-border)!important;
}
.quality-case-card{
  background:var(--r-surface)!important;
  color:var(--r-text)!important;
  border-color:var(--r-border)!important;
  text-align:left!important;
  box-shadow:none!important;
  filter:none!important;
}
.quality-case-card:hover,
.quality-case-card:focus-visible{
  background:var(--r-surface-2)!important;
  color:var(--r-text)!important;
  border-color:var(--r-brand)!important;
  filter:none!important;
}
.quality-case-card.safety{border-left-color:var(--r-danger)!important}
.quality-case-card strong{
  display:block!important;
  color:var(--r-text)!important;
}
.quality-case-card small{
  display:block!important;
  color:var(--r-muted)!important;
  margin-top:2px!important;
}
.quality-case-card p{
  color:var(--r-text)!important;
  margin:9px 0 4px!important;
}
.quality-badge{
  background:var(--r-surface-2)!important;
  color:var(--r-text)!important;
  border:1px solid var(--r-border)!important;
  white-space:nowrap!important;
}
.quality-badge.safety{
  background:color-mix(in srgb,var(--r-danger) 14%,var(--r-surface))!important;
  color:var(--r-danger)!important;
  border-color:color-mix(in srgb,var(--r-danger) 38%,var(--r-border))!important;
}
@media(max-width:760px){
  main{padding-bottom:calc(150px + env(safe-area-inset-bottom))!important}
  .quality-case-card{padding:14px!important}
  .quality-case-card .row{gap:7px!important}
}

/* RC19 auth separation + merchant-referral registration */
.auth-single-shell{
  width:min(1040px,100%);
  margin:4vh auto 0;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(340px,.95fr);
  gap:24px;
  align-items:start;
}
.auth-brand-panel{min-height:420px;display:flex;flex-direction:column;justify-content:center;background:radial-gradient(circle at 100% 0,var(--r-brand-soft) 0,transparent 48%),var(--r-surface)!important}
.auth-card{max-width:520px;width:100%;justify-self:end}
.auth-card form{margin:0}
.auth-card h2{margin-top:6px}
.auth-primary,.auth-create{width:100%}
.auth-link,.auth-back{
  display:inline-flex!important;
  width:auto!important;
  background:transparent!important;
  color:var(--r-brand)!important;
  border:0!important;
  box-shadow:none!important;
  padding:10px 0!important;
}
.auth-back{margin-bottom:6px!important}
.auth-divider{display:flex;align-items:center;gap:12px;margin:14px 0;color:var(--r-muted)}
.auth-divider::before,.auth-divider::after{content:"";height:1px;background:var(--r-border);flex:1}
.auth-assurance,.referral-context{
  margin-top:22px;padding:14px 16px;border:1px solid var(--r-border);border-radius:14px;background:var(--r-surface-2);display:grid;gap:4px;color:var(--r-text)
}
.referral-context.valid{border-color:var(--r-brand);background:color-mix(in srgb,var(--r-brand) 8%,var(--r-surface))}
.auth-assurance small,.referral-context small,.auth-message{color:var(--r-muted)}
.terms-check{display:flex!important;grid-template-columns:auto 1fr!important;align-items:flex-start;gap:10px!important;font-weight:600!important}
.terms-check input{width:auto!important;margin-top:3px}
.auth-message{min-height:22px;margin:12px 0 0}
@media(max-width:760px){
  .auth-single-shell{grid-template-columns:1fr;margin:12px auto 0;gap:12px}
  .auth-brand-panel{min-height:auto;padding:18px!important}
  .auth-brand-panel h1{font-size:34px!important}
  .auth-card{max-width:none;justify-self:stretch}
}

/* Poqhet Pilot v1.0.6 responsive regression recovery.
   Phone/portrait tablet retains app-style presentation.
   Landscape tablet gains a wider dashboard.
   Desktop gains a persistent navigation rail and two-column home dashboard. */

/* Portrait tablets should remain app-like, including bottom navigation. */
@media (orientation:portrait) and (min-width:761px) and (max-width:900px){
  main{max-width:660px!important;padding:14px 16px calc(94px + env(safe-area-inset-bottom))!important}
  #tab-home{max-width:640px!important}
  .customer-primary-nav{
    position:fixed!important;left:16px!important;right:16px!important;bottom:calc(12px + env(safe-area-inset-bottom))!important;top:auto!important;
    width:auto!important;max-width:640px!important;margin:0 auto!important;display:grid!important;grid-template-columns:repeat(5,1fr)!important;
    gap:4px!important;padding:7px 8px!important;border-radius:20px!important;z-index:75!important
  }
  .customer-primary-nav button{display:grid!important;place-items:center!important;gap:2px!important;min-height:54px!important;padding:7px 4px!important;font-size:10px!important}
  .customer-primary-nav button[data-tab="scan"] .nav-glyph{margin-top:0!important;transform:none!important}
}

/* Landscape tablets: use available width without turning into a stretched phone. */
@media (orientation:landscape) and (min-width:800px) and (max-width:1099px){
  main{max-width:1040px!important;padding:24px 24px 70px!important}
  #tab-home.active{max-width:980px!important;display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr)!important;gap:16px 20px!important;align-items:start!important}
  #tab-home>.wire-home-head{grid-column:1/-1!important}
  #tab-home>.wire-quick-grid{grid-column:1!important;grid-row:2!important}
  #tab-home>.rc5-home-shortcuts{grid-column:1!important;grid-row:3!important}
  #tab-home>#homeAttentionPanel{grid-column:1!important;grid-row:4!important}
  #tab-home>.purchase-insight-panel{grid-column:2!important;grid-row:2!important;margin:0!important}
  #tab-home>.recent-purchases-panel{grid-column:2!important;grid-row:3/5!important;margin:0!important}
  .wire-quick-grid button{min-height:102px!important}
  .customer-primary-nav{top:76px!important;margin-bottom:24px!important}
  #tab-purchases{max-width:920px!important}
}

/* Desktop/web: persistent left navigation + two-column dashboard. */
@media (min-width:1100px){
  main{max-width:1440px!important;padding:34px 38px 90px 250px!important;min-height:calc(100vh - 64px)!important}
  .customer-primary-nav{
    position:fixed!important;top:96px!important;left:max(28px,calc((100vw - 1440px)/2 + 28px))!important;
    width:188px!important;max-width:188px!important;margin:0!important;padding:8px!important;
    display:grid!important;grid-template-columns:1fr!important;gap:5px!important;border-radius:18px!important;
    background:var(--r-surface)!important;box-shadow:var(--r-shadow)!important;z-index:32!important
  }
  .customer-primary-nav button{
    width:100%!important;min-height:48px!important;display:grid!important;grid-template-columns:28px 1fr!important;
    justify-items:start!important;align-items:center!important;gap:10px!important;padding:10px 12px!important;border-radius:12px!important;font-size:13px!important
  }
  .customer-primary-nav button .nav-glyph{width:28px!important;height:28px!important;margin:0!important;border-radius:9px!important;display:grid!important;place-items:center!important;background:var(--r-surface-2)!important;color:var(--r-muted)!important;box-shadow:none!important}
  .customer-primary-nav button.active{background:var(--r-brand-soft)!important;color:var(--r-brand)!important}
  .customer-primary-nav button.active .nav-glyph{background:var(--r-brand)!important;color:#fff!important}
  .customer-primary-nav button[data-tab="scan"] .nav-glyph{width:28px!important;height:28px!important;margin:0!important;border-radius:9px!important;background:var(--r-surface-2)!important;color:var(--r-muted)!important;box-shadow:none!important}
  .customer-primary-nav button[data-tab="scan"].active .nav-glyph{background:var(--r-brand)!important;color:#fff!important}
  .customer-primary-nav button[data-tab="scan"]>span:last-child{display:block!important}

  #tab-home.active{max-width:1160px!important;margin:0!important;display:grid!important;grid-template-columns:minmax(0,1.25fr) minmax(360px,.75fr)!important;gap:18px 26px!important;align-items:start!important}
  #tab-home>.wire-home-head{grid-column:1/-1!important;padding:4px 2px 8px!important}
  #tab-home>.wire-home-head h1{font-size:42px!important}
  #tab-home>.wire-quick-grid{grid-column:1!important;grid-row:2!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;margin:0!important}
  #tab-home>.wire-quick-grid button{min-height:92px!important}
  #tab-home>.rc5-home-shortcuts{grid-column:1!important;grid-row:3!important;gap:12px!important;margin:0!important}
  #tab-home>.rc5-home-shortcuts button{min-height:64px!important}
  #tab-home>#homeAttentionPanel{grid-column:1!important;grid-row:4!important;margin:0!important}
  #tab-home>.purchase-insight-panel{grid-column:2!important;grid-row:2!important;margin:0!important;padding:18px!important}
  #tab-home>.purchase-insight-panel .purchase-insight-grid{grid-template-columns:1fr!important;gap:12px!important}
  #tab-home>.recent-purchases-panel{grid-column:2!important;grid-row:3/5!important;margin:0!important;padding-top:4px!important}
  #tab-home>.recent-purchases-panel .home-recent-list{gap:7px!important}
  #tab-home>.recent-purchases-panel .wire-home-purchase{padding:13px 8px!important}

  #tab-purchases{max-width:1080px!important;margin:0!important}
  .purchases-primary-panel{max-width:none!important;margin:0!important}
  #tab-warranty,#tab-vouchers,#tab-rewards,#tab-notifications,#tab-account,#tab-household,#tab-preferences,#tab-restaurant-orders,#tab-appearance,#tab-pay{max-width:920px!important;margin:0!important}
  .wire-scan-shell{max-width:760px!important;margin:0 auto!important}
}


/* v1.0.6 restored information architecture. */
#tab-account,#tab-household,#tab-preferences,#tab-restaurant-orders,#tab-appearance{width:100%;}
#tab-household,#tab-preferences{gap:16px;}
#tab-household .household-card,#tab-preferences .preference-intro{border-color:color-mix(in srgb,var(--r-brand) 24%,var(--r-border))!important;}
#householdSummary{margin:14px 0;}
.household-title-row,.household-member-row{padding:10px 0;border-bottom:1px solid var(--r-border);}
.household-title-row strong,.household-member-row strong{display:block;}
.household-title-row small,.household-member-row small{display:block;color:var(--r-muted);margin-top:3px;}
#tab-household #managedDinerForm{margin-top:12px;}
#notificationDrawer #customerFeedbackHistory{margin-top:10px;}
@media (min-width:1100px){
  #tab-account,#tab-household,#tab-preferences,#tab-restaurant-orders,#tab-appearance{max-width:1040px!important;}
  #tab-household,#tab-preferences{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;}
  #tab-household.active,#tab-preferences.active{display:grid!important;}
  #tab-account.active{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,.9fr);gap:18px;align-items:start;}
  #tab-restaurant-orders.active{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,.8fr);gap:18px;align-items:start;}
}

/* v1.0.11 controlled mobile Dining Profile repair: keep every option, fix layout only. */
.tab:not(.active){display:none!important}
#tab-preferences.active{display:block!important}
#diningProfileForm .preference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 14px}
#diningProfileForm .preference-grid label{display:grid!important;grid-template-columns:22px minmax(0,1fr)!important;align-items:center!important;gap:10px!important;min-width:0!important;margin:0!important;padding:7px 4px!important;line-height:1.25!important;word-break:normal!important;overflow-wrap:normal!important}
#diningProfileForm .preference-grid input[type="checkbox"]{width:18px!important;height:18px!important;margin:0!important;justify-self:center!important}
#diningProfileForm fieldset{min-width:0!important}
@media(max-width:760px){
  #tab-preferences{width:100%!important;max-width:none!important;margin:0!important;padding-bottom:22px!important}
  #tab-preferences.active{display:block!important}
  #tab-preferences .preference-intro{padding:15px!important;margin-bottom:12px!important}
  #diningProfileForm{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;width:100%!important}
  #diningProfileForm>*{grid-column:1!important;min-width:0!important}
  #diningProfileForm fieldset{width:100%!important;padding:12px!important;border-radius:14px!important}
  #diningProfileForm .preference-grid{grid-template-columns:1fr!important;gap:2px!important}
  #diningProfileForm .preference-grid label{grid-template-columns:26px minmax(0,1fr)!important;padding:8px 4px!important;font-size:15px!important;text-align:left!important}
  #diningProfileForm .row{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:8px!important;align-items:center!important}
  #diningProfileForm .row button{flex:1 1 150px!important;min-height:46px!important}
  #tab-preferences{padding-bottom:calc(94px + env(safe-area-inset-bottom))!important}
}
/* v1.0.11 Dining Profile readability: keep the exact privacy copy but prevent label/value run-together. */
#diningProfileForm>.notice strong{display:block!important;margin-bottom:4px!important}
#diningProfileForm>.notice>span{display:block!important}

/* v1.0.11 controlled live-acceptance repair: Poqhet mobile/navigation fidelity. */
.customer-drawer .drawer-head{justify-content:flex-end;min-height:48px}
.customer-drawer .drawer-appearance-inline{display:grid;grid-template-columns:auto 1fr;gap:10px 12px;align-items:center;padding:10px 12px}
.customer-drawer .drawer-inline-theme{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.customer-drawer .drawer-inline-theme .theme-choice{min-height:38px;padding:8px 10px;background:var(--r-surface-2);color:var(--r-text);border:1px solid var(--r-line)}
.customer-drawer .drawer-inline-theme .theme-choice.active{border-color:var(--r-brand);color:var(--r-brand);background:var(--r-brand-soft)}
.support-config-note{display:grid;gap:4px}.support-contact-row{display:block}
.help-topic-detail{margin-top:12px}.help-topic-detail p{margin:.4rem 0 0}
.scan-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.scan-choice-grid button{min-height:112px;display:grid;place-content:center;gap:7px}.scan-choice-grid small{font-weight:400}
.offer-card-status{display:flex;align-items:center;gap:8px}.offer-reminder-bell{width:40px;height:40px;padding:0;border-radius:999px;background:transparent;border:1px solid var(--r-line);filter:grayscale(1);opacity:.42}.offer-reminder-bell.active{filter:none;opacity:1;background:rgba(217,164,65,.18);border-color:#D9A441;box-shadow:0 0 0 1px rgba(217,164,65,.12)}
.managed-diner-row .row{justify-content:flex-end}.managed-diner-edit-card{max-height:min(90vh,760px);overflow:auto}
.receipt-private-actions{display:grid!important;grid-template-columns:minmax(190px,auto) 1fr;gap:10px 14px;align-items:start}.receipt-private-actions>button{grid-column:1}.receipt-private-actions>small{grid-column:2;align-self:center;line-height:1.45}
/* Keep the camera inside its scan card. Legacy styles used a viewport-fixed scanner and broke the PWA layout. */
.wire-camera-frame{position:relative!important;overflow:hidden!important;min-height:52vh}
.wire-camera-frame .scanner-box:not(.hidden){position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:inherit!important;display:block!important;background:#0b1720!important;z-index:1!important}
.wire-camera-frame .scanner-box video{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:inherit!important}
@media (max-width:760px){
  main{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important}
  #tab-preferences{padding-bottom:16px!important}
  #tab-preferences>.panel{margin-bottom:0!important}
  .preference-grid{grid-template-columns:1fr!important;gap:4px!important}
  .preference-grid label{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;min-height:48px;padding:6px 2px!important;text-align:left!important}
  .preference-grid label input{flex:0 0 auto!important;margin:0!important}.preference-grid label span{white-space:normal!important;word-break:normal!important}
  .receipt-private-actions{grid-template-columns:1fr!important}.receipt-private-actions>button,.receipt-private-actions>small{grid-column:1!important}.receipt-private-actions>small{margin-top:-4px}
  .scan-choice-grid{grid-template-columns:1fr 1fr}
}

/* v1.0.11 restaurant-order customer view */
#tab-restaurant-orders{max-width:860px;margin-inline:auto}.restaurant-orders-help{margin-top:-4px;margin-bottom:16px}.customer-order-card{border:1px solid var(--r-border);border-radius:16px;padding:15px;background:var(--r-surface-2);display:grid;gap:10px;margin:9px 0}.customer-order-head,.customer-order-total{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.customer-order-head small{color:var(--r-muted)}.customer-order-head h3{margin:2px 0 0!important;color:var(--r-text)!important}.customer-order-meta{display:flex;gap:8px;flex-wrap:wrap;color:var(--r-muted);font-size:12px}.customer-order-total{align-items:flex-end}.customer-order-total strong{font-size:20px}.customer-order-total span{color:var(--r-muted);font-size:12px}

/* v1.0.11 controlled reminder-state acceptance: neutral off, unmistakable gold on. */
.offer-card .offer-reminder-bell.active,
.voucher-actions .offer-reminder-bell.active,
.offer-reminder-bell.active {
  background:#D9A441 !important;
  border-color:#D9A441 !important;
  color:#fff !important;
  filter:none !important;
  opacity:1 !important;
  box-shadow:0 0 0 2px rgba(217,164,65,.16) !important;
}
.offer-card .offer-reminder-bell:not(.active),
.voucher-actions .offer-reminder-bell:not(.active),
.offer-reminder-bell:not(.active) {
  background:var(--r-surface-2) !important;
  border-color:var(--r-line) !important;
  color:var(--r-muted) !important;
  filter:grayscale(1) !important;
  opacity:.48 !important;
}

/* v1.0.11 controlled Scan / Poqhet Pass mobile layout repair. */
#tab-scan{padding:0!important}
.wire-scan-shell{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;width:100%!important}
.wire-scan-head{display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px!important;align-items:center!important;gap:8px!important;height:auto!important;min-height:48px!important}
.wire-scan-head h1{margin:0!important;text-align:center!important;font-size:22px!important;line-height:1.1!important}
.scan-back,.scan-help{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;min-width:42px!important;padding:0!important;border-radius:12px!important;background:var(--r-surface)!important;border:1px solid var(--r-border)!important;box-shadow:none!important;font-size:24px!important;line-height:1!important}
.scan-help{font-size:18px!important}
.wire-scan-modes{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;padding:4px!important;border-radius:14px!important;overflow:hidden!important}
.wire-scan-modes button{min-height:38px!important;border:0!important;border-radius:10px!important;line-height:1.1!important}
.wire-scan-stage{display:grid!important;gap:10px!important;min-width:0!important}
.wire-scan-stage>p{margin:0!important;color:var(--r-text)!important;font-size:15px!important;line-height:1.45!important}
.wire-camera-frame{position:relative!important;width:100%!important;min-height:0!important;height:clamp(300px,52dvh,500px)!important;border-radius:18px!important;overflow:hidden!important}
.scan-corners{position:absolute!important;inset:18px!important;z-index:3!important;pointer-events:none!important;border-radius:12px!important}
.wire-scan-foot{display:block!important;line-height:1.45!important}
.pass-card{display:grid!important;gap:12px!important;width:min(100%,460px)!important;margin:0 auto!important;overflow:auto!important}
.pass-card.hidden{display:none!important}
.wire-pass-head{display:flex!important;align-items:center!important;justify-content:space-between!important}
.wire-pass-head h2{margin:0!important;font-size:24px!important}
.pass-qr{display:grid!important;place-items:center!important;margin:4px auto!important;overflow:hidden!important;background:#fff!important;border-radius:16px!important}
.pass-card #refreshPassBtn{width:100%!important;min-height:48px!important;margin:0!important}
@media(max-width:430px){
  .wire-scan-shell{gap:9px!important}.wire-scan-head{grid-template-columns:42px minmax(0,1fr) 42px!important}.scan-back,.scan-help{width:40px!important;height:40px!important;min-width:40px!important}.wire-camera-frame{height:clamp(300px,50dvh,430px)!important}.pass-card{padding:14px!important;max-height:calc(100dvh - 174px)!important}.pass-qr{width:min(72vw,34dvh,248px)!important}
}
.wire-scan-stage.hidden{display:none!important}

/* R6 controlled Poqhet desktop reconciliation: keep mobile drawer, make desktop sidebar authoritative. */
.shortcut-state{display:block;margin-top:2px;font-size:10px;font-weight:700;color:var(--r-muted)}
@media (min-width:1000px){
  /* v1.0.18: desktop customers must retain a visible account/menu entry point. */
  #customerMenuToggle:not(.hidden){display:inline-flex!important}
  .customer-drawer.open{transform:translateX(0)!important}
}
@media (min-width:1100px){
  #tab-home.active{max-width:1280px!important;grid-template-columns:minmax(0,1.15fr) minmax(390px,.85fr)!important}
  #tab-home>.recent-purchases-panel{min-height:360px!important}
}

/* R8 FIXED22 */
@media(max-width:760px){.customer-primary-nav{grid-template-columns:repeat(3,1fr)!important}}


/* R14B mobile guest dining safety fields: contain long EN/BM labels inside the phone viewport. */
#temporaryDiningJoinForm{min-width:0;max-width:100%;width:100%}
#temporaryDiningJoinForm>label,#temporaryDiningJoinForm>fieldset,#temporaryDiningJoinForm>.full-span{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
#temporaryDiningJoinForm fieldset{overflow:hidden}
#temporaryDiningJoinForm fieldset legend{max-width:100%;white-space:normal;overflow-wrap:anywhere}
#temporaryDiningJoinForm fieldset>small{display:block;max-width:100%;white-space:normal;overflow-wrap:anywhere}
#temporaryDiningJoinForm .preference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;max-width:100%}
#temporaryDiningJoinForm .preference-grid label{display:grid!important;grid-template-columns:20px minmax(0,1fr);align-items:center;gap:9px;min-width:0;max-width:100%;margin:0!important;padding:9px 10px;box-sizing:border-box;overflow:hidden}
#temporaryDiningJoinForm .preference-grid label input[type=checkbox]{appearance:auto;width:20px!important;min-width:20px!important;max-width:20px!important;height:20px!important;min-height:20px!important;max-height:20px!important;margin:0!important;padding:0!important}
#temporaryDiningJoinForm .preference-grid label span{display:block;min-width:0;max-width:100%;white-space:normal!important;overflow-wrap:anywhere;word-break:normal;line-height:1.25}
@media(max-width:520px){#temporaryDiningJoinForm{grid-template-columns:minmax(0,1fr)!important}#temporaryDiningJoinForm .preference-grid{grid-template-columns:minmax(0,1fr)!important}#temporaryDiningJoinForm .preference-grid label{min-height:44px;padding:9px;font-size:14px}}


/* v1.0.18 shared label/detail spacing */
.notice>strong,.restaurant-safety-clear>strong{display:block;margin-bottom:4px}
.notice>strong+span,.notice>strong+small,.restaurant-safety-clear>small{display:block}
.drawer-section button span:last-child>strong,.drawer-section button span:last-child>small{display:block}
.drawer-section button span:last-child>small{margin-top:2px}

/* v1.0.18 final stabilization: adjacent label/detail pairs must never glue together. */
.dining-group-member{display:grid;gap:3px}
.dining-group-member>strong,.dining-group-member>small{display:block}
.row>div>strong+small,.item>div>strong+small,.restaurant-cart-line>div>strong+small,.quality-history-row>span>strong+small{display:block;margin-top:2px}
