:root {
  --wallet-base: #16443b;
  --wallet-accent: #386658;
  --wallet-ink: #fff;
}
.wallet-dialog [hidden], .brand-field[hidden], .brand-lockup [hidden] { display: none !important; }
.balance-card {
  color: var(--wallet-ink);
  background-color: var(--wallet-base);
  background-image: linear-gradient(109deg, var(--wallet-base) 32%, var(--wallet-accent));
}
.balance-card .balance-label { color: inherit; }
.brand-lockup { display: flex; align-items: center; min-width: 0; gap: 9px; }
.brand-lockup [data-brand-title] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-lockup img { width: auto; height: 23px; max-width: min(150px,100%); object-fit: contain; object-position: left center; }
.card-issuer { min-height: 23px; margin-bottom: 15px; }
[data-wallet-background="solid"] .balance-card { background-image: none; }
[data-wallet-background="solid"] .balance-waves, [data-wallet-background="photo"] .balance-waves { display: none; }
[data-wallet-background="photo"] .balance-card {
  color: #fff;
  background-image: linear-gradient(90deg,#09120ed6 0%,#09120eba 53%,#05100a28 100%), var(--wallet-cover);
  background-size: cover; background-position: center, 50% var(--cover-position,50%);
}
.studio-open { align-items: center; gap: 10px; padding: 11px 15px; margin-top: 17px; font-size: 14px; font-weight: 600; border: 1px solid #a9b1a0; border-radius: 100px; background: transparent; }
.studio-open:hover { background: #eceee2; border-color: #737e69; }
.studio-open .icon { width: 17px; height: 17px; }
.studio-open .icon:last-child { width: 15px; margin-left: 8px; }
.market-open { width: 100%; align-items: center; gap: 10px; min-height: 38px; padding: 8px 11px; border: 1px solid #c8d0c0; border-radius: 9px; background: #e8ede1; color: #243d31; font-size: 13px; font-weight: 620; }
.market-open:hover { background: #dde6d5; }
.market-open .icon { width: 17px; height: 17px; }
.market-open .icon:last-child { margin-left: auto; }
.demo-actions { margin-bottom: 7px; }
.demo-device .history-head { margin-top: 13px; justify-content: space-between; }
.all-history { align-items: center; color: #40564a; background: none; padding: 4px 1px; min-height: 25px; font: 570 11px/1.2 Onest,Arial,sans-serif; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.all-history:hover { color: #111c15; }

/* Native dialogs stay above the scroll-driven scene. Their contents scroll independently. */
html:has(.wallet-dialog[open]) { overflow: hidden; }
.wallet-dialog {
  position: fixed; inset: 0; margin: auto; padding: 0; width: min(850px,calc(100% - 44px)); max-width: none;
  max-height: min(90dvh,850px); color: #20271f; background: #f9f9f2; border: 1px solid #cbd0c1;
  border-radius: 23px; box-shadow: 0 30px 100px #101b15a8; overflow: hidden;
}
.wallet-dialog[open] { display: flex; flex-direction: column; }
.wallet-dialog::backdrop { background: #0d1712a8; }
.wallet-dialog button, .wallet-dialog select, .wallet-dialog input { font-family: inherit; }
.wallet-dialog button { touch-action: manipulation; }
.wallet-dialog h2:focus, .wallet-dialog h2:focus-visible { outline: none; }
.dialog-head { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 15px; padding: 20px 24px; border-bottom: 1px solid #dddfd4; }
.dialog-head h2 { font-size: clamp(23px,3.25vw,32px); font-weight: 570; line-height: 1.03; letter-spacing: -.053em; }
.dialog-icon { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border: 1px solid #d4d9cd; background: transparent; color: #344333; border-radius: 50%; }
.dialog-icon:hover { background: #e9ecdf; }
.dialog-icon .icon { width: 17px; height: 17px; }
.dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.dialog-foot, .payment-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dialog-foot { padding: 14px 24px; border-top: 1px solid #dddfd4; flex: none; }
.action-primary { display: inline-flex; justify-content: center; align-items: center; gap: 13px; min-height: 42px; padding: 10px 19px; background: #202b22; color: #fcfcf4; border-radius: 100px; font-size: 14px; font-weight: 580; }
.action-primary:hover { background: #364534; }
.action-primary .icon, .subtle-button .icon { width: 16px; height: 16px; }
.subtle-button { display: inline-flex; align-items: center; gap: 7px; background: transparent; padding: 6px 0; color: #465d4f; font-size: 13px; font-weight: 580; text-decoration: underline; text-underline-offset: 3px; }
.subtle-button:hover { color: #17291f; }
.dialog-label { font: 11px/1.4 var(--mono); color: #536053; }
.studio-layout { display: grid; grid-template-columns: .97fr 1fr; align-items: start; }
.studio-preview {
  position: sticky; top: 0; align-self: stretch; min-height: 218px; display: grid; align-content: center; padding: 28px; isolation: isolate;
  background-color: #e4e9dd; background-image: linear-gradient(#fafbf525 1px,transparent 1px),linear-gradient(90deg,#fafbf525 1px,transparent 1px),radial-gradient(ellipse at 78% 95%,#c1ccba,transparent 73%); background-size: 22px 22px,22px 22px,cover;
}
.studio-preview > .dialog-label { position: absolute; left: 25px; top: 18px; }
#studio-preview-card { width: 100%; max-width: 370px; margin: auto; }
#studio-preview-card .balance-card { height: auto; aspect-ratio: 1.95; min-height: 137px; padding: 19px 20px; box-shadow: 0 14px 25px -14px #263c3080, inset 0 0 0 1px #ffffff33; }
#studio-preview-card .balance-card strong { font-size: clamp(38px,4.2vw,53px); }
.studio-controls { padding: 22px 25px; display: grid; align-content: start; gap: 18px; min-width: 0; }
.dialog-field, .control-title, .studio-fields legend { font-size: 13px; font-weight: 620; color: #303b31; }
.dialog-field { display: grid; gap: 7px; min-width: 0; }
.dialog-field input:not([type="range"]), .dialog-field select, .color-entry {
  width: 100%; min-width: 0; min-height: 40px; padding: 8px 11px; border: 1px solid #c5cdbc; border-radius: 8px;
  background: #fffef8; color: #20271f; font-size: 14px; font-weight: 460;
}
.dialog-field select { text-overflow: ellipsis; }
.dialog-field input[aria-invalid="true"], .color-entry:has([aria-invalid="true"]) { border-color: #ad483b; }
.wallet-dialog input:focus-visible, .wallet-dialog select:focus-visible { outline-width: 2px; outline-offset: 2px; }
.studio-fields { min-width: 0; margin: 0; border: 0; padding: 0; }
.studio-fields legend { padding: 0; margin-bottom: 8px; }
.asset-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 3px; }
.asset-picker { display: inline-flex; position: relative; align-items: center; gap: 8px; min-height: 36px; padding: 7px 12px; border: 1px solid #b5c0ae; border-radius: 8px; background: #f0f3e9; font-size: 13px; font-weight: 580; cursor: pointer; }
.asset-picker:hover { background: #e4ebdc; }
.asset-picker .icon { width: 16px; height: 16px; }
.asset-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.asset-picker input::file-selector-button { cursor: pointer; }
.asset-picker:focus-within { outline: 2px solid #1678ad; outline-offset: 2px; }
.file-note, .field-error, .storage-notice { font-size: 12px; line-height: 1.4; }
.file-note { color: #626d60; overflow-wrap: anywhere; }
.field-error, .file-note.invalid { color: #903b30; }
.field-error { margin-top: 7px; }
.storage-notice { padding: 0 24px 8px; color: #5c675b; }
.color-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 9px; }
.color-field { font-size: 11px; color: #626b5f; }
.color-entry { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 3px 7px; }
.color-entry input[type="color"] { flex: none; width: 25px; height: 26px; border: none; background: none; padding: 1px; cursor: pointer; }
.color-entry input[type="color"]::-webkit-color-swatch-wrapper { padding: 1px; }
.color-entry input[type="color"]::-webkit-color-swatch { border-radius: 50%; border: 1px solid #15221933; }
.color-entry input:not([type="color"]) { width: 100%; min-width: 0; padding: 3px 0; border: 0; background: transparent; color: #2b372d; font: 12px var(--mono); }
.studio-presets { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.studio-presets button, .amount-options button { display: inline-flex; align-items: center; gap: 5px; border-radius: 100px; background: #e9eddf; border: 1px solid transparent; font-size: 11px; padding: 4px 7px; }
.studio-presets button[aria-pressed="true"], .amount-options button[aria-pressed="true"] { border-color: #889985; }
.studio-presets button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #245441; }
.studio-presets [data-preset="clay"]::before { background: #914d38; }
.studio-presets [data-preset="indigo"]::before { background: #505687; }
.background-modes { display: flex; gap: 3px; padding: 3px; background: #e9ece0; border-radius: 9px; }
.background-modes label { flex: 1; position: relative; text-align: center; cursor: pointer; }
.background-modes input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.background-modes span { display: grid; align-content: center; border-radius: 6px; padding: 5px 3px; min-height: 31px; font-size: 12px; line-height: 1.2; }
.background-modes input:checked + span { background: #fffef8; font-weight: 610; box-shadow: 0 1px 3px #26372426; }
.background-modes input:focus-visible + span { outline: 2px solid #1678ad; }
.photo-controls { margin-top: 10px; }
.crop-control { display: grid; margin-top: 8px; gap: 4px; color: #546053; font-size: 11px; }
.crop-control input { width: 100%; accent-color: #335a47; }
.wallet-surface-option { display: flex; align-items: center; gap: 8px; min-height: 34px; margin-top: 5px; color: #465541; font-size: 12px; cursor: pointer; }
.wallet-surface-option input { width: 16px; height: 16px; margin: 0; accent-color: #31503c; }
[data-branded-wallet] {
  --wallet-surface: linear-gradient(115deg,var(--wallet-base) 15%,var(--wallet-accent));
}
[data-branded-wallet][data-wallet-background="solid"] { --wallet-surface: linear-gradient(var(--wallet-base),var(--wallet-base)); }
[data-branded-wallet][data-wallet-background="photo"] { --wallet-surface: var(--wallet-cover); }
[data-branded-wallet] :is(.demo-device,.market-body,.studio-preview) {
  background-color: #f4f5eb;
  background-image: linear-gradient(135deg,#fffff8e8,#fffff8cf),var(--wallet-surface);
  background-position: center,50% var(--cover-position,50%); background-size: cover;
}
[data-branded-wallet] .studio-preview { background-image: linear-gradient(125deg,#fffff8a6,#fffff89e),var(--wallet-surface); }
[data-branded-wallet] .market-open, [data-branded-wallet] .market-dialog .action-primary { color: var(--wallet-ink); background: var(--wallet-base); border-color: transparent; }
[data-branded-wallet] .device-top > span .icon { color: color-mix(in srgb,var(--wallet-accent) 60%,#172b1e); }

.market-dialog { width: min(690px,calc(100% - 44px)); }
.market-dialog:not([data-view="catalog"]) { width: min(555px,calc(100% - 44px)); }
.market-heading { display: flex; gap: 10px; align-items: center; min-width: 0; }
.market-body { padding: 18px 24px 24px; }
.market-account { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 15px; border-radius: 11px; color: var(--wallet-ink); background: var(--wallet-base); }
.market-account .brand-lockup { font-size: 13px; font-weight: 590; }
.market-account .brand-lockup img { height: 19px; max-width: min(112px,100%); }
.market-account > span:last-child { flex-shrink: 0; display: flex; gap: 6px; align-items: baseline; font-size: 12px; }
.market-account strong { font-size: 17px; font-weight: 600; letter-spacing: -.035em; }
.market-filters { display: flex; flex-wrap: wrap; gap: 5px; margin: 19px 0 13px; }
.market-filters button { padding: 7px 12px; min-height: 34px; border-radius: 100px; border: 1px solid #cdd4c5; background: transparent; font-size: 12px; font-weight: 550; }
.market-filters button[aria-pressed="true"] { background: #29392c; border-color: #29392c; color: #fffef7; }
.service-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.service-tile { display: grid; grid-template-columns: 1fr auto; align-content: space-between; gap: 17px 4px; padding: 14px; min-height: 138px; border-radius: 15px; background: #fffef8; border: 1px solid #d5dbcd; text-align: left; }
.service-tile:hover, .service-tile:focus-visible { background: #f0f3e9; border-color: #a7b6a2; }
.service-symbol { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; background: #e0ebd8; color: #2e5943; }
.service-symbol .icon { width: 23px; height: 23px; }
.service-symbol.mint { background: #d9ecdd; color: #2c6147; }
.service-symbol.clay { background: #f8dfcf; color: #8a422c; }
.service-symbol.blue { background: #dfe9f4; color: #405e80; }
.service-symbol.sand { background: #f1e7cf; color: #775e2e; }
.service-symbol.lilac { background: #e7e2f1; color: #66527c; }
.service-symbol.lime { background: #e8eccf; color: #5f6933; }
.service-tile > .icon { grid-column: 2; grid-row: 1; width: 15px; height: 15px; color: #707d6c; margin-top: 2px; }
.service-caption { display: grid; gap: 4px; grid-column: 1 / -1; }
.service-caption strong { font-size: clamp(15px,1.4vw,18px); letter-spacing: -.035em; font-weight: 580; line-height: 1.15; }
.service-caption small { color: #647061; font-size: 12px; }
.service-intro { display: flex; align-items: flex-start; gap: 12px; margin: 23px 0 18px; }
.service-intro .service-symbol { width: 43px; height: 43px; }
.service-intro h3, .ticket-title { font-size: 22px; font-weight: 570; letter-spacing: -.04em; }
.service-intro p { margin-top: 3px; font-size: 13px; line-height: 1.4; color: #5a6558; }
.payment-fields { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,.85fr); gap: 13px; }
.amount-entry { position: relative; display: block; }
.amount-entry b { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: 14px; }
.dialog-field .amount-entry input { padding-right: 29px; }
.amount-entry input::-webkit-inner-spin-button { -webkit-appearance: none; }
.amount-entry input:read-only { background: #edf0e6; }
.amount-options { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.amount-options button { padding: 6px 10px; font-size: 12px; }
.fx-quote { background: #eaf0e5; color: #36523e; margin-top: 13px; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.payment-foot { border-top: 1px solid #dee2d6; padding-top: 15px; margin-top: 20px; }
.payment-foot > span { font-size: 12px; color: #5b685b; }
.ticket-title { margin: 23px 0 12px; }
.ticket-lines > div, .full-history li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; border-bottom: 1px solid #e1e5d9; padding: 11px 0; font-size: 14px; }
.ticket-lines > div:last-child { border-bottom: 0; }
.ticket-lines dt { color: #576454; }
.ticket-lines dd, .full-history b { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.receipt-status { display: flex; align-items: center; gap: 8px; margin: 24px 0 5px; color: #355c43; font-size: 13px; font-weight: 590; }
.receipt-status .icon { width: 21px; height: 21px; padding: 3px; background: #dcebdc; border-radius: 50%; }
.ticket-total { font-size: 44px; letter-spacing: -.065em; line-height: 1.08; font-weight: 570; margin: 7px 0 15px; }
.full-history { list-style: none; padding: 0; margin: 13px 0 0; }
.full-history :is(li,button) > span { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.full-history strong { font-weight: 560; }.full-history small { color: #636e60; font-size: 12px; }
.full-history b { flex: none; }
.full-history li:has(.history-receipt) { padding: 0; }
.history-receipt { display: grid; grid-template-columns: minmax(0,1fr) auto 15px; gap: 9px; align-items: center; width: 100%; padding: 11px 0; text-align: left; background: transparent; font-size: inherit; }
.history-receipt > .icon { width: 14px; height: 14px; color: #586955; }
.history-receipt:hover strong { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width:699px) {
  .enhanced .demo-copy .brand-settings.js-only { display: none !important; }
  .studio-open { margin-top: 11px; padding: 8px 13px; min-height: 36px; font-size: 13px; }
  .demo .lead { max-width: 410px; }
  .demo-device .history-head { margin-top: 7px; }
  .demo-actions { margin-block: 8px 5px; }
  .market-open { min-height: 34px; padding-block: 6px; font-size: 12px; }
  .studio-dialog, .market-dialog, .market-dialog:not([data-view="catalog"]) { width: min(520px,calc(100% - 20px)); max-height: 94dvh; border-radius: 17px; }
  .dialog-head { padding: 13px 15px; gap: 8px; }.dialog-head h2 { font-size: clamp(20px,5.2vw,25px); }
  .dialog-icon { width: 34px; height: 34px; }.market-heading { gap: 6px; }
  .studio-layout { grid-template-columns: minmax(0,1fr); }
  .studio-preview { position: relative; min-height: 0; padding: 26px 18px 13px; }
  .studio-preview > .dialog-label { top: 8px; left: 15px; font-size: 10px; }
  #studio-preview-card { max-width: 285px; }
  #studio-preview-card .balance-card { min-height: 0; height: 116px; padding: 11px 15px; }
  #studio-preview-card .card-issuer { margin-bottom: 5px; }
  #studio-preview-card .balance-card strong { font-size: 36px; }
  .studio-controls { padding: 15px; gap: 14px; }
  .dialog-field input:not([type="range"]), .dialog-field select { font-size: 16px; }
  .dialog-foot { padding: 10px 15px; gap: 6px; }
  .dialog-foot .subtle-button { font-size: 12px; }.action-primary { min-height: 39px; padding: 9px 15px; }
  .market-body { padding: 12px 14px 17px; }
  .market-account { padding: 9px 10px; }.market-account > span:last-child { gap: 4px; }.market-account strong { font-size: 15px; }
  .market-filters { gap: 4px; margin: 13px 0 10px; }.market-filters button { padding: 5px 9px; min-height: 32px; }
  .service-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .service-tile { padding: 11px; min-height: 115px; gap: 10px; border-radius: 11px; }
  .service-symbol { width: 34px; height: 34px; border-radius: 10px; }.service-symbol .icon { width: 20px; height: 20px; }
  .service-caption { gap: 3px; }.service-caption small { font-size: 11px; }
  .payment-fields { grid-template-columns: minmax(0,1fr); gap: 11px; }
}
@media (max-width:355px) {
  .market-account > span:last-child { display: grid; gap: 0; text-align: right; }
  .service-tile { padding: 9px; gap: 6px; }.service-caption strong { font-size: 14px; }
  .dialog-foot .subtle-button { font-size: 11px; }
  .wallet-dialog .payment-foot { gap: 8px; }
}
@media (max-width:699px) and (min-height:675px) {
  .studio-layout { scroll-padding-top: 155px; }
  .studio-preview { position: sticky; z-index: 1; top: 0; border-bottom: 1px solid #d0d9c9; }
}
