/* =========================================================
   GAINVO Storefront v0.10.11 — Account native refinement
   Readable typography, native touch geometry, safe sheets,
   keyboard/focus visibility and responsive account layouts.
   ========================================================= */

.screen[data-screen="account"]{
  --account-text: clamp(.9375rem,.15vw + .91rem,1rem);
  --account-support: clamp(.8125rem,.12vw + .79rem,.875rem);
  --account-meta: clamp(.75rem,.08vw + .73rem,.8125rem);
  --account-label: clamp(.875rem,.1vw + .85rem,.9375rem);
  --account-title: clamp(1.42rem,.55vw + 1.28rem,1.8rem);
  --account-section-title: clamp(1.12rem,.3vw + 1.04rem,1.32rem);
  padding-bottom:calc(98px + var(--gv-safe-bottom,0px));
}

.screen[data-screen="account"] .micro{
  font-size:clamp(.7rem,.08vw + .68rem,.76rem)!important;
  line-height:1.3!important;
  letter-spacing:.075em!important;
}

.screen[data-screen="account"] .account-loading-v8 strong{font-size:var(--account-text)!important}
.screen[data-screen="account"] .account-loading-v8 small{font-size:var(--account-support)!important;line-height:1.45!important}

/* Guest / signed-in identity hero */
.screen[data-screen="account"] .guest-account-hero,
.screen[data-screen="account"] .signed-account-hero{
  border-radius:22px!important;
  padding:clamp(18px,3.4vw,28px)!important;
  margin-bottom:24px!important;
}
.screen[data-screen="account"] .guest-account-copy{min-width:0;position:relative;z-index:2}
.screen[data-screen="account"] .guest-account-hero h1,
.screen[data-screen="account"] .signed-account-hero h1{
  font-size:var(--account-title)!important;
  line-height:1.08!important;
  letter-spacing:-.03em!important;
  overflow-wrap:anywhere;
}
.screen[data-screen="account"] .guest-account-hero .guest-account-copy>p,
.screen[data-screen="account"] .guest-account-hero>p,
.screen[data-screen="account"] .signed-account-hero .account-identity-copy>p{
  font-size:var(--account-text)!important;
  line-height:1.55!important;
}
.screen[data-screen="account"] .guest-account-actions{gap:10px!important}
.screen[data-screen="account"] .guest-account-actions .primary-cta,
.screen[data-screen="account"] .guest-account-actions .secondary-cta{
  min-height:48px!important;
  padding:0 16px!important;
  font-size:.9375rem!important;
  font-weight:800!important;
}
.screen[data-screen="account"] .guest-account-promise{
  align-items:flex-start!important;
  gap:11px!important;
}
.screen[data-screen="account"] .guest-account-promise>span{
  width:38px!important;height:38px!important;min-width:38px!important;
}
.screen[data-screen="account"] .guest-account-promise strong{font-size:var(--account-label)!important;line-height:1.35!important}
.screen[data-screen="account"] .guest-account-promise small{font-size:var(--account-support)!important;line-height:1.45!important}

.screen[data-screen="account"] .signed-account-top{
  grid-template-columns:auto minmax(0,1fr) auto!important;
  gap:14px!important;
}
.screen[data-screen="account"] .account-avatar-lg{
  width:62px!important;height:62px!important;border-radius:19px!important;
  font-size:1.25rem!important;
}
.screen[data-screen="account"] .signed-account-top p{font-size:var(--account-support)!important;line-height:1.4!important}
.screen[data-screen="account"] .account-status-line{
  display:flex!important;flex-wrap:wrap!important;gap:7px!important;margin-top:8px!important;
}
.screen[data-screen="account"] .account-status-line>span{
  min-height:28px!important;display:inline-flex!important;align-items:center!important;
  padding:5px 9px!important;border-radius:999px!important;
  font-size:var(--account-meta)!important;line-height:1.25!important;
}
.screen[data-screen="account"] .account-profile-edit{
  min-height:44px!important;min-width:44px!important;
  padding:0 13px!important;font-size:.875rem!important;border-radius:12px!important;
  white-space:nowrap;
}

/* Account section hierarchy */
.screen[data-screen="account"] .account-dashboard-section{margin-bottom:28px!important;scroll-margin-top:90px}
.screen[data-screen="account"] .account-section-title{
  align-items:flex-end!important;gap:12px!important;margin:0 2px 12px!important;
}
.screen[data-screen="account"] .account-section-title h2{
  font-size:var(--account-section-title)!important;
  line-height:1.2!important;
}
.screen[data-screen="account"] .account-section-title p{
  font-size:var(--account-support)!important;
  line-height:1.45!important;
  margin-top:4px!important;
}
.screen[data-screen="account"] .account-section-title>button{
  min-height:44px!important;min-width:44px!important;
  padding:0 4px!important;font-size:.875rem!important;
  touch-action:manipulation;
}

/* At-a-glance summary */
.screen[data-screen="account"] .account-summary-row{
  gap:9px!important;margin-top:14px!important;
}
.screen[data-screen="account"] .account-summary-row button{
  min-height:76px!important;
  padding:12px 10px!important;
  border-radius:16px!important;
  touch-action:manipulation;
}
.screen[data-screen="account"] .account-summary-row button strong{
  font-size:clamp(1.28rem,.3vw + 1.2rem,1.5rem)!important;
  line-height:1.1!important;
}
.screen[data-screen="account"] .account-summary-row button span,
.screen[data-screen="account"] .account-summary-row button small{
  font-size:var(--account-support)!important;
  line-height:1.3!important;
}

/* Saved shops / addresses / empty states */
.screen[data-screen="account"] .account-saved-shops,
.screen[data-screen="account"] .address-list{gap:10px!important}
.screen[data-screen="account"] .account-saved-shop,
.screen[data-screen="account"] .address-card{
  min-height:68px!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  gap:12px!important;
  padding:11px 12px!important;
  border-radius:17px!important;
}
.screen[data-screen="account"] .account-saved-shop-logo,
.screen[data-screen="account"] .address-icon{
  width:48px!important;height:48px!important;border-radius:14px!important;
}
.screen[data-screen="account"] .account-saved-shop strong,
.screen[data-screen="account"] .address-card strong{
  font-size:var(--account-label)!important;
  line-height:1.35!important;
}
.screen[data-screen="account"] .account-saved-shop small,
.screen[data-screen="account"] .address-card p,
.screen[data-screen="account"] .address-card small{
  font-size:var(--account-support)!important;
  line-height:1.45!important;
}
.screen[data-screen="account"] .address-card p{margin:4px 0!important}
.screen[data-screen="account"] .address-label-line{flex-wrap:wrap!important;gap:7px!important}
.screen[data-screen="account"] .address-label-line span{
  font-size:.72rem!important;line-height:1.2!important;padding:4px 7px!important;
}
.screen[data-screen="account"] .address-precision{
  display:inline-flex!important;align-items:center!important;min-height:25px!important;
}
.screen[data-screen="account"] .address-card>button{
  width:44px!important;height:44px!important;min-width:44px!important;
  border-radius:12px!important;display:grid!important;place-items:center!important;
  font-size:1rem!important;touch-action:manipulation;
}
.screen[data-screen="account"] .account-empty-inline{
  min-height:72px!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  padding:13px!important;gap:12px!important;border-radius:17px!important;
}
.screen[data-screen="account"] .account-empty-inline>span{width:44px!important;height:44px!important}
.screen[data-screen="account"] .account-empty-inline strong{font-size:var(--account-label)!important;line-height:1.35!important}
.screen[data-screen="account"] .account-empty-inline p{font-size:var(--account-support)!important;line-height:1.45!important;margin:3px 0!important}
.screen[data-screen="account"] .account-empty-inline button{
  min-height:44px!important;padding:0 12px!important;font-size:.875rem!important;
  touch-action:manipulation;
}

/* Saved product cards inherit the native product-card foundation but keep
   account cards from being compressed by legacy account selectors. */
.screen[data-screen="account"] .account-saved-grid{gap:10px!important}
.screen[data-screen="account"] .account-saved-grid .product-title{font-size:.9375rem!important;line-height:1.35!important}
.screen[data-screen="account"] .account-saved-grid .product-shop,
.screen[data-screen="account"] .account-saved-grid .product-meta{font-size:.78rem!important;line-height:1.35!important}
.screen[data-screen="account"] .account-saved-grid .product-price{font-size:1rem!important}

/* Preferences are settings rows, not micro copy. */
.screen[data-screen="account"] .preference-card,
.screen[data-screen="account"] .account-settings-list{border-radius:18px!important}
.screen[data-screen="account"] .preference-row{
  min-height:72px!important;padding:13px 14px!important;gap:14px!important;
}
.screen[data-screen="account"] .preference-row>span{min-width:0!important;gap:3px!important}
.screen[data-screen="account"] .preference-row strong{font-size:var(--account-label)!important;line-height:1.3!important}
.screen[data-screen="account"] .preference-row small{font-size:var(--account-support)!important;line-height:1.4!important}
.screen[data-screen="account"] .preference-row i{
  width:46px!important;height:28px!important;min-width:46px!important;
}
.screen[data-screen="account"] .preference-row i:after{width:22px!important;height:22px!important;top:3px!important;left:3px!important}
.screen[data-screen="account"] .preference-row input:checked+i:after{transform:translateX(18px)!important}
.screen[data-screen="account"] .preference-row:focus-within{
  outline:3px solid color-mix(in srgb,var(--teal,#0b8d80) 28%,transparent);
  outline-offset:-3px;
}

/* Settings & security */
.screen[data-screen="account"] .account-settings-list button{
  min-height:68px!important;
  grid-template-columns:44px minmax(0,1fr) 24px!important;
  gap:12px!important;padding:11px 14px!important;
  touch-action:manipulation;
}
.screen[data-screen="account"] .account-settings-list button>span{
  width:44px!important;height:44px!important;border-radius:13px!important;
  font-size:1.05rem!important;
}
.screen[data-screen="account"] .account-settings-list button>div{gap:3px!important;min-width:0!important}
.screen[data-screen="account"] .account-settings-list strong{font-size:var(--account-label)!important;line-height:1.3!important}
.screen[data-screen="account"] .account-settings-list small{font-size:var(--account-support)!important;line-height:1.4!important}
.screen[data-screen="account"] .account-settings-list button>b{font-size:1.35rem!important}

/* Priority cards: verification, order alerts and account sync. */
.screen[data-screen="account"] .account-priority-card,
.screen[data-screen="account"] .device-alert-card,
.screen[data-screen="account"] .email-verification-card,
.screen[data-screen="account"] .account-sync-notice{
  border-radius:18px!important;
  gap:12px!important;
  padding:14px!important;
}
.screen[data-screen="account"] .account-priority-card h2,
.screen[data-screen="account"] .account-priority-card strong,
.screen[data-screen="account"] .account-sync-notice strong{font-size:var(--account-label)!important;line-height:1.35!important}
.screen[data-screen="account"] .account-priority-card p,
.screen[data-screen="account"] .account-priority-card small,
.screen[data-screen="account"] .account-sync-notice small{font-size:var(--account-support)!important;line-height:1.45!important}
.screen[data-screen="account"] .account-priority-card button,
.screen[data-screen="account"] .account-sync-notice button{
  min-height:44px!important;padding:0 13px!important;font-size:.875rem!important;
  touch-action:manipulation;
}
.screen[data-screen="account"] .account-priority-card>span,
.screen[data-screen="account"] .account-sync-notice>span{
  width:42px!important;height:42px!important;min-width:42px!important;
  display:grid!important;place-items:center!important;border-radius:13px!important;
}

/* Appearance controls */
.screen[data-screen="account"] .appearance-current{font-size:var(--account-support)!important}
.screen[data-screen="account"] .appearance-card{gap:9px!important;padding:9px!important}
.screen[data-screen="account"] .appearance-option{
  min-height:58px!important;padding:10px!important;gap:9px!important;
  touch-action:manipulation;
}
.screen[data-screen="account"] .appearance-copy strong{font-size:.875rem!important;line-height:1.25!important}
.screen[data-screen="account"] .appearance-copy small{font-size:.75rem!important;line-height:1.35!important}
.screen[data-screen="account"] .appearance-swatch{width:36px!important;height:36px!important}
.screen[data-screen="account"] .appearance-check{width:20px!important;height:20px!important;font-size:.72rem!important}

/* Account / authentication bottom sheets */
.customer-account-sheet,
.account-editor-sheet{
  width:min(100%,560px)!important;
  max-height:min(92dvh,var(--gv-viewport-height,92dvh))!important;
  padding:0 max(16px,var(--gv-safe-right,0px)) calc(18px + var(--gv-safe-bottom,0px)) max(16px,var(--gv-safe-left,0px))!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch;
  scroll-padding-bottom:calc(100px + var(--gv-keyboard-height,0px));
}
.customer-account-sheet .sheet-head,
.account-editor-sheet .sheet-head{
  position:sticky!important;top:0!important;z-index:4!important;
  background:rgba(255,255,255,.97)!important;
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  padding-top:10px!important;
}
.customer-account-sheet .sheet-head h2,
.account-editor-sheet .sheet-head h2{
  font-size:clamp(1.18rem,.35vw + 1.1rem,1.38rem)!important;
  line-height:1.25!important;
}
.customer-account-sheet .close-button,
.account-editor-sheet .close-button{
  width:44px!important;height:44px!important;min-width:44px!important;
  border-radius:14px!important;font-size:1.35rem!important;
}
.customer-account-sheet .sheet-handle,
.account-editor-sheet .sheet-handle{width:44px!important;height:5px!important;margin-top:8px!important}

.customer-account-sheet .auth-mode-tabs{
  min-height:48px!important;padding:4px!important;margin-bottom:17px!important;
}
.customer-account-sheet .auth-mode-tabs button{
  min-height:40px!important;font-size:.875rem!important;padding:0 10px!important;
}
.customer-auth-form,
.account-editor-form{gap:14px!important;padding-bottom:4px!important}
.customer-auth-form label,
.account-editor-form label{
  gap:7px!important;
  font-size:.875rem!important;
  line-height:1.35!important;
}
.customer-auth-form label>small,
.account-editor-form label>small,
.customer-auth-form .field-guidance,
.account-editor-form .field-guidance{
  font-size:.75rem!important;line-height:1.45!important;font-weight:500!important;
}
.customer-auth-form input:not([type=checkbox]),
.account-editor-form input:not([type=checkbox]){
  min-height:50px!important;
  border-radius:13px!important;
  padding:0 13px!important;
  font-size:1rem!important;
  line-height:1.3!important;
}
.customer-auth-form input:disabled,
.account-editor-form input:disabled{opacity:.72!important}
.password-field button{
  min-width:48px!important;min-height:44px!important;
  padding:0 10px!important;font-size:.8125rem!important;
}
.auth-security-intro,
.auth-value-strip,
.auth-conversion-note,
.auth-consent,
.auth-remember,
.auth-merge-choice,
.editor-check,
.delete-account-warning,
.delete-confirm-check{
  font-size:.875rem!important;
}
.auth-security-intro strong,
.auth-value-strip strong,
.auth-conversion-note strong,
.auth-merge-choice strong,
.editor-check strong,
.delete-account-warning strong{font-size:.875rem!important;line-height:1.35!important}
.auth-security-intro p,
.auth-value-strip small,
.auth-conversion-note small,
.auth-consent small,
.auth-merge-choice small,
.editor-check small,
.delete-account-warning p,
.editor-intro{
  font-size:.8125rem!important;line-height:1.5!important;
}
.auth-between{gap:12px!important;flex-wrap:wrap!important}
.auth-text-action,
.danger-text-button{
  min-height:44px!important;padding:0 8px!important;font-size:.875rem!important;
  touch-action:manipulation;
}
.customer-auth-form .primary-cta,
.account-editor-form .primary-cta,
.account-editor-form .secondary-cta,
.account-editor-form .danger-confirm-button{
  min-height:50px!important;
  font-size:.9375rem!important;
  border-radius:14px!important;
  touch-action:manipulation;
}
.auth-error:not(:empty){font-size:.8125rem!important;line-height:1.45!important;padding:10px 11px!important}
.auth-privacy-copy{font-size:.75rem!important;line-height:1.45!important}

/* Address editor */
.account-editor-sheet .address-geo-tools{gap:10px!important}
.account-editor-sheet .address-geo-tools .secondary-cta{min-height:48px!important;font-size:.875rem!important}
.account-editor-sheet .address-geo-status{font-size:.8125rem!important;line-height:1.4!important}
.account-editor-sheet .editor-check{min-height:58px!important;align-items:flex-start!important}
.account-editor-sheet .editor-check input,
.customer-account-sheet input[type="checkbox"],
.account-editor-sheet input[type="checkbox"]{
  width:22px!important;height:22px!important;min-width:22px!important;
  accent-color:var(--teal,#0b8d80);
}

/* Native press feedback */
@media (hover:none) and (pointer:coarse){
  .screen[data-screen="account"] button:active,
  .customer-account-sheet button:active,
  .account-editor-sheet button:active{transform:scale(.985)}
}

/* Narrow phones: reflow instead of shrinking. */
@media(max-width:430px){
  .screen[data-screen="account"] .signed-account-top{
    grid-template-columns:auto minmax(0,1fr)!important;
  }
  .screen[data-screen="account"] .account-profile-edit{
    grid-column:1/-1!important;width:100%!important;
  }
  .screen[data-screen="account"] .account-section-title{
    align-items:flex-start!important;flex-wrap:wrap!important;
  }
  .screen[data-screen="account"] .account-section-title>button{margin-left:auto!important}
  .screen[data-screen="account"] .account-empty-inline{
    grid-template-columns:auto minmax(0,1fr)!important;
  }
  .screen[data-screen="account"] .account-empty-inline button{
    grid-column:1/-1!important;width:100%!important;
  }
  .screen[data-screen="account"] .account-priority-card,
  .screen[data-screen="account"] .device-alert-card,
  .screen[data-screen="account"] .email-verification-card,
  .screen[data-screen="account"] .account-sync-notice{
    align-items:flex-start!important;
    flex-wrap:wrap!important;
  }
  .screen[data-screen="account"] .account-priority-card button,
  .screen[data-screen="account"] .account-sync-notice button{width:100%!important}
  .screen[data-screen="account"] .appearance-card{grid-template-columns:1fr!important}
  .screen[data-screen="account"] .appearance-option{grid-template-columns:auto minmax(0,1fr) auto!important}
  .screen[data-screen="account"] .appearance-check{position:static!important;opacity:1!important;transform:none!important}
  .screen[data-screen="account"] .appearance-option:not(.is-active) .appearance-check{opacity:0!important}
}

@media(max-width:350px){
  .screen[data-screen="account"] .account-summary-row{grid-template-columns:1fr!important}
  .screen[data-screen="account"] .account-summary-row button{
    min-height:58px!important;grid-template-columns:auto 1fr!important;align-items:center!important;text-align:left!important;
  }
  .screen[data-screen="account"] .account-summary-row button strong{min-width:42px!important}
}

/* Tablet / desktop account workspace. */
@media(min-width:700px){
  .screen[data-screen="account"]{max-width:1080px!important;margin-inline:auto!important}
  .screen[data-screen="account"] .account-saved-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .screen[data-screen="account"] .account-summary-row{max-width:720px!important}
  .customer-account-sheet,
  .account-editor-sheet{
    max-height:min(86dvh,var(--gv-viewport-height,86dvh))!important;
  }
}
@media(min-width:1024px){
  .screen[data-screen="account"] .account-saved-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

/* Dark-mode parity for sticky sheet heads and focus feedback. */
html[data-theme="dark"] .customer-account-sheet .sheet-head,
html[data-theme="dark"] .account-editor-sheet .sheet-head{
  background:rgba(11,20,29,.97)!important;
  border-color:#253641!important;
}
html[data-theme="dark"] .screen[data-screen="account"] .preference-row:focus-within{
  outline-color:rgba(103,220,203,.28)!important;
}

@media(prefers-reduced-motion:reduce){
  .screen[data-screen="account"] button,
  .customer-account-sheet,
  .account-editor-sheet{transition:none!important}
}
