/* Shared sizing contract: only .table-scroll may pan horizontally. */
html{max-inline-size:100%;overflow-x:clip;overscroll-behavior:none;scrollbar-gutter:stable;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{inline-size:100%;max-inline-size:100%;overflow-x:clip;overscroll-behavior:none}
body.modal-open{position:fixed;inset-inline:0;overflow:hidden}
#app,.layout,.auth-wrap,#page,.accountlayout,form,.panel,.modalbody{min-inline-size:0;max-inline-size:100%}
:is(.row,.topbar,.page-heading,.cart-title,.total,.account-actions,.product,.history-row,.modalhead)>*,:is(.workgrid,.formgrid,.metrics,.products,.details)>*{min-inline-size:0}
:is(h1,h2,h3,p,label,button,a,strong,span,.notice,.error,.success,.badge,.product-meta,.helper,#toast){overflow-wrap:anywhere}
button{max-inline-size:100%;white-space:normal}
input,select,textarea{min-inline-size:0;max-inline-size:100%;font-size:1rem}
input[type=date]{display:block;min-inline-size:0;inline-size:100%;max-inline-size:100%}
textarea{resize:vertical}
img,video,canvas,svg{max-inline-size:100%}
.row,.page-heading,.cart-title,.total,.steps{flex-wrap:wrap}
.topbar{gap:12px;flex-wrap:wrap;padding-inline:max(16px,env(safe-area-inset-left),calc((100% - 1120px)/2))}
.brand{flex:0 1 auto;gap:6px;max-inline-size:100%}
.brand img{flex:0 0 34px}
.userchip{flex:0 1 auto;max-inline-size:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav{flex-wrap:wrap;overflow:visible;max-inline-size:100%}
.nav button{white-space:normal;overflow-wrap:anywhere}
.workgrid{grid-template-columns:minmax(0,1.25fr) minmax(0,.8fr)}
.formgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.details{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.product,.history-row{flex-wrap:wrap}
.product>span:first-child,.history-row>span:first-child{flex:1 1 9rem}
.product-side{flex:0 1 auto;max-inline-size:100%;margin-inline-start:auto}
.price,.nowrap{white-space:normal;overflow-wrap:anywhere}
.price{font-variant-numeric:tabular-nums}
.history-row>.price{margin-inline-start:auto}
.total{gap:8px 16px}
.total strong{max-inline-size:100%;margin-inline-start:auto;text-align:right}
.quantity{flex:0 1 auto;max-inline-size:100%}
.quantity button{flex:0 0 42px}
.quantity input{inline-size:76px;max-inline-size:100%}
.cartline .row>strong{margin-inline-start:auto;text-align:right}
.account-actions{align-items:center}
.account-actions button{flex:1 1 9rem}
.account-actions a{flex:1 1 9rem;padding:10px 0}
.checklabel{align-items:flex-start}
.checklabel input{flex:0 0 24px}
.scanbtn{white-space:normal}
.workgrid #product-list{overflow-x:clip;overscroll-behavior-x:none}
/* Keep the header at its natural height. A percentage height cap can collapse
   this flex item in Safari dialogs; only the body should shrink and scroll. */
dialog{position:fixed;inset:0;margin:auto;inline-size:min(560px,calc(100% - 24px));max-inline-size:calc(100% - 24px);max-block-size:calc(100dvh - 24px);overflow:hidden}
dialog[open]{display:flex;flex-direction:column}
.modalhead{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;flex:0 0 auto;gap:12px;align-items:center;padding:16px 20px;min-block-size:77px;max-block-size:none;overflow:visible}
.modalhead h2{margin:0;min-inline-size:0;line-height:1.4;text-wrap:balance}
.close{position:static}
.modalbody{flex:0 1 auto;min-block-size:0;overflow-y:auto;overflow-x:clip;overscroll-behavior:none;padding:20px;scroll-padding-block:16px}
.modalbody input,.modalbody select,.modalbody textarea{scroll-margin-block:16px}
#toast{max-inline-size:calc(100% - 24px);max-block-size:30dvh;overflow-y:auto}
/* Tables own both scroll directions. Header, first body row and first column
   stick inside this bounded frame; top-left intersections stay above cells. */
.table-scroll{position:relative;isolation:isolate;inline-size:100%;max-inline-size:100%;min-inline-size:0;max-block-size:65dvh;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;scrollbar-gutter:stable;border:1px solid var(--line);border-radius:12px}
.table-scroll:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.table-scroll table{border-collapse:separate;border-spacing:0;min-inline-size:100%;inline-size:max-content}
.table-scroll :is(th,td){padding:12px 16px;border-inline-end:1px solid var(--line);border-block-end:1px solid var(--line);background:var(--surface);max-inline-size:18rem;overflow-wrap:anywhere}
.table-scroll thead :is(th,td){position:sticky;top:var(--sticky-top,0px);z-index:3;background:var(--accent-soft)}
.table-scroll tbody>tr:first-child>:is(th,td){position:sticky;top:var(--table-head-height,0px);z-index:2;background:var(--accent-pale)}
.table-scroll tr>:first-child{position:sticky;left:0;z-index:1;background:var(--background);box-shadow:1px 0 var(--line)}
.table-scroll thead tr>:first-child{z-index:5;background:var(--accent-border)}
.table-scroll tbody>tr:first-child>:first-child{z-index:4;background:var(--accent-soft)}
@media(max-width:760px){
 .workgrid{grid-template-columns:minmax(0,1fr)}
 .layout{padding-inline:max(12px,env(safe-area-inset-left),env(safe-area-inset-right));padding-bottom:calc(var(--bottom-nav-height,90px) + 24px)}
 .nav{flex-wrap:nowrap;align-items:stretch;gap:2px;padding-inline:max(4px,env(safe-area-inset-left),env(safe-area-inset-right));overflow:visible}
 .nav button{flex:1 1 0;min-inline-size:0;padding:8px 1px;font-size:.875rem;line-height:1.3;white-space:normal}
 .nav button .icon{flex:0 0 23px}
 .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .metric:first-child{grid-column:1/-1}
 .topbar{padding-block:12px}
 .formgrid{grid-template-columns:minmax(0,1fr)}
 .span2{grid-column:1}
 dialog{inset:auto;left:12px;top:calc(var(--visual-top,0px) + 12px);margin:0;inline-size:calc(100% - 24px);max-inline-size:calc(100% - 24px);max-block-size:calc(var(--visual-height,100dvh) - 24px)}
 .modalhead{padding:14px 16px;min-block-size:73px}
 .modalbody{padding:16px}
 .auth-wrap{padding:20px 12px}
 .auth-wrap .panel{padding:20px 16px}
 .cart{position:static}
}
@media(max-width:360px){
 .panel{padding:14px}
 .brand{font-size:1.12rem}
 .brand img{inline-size:28px;block-size:28px;flex-basis:28px}
 .userchip{font-size:.875rem;padding:7px 9px}
 .metrics{grid-template-columns:minmax(0,1fr)}
 .total strong{font-size:1.6rem}
}
@media(prefers-reduced-motion:no-preference){dialog[open]{animation:none}}

/* Visible dismissal controls remain available while long forms scroll. */
.modalhead .close{width:auto;min-width:64px;min-height:44px;white-space:nowrap;word-break:normal;overflow-wrap:normal;justify-self:end;align-self:center;font-size:1rem;line-height:1.25;padding:8px 12px}
.modalfooter{flex:0 0 auto;padding:12px 20px;border-top:1px solid var(--line);background:var(--surface)}

/* A dedicated selling screen: price and quantity stay readable at arm's length. */
dialog.sale-dialog{inline-size:min(640px,calc(100% - 32px));block-size:min(780px,calc(100dvh - 32px))}
.sale-dialog .modalhead{align-items:center;padding:18px 24px}
.sale-dialog .modalhead h2{font-size:1.25rem;margin:0}
.sale-dialog .modalbody{flex:1 1 auto;padding:24px;background:var(--background)}
.sale-form{display:grid;gap:22px}
.sale-product h3{font-size:1.75rem;line-height:1.3;margin:0 0 10px;font-weight:750}
.sale-eyebrow{font-size:.75rem;font-weight:750;letter-spacing:.1em;color:var(--muted);margin:0 0 10px}
.sale-code{font-size:.95rem;color:var(--muted);margin:0}
.sale-price-panel{display:flex;flex-direction:column;gap:8px;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
.sale-price-panel>span:first-child{font-size:1rem;font-weight:600;color:var(--muted)}
.sale-unit-price{font-size:clamp(2.25rem,8vw,3rem);font-weight:800;line-height:1.15;letter-spacing:-.035em;font-variant-numeric:tabular-nums}
.sale-stock{font-size:.95rem;color:var(--muted);margin-top:4px}
.sale-quantity-panel>label{font-size:1.1rem;margin:0 0 12px}
.sale-quantity-panel>label span{font-weight:400;color:var(--muted)}
.sale-stepper{display:grid;grid-template-columns:64px minmax(0,1fr) 64px;gap:12px}
.sale-stepper button,.sale-stepper input{block-size:68px;min-block-size:68px;margin:0;border-radius:14px;text-align:center;font-size:1.9rem;font-weight:750;padding:8px}
.sale-stepper button{background:var(--surface-muted);border-color:var(--input-border)}
.sale-stepper input{appearance:textfield;background:var(--surface);font-variant-numeric:tabular-nums}
.sale-stepper input::-webkit-inner-spin-button,.sale-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.sale-quantity-panel .helper{margin:10px 0 0;font-size:.875rem}
.sale-dialog .modalfooter{padding:18px 24px;background:var(--surface);box-shadow:0 -4px 20px var(--shadow-faint)}
.sale-subtotal{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin-bottom:16px}
.sale-subtotal>span{font-size:1rem;font-weight:650}
.sale-subtotal small{display:block;font-weight:400;color:var(--muted);font-size:.875rem;margin-top:3px}
.sale-subtotal strong{font-size:1.65rem;line-height:1.2;font-variant-numeric:tabular-nums;margin-inline-start:auto}
.sale-add{min-height:60px;font-size:1.125rem;border-radius:14px}
@media(max-width:760px){
 dialog.sale-dialog{left:0;top:var(--visual-top,0px);inline-size:100%;max-inline-size:100%;block-size:var(--visual-height,100dvh);max-block-size:var(--visual-height,100dvh);border:0;border-radius:0}
 .sale-dialog .modalhead{padding: max(16px,env(safe-area-inset-top)) 20px 16px}
 .sale-dialog .modalbody{padding:24px 20px}
 .sale-dialog .modalfooter{padding:16px 20px max(12px,env(safe-area-inset-bottom))}
}
@media(max-height:680px){
 .sale-form{gap:16px}
 .sale-dialog .modalbody{padding-block:16px}
 .sale-price-panel{padding:16px}
 .sale-dialog .modalfooter{padding-top:12px}
 .sale-subtotal{margin-bottom:12px}
}

/* Popups without actions need only the close button in the header. */
.modalfooter:empty{display:none}

/* Leave space for the active field above the mobile keyboard. */
.field-navigation{display:none}
.receive-summary{flex:0 0 auto}
@media(max-width:760px),(max-height:500px){
 .receive-dialog.editing-field .modalhead{min-block-size:52px;padding:4px 12px;gap:8px}
 .receive-dialog.editing-field .modalhead h2{font-size:1.25rem;line-height:1.3}
 .receive-dialog.editing-field .modalbody{padding:12px 16px;scroll-padding-block:12px}
 .receive-dialog.editing-field .modalfooter{padding:6px 12px}
 .receive-dialog.editing-field>.receive-summary{display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:8px;align-items:center;padding:6px 12px;background:var(--surface);border-bottom:1px solid var(--line)}
 .receive-dialog.editing-field>.receive-summary .sale-subtotal{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 6px;margin:0;align-items:baseline}
 .receive-dialog.editing-field>.receive-summary .sale-subtotal>span{display:contents;font-size:.75rem}
 .receive-dialog.editing-field>.receive-summary .sale-subtotal strong{grid-column:2;grid-row:1;font-size:.875rem;line-height:1.3}
 .receive-dialog.editing-field>.receive-summary .sale-subtotal small{grid-column:1/-1;grid-row:2;font-size:.75rem;line-height:1.3;margin:0}
 .receive-dialog.editing-field>.receive-summary .sale-add{min-height:44px;padding:6px 8px;font-size:.8rem;line-height:1.3;border-radius:10px}
 .receive-dialog.editing-field .field-navigation{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:8px}
 .short-visual-viewport .receive-dialog.editing-field .modalfooter{padding-block:0}
 .field-navigation button{min-height:44px;padding:8px 12px}
 .field-position{text-align:center;font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums}
 .field-navigation [data-done]{background:var(--accent);border-color:var(--accent-edge)}
}

@media(min-width:761px) and (max-height:500px){
 dialog.receive-dialog{top:calc(var(--visual-top,0px) + 8px);bottom:auto;margin:0 auto;block-size:calc(var(--visual-height,100dvh) - 16px);max-block-size:calc(var(--visual-height,100dvh) - 16px)}
}

@media(min-width:761px) and (min-height:501px){
 .receive-dialog.editing-field>.receive-summary{padding:12px 24px;background:var(--surface);border-bottom:1px solid var(--line)}
}

/* Account hierarchy, matching the ULANG account list. */
.accountlayout{max-width:100%}
.account-table,.role-table{width:100%;border-collapse:collapse;text-align:left}
.account-table th,.account-table td,.role-table th,.role-table td{padding:14px 12px;border-bottom:1px solid var(--line);vertical-align:top}
.account-table th,.role-table th{font-size:.85rem;color:var(--muted)}
.account-table{min-width:720px}
.account-table .account-actions{min-width:180px;align-items:center}
.account-table .account-icon{flex:0 0 44px;min-height:44px;padding:9px;display:inline-flex;align-items:center;justify-content:center}
.account-active{background:var(--success-soft);color:var(--success)}
.role-table td:first-child{min-width:130px}
.table-scroll .role-table{inline-size:100%;table-layout:fixed}
.role-table th:first-child{width:34%}
.role-table td:first-child{min-width:0}

/* USHOP100: independent retail account workspace. */
.account-sections{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px}.account-sections button{display:inline-flex;align-items:center;gap:6px;min-height:44px}.account-role-row{padding:14px 0;border-bottom:1px solid var(--line)}.account-role-row small{margin-left:8px;color:var(--muted)}.account-role-row p{margin:6px 0}.accountlayout .account-table{min-width:0}.accountlayout .account-table td{overflow-wrap:anywhere}.accountlayout .account-table button{min-height:44px}.account-actions button{display:inline-flex;align-items:center;gap:6px}
@media(max-width:600px){.accountlayout .account-table,.accountlayout .account-table tbody,.accountlayout .account-table tr,.accountlayout .account-table td{display:block;width:100%}.accountlayout .account-table thead{display:none}.accountlayout .account-table tr{padding:12px 0;border-bottom:1px solid var(--line)}.accountlayout .account-table td{border:0;padding:4px 0}.accountlayout .account-table td[data-label]::before{content:attr(data-label) ' · ';color:var(--muted);font-size:12px}.account-sections button{font-size:13px;padding:9px 10px}}

/* Member content follows UHOME's directory → permissions → security flow.
   All colors continue to use USHOP100's existing palette. */
.accountlayout.shop-members{max-width:620px;margin-inline:auto;padding:4px 0 24px}
.shop-members .members-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 12px}
.shop-members .members-title h1{font-size:30px;letter-spacing:-.7px;margin:4px 0 0}
.shop-members .member-eyebrow{font-size:11px;letter-spacing:.08em;color:var(--muted);margin:0}
.shop-members .member-add{position:relative;flex:none;width:48px;height:48px;min-height:48px;padding:11px;border-radius:50%;background:var(--surface);color:var(--text);border:1px solid var(--line)}
.shop-members .member-add .icon{width:25px;height:25px}
.shop-members .member-add>span{position:absolute;right:2px;bottom:1px;background:var(--surface);border-radius:50%;font-size:20px;width:20px;height:20px;line-height:18px}
.shop-members .member-intro{font-size:14px;line-height:1.6;color:var(--muted);margin:0 0 20px}
.shop-members .member-directory,.shop-members .member-group{background:var(--surface);border:1px solid var(--line);border-radius:18px;overflow:hidden;margin:0}
.shop-members .member-row{width:100%;display:flex;align-items:center;gap:14px;padding:18px 16px;text-align:left;background:none;border:0;border-radius:0;min-height:92px;border-bottom:1px solid var(--line)}
.shop-members .member-row:last-child{border-bottom:0}
.shop-members .member-row:disabled{opacity:1;cursor:default;filter:none}
.shop-members .member-person{display:block;flex:none;width:32px;height:32px;color:var(--text)}
.shop-members .member-person .icon{display:block;width:100%;height:100%}
.shop-members .member-row-copy{min-width:0;flex:1}
.shop-members .member-row-copy strong{display:block;font-size:16px;font-weight:600;color:var(--text);overflow-wrap:anywhere}
.shop-members .member-row-copy small{display:block;font-size:13px;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}
.shop-members .member-status{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--success);margin-top:7px}
.shop-members .member-status i{flex:none;width:5px;height:5px;border-radius:50%;background:currentColor}
.shop-members .member-status.inactive,.shop-members .member-chevron,.shop-members .member-self{color:var(--muted)}
.shop-members .member-chevron{flex:none;font-size:24px;line-height:1}
.shop-members .member-self{flex:none;font-size:12px;max-width:55px}
.shop-members .member-footnote{font-size:13px;color:var(--muted);line-height:1.6;margin:12px 12px 20px;overflow-wrap:anywhere}
.shop-members .member-policy{font-size:13px;color:var(--muted);margin:0 12px}
.shop-members .member-policy summary{cursor:pointer;line-height:1.6;min-height:44px;padding:10px 0}
.shop-members .member-policy p{line-height:1.7}
.shop-members .member-toolbar{display:grid;grid-template-columns:minmax(66px,1fr) minmax(0,3fr) minmax(20px,1fr);align-items:center;gap:6px;margin:0 0 22px}
.shop-members .member-toolbar h1{font-size:21px;text-align:center;margin:0;overflow-wrap:anywhere;letter-spacing:-.3px}
.shop-members .member-back{font-size:14px;text-align:left;padding:8px 0;min-height:44px;border:0;background:none}
.shop-members .member-profile{display:flex;align-items:center;gap:14px;padding:18px}
.shop-members .member-profile>div{min-width:0}
.shop-members .member-profile h2{font-size:18px;margin:0 0 6px;overflow-wrap:anywhere}
.shop-members .member-profile p{font-size:13px;color:var(--muted);margin:0;overflow-wrap:anywhere}
.shop-members .member-section-label{font-size:14px;font-weight:500;color:var(--muted);margin:24px 12px 9px}
.shop-members .member-group label{display:block;padding:14px 15px;border-bottom:1px solid var(--line);font-size:14px;color:var(--muted);margin:0}
.shop-members .member-group label:last-child{border-bottom:0}
.shop-members .member-group input,.shop-members .member-group select{width:100%;font-size:16px;margin:8px 0 0;padding:10px 0;border:0;border-radius:0;background:transparent;color:var(--text);min-height:40px;box-shadow:none}
.shop-members .member-group input:focus-visible,.shop-members .member-group select:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
.shop-members .member-group input::placeholder{font-size:14px;color:var(--muted)}
.shop-members .member-editor{margin:0}
.shop-members .member-submit{width:100%;min-height:48px;margin:0;font-size:16px}
.shop-members .member-role-save{margin:12px 15px;max-width:calc(100% - 30px);font-size:14px;min-height:44px}
.shop-members .member-value,.shop-members .member-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 15px;min-height:60px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;width:100%;font-size:14px;text-align:left}
.shop-members .member-value>span{color:var(--muted)}
.shop-members .member-value strong{font-size:14px;text-align:right}
.shop-members .member-value:last-child,.shop-members .member-toggle:last-child{border-bottom:0}
.shop-members .member-switch{display:block;flex:none;width:46px;height:28px;border-radius:20px;background:var(--line);position:relative}
.shop-members .member-switch:after{content:'';position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:var(--surface)}
.shop-members .member-switch.is-on{background:var(--success)}
.shop-members .member-switch.is-on:after{transform:translateX(18px)}
.shop-members .member-link{width:100%;display:flex;align-items:center;gap:12px;background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:17px 15px;text-align:left;font-size:14px;min-height:56px}
.shop-members .member-link:last-child{border-bottom:0}
.shop-members .member-link>span:first-of-type{flex:1;min-width:0;overflow-wrap:anywhere}
.shop-members .member-link[data-action=logout]{color:var(--danger)}
.shop-members .member-prose{padding:18px}
.shop-members .member-prose h2{font-size:18px}
.shop-members .member-prose p{font-size:14px;line-height:1.7}
.shop-members .member-danger>p{font-size:14px;line-height:1.6;color:var(--muted);padding:15px;margin:0}
.shop-members .member-danger button{width:100%;border:0;border-top:1px solid var(--line);border-radius:0;text-align:left;padding:15px;min-height:48px;background:none}
.shop-members .member-download{display:flex;align-items:center;gap:10px;min-height:48px;font-size:14px}
.shop-members .member-group .form-error{margin:12px 15px}
@media(max-width:350px){.shop-members .member-toolbar h1{font-size:18px}.shop-members .member-back span{display:none}.shop-members .member-row{padding:16px 12px;gap:10px}}

/* Minimal member directory: one title, one add action, three lines per person. */
.userchip .icon{width:17px;height:17px;vertical-align:middle;margin-left:6px}
.shop-members .members-simple-title{position:relative;min-height:100px;align-items:flex-end;margin:0 0 16px;padding-top:54px}
.shop-members .members-simple-title h1{font-size:32px;margin:0;line-height:1.15}
.shop-members .members-simple-title .member-add{position:absolute;right:0;top:0}
.shop-members .member-directory{border:0;border-radius:24px;padding:8px 18px}
.shop-members .member-directory .member-row{position:relative;border:0;padding:22px 4px;gap:18px;min-height:120px}
.shop-members .member-directory .member-row:not(:last-child)::after{content:'';position:absolute;bottom:0;left:54px;right:4px;height:1px;background:var(--line)}
.shop-members .member-directory .member-row-copy strong{font-size:18px;line-height:1.4}
.shop-members .member-directory .member-row-copy small{font-size:13px;line-height:1.5;margin-top:6px}
.shop-members .member-directory .member-status{font-size:13px;line-height:1.5;margin-top:6px}
.shop-members .member-simple-note{margin:14px 18px 0;font-size:13px}
@media(max-width:350px){.shop-members .member-directory{padding-inline:12px}.shop-members .member-directory .member-row{gap:12px;padding-block:19px}.shop-members .member-directory .member-row:not(:last-child)::after{left:48px}.shop-members .member-directory .member-row-copy strong{font-size:17px}}
.userchip{display:inline-flex;align-items:center;gap:7px}
.userchip>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.userchip .icon{flex:none;margin-left:0}

/* UHOME-style member sheet: one draft, one Save, Cancel discards it. */
#modal.member-sheet{inline-size:min(620px,100%);max-inline-size:100%;block-size:min(900px,calc(var(--visual-height,100dvh) - 16px));max-block-size:calc(var(--visual-height,100dvh) - 16px);border-radius:30px;background:var(--background);padding:0;box-sizing:border-box;inset:0;margin:auto}
.member-sheet .member-sheet-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;padding:16px 18px 12px;background:var(--background)}
.member-sheet .member-sheet-top button{min-height:44px;border-radius:28px;padding:9px 18px;background:var(--surface-muted);border:1px solid var(--line);font-size:16px;color:var(--text)}
.member-sheet .member-sheet-top .member-sheet-save{font-weight:700}
.member-sheet .member-sheet-body{flex:1;min-height:0;padding:8px 18px max(30px,env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain}
.member-sheet-body>h1{font-size:34px;letter-spacing:-.7px;line-height:1.18;margin:4px 0 24px;outline:none}
.member-sheet .member-sheet-label{font-size:17px;font-weight:500;color:var(--muted);margin:25px 18px 12px}
.member-sheet .member-sheet-group{border:0;border-radius:24px;overflow:hidden;background:var(--surface);margin:0}
.member-sheet .member-sheet-field,.member-sheet .member-sheet-value,.member-sheet .member-sheet-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative;min-height:64px;padding:12px 18px;margin:0;box-sizing:border-box;font-size:16px;line-height:1.4;color:var(--text)}
.member-sheet .member-sheet-field::after,.member-sheet .member-sheet-value::after,.member-sheet .member-sheet-toggle::after{content:'';position:absolute;bottom:0;left:18px;right:18px;height:1px;background:var(--line)}
.member-sheet .member-sheet-value>span:first-child,.member-sheet .member-sheet-field>span:first-child,.member-sheet .member-sheet-toggle>span:first-child{flex:1 1 auto;min-width:0}
.member-sheet .member-sheet-value>span:last-child{color:var(--muted);text-align:right;flex:0 1 56%;overflow-wrap:anywhere}
.member-sheet .member-sheet-field input,.member-sheet .member-sheet-field select{flex:0 1 58%;width:58%;min-width:0;min-height:40px;margin:0;padding:8px 0;text-align:right;font-size:16px;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--text)}
.member-sheet .member-sheet-field input::placeholder{font-size:14px;color:var(--muted)}
.member-sheet .member-sheet-field select{cursor:pointer;appearance:auto;text-align-last:right;color:var(--link)}
.member-sheet .member-sheet-field select:disabled{opacity:1;color:var(--muted);cursor:default}
.member-sheet .member-sheet-field input:focus-visible,.member-sheet .member-sheet-field select:focus-visible{outline:2px solid var(--focus);outline-offset:3px;border-radius:4px}
.member-sheet .member-sheet-caption{padding:14px 18px;margin:0;color:var(--muted);font-size:12px;line-height:1.5}
.member-sheet .member-sheet-description{margin-top:28px;padding:16px 18px;font-size:13px;line-height:1.5}
.member-sheet .member-sheet-description p{margin:0 0 10px}
.member-sheet .member-sheet-description p:last-child{margin-bottom:0}
.member-sheet .member-sheet-toggle input{position:absolute;right:18px;width:48px;height:32px;min-height:32px;margin:0;opacity:0;z-index:1;cursor:pointer}
.member-sheet .member-sheet-track{display:block;position:relative;flex:none;width:48px;height:29px;border-radius:22px;background:var(--line)}
.member-sheet .member-sheet-track::after{content:'';position:absolute;top:3px;left:3px;width:23px;height:23px;border-radius:50%;background:var(--surface)}
.member-sheet .member-sheet-toggle input:checked+.member-sheet-track{background:var(--accent)}
.member-sheet .member-sheet-toggle input:checked+.member-sheet-track::after{transform:translateX(19px)}
.member-sheet .member-sheet-toggle input:focus-visible+.member-sheet-track{outline:2px solid var(--focus);outline-offset:3px}
.member-sheet .member-sheet-link{display:block;text-align:left;width:100%;min-height:62px;padding:16px 18px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;color:var(--link);font-size:16px}
.member-sheet .member-sheet-link.danger{color:var(--danger)}
.member-sheet .member-sheet-submit{display:block;width:100%;margin-top:16px;min-height:48px}
@media(max-width:760px){#modal.member-sheet{left:0;right:0;top:calc(var(--visual-top,0px) + 8px);bottom:auto;margin:0;inline-size:100%;max-inline-size:100%;block-size:calc(var(--visual-height,100dvh) - 8px);max-block-size:calc(var(--visual-height,100dvh) - 8px);border-radius:30px 30px 0 0}}
@media(max-width:350px){.member-sheet .member-sheet-body{padding-inline:14px}.member-sheet-body>h1{font-size:30px}.member-sheet .member-sheet-field,.member-sheet .member-sheet-value,.member-sheet .member-sheet-toggle{padding-inline:14px;font-size:15px}.member-sheet .member-sheet-field input,.member-sheet .member-sheet-field select{flex-basis:55%;width:55%}}
.member-sheet .member-sheet-field,.member-sheet .member-sheet-toggle{font-weight:400}

.interface-update{position:fixed;left:12px;right:12px;top:env(safe-area-inset-top,12px);z-index:1000;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:var(--cream,#faf6ef);color:var(--cocoa,#563c2e);border:1px solid currentColor;border-radius:16px;box-shadow:0 4px 20px #0002}.interface-update button{padding:8px 12px}

/* Store organization follows the existing USHOP100 palette. */
.store-picker{max-width:600px;margin:auto;padding:32px max(20px,env(safe-area-inset-left)) max(32px,env(safe-area-inset-bottom));min-height:100dvh}
.store-picker .auth-brand{justify-content:flex-start;margin-bottom:32px}.store-picker h1{font-size:clamp(1.6rem,5vw,2rem);line-height:1.2;margin-bottom:16px}.store-picker>.muted{margin-bottom:26px}
.store-create{border-radius:28px;margin-bottom:28px;padding:16px}.store-cards{display:grid;gap:24px}.store-card{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:12px;width:100%;padding:24px;border-radius:24px;background:var(--surface);color:var(--text);border:1px solid var(--line)}
.store-card>.icon{width:34px;height:34px}.store-card strong{font-size:1.3rem}.store-card span{color:var(--muted)}.store-card small{color:var(--cocoa,var(--muted));font-size:.8rem}.store-card-actions{display:flex;justify-content:space-between;gap:16px;padding:8px 0}.store-card-actions button{font-size:.8rem}.store-picker-links{display:flex;flex-direction:column;align-items:flex-start;gap:16px;margin-top:28px}.store-archived{margin-top:28px}.store-archived-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 0;border-bottom:1px solid var(--line)}.store-archived-row small{display:block}.shop-context{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1;min-width:0}.shop-context strong{overflow-wrap:anywhere;font-size:.9rem}.shop-switch{background:var(--nav-raised);color:var(--surface);border-color:var(--nav-border);font-size:.75rem;padding:7px 12px;border-radius:20px;white-space:nowrap}.store-picker .member-footnote{margin-left:0}
@media(max-width:600px){.topbar .shop-context{order:3;flex-basis:100%;max-width:100%;padding-top:10px;border-top:1px solid currentColor}.topbar .userchip{margin-left:auto}.store-picker{padding-top:24px}.store-card{padding:22px}}

/* Header shared by every shop page: brand | shop name | switch, then account context. */
.shop-header{position:sticky;top:0;z-index:6;background:var(--nav)}
.shop-header .topbar{display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:14px;flex-wrap:nowrap;padding-block:12px;border-bottom:0}
.shop-header .shop-brand{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;width:64px;min-height:56px;padding:0;background:transparent;border:0;border-radius:8px;color:var(--surface);font-weight:850;letter-spacing:.04em}
.shop-header .shop-brand img{display:block;width:32px;height:32px;flex:0 0 32px}
.shop-header .brand-name{font-size:10px;white-space:nowrap;line-height:1.2;color:var(--surface)}
.shop-header .brand-name>span{color:var(--accent)}
.shop-header .shop-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:1.0625rem;line-height:1.3;text-align:left;overflow-wrap:anywhere}
.shop-header .shop-switch{min-height:36px;max-width:128px;font-size:.75rem;font-weight:500;padding:7px 12px;line-height:1.2;white-space:normal}
@media(max-width:360px){.shop-header .topbar{grid-template-columns:52px minmax(0,1fr) 100px;gap:9px;padding-inline:12px}.shop-header .shop-brand{width:52px}.shop-header .shop-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:.9375rem}.shop-header .shop-switch{padding-inline:8px}}

.member-you{display:inline-block;vertical-align:middle;font-size:.72rem;font-weight:600;line-height:1.3;padding:3px 8px;margin-inline-start:5px;border-radius:12px;background:var(--accent-soft);color:var(--link)}
