/* One storefront across phones, tablets and desktop; no device detection. */
:root { --store-width: 1440px; }
.language-toolbar { min-height: 44px; display: flex; justify-content: flex-end; align-items: center; padding: 4px max(12px, calc((100% - var(--store-width)) / 2 + 24px)); background: #fff; border-bottom: 1px solid #f0f0f3; }
.language-toolbar select { min-height: 36px; padding: 6px 28px 6px 10px; color: #45455b; border: 1px solid #e4e4ee; border-radius: 6px; max-width: 100%; font-size: 14px; }
.language-option { width: 100%; text-align: left; min-height: 48px; }
.language-option[aria-pressed="true"] { color: var(--primary); }
.auth-row span { overflow-wrap: anywhere; }
.page { min-height: calc(100dvh - 44px); }
#app { width: 100%; }
.page { width: 100%; margin-inline: auto; }
.order-product > div, .identity > div, .ledger-row > div { min-width: 0; }
.order-product img, .avatar { flex-shrink: 0; }
.order-product h2, .identity strong, .ledger-row, .stats strong,
.personal-rows .right, .hint { overflow-wrap: anywhere; }
.order-top { flex-wrap: wrap; gap: 8px; }
.badge { flex-shrink: 0; }
.header .back { display: grid; place-items: center; width: 44px; }
.stepper button, .stepper input { width: 40px; height: 44px; }
.searchbar button { min-height: 44px; }
.searchbar input { height: 44px; }
.purchase-bar { left: 50%; transform: translateX(-50%); z-index: 12; }
.detail-page { padding-bottom: calc(155px + env(safe-area-inset-bottom)); }
.auth-card { width: calc(100% - 32px); max-width: 480px; margin-inline: auto; }
.password-sheet { max-height: 90dvh; overflow-y: auto; }
input, textarea { font-size: 16px; }
.auth-row input { font-size: 16px; }
.hero-product { height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; }
.product img { display: block; }
.stats { gap: 8px; }
.stats strong { font-size: clamp(13px, 3.6vw, 16px); }

@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 16px; }
  .product img { height: auto; aspect-ratio: 4 / 3; }
  .product .info { padding: 14px; }
  .product h2 { font-size: 14px; height: 40px; }
  .brandbar { height: 64px; padding-inline: 24px; }
  .brandbar + .grid { padding-top: 16px; }
  .header { height: 56px; }
  .nav { left: 50%; transform: translateX(-50%); max-width: var(--store-width); }
  .auth-head { height: 200px; padding-top: 58px; }
  .auth-card { margin-top: 32px; padding: 32px; }
  .form-card, .simpleform { max-width: 600px; margin: 24px auto; padding: 24px; }
  .simpleform { min-height: 0; background: #fff; border-radius: 12px; }
  .simpleform input, .simpleform textarea { background: #f7f7f8; }
  .password-sheet { width: min(480px, calc(100% - 48px)); left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); border-radius: 16px; }
  #app:not([data-surface="catalog"]):not([data-surface="detail"]) .page { max-width: 800px; }
  .order-card { padding: 20px; margin: 16px; }
  .order-product img { width: 100px; height: 100px; }
  .order-product h2 { font-size: 16px; }
  .me-head { padding: 28px 24px; }
  .menu-group .menu-row { min-height: 50px; }
  .searchbar { padding: 16px 24px; }
}

@media (min-width: 1024px) {
  .page { max-width: var(--store-width); }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 24px; }
  .brandbar + .grid { padding-top: 24px; }
  .brandbar { margin-bottom: 0; }
  .nav { height: 64px; padding-bottom: 0; box-shadow: 0 -4px 18px #00000005; }
  .nav a { flex-direction: row; gap: 10px; font-size: 14px; }
  .page { padding-bottom: 88px; }
  .detail-page { max-width: 1100px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-content: start; gap: 24px; padding: 0 24px 140px; }
  .detail-page > .header { grid-column: 1 / -1; margin-inline: -24px; }
  .hero-product { border-radius: 12px; aspect-ratio: 1; }
  .detail-info { border-radius: 12px; padding: 32px; }
  .detail-info h1 { font-size: 22px; line-height: 1.5; }
  .detail-info .price { font-size: 28px; }
  .intro { grid-column: 1 / -1; margin-top: 0; border-radius: 12px; padding: 24px; }
  .purchase-bar { max-width: 1100px; display: flex; align-items: center; gap: 32px; padding: 16px 24px; }
  .purchase-summary { flex: 1; min-width: 0; margin-bottom: 0; }
  .purchase-bar > .buy { width: 240px; flex-shrink: 0; }
  .truncate { font-size: 14px; }
}

@media (min-width: 1440px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (hover: hover) and (pointer: fine) {
  .product:hover { box-shadow: 0 6px 20px #00000014; }
  .nav a:hover, .menu-row:hover { background: #f7f7ff; }
}

@media (max-width: 359px) {
  .grid { gap: 8px; padding-inline: 8px; }
  .product img { height: 124px; }
  .auth-card { padding: 20px 16px; }
  .auth-row span { width: 82px; }
  .purchase-summary { gap: 6px; }
  .purchase-summary img { width: 32px; height: 32px; }
  .stepper button, .stepper input { width: 36px; }
}

.regional-heading{max-width:1440px;margin:0 auto;padding:16px 12px 8px}.regional-heading h1{font-size:clamp(18px,2.4vw,26px);line-height:1.45;margin:0;font-weight:700;overflow-wrap:anywhere;color:#333}

.geo-credit{display:inline-block;font-size:11px;color:#666;margin-top:4px}
.language-toolbar{gap:8px;flex-wrap:wrap}.language-toolbar select{min-width:0;max-width:48%}#currency-picker{width:220px}.fx-meta{padding:8px max(12px,calc((100% - 1440px)/2 + 24px));font-size:11px;line-height:1.6;color:#62626e;background:#fafafa;overflow-wrap:anywhere}.fx-sources{display:block}.fx-sources a{color:#62626e}.balance strong{font-size:clamp(14px,2vw,24px);overflow-wrap:anywhere}.stats strong{overflow-wrap:anywhere}.product .price{overflow-wrap:anywhere}

/* Keep rate details and required source links available without a permanent banner. */
.fx-details{position:relative;background:#fff;text-align:right;padding:0 12px}.fx-details>summary{display:inline-flex;align-items:center;justify-content:center;list-style:none;cursor:pointer;width:28px;height:24px;color:#777;font-size:16px}.fx-details>summary::-webkit-details-marker{display:none}.fx-details>summary:focus-visible{outline:2px solid #5b5bf5;outline-offset:2px}.fx-details .fx-meta{text-align:left}.fx-details[open]{padding-bottom:6px}

@media (max-width: 599px) {
  .language-toolbar { min-height: 36px; padding: 3px 8px; gap: 6px; flex-wrap: nowrap; }
  .language-toolbar select { height: 30px; min-height: 30px; padding: 3px 18px 3px 6px; font-size: 12px; border-radius: 5px; text-overflow: ellipsis; }
  .language-toolbar #currency-picker { width: 128px; max-width: 40%; }
  .language-toolbar #language-picker { width: 190px; max-width: calc(60% - 6px); }
}

/* Local flow audit: responsive confirmation and tracking history. */
#repurchase-dialog{width:min(420px,calc(100vw - 32px));max-height:85dvh;overflow:auto;border:0;border-radius:12px;padding:24px;color:#333}
#repurchase-dialog::backdrop{background:#0008}
#repurchase-dialog dl{display:grid;grid-template-columns:1fr 1.5fr;gap:14px 12px;font-size:14px;margin:22px 0}
#repurchase-dialog dd{margin:0;text-align:right;overflow-wrap:anywhere}
.tracking-timeline{padding-left:24px;margin:20px 0;list-style:disc}
.tracking-timeline li{padding:0 0 22px 8px;border-left:1px solid #e3e5ef}
.tracking-timeline time{font-size:12px;color:#888}.tracking-timeline p{margin:8px 0}.tracking-legacy{white-space:pre-line}
.field select{width:100%;padding:12px;border:1px solid #ddd;border-radius:6px;background:white}

/* Compact preferences: one row, with disclosure anchored out of document flow. */
.language-toolbar{position:relative;min-height:38px;padding-top:3px;padding-bottom:3px;gap:6px;flex-wrap:nowrap}
.language-toolbar select{height:30px;min-height:30px;padding:3px 20px 3px 7px;font-size:12px}
.language-toolbar #currency-picker{width:150px;max-width:36%}
.language-toolbar #language-picker{width:185px;max-width:calc(64% - 40px)}
.language-toolbar .fx-details{position:static;padding:0;flex:0 0 28px;background:transparent}
.language-toolbar .fx-details>summary{height:30px;width:28px;font-size:14px}
.language-toolbar .fx-details[open]{padding:0}
.language-toolbar .fx-meta{position:absolute;z-index:50;right:8px;top:100%;width:min(360px,calc(100vw - 16px));padding:10px 12px;border:1px solid #e4e4ee;border-radius:6px;background:#fff}
@media(max-width:600px){
 .language-toolbar{min-height:36px;padding:3px 8px;gap:4px}
 .language-toolbar #currency-picker{width:112px;max-width:35%}
 .language-toolbar #language-picker{width:165px;max-width:calc(65% - 36px)}
}

/* Keep preference state and automatic detection; hide the top selectors. */
.language-toolbar #currency-picker,.language-toolbar #language-picker{display:none}
.language-toolbar{min-height:24px;padding-top:0;padding-bottom:0;border-bottom:0}
.language-toolbar .fx-details>summary{height:24px}

#tracking-search.form-card{padding:16px;background:transparent;border:0;box-shadow:none}
.tracking-site-button{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:48px;padding:12px 20px;box-sizing:border-box;background:#5b5bf5;color:#fff;font-size:15px;font-weight:600;line-height:1.4;border:0;border-radius:10px;text-decoration:none;transition:background .15s}
.tracking-site-button::after{content:'';width:8px;height:8px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(45deg);flex-shrink:0}
.tracking-site-button:hover{background:#4949dc;color:#fff;text-decoration:none}
.tracking-site-button:active{background:#3e3ec4}
.tracking-site-button:focus-visible{outline:3px solid #b7b7ff;outline-offset:3px}

.withdraw-demo-notice{padding:14px 16px;margin-bottom:20px;border:1px solid #ead9a2;border-radius:8px;background:#fff9e8;color:#655019;font-size:13px;line-height:1.7}.withdraw-demo-notice strong{display:block;font-size:15px}.withdraw-demo-notice p{margin:6px 0 0}
