.customer-page.account-page {
  display: grid;
  width: min(100%, 540px);
  margin-inline: auto;
  gap: 12px;
  padding-block: clamp(12px, 4.4vw, 24px) 16px;
}

.account-identity {
  display: grid;
  grid-template-columns: clamp(51px, 15.7vw, 68px) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(9px, 3vw, 16px);
  min-width: 0;
  padding: 8px clamp(6px, 3vw, 14px) 7px;
}

.account-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--paper);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 18%, #fff, #dce1e6 64%, #acb5c0);
  box-shadow: 0 4px 10px #17202e14;
  color: #394254;
  font-size: clamp(1.05rem, 5vw, 1.5rem);
  font-weight: 750;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-name {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.account-name h1 {
  margin: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: clamp(1.35rem, 6.2vw, 1.78rem);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.account-id {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 630;
  overflow-wrap: anywhere;
}

.account-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 5px 2px 5px 5px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(.72rem, 3.2vw, .82rem);
  font-weight: 700;
  white-space: nowrap;
}

.account-identity-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.account-settings-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.account-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  text-align: left;
}

.account-settings-row > span:last-child { display: inline-flex; align-items: center; gap: 3px; }
.account-settings-row > input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--ink); }
.account-security-settings h3 { margin-block: 12px 0; font-size: .93rem; }
.account-security-hint { color: var(--muted); font-size: .86rem; line-height: 1.6; }
.account-security-form .field :is(input, textarea) { font-size: 16px; }
.account-settings-back { margin-block-end: 8px; }

.account-security-code {
  display: grid;
  gap: 12px;
  margin-block: 9px 15px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  font-size: .86rem;
  line-height: 1.5;
}

.account-security-code > input {
  min-width: 0;
  min-height: 44px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-family: ui-monospace, monospace;
  font-size: clamp(.64rem, 3.3vw, .9rem);
  text-align: center;
}

.account-recovery-queue { display: grid; gap: 12px; padding: 0; list-style: none; }
.account-recovery-case {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-wrap: anywhere;
  font-size: .85rem;
}

.account-quick-grid,
.account-order-grid,
.account-benefits,
.account-enrollment-grid {
  display: grid;
  grid-template-columns: repeat(var(--account-columns), minmax(0, 1fr));
  align-items: stretch;
}

.account-quick-grid { --account-columns: 4; padding: 2px 0 5px; }
.account-order-grid { --account-columns: 5; }
.account-benefits,
.account-enrollment-grid { --account-columns: 3; }

.account-quick-tile,
.account-order-grid > :is(button, a),
.account-enrollment-grid > :is(button, a) {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 52px;
  padding: 5px 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: center;
}

.account-quick-tile:not(:disabled):hover,
.account-order-grid > :is(button, a):not(:disabled):hover,
.account-enrollment-grid > :is(button, a):not(:disabled):hover {
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}

.account-quick-tile + .account-quick-tile::before,
.account-order-grid > * + *::before,
.account-enrollment-grid > * + *::before,
.account-benefits > * + *::before {
  position: absolute;
  inset: 27% auto 27% 0;
  width: 1px;
  background: var(--line);
  pointer-events: none;
  content: "";
}

.account-quick-tile {
  gap: 4px;
  font-size: clamp(.72rem, 3.3vw, .86rem);
  font-weight: 650;
}

.account-quick-tile strong {
  position: relative;
  font-size: clamp(1.14rem, 5.1vw, 1.38rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.account-quick-tile strong:has(.account-add) { padding-inline-end: 14px; }

.account-add {
  position: absolute;
  inset: -2px 0 auto auto;
  display: inline-grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: .68rem;
  font-weight: 750;
  line-height: 1;
}

.account-quick-tile > .account-add {
  inset: 3px max(2px, calc(50% - 23px)) auto auto;
}

.account-panel,
.account-enrollment-grid {
  min-width: 0;
  border: 1px solid #ffffffa6;
  border-radius: 19px;
  background: #fdfdfd;
  box-shadow: 0 2px 9px #20242e06;
}

.account-orders {
  display: grid;
  gap: 10px;
  padding: 15px 9px 10px;
}

.account-orders :is(h2, h3) {
  padding-inline: 7px;
  color: var(--ink);
  font-family: inherit;
  font-size: clamp(1.12rem, 4.6vw, 1.32rem);
  font-weight: 750;
}

.account-order-grid > :is(button, a),
.account-enrollment-grid > :is(button, a) {
  gap: 6px;
  color: var(--muted);
  font-size: clamp(.72rem, 3.2vw, .83rem);
  font-weight: 650;
  line-height: 1.25;
}

.account-order-grid svg {
  width: clamp(19px, 5.2vw, 24px);
  height: clamp(19px, 5.2vw, 24px);
  color: var(--ink);
}

.account-order-symbol { display: inline-flex; }
.account-order-symbol > .notification-badge { left: calc(100% - 7px); }

.account-enrollment-grid { padding: 4px 5px; }

.account-enrollment-grid svg {
  width: clamp(24px, 6vw, 29px);
  height: clamp(24px, 6vw, 29px);
  color: var(--ink);
}

.account-enrollment-grid > :is(button, a) { min-height: 61px; }

.account-benefits { padding: 5px; }

.account-benefit-tile {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 105px;
  padding: 10px 3px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--ink);
  text-align: center;
}

.account-benefit-tile:hover { background: var(--surface); }

[data-benefit="friends"] { --benefit-light: #49bdfa; --benefit-dark: #165ed4; --benefit-shadow: #175dd34d; }
[data-benefit="companions"] { --benefit-light: #9b78fc; --benefit-dark: #5e3bc2; --benefit-shadow: #6345bd4d; }
[data-benefit="shop"] { --benefit-light: #ffb63d; --benefit-dark: #d76a0c; --benefit-shadow: #d26e1b45; }

.account-benefit-icon {
  display: grid;
  place-items: center;
  width: clamp(40px, 12vw, 56px);
  aspect-ratio: 1;
  border: 1px solid #ffffff9c;
  border-radius: 35%;
  background: radial-gradient(ellipse at 24% 4%, #ffffff59, transparent 65%),
    linear-gradient(150deg, var(--benefit-light), var(--benefit-dark) 86%);
  box-shadow: inset 0 1px 1px #ffffff8c, 0 3px 7px var(--benefit-shadow);
  color: white;
}

.account-benefit-label {
  font-size: clamp(.72rem, 3.3vw, .88rem);
  font-weight: 720;
}

.account-benefit-tile strong {
  font-size: clamp(.97rem, 4.9vw, 1.32rem);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.account-benefit-tile strong small {
  font-size: .68rem;
  font-weight: 670;
}

.account-invitation,
.account-shop { gap: 14px; min-width: 0; }

.account-invite-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--benefit-light) 7%, var(--paper));
}

.account-invite-share > div { display: grid; gap: 2px; }
.account-invite-share small { color: var(--muted); font-size: .75rem; }
.account-invite-share strong { font-variant-numeric: tabular-nums; }
.account-invite-share button { min-height: 44px; padding-inline: 10px; font-size: .82rem; }
.invite-copy-fallback { flex-basis: 100%; width: 100%; min-width: 0; max-width: 100%; }

.account-invitation section { display: grid; gap: 8px; min-width: 0; }
.account-invitation section h3 { margin: 0; font-size: .95rem; font-weight: 750; }
.account-invite-rules ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-inline-start: 1.18em;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

.account-invite-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding-block: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
}

.account-invite-summary > div { display: grid; gap: 4px; min-width: 0; padding-inline: 3px; }
.account-invite-summary > div + div { border-inline-start: 1px solid var(--line); }
.account-invite-summary dt { color: var(--muted); font-size: clamp(.62rem, 2.8vw, .78rem); }
.account-invite-summary dd {
  margin: 0;
  font-size: clamp(.93rem, 3.6vw, 1.14rem);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  overflow-wrap: anywhere;
}
.account-invite-summary dd small { font-size: .7rem; font-weight: 600; }

.account-invite-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: clamp(.66rem, 3vw, .84rem);
  font-variant-numeric: tabular-nums;
  text-align: start;
}
.account-invite-table :is(th, td) {
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  text-align: start;
}
.account-invite-table th { color: var(--muted); font-weight: 650; }
.account-invite-table th:nth-child(2) { width: 45%; }
.account-invite-table tr > :last-child { text-align: end; }

.account-shop-balance {
  margin: 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: .79rem;
  justify-self: start;
}
.account-shop-balance strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.account-shop-categories { display: flex; flex-wrap: wrap; gap: 5px; }
.account-shop-categories button {
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 670;
}
.account-shop-categories button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.account-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.account-shop-product {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}
.account-shop-photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface);
  color: var(--muted);
}
.account-shop-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-shop-sold-out {
  position: absolute;
  inset: auto 5px 5px auto;
  padding: 3px 6px;
  border-radius: 5px;
  background: #24242ae8;
  color: white;
  font-size: .7rem;
}
.account-shop-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
  padding: 9px;
  overflow-wrap: anywhere;
}
.account-shop-copy h3 { margin: 0; font-size: .9rem; font-weight: 730; line-height: 1.3; }
.account-shop-copy p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.account-shop-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px 7px;
  margin-top: auto;
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.account-shop-price small,
.account-shop-price > span { color: var(--muted); font-size: .68rem; font-weight: 610; }
.account-shop-price strong { color: var(--ink); font-size: .91rem; }

@media (min-width: 701px) {
  .account-shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.account-list,
.account-detail {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.account-list {
  padding: 0;
  list-style-type: none;
}

.account-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  text-align: start;
  overflow-wrap: anywhere;
}

button.account-list-row:not(:disabled):hover,
a.account-list-row:hover {
  background: var(--surface);
}

.account-list-row > :not(.account-list-thumb, button, svg) {
  min-width: 0;
}

.account-list-thumb {
  flex: 0 0 48px;
  width: 48px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
}

.account-list-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
}

.account-list-copy small {
  color: var(--muted);
  font-size: .76rem;
}

.account-empty {
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.account-detail .button {
  justify-self: stretch;
  width: 100%;
}

@media (min-width: 701px) {
  .account-page { gap: 16px; }
  .account-quick-tile { min-height: 60px; }
}

.account-list-open {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: start;
}

.account-list-open > span:last-child,
.account-ledger-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 3px;
}

.account-list-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.account-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-list-open small,
.account-ledger-copy small {
  color: var(--muted);
  font-size: .76rem;
}

.account-balance {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
}

.account-balance > strong {
  color: var(--ink);
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
}

.account-balance small {
  font-size: .86rem;
}

.account-order-grid > button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface);
  border-radius: 10px;
}

.account-signature {
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.account-profile-form { gap: 17px; }
.account-profile-avatar { display: flex; align-items: center; gap: 14px; }
.account-profile-avatar .account-avatar { width: 68px; flex: 0 0 68px; }
.account-profile-avatar [hidden] { display: none; }

.account-photo-label,
.account-photo-reset {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .83rem;
  cursor: pointer;
}

.account-photo-label input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.account-photo-label:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.account-photo-reset { color: var(--muted); background: transparent; }
.account-field-set { display: grid; gap: 13px; }
.account-field-set select { appearance: auto; }
.account-profile-error { color: #b1262b; font-size: .83rem; }

.account-edit { border-radius: 10px; }
:is(.account-edit, .account-quick-tile, .account-benefit-tile, .account-order-grid > button, .account-enrollment-grid > :is(button, a),
  .account-list-open, .account-list .order-row, .account-photo-label, .account-photo-reset):not(:disabled):active {
  background: var(--surface);
}

@media (prefers-reduced-motion: no-preference) {
  :is(.account-edit, .account-quick-tile, .account-benefit-tile, .account-order-grid > button, .account-enrollment-grid > :is(button, a),
    .account-list-open, .account-list .order-row, .account-photo-label, .account-photo-reset) {
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 145ms cubic-bezier(.22,.75,.24,1);
  }
  :is(.account-quick-tile, .account-benefit-tile, .account-order-grid > button, .account-enrollment-grid > :is(button, a)) > :is(strong, span, svg),
  :is(.account-edit svg, .account-page .wealth-details) {
    transition: transform 145ms cubic-bezier(.22,.75,.24,1);
  }
  :is(.account-quick-tile, .account-benefit-tile, .account-order-grid > button, .account-enrollment-grid > :is(button, a)):not(:disabled):active > :is(strong, span, svg),
  :is(.account-edit:active svg, .account-list-open:active, .account-list .order-row:active, .account-photo-label:active,
    .account-photo-reset:active, .account-page .wealth-details:active) {
    transform: scale(.96);
    transition-duration: 80ms;
  }
}
