[hidden] { display: none !important; }
button:disabled { opacity: .55; cursor: not-allowed; }
.storefront, .customer-auth {
  --muted: var(--muted-text, #63746f);
  font-size: 16px;
  background: var(--page, #f5f7f7);
  color: var(--text, #172323);
}
.storefront button, .storefront .button, .customer-auth button, .customer-auth .button {
  min-height: 42px; font-size: 14px; border-radius: 9px; padding: 10px 16px;
}
.storefront label, .customer-auth label { font-size: 14px; color: inherit; }
.storefront input, .customer-auth input { font-size: 16px; min-height: 44px; border-radius: 8px; }
.storefront .eyebrow, .customer-auth .eyebrow { font-size: 12px; letter-spacing: 1.6px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; padding: 10px 16px; background: var(--surface,#fff); z-index: 20; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.portal-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px max(24px,calc((100vw - 1120px)/2));
  background: var(--surface,#fff); border-bottom: 1px solid var(--border);
}
.portal-header .brand { font-size: 26px; letter-spacing: -.9px; }
.storefront .header-actions { gap: 20px; }
.auth-actions { display: flex; align-items: center; gap: 20px; }
.sign-in-link { font-size: 14px; font-weight: 600; }
.portal-main { max-width: 1168px; margin: 38px auto 0; padding: 0 24px; }
.shop-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.shop-heading h1 { font-size: clamp(30px,4vw,38px); letter-spacing: -1.2px; margin: 8px 0 10px; }
.shop-heading p { margin: 0; }
.currency-label { flex-shrink: 0; font-size: 14px; color: var(--muted); padding-bottom: 4px; }
.balance-strip {
  display: flex; align-items: center; gap: 32px; padding: 20px 24px; margin-bottom: 24px;
  background: var(--tint-bg,#edf4ef); border: 1px solid var(--tint-line,#dce8df); border-radius: 12px;
}
.balance-strip strong { display: block; font-size: 28px; font-weight: 650; letter-spacing: -.7px; }
.balance-strip p { margin: 0 0 0 auto; font-size: 14px; }
.balance-strip > div > span { font-size: 14px; }
.portal-nav { display: flex; gap: 8px; padding: 4px; margin: 0 0 30px; border-bottom: 1px solid var(--border); }
.storefront .portal-nav button { border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 8px; margin-bottom: 5px; }
.storefront .portal-nav button:hover { color: inherit; background: var(--surface-soft,#eaf0ec); }
.storefront .portal-nav button[aria-current="page"] { background: var(--surface,#fff); color: inherit; border-color: var(--border); box-shadow: 0 1px 3px #00000008; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.section-heading h2 { font-size: 22px; letter-spacing: -.5px; }
.section-heading p { font-size: 14px; margin: 5px 0 0; }
.catalog-controls { display: flex; align-items: center; gap: 10px; }
.search-field { width: 310px; }
.search-field input { width: 100%; background: var(--surface,#fff); }
.catalog-note { font-size: 14px; margin: 0 0 24px; line-height: 1.6; }
.product-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.product-card {
  min-width: 0; min-height: 238px; display: flex; flex-direction: column; gap: 22px; padding: 24px;
  background: var(--surface,#fff); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 2px 6px #00000003; transition: border-color .15s, box-shadow .15s;
}
.product-card:hover { border-color: var(--tint-line,#b9ccc0); box-shadow: 0 6px 22px #00000006; }
.product-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.game-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.stock-label { font-size: 12px; border-radius: 20px; padding: 4px 9px; color: var(--muted); background: var(--surface-soft,#f1f3f2); }
.stock-label.in-stock { color: var(--success-text,#286340); background: var(--success-bg,#edf5ed); }
.product-card h3 { font-size: 20px; line-height: 1.4; font-weight: 650; letter-spacing: -.4px; overflow-wrap: anywhere; margin: 0; }
.product-bottom { display: flex; flex-direction: column; gap: 18px; margin-top: auto; }
.price-block { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.product-card .price { font-size: 26px; font-weight: 650; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.price-block > span { font-size: 14px; }
.product-buy { width: 100%; }
.catalog-empty { grid-column: 1/-1; text-align: center; padding: 56px 24px; border: 1px dashed var(--border); border-radius: 14px; }
.catalog-empty h3 { font-size: 20px; }
.catalog-empty p { margin-bottom: 0; }
.storefront .notice, .customer-auth .notice { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.storefront .error, .customer-auth .error, dialog .error { background: var(--danger-bg,#fff0ee); color: var(--danger-text,#943d35); border: 1px solid var(--danger-line,#f0d4cf); }
.storefront .success { background: var(--success-bg,#edf5ed); color: var(--success-text,#286340); border: 1px solid var(--success-line,#d3e4d5); }
#message { margin-bottom: 20px; }
.lookup-form, .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lookup-form input { width: 260px; }
.storefront .panel { border-radius: 12px; }
.storefront th { font-size: 13px; padding: 14px 20px; }
.storefront td { font-size: 14px; padding: 17px 20px; }
.storefront .badge { font-size: 13px; padding: 5px 10px; }
.storefront .pagination { font-size: 14px; padding: 18px 0; }
.storefront .empty { font-size: 16px; }
.detail-body { padding: 28px; }
.detail-body h2 { font-size: 24px; }
.detail-body .mono { overflow-wrap: anywhere; font-size: 14px; color: var(--muted); }
.account-card { border-top: 1px solid var(--border); padding: 24px 0; }
.account-card summary { cursor: pointer; font-weight: 600; }
.credential { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-soft,#f2f5f1); padding: 16px; border-radius: 8px; font-size: 14px; }
.account-card .actions { margin-top: 16px; }
.account-card > p.muted { font-size: 14px; }
.check-result { margin-top: 20px; }
.check-result h3 { font-size: 16px; }
.check-result dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 14px; }
.check-result dt { color: var(--muted); }
.check-result dd { margin: 0; overflow-wrap: anywhere; }
.portal-main #order-detail { margin-top: 28px; }
.storefront dialog {
  width: 480px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto;
  border: 1px solid var(--border); border-radius: 16px; padding: 30px; color: inherit;
}
.storefront dialog::backdrop { background: var(--backdrop,#142b2580); }
.storefront dialog h1 { font-size: 28px; margin: 10px 0 20px; }
.storefront dialog p { overflow-wrap: anywhere; }
.storefront dialog .actions { justify-content: flex-end; margin-top: 24px; }
.storefront dialog label { margin: 20px 0; }
.checkout-total { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 18px 0; margin-top: 24px; }
.checkout-total strong { font-size: 26px; }
.shop-footer { font-size: 14px; padding: 26px 0; margin-top: 44px; color: var(--muted); }
.shop-footer a { text-decoration: underline; text-underline-offset: 3px; }
.topup-form { display: flex; align-items: flex-end; gap: 16px; padding: 24px; margin: 20px 0; flex-wrap: wrap; }
.topup-form input { width: 180px; }
.payment-row { display: flex; align-items: center; gap: 16px; padding: 20px; margin: 12px 0; flex-wrap: wrap; }
.payment-row > div { flex: 1; }
.payment-qr { display: block; max-width: 100%; height: auto; margin: 20px auto; border-radius: 8px; }
.payment-amount { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }
.payment-address, .payment-reference { overflow-wrap: anywhere; font-size: 13px; }
#ltc-details > .button { display: block; text-align: center; margin-top: 12px; }
.customer-auth { padding: 28px 16px; }
.customer-auth .login-theme { align-self: flex-end; margin: 0 12px 20px; }
.customer-auth .login-brand { margin-bottom: 26px; }
.customer-auth .login-card { width: 450px; max-width: 100%; border-radius: 16px; padding: 34px; border-color: var(--border); }
.customer-auth .login-card h1 { font-size: 30px; margin: 10px 0 12px; }
.customer-auth .login-card p.muted { font-size: 16px; margin: 0 0 26px; }
.customer-auth .stack-form { gap: 18px; }
.customer-auth .stack-form small, .customer-auth .login-card > small { font-size: 13px; color: var(--muted); }
.customer-auth .stack-form img { display: block; max-width: 100%; object-fit: contain; }
.customer-auth .login-card > p { font-size: 14px; }
.customer-auth .login-card > p a { text-decoration: underline; text-underline-offset: 3px; }
.customer-auth .back-to-shop { padding-top: 18px; border-top: 1px solid var(--border); margin-bottom: 12px; }
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .portal-header { padding: 18px 24px; }
  .search-field { width: 260px; }
}
@media (max-width: 600px) {
  .portal-header { padding: 16px; flex-wrap: nowrap; gap: 12px; }
  .portal-header .brand { font-size: 23px; }
  .storefront .header-actions { gap: 12px; flex-wrap: nowrap; }
  .auth-actions { gap: 12px; }
  .storefront .signup-link { display: none; }
  .storefront .theme-toggle { font-size: 0; width: 42px; padding: 8px; }
  .storefront .theme-toggle { gap: 0; }
  .storefront .theme-toggle::before { width: 20px; height: 20px; }
  .portal-main { margin-top: 28px; padding: 0 16px; }
  .shop-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .shop-heading h1 { font-size: 32px; }
  .currency-label { font-size: 13px; }
  .balance-strip { align-items: flex-start; flex-direction: column; gap: 10px; padding: 20px; }
  .balance-strip p { margin: 0; }
  .portal-nav { overflow: auto; gap: 0; margin-bottom: 24px; }
  .storefront .portal-nav button { padding: 10px 12px; white-space: nowrap; }
  .section-heading { align-items: stretch; flex-direction: column; gap: 16px; }
  .catalog-controls { width: 100%; }
  .search-field { width: auto; flex: 1; min-width: 0; }
  .product-grid { grid-template-columns: 1fr; gap: 16px; }
  .product-card { min-height: 220px; padding: 22px; }
  .product-bottom { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
  .price-block { flex-direction: column; gap: 0; align-items: flex-start; }
  .product-buy { width: auto; min-width: 128px; }
  .lookup-form input { width: auto; flex: 1; min-width: 0; }
  .detail-body { padding: 20px; }
  .check-result dl { grid-template-columns: 1fr; }
  .shop-footer { gap: 16px; flex-wrap: wrap; }
  .customer-auth .login-card { padding: 26px; }
  .storefront dialog { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { .product-card { transition: none; } }
