:root {
  color-scheme: dark;
  --bg: #0b1117;
  --surface: #111b24;
  --surface-raised: #17232d;
  --surface-hover: #1b2a35;
  --ink: #edf4f6;
  --muted: #9caeb9;
  --dim: #728792;
  --line: #263641;
  --accent: #c8ef87;
  --accent-ink: #172719;
  --cyan: #7ed5df;
  --danger: #ffb0a4;
  --positive: #c8ef87;
  --negative: #f3aa9d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .43; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
a { color: inherit; text-decoration-color: #647b89; text-underline-offset: 3px; }
a:hover { color: var(--cyan); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
h1, h2, h3, p { overflow-wrap: break-word; }
h2 { margin: 0; font-size: 23px; line-height: 1.3; font-weight: 650; letter-spacing: -.65px; }
.app-shell { width: 100%; max-width: 1152px; margin: 0 auto; padding: env(safe-area-inset-top) 32px max(32px, env(safe-area-inset-bottom)); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 30px 0 32px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand img { border-radius: 13px; }
.brand-name { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.7px; }
.brand-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.maker-tag { padding: 7px 9px; border: 1px solid #354641; border-radius: 7px; color: var(--accent); font-size: 14px; font-weight: 750; letter-spacing: -.5px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 12px; color: var(--muted); background: transparent; font-size: 30px; line-height: 1; }
.icon-button:hover { color: var(--ink); background: var(--surface-raised); }
#balance-visibility-button[aria-pressed="true"] { color: var(--accent); background: #22352c; }
.balances-hidden #history-chart, .balances-hidden #chart-legend, .balances-hidden .chart-scrubber { display: none !important; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 18px; align-items: stretch; }
.balance-card { position: relative; min-width: 0; overflow: hidden; background: linear-gradient(115deg, #173140, #15262e 74%); border: 1px solid #2c4652; border-radius: 24px; padding: 27px 30px 24px; box-shadow: 0 12px 50px #00000018; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
h1 { margin: 0; font-size: 16px; font-weight: 500; color: #d1e0e6; }
.network-pill { white-space: nowrap; padding: 6px 10px; border: 1px solid #c8ef8734; border-radius: 30px; background: #c8ef870a; color: #d3e7bc; font-size: 12px; }
.total-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 11px; margin-top: 24px; }
.total-amount { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -1.8px; line-height: 1.12; overflow-wrap: anywhere; }
.total-amount.long { font-size: clamp(1.65rem, 3.8vw, 2.65rem); }
.total-unit { font-size: 18px; font-weight: 500; color: var(--accent); }
.total-fiat { display: flex; flex-wrap: wrap; gap: 15px 32px; margin-top: 21px; }
.total-fiat > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.currency-label { font-size: 12px; font-weight: 600; letter-spacing: .8px; color: #a9bcc6; }
.total-fiat strong { font-size: 23px; font-weight: 550; font-variant-numeric: tabular-nums; letter-spacing: -.55px; overflow-wrap: anywhere; }
.total-description { color: #b4c5cd; margin: 17px 0 18px; font-size: 14px; line-height: 1.5; }
.balance-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 21px; padding-top: 17px; border-top: 1px solid #ffffff12; }
.balance-breakdown > div { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.balance-breakdown span { color: #adc1cb; font-size: 13px; }
.balance-breakdown strong { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hero-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.update-status { display: flex; align-items: center; gap: 6px; color: #a6bdc8; font-size: 13px; line-height: 1.5; }
.update-status svg { width: 16px; height: 16px; }
.refresh-button { display: flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; min-height: 45px; border: 0; border-radius: 12px; padding: 11px 16px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 650; }
.refresh-button svg { width: 18px; height: 18px; }
.refresh-button.busy { opacity: .82; }
.busy svg { animation: spin 1.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.refresh-progress { margin-top: 18px; }
.progress-track { height: 4px; overflow: hidden; border-radius: 4px; background: #ffffff15; }
.progress-track > div { width: 0; height: 100%; background: var(--accent); transition: width .25s; }
.progress-text { display: flex; justify-content: space-between; align-items: center; color: #b5c9d2; font-size: 13px; }
.progress-text button { min-width: 44px; min-height: 44px; border: 0; padding: 10px 2px; color: var(--accent); background: none; font-size: 14px; }
.market-card { display: flex; flex-direction: column; min-width: 0; padding: 27px 26px 20px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.market-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.eyebrow { display: block; margin-bottom: 7px; color: #8fa9b7; font-size: 11px; font-weight: 650; letter-spacing: 1.6px; }
.market-heading h2 { font-size: 23px; }
.coin-symbol { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid #334a43; border-radius: 50%; color: var(--accent); background: #182a26; font-size: 27px; font-weight: 500; }
.market-rates { display: grid; gap: 20px; margin: 26px 0 20px; }
.market-rates > div { min-width: 0; }
.market-rates dt { display: flex; gap: 7px; align-items: center; margin-bottom: 7px; color: var(--muted); font-size: 14px; }
.market-rates dt span { color: #718b98; font-size: 12px; }
.market-rates dd { margin: 0; font-size: 29px; font-weight: 550; letter-spacing: -.8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.market-bottom { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: auto; }
.market-bottom p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.market-bottom .icon-button { width: 40px; height: 44px; }
.market-bottom svg { width: 18px; height: 18px; }
.market-note { margin: 5px 0 0; color: #839aa7; font-size: 12px; line-height: 1.5; }
.notice { margin: 16px 0 0; padding: 14px 16px; border: 1px solid #304a5c; border-radius: 12px; background: #152936; color: #c0d9e7; font-size: 14px; line-height: 1.6; }
.notice.warning { color: #f2c4ab; background: #32241e; border-color: #63402d; }
.notice.success { color: #d1e8ae; background: #24331e; border-color: #405538; }
#storage-warning { margin: 0 0 17px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 19px; }
.section-heading h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.section-heading p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 7px 0 0; }
.primary-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 11px; border: 1px solid transparent; padding: 11px 17px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.primary-button { color: var(--accent-ink); background: var(--accent); }
.primary-button:hover { background: #d5f6a7; }
.secondary-button { color: #d4e2e8; background: var(--surface-raised); border-color: var(--line); }
.secondary-button:hover { background: #20323e; border-color: #49616e; }
.danger-button { color: var(--danger); background: #39231f; border-color: #5e3530; white-space: normal; }
.primary-button svg, .secondary-button svg { width: 18px; height: 18px; }
.plus { font-size: 23px; font-weight: 400; line-height: 18px; }
.groups-section { margin-top: 35px; }
.groups-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(225px, 1fr); gap: 12px; overflow-x: auto; padding: 0 1px 7px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #3b505d transparent; }
.group-card { display: flex; flex-direction: column; align-items: stretch; gap: 9px; text-align: left; min-width: 0; min-height: 170px; border: 1px solid var(--line); border-radius: 16px; padding: 20px; color: var(--ink); background: var(--surface); scroll-snap-align: start; }
.group-card:hover { background: var(--surface-raised); border-color: #465d68; }
.group-card.active, .group-card.selected, .group-card[aria-pressed="true"] { background: #1a2a28; border-color: #78994f; box-shadow: inset 0 0 0 1px #c8ef8722; }
.group-name { display: block; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.group-count { display: block; font-size: 13px; color: var(--muted); }
.group-balance { display: block; margin-top: 5px; font-size: 23px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.6px; overflow-wrap: anywhere; }
.group-balance small, .group-balance .unit { font-size: 13px; color: var(--accent); font-weight: 500; }
.group-fiat { display: block; color: #b9cbd4; font-size: 14px; line-height: 1.7; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.group-status { display: block; color: var(--dim); font-size: 12px; line-height: 1.4; }
.groups-empty { grid-column: 1 / -1; min-height: 88px; display: flex; align-items: center; border: 1px dashed #344854; border-radius: 16px; padding: 20px; color: var(--muted); background: #101a23; font-size: 15px; line-height: 1.6; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 25px; }
.history-section { margin-top: 29px; }
.history-actions { display: flex; align-items: center; gap: 10px; }
.chart-controls { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(92px,.65fr) minmax(92px,.65fr) minmax(190px,1.25fr); gap: 11px; margin-top: 23px; }
.select-field { display: block; min-width: 0; }
.select-field > span:first-child { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.select-wrap { display: block; position: relative; min-width: 0; }
select { appearance: none; -webkit-appearance: none; display: block; width: 100%; min-height: 46px; border: 1px solid #344852; border-radius: 10px; padding: 10px 36px 10px 12px; color: #d6e3e9; background: #101a22; font-size: 16px; text-overflow: ellipsis; }
.select-wrap > svg { position: absolute; pointer-events: none; top: 50%; right: 13px; transform: translateY(-50%); width: 13px; height: 13px; color: #91a6b1; }
.history-status { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 17px 0 20px; }
.history-status.error, .history-status.warning { color: #f0b697; }
.chart-summary { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.chart-summary > div { min-width: 0; }
.chart-summary > div > span { display: block; color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.chart-summary strong { display: block; font-size: 29px; line-height: 1.3; font-weight: 600; letter-spacing: -.9px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.chart-change { color: var(--muted); font-size: 14px; line-height: 1.6; text-align: right; font-variant-numeric: tabular-nums; }
.positive, .in, .chart-change.positive { color: var(--positive); }
.negative, .out, .chart-change.negative { color: var(--negative); }
.neutral { color: var(--muted); }
.chart-stage { position: relative; min-height: 250px; margin: 15px -4px 0; }
.history-chart { min-width: 0; }
.history-chart:empty { display: none; }
.history-chart svg { display: block; width: 100%; height: auto; max-height: 380px; overflow: visible; }
.history-chart text { font-family: inherit; letter-spacing: 0; font-size: 12px; }
.chart-grid { stroke: #2b3b46; stroke-width: 1; stroke-dasharray: 3 5; }
.chart-label { fill: #8da4b2; stroke: none; }
.chart-line { stroke: var(--accent); stroke-width: 2.5; fill: none; }
.chart-area { stroke: none; fill: #c8ef8711; }
.flow-in { fill: #7ed5df80; stroke: none; }
.flow-out { fill: #f3aa9d88; stroke: none; }
.chart-point { fill: var(--accent); stroke: #111b24; stroke-width: 3; }
.chart-empty { min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); border-radius: 14px; background: linear-gradient(180deg,transparent,#0c151c40); padding: 25px 10px; }
.chart-empty > svg { width: 39px; height: 39px; color: #627e8d; margin-bottom: 14px; }
.chart-empty h3 { font-size: 17px; font-weight: 600; color: #c6d6de; margin: 0; }
.chart-empty p { font-size: 14px; line-height: 1.6; margin: 8px 0 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; color: var(--muted); font-size: 13px; margin: 13px 0 5px; }
.chart-legend > span { display: flex; align-items: center; gap: 7px; }
.legend-line { width: 17px; height: 2px; border-radius: 1px; background: var(--accent); }
.legend-bar { width: 10px; height: 10px; border-radius: 2px; background: #7ed5df90; }
.chart-scrubber { display: block; margin: 2px 0 11px; }
.chart-scrubber input { width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent); }
.chart-scrubber input:disabled { opacity: .25; }
.chart-inspector { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; background: #0e1820; border: 1px solid #253741; border-radius: 12px; padding: 15px; }
.chart-inspector > div { min-width: 0; }
.chart-inspector span { display: block; color: #899fab; font-size: 12px; margin-bottom: 7px; }
.chart-inspector strong { font-size: 14px; line-height: 1.5; font-weight: 550; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.method-note { color: #8fa5b1; font-size: 13px; line-height: 1.6; margin: 16px 0 0; }
.addresses-section { margin-top: 34px; }
.count-pill { font-size: 12px; font-weight: 600; letter-spacing: 0; padding: 4px 7px; border: 1px solid #344650; border-radius: 6px; color: #9db4c1; background: #19252f; }
.list-controls { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(130px,.7fr) minmax(150px,.7fr); gap: 10px; margin-bottom: 13px; }
.search-box { display: flex; align-items: center; gap: 8px; min-width: 0; height: 47px; border: 1px solid #344852; border-radius: 11px; padding: 0 12px; background: #101a22; }
.search-box svg { width: 18px; height: 18px; color: #8097a4; }
.search-box input { border: 0; outline: none; color: var(--ink); background: transparent; width: 100%; min-width: 0; height: 100%; font-size: 16px; }
.search-box input::placeholder { color: #849aa6; font-size: 14px; }
.selection-controls { margin: 0 0 13px; }
.selection-controls.selecting { position: sticky; top: max(10px,env(safe-area-inset-top)); z-index: 5; }
.selection-start { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.selection-start > span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.selection-start button { flex-shrink: 0; }
.bulk-group-form { padding: 13px 18px 18px; border: 1px solid #567041; border-radius: 16px; background: #172724; box-shadow: 0 8px 24px #0005; }
.bulk-selection-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.select-shown-label { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; cursor: pointer; font-size: 14px; }
.selection-checkbox { appearance: auto; -webkit-appearance: checkbox; width: 21px; height: 21px; margin: 0; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.selection-checkbox:disabled { cursor: default; opacity: .5; }
.selection-count { margin: 5px 0 15px; color: var(--accent); font-size: 14px; line-height: 1.5; }
.bulk-assignment { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; }
.bulk-assignment .primary-button { min-height: 46px; }
.address-list { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; }
.address-list:empty { display: none; }
.address-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 100px; padding: 18px 22px; border: 0; border-bottom: 1px solid #24343f; color: var(--ink); background: var(--surface); text-align: left; }
.address-row:last-child { border-bottom: 0; }
.address-row:hover { background: #172630; }
.address-row.selectable { cursor: pointer; }
.address-row.is-selected { background: #20312a; box-shadow: inset 3px 0 0 var(--accent); }
.address-selection { display: flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; flex-shrink: 0; }
.address-symbol { width: 38px; height: 42px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #20323b; color: #8cb1bf; border-radius: 12px; }
.address-symbol svg { width: 19px; height: 19px; }
.row-info { flex: 1; min-width: 0; }
.row-name { display: block; font-size: 16px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row-address { display: block; color: #8099a7; font-size: 12px; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; margin-top: 7px; }
.row-group { display: inline-block; max-width: 100%; margin-top: 7px; padding: 3px 7px; background: #273c41; color: #b6cdd1; border-radius: 5px; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; vertical-align: bottom; }
.row-value { flex-shrink: 0; max-width: 58%; text-align: right; font-variant-numeric: tabular-nums; }
.row-amount { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.3px; overflow-wrap: anywhere; }
.row-fiat { display: block; color: #b1c4ce; font-size: 14px; line-height: 1.6; margin-top: 4px; overflow-wrap: anywhere; }
.row-unit { display: block; color: #839ca9; font-size: 12px; line-height: 1.5; margin-top: 5px; }
.row-unit.error { color: #e8a184; }
.row-unit.saved { color: #beac81; }
.row-value.unknown .row-amount { color: #7e98a5; }
.row-chevron { width: 14px; height: 14px; color: #6c8794; }
.row-chevron svg { width: 14px; height: 14px; }
.empty-state { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px 18px; }
.empty-graphic { display: grid; place-items: center; position: relative; width: 83px; height: 83px; border: 1px solid #41553a; border-radius: 24px; background: #24351f; margin: 0 auto 21px; }
.empty-graphic svg { width: 59px; height: 59px; stroke: #b9d495; stroke-width: 1.8; }
.graphic-plus { position: absolute; right: -7px; bottom: 2px; width: 30px; height: 30px; border: 3px solid var(--surface); border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 23px; line-height: 23px; }
.empty-state h3 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.5px; }
.empty-state p { margin: 11px 0 21px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.empty-note { display: block; color: #8ca4b1; font-size: 13px; margin-top: 15px; }
.list-footer { display: flex; justify-content: flex-end; align-items: center; gap: 25px; margin-top: 8px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; border: 0; padding: 10px 3px; background: transparent; color: #a7bdc9; font-size: 14px; }
.text-button svg { width: 17px; height: 17px; }
.text-button:hover { color: var(--accent); }
.no-results { padding: 30px 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--muted); font-size: 15px; text-align: center; }
.transactions-section { margin-top: 25px; }
.transactions-section .section-heading { margin-bottom: 16px; }
.transactions-list:empty { display: none; }
.transaction-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 14px; text-decoration: none; }
.transaction-row:last-child { border-bottom: 0; }
.transaction-info { flex: 1; min-width: 0; }
.transaction-name { display: block; color: #d4e1e8; font-size: 15px; font-weight: 550; line-height: 1.5; overflow-wrap: anywhere; }
.transaction-date { display: block; color: #8aa2af; font-size: 12px; line-height: 1.6; margin-top: 4px; }
.transaction-value { max-width: 55%; flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; }
.transaction-amount { display: block; font-size: 15px; font-weight: 550; line-height: 1.5; overflow-wrap: anywhere; }
.transaction-row.in .transaction-amount { color: var(--positive); }
.transaction-row.out .transaction-amount { color: var(--negative); }
.transaction-fiat { display: block; color: #9bb3c0; font-size: 14px; line-height: 1.6; margin-top: 4px; }
.transactions-empty { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 20px 4px; color: #8ba4b2; }
.transactions-empty svg { width: 22px; height: 22px; }
.transactions-empty p { margin: 0; font-size: 14px; line-height: 1.6; }
.page-footer { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 39px 0 0; padding: 27px 0 8px; border-top: 1px solid #243540; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 21px; text-align: left; }
.j42-mark { font-size: 39px; font-weight: 800; font-style: italic; letter-spacing: -3px; color: #dbe8ed; line-height: 1; }
.j42-mark > span { color: var(--accent); }
.footer-brand strong { display: block; color: #d9e5e9; font-size: 15px; font-weight: 600; }
.footer-brand div > span { display: block; color: #95adba; margin-top: 5px; font-size: 13px; }
.privacy-line { display: flex; align-items: center; justify-content: center; gap: 7px; color: #92aab7; font-size: 13px; line-height: 1.6; margin: 0; }
.privacy-line svg { width: 14px; height: 14px; }
.data-credits, .copyright { margin: 8px 0 0; color: #79929f; font-size: 12px; line-height: 1.7; }
.copyright { margin-top: 14px; }
.sheet { color: var(--ink); background: #131f28; border: 1px solid #354954; border-radius: 22px; padding: 28px; width: min(580px,calc(100% - 32px)); box-shadow: 0 20px 80px #0008; max-height: calc(100dvh - 40px); overflow: auto; overscroll-behavior: contain; }
.sheet::backdrop { background: #050b12b0; backdrop-filter: blur(5px); }
.sheet-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.sheet-heading h2 { font-size: 24px; }
.sheet-heading .icon-button { margin-right: -8px; }
.sheet-intro { margin: 12px 0 21px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.field-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #ccdce4; margin: 0 0 10px; }
.field-label > span { font-size: 12px; color: #8ba4b2; font-weight: 400; }
textarea, .text-input { width: 100%; border: 1px solid #344a56; border-radius: 11px; padding: 12px 13px; color: var(--ink); background: #0e1922; font-size: 16px; line-height: 1.6; resize: vertical; }
textarea { min-height: 150px; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; }
textarea::placeholder, .text-input::placeholder { color: #718d9c; }
.text-input { margin-bottom: 18px; }
.sheet-select { margin-bottom: 19px; }
.sheet-select select { background: #0e1922; min-height: 50px; }
.field-help, .fine-print { margin: 10px 0 0; color: #8aa4b2; font-size: 13px; line-height: 1.6; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.sheet-actions .primary-button { flex: 1; }
.sheet-actions .secondary-button { flex: .6; }
.fine-print { margin-top: 16px; }
.full-address { display: flex; align-items: center; gap: 7px; padding: 11px 12px; border: 1px solid #2c414d; border-radius: 11px; background: #0f1a22; }
.full-address code { flex: 1; min-width: 0; color: #abc2cf; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.full-address .text-button { flex-shrink: 0; padding: 10px 4px; }
.detail-status { color: #9cb3c1; font-size: 13px; line-height: 1.6; margin: 12px 0; }
.detail-status.error { color: #efb297; }
.detail-balances { margin: 19px 0 12px; }
.detail-balances > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid #283c47; }
.detail-balances dt { color: var(--muted); font-size: 14px; }
.detail-balances dd { color: #dbe8ee; margin: 0; text-align: right; font-size: 15px; font-weight: 550; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.detail-balances > div:first-child dt, .detail-balances > div:first-child dd { font-size: 17px; color: var(--ink); }
.detail-balances .fiat-detail dd { color: var(--accent); }
.detail-links { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.explorer-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--cyan); font-size: 14px; }
.detail-actions .primary-button, .detail-actions .danger-button { flex: 1; }
.group-list-editor { display: flex; flex-direction: column; gap: 12px; margin: 0 0 25px; }
.group-editor-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 13px; border: 1px solid #304651; border-radius: 12px; background: #0f1b24; }
.group-editor-row input { flex: 1; min-width: 80px; width: 100%; min-height: 44px; margin: 0; border: 1px solid #344a56; border-radius: 8px; padding: 8px 10px; color: var(--ink); background: #142530; font-size: 16px; }
.group-editor-row button { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 11px; border: 1px solid #3b5260; border-radius: 9px; color: #c7dce6; background: #223641; font-size: 14px; }
.group-editor-row .group-delete { color: var(--danger); background: #34211d; border-color: #633c31; }
.group-editor-row .group-count { width: 100%; }
.create-group-form { border-top: 1px solid #2d424e; padding-top: 21px; margin-top: 10px; }
.create-group-row { display: flex; gap: 9px; align-items: stretch; }
.create-group-row input { flex: 1; min-width: 0; margin: 0; }
.create-group-row button { flex-shrink: 0; }
.full-width { width: 100%; margin-top: 15px; }
.help-sheet h3 { color: #dce8ec; font-size: 18px; letter-spacing: -.4px; margin: 25px 0 10px; }
.help-sheet p, .install-steps { color: var(--muted); font-size: 16px; line-height: 1.7; }
.install-steps { padding-left: 23px; }
.install-steps li { padding-left: 4px; margin: 11px 0; }
.install-steps strong { color: var(--ink); font-weight: 600; }
.help-sheet .help-note { color: #a7c0cd; background: #1a303b; border: 1px solid #304d5c; border-radius: 12px; padding: 13px; font-size: 14px; }
.help-sheet .help-brand { color: #a6bdc7; font-size: 13px; line-height: 1.8; }
.toast { display: flex; align-items: center; gap: 18px; position: fixed; left: 50%; bottom: max(23px,env(safe-area-inset-bottom)); z-index: 20; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); border: 1px solid #52705e; border-radius: 13px; padding: 14px 18px; color: #edf7e3; background: #243a2c; box-shadow: 0 6px 36px #0007; font-size: 14px; line-height: 1.5; }
.toast button { min-height: 36px; border: 0; padding: 3px; color: var(--accent); background: none; font-weight: 650; }
.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: absolute; left: 10px; top: -60px; padding: 10px; z-index: 99; color: var(--bg); background: var(--accent); }
.skip-link:focus { top: 10px; }
@media (max-width: 900px) {
  .overview-grid { grid-template-columns: minmax(0,1.5fr) minmax(260px,1fr); gap: 14px; }
  .balance-card { padding: 24px; }
  .market-card { padding: 24px 21px 19px; }
  .chart-controls { grid-template-columns: minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr); }
  .chart-mode-field { grid-column: 1 / -1; }
  .chart-mode-field .select-wrap { max-width: 340px; }
}
@media (max-width: 700px) {
  .app-shell { padding-left: 21px; padding-right: 21px; }
  .overview-grid { grid-template-columns: 1fr; gap: 12px; }
  .market-card { padding: 19px 22px 15px; border-radius: 19px; }
  .market-heading .eyebrow { margin-bottom: 0; }
  .market-heading h2 { display: inline; font-size: 18px; }
  .market-heading > div { display: flex; align-items: center; gap: 12px; }
  .coin-symbol { display: none; }
  .market-rates { grid-template-columns: 1fr 1fr; gap: 19px; margin: 18px 0 5px; }
  .market-rates dd { font-size: 27px; }
  .market-rates dt { font-size: 13px; }
  .market-bottom { margin-top: 4px; }
  .market-note { margin-top: 0; }
  .chart-controls { grid-template-columns: 1fr 1fr; }
  .chart-scope-field, .chart-mode-field { grid-column: 1 / -1; }
  .chart-mode-field .select-wrap { max-width: none; }
  .list-controls { grid-template-columns: 1fr 1fr; }
  .search-box { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .app-shell { padding-left: 17px; padding-right: 17px; }
  .topbar { padding: 24px 0 25px; }
  .brand { gap: 10px; }
  .brand img { width: 38px; height: 38px; border-radius: 11px; }
  .brand-name { font-size: 20px; }
  .brand-sub { font-size: 12px; margin-top: 4px; }
  .header-actions { gap: 5px; }
  .maker-tag { font-size: 12px; padding: 6px 7px; }
  .header-actions .icon-button { width: 38px; }
  .balance-card { border-radius: 21px; padding: 22px 21px 21px; }
  .hero-top { gap: 7px; }
  h1 { font-size: 15px; }
  .network-pill { padding: 5px 8px; font-size: 11px; }
  .total-line { gap: 8px; margin-top: 24px; }
  .total-amount { font-size: clamp(1.9rem,7.4vw,2.3rem); letter-spacing: -1.15px; }
  .total-amount.long { font-size: clamp(1.6rem,6.3vw,2rem); }
  .total-unit { font-size: 16px; }
  .total-fiat { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
  .total-fiat strong { font-size: 21px; letter-spacing: -.55px; }
  .total-description { margin-top: 18px; font-size: 14px; }
  .balance-breakdown { gap: 12px; margin-bottom: 18px; }
  .balance-breakdown span { font-size: 12px; }
  .balance-breakdown strong { font-size: 14px; }
  .update-status { font-size: 12px; max-width: 61%; }
  .refresh-button { padding: 11px 13px; }
  .market-card { padding: 17px 20px 14px; }
  .market-heading > div { gap: 10px; }
  .market-heading .eyebrow { font-size: 10px; letter-spacing: 1.3px; }
  .market-heading h2 { font-size: 16px; }
  .market-rates { margin-top: 17px; gap: 10px; }
  .market-rates dd { font-size: 25px; }
  .market-rates dt { gap: 5px; font-size: 14px; }
  .market-rates dt span { font-size: 11px; }
  .market-bottom p { font-size: 12px; }
  .market-note { font-size: 11px; }
  h2 { font-size: 21px; }
  .section-heading { gap: 10px; margin-bottom: 16px; }
  .section-heading p { font-size: 14px; }
  .section-heading .primary-button, .section-heading .secondary-button { min-height: 44px; font-size: 14px; padding: 10px 12px; }
  .section-heading .secondary-button svg { display: none; }
  .groups-section { margin-top: 29px; }
  .groups-list { grid-auto-columns: minmax(240px,72%); gap: 10px; padding-bottom: 9px; }
  .group-card { min-height: 166px; padding: 18px; border-radius: 14px; }
  .group-balance { font-size: 21px; }
  .panel { padding: 20px 17px; border-radius: 19px; }
  .history-section { margin-top: 24px; }
  .history-section .section-heading { align-items: flex-start; }
  .history-section h2 { font-size: 21px; }
  .history-section .eyebrow { font-size: 10px; margin-bottom: 6px; letter-spacing: 1.2px; }
  .history-actions { flex-direction: column-reverse; gap: 1px; align-items: flex-end; }
  .history-actions .text-button { min-height: 32px; padding: 5px 2px; }
  .chart-controls { gap: 11px; margin-top: 19px; }
  .select-field > span:first-child { font-size: 14px; margin-bottom: 7px; }
  select { font-size: 16px; min-height: 46px; }
  .history-status { font-size: 14px; margin: 15px 0 18px; }
  .chart-summary strong { font-size: 27px; }
  .chart-summary > div > span { font-size: 13px; }
  .chart-change { font-size: 13px; max-width: 45%; }
  .chart-stage { min-height: 210px; margin-left: -6px; margin-right: -6px; }
  .chart-empty { min-height: 210px; }
  .chart-empty p { font-size: 13px; }
  .chart-legend { font-size: 12px; gap: 17px; }
  .chart-inspector { grid-template-columns: 1fr 1fr; padding: 14px; gap: 16px 12px; }
  .chart-inspector strong { font-size: 14px; }
  .method-note { font-size: 12px; }
  .addresses-section { margin-top: 29px; }
  .section-heading h2 { gap: 7px; }
  .count-pill { font-size: 11px; padding: 4px 6px; }
  .list-controls { gap: 8px; }
  .selection-start { gap: 10px; }
  .selection-start > span { max-width: 46%; }
  .selection-start button { font-size: 14px; padding: 10px 12px; }
  .bulk-group-form { padding: 9px 14px 14px; }
  .bulk-assignment { grid-template-columns: 1fr; gap: 11px; }
  .selection-count { margin-bottom: 12px; }
  .address-row { gap: 11px; padding: 17px 14px; min-height: 106px; }
  .address-symbol { width: 31px; height: 36px; border-radius: 10px; }
  .address-symbol svg { width: 17px; height: 17px; }
  .row-name { font-size: 15px; }
  .row-address { font-size: 11px; }
  .row-group { font-size: 11px; padding: 3px 6px; }
  .row-amount { font-size: 14px; }
  .row-fiat { font-size: 14px; line-height: 1.6; }
  .row-unit { font-size: 11px; }
  .row-chevron { display: none; }
  .list-footer { justify-content: center; gap: 30px; }
  .transactions-section { margin-top: 22px; }
  .transaction-row { gap: 10px; padding: 16px 0; }
  .transaction-name { font-size: 14px; }
  .transaction-amount { font-size: 14px; }
  .transaction-fiat { font-size: 14px; }
  .transaction-date { font-size: 11px; }
  .transactions-empty { justify-content: flex-start; gap: 10px; }
  .transactions-empty p { font-size: 13px; }
  .page-footer { margin-top: 30px; padding-top: 27px; }
  .privacy-line { font-size: 12px; }
  .data-credits, .copyright { font-size: 11px; }
  .sheet { width: 100%; max-width: 100%; margin: auto 0 0; padding: 23px 21px max(26px,env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; border-bottom: 0; max-height: 92dvh; }
  .sheet-heading h2 { font-size: 23px; }
  .sheet-intro { font-size: 16px; }
  .field-label > span { font-size: 11px; }
  .sheet-actions { gap: 9px; }
  .sheet-actions .primary-button, .sheet-actions .secondary-button { font-size: 14px; padding-left: 13px; padding-right: 13px; }
  .detail-actions .danger-button { font-size: 13px; padding-left: 10px; padding-right: 10px; }
  .detail-balances dd { font-size: 14px; }
  .detail-balances > div:first-child dt, .detail-balances > div:first-child dd { font-size: 16px; }
  .group-editor-row { gap: 7px; padding: 11px; }
  .group-editor-row input { flex-basis: 100%; }
  .group-editor-row button { flex: 1; }
  .group-editor-row .group-count { width: auto; flex: 1; }
  .create-group-row { gap: 8px; }
  .create-group-row .primary-button { font-size: 14px; padding-left: 13px; padding-right: 13px; }
  .toast { font-size: 13px; }
}
@media (max-width: 410px) {
  .address-symbol { display: none; }
  .row-value { max-width: 58%; }
  .maker-tag { display: none; }
  .total-fiat strong { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* BalanceSV identity: restrained ink, mint and clear typographic hierarchy. */
:root { --accent: #b9ed91; --positive: #b9ed91; --cyan: #8ddde0; }
.brand-name { font-size: 25px; letter-spacing: -1px; font-weight: 750; }
.brand img { width: 48px; height: 48px; border-radius: 13px; }
.balance-card { background: linear-gradient(125deg,#18343e,#14262e 75%); }
.network-pill, .currency-label, .balance-breakdown span, .update-status { font-size:14px; }
#update-notice { display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
@media(max-width:420px) { .brand-name {font-size:22px} .brand-sub{max-width:175px;line-height:1.4} .header-actions{gap:4px} .topbar .maker-tag{display:none} }

.wordmark{display:inline-flex;align-items:baseline;gap:1px;letter-spacing:-1.8px;font-size:36px;line-height:1.1}.wordmark>span{font-family:Georgia,'Times New Roman',serif;font-style:italic;font-weight:500}.wordmark>b{font-family:Arial,sans-serif;font-style:normal;font-weight:800;font-size:.78em;letter-spacing:-1.8px;color:var(--accent)}.legal-links{display:flex;flex-wrap:wrap;gap:20px;margin:20px 0 12px;font-size:14px}.company-statement{max-width:720px;color:var(--muted);font-size:14px;line-height:1.6}.legal-page{max-width:820px;margin:0 auto;padding:40px 24px 80px}.legal-page h1{font-size:36px;color:var(--ink);margin:32px 0 16px}.legal-page h2{font-size:23px;margin:32px 0 12px}.legal-page p,.legal-page li{font-size:16px;line-height:1.75;color:var(--muted)}.legal-page strong{color:var(--ink)}.legal-page .legal-nav{display:flex;flex-wrap:wrap;gap:20px;margin-top:32px}.legal-page .notice{margin:24px 0}.legal-page .brand{margin-bottom:28px}@media(max-width:420px){.brand-name.wordmark{font-size:31px}.brand-sub{font-size:14px}}

/* Refined sans-serif BalanceSV wordmark; uppercase SV throughout. */
.brand-name.wordmark{font-family:"Arial", "Helvetica Neue",sans-serif;font-size:34px;font-weight:600;letter-spacing:-1.65px;gap:3px}.wordmark>span{font-family:inherit;font-style:normal;font-weight:600}.wordmark>b{font-family:inherit;font-style:normal;font-weight:800;font-size:1em;letter-spacing:-1.8px;color:var(--accent)}.legal-page .brand{text-decoration:none}@media(max-width:420px){.brand-name.wordmark{font-size:29px;gap:2px}}
