:root {
  --account-bg: #08090e;
  --account-surface: #151824;
  --account-surface-2: #1d2130;
  --account-gold: #ffc21c;
  --account-gold-soft: #ffe39a;
  --account-text: #f8fafc;
  --account-muted: #a5a8b3;
  --account-border: #34394a;
  --account-danger: #ff5a4f;
}

.account-page { width: min(100%, var(--phone-max-width, 430px)); min-height: 100dvh; margin: 0 auto; padding-bottom: calc(88px + env(safe-area-inset-bottom)); overflow: visible; background: var(--account-bg); color: var(--account-text); }
.account-page button { cursor: pointer; touch-action: manipulation; }
.account-page button:focus-visible, .credential-modal button:focus-visible { outline: 3px solid var(--account-gold); outline-offset: 3px; }
.account-header { min-height: 52px; padding: max(4px, env(safe-area-inset-top)) 10px 4px; display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--account-bg) 92%, transparent); backdrop-filter: blur(18px); }
.account-header > button { width: 44px; height: 44px; border: 1px solid var(--account-border); border-radius: 10px; background: var(--account-surface); color: var(--account-gold); font-size: 26px; }
.account-header > button svg { width: 20px; }
.account-header h1 { margin: 0; font-size: 17px; }
.account-header nav { flex: 1; display: flex; justify-content: center; gap: 6px; }
.account-header nav button { min-height: 44px; padding-inline: 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--account-muted); font-size: 15px; font-weight: 800; }
.account-header nav button.active { color: var(--account-gold-soft); border-color: var(--account-gold-soft); }

.account-bottom-nav { position: fixed; z-index: 80; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, var(--phone-max-width, 430px)); min-height: calc(64px + env(safe-area-inset-bottom)); padding: 6px 20px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(2, 1fr); background: rgba(9, 10, 14, .96); border-top: 1px solid #252834; backdrop-filter: blur(20px); }
.account-bottom-nav button { min-height: 52px; border: 0; background: transparent; color: #8c9098; display: grid; place-items: center; align-content: center; gap: 1px; font-size: 12px; font-weight: 700; }
.account-bottom-nav svg { width: 24px; height: 24px; }
.account-bottom-nav button.active { color: var(--account-gold); }
.home { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }

.mine-hero { margin: 12px; padding: 16px 14px 14px; border-radius: 22px; background: radial-gradient(circle at 100% 0, rgba(131, 41, 124, .65), transparent 48%), radial-gradient(circle at 0 0, rgba(21, 111, 111, .6), transparent 43%), #10121b; border: 1px solid rgba(255,255,255,.08); }
.mine-user { display: flex; gap: 12px; align-items: center; }
.mine-user img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.25); }
.mine-user h1 { margin: 0 0 2px; font-size: 20px; }
.mine-user button { min-height: 44px; display: flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--account-muted); font: 600 13px ui-monospace, monospace; padding: 0; }
.mine-user button svg { width: 16px; }
.wallet-summary { margin-top: 14px; padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--account-border); border-radius: 16px; overflow: hidden; }
.wallet-summary article { min-width: 0; padding: 2px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 44px auto; align-items: center; column-gap: 7px; background: var(--account-surface); position: relative; }
.wallet-summary h2 { grid-column: 1 / -1; margin: 0; font-size: 15px; }
.wallet-summary strong { display: block; margin: 0; color: var(--account-gold); font-size: 26px; font-variant-numeric: tabular-nums; }
.wallet-summary .member-status { font-size: 21px; line-height: 1; }
.wallet-summary p { grid-column: 1 / -1; grid-row: 3; min-height: 18px; margin: 1px 0 0; color: var(--account-muted); font-size: 10px; line-height: 1.35; }
.wallet-summary button { grid-column: 2; grid-row: 2; min-width: 56px; min-height: 44px; padding: 4px 0; border: 0; background: transparent; color: #452000; font-size: 12px; font-weight: 800; }
.wallet-summary button span { min-height: 36px; padding-inline: 7px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(90deg, #ffb800, #ffe39a); transition: filter .2s ease, transform .2s ease; }
.wallet-summary button:hover span { filter: brightness(1.04); }
.wallet-summary button:active span { transform: scale(.97); }
.mine-grid { margin: 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.mine-grid > button { min-width: 0; min-height: 92px; padding: 10px 4px; border: 1px solid rgba(255,255,255,.06); border-radius: 14px; background: linear-gradient(145deg, #171b27, #12141e); color: var(--account-text); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mine-grid .mine-glyph { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 6px; color: #5a2a00; background: linear-gradient(145deg, #fff095, #ffac00); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); font-size: 21px; font-weight: 900; }
.mine-grid .mine-glyph svg { width: 22px; height: 22px; }
.mine-grid strong { max-width: 100%; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine-grid small { max-width: 100%; margin-top: 2px; color: var(--account-muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-preview { margin: 18px 12px; }
.order-preview h2 { font-size: 18px; }
.account-empty { min-height: 120px; display: grid; place-items: center; color: #6f737d; }
.order-row { width: 100%; min-height: 68px; margin-bottom: 8px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; text-align: left; border: 1px solid var(--account-border); border-radius: 15px; background: var(--account-surface); color: var(--account-text); }
.order-row span { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.order-row span:last-child { text-align: right; }
.order-row small { color: var(--account-muted); overflow: hidden; text-overflow: ellipsis; }
.order-row b { color: var(--account-gold-soft); font-variant-numeric: tabular-nums; }
.order-row .order-status { font-weight: 750; }
.order-row .order-status.pending { color: var(--account-gold-soft); }
.order-row .order-status.confirming { color: #8bc5ff; }
.order-row .order-status.paid { color: #83efc5; }
.order-row .order-status.expired, .order-row .order-status.cancelled { color: #8f94a0; }
.order-row .order-status.exception { color: #ffaaa4; }

.store-page { background: radial-gradient(circle at 20% 0, rgba(117, 48, 10, .42), transparent 30%), var(--account-bg); }
.store-banner { margin: 5px 10px 12px; min-height: 88px; padding: 14px; display: flex; align-items: flex-end; border-radius: 14px; color: #58300b; background: linear-gradient(110deg, rgba(255,226,171,.96), rgba(255,244,219,.78)), url("./assets00/original-app/image__drama__coin_wallet_bg.webp") center/cover; box-shadow: 0 10px 24px rgba(0,0,0,.22); }
.membership-store .store-banner { background: linear-gradient(110deg, rgba(255,227,177,.96), rgba(255,244,221,.55)), url("./assets00/original-app/figma__vip__vip_user_banner.webp") center/cover; }
.store-banner strong { font-size: 20px; }
.store-banner p { margin: 3px 0 0; font-size: 12px; font-weight: 700; }
.benefits { margin: 0 10px 12px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; text-align: center; }
.benefits h2 { grid-column: 1/-1; margin: 0 0 4px; color: var(--account-gold); font-size: 17px; }
.benefits div { min-width: 0; }
.benefits span { width: 40px; height: 40px; margin: auto; display: grid; place-items: center; border-radius: 12px; background: #2b2419; color: var(--account-gold-soft); font-weight: 900; }
.benefits span svg { width: 22px; height: 22px; }
.benefits strong { display: block; margin-top: 5px; font-size: 10px; }
.product-grid { padding: 0 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.product-card { position: relative; min-width: 0; min-height: 112px; padding: 11px 5px 8px; display: flex; flex-direction: column; align-items: center; border: 1px solid #5f523e; border-radius: 12px; color: var(--account-text); background: linear-gradient(155deg, #201d18, #181612); transition: border-color .2s ease, transform .2s ease, background .2s ease; }
.product-card.active { border-color: var(--account-gold-soft); background: linear-gradient(155deg, #5e2c1e, #29190e); box-shadow: 0 0 0 2px rgba(255,194,28,.12); }
.product-card:active { transform: scale(.98); }
.product-card strong { max-width: 100%; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card b { margin-top: 8px; font-size: 21px; color: #fff3d6; font-variant-numeric: tabular-nums; }
.product-card del { color: var(--account-muted); font-size: 11px; }
.product-card small { min-height: 24px; max-width: 100%; margin-top: auto; color: var(--account-gold-soft); font-size: 9px; line-height: 1.3; overflow: hidden; }
.network-select { margin: 14px 10px 88px; }
.network-select h2 { margin-block: 0 8px; font-size: 15px; }
.network-select > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.network-select button { min-height: 44px; border: 1px solid var(--account-border); border-radius: 10px; background: var(--account-surface); color: var(--account-text); font-size: 13px; font-weight: 800; transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease; }
.network-select button.active { border-color: var(--account-gold); background: rgba(255, 194, 28, .14); color: var(--account-gold-soft); box-shadow: inset 0 0 0 1px rgba(255, 194, 28, .28); }
.network-select p { color: var(--account-muted); font-size: 12px; }
.store-cta { position: fixed; z-index: 75; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, var(--phone-max-width, 430px)); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, #090a0f 24%); }
.store-cta button { width: 100%; min-height: 46px; border: 0; border-radius: 14px; background: linear-gradient(90deg, #ffd980, #e9ad3e); color: #4b2700; font-size: 16px; font-weight: 900; }
.store-cta button:disabled { opacity: .55; cursor: not-allowed; }

.checkout-page { padding-bottom: 120px; }
.checkout-page .v2-account-card { margin: 16px 25px; }
.checkout-page .v2-account-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.checkout-page .v2-account-actions button { min-width: 0; padding-inline: 10px; white-space: normal; line-height: 1.25; }
.checkout-product { margin: 25px; padding: 22px; display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 16px; border: 1px solid var(--account-border); border-radius: 20px; background: var(--account-surface); }
.checkout-product > span { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: white; background: #22a988; font-size: 13px; font-weight: 900; }
.checkout-product h2, .checkout-product p { margin: 0; }
.checkout-product p { margin-top: 7px; color: var(--account-muted); }
.checkout-product > strong { color: var(--account-gold); font-size: 22px; }
.checkout-warning { margin: 14px 25px 0; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 14px; background: #151821; color: var(--account-muted); font-size: 14px; line-height: 1.45; }

.payment-page {
  padding-bottom: 28px;
  color: var(--account-text);
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 194, 28, .12), transparent 32%),
    var(--account-bg);
}
.payment-page .account-header { background: color-mix(in srgb, var(--account-bg) 92%, transparent); }
.payment-page .account-header h1 { color: var(--account-text); }
.payment-card {
  margin: 4px 14px 12px;
  padding: 14px 14px 16px;
  border: 1px solid var(--account-border);
  border-top: 4px solid var(--account-gold);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(29, 33, 48, .98), rgba(18, 21, 31, .98));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.payment-card dl { margin: 0; }
.payment-card dl > div {
  min-height: 44px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.payment-card dl > div:last-child { border-bottom: 0; }
.payment-card dt { padding-top: 3px; color: var(--account-muted); font-size: 14px; line-height: 1.35; }
.payment-card dd { min-width: 0; margin: 0; color: var(--account-text); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.payment-card dd button {
  position: relative;
  min-width: 48px;
  min-height: 32px;
  margin-left: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 194, 28, .26);
  border-radius: 9px;
  color: var(--account-gold-soft);
  background: rgba(255, 194, 28, .09);
  font-size: 13px;
  font-weight: 800;
  transition: background .2s ease, transform .2s ease;
}
.payment-card dd button::after { content: ""; position: absolute; inset: -6px -4px; }
.payment-card dd button:hover { background: rgba(255, 194, 28, .15); }
.payment-card dd button:active { transform: scale(.97); }
.payment-amount { color: var(--account-gold-soft) !important; font-size: 20px !important; font-weight: 850; font-variant-numeric: tabular-nums; }
.network-pill { display: inline-block; padding: 6px 14px; border-radius: 9px; color: #3f2400; background: linear-gradient(90deg, #ffb800, #ffe39a); font-weight: 900; line-height: 1.2; }
.payment-qr {
  width: min(56vw, 228px);
  aspect-ratio: 1;
  margin: 12px auto 10px;
  padding: 9px;
  border: 1px solid rgba(255, 227, 154, .68);
  border-radius: 15px;
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}
.payment-qr svg { display: block; width: 100%; height: 100%; }
.countdown { margin: 8px 0 0; text-align: center; color: var(--account-muted); font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.payment-status { margin: 10px auto 0; padding: 10px 12px; text-align: center; border: 1px solid rgba(255, 194, 28, .2); border-radius: 11px; color: var(--account-gold-soft); background: rgba(255, 194, 28, .1); font-size: 14px; font-weight: 800; }
.payment-status.paid { border-color: rgba(53, 213, 154, .28); color: #83efc5; background: rgba(53, 213, 154, .1); }
.payment-status.confirming { border-color: rgba(94, 174, 255, .28); color: #8bc5ff; background: rgba(94, 174, 255, .1); }
.payment-status.expired, .payment-status.cancelled, .payment-status.exception { border-color: rgba(255, 90, 79, .28); color: #ffaaa4; background: rgba(255, 90, 79, .1); }
.payment-steps { margin: 0 14px; padding: 14px 16px; border: 1px solid var(--account-border); border-radius: 16px; background: rgba(21, 24, 36, .72); }
.payment-steps h2 { margin: 0 0 8px; color: var(--account-gold-soft); font-size: 18px; line-height: 1.3; }
.payment-steps p { margin: 7px 0; display: flex; align-items: flex-start; gap: 9px; color: #d8dbe3; font-size: 14px; font-weight: 650; line-height: 1.4; }
.payment-steps b { flex: 0 0 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #4a2900; background: var(--account-gold); font-size: 12px; line-height: 1; }

.account-loading { min-height: 70dvh; display: grid; place-items: center; align-content: center; gap: 18px; color: var(--account-muted); }
.account-loading button { min-width: 120px; min-height: 48px; border: 0; border-radius: 24px; background: var(--account-gold); font-weight: 800; }
.credential-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom)); }
.credential-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.82); backdrop-filter: blur(5px); }
.credential-card { position: relative; width: min(100%, 320px); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px 20px 20px; border: 1px solid #6a6656; border-radius: 24px; text-align: center; color: var(--account-text); background: #12151c; box-shadow: 0 24px 72px #000; }
.credential-close { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; color: var(--account-muted); background: #20242e; font-size: 24px; }
.credential-logo { width: min(180px, 70%); min-height: 32px; margin: 0 auto 6px; display: grid; place-items: center; }
.credential-logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 48px; object-fit: contain; }
.credential-card h2 { margin: 0; font-size: 22px; line-height: 1.3; }
.credential-card p { max-width: 280px; margin: 8px auto 0; color: var(--account-muted); font-size: 14px; line-height: 1.45; }
.credential-qr { width: min(52vw, 184px); margin: 14px auto; padding: 8px; border-radius: 14px; background: white; }
.credential-qr svg { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.credential-card > strong { display: block; color: var(--account-gold-soft); font: 700 14px ui-monospace, monospace; }
.credential-save { width: 100%; min-height: 48px; margin-top: 14px; border: 0; border-radius: 24px; background: linear-gradient(90deg, #ffbd18, #ffdf79); color: #4f2800; font-size: 16px; font-weight: 900; }
.account-toast { position: fixed; z-index: 1200; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 48px); padding: 13px 22px; border-radius: 24px; color: white; background: rgba(26,28,35,.96); box-shadow: 0 12px 38px rgba(0,0,0,.4); text-align: center; }

@media (max-width: 420px) {
  .wallet-summary { padding: 8px; }
  .wallet-summary article { padding-inline: 8px; }
  .mine-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits { grid-template-columns: repeat(5, 1fr); }
  .benefits h2 { grid-column: 1/-1; }
  .checkout-page .v2-account-card, .checkout-product, .checkout-warning { margin-inline: 14px; }
  .checkout-page .v2-account-actions { grid-template-columns: 1fr; }
  .payment-card dl > div { grid-template-columns: 78px minmax(0, 1fr); }
}

@media (orientation: landscape) and (max-height: 540px) {
  .mine-grid { grid-template-columns: repeat(4, 1fr); }
  .mine-grid > button { min-height: 105px; }
  .credential-card { max-width: 320px; padding-block: 18px; }
  .credential-logo { font-size: 44px; }
  .credential-qr { width: 150px; margin-block: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .account-page *, .credential-modal * { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
