.auth-layout > .benefit-strip { grid-column: 1 / -1; margin-top: 2px; }
.shop-art::before { background: #f5efdf; }
.auth-art img { mix-blend-mode: multiply; }
.back-home { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #7a8797; }
.back-home .icon { width: 15px; height: 15px; }
.back-home:hover { color: var(--blue); }
#who { font-size: 12px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
#who:empty { display: none; }
.header-account:has(#who:not(:empty)) .back-home { display: none; }
.store-welcome { margin-top: 40px; padding: 36px 54px; display: grid; grid-template-columns: 1fr 310px; align-items: center; border-radius: 25px; background: #eef2fc; min-height: 290px; overflow: hidden; }
.store-welcome h1 { font-size: 39px; margin: 16px 0; }
.store-welcome p { font-size: 13px; margin: 0; }
.store-art { position: relative; height: 230px; }
.store-art img { width: 270px; height: 270px; object-fit: contain; margin-top: -18px; mix-blend-mode: multiply; }
.store-art > span { position: absolute; right: 0; top: 0; color: #d2b576; font-size: 44px; transform: rotate(15deg); }
.store-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin: 42px 0 26px; }
.store-toolbar h2 { font-size: 27px; margin: 10px 0 0; }
.workspace-nav { display: flex; gap: 4px; padding: 5px; background: #ecf0f6; border-radius: 12px; }
.workspace-nav button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 9px 15px; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: #8794a4; font-size: 12px; white-space: nowrap; }
.workspace-nav .icon { width: 16px; height: 16px; }
.workspace-nav button.active { color: var(--blue); background: white; box-shadow: 0 2px 7px #394c710a; }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.card { position: relative; display: flex; flex-direction: column; padding: 29px; border: 1px solid #e0e6ed; background: white; border-radius: 21px; box-shadow: var(--shadow); }
.card > span { display: inline-flex; align-items: center; gap: 7px; align-self: start; color: #8093b1; background: #f1f5fc; padding: 4px 10px; border-radius: 6px; font-size: 11px; }
.card > span .icon { width: 14px; height: 14px; }
.card:nth-child(3n+2) > span { background: #edf5ee; color: #7e9a85; }
.card:nth-child(3n+3) > span { background: #fbf3e4; color: #b59a6d; }
.card h2 { font-size: 23px; margin: 22px 0 12px; }
.card p { font-size: 13px; min-height: 43px; overflow-wrap: anywhere; }
.price { font-size: 34px; font-weight: 700; letter-spacing: -.035em; padding-top: 15px; margin-top: auto; }
.price small { display: block; color: #9aa5b2; font-weight: 400; letter-spacing: 0; font-size: 11px; min-height: 22px; }
.buy { width: 100%; margin-top: 23px; min-height: 46px; font-size: 13px; }
.list { display: grid; gap: 12px; }
.order { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 26px; padding: 24px 28px; background: white; border: 1px solid #e2e8ef; border-radius: 16px; }
.order b { font-size: 14px; }
.order small { color: #909ba8; font-size: 11px; overflow-wrap: anywhere; }
.order > span { padding: 4px 10px; border-radius: 6px; background: #f0f5ef; color: #7b9474; font-size: 11px; }
.order button { min-height: 40px; padding: 9px 15px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); border: 1px solid #dce5f6; font-size: 12px; font-weight: 600; }
.store-help { display: flex; align-items: center; justify-content: center; gap: 7px; padding-top: 35px; color: #99a1ae; font-size: 12px; }
.store-help a { display: inline-flex; align-items: center; gap: 3px; color: var(--blue); }
.store-help .icon { width: 15px; height: 15px; }
@media (max-width: 1000px) { .card { padding: 23px; } .store-welcome { padding: 32px; } .store-toolbar h2 { font-size: 24px; } }
@media (max-width: 760px) {
  .back-home { font-size: 11px; }
  .header-account { gap: 12px; }
  #who { max-width: 116px; font-size: 11px; }
  #logout { font-size: 11px; padding: 8px 10px; }
  .auth-layout > .benefit-strip { margin-top: 0; }
  .store-welcome { margin-top: 28px; padding: 28px 24px; grid-template-columns: 1fr; min-height: 0; position: relative; }
  .store-welcome > div:first-child { position: relative; z-index: 1; padding-right: 72px; }
  .store-welcome h1 { font-size: 29px; }
  .store-welcome .eyebrow { font-size: 9px; }
  .store-welcome p { font-size: 11px; max-width: 190px; }
  .store-art { position: absolute; width: 132px; height: 150px; right: -7px; bottom: 12px; }
  .store-art img { width: 148px; height: 148px; margin: 0; }
  .store-art > span { font-size: 24px; right: 8px; top: 0; }
  .store-toolbar { align-items: stretch; flex-direction: column; gap: 20px; margin-top: 30px; }
  .store-toolbar h2 { font-size: 24px; }
  .workspace-nav button { flex: 1; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 28px; }
  .card p { min-height: 0; }
  .card h2 { margin-top: 16px; }
  .price { padding-top: 4px; }
  .order { padding: 21px; grid-template-columns: 1fr auto; gap: 14px; }
  .order div { grid-column: 1 / -1; }
  .order > span { justify-self: start; }
  .order > button, .order > b { justify-self: end; }
}

.store-art img { border-radius: 44%; }
/* Shared fallback for controls added by checkout and top-up flows. */
:where(button) {
  appearance: none;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid #d8e1ee;
  border-radius: 11px;
  background: var(--paper);
  color: var(--blue-dark);
  font-weight: 600;
}
button:not(:disabled):active { transform: translateY(1px); }
button:focus-visible { outline: 3px solid #829cea; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .55; transform: none; }

.coupon-bar {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin: 20px 0;
}
.coupon-bar label { flex: 1 1 16rem; max-width: 24rem; }
.coupon-bar button { min-height: 48px; }

:is(.checkout-dialog, .topup-dialog) {
  box-sizing: border-box;
  width: min(460px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 64px #28354930;
}
:is(.checkout-dialog, .topup-dialog)::backdrop { background: #1d2d4970; }
:is(.checkout-dialog, .topup-dialog) h2 { font-size: 22px; margin: 0 0 16px; }
:is(.checkout-dialog, .topup-dialog) p { margin: 8px 0; overflow-wrap: anywhere; }
.checkout-dialog small { color: var(--muted); }
.checkout-dialog select {
  width: 100%; min-height: 44px; margin: 6px 0 12px; padding: 8px 12px;
  font: inherit; border: 1px solid #d8e1ee; border-radius: 10px;
  color: var(--ink); background: var(--paper);
}
#checkout-total { color: var(--ink); font-weight: 650; }
#checkout-error:empty, #usdt-checkout [role=status]:empty { display: none; }
.checkout-dialog .order { display: block; margin-top: 10px; padding: 14px; }
.checkout-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.checkout-actions button { flex: 1 1 auto; }
:is(.checkout-dialog, .topup-dialog) button { min-height: 44px; padding: 10px 16px; font-size: 14px; }
.topup-dialog[open] { display: grid; gap: 8px; }
.topup-dialog[open] :is(h2, h3, p) { margin: 0; }
.topup-dialog h3 { padding-top: 12px; font-size: 16px; }
.topup-dialog button:not(.primary) { color: var(--blue-dark); background: var(--blue-soft); }
.topup-dialog button:last-child { background: var(--paper); color: var(--ink); }

#usdt-checkout[open] { display: grid; gap: 10px; }
#usdt-checkout :is(h2,p) { margin: 0; }
#usdt-checkout code { overflow-wrap: anywhere; user-select: all; background: #f0f4fc; padding: 10px 12px; border-radius: 9px; }
#usdt-checkout strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  :is(.topup-dialog button:not(.primary), .order button, .code-row button):hover:not(:disabled) { background: #e0e8fa; color: var(--blue-dark); }
}
@media (max-width: 600px) {
  .coupon-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coupon-bar label { grid-column: 1 / -1; max-width: none; }
  .coupon-bar button { padding-inline: 8px; }
  #topup-open { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  button, button:hover, button:active { transition: none; transform: none; }
}

#usdt-checkout .wallet-wxpay { background: #137747; }
#usdt-checkout .wallet-alipay { background: #1762ba; }
#usdt-checkout .wallet-wxpay:hover { background: #0f603a; }
#usdt-checkout .wallet-alipay:hover { background: #114e98; }
#usdt-checkout .checkout-actions img { filter: brightness(0) invert(1); }
#checkout-form label:has(select[name=region]) { margin-bottom: 16px; }
