:is(.card-stack,.my-card-style) + .show-card{margin-top:0;padding:0 18px;border:1px solid var(--cc-divider);border-radius:20px;background:var(--cc-card)}
/* #184 home buttons are one family: same corner, height, ink border and lift. QR is the filled primary action. */
body[data-route=home] :is(.show-card,.plans-sales-action){min-height:60px;border:2px solid var(--ink-line)!important;border-radius:20px;box-shadow:var(--lift)}
body[data-route=home] :is(.show-card,.plans-sales-action):active{box-shadow:var(--lift-pressed)}
body[data-route=home] .show-card{background:var(--ink-line);color:#FFF8EC;font-weight:700}
body[data-route=home] .show-card .card-divider{background:#FFF8EC55}
body[data-route=home] .show-card .arrow{color:var(--sun)}
.show-card + .wallet-actions,.qr-card + .wallet-actions{margin-top:20px}
body[data-role] footer,footer{justify-content:flex-end;column-gap:16px;row-gap:12px}
footer:before{margin-right:auto}
footer .footer-actions{margin-left:0}
footer .footer-actions{row-gap:12px}
footer nav{display:flex;gap:12px}
/* #956: the old 104px footer margin cleared a bottom bar that is no longer in the flow. It left a band of beans under the footer on every page that still has a nav link. */
.back-link{display:inline-flex;align-items:center;min-height:44px;margin-top:max(12px,env(safe-area-inset-top))}
body[data-role=welcome] #initial-auth .signin-note{margin:12px 0 14px}
@media (max-width:420px){
 body[data-role=welcome] .welcome-scene{max-width:195px;margin:0 auto}
 body[data-role=welcome] .welcome-story{margin:0 0 4px}
 body[data-role=welcome] .welcome-story h1{font-size:1.875rem;margin:0 0 2px}
 body[data-role=welcome] .welcome-story h1 br{display:none}
 body[data-role=welcome] .welcome-story .sub{font-size:0.875rem;line-height:1.3;margin:0}
 body[data-role=welcome] #initial-auth{padding:14px 16px}
 body[data-role=welcome] #initial-auth :is(.btn,.provider-button){min-height:46px;margin-top:0}
 body[data-role=welcome] #initial-auth .signin-note{font-size:0.75rem;line-height:1.35;margin:12px 0}
 body[data-role=welcome] #initial-auth label{margin-top:0}
 body[data-role=welcome] #initial-auth input{min-height:44px;height:44px;margin-bottom:12px}
 body[data-role=welcome] #initial-auth :is(.signin-divider,.signin-footer,.tiny){margin:12px 0;font-size:0.78125rem}
 body[data-role=welcome] #initial-auth .provider-button + .provider-button{margin-top:12px}
}
#passkey-signin-result:empty{display:none}
main a.text-btn[href="#overview"]{display:inline-flex;align-items:center;min-height:44px;margin:12px 0}
.wallet-actions,.actions,form.lookup{gap:12px}
body:not([data-role=customer]) header #nav{gap:12px}
body:not([data-role=customer]):not([data-role=welcome]) footer>span:first-child{flex-basis:100%;text-align:center}
/* #144 card text is never cut short: the subtitle and the member line wrap inside the text column, clear of the art. */
.club-card :is(.card-plan,.card-holder,.card-brand){white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
/* Header: the horizontal lockup at a readable size, balanced against the language button and the profile icon. */
.header-lang{display:inline-flex;align-items:center;gap:6px;min-height:44px;min-width:44px;padding:0 10px;border-radius:999px;border:2px solid var(--line,#d9cfbf);background:var(--cc-white,#fffaf0);color:inherit;font:700 0.8125rem/1 inherit;cursor:pointer}
.header-lang img{display:block;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.12)}
.lang-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:40;display:flex;flex-direction:column;gap:6px;padding:8px;background:var(--cc-white,#fffaf0);border:2px solid var(--line,#d9cfbf);border-radius:18px;box-shadow:0 12px 28px rgba(43,33,24,.18);min-width:190px}
.lang-menu[hidden]{display:none}
.lang-menu button{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border-radius:12px;border:0;background:transparent;color:inherit;font:600 0.9375rem/1 inherit;text-align:left;cursor:pointer}
.lang-menu button img{display:block;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.12)}
.lang-menu button b{margin-right:4px}
.lang-menu button[aria-current="true"]{background:var(--ink,#2b2118);color:var(--paper,#f7f0e2)}

/* #242 shared customer page and compact sign-in template. */
body[data-role=customer],body[data-role=welcome]{max-width:none;margin:0 auto}
.customer-page-template{width:100%;max-width:820px;margin:0 auto;padding:0 4px}.customer-page-template :is(.home-intro,.page-head){margin-top:4px}.customer-page-template .home-intro{margin-bottom:22px}.customer-page-template .home-intro h1{font:400 clamp(1.875rem,5vw,2.625rem)/1.05 "Lilita One",var(--cc-font-display);letter-spacing:-.01em}.customer-page-template .home-intro p{font:400 clamp(1.125rem,3vw,1.375rem)/1.35 var(--cc-font-body);margin:4px 0 0}body[data-role=customer] header{position:relative;min-height:84px;height:84px;max-width:1240px;gap:0;padding:16px max(28px,calc((100vw - 1160px)/2)) 12px}body[data-role=customer] header .logo{top:16px!important;left:max(28px,calc((100vw - 1160px)/2))!important;height:50px!important;max-width:none}body[data-role=customer] header .header-tools{right:82px;top:16px}body[data-role=customer] header .header-menu{position:absolute;right:max(28px,calc((100vw - 1160px)/2));top:16px;width:44px;height:44px;display:grid;place-items:center}body[data-role=customer] header .shop-label{display:none}body[data-role=customer] header #nav{position:absolute;left:50%;top:16px;display:flex;transform:translateX(-50%);gap:4px}body[data-role=customer] main{max-width:900px;margin:0 auto 64px;padding:0 32px;min-height:0}body[data-role=customer] #nav{max-width:820px;margin:20px auto 0}body[data-role=customer] #nav a{flex:1;justify-content:center}body[data-role=welcome] header{min-height:68px;height:68px;padding:12px 24px}body[data-role=welcome] header .logo{top:10px!important;left:24px!important;width:auto!important;height:48px!important}body[data-role=welcome] header .brand-lockup{font-size:0.75rem}body[data-role=welcome] header .brand-lockup span:nth-child(2){font-size:1.0625rem}body[data-role=welcome] header .brand-lockup span:nth-child(3){font-size:0.8125rem}body[data-role=welcome] header .header-tools{top:10px;right:24px}body[data-role=welcome] header .header-menu{display:none}body[data-role=welcome] header .shop-label{display:none}body[data-role=welcome] main{max-width:460px;margin:0 auto 30px;padding:0 24px;min-height:0}body[data-role=welcome] .welcome-screen{max-width:420px}body[data-role=welcome] .welcome-scene{max-width:205px;margin:-3px auto -12px}body[data-role=welcome] .welcome-story{margin:0 0 12px}body[data-role=welcome] .welcome-story h1{font-size:clamp(1.75rem,7vw,2.25rem);margin:0 0 4px}body[data-role=welcome] .welcome-story .sub{margin:0;font-size:0.875rem}body[data-role=welcome] #initial-auth{padding:16px 18px 14px}.signin-primary-provider .provider-button{min-height:52px;font-weight:700}.signin-primary-provider .provider-button--google{border-width:2px;box-shadow:var(--lift)}.signin-primary-provider{margin:0 0 14px}.email-signin{gap:6px}.email-signin label{font-size:0.75rem}.email-signin input{height:44px;min-height:44px}.email-signin #sign-in{min-height:44px;font-size:0.9375rem}.email-signin .signin-note{min-height:0;margin:0;font-size:0.6875rem}.signin-secondary{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:7px}.signin-secondary .provider-button,.signin-secondary .btn{min-height:36px;width:auto;min-width:112px;padding:0 12px;border-radius:999px;font-size:0.75rem;box-shadow:none}.signin-secondary .provider-button{display:flex;justify-content:center;gap:6px}.signin-secondary .provider-button img{width:16px;height:16px}.signin-footer{margin:9px 0 0;text-align:center;font-size:0.6875rem}body[data-role=welcome] #initial-auth #passkey-signin{margin:0}body[data-role=welcome] #initial-auth #passkey-signin-result{display:none}
@media(max-width:480px){body[data-role=customer] main{padding:0 20px;margin-bottom:42px}body[data-role=customer] header #nav{position:fixed;left:12px;right:12px;top:auto;bottom:calc(8px + env(safe-area-inset-bottom));z-index:30;width:auto;margin:0;padding:6px;transform:none;border-radius:20px;background:var(--paper-hi);border:1px solid var(--line);box-shadow:0 6px 24px #2e1f1620}body[data-role=customer] #nav a{min-height:46px;padding:8px 4px;font-size:0.6875rem}.customer-page-template .home-intro{margin:2px 0 18px}.customer-page-template .home-intro h1{font-size:2rem}.customer-page-template .home-intro p{font-size:1.125rem}body[data-role=welcome] main{padding:0 20px 16px!important;margin:0 auto 16px}body[data-role=welcome] .welcome-scene{max-width:160px;margin:-4px auto -13px}body[data-role=welcome] .welcome-story{margin-bottom:10px}body[data-role=welcome] .welcome-story h1{font-size:1.875rem}body[data-role=welcome] #initial-auth{padding:14px 14px 12px}.signin-primary-provider{margin-bottom:10px}.signin-primary-provider .provider-button{min-height:48px}.email-signin{gap:5px}.email-signin input{height:42px;min-height:42px}.email-signin #sign-in{min-height:42px}.signin-secondary{margin-top:6px}.signin-footer{margin-top:7px}}
@media(max-height:700px){body[data-role=welcome] .welcome-scene{display:none}body[data-role=welcome] .welcome-story{margin:4px 0 8px}body[data-role=welcome] .welcome-story h1{font-size:1.75rem}}
/* #242 restores customer route navigation on the shared home template. */
body[data-role=customer][data-route=home] header #nav,body[data-role=customer][data-route=''] header #nav{display:flex}
@media(max-width:480px){body[data-role=customer][data-route=home] header #nav,body[data-role=customer][data-route=''] header #nav{position:fixed;left:12px;right:12px;top:auto;bottom:calc(8px + env(safe-area-inset-bottom));transform:none}}
/* Keep the canonical horizontal mark for per-shop branding; show the stacked lockup on the neutral customer shell. */
/* Let the read-only demo's footer view switch remain reachable when customer navigation is shown. */
body[data-role=customer]:has(.demo-banner) header #nav{position:relative;left:auto;top:auto;transform:none;width:max-content;margin:0 auto;z-index:1}
@media(max-width:480px){body[data-role=customer]:has(.demo-banner) header #nav{position:relative;left:auto;right:auto;top:auto;bottom:auto;width:max-content;margin:0 auto;transform:none}}
.customer-page-template .show-card{width:calc(100% + 2px)}

/* #248 launch-ready pass. Owner and staff headers were not a positioning context, so the absolute language pill
   sat on the test banner; they also showed the wordmark and the stacked lockup side by side and repeated the café
   name on the right. One mark, the pill centred in the header. */
body:is([data-role=owner],[data-role=staff]) header{position:relative}
/* Consent and offer checkboxes: box and text on one line, a 44px tap row. */
label.check{display:flex;align-items:center;gap:12px;min-height:44px;margin:12px 0;font-size:0.9375rem;line-height:1.4;cursor:pointer}
label.check input[type=checkbox]{width:22px;height:22px;min-height:22px;flex:0 0 22px;margin:0;padding:0}
#first-card .btn{width:100%}
#first-card #setup-owner{display:block;margin:14px auto 0;font-size:0.875rem}
/* Footer links stay one line each. */
footer nav a{white-space:nowrap}
.counter-back{display:inline-block;margin:0 0 12px}
/* Dashboard panels line up with the stat cards above; the Settings form keeps its reading width. */
.setup-sections.dashboard-sections{max-width:none}
footer .footer-actions .text-btn{white-space:nowrap}

/* #502: one centered sign-in card for every role; provider controls share one full-width treatment. */
body[data-role=welcome] .welcome-screen{width:min(calc(100% - 32px),440px);margin:clamp(24px,8vh,72px) auto 48px;text-align:center}
body[data-role=welcome] .welcome-screen h1{font-size:clamp(1.875rem,7vw,2.5rem);margin:0 0 8px;transform:none}
body[data-role=welcome] .welcome-story .sub{margin:0 0 20px}
body[data-role=welcome] #initial-auth{padding:24px;background:#fff9ef;border:1px solid #dcc9a8;border-radius:22px;box-shadow:0 4px 0 #2e1f16}
body[data-role=welcome] .signin-offer{margin:0 0 14px;text-align:center;font-size:0.8125rem;font-weight:700;color:var(--ink-line)}
body[data-role=welcome] .signin-methods{display:grid;gap:12px;grid-template-columns:minmax(0,1fr)}
body[data-role=welcome] .signin-methods .provider-button{width:100%;max-width:100%;min-width:0;min-height:50px;margin:0;border-radius:14px;box-shadow:none}
body[data-role=welcome] .signin-methods .provider-button img{width:20px;height:20px}
body[data-role=welcome] .signin-primary-provider{margin:0}
body[data-role=welcome] .signin-primary-provider .provider-button{min-height:50px;font-weight:600;border-width:2px;box-shadow:none}
body[data-role=welcome] .signin-primary-provider .provider-button{box-shadow:var(--lift)}
body[data-role=welcome] .email-signin{display:grid;gap:8px;margin-top:14px;text-align:left}
body[data-role=welcome] .email-signin .btn{min-height:48px}
body[data-role=welcome] .signin-footer{font-size:0.8125rem;line-height:1.45;margin:16px 0 0}
body[data-role=welcome] .signin-legal{margin:14px 0 0;font-size:0.6875rem}
body[data-role=welcome] .access-choices{display:grid;gap:10px;text-align:left}
body[data-role=welcome] .access-choices h2{margin:0;text-align:center;font-size:1.375rem}
body[data-role=welcome] .access-choice{display:flex;align-items:center;justify-content:center;text-decoration:none;text-align:center;min-height:48px}
body[data-role=welcome] .access-setup{display:block;text-align:center;margin:8px 0 0}
@media(max-width:480px){body[data-role=welcome] .welcome-screen{width:min(calc(100% - 32px),440px);margin:24px auto 32px}body[data-role=welcome] #initial-auth{padding:20px 16px}body[data-role=welcome] .welcome-story .sub{margin-bottom:16px}}

/* #859 option A (#750): the sign-up page opens with a compact illustration above its heading, so the heading and the sign-in card share one phone screen. */
body[data-role=welcome] .welcome-screen:has(#initial-auth[data-setup-visit]) .welcome-pose{height:76px;margin-bottom:6px}
body[data-role=welcome] .welcome-screen:has(#initial-auth[data-setup-visit]) .welcome-story{margin-bottom:0}
body[data-role=welcome] .welcome-screen:has(#initial-auth[data-setup-visit]) .welcome-story .sub{margin-bottom:12px}

.wallet-settings > summary { min-height:44px; padding:12px 0; cursor:pointer; }
.wallet-settings :is(input:not([type=checkbox]), textarea) { width:100%; min-width:0; }
.wallet-settings button { min-height:44px; }
