/* Wallet — Windows 95 reference, using real Solana 2 data. */
#wallet-icon { top: 112px; }
#wallet-icon img { width: 49px; height: 49px; image-rendering: auto; }
.wallet-window { --window-width: min(390px, calc(100% - 32px)); --window-height: min(780px, calc(100% - 64px)); left: calc((100% - var(--window-width)) / 2); top: calc((100% - var(--window-height)) / 2); width: var(--window-width); height: var(--window-height); min-width: 320px; min-height: 420px; max-width: none; overflow: hidden; background: #c3c3c3; container-type: size; }
.wallet-window.maximized { left: 6px; top: 6px; width: calc(100% - 12px); height: calc(100% - 12px); min-height: 0; transform: none; }
.wallet-window .window-title img { width: 19px; height: 19px; object-fit: contain; }
.wallet-shell { --face: #c3c3c3; --light: #fff; --mid: #dfdfdf; --shade: #808080; --dark: #404040; --navy: #000080; --green: #087c13; --wallet-asset-row: 58px; --wallet-preview-row: 56px; --wallet-activity-row: 61px; --wallet-pager: 34px; --wallet-load: 39px; --wallet-tabs: 34px; --wallet-button: 36px; --wallet-big: 30px; --wallet-hero: 28px; position: relative; isolation: isolate; display: flex; flex-direction: column; width: 100%; max-width: 430px; height: calc(100% - 30px); margin: 0 auto; overflow: hidden; border: 2px solid; border-color: var(--mid) #111 #111 var(--mid); background: var(--face); color: #111; box-shadow: inset 1px 1px var(--light), inset -1px -1px var(--shade); font-family: Tahoma, "MS Sans Serif", Geneva, sans-serif; font-size: 11px; line-height: 1.35; scrollbar-color: var(--shade) var(--face); scrollbar-width: thin; caret-color: #111; }
.wallet-shell *, .wallet-shell *::before, .wallet-shell *::after { box-sizing: border-box; }
.wallet-shell [hidden] { display: none !important; }
.wallet-shell ::selection { background: var(--navy); color: #fff; }
.wallet-shell button, .wallet-shell input { font-family: inherit; }
.wallet-shell button { color: #111; cursor: pointer; }
.wallet-shell button:disabled { color: #777; cursor: default; }
.wallet-shell button:focus-visible, .wallet-shell input:focus-visible, .wallet-shell code:focus-visible { outline: 1px dotted #111; outline-offset: -4px; }
.wallet-shell svg { width: 20px; height: 20px; flex: 0 0 auto; }
.wallet-svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.wallet-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; }
.w95-button, .w95-field { border: 2px solid; border-color: var(--light) var(--dark) var(--dark) var(--light); border-radius: 0; background: var(--face); box-shadow: inset 1px 1px var(--mid), inset -1px -1px var(--shade); }
.w95-button:active:not(:disabled), .w95-button.active { border-color: var(--dark) var(--light) var(--light) var(--dark); box-shadow: inset 1px 1px var(--shade); }
.w95-inset { border: 2px solid; border-color: var(--shade) var(--light) var(--light) var(--shade); border-radius: 0; background: #fff; box-shadow: inset 1px 1px var(--dark), inset -1px -1px var(--mid); }
.wallet-phone-header { position: relative; z-index: 5; flex: 0 0 auto; }
.wallet-statusbar { display: flex; align-items: center; justify-content: space-between; height: 23px; padding: 2px 7px 0; font-size: 10px; font-weight: 700; }
.wallet-statusbar time { font-variant-numeric: tabular-nums; }
.wallet-status-icons { display: flex; align-items: center; gap: 7px; height: 14px; }
.wallet-signal { display: flex; align-items: flex-end; gap: 1px; height: 11px; }
.wallet-signal i { display: block; width: 2px; background: #111; }
.wallet-signal i:nth-child(1) { height: 3px; }.wallet-signal i:nth-child(2) { height: 5px; }.wallet-signal i:nth-child(3) { height: 8px; }.wallet-signal i:nth-child(4) { height: 11px; }
.wallet-battery { position: relative; display: block; width: 22px; height: 10px; padding: 1px; border: 1px solid #111; }
.wallet-battery::after { content: ""; position: absolute; top: 2px; right: -3px; width: 2px; height: 4px; background: #111; }
.wallet-battery i { display: block; width: 100%; height: 100%; background: #111; }
.wallet-appbar { display: flex; align-items: center; gap: 8px; height: 43px; margin: 0 3px; padding: 3px 4px; border: 2px solid; border-color: var(--light) var(--dark) var(--dark) var(--light); background: var(--navy); color: #fff; }
.wallet-app-icon { width: 22px; height: 22px; object-fit: contain; }
.wallet-appbar h1 { flex: 1; min-width: 0; margin: 0; overflow: hidden; color: #fff; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.wallet-help { position: relative; width: 35px; height: 32px; flex: 0 0 35px; padding: 0; font-size: 18px; font-weight: 700; }
.wallet-help > i { position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; background: #087c13; }
.wallet-back { display: grid; place-items: center; width: 41px; height: 32px; flex: 0 0 41px; padding: 3px; }
.wallet-back svg { width: 22px; height: 22px; }
.wallet-networkbar { display: flex; align-items: center; justify-content: space-between; height: 25px; padding: 3px 8px; font-size: 10px; }
.wallet-network { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.wallet-network i { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; background: var(--green); }
.wallet-network.offline i { background: #b00000; }
#wallet-chain-environment { padding: 1px 4px; border: 1px solid var(--shade); background: var(--mid); font-size: 8px; font-weight: 700; letter-spacing: .04em; }
.wallet-content { position: relative; z-index: 1; display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: hidden; padding: 8px 12px 10px; }
.wallet-view { display: flex; flex: 1 1 0; flex-direction: column; width: 100%; min-width: 0; min-height: 0; overflow: hidden; }
.wallet-overview-view { gap: 7px; }
.wallet-view-heading { position: relative; flex: 0 0 auto; min-height: 47px; padding: 2px 0 7px; }
.wallet-view-heading h2 { margin: 0 0 3px; font-size: 19px; line-height: 1.15; letter-spacing: -.02em; }
.wallet-view-heading p { margin: 0; color: #3e3e3e; font-size: 10px; }
.wallet-view-heading > span { position: absolute; right: 0; bottom: 8px; color: #444; font-size: 9px; }
.wallet-error { display: grid; flex: 0 0 auto; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1px 6px; margin-bottom: 5px; padding: 4px 6px; border: 2px solid #7d0000; background: #fff4cf; color: #750000; font-size: 10px; }
.wallet-error strong { grid-column: 1; }
.wallet-error p { grid-column: 1; margin: 0; overflow-wrap: anywhere; }
.wallet-error button { grid-column: 2; grid-row: 1 / span 2; min-height: 22px; padding: 1px 6px; font-size: 9px; }
.wallet-account-picker { display: grid; flex: 0 0 42px; grid-template-columns: minmax(0, 1fr) 39px; gap: 5px; }
.wallet-account-picker > button:first-child { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; text-align: left; }
.wallet-account-picker strong { font-size: 13px; }
.wallet-account-picker > button:last-child { display: grid; place-items: center; }
.wallet-account-picker svg { width: 20px; height: 20px; }
.wallet-address-strip { position: relative; display: flex; flex: 0 0 28px; align-items: center; min-width: 0; }
#wallet-overview-address { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; height: 100%; padding: 2px 7px; border: 1px solid transparent; border-radius: 0; background: transparent; color: #222; text-align: left; }
#wallet-overview-address:hover { border-color: var(--shade); background: var(--mid); }
#wallet-overview-address code { min-width: 0; overflow: hidden; font-family: "Courier New", monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
#wallet-overview-address svg { width: 16px; height: 16px; }
#wallet-copy-feedback { position: absolute; top: 50%; right: 24px; z-index: 3; max-width: calc(100% - 134px); padding: 0 3px; background: var(--face); color: #075f10; font-size: 9px; line-height: 1.1; text-align: right; transform: translateY(-50%); pointer-events: none; }
#wallet-copy-feedback:empty { display: none; }
.wallet-overview { flex: 0 0 auto; min-width: 0; min-height: 98px; padding: 10px 11px 7px; }
.wallet-balance-heading { display: flex; align-items: center; justify-content: space-between; font-size: 10px; }
#wallet-balance-visibility { padding: 0; border: 0; background: transparent; color: #333; font-size: 9px; }
#wallet-balance-visibility .wallet-eye-closed { display: none; }
#wallet-balance-visibility.is-hidden .wallet-eye-open { display: none; }
#wallet-balance-visibility.is-hidden .wallet-eye-closed { display: inline; }
.wallet-total { display: flex; align-items: baseline; gap: 7px; min-width: 0; margin-top: 3px; }
.wallet-total strong { min-width: 0; overflow: hidden; font-family: Arial, sans-serif; font-size: var(--wallet-big); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.wallet-total > span { font-size: 11px; font-weight: 700; }
.wallet-value-breakdown { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 8px; width: 100%; margin-top: 4px; padding: 0; border: 0; background: transparent; color: #333; font-size: 9px; text-align: left; }
#wallet-native-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#wallet-token-value { flex: 0 0 100%; min-width: 0; overflow-wrap: anywhere; text-align: right; }
.wallet-quick-actions { display: grid; flex: 0 0 58px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.wallet-quick-actions button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; padding: 3px 1px; font-size: 10px; font-weight: 700; }
.wallet-quick-actions svg { width: 20px; height: 20px; }
.wallet-fund-prompt { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 5px 7px; border: 1px solid #888; background: #ffffd5; font-size: 10px; }
.wallet-fund-prompt p { flex: 1 1 0; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.wallet-fund-prompt button { flex: 0 0 auto; min-height: 28px; padding: 2px 8px; font-size: 10px; font-weight: 700; }
.wallet-assets-panel { position: relative; min-width: 0; }
.wallet-asset-tabs { display: flex; flex: 0 0 auto; height: var(--wallet-tabs); padding-left: 6px; }
.wallet-asset-tabs button { min-width: 102px; margin-bottom: -2px; padding: 3px 13px; border: 2px solid; border-color: var(--light) var(--dark) var(--dark) var(--light); background: var(--face); font-size: 10px; }
.wallet-asset-tabs button.active { position: relative; z-index: 2; border-bottom-color: #fff; background: #fff; font-weight: 700; }
.wallet-assets-preview { display: flex; flex: 1 0 auto; flex-direction: column; max-height: calc(var(--wallet-tabs) + 162px); }
.wallet-assets-preview .wallet-assets-list { flex: 1 1 auto; min-height: 0; }
.wallet-assets-preview .wallet-asset-row { flex: 1 1 var(--wallet-preview-row); min-height: var(--wallet-preview-row); }
.wallet-assets-list.is-single .wallet-asset-row:nth-child(n+2) { display: none; }
.wallet-assets-list.is-single .wallet-asset-row { border-bottom: 0; }
.wallet-assets-list { display: flex; flex-direction: column; min-height: 0; padding: 3px; background: #fff; }
.wallet-asset-row { position: relative; display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; gap: 8px; flex: 1 1 0; width: 100%; min-height: 52px; max-height: 76px; padding: 5px 22px 5px 7px; border: 0; border-bottom: 1px solid #aaa; border-radius: 0; background: #fff; color: #111; text-align: left; }
.wallet-asset-row:last-child { border-bottom: 0; }
.wallet-asset-row.wallet-token-row, .wallet-native-row { cursor: pointer; }
.wallet-asset-row:hover { background: #eee; }
.wallet-asset-row:active { background: #ddd; }
.wallet-asset-icon, .wallet-token-image { display: grid; place-items: center; width: 33px; height: 33px; border: 2px solid; border-color: var(--light) var(--dark) var(--dark) var(--light); border-radius: 0; background: var(--navy); }
.wallet-sol-icon img { width: 88%; height: 88%; object-fit: contain; filter: none; }
.wallet-token-image { object-fit: cover; }
.wallet-asset-copy, .wallet-asset-value { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.wallet-asset-copy strong { overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.wallet-asset-copy > span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.wallet-asset-value { align-items: flex-end; text-align: right; }
.wallet-asset-value > strong { max-width: 140px; overflow: hidden; font-size: 10px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.wallet-asset-value small { font-size: 9px; }
.wallet-asset-value > span { color: #333; font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wallet-asset-arrow { position: absolute; top: 50%; right: 5px; display: block; width: 12px !important; height: 12px !important; transform: translateY(-50%); pointer-events: none; }
.wallet-list-failure { margin: auto; padding: 8px; color: #750000; font-size: 10px; text-align: center; }
.wallet-token-empty { flex: 0 0 auto; padding: 8px; border-top: 1px solid #aaa; background: #fff; font-size: 10px; text-align: center; }
.wallet-token-empty p { margin: 0 0 4px; }
.wallet-text-button { padding: 2px; border: 0; background: transparent; color: var(--navy); font-size: 10px; text-decoration: underline; text-underline-offset: 2px; }
.wallet-shell .wallet-text-button { color: var(--navy); }
.wallet-recent-panel { flex: 1 0 auto; min-width: 0; margin: 0; padding: 3px 7px 5px; border: 2px groove var(--light); }
.wallet-recent-panel legend { padding: 0 4px; font-size: 10px; }
.wallet-recent-panel .wallet-activity-row { min-height: 43px; max-height: 48px; padding: 2px; border: 0; }
.wallet-recent-panel .wallet-activity-icon { width: 26px; height: 27px; }
.wallet-recent-panel .wallet-activity-copy > span { font-size: 8px; }
.wallet-recent-panel > div > p { margin: 8px 0; color: #444; text-align: center; }
.wallet-assets-full, .wallet-activity-panel { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; }
.wallet-assets-full > .wallet-assets-list { flex: 1 1 auto; overflow: hidden; }
.wallet-assets-full .wallet-asset-row { min-height: var(--wallet-asset-row); }
.wallet-pagination { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 7px; min-height: var(--wallet-pager); padding-top: 6px; }
.wallet-pagination button { min-width: 88px; min-height: 28px; padding: 3px 8px; font-size: 10px; }
.wallet-pagination span { font-size: 10px; font-variant-numeric: tabular-nums; }
.wallet-activity-filters { display: flex; flex: 0 0 34px; gap: 2px; }
.wallet-activity-filters button { flex: 1; min-width: 0; padding: 3px; font-size: 10px; }
.wallet-activity-filters button.active { background: var(--navy); color: #fff; box-shadow: inset 1px 1px #00005a; }
.wallet-activity-ledger { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 2px 6px; }
.wallet-activity-list { display: flex; flex-direction: column; }
.wallet-activity-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 7px; width: 100%; min-height: var(--wallet-activity-row); padding: 6px 1px; border: 0; border-bottom: 1px solid #aaa; border-radius: 0; background: #fff; color: #111; text-align: left; }
.wallet-activity-row:last-child { border-bottom: 0; }
.wallet-activity-row:hover { background: #eee; }
.wallet-activity-icon { display: grid; place-items: center; width: 29px; height: 30px; border: 2px solid; border-color: var(--light) var(--dark) var(--dark) var(--light); background: var(--face); }
.wallet-activity-icon.received { color: var(--green); }
.wallet-activity-icon.sent { color: #111; }
.wallet-activity-icon.trade, .wallet-activity-icon.created { color: var(--navy); }
.wallet-activity-icon svg { width: 18px; height: 18px; }
.wallet-activity-copy, .wallet-activity-amount { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.wallet-activity-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.wallet-activity-copy > span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.wallet-activity-amount { align-items: flex-end; text-align: right; }
.wallet-activity-amount > strong { max-width: 130px; overflow: hidden; font-size: 10px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.wallet-activity-amount.positive > strong { color: #075f10; }
.wallet-activity-amount small { font-size: 9px; }
.wallet-activity-amount > span { color: #075f10; font-size: 8px; }
.wallet-activity-empty { padding: 15px 8px; text-align: center; }
.wallet-activity-empty p { margin: 5px auto 0; font-size: 10px; }
.wallet-list-footer { display: flex; flex: 0 0 auto; flex-wrap: wrap; }
.wallet-list-footer .wallet-pagination { flex: 1 1 100%; }
.wallet-load-more { flex: 1 1 100%; min-height: 33px; margin-top: 6px; padding: 2px 6px; font-weight: 700; }
.wallet-inline-note { display: flex; align-items: flex-start; gap: 7px; margin: 8px 0 0; font-size: 10px; }
.wallet-inline-note svg { width: 20px; height: 20px; }
.wallet-more-panel { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; }
.wallet-settings-groups { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.wallet-settings-group { min-width: 0; margin: 0 0 9px; padding: 4px 7px 6px; border: 2px groove var(--light); }
.wallet-settings-group legend { padding: 0 4px; }
.wallet-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 30px; padding: 3px 4px; border: 0; border-bottom: 1px solid #999; background: transparent; text-align: left; }
.wallet-setting-row:last-child { border-bottom: 0; }
.wallet-setting-row > span { display: flex; align-items: center; gap: 7px; }
.wallet-setting-row img { width: 19px; height: 19px; }
.wallet-setting-row strong, .wallet-setting-row code { max-width: 58%; overflow: hidden; font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.wallet-setting-address { display: block; }
.wallet-setting-address code { display: block; max-width: none; margin-top: 1px; overflow: visible; font-family: "Courier New", monospace; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; user-select: all; }
.wallet-settings-actions { display: grid; flex: 0 0 auto; grid-template-columns: 1fr 1fr; gap: 7px; }
.wallet-settings-actions button { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; }
.wallet-settings-actions svg { width: 17px; height: 17px; }
.wallet-menu-feedback { flex: 0 0 auto; min-height: 12px; margin: 4px 0 0; color: #075f10; font-size: 9px; overflow-wrap: anywhere; }
.wallet-popover { position: absolute; z-index: 40; top: 86px; right: 10px; left: 10px; padding: 10px; border: 2px solid; border-color: var(--light) var(--dark) var(--dark) var(--light); background: var(--face); box-shadow: 3px 3px 0 #0005; }
.wallet-popover-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.wallet-popover-heading button { width: 27px; height: 25px; padding: 0; }
.wallet-notifications > p { margin: 0 0 8px; padding: 7px; border: 1px solid var(--shade); background: #fff; overflow-wrap: anywhere; }
#wallet-notification-view { width: 100%; min-height: 28px; }

/* Flow screens: the details may scroll when there is truly no room, the actions never leave the window. */
.wallet-flow { display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; min-height: 0; }
.wallet-flow-body { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: hidden auto; scrollbar-color: auto; scrollbar-width: auto; }
.wallet-flow-body > * { flex: 0 0 auto; }
.wallet-flow-body::-webkit-scrollbar { width: 14px; }
.wallet-flow-body::-webkit-scrollbar-track { background: repeating-conic-gradient(#fff 0 25%, var(--face) 0 50%) 0 0 / 2px 2px; }
.wallet-flow-body::-webkit-scrollbar-thumb { border: 2px solid; border-color: var(--light) var(--dark) var(--dark) var(--light); background: var(--face); box-shadow: inset 1px 1px var(--mid), inset -1px -1px var(--shade); }
.wallet-flow-body::-webkit-scrollbar-button:single-button { display: block; width: 14px; height: 14px; border: 2px solid; border-color: var(--light) var(--dark) var(--dark) var(--light); background: var(--face) center / 8px 8px no-repeat; }
.wallet-flow-body::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M4 1 7 6H1z'/%3E%3C/svg%3E"); }
.wallet-flow-body::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M4 7 1 2h6z'/%3E%3C/svg%3E"); }
.wallet-flow-actions { display: flex; flex: 0 0 auto; flex-direction: column; gap: 5px; padding-top: 6px; }
.wallet-flow-actions > button, .wallet-action-pair > button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--wallet-button); padding: 2px 6px; font-weight: 700; }
.wallet-action-pair { display: flex; flex-direction: column; gap: 5px; }
.wallet-primary-button { border-color: #aaaaff #000 #000 #aaaaff; background: var(--navy); color: #fff !important; box-shadow: inset 1px 1px #3333aa, inset -1px -1px #000044; font-weight: 700; }
.wallet-primary-button:disabled { background: #606060; border-color: var(--light) var(--dark) var(--dark) var(--light); color: #ccc !important; box-shadow: none; }
.wallet-form-feedback { margin: 0; color: #8b0000; font-size: 10px; overflow-wrap: anywhere; }
.wallet-form-feedback:empty { display: none; }
.wallet-form-alert { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 3px 4px; border: 1px solid #8b0000; background: #fff4cf; }
.wallet-form-alert p { flex: 1 1 0; min-width: 0; }
.wallet-form-alert button { flex: 0 0 auto; min-height: 20px; padding: 0 5px; font-size: 9px; }

.wallet-asset-hero { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-content: start; gap: 5px 10px; padding: 12px 14px; }
.wallet-asset-hero .wallet-asset-icon { width: 46px; height: 46px; }
.wallet-asset-hero > div:not(.wallet-detail-balance) { display: flex; flex-direction: column; }
.wallet-asset-hero > div > strong { font-size: 13px; }
.wallet-detail-balance { display: flex; grid-column: 1 / -1; align-items: baseline; gap: 8px; min-width: 0; margin-top: 5px; }
.wallet-detail-balance strong { min-width: 0; font-family: Arial, sans-serif; font-size: var(--wallet-big); letter-spacing: -.03em; overflow-wrap: anywhere; }
.wallet-asset-hero > small { grid-column: 1 / -1; }
.wallet-detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; height: 40px; margin: 8px 0; }
.wallet-detail-actions button { display: flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; }
.wallet-detail-group { min-width: 0; margin: 0 0 8px; padding: 4px 9px; border: 2px groove var(--light); }
.wallet-detail-group legend { padding: 0 4px; }
.wallet-detail-group dl { margin: 0; }
.wallet-detail-group dl > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 26px; padding: 5px 3px; border-bottom: 1px solid #999; }
.wallet-detail-group dl > div:last-child { border-bottom: 0; }
.wallet-detail-group dt { flex: 0 0 auto; color: #444; }
.wallet-detail-group dd { min-width: 0; max-width: 70%; margin: 0; overflow-wrap: anywhere; text-align: right; }
.wallet-detail-group code { font-family: "Courier New", monospace; font-size: 10px; }
.wallet-transfer-steps { display: flex; align-items: center; justify-content: space-between; height: 24px; margin-bottom: 4px; padding: 2px 6px; border-bottom: 1px solid #777; }
.wallet-transfer-steps strong { padding: 2px 5px; background: var(--navy); color: #fff; }
#wallet-send-form .wallet-flow-body > label, .wallet-field-label, .wallet-amount-label { display: block; margin: 4px 0 3px; font-weight: 700; }
#wallet-send-recipient { width: 100%; height: 34px; padding: 6px; font-family: "Courier New", monospace; font-size: 11px; }
.wallet-send-asset { display: flex; align-items: center; gap: 9px; height: 36px; padding: 3px 9px; }
.wallet-send-asset img { width: 25px; height: 25px; padding: 3px; background: var(--navy); }
.wallet-send-asset span { margin-left: auto; }
.wallet-amount-label { display: flex; justify-content: space-between; gap: 8px; }
.wallet-amount-label > span { min-width: 0; overflow: hidden; font-size: 9px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.wallet-amount-field { display: flex; align-items: center; height: 42px; overflow: hidden; }
.wallet-amount-field input { width: 100%; min-width: 0; height: 100%; padding: 4px 8px; border: 0; outline: 0; background: #fff; font-family: Arial, sans-serif; font-size: 21px; }
.wallet-amount-field > span { padding: 4px; }
.wallet-amount-field button { align-self: stretch; flex: 0 0 47px; width: 47px; border-width: 0 0 0 2px; border-color: var(--shade); box-shadow: none; }
.wallet-send-estimate { margin: 8px 0 0; }
.wallet-send-estimate dl > div { min-height: 24px; padding: 3px; }
.wallet-review-amount { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 76px; margin-bottom: 6px; padding: 6px; text-align: center; }
.wallet-review-amount > strong { max-width: 100%; margin: 3px 0; font-family: Arial, sans-serif; font-size: var(--wallet-hero); letter-spacing: -.03em; overflow-wrap: anywhere; }
.wallet-review-amount > small { font-size: 9px; }
.wallet-warning { margin: 0 0 6px; padding: 6px 8px; border: 1px solid #888; background: #ffffd5; font-size: 10px; }
.wallet-review-check { display: flex; align-items: center; gap: 6px; font-size: 10px; }
.wallet-review-check input { width: 17px; height: 17px; margin: 0; flex: 0 0 auto; accent-color: var(--navy); }
.wallet-flow-body > .wallet-review-check { margin-bottom: 2px; }
.wallet-readonly-note { margin: 0; color: #444; font-size: 9px; text-align: center; }
.wallet-transaction-hero { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 112px; margin-bottom: 8px; padding: 8px; }
.wallet-transaction-hero > svg { width: 34px; height: 34px; padding: 5px; border: 2px solid; border-color: var(--light) var(--dark) var(--dark) var(--light); background: var(--face); }
.wallet-transaction-hero > span { margin-top: 3px; }
.wallet-transaction-hero > strong { max-width: 100%; margin: 3px 0; font-family: Arial, sans-serif; font-size: var(--wallet-hero); overflow-wrap: anywhere; text-align: center; }
.wallet-transaction-hero > small { color: var(--green); }
.wallet-transaction-id { position: relative; font-weight: 700; }
.wallet-transaction-id > button { position: absolute; top: 0; right: 0; padding: 0; border: 0; background: transparent; color: var(--navy); font-size: 10px; text-decoration: underline; }
.wallet-transaction-id > code { display: block; min-height: 36px; margin-top: 3px; padding: 6px; font-family: "Courier New", monospace; font-size: 10px; font-weight: 400; overflow-wrap: anywhere; }
.wallet-bridge-view[data-bridge-step="review"] .wallet-view-heading, .wallet-bridge-view[data-bridge-step="receipt"] .wallet-view-heading { min-height: 22px; padding: 0 0 3px; }
.wallet-bridge-view[data-bridge-step="review"] .wallet-view-heading p, .wallet-bridge-view[data-bridge-step="receipt"] .wallet-view-heading p { display: none; }
#wallet-bridge-review-panel .wallet-review-amount { min-height: 60px; }
#wallet-bridge-review-panel .wallet-detail-group dl > div { min-height: 22px; padding: 3px; }
.wallet-bridge-workspace { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; }
#wallet-bridge-form-panel { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; }
.wallet-bridge-directions { display: flex; gap: 4px; height: 34px; margin-bottom: 7px; }
.wallet-bridge-directions button { flex: 1; min-width: 0; padding: 3px; font-size: 10px; font-weight: 700; }
.wallet-bridge-directions button.active { border-color: var(--dark) var(--light) var(--light) var(--dark); background: var(--navy); color: #fff; box-shadow: inset 1px 1px #00005a; }
.wallet-bridge-balances { display: grid; grid-template-columns: minmax(0, 1fr) 23px minmax(0, 1fr); align-items: center; gap: 4px; min-height: 60px; padding: 6px 10px; }
.wallet-bridge-balances > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wallet-bridge-balances > div:last-child { align-items: flex-end; text-align: right; }
.wallet-bridge-balances > span { font-size: 18px; text-align: center; }
.wallet-bridge-balances strong { max-width: 100%; font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#wallet-bridge-form .wallet-amount-label { margin-top: 6px; }
.wallet-bridge-note { margin: 6px 0 0; padding: 5px 6px; border: 1px solid #888; background: #ffffd5; font-size: 9px; }
.wallet-bridge-fund-note { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; }
.wallet-bridge-fund-note > span { flex: 1 0 100%; }
.wallet-bridge-fund-note code { flex: 1 1 0; min-width: 0; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.wallet-bridge-fund-note button { flex: none; min-height: 20px; padding: 1px 6px; font-size: 9px; }
.wallet-bridge-stale { background: #fff4cf; color: #750000; overflow-wrap: anywhere; }
.wallet-bridge-details { margin: 7px 0 0; padding: 3px 8px; border: 2px groove var(--light); }
.wallet-bridge-details > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; border-bottom: 1px solid #999; }
.wallet-bridge-details > div:last-child { border: 0; }
.wallet-bridge-details dt { flex: 0 0 auto; }
.wallet-bridge-details dd { min-width: 0; margin: 0; font-size: 10px; overflow-wrap: anywhere; text-align: right; }
.wallet-bridge-refresh { align-self: center; min-height: 18px; font-size: 10px; }
.wallet-bridge-unavailable { padding: 12px; }
.wallet-bridge-unavailable p { margin: 6px 0; line-height: 1.5; overflow-wrap: anywhere; }
.wallet-bridge-unavailable button { min-height: 28px; padding: 3px 12px; }
.wallet-bottom-nav { display: grid; flex: 0 0 56px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; margin: 0 4px; padding: 4px 0; border-top: 2px groove var(--light); }
.wallet-bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; padding: 3px 1px; font-size: 9px; }
.wallet-bottom-nav button.active { outline: 1px dotted #111; outline-offset: -5px; }
.wallet-bottom-nav img, .wallet-bottom-nav svg { width: 20px; height: 20px; }
.wallet-footer { display: flex; flex: 0 0 25px; align-items: center; justify-content: space-between; gap: 7px; padding: 2px 8px 8px; font-size: 8px; }
#wallet-sync-status { display: none; }
#wallet-sync-time { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-home-indicator { position: absolute; z-index: 20; bottom: 4px; left: 50%; width: 90px; height: 2px; background: #333; transform: translateX(-50%); pointer-events: none; }
.wallet-skeleton-row { position: relative; height: 56px; flex: 0 0 56px; border-bottom: 1px solid #aaa; background: #fff; }
.wallet-skeleton-row::after { content: ""; position: absolute; inset: 15px 8px; background: #d5d5d5; }
.wallet-content.is-loading .wallet-overview { color: #555; }
.wallet-menu-action.loading { color: #777; }
#wallet-total-value[data-length="mid"], #wallet-detail-balance[data-length="mid"] { font-size: calc(var(--wallet-big) * .74); }
#wallet-total-value[data-length="long"], #wallet-detail-balance[data-length="long"] { font-size: calc(var(--wallet-big) * .56); }
.wallet-review-amount > strong[data-length="mid"], .wallet-transaction-hero > strong[data-length="mid"] { font-size: calc(var(--wallet-hero) * .74); }
.wallet-review-amount > strong[data-length="long"], .wallet-transaction-hero > strong[data-length="long"] { font-size: calc(var(--wallet-hero) * .56); }

@container (max-width: 350px) {
  .wallet-content { padding-inline: 9px; }
  .wallet-quick-actions { gap: 3px; }
  .wallet-quick-actions button { font-size: 9px; }
  /* Keeps the room on the right that the row's arrow sits in. */
  .wallet-asset-row { grid-template-columns: 31px minmax(0, 1fr) auto; gap: 6px; padding-inline: 5px 20px; }
  .wallet-asset-icon, .wallet-token-image { width: 30px; height: 30px; }
  .wallet-asset-value > strong, .wallet-activity-amount > strong { max-width: 96px; }
  .wallet-bottom-nav button { font-size: 8px; }
  .wallet-fund-prompt { gap: 5px; padding-inline: 5px; }
  .wallet-fund-prompt button { padding-inline: 4px; }
  .wallet-pagination button { min-width: 72px; }
}
/* T1: chrome and rows tighten; the big headings on flow screens repeat the title bar, so they shrink first. */
@container (max-height: 745px) {
  .wallet-shell { --wallet-asset-row: 52px; --wallet-preview-row: 46px; --wallet-activity-row: 52px; --wallet-pager: 30px; --wallet-load: 33px; --wallet-tabs: 25px; --wallet-button: 31px; --wallet-big: 26px; --wallet-hero: 24px; }
  .wallet-statusbar { height: 20px; }
  .wallet-appbar { height: 38px; }
  .wallet-networkbar { height: 22px; }
  .wallet-content { padding: 6px 10px 8px; }
  .wallet-overview-view { gap: 6px; }
  .wallet-account-picker { flex-basis: 32px; }
  .wallet-address-strip { flex-basis: 24px; }
  .wallet-overview { min-height: 84px; padding: 7px 9px 5px; }
  .wallet-quick-actions { flex-basis: 46px; }
  .wallet-quick-actions svg { width: 17px; height: 17px; }
  .wallet-asset-row { min-height: 44px; }
  .wallet-view-heading { min-height: 38px; padding-bottom: 4px; }
  .wallet-view-heading h2 { margin-bottom: 1px; font-size: 16px; }
  .wallet-view-heading > span { bottom: 4px; }
  .wallet-flow-body .wallet-view-heading, .wallet-bridge-view .wallet-view-heading { min-height: 22px; padding: 0 0 3px; }
  .wallet-flow-body .wallet-view-heading p, .wallet-bridge-view .wallet-view-heading p { display: none; }
  .wallet-activity-filters { flex-basis: 30px; }
  .wallet-pagination { padding-top: 4px; }
  .wallet-pagination button { min-height: 26px; }
  .wallet-load-more { min-height: 29px; margin-top: 4px; }
  .wallet-bottom-nav { flex-basis: 48px; }
  .wallet-bottom-nav img, .wallet-bottom-nav svg { width: 17px; height: 17px; }
  .wallet-footer { flex-basis: 22px; }
  .wallet-settings-group { margin-bottom: 6px; }
  .wallet-setting-row { min-height: 26px; }
  .wallet-settings-actions button { min-height: 31px; }
  .wallet-flow-actions { gap: 4px; padding-top: 4px; }
  .wallet-action-pair { gap: 4px; }
  .wallet-asset-hero { padding: 9px 10px; }
  .wallet-asset-hero .wallet-asset-icon { width: 38px; height: 38px; }
  .wallet-asset-hero { grid-template-columns: 40px minmax(0, 1fr); }
  .wallet-detail-actions { height: 33px; margin: 6px 0; }
  .wallet-detail-group { margin-bottom: 5px; padding: 2px 7px 3px; }
  .wallet-detail-group dl > div { min-height: 21px; padding: 2px 2px; }
  .wallet-transfer-steps { height: 20px; margin-bottom: 2px; padding-block: 0; }
  .wallet-transfer-steps strong { padding-block: 0; }
  #wallet-send-form .wallet-flow-body > label, .wallet-field-label, .wallet-amount-label { margin: 3px 0 2px; }
  #wallet-send-recipient { height: 28px; padding-block: 3px; }
  .wallet-send-asset { height: 28px; padding-block: 1px; }
  .wallet-send-asset img { width: 20px; height: 20px; }
  .wallet-amount-field { height: 34px; }
  .wallet-amount-field input { font-size: 18px; }
  .wallet-send-estimate { margin-top: 5px; }
  .wallet-send-estimate dl > div { min-height: 19px; padding-block: 1px; }
  .wallet-inline-note { margin-top: 5px; font-size: 9px; }
  .wallet-inline-note svg { width: 16px; height: 16px; }
  .wallet-review-amount { min-height: 56px; margin-bottom: 4px; padding: 3px 6px; }
  .wallet-review-amount > strong { margin: 1px 0; }
  .wallet-warning { margin-bottom: 4px; padding: 3px 6px; font-size: 9px; }
  .wallet-review-check { font-size: 9px; }
  .wallet-transaction-hero { min-height: 72px; margin-bottom: 5px; padding: 4px; }
  .wallet-transaction-hero > svg { width: 24px; height: 24px; padding: 3px; }
  .wallet-transaction-hero > span { margin-top: 1px; }
  .wallet-transaction-hero > strong { margin: 1px 0; }
  .wallet-transaction-id > code { min-height: 28px; margin-top: 2px; padding: 3px 5px; }
  .wallet-bridge-view[data-bridge-step="review"] .wallet-view-heading { display: none; }
  #wallet-bridge-review-panel .wallet-review-amount { min-height: 50px; }
  #wallet-bridge-review-panel .wallet-detail-group dl > div { min-height: 19px; padding-block: 1px; }
  .wallet-bridge-directions { height: 28px; margin-bottom: 4px; }
  .wallet-bridge-balances { min-height: 44px; padding: 3px 8px; }
  .wallet-bridge-balances > div { gap: 1px; }
  #wallet-bridge-form .wallet-amount-label { margin-top: 4px; }
  .wallet-bridge-note { margin-top: 3px; padding: 2px 5px; }
  .wallet-bridge-details { margin-top: 4px; padding-block: 1px; }
  .wallet-bridge-details > div { min-height: 19px; }
}
/* T2: no phone status bar, paired buttons sit side by side, and flow headings give way to the title bar. */
@container (max-height: 615px) {
  .wallet-shell { --wallet-asset-row: 44px; --wallet-preview-row: 44px; --wallet-activity-row: 45px; --wallet-pager: 28px; --wallet-load: 30px; --wallet-tabs: 0px; --wallet-button: 28px; --wallet-big: 23px; --wallet-hero: 20px; }
  .wallet-statusbar { display: none; }
  .wallet-appbar { height: 32px; margin-top: 2px; padding-block: 1px; }
  .wallet-app-icon { width: 18px; height: 18px; }
  .wallet-appbar h1 { font-size: 13px; }
  .wallet-help, .wallet-back { height: 24px; }
  .wallet-help { flex-basis: 30px; width: 30px; font-size: 15px; }
  .wallet-back { flex-basis: 32px; width: 32px; }
  .wallet-back svg { width: 17px; height: 17px; }
  .wallet-networkbar { height: 18px; padding-block: 1px; }
  .wallet-content { padding: 3px 9px 5px; }
  .wallet-overview-view { gap: 5px; }
  .wallet-account-picker { flex-basis: 27px; }
  .wallet-account-picker strong { font-size: 11px; }
  .wallet-account-picker svg { width: 16px; height: 16px; }
  .wallet-address-strip { flex-basis: 21px; }
  .wallet-overview { min-height: 70px; padding: 4px 8px 3px; }
  .wallet-total { margin-top: 1px; }
  .wallet-value-breakdown { margin-top: 2px; }
  .wallet-quick-actions { flex-basis: 40px; }
  .wallet-quick-actions button { gap: 0; padding-block: 1px; }
  .wallet-asset-tabs { display: none; }
  .wallet-assets-preview .wallet-asset-row { max-height: 60px; }
  .wallet-asset-row { min-height: 40px; padding-block: 2px; }
  .wallet-view-heading { min-height: 26px; padding: 0 0 2px; }
  .wallet-view-heading h2 { margin: 0; font-size: 14px; }
  .wallet-view-heading p { display: none; }
  .wallet-view-heading > span { bottom: 3px; }
  .wallet-flow-body .wallet-view-heading { display: none; }
  .wallet-bridge-view .wallet-view-heading, .wallet-bridge-view[data-bridge-step="receipt"] .wallet-view-heading { min-height: 15px; padding: 0 0 1px; }
  .wallet-bridge-view .wallet-view-heading h2 { font-size: 11px; }
  .wallet-bridge-view .wallet-view-heading > span { bottom: 1px; }
  .wallet-activity-filters { flex-basis: 27px; }
  .wallet-activity-filters button { font-size: 9px; }
  .wallet-activity-row { grid-template-columns: 25px minmax(0, 1fr) auto; padding-block: 2px; }
  .wallet-activity-icon { width: 24px; height: 25px; }
  .wallet-activity-icon svg { width: 15px; height: 15px; }
  .wallet-activity-empty { padding: 8px; }
  .wallet-pagination button { min-height: 24px; padding-block: 1px; }
  .wallet-load-more { min-height: 26px; }
  .wallet-bottom-nav { flex-basis: 40px; padding-block: 2px; }
  .wallet-bottom-nav button { flex-direction: row; gap: 3px; font-size: 9px; }
  .wallet-bottom-nav img, .wallet-bottom-nav svg { width: 14px; height: 14px; }
  .wallet-footer { flex-basis: 18px; padding-bottom: 6px; }
  .wallet-settings-group { margin-bottom: 4px; padding: 1px 6px 2px; }
  .wallet-setting-row { min-height: 23px; padding-block: 1px; }
  .wallet-setting-row img { width: 15px; height: 15px; }
  .wallet-settings-actions button { min-height: 27px; font-size: 10px; }
  .wallet-menu-feedback { margin-top: 2px; }
  .wallet-flow-actions { padding-top: 3px; }
  .wallet-action-pair { flex-direction: row; }
  .wallet-action-pair > button { flex: 1 1 0; min-width: 0; font-size: 10px; }
  .wallet-action-pair svg { width: 15px; height: 15px; }
  .wallet-asset-hero { grid-template-columns: 34px minmax(0, 1fr); gap: 2px 8px; padding: 5px 8px; }
  .wallet-asset-hero .wallet-asset-icon { width: 32px; height: 32px; }
  .wallet-detail-balance { margin-top: 0; }
  .wallet-detail-actions { height: 28px; margin: 4px 0; }
  .wallet-detail-actions svg { width: 15px; height: 15px; }
  .wallet-detail-group { margin-bottom: 3px; padding: 1px 6px 2px; }
  .wallet-detail-group legend { font-size: 10px; }
  .wallet-detail-group dl > div { min-height: 18px; padding: 1px 2px; font-size: 10px; }
  .wallet-transfer-steps { height: 18px; font-size: 10px; }
  #wallet-send-recipient { height: 25px; padding-block: 2px; font-size: 10px; }
  .wallet-send-asset { height: 25px; }
  .wallet-send-asset img { width: 17px; height: 17px; padding: 2px; }
  .wallet-amount-field { height: 29px; }
  .wallet-amount-field input { font-size: 16px; }
  .wallet-send-estimate { margin-top: 3px; }
  .wallet-send-estimate dl > div { min-height: 17px; padding-block: 0; }
  .wallet-inline-note { margin-top: 3px; }
  .wallet-review-amount { min-height: 42px; margin-bottom: 3px; padding: 1px 6px; }
  .wallet-warning { margin-bottom: 3px; padding: 2px 5px; }
  .wallet-review-check input { width: 14px; height: 14px; }
  .wallet-readonly-note { font-size: 8px; }
  .wallet-transaction-hero { min-height: 48px; margin-bottom: 3px; padding: 2px; }
  .wallet-transaction-hero > svg { display: none; }
  .wallet-transaction-id { font-size: 10px; }
  .wallet-transaction-id > code { min-height: 24px; padding: 2px 4px; font-size: 9px; }
  #wallet-bridge-review-panel .wallet-review-amount { min-height: 40px; }
  #wallet-bridge-review-panel .wallet-detail-group dl > div { min-height: 17px; padding-block: 0; }
  .wallet-bridge-directions { height: 25px; margin-bottom: 3px; }
  .wallet-bridge-directions button { font-size: 9px; }
  .wallet-bridge-balances { min-height: 34px; padding: 2px 7px; font-size: 9px; }
  .wallet-bridge-balances strong { font-size: 10px; }
  .wallet-bridge-balances > span { font-size: 14px; }
  #wallet-bridge-form .wallet-amount-label { margin-top: 2px; }
  .wallet-bridge-details { margin-top: 3px; padding-inline: 6px; }
  .wallet-bridge-details > div { min-height: 17px; font-size: 10px; }
  .wallet-bridge-details dd { font-size: 9px; }
  .wallet-bridge-refresh { min-height: 15px; font-size: 9px; padding-block: 0; }
  .wallet-bridge-unavailable { padding: 8px; }
  .wallet-popover { top: 54px; }
}
/* T3: the footer goes too, and the Overview's duplicate picker. Everything else stays, only smaller. */
@container (max-height: 470px) {
  .wallet-shell { --wallet-asset-row: 38px; --wallet-preview-row: 38px; --wallet-activity-row: 38px; --wallet-pager: 25px; --wallet-load: 0px; --wallet-button: 26px; --wallet-big: 20px; --wallet-hero: 17px; }
  .wallet-appbar { height: 30px; margin-top: 1px; }
  .wallet-networkbar { height: 17px; }
  .wallet-footer, .wallet-home-indicator { display: none; }
  .wallet-content { padding: 2px 8px 3px; }
  .wallet-overview-view { gap: 4px; }
  .wallet-account-picker { display: none; }
  .wallet-overview { min-height: 56px; padding: 3px 7px 2px; }
  .wallet-balance-heading { font-size: 9px; }
  .wallet-total { margin-top: 0; }
  .wallet-total > span { font-size: 9px; }
  .wallet-value-breakdown { margin-top: 1px; }
  .wallet-quick-actions { flex-basis: 30px; }
  .wallet-quick-actions button { flex-direction: row; gap: 3px; }
  .wallet-quick-actions svg { width: 14px; height: 14px; }
  .wallet-fund-prompt { padding-block: 2px; font-size: 9px; }
  .wallet-fund-prompt button { min-height: 22px; font-size: 9px; }
  .wallet-asset-row { min-height: 34px; padding-block: 1px; }
  .wallet-asset-icon, .wallet-token-image { width: 26px; height: 26px; }
  .wallet-token-empty { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 6px; font-size: 9px; }
  .wallet-token-empty p { margin: 0; }
  .wallet-text-button { font-size: 9px; }
  .wallet-recent-panel { padding: 0 5px 2px; }
  .wallet-recent-panel legend { font-size: 9px; }
  .wallet-recent-panel .wallet-activity-row { min-height: 34px; padding-block: 1px; }
  .wallet-recent-panel .wallet-activity-icon { width: 22px; height: 23px; }
  .wallet-view-heading { min-height: 17px; padding: 0 0 2px; }
  .wallet-view-heading h2 { font-size: 11px; }
  .wallet-view-heading > span { bottom: 2px; font-size: 8px; }
  .wallet-activity-filters { flex-basis: 24px; }
  .wallet-activity-row { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 5px; padding-block: 1px; }
  .wallet-activity-icon { width: 21px; height: 22px; }
  .wallet-activity-icon svg { width: 13px; height: 13px; }
  .wallet-activity-copy, .wallet-activity-amount { gap: 0; }
  .wallet-activity-copy strong, .wallet-activity-amount > strong { font-size: 9px; }
  .wallet-activity-copy > span { font-size: 8px; }
  .wallet-activity-empty { padding: 4px; }
  /* Pagination and Load earlier share one row here. */
  .wallet-list-footer { flex-wrap: nowrap; align-items: flex-end; gap: 4px; }
  .wallet-list-footer .wallet-pagination { flex: 1 1 auto; min-width: 0; }
  .wallet-pagination { gap: 4px; padding-top: 2px; }
  .wallet-pagination button { min-width: 54px; min-height: 22px; padding: 0 4px; font-size: 9px; }
  .wallet-pagination span { font-size: 9px; }
  .wallet-load-more { flex: 0 0 auto; min-height: 22px; margin: 2px 0 0 auto; padding: 0 4px; font-size: 9px; }
  .wallet-bottom-nav { flex-basis: 34px; margin-inline: 3px; padding-block: 1px; }
  .wallet-bottom-nav button { padding-block: 0; }
  .wallet-settings-group { margin-bottom: 2px; padding-block: 0 1px; }
  .wallet-settings-group legend { font-size: 9px; }
  .wallet-setting-row { min-height: 19px; padding-block: 0; font-size: 9px; }
  .wallet-setting-row strong, .wallet-setting-row code { font-size: 9px; }
  .wallet-settings-actions button { min-height: 24px; font-size: 9px; }
  .wallet-settings-actions svg { width: 14px; height: 14px; }
  .wallet-menu-feedback { min-height: 10px; margin-top: 1px; font-size: 8px; }
  .wallet-flow-actions { gap: 3px; padding-top: 2px; }
  .wallet-action-pair { gap: 3px; }
  .wallet-action-pair > button { font-size: 9px; }
  .wallet-asset-hero { grid-template-columns: 26px minmax(0, 1fr); gap: 0 6px; padding: 3px 6px; font-size: 10px; }
  .wallet-asset-hero .wallet-asset-icon { width: 24px; height: 24px; }
  .wallet-asset-hero > div > strong { font-size: 11px; }
  .wallet-asset-hero > small { font-size: 9px; }
  .wallet-detail-actions { height: 25px; margin: 3px 0; gap: 4px; }
  .wallet-detail-actions button { gap: 4px; font-size: 9px; }
  .wallet-detail-group { margin-bottom: 2px; padding: 0 5px 1px; }
  .wallet-detail-group legend { font-size: 9px; }
  .wallet-detail-group dl > div { min-height: 15px; padding: 0 2px; font-size: 9px; }
  .wallet-detail-group code { font-size: 9px; }
  .wallet-transfer-steps { height: 15px; margin-bottom: 1px; font-size: 9px; }
  #wallet-send-form .wallet-flow-body > label, .wallet-field-label, .wallet-amount-label { margin: 1px 0; font-size: 9px; }
  #wallet-send-recipient { height: 22px; font-size: 9px; }
  .wallet-send-asset { height: 22px; font-size: 10px; }
  .wallet-send-asset img { width: 14px; height: 14px; padding: 1px; }
  .wallet-amount-field { height: 25px; }
  .wallet-amount-field input { font-size: 14px; }
  .wallet-amount-field > span { font-size: 9px; }
  .wallet-send-estimate dl > div { min-height: 14px; }
  .wallet-inline-note { margin-top: 2px; font-size: 8px; }
  .wallet-inline-note svg { width: 13px; height: 13px; }
  .wallet-form-feedback { font-size: 9px; }
  .wallet-form-alert button { min-height: 16px; font-size: 8px; }
  .wallet-review-amount { min-height: 30px; margin-bottom: 2px; padding: 0 5px; font-size: 9px; }
  .wallet-review-amount > strong { margin: 0; }
  .wallet-review-amount > small { font-size: 8px; }
  .wallet-warning { margin-bottom: 2px; padding: 1px 4px; font-size: 8px; line-height: 1.25; }
  .wallet-review-check { gap: 4px; font-size: 8px; line-height: 1.2; }
  .wallet-transaction-hero { min-height: 34px; margin-bottom: 2px; padding: 0 2px; font-size: 9px; }
  .wallet-transaction-hero > span { margin: 0; }
  .wallet-transaction-hero > strong { margin: 0; }
  .wallet-transaction-hero > small { font-size: 8px; }
  .wallet-transaction-id { font-size: 9px; }
  .wallet-transaction-id > button { font-size: 9px; }
  .wallet-transaction-id > code { min-height: 22px; margin-top: 1px; padding: 1px 3px; font-size: 8px; }
  #wallet-bridge-review-panel .wallet-review-amount { min-height: 30px; }
  #wallet-bridge-review-panel .wallet-detail-group dl > div { min-height: 15px; }
  .wallet-bridge-directions { height: 22px; margin-bottom: 2px; }
  .wallet-bridge-balances { min-height: 25px; padding: 1px 6px; font-size: 8px; }
  .wallet-bridge-balances > div { gap: 0; }
  .wallet-bridge-balances strong { font-size: 9px; }
  .wallet-bridge-note { margin-top: 2px; padding: 1px 4px; font-size: 8px; line-height: 1.2; }
  .wallet-bridge-details { margin-top: 2px; padding-inline: 5px; }
  .wallet-bridge-details > div { min-height: 14px; font-size: 9px; }
  .wallet-bridge-details dd { font-size: 8px; }
  .wallet-bridge-refresh { min-height: 12px; font-size: 8px; }
  .wallet-bridge-unavailable { padding: 5px 7px; font-size: 10px; }
  .wallet-bridge-unavailable p { margin: 3px 0; line-height: 1.3; }
  .wallet-bridge-unavailable button { min-height: 22px; font-size: 9px; }
  .wallet-error { margin-bottom: 2px; padding: 2px 4px; font-size: 9px; line-height: 1.2; }
  .wallet-popover { top: 48px; padding: 6px; }
  .wallet-popover-heading { margin-bottom: 4px; }
  .wallet-notifications > p { margin-bottom: 4px; padding: 3px 5px; }
}
/* T4: phone landscape. The network status moves up beside the title, so everything below gets the height. */
@container (max-height: 390px) {
  .wallet-shell { --wallet-asset-row: 34px; --wallet-preview-row: 34px; --wallet-activity-row: 32px; --wallet-pager: 23px; --wallet-button: 24px; --wallet-big: 18px; --wallet-hero: 16px; }
  .wallet-phone-header { display: flex; align-items: stretch; }
  .wallet-appbar { flex: 1 1 auto; min-width: 0; height: 27px; margin: 1px 0 0 2px; padding: 0 3px; gap: 4px; }
  .wallet-app-icon { width: 15px; height: 15px; }
  .wallet-appbar h1 { font-size: 11px; }
  .wallet-help, .wallet-back { height: 20px; }
  .wallet-help { font-size: 13px; line-height: 1; }
  .wallet-back svg { width: 14px; height: 14px; }
  .wallet-networkbar { flex: 0 0 auto; height: auto; gap: 5px; padding: 1px 4px; font-size: 9px; }
  #wallet-chain-environment { padding: 0 3px; }
  .wallet-content { padding: 2px 6px 2px; }
  .wallet-overview-view { gap: 3px; }
  .wallet-address-strip { flex-basis: 18px; }
  #wallet-overview-address svg { width: 13px; height: 13px; }
  .wallet-overview { min-height: 50px; }
  .wallet-quick-actions { flex-basis: 26px; }
  .wallet-assets-preview .wallet-asset-row { max-height: 40px; }
  .wallet-asset-row { min-height: 30px; }
  .wallet-view-heading { min-height: 13px; padding: 0; }
  .wallet-view-heading h2 { display: none; }
  .wallet-view-heading > span { position: static; display: block; line-height: 13px; text-align: right; }
  .wallet-bridge-view .wallet-view-heading, .wallet-bridge-view[data-bridge-step="receipt"] .wallet-view-heading { display: none; }
  .wallet-flow-body .wallet-detail-group legend { display: none; }
  #wallet-bridge-review-panel .wallet-review-amount { min-height: 27px; }
  #wallet-bridge-review-panel .wallet-detail-group dl > div { min-height: 13px; line-height: 13px; }
  .wallet-activity-filters { flex-basis: 22px; }
  .wallet-activity-row { grid-template-columns: 19px minmax(0, 1fr) auto; }
  .wallet-activity-icon { width: 18px; height: 18px; }
  .wallet-activity-icon svg { width: 11px; height: 11px; }
  .wallet-bottom-nav { flex-basis: 29px; }
  .wallet-pagination button { min-height: 20px; }
  .wallet-load-more { min-height: 20px; }
  .wallet-setting-row { min-height: 17px; }
  .wallet-settings-actions button { min-height: 21px; }
  .wallet-popover { top: 30px; }
}
@media (max-width: 760px) {
  .wallet-window, .wallet-window.maximized { left: 6px; top: 6px; width: calc(100% - 12px); height: calc(100% - 12px); min-width: 0; min-height: 0; transform: none; }
  .wallet-window .window-title { font-size: 11px; }
}
@media (max-width: 520px) { #wallet-icon { top: 100px; } .wallet-shell { max-width: none; } }
/* A short screen gets the whole desktop: the window's margins would come straight out of the wallet. */
@media (max-height: 570px) { .wallet-window { --window-height: calc(100% - 12px); max-height: none; } .wallet-window, .wallet-window.maximized { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .wallet-shell *, .wallet-shell *::before, .wallet-shell *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
