/* UTN Wallet. Graphite, UTN red #E11D2E, white. Flat mark, no gradients on the logo. */
@font-face { font-family: "Inter"; src: url("fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --red: #E11D2E; --red-d: #C3172A; --red-soft: rgba(225,29,46,.14);
  --bg: #0C0D10; --s1: #141519; --s2: #1A1C21; --s3: #22252B; --line: rgba(var(--ink-rgb),.07); --line2: rgba(var(--ink-rgb),.12);
  --fg: #F6F7F9; --fg2: #C9CDD4; --mut: #8A909B; --ok: #34C77B; --warn: #F2A93B; --err: #FF5A67;
  --r: 20px; --r-sm: 14px; --tab: 64px; --ease: cubic-bezier(.2,.8,.2,1);
  --fg-rgb: 246,247,249; --ink-rgb: 255,255,255; --glass: rgba(12,13,16,.78); --glass2: rgba(12,13,16,.86);
  --skel-a: #1E2026; --skel-b: #2A2D34; --skel-c: #1A1C21; --skel-d: #24272D;
  --hero-a: #1F2228; --hero-b: #141519; --hero-glow: rgba(225,29,46,.26);
  --sh-hero: 0 30px 60px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06); --sh-qr: 0 24px 50px -24px rgba(0,0,0,.9);
  --sh-sheet: 0 -20px 60px rgba(0,0,0,.5); --sh-toast: 0 16px 40px -12px rgba(0,0,0,.7); --sh-bar: 0 18px 40px -12px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.05);
  --sh-menu: 0 24px 60px -16px rgba(0,0,0,.8);
  --addr-bg: rgba(0,0,0,.28); --addr-bg-h: rgba(0,0,0,.45); --overlay: rgba(4,5,7,.62); --toast-bg: rgba(34,37,43,.94); --bar-bg: rgba(26,28,33,.72);
  --warn-fg: #F5D9A8; --warn-sub: #C9B48F; --brand-sub: #A4A9B4; --ph: #5D636E; --soon: #545A66;
  color-scheme: dark;
}
/* Light theme: same structure, graphite ink on white. Dark (above) is the reference. */
:root[data-theme="light"] {
  --red-soft: rgba(225,29,46,.10);
  --bg: #F3F4F6; --s1: #FFFFFF; --s2: #F4F5F7; --s3: #EAECEF; --line: rgba(12,13,16,.07); --line2: rgba(12,13,16,.11);
  --fg: #0C0D10; --fg2: #3A3F48; --mut: #6A707B; --ok: #12A15C; --warn: #B26A00; --err: #D72638;
  --fg-rgb: 12,13,16; --ink-rgb: 12,13,16; --glass: rgba(243,244,246,.78); --glass2: rgba(243,244,246,.86);
  --skel-a: #ECEEF1; --skel-b: #F7F8FA; --skel-c: #EEF0F3; --skel-d: #F8F9FB;
  --hero-a: #FFFFFF; --hero-b: #F7F8FA; --hero-glow: rgba(225,29,46,.13);
  --sh-hero: 0 1px 2px rgba(16,24,40,.04), 0 24px 50px -28px rgba(16,24,40,.22); --sh-qr: 0 18px 40px -22px rgba(16,24,40,.3);
  --sh-sheet: 0 -16px 50px rgba(16,24,40,.14); --sh-toast: 0 14px 34px -12px rgba(16,24,40,.25); --sh-bar: 0 14px 34px -12px rgba(16,24,40,.22), inset 0 1px 0 rgba(255,255,255,.7);
  --sh-menu: 0 22px 50px -18px rgba(16,24,40,.28);
  --addr-bg: rgba(12,13,16,.035); --addr-bg-h: rgba(12,13,16,.07); --overlay: rgba(12,13,16,.32); --toast-bg: rgba(255,255,255,.94); --bar-bg: rgba(255,255,255,.72);
  --warn-fg: #6E4300; --warn-sub: #8A6420; --brand-sub: #5B616E; --ph: #A0A5AE; --soon: #B8BCC4;
  color-scheme: light;
}
:root[data-theme="light"] .card, :root[data-theme="light"] .features { box-shadow: 0 1px 2px rgba(16,24,40,.04); }
:root[data-theme="light"] .feature div, :root[data-theme="light"] .grow small { color: var(--mut); }
html.theming, html.theming * { transition: background-color .3s ease, border-color .3s ease, color .3s ease, fill .3s ease !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100dvh; }
a { color: var(--fg); text-decoration-color: rgba(var(--ink-rgb),.3); text-underline-offset: 3px; }
h1 { font-size: 28px; line-height: 1.15; margin: 0; letter-spacing: -.025em; font-weight: 700; }
h2 { font-size: 15px; margin: 0; color: var(--fg); font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: rgba(225,29,46,.35); }
.icon { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.boot { display: grid; place-items: center; min-height: 100dvh; }
.boot img { animation: pulse 1.4s var(--ease) infinite; }
.boot-fail { position: fixed; inset: auto 0 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 10px; text-align: center; }
.boot-fail h1 { font-size: 20px; margin: 0; }
.boot-fail p { margin: 0; color: var(--mut); }
.boot-fail .boot-err { font-size: 12px; word-break: break-word; }
.noscript { padding: 24px; }
.muted { color: var(--mut); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: -.01em; }
.wrap { word-break: break-all; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; gap: 1px; }
.grow strong { font-weight: 600; }
.grow small { color: var(--mut); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.to-card .grow small { white-space: normal; }
[hidden] { display: none !important; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }

/* motion */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .55; transform: scale(.94); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
.main > section { animation: rise .32s var(--ease) both; }
.main > section > * { animation: rise .42s var(--ease) both; }
.main > section > :nth-child(2) { animation-delay: .03s; } .main > section > :nth-child(3) { animation-delay: .06s; }
.main > section > :nth-child(4) { animation-delay: .09s; } .main > section > :nth-child(n+5) { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; } }

/* shell */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px; background: var(--glass); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
/* Brand lockup (brand kit web/utn-brand.css): UTN / WALLET below 721 px, Umbrella Trust Network / WALLET above. */
.mark { width: 30px; height: 30px; flex: none; display: block; }
.brand-text { display: flex; flex-direction: column; justify-content: center; gap: 3px; line-height: 1; min-width: 0; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.brand-name .d { display: none; }
.brand-sub { font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-sub); }
@media (min-width: 721px) {
  .brand-name { font-size: 15px; font-weight: 650; }
  .brand-name .m { display: none; }
  .brand-name .d { display: inline; }
}
.netpill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(var(--ink-rgb),.04); cursor: pointer; font-size: 13px; font-weight: 550; transition: background .2s, border-color .2s; }
.netpill:hover { background: rgba(var(--ink-rgb),.08); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mut); flex: none; }
.dot.live { background: var(--ok); box-shadow: 0 0 0 3px rgba(52,199,123,.16); }
.dot.soon { background: var(--soon); }
.side { display: none; }
.main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 18px 18px calc(66px + 14px + 16px + env(safe-area-inset-bottom)); }
.bare .main { padding-bottom: 36px; }
/* Floating tab bar (mobile). v7: bar and active indicator are always the same shape, a rounded rectangle,
   expanded and collapsed. The indicator fills one item cell, so its gap to the bar edge is --pad on all
   four sides; the bar radius is the indicator radius plus --pad (concentric corners). */
.tabs { --n: 4; --iw: 72px; --hw: var(--iw); --hh: 52px; --hr: 14px; --pad: 6px;
  position: fixed; z-index: 6; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: calc(var(--n) * var(--iw) + 2 * var(--pad) + 2px); height: calc(var(--hh) + 2 * var(--pad) + 2px); padding: var(--pad); border-radius: calc(var(--hr) + var(--pad) + 1px);
  background: var(--bar-bg); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--line2); box-shadow: var(--sh-bar);
  transition: width .38s var(--ease), height .38s var(--ease), padding .38s var(--ease), border-radius .38s var(--ease), bottom .38s var(--ease), opacity .3s; will-change: width, height; }
.tabs-in { position: relative; display: grid; grid-template-columns: repeat(var(--n), var(--iw)); height: 100%; transition: grid-template-columns .38s var(--ease); }
.tab-hl { position: absolute; top: 50%; left: calc((var(--iw) - var(--hw)) / 2); width: var(--hw); height: var(--hh); border-radius: var(--hr);
  background: var(--red-soft); box-shadow: inset 0 0 0 1px rgba(225,29,46,.16);
  transform: translate(calc(var(--i, 0) * var(--iw)), -50%);
  transition: transform .42s cubic-bezier(.3,1.25,.5,1), width .38s var(--ease), height .38s var(--ease), border-radius .38s var(--ease), left .38s var(--ease), opacity .25s; }
.tabs.none .tab-hl { opacity: 0; }
.tabs a { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; overflow: hidden; padding: 0 2px;
  text-decoration: none; color: var(--mut); font-size: 11px; font-weight: 600; letter-spacing: .01em; -webkit-tap-highlight-color: transparent; transition: color .25s, gap .38s var(--ease); }
.tabs .tl { max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.tabs .tab-av, .tabs .ti .orgav { width: 22px; height: 22px; border-radius: 7px; font-size: 9px; }
.tabs a .ti { display: grid; place-items: center; }
.tabs .icon { width: 22px; height: 22px; transition: transform .3s var(--ease), stroke .25s; }
.tabs a:active .icon { transform: scale(.88); }
.tabs .tl { display: block; max-height: 14px; line-height: 14px; opacity: 1; overflow: hidden; transform: translateY(0); transition: opacity .28s ease, max-height .38s var(--ease), transform .38s var(--ease); }
.tabs a.on { color: var(--fg); }
.tabs a.on .icon { stroke: var(--red); }
/* Scroll down hides the labels. Scroll up, or the top of the page, brings them back. Page padding does not change. */
.tabs.compact { --iw: 52px; --hw: 44px; --hh: 44px; --hr: 16px; --pad: 5px; bottom: calc(10px + env(safe-area-inset-bottom)); }
.tabs.compact a { gap: 0; }
.tabs.compact .tl { opacity: 0; max-height: 0; transform: translateY(8px); pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .tabs, .tabs-in, .tab-hl, .tabs a, .tabs .tl, .tabs .icon { transition: none; }
}

@media (min-width: 600px) {
  .tabs { display: none; }
  .top { padding: 12px 24px; }
}

/* blocks */
.stack { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card > .card-head { margin-bottom: 6px; }
.card-head a { display: inline-flex; align-items: center; gap: 5px; color: var(--fg2); text-decoration: none; font-weight: 550; }
.card-head a:hover { color: var(--fg); }
.card-head .icon { width: 14px; height: 14px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 4px; }
.page-head:has(p) { align-items: flex-end; }
.page-head p { margin-top: 6px; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 18px; border-radius: var(--r-sm);
  border: 1px solid var(--line2); background: var(--s2); color: var(--fg); text-decoration: none; cursor: pointer; font-weight: 600; letter-spacing: -.005em;
  transition: transform .15s var(--ease), background .2s, border-color .2s, opacity .2s, box-shadow .2s; }
.btn:hover { background: var(--s3); }
.btn:active { transform: scale(.975); }
.btn.primary { background: var(--red); color: #fff; border-color: transparent; box-shadow: 0 8px 24px -10px rgba(225,29,46,.7), inset 0 1px 0 rgba(255,255,255,.14); }
.btn.primary:hover { background: var(--red-d); }
.btn.white { background: #fff; color: #0C0D10; border-color: transparent; }
.btn.danger { color: var(--err); }
.btn.big { min-height: 56px; font-size: 16px; border-radius: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .icon { width: 18px; height: 18px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: var(--s2); cursor: pointer; flex: none; transition: background .2s, transform .15s var(--ease); }
.icon-btn:hover { background: var(--s3); }
.icon-btn:active { transform: scale(.94); }
.link-btn { background: none; border: 0; padding: 0 4px; color: var(--fg); text-decoration: underline; text-decoration-color: rgba(var(--ink-rgb),.3); text-underline-offset: 3px; cursor: pointer; }
.pill-btn { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(var(--ink-rgb),.05); cursor: pointer; font-size: 12.5px; font-weight: 600; transition: background .2s; }
.pill-btn:hover { background: rgba(var(--ink-rgb),.1); }
.back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; color: var(--mut); text-decoration: none; font-size: 14px; font-weight: 550; }
.back:hover { color: var(--fg); }
label { font-size: 13px; color: var(--fg2); font-weight: 600; margin-bottom: -6px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 0; }
input, textarea { width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg); outline: none; transition: border-color .2s, box-shadow .2s; }
input::placeholder, textarea::placeholder { color: var(--ph); }
input:focus, textarea:focus { border-color: rgba(225,29,46,.7); box-shadow: 0 0 0 4px rgba(225,29,46,.14); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--red); }
input[type=file] { padding: 10px; }
textarea { resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.input-row { display: flex; align-items: center; gap: 8px; }
.input-row input { flex: 1; min-width: 0; }
.suffix { color: var(--mut); font-size: 13px; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 22px; }
.kv > span:first-child { color: var(--mut); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.kv > span:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; }
.rows { display: flex; flex-direction: column; }
.rows > .kv { padding: 13px 0; }
.rows > .kv + .kv { border-top: 1px solid var(--line); }
.status { font-size: 13.5px; color: var(--mut); min-height: 1em; }
.status:empty { display: none; }
.status.err { color: var(--err); }
.status.ok { color: var(--ok); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.note { font-size: 13.5px; padding: 12px 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); color: var(--fg2); }
.note.warn { border-color: rgba(242,169,59,.3); background: rgba(242,169,59,.07); color: var(--warn-fg); }
details summary { cursor: pointer; color: var(--mut); font-size: 13px; margin-bottom: 8px; }

/* welcome */
.welcome { display: flex; flex-direction: column; gap: 26px; padding-top: 18px; max-width: 440px; margin: 0 auto; }
.hero { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 0 2px; }
.hero::before { content: ""; position: absolute; top: -40px; left: 50%; width: 340px; height: 260px; transform: translateX(-50%); background: radial-gradient(closest-side, var(--hero-glow), transparent); pointer-events: none; z-index: -1; }
.hero-mark { width: 76px; height: 76px; margin-bottom: 8px; filter: drop-shadow(0 12px 30px rgba(225,29,46,.35)); }
.hero h1 { font-size: 34px; max-width: 360px; }
.lead { color: var(--fg2); max-width: 380px; font-size: 16px; line-height: 1.5; }
.cta { display: flex; flex-direction: column; gap: 10px; }
.features { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: var(--r); background: var(--s1); border: 1px solid var(--line); }
.feature { display: flex; gap: 14px; align-items: center; padding: 12px; }
.feature .ft { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--red-soft); flex: none; }
.feature .ft .icon { stroke: var(--red); width: 19px; height: 19px; }
.feature div { display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; color: var(--mut); }
.feature strong { color: var(--fg); font-size: 14.5px; font-weight: 600; }
.foot { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; font-size: 13px; }
.foot a { color: var(--fg2); }

/* home */
.home { display: flex; flex-direction: column; gap: 18px; }
.wallet-home { gap: 22px; }
.home-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.balance { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 24px 22px 22px; border-radius: 28px;
  background: radial-gradient(120% 120% at 100% 0%, var(--hero-glow) 0%, rgba(225,29,46,0) 52%), linear-gradient(165deg, var(--hero-a) 0%, var(--hero-b) 70%);
  border: 1px solid rgba(var(--ink-rgb),.09); box-shadow: var(--sh-hero); }
.balance .wm { position: absolute; right: -26px; bottom: -34px; width: 150px; height: 150px; opacity: .045; z-index: -1; pointer-events: none; }
.bal-top { display: flex; width: 100%; align-items: center; justify-content: space-between; }
.bal-label { font-size: 15px; color: var(--fg2); font-weight: 550; letter-spacing: 0; text-transform: none; }
.amount { display: flex; align-items: center; gap: .16em; margin-top: 10px; min-height: 64px; max-width: 100%; min-width: 0; align-self: stretch;
  font-size: 56px; line-height: 1; }
.amount.balance-amt { align-items: baseline; gap: 10px; }
.amount.balance-amt .unit { font-size: max(16px, 0.4em); font-weight: 650; letter-spacing: 0; color: var(--fg2); line-height: 1; }
.amount.balance-amt .coin-mark { display: none; }
.amount .num { font-size: 1em; line-height: 1; font-weight: 700; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount .num .dec { font-size: .56em; font-weight: 560; letter-spacing: -.02em; color: rgba(var(--fg-rgb),.48); }
.amount .unit { color: var(--fg2); font-weight: 600; font-size: .34em; letter-spacing: -.01em; flex: none; white-space: nowrap; }
.coin-mark { width: max(16px, .46em); height: max(16px, .46em); flex: none; display: block; }
.coin-mark.train, .wm.train, .tmark.native.train img { filter: grayscale(1) brightness(1.35) contrast(0.72); }
:root[data-theme="light"] .coin-mark.train,
:root[data-theme="light"] .wm.train,
:root[data-theme="light"] .tmark.native.train img { filter: grayscale(1) brightness(0.55) contrast(1.05); }
.amount-line .unit { font-size: .38em; font-weight: 650; color: var(--fg2); flex: none; letter-spacing: -.01em; }
.amt-code { font-size: .34em; font-weight: 700; letter-spacing: 0; color: var(--fg2); flex: none; line-height: 1; }
/* Long balances: one line, never clipped; fitAmount() scales the whole amount (icon included) down to the card width. */
.skeleton { display: inline-block; width: 160px; height: 52px; border-radius: 12px; background: linear-gradient(90deg, var(--skel-a) 0%, var(--skel-b) 50%, var(--skel-a) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.bal-note { color: var(--mut); font-size: 14px; }
.bal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: 8px; }
.bal-foot .addr { margin-top: 0; }
.coin-corner { margin-left: auto; font-size: 15px; font-weight: 650; letter-spacing: 0; color: var(--fg2); line-height: 1; white-space: nowrap; }
.addr { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--addr-bg); border: 1px solid var(--line2);
  font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; cursor: pointer; transition: background .2s; }
.addr:hover { background: var(--addr-bg-h); }
.addr .icon { width: 14px; height: 14px; color: var(--mut); }
.ident { width: 22px; height: 22px; border-radius: 50%; flex: none; display: block; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; text-decoration: none; color: var(--fg2); font-size: 12.5px; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; }
.qa .ql { align-self: stretch; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: center; white-space: nowrap; }
.qa .qi { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 20px; background: var(--s2); border: 1px solid var(--line2); color: var(--fg); transition: transform .15s var(--ease), background .2s; }
.qa .qi .icon { width: 22px; height: 22px; }
.qa:hover .qi { background: var(--s3); }
.qa:active .qi { transform: scale(.92); }
/* v3: all four actions share one calm style. Red is only the icon tint and a thin ring on hover/focus. */
.qa .qi .icon { stroke: var(--red); stroke-width: 2; }
.qa:hover .qi, .qa:focus-visible .qi { box-shadow: 0 0 0 1px rgba(225,29,46,.38); }
:root[data-theme="light"] .qa .qi { background: var(--s1); box-shadow: 0 1px 2px rgba(16,24,40,.05); }
:root[data-theme="light"] .qa:hover .qi { background: var(--s1); box-shadow: 0 0 0 1px rgba(225,29,46,.32), 0 1px 2px rgba(16,24,40,.05); }
@media (max-width: 359px) {
  .quick { gap: 2px; }
  .qa { font-size: 10.5px; gap: 4px; letter-spacing: -.02em; }
  .qa .qi { width: 44px; height: 44px; border-radius: 16px; }
}
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; text-decoration: none; background: rgba(242,169,59,.07); border: 1px solid rgba(242,169,59,.25); }
.banner .icon { stroke: var(--warn); }
.banner .grow small { color: var(--warn-sub); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; text-decoration: none; border: 1px solid var(--line2); }
.chip .icon { width: 13px; height: 13px; }
.chip.ok { color: var(--ok); border-color: rgba(52,199,123,.3); background: rgba(52,199,123,.07); }
.chip.warn { color: var(--warn); border-color: rgba(242,169,59,.3); }
@media (min-width: 1024px) { .quick { gap: 12px; } .qa .qi { width: 64px; height: 64px; } }

/* history */
.history { list-style: none; margin: 0; padding: 0; }
.history li + li .hrow { border-top: 1px solid var(--line); }
.hrow { display: flex; align-items: center; gap: 14px; padding: 13px 4px; text-decoration: none; border-radius: 12px; transition: background .2s; }
.hrow:hover { background: rgba(var(--ink-rgb),.025); }
.hicon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); flex: none; }
.hicon.in { background: rgba(52,199,123,.12); }
.hicon.in .icon { stroke: var(--ok); }
.hicon.out .icon { stroke: var(--fg); }
.hamt { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; white-space: nowrap; gap: 2px; height: 40px; }
.hamt .anum { font-size: 15px; font-weight: 500; line-height: 20px; min-height: 20px; color: var(--fg); }
.hamt small { font-size: 12.5px; font-weight: 400; line-height: 16px; min-height: 16px; color: var(--mut); }
.amt-split { font-variant-numeric: tabular-nums; }
.amt-split .dec { font-size: .78em; font-weight: 550; color: rgba(var(--fg-rgb),.5); }
.amt-suffix { font-size: .82em; font-weight: 600; color: var(--fg2); margin-left: .28em; }
.pos { color: var(--ok); }
.history .empty { padding: 22px 4px; color: var(--mut); text-align: center; }
.history .loading { display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }
.history .loading span { height: 42px; border-radius: 12px; background: linear-gradient(90deg, var(--skel-c) 0%, var(--skel-d) 50%, var(--skel-c) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }

/* receive */
.receive-card { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 26px 20px 20px; }
.qr-box { position: relative; width: min(264px, 70vw); aspect-ratio: 1; border-radius: 26px; overflow: hidden; background: #fff; padding: 14px; box-shadow: var(--sh-qr); animation: pop .4s var(--ease) both; }
.qr { width: 100%; height: 100%; display: block; shape-rendering: crispEdges; }
.qr-logo { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; transform: translate(-50%, -50%); background: #fff; border-radius: 14px; padding: 7px; }
.addr-full { max-width: 320px; text-align: center; font-size: 15px; line-height: 1.6; letter-spacing: .02em; word-spacing: .2em; }
.addr-full .g:nth-child(odd) { color: var(--mut); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.btn-row.one { grid-template-columns: 1fr; }

/* send */
.amount-entry { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 22px 18px 18px; }
.amount-line { display: flex; align-items: center; justify-content: flex-start; gap: .22em; width: 100%; max-width: 100%; min-width: 0;
  font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  border-bottom: 1.5px solid rgba(var(--fg-rgb),.16); padding-bottom: 6px; }
.amount-line:focus-within { border-bottom-color: #E11D2E; }
.amount-line input { flex: 1 1 auto; width: 100%; min-width: 0; max-width: 100%; field-sizing: fixed; border: 0; background: none; padding: 0; margin: 0;
  text-align: left; font: inherit; letter-spacing: inherit; font-variant-numeric: inherit; line-height: inherit; font-weight: 700; border-radius: 0; box-shadow: none; caret-color: var(--fg); }
.amount-line input:focus { box-shadow: none; border-color: transparent; }
.amount-line input::placeholder { color: rgba(var(--fg-rgb),.28); font-weight: 650; }
.amount-line .amt-code { font-size: .4em; max-width: 6.5em; overflow: hidden; text-overflow: ellipsis; }
.amount-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; color: var(--mut); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.to-row { display: flex; align-items: center; gap: 10px; }
.to-row input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; }
.review-amt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 14px; }
.review-amt .big-amount { display: flex; align-items: center; justify-content: center; gap: .16em; font-size: 44px; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.review-amt .big-amount .num { font-size: 1em; font-weight: 700; letter-spacing: -.04em; }
.review-amt .big-amount .dec { font-size: .56em; font-weight: 560; color: rgba(var(--fg-rgb),.48); }
.review-amt .big-amount .unit { font-size: .4em; color: var(--fg2); letter-spacing: -.01em; }
.to-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--s2); border: 1px solid var(--line); }
.to-card .ident { width: 36px; height: 36px; }
.to-card .grow small { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; word-break: break-all; line-height: 1.4; }
.scan-video { width: 100%; border-radius: 18px; background: #000; aspect-ratio: 1; object-fit: cover; }
.done { display: grid; place-items: center; padding: 8px 0 2px; }
.done svg { width: 76px; height: 76px; }
.done circle { fill: rgba(52,199,123,.12); stroke: var(--ok); stroke-width: 2; stroke-dasharray: 152; stroke-dashoffset: 152; animation: draw .5s var(--ease) forwards; }
.done path { fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .35s var(--ease) forwards; }
.sheet h2.center { font-size: 22px; letter-spacing: -.02em; }

/* faucet and access */
.drop-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 10px 0 4px; }
.drop-hero .dt { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 22px; background: var(--red-soft); }
.drop-hero .dt .icon { width: 30px; height: 30px; stroke: var(--red); }
.access { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: var(--s2); }
.access div { display: flex; flex-direction: column; gap: 2px; }
.access small { color: var(--mut); }
.access .icon { width: 26px; height: 26px; }
.access.ok .icon { stroke: var(--ok); }
.access.warn .icon { stroke: var(--warn); }

/* settings */
.row-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--s2); cursor: pointer; transition: background .2s, border-color .2s; }
.row-btn:hover { background: var(--s3); }
.row-btn.on { border-color: rgba(225,29,46,.7); box-shadow: 0 0 0 3px rgba(225,29,46,.12); }
.row-btn:disabled { opacity: .5; cursor: not-allowed; }
.list { display: flex; flex-direction: column; gap: 8px; }
.notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--fg2); }
.words { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: w; }
.words li { counter-increment: w; padding: 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.words li::before { content: counter(w) ". "; color: var(--mut); }

/* sheet and toast */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; background: var(--overlay); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fade .22s ease both; }
.sheet { width: 100%; max-width: 480px; max-height: 92dvh; overflow: auto; background: var(--s1); border: 1px solid var(--line2); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: var(--sh-sheet); animation: sheetUp .38s var(--ease) both; }
.sheet::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: rgba(var(--ink-rgb),.18); margin: 0 auto 10px; }
.sheet-wrap.closing { animation: fade .2s ease reverse both; }
.sheet-wrap.closing .sheet { animation: sheetUp .22s ease-in reverse both; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet-head .icon-btn { width: 36px; height: 36px; border-radius: 50%; }
@media (min-width: 1024px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 26px; border-bottom: 1px solid var(--line2); padding: 18px 24px 24px; animation: pop .26s var(--ease) both; }
  .sheet::before { display: none; }
  .sheet-wrap.closing .sheet { animation: pop .18s ease-in reverse both; }
}
.toast { position: fixed; left: 50%; bottom: calc(var(--tab) + 28px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; display: inline-flex; align-items: center; gap: 8px;
  background: var(--toast-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line2); color: var(--fg); padding: 10px 16px 10px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--sh-toast); animation: toastIn .32s var(--ease) both; }
.toast .icon { width: 16px; height: 16px; stroke: var(--ok); }
.toast.err .icon { stroke: var(--err); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (min-width: 1024px) { .toast { bottom: 32px; } }
@media (min-width: 1024px) {
  .amount-line { font-size: 48px; }
}

/* top bar actions: network dropdown and theme toggle */
.top-actions { display: flex; align-items: center; gap: 8px; }
.netwrap { position: relative; }
.netpill .icon { width: 14px; height: 14px; color: var(--mut); transition: transform .25s var(--ease); }
.netpill[aria-expanded="true"] .icon { transform: rotate(180deg); }
.theme-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2); background: rgba(var(--ink-rgb),.04); cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.theme-btn:hover { background: rgba(var(--ink-rgb),.08); }
.theme-btn:active { transform: scale(.92) rotate(-12deg); }
.theme-btn .icon { width: 16px; height: 16px; }
.menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 12; width: 260px; padding: 6px; border-radius: 18px; background: var(--s1); border: 1px solid var(--line2); box-shadow: var(--sh-menu); transform-origin: top right; animation: pop .2s var(--ease) both; }
.menu-title { padding: 8px 10px 6px; font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 12px; border: 0; background: none; cursor: pointer; text-align: left; transition: background .15s; }
.menu-item:hover:not(:disabled) { background: rgba(var(--ink-rgb),.05); }
.menu-item.on { background: rgba(var(--ink-rgb),.04); }
.menu-item:disabled { cursor: default; }
.menu-item:disabled strong { color: var(--mut); }
.menu-item .icon { stroke: var(--red); }
.soon-tag { font-size: 10.5px; font-weight: 650; padding: 3px 7px; border-radius: 999px; background: rgba(var(--ink-rgb),.06); color: var(--mut); white-space: nowrap; }

/* grouped settings lists */
.group { display: flex; flex-direction: column; gap: 8px; }
.group-title { padding: 0 6px; font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
.group-card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
:root[data-theme="light"] .group-card { box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.group-card > .pad { padding: 14px 16px; }
.srow { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 12px 16px; border: 0; background: none; color: var(--fg); text-decoration: none; text-align: left; cursor: default; transition: background .15s; }
button.srow, a.srow { cursor: pointer; }
button.srow:hover, a.srow:hover { background: rgba(var(--ink-rgb),.03); }
button.srow:active, a.srow:active { background: rgba(var(--ink-rgb),.06); }
.srow + .srow, .group-card > * + .srow, .srow + .pad { border-top: 1px solid var(--line); }
.srow > .icon { color: var(--mut); width: 16px; height: 16px; }
.srow .grow small { white-space: normal; line-height: 1.4; }
.srow.danger strong { color: var(--err); }
.srow .right { color: var(--mut); font-size: 12.5px; font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(var(--ink-rgb),.06); flex: none; }
.sic .icon { width: 17px; height: 17px; }
.sic.red { background: var(--red-soft); color: var(--red); }
.sic.green { background: rgba(52,199,123,.12); color: var(--ok); }
.sic.amber { background: rgba(242,169,59,.12); color: var(--warn); }
.sic.blue { background: rgba(80,140,255,.12); color: #5B8DEF; }
.sic.danger { background: rgba(255,90,103,.1); color: var(--err); }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line2); flex: none; display: grid; place-items: center; transition: border-color .2s; }
.radio.on { border-color: var(--red); }
.radio.on::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pop .2s var(--ease) both; }
.profile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 18px 20px; text-align: center; }
.profile .ident { width: 64px; height: 64px; box-shadow: 0 0 0 4px var(--s1), 0 0 0 5px var(--line2); }
.profile h2 { font-size: 19px; letter-spacing: -.02em; }
.profile .addr { margin-top: 2px; }
.seg { position: relative; display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; padding: 4px; border-radius: 14px; background: rgba(var(--ink-rgb),.05); border: 1px solid var(--line); }
.seg-hl { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n, 3)); border-radius: 10px; background: var(--s3); box-shadow: 0 1px 3px rgba(0,0,0,.18), inset 0 0 0 1px var(--line); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .35s var(--ease); }
:root[data-theme="light"] .seg-hl { background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.seg button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; border: 0; background: none; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--mut); transition: color .2s; }
.seg button.on { color: var(--fg); }
.seg button .icon { width: 15px; height: 15px; }
.foot-meta { text-align: center; font-size: 12.5px; color: var(--mut); padding: 6px 0 2px; }

/* import */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { margin: 0; }
.field .hint { font-size: 12.5px; color: var(--mut); }
.note.warn { display: flex; gap: 12px; align-items: flex-start; }
.note.warn .icon { stroke: var(--warn); margin-top: 1px; }
.adv summary { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; color: var(--fg2); font-weight: 600; font-size: 13.5px; }
.adv summary::-webkit-details-marker { display: none; }
.adv summary .icon { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.adv[open] summary .icon { transform: rotate(90deg); }
.adv > .stack { margin-top: 14px; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border-radius: 16px; border: 1.5px dashed var(--line2); background: rgba(var(--ink-rgb),.02); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; margin: 0; font-weight: 500; }
.drop:hover, .drop.has { border-color: rgba(225,29,46,.55); background: var(--red-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .sic { width: 44px; height: 44px; border-radius: 14px; }
.drop strong { font-size: 14.5px; color: var(--fg); }
.drop small { color: var(--mut); font-size: 12.5px; }
.panel { animation: rise .3s var(--ease) both; }

/* ---------------------------------------------------------------- v3: accounts */
.av { --av: #E11D2E; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--av); color: #fff; font-weight: 700; font-size: 13px; line-height: 1; letter-spacing: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); user-select: none; }
.av.xs { width: 20px; height: 20px; font-size: 10.5px; vertical-align: -5px; }
.av.lg { width: 56px; height: 56px; font-size: 22px; }
.av.xl { width: 64px; height: 64px; font-size: 26px; box-shadow: 0 0 0 4px var(--s1), 0 0 0 5px var(--line2); }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 70%; height: 36px; padding: 0 10px 0 4px; margin-left: -4px; border-radius: 999px; border: 1px solid var(--line2); background: var(--addr-bg); color: var(--fg); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; transition: background .2s; }
.acct-btn:hover { background: var(--addr-bg-h); }
.acct-btn .acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn > .icon { width: 15px; height: 15px; color: var(--mut); }
.balance .bal-label { margin-top: 12px; }
.alist { display: flex; flex-direction: column; gap: 8px; }
.arow { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 18px; border: 1px solid var(--line); background: var(--s2); }
.arow.on { border-color: rgba(225,29,46,.4); }
.arow-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; height: 64px; padding: 0 8px; border: 0; background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; border-radius: 14px; }
.arow-main .av { width: 38px; height: 38px; font-size: 16px; }
.arow-main .grow { display: flex; flex-direction: column; justify-content: flex-start; height: 40px; gap: 2px; min-width: 0; overflow: hidden; }
.arow-main .grow strong { font-size: 15px; font-weight: 500; line-height: 20px; min-height: 20px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow-main .grow small { color: var(--mut); font-size: 12.5px; font-weight: 400; line-height: 16px; min-height: 16px; }
.arow-main .aamt { height: 40px; margin-left: auto; align-items: flex-end; }
.acheck { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; flex: none; }
.acheck .icon { width: 13px; height: 13px; stroke-width: 2.6; }
.icon-btn.sm { width: 36px; height: 36px; border-radius: 10px; }
.icon-btn.sm .icon { width: 16px; height: 16px; color: var(--mut); }
.skeleton.sm { width: 54px; height: 14px; border-radius: 6px; }
.apreview { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0 2px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--av); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); transition: transform .15s var(--ease), box-shadow .15s; }
.swatches button.on { box-shadow: 0 0 0 3px var(--s1), 0 0 0 5px var(--av); }
.swatches button:active { transform: scale(.9); }
.center { text-align: center; }

/* ---------------------------------------------------------------- v3: organizations */
.orgs { display: flex; flex-direction: column; gap: 12px; }
.orgs:empty { display: none; }
.orgav { --av: #64748B; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; background: var(--av); color: #fff; font-weight: 750; font-size: 14px; letter-spacing: .02em; }
.join-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); border: 1px dashed var(--line2); background: transparent; color: var(--fg); text-decoration: none; transition: background .2s, border-color .2s; }
.join-row:hover { background: var(--s2); border-color: rgba(225,29,46,.35); }
.join-row .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.join-row small { color: var(--mut); font-size: 12.5px; line-height: 1.4; }
.join-row > .icon { color: var(--mut); width: 16px; height: 16px; }
.mcard { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--fg); }
.mcard.link { transition: border-color .2s, transform .15s var(--ease); }
.mcard.link:hover { border-color: var(--line2); }
.mcard.link:active { transform: scale(.99); }
.mhead { display: flex; align-items: center; gap: 12px; }
.mhead .grow { display: flex; flex-direction: column; min-width: 0; }
.mhead .grow strong { font-size: 16px; }
.mhead .grow small { color: var(--mut); font-size: 12.5px; }
.mstatus { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; border: 1px solid var(--line2); color: var(--fg2); }
.mstatus .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mut); }
.mstatus.active { color: var(--ok); border-color: rgba(52,199,123,.3); background: rgba(52,199,123,.07); }
.mstatus.active .dot { background: var(--ok); }
.mstatus.pending, .mstatus.activating { color: var(--warn); border-color: rgba(242,169,59,.3); background: rgba(242,169,59,.06); }
.mstatus.pending .dot, .mstatus.activating .dot { background: var(--warn); }
.roles { display: flex; flex-wrap: wrap; gap: 6px; }
.role { padding: 4px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: rgba(var(--ink-rgb),.06); color: var(--fg2); }
.mrows { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.mrows .kv { font-size: 13.5px; }
.priv { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.priv .icon { width: 13px; height: 13px; color: var(--mut); }
.olist { display: flex; flex-direction: column; gap: 8px; }
.orow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--s2); color: var(--fg); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s; }
.orow .grow { display: flex; flex-direction: column; min-width: 0; }
.orow .grow small { color: var(--mut); font-size: 12.5px; line-height: 1.35; }
.orow.on { border-color: rgba(225,29,46,.45); }
.orow.on .radio { border-color: var(--red); }
.orow.on .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pop .2s var(--ease) both; }
.field .hint .icon { width: 12px; height: 12px; vertical-align: -2px; }
.center-col { align-items: center; text-align: center; }
.sic.big { width: 54px; height: 54px; border-radius: 16px; background: var(--red-soft); color: var(--red); }
.sic.big .icon { width: 24px; height: 24px; }
.otp { max-width: 220px; text-align: center; font-size: 26px; letter-spacing: .4em; font-variant-numeric: tabular-nums; font-weight: 650; padding-left: .4em; }
.note.mock { display: flex; gap: 10px; align-items: flex-start; text-align: left; border-style: dashed; border-color: rgba(242,169,59,.45); background: rgba(242,169,59,.06); color: var(--fg2); }
.note.mock .icon { stroke: var(--warn); margin-top: 1px; }
.note.mock .mono { font-size: 15px; font-weight: 700; color: var(--fg); letter-spacing: .08em; }
.note.mock .pill-btn { height: 26px; margin-left: 4px; }
button.back { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 550; }
.balance .addr { padding-left: 12px; }
.toast.update { cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.toast.update .icon { stroke: var(--red); }
.toast.update:disabled { opacity: .7; }

/* ---- v4: tokens, assets, actions, scan ---- */
.home-tabs { display: flex; flex-direction: column; gap: 8px; }
.seg-head { gap: 14px; }
.seg-head .seg { flex: 1; max-width: 420px; }
.pane { min-height: 120px; }
.panel { display: flex; flex-direction: column; gap: 8px; }
.tmark { --av: #64748B; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; flex: none; background: var(--av); color: #fff; font-weight: 750; font-size: 11.5px; letter-spacing: .02em; }
.tmark.native { background: var(--red-soft); }
.tmark.native img { width: 24px; height: 24px; }
.tmark.lg { width: 56px; height: 56px; font-size: 14px; }
.tmark.lg.native img { width: 32px; height: 32px; }
.add-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 0; }
.add-row .grow small { color: var(--mut); }
.add-row:hover strong { color: var(--fg); }
.add-row > .icon { width: 16px; height: 16px; stroke: var(--mut); }
.token-head { display: flex; align-items: center; gap: 14px; }
.token-head h1 { font-size: 24px; letter-spacing: -.02em; }
.token-head p { margin-top: 2px; }
.token-card .bal-label { margin-top: 4px; }
.token-card .amount { margin-top: 0; min-height: 56px; font-size: 44px; }
.org-inline { display: inline-flex; align-items: center; gap: 8px; }
.orgav.xs { width: 22px; height: 22px; border-radius: 7px; font-size: 9.5px; }
.orgav.xxs { width: 18px; height: 18px; border-radius: 6px; font-size: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip.org { color: var(--fg2); }
.action-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 16px; border: 1px solid var(--line2); background: var(--s2); color: var(--fg); font: inherit; text-align: left; cursor: pointer; transition: background .2s, box-shadow .2s, transform .1s; }
.action-btn.big { min-height: 72px; }
.action-btn:hover { background: var(--s3); box-shadow: 0 0 0 1px rgba(225,29,46,.3); }
.action-btn:active { transform: scale(.985); }
.action-btn strong { font-size: 16px; }
.action-btn small { display: block; color: var(--mut); margin-top: 2px; }
.action-btn > .icon { width: 16px; height: 16px; stroke: var(--mut); flex: none; }
.action-btn .ai { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--red-soft); flex: none; }
.action-btn .ai .icon { stroke: var(--red); width: 20px; height: 20px; }
:root[data-theme="light"] .action-btn { background: var(--s1); box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.agrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.agrid .empty, .agrid .status { grid-column: 1 / -1; padding: 18px 4px; text-align: center; }
.acard { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--s2); text-decoration: none; color: inherit; min-width: 0; transition: background .2s, box-shadow .2s; }
.acard:hover { background: var(--s3); box-shadow: 0 0 0 1px rgba(225,29,46,.25); }
:root[data-theme="light"] .acard { background: var(--s1); }
.ac-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 2px 2px; }
.ac-body strong, .ac-body small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-body .org-inline { margin-top: 4px; color: var(--fg2); font-weight: 600; }
.atile { --av: #64748B; position: relative; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 4 / 3; padding: 12px; border-radius: 12px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.22), transparent 60%), linear-gradient(135deg, var(--av), color-mix(in srgb, var(--av) 55%, #000)); }
.atile .at-sym { font-size: 12px; font-weight: 750; letter-spacing: .12em; opacity: .85; }
.atile .at-id { font-size: 26px; font-weight: 750; letter-spacing: -.03em; }
.atile.lg { width: 112px; flex: none; aspect-ratio: 1; }
.atile.lg .at-id { font-size: 30px; }
.atile.md { width: 64px; flex: none; aspect-ratio: 1; padding: 8px; }
.atile.md .at-id { display: none; }
.asset-head { display: flex; align-items: flex-start; gap: 16px; }
.asset-head h1 { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; }
.asset-head p { margin-top: 6px; }
.sponsor { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 650; }
.kv.sponsored > span:first-child { color: var(--fg2); }
.big-amount.action-name { font-size: 30px; text-align: center; }
.paste-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.paste-row .btn { min-height: 0; }
.or { display: flex; align-items: center; gap: 10px; color: var(--mut); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.check-row { display: flex; align-items: center; gap: 10px; margin: 0; }
.stack.tight { gap: 10px; }
.action-intro p { margin-top: 2px; }
.link-actions { display: inline-flex; gap: 6px; }
.break { word-break: break-all; }
.hrow strong.wrap { white-space: normal; overflow-wrap: anywhere; }
.center { text-align: center; }
@media (min-width: 1024px) {
  .agrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .asset-page { max-width: 720px; }
}
.action-btn .grow small { white-space: normal; line-height: 1.4; }

/* ============================================================ v5 layout */
.shell { flex-direction: row; }
/* Bare pages (onboarding, sign in, import) have no sidebar: one column, top bar on top. */
.shell.bare { flex-direction: column; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#app { overflow-x: clip; }
.top-acct { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; text-decoration: none; }
.top-acct .av { width: 30px; height: 30px; font-size: 12px; }

/* Tab screens */
.tabpanel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 2px 0; min-height: 28px; }
.tp-head h2 { margin: 0; font-size: 15px; font-weight: 650; color: var(--fg2); letter-spacing: .01em; }
.tp-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.home.bare-tab { gap: 14px; }
.thead, .tc { display: none; }
.scan-cta { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--s1); color: var(--fg); text-align: left; cursor: pointer; transition: background .2s, box-shadow .2s, transform .15s var(--ease); }
.scan-cta:hover { box-shadow: 0 0 0 1px rgba(225,29,46,.32); }
.scan-cta:active { transform: scale(.985); }
.scan-cta .sic { width: 48px; height: 48px; border-radius: 16px; background: var(--red-soft); display: grid; place-items: center; flex: none; }
.scan-cta .sic .icon { width: 24px; height: 24px; stroke: var(--red); }
.scan-cta strong { display: block; font-size: 16px; }
.scan-cta small { display: block; color: var(--mut); font-size: 13px; margin-top: 2px; }
.tabpanel .panel { display: flex; flex-direction: column; gap: 14px; }
/* no cards inside cards: inner blocks of a card are flat, separated by hairlines */
.card .action-btn { background: rgba(var(--ink-rgb),.035); border-color: transparent; box-shadow: none; }
.card .card { border: 0; background: none; padding: 0; box-shadow: none; }

/* Phone stack pages: own header, no app header, no tab bar; slide in from the right. */
.stackbar { display: none; }
@media (max-width: 599px) {
  .shell.stack .top { display: none; }
  .shell.stack .stackbar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 4px;
    padding: calc(6px + env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left)); min-height: calc(52px + env(safe-area-inset-top));
    background: var(--glass); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid transparent; transition: border-color .2s; }
  .shell.stack .stackbar.titled { border-bottom-color: var(--line); }
  .stackbar .sb-back { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; }
  .stackbar .sb-back .icon { width: 22px; height: 22px; }
  .stackbar .sb-title { margin: 0; font-size: 16px; font-weight: 650; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .25s var(--ease); }
  .stackbar.titled .sb-title { opacity: 1; transform: none; }
  .shell.stack .main { padding: 8px max(18px, env(safe-area-inset-right)) calc(66px + 14px + 16px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }
  .shell.stack .main .back { display: none; }
  .shell.stack .main > section, .shell.stack .main > section > * { animation: none; }
  .shell.push-in { position: relative; z-index: 3; background: var(--bg); min-height: 100dvh; animation: stackIn .4s var(--ios) both; box-shadow: -10px 0 28px rgba(0,0,0,.22); will-change: transform; }
  .shell.pop-in { animation: stackBack .36s var(--ios) both; will-change: transform; }
  .shell.pop-in::after { content: ""; position: fixed; inset: 0; background: #000; pointer-events: none; z-index: 24; animation: dimOut .36s var(--ios) both; }
  .ghost { position: fixed; inset: 0; overflow: hidden; pointer-events: none; background: var(--bg); }
  .ghost.under { z-index: 1; animation: stackUnder .4s var(--ios) both; }
  .ghost.under::after { content: ""; position: absolute; inset: 0; background: #000; animation: dimIn .4s var(--ios) both; }
  .ghost.out { z-index: 25; box-shadow: -10px 0 28px rgba(0,0,0,.22); animation: stackOut .36s var(--ios) both; will-change: transform; }
  #app { position: relative; z-index: 2; }
}
@keyframes stackIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes stackOut { from { transform: none; } to { transform: translateX(100%); } }
@keyframes stackUnder { from { transform: none; } to { transform: translateX(-30%); } }
@keyframes stackBack { from { transform: translateX(-30%); } to { transform: none; } }
@keyframes dimIn { from { opacity: 0; } to { opacity: .28; } }
@keyframes dimOut { from { opacity: .28; } to { opacity: 0; } }
:root { --ios: cubic-bezier(.2, .9, .25, 1); }

/* Fold-open, tablet and desktop (>= 600 px): sidebar that folds into an icon rail. Phones stay under 600 px. */
@media (min-width: 600px) {
  .shell:not(.bare) .top .brand { display: none; }
  .shell:not(.bare) .top { justify-content: flex-end; padding: 10px 24px; min-height: 56px; }
  .top-acct { display: none; }
  .side { display: flex; flex-direction: column; flex: none; width: 248px; height: 100dvh; position: sticky; top: 0; padding: 12px 10px; gap: 14px; border-right: 1px solid var(--line); background: var(--s1);
    transition: width .32s var(--ease); overflow: hidden; z-index: 6; }
  .shell.rail .side { width: 68px; }
  .side-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 36px; padding-left: 9px; }
  .side-top .brand { gap: 10px; }
  .side-top .brand-name { font-size: 16px; font-weight: 700; }
  .side .sl { white-space: nowrap; transition: opacity .2s ease, transform .3s var(--ease); }
  .shell.rail .side .sl { opacity: 0; transform: translateX(-6px); pointer-events: none; }
  .shell.rail .side-top .brand { width: 0; overflow: hidden; }
  .shell.rail .side-top { padding-left: 0; justify-content: center; }
  .rail-btn { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--fg2); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
  .rail-btn:hover { background: rgba(var(--ink-rgb),.05); color: var(--fg); }
  .rail-btn .icon { width: 20px; height: 20px; transition: transform .38s var(--ease); }
  .shell.rail .rail-btn .icon { transform: scaleX(-1); }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-nav a, .side-nav button, .side-foot > a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; border-radius: 10px; text-decoration: none; color: var(--fg2); font-weight: 550; font-size: 14px;
    border: 0; background: none; cursor: pointer; text-align: left; transition: background .2s, color .2s; }
  .side-nav .icon, .side-foot > a .icon { width: 20px; height: 20px; flex: none; }
  .side-nav a:hover, .side-nav button:hover, .side-foot > a:hover { background: rgba(var(--ink-rgb),.045); color: var(--fg); }
  .side-nav a.on, .side-foot > a.on { background: var(--s2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
  .side-nav a.on .icon, .side-foot > a.on .icon { stroke: var(--red); }
  .side-orgs { display: contents; }
  .side-nav a[data-r="org"] { position: relative; }
  .side-nav .nav-av { width: 22px; height: 22px; border-radius: 7px; font-size: 9px; }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; }
  .side-rule { height: 1px; margin: 12px 8px; background: var(--line); }
  .side-out { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--mut); font: inherit; font-size: 14px; font-weight: 550; cursor: pointer; text-align: left; }
  .side-out .icon { width: 20px; height: 20px; flex: none; }
  .side-out:hover { background: rgba(225, 29, 46, .08); color: #E11D2E; }
  .side-out:hover .icon { stroke: #E11D2E; }
  .shell.rail .side-out, .shell.rail .side-foot > a { justify-content: center; padding: 0; }
  .shell.rail .side-rule { margin-left: 12px; margin-right: 12px; }
  .side-acct { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); cursor: pointer; text-align: left; color: var(--fg); }
  .side-acct .av { width: 32px; height: 32px; flex: none; }
  .side-acct strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
  .side-acct small { display: block; font-size: 11.5px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
  .shell.rail .side-acct { padding: 8px 9px; border-color: transparent; background: none; }

  .main { max-width: 760px; margin: 0; padding: 20px 28px 48px; }
  .main.wide { max-width: none; }
  /* Home: summary header (balance + actions + company), then the selected slide full width. */
  .home:not(.wallet-home) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); grid-template-areas: "bal quick" "bal orgs" "slides slides"; gap: 16px; align-items: start; }
  .home > .balance { grid-area: bal; min-height: 100%; }
  .home > .quick { grid-area: quick; }
  .home > .orgs, .home > :nth-child(3) { grid-area: orgs; }
  .home > .tabpanel { grid-area: slides; }
  .tabpanel .agrid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .tabpanel .scan-cta { max-width: 520px; }
  .home .quick { gap: 8px; }
  .home .qa { flex-direction: row; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line2); color: var(--fg); font-size: 13.5px; }
  .home .qa .qi { width: auto; height: auto; background: none; border: 0; box-shadow: none !important; }
  .home .qa .qi .icon { width: 18px; height: 18px; }
  /* one line per action ("Get T-RAIN" must not wrap), same height for all four */
  .home .qa { gap: 6px; padding: 0 6px; min-width: 0; white-space: nowrap; font-size: 13px; }
  .home .qa .qi .icon { width: 16px; height: 16px; }
  .home .qa:hover { background: var(--s3); box-shadow: 0 0 0 1px rgba(225,29,46,.32); }
  :root[data-theme="light"] .home .qa { background: var(--s1); }
  /* tables */
  .tabpanel .history .hrow, .tabpanel .history .thead { display: grid; align-items: center; gap: 16px; }
  .tabpanel .tlist .hrow, .tabpanel .tlist .thead { grid-template-columns: 42px minmax(0, 1.6fr) minmax(0, 1.1fr) minmax(0, .9fr) minmax(72px, .8fr); gap: 12px; }
  .tabpanel .history:not(.tlist) .hrow { grid-template-columns: 76px minmax(180px, 2fr) minmax(130px, 1fr) minmax(120px, 1fr) minmax(150px, 1fr); }
  .tabpanel .history:not(.tlist) .thead { grid-template-columns: 76px minmax(180px, 2fr) minmax(130px, 1fr) minmax(120px, 1fr) minmax(150px, 1fr); }
  .thead span:first-child { grid-column: span 2; }
  .thead { padding: 10px 4px 8px; font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); border-bottom: 1px solid var(--line); }
  .thead span:last-child { text-align: right; }
  .tabpanel .tc { display: block; font-size: 13.5px; color: var(--fg2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabpanel .tc.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
  .tabpanel .history:not(.tlist) .hrow .grow small { display: none; }
  .tabpanel .hrow { padding: 10px 4px; }
  .tabpanel .history li.thead + li .hrow { border-top: 0; }
  .tabpanel .agrid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding: 8px 0; }
  /* detail pages: two columns */
  .dcols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .main:has(.dcols) { max-width: 1240px; }
  .asset-page { max-width: none; }
}
@media (max-width: 1023px) { .dcols, .dmain, .dside { display: contents; } }
.dmain, .dside { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* v5 polish: flat rows inside sheets and cards (hairline separators, no nested borders) */
.alist { display: flex; flex-direction: column; gap: 0 !important; }
.arow { border: 0; border-radius: 14px; background: none; padding: 2px 4px 2px 0; }
.alist > .arow + .arow, .alist > * + * { border-top: 1px solid var(--line); border-radius: 0; }
.arow.on { background: none; }
.arow .icon-btn.sm { border-color: transparent; background: rgba(var(--ink-rgb),.05); }
.history li.thead + li .hrow { border-top: 0; }
.btn-row .btn { flex: 1 1 0; min-width: 0; }

/* ============================================================ v5 polish: one grid, flat lists, titles above content */
:root { --gx: 18px; --row: 60px; }
.main > section, .main > section > * { animation: none; }            /* tabs appear instantly; stack pages slide (shell) */
.sect { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sect-head, .tp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; margin: 0; padding: 0; }
.sect-head h2, .tp-head h2 { margin: 0; font-size: 13px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); line-height: 24px; }
.sect-head .chip { align-self: center; }
.tp-head h1 { line-height: 1.15; }
.tabpanel { gap: 8px; }
.history .hrow, .srow, .rows > .kv, .add-row { min-height: var(--row); }
.hrow { padding: 10px 0; border-radius: 0; gap: 14px; }
.hrow:hover { background: none; }
.history .hamt { margin-left: auto; text-align: right; }
.history li:first-child .hrow { border-top: 0; }
.add-row { padding: 10px 0; border-radius: 0; }
.add-row .sic, .hrow .hicon, .hrow .tmark { flex: none; }
.tlist .hrow .grow { min-width: 0; overflow: hidden; }
.tlist .hrow .grow strong, .tlist .hrow .grow small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlist .hrow .grow strong { font-weight: 500; font-size: 15px; color: var(--fg); }
.tlist .hrow .grow small { font-weight: 400; font-size: 12.5px; color: var(--mut); }
.rows > .kv { padding: 0; }
.group { gap: 6px; }
.group-title { padding: 0; font-size: 13px; letter-spacing: .08em; line-height: 24px; }
.group-card { background: none; border: 0; border-radius: 0; overflow: visible; }
:root[data-theme="light"] .group-card { box-shadow: none; }
.group-card > .pad { padding: 12px 0; }
.srow { padding: 10px 0; }
.srow:hover { background: none; }
.group-card > .srow:first-child { border-top: 0; }
.action-list { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 599px) {
  .agrid { display: flex; flex-direction: column; gap: 0; }
  .agrid .acard { flex-direction: row; align-items: center; gap: 14px; min-height: var(--row); padding: 10px 0; border: 0; border-radius: 0; background: none; box-shadow: none !important; }
  .agrid .acard + .acard { border-top: 1px solid var(--line); }
  .agrid .acard .atile { width: 44px; height: 44px; aspect-ratio: 1; padding: 0; border-radius: 12px; flex: none; justify-content: center; align-items: center; }
  .agrid .acard .atile .at-sym { display: none; }
  .agrid .acard .atile .at-id { font-size: 15px; letter-spacing: -.01em; }
  .agrid .acard .ac-body { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; flex: 1; min-width: 0; }
  .agrid .acard .ac-body strong, .agrid .acard .ac-body small { grid-column: 1; }
  .agrid .acard .ac-body .org-inline { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: end; color: var(--fg2); }
  :root[data-theme="light"] .agrid .acard { background: none; }
  .shell.stack .main .page-head h1, .shell.stack .main section.stack > h1, .shell.stack .main .drop-hero h1 { display: none; }
  .shell.stack .main .page-head:not(:has(> :not(h1))) { display: none; }
  .shell.stack .main .page-head > div:not(:has(> :not(h1))) { display: none; }
  .stackbar .sb-title { opacity: 1; transform: none; }
  .main, .shell.stack .main { padding-left: max(var(--gx), env(safe-area-inset-left)); padding-right: max(var(--gx), env(safe-area-inset-right)); }
  .top { padding-left: max(var(--gx), env(safe-area-inset-left)); padding-right: max(var(--gx), env(safe-area-inset-right)); }
}
.loading-grid { display: grid; place-items: center; min-height: 140px; grid-column: 1 / -1; }
.pulse-mark { display: grid; place-items: center; }
.pulse-mark .mark { width: 34px; height: 34px; animation: markPulse 1.2s ease-in-out infinite; }
.history .loading .pulse-mark { height: auto; background: none; animation: none; padding: 12px 0 4px; }
@keyframes markPulse { 0%, 100% { opacity: .35; transform: scale(.92); } 50% { opacity: 1; transform: scale(1); } }
@media (min-width: 1024px) {
  .tabpanel .history .hrow { padding: 8px 0; min-height: 56px; }
  .sect-head h2, .tp-head h2, .tp-head h1 { font-size: 12.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); line-height: 24px; }
}
@media (min-width: 1024px) { .rows > .kv, .srow { min-height: 48px; } }

/* ---------------------------------------------------------------- v6: Connect with UTN Wallet */
.connect-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.connect-top { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.connect-top .mark { width: 28px; height: 28px; }
.connect-top .brand-name { font-weight: 700; letter-spacing: -.01em; }
.connect-top .brand-name .m { color: var(--red); }
.netpill.static { cursor: default; height: 30px; font-size: 12.5px; }
.netpill.static:hover { background: rgba(var(--ink-rgb),.04); }
.connect-wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; max-width: 420px; margin: 0 auto; }
.connect-wait.small { flex: none; padding: 28px 0 18px; }
.connect-wait h1 { font-size: 24px; letter-spacing: -.02em; margin: 0; }
.pulse-mark.still .mark { animation: none; width: 56px; height: 56px; }
.sheet-wrap.docked { -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (min-width: 1024px) { .sheet-wrap.docked { align-items: center; } }
.site-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 2px; }
.site-head .grow { display: flex; flex-direction: column; min-width: 0; }
.site-head strong { font-size: 17px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-head small { color: var(--mut); font-size: 13px; }
.site-head small.warn { color: var(--err); }
.site-av { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--s2); border: 1px solid var(--line2); font-weight: 700; font-size: 18px; color: var(--fg); }
.site-av .mark { width: 26px; height: 26px; }
.srow .site-av { width: 36px; height: 36px; border-radius: 11px; font-size: 15px; }
.srow .site-av .mark { width: 22px; height: 22px; }
.acct-line { display: flex; align-items: center; gap: 12px; width: 100%; }
.acct-line .grow { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.acct-line small { color: var(--mut); font-size: 12.5px; font-weight: 400; }
.pick-list { display: flex; flex-direction: column; }
.pick { display: flex; width: 100%; padding: 12px 2px; border: 0; background: none; color: var(--fg); cursor: pointer; font: inherit; }
.pick + .pick { border-top: 1px solid var(--line); }
.can-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.can-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; }
.can-list li .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--mut); }
.can-list li.muted { color: var(--mut); font-size: 13.5px; }
.msg-box { margin: 0; padding: 14px; max-height: 240px; overflow: auto; white-space: pre-wrap; word-break: break-word; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--s2); border-radius: 14px; color: var(--fg); }
.small-btn { min-height: 36px; padding: 6px 14px; font-size: 13.5px; border-radius: 10px; }
.site-row { cursor: default; }
/* v6b: sign-in details (EIP-4361 fields in UTN words) */
.siwe-sum .kv { align-items: flex-start; }
.siwe-sum .kv > span:first-child { color: var(--muted, #A1A5AE); flex: none; }
.siwe-sum .kv > span:last-child { text-align: right; overflow-wrap: anywhere; min-width: 0; }

/* ---------------------------------------------------------------- v7 */
/* Join an organization: the account row */
.acct-line { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--s1); }
.acct-line .al-k { font-size: 13px; color: var(--mut); flex: none; }
.acct-line .al-av { width: 28px; height: 28px; font-size: 12px; flex: none; margin-left: auto; }
.acct-line .al-txt { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.acct-line .al-txt strong, .acct-line .grow strong { font-size: 15px; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-line .al-txt .mono { font-size: 12.5px; font-weight: 400; color: var(--mut); white-space: nowrap; }
.inline-row { display: flex; gap: 8px; align-items: stretch; }
.inline-row input { flex: 1; min-width: 0; }
.inline-row .btn { flex: none; gap: 6px; padding-inline: 14px; }
.org-found:empty { display: none; }
.org-found { display: flex; flex-direction: column; gap: 10px; }
.org-card { display: flex; align-items: center; gap: 12px; padding: 12px 0 2px; border-top: 1px solid var(--line); }
.org-card .grow strong { display: block; font-size: 15px; font-weight: 500; color: var(--fg); }
.org-card .grow small { display: block; color: var(--mut); font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.org-card.off { opacity: .75; }
.dom-pill { flex: none; font-size: 12.5px; font-weight: 600; color: var(--fg2); background: rgba(var(--ink-rgb),.06); border-radius: 999px; padding: 4px 10px; }

/* Activity: flat list grouped by day, amounts on the right */
.tp-head .tp-link { display: inline-flex; align-items: center; gap: 4px; line-height: 20px; }
.tp-head .tp-link .icon { width: 14px; height: 14px; }
.tp-head h2 { line-height: 20px; }
.alist2 { display: flex; flex-direction: column; }
.agroups { display: flex; flex-direction: column; gap: 6px; }
/* Each list is a column of rows. A row is avatar, then two text columns. */
.txflat { display: flex; flex-direction: column; min-width: 0; }
.txflat > .agroup, .txflat .agroup, .txflat .arows { display: flex; flex-direction: column; min-width: 0; }
.txflat .arows > li, .txflat > li { display: block; min-width: 0; }
.txflat .aday, .txflat .empty, .txflat .status, .txflat .loading, .txflat .rq-empty, .txflat .empty-state { width: 100%; }
/* Empty copy is not a row. It spans the list and wraps on the full width, centered. */
.txflat li.empty, .txflat p.empty, .txflat .empty, .txflat .empty-state {
  display: block; grid-template-columns: none; width: 100%; max-width: none; height: auto; min-height: 0; max-height: none;
  margin: 0; padding: 18px 16px; box-sizing: border-box; white-space: normal; text-align: center; justify-self: stretch;
}
.txflat .rq-empty { display: flex; flex-wrap: wrap; justify-content: center; text-align: center; grid-template-columns: none; width: 100%; max-width: none; height: auto; max-height: none; box-sizing: border-box; justify-self: stretch; }
.txflat .rq-empty .grow { min-width: 0; flex: 1 1 12rem; text-align: center; }
.txflat .rq-empty .grow small { white-space: normal; }
.txflat .loading { display: flex; grid-template-columns: none; width: 100%; max-width: none; height: auto; max-height: none; box-sizing: border-box; justify-self: stretch; }
.txflat .status { display: block; grid-template-columns: none; width: 100%; max-width: none; height: auto; white-space: normal; text-align: center; box-sizing: border-box; justify-self: stretch; }
.txflat .arow2 { width: 100%; max-width: 100%; }
.agroup + .agroup { margin-top: 8px; }
.aday { margin: 0; padding: 8px 2px 6px; font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.arows { list-style: none; margin: 0; padding: 0; }
.arows li + li .arow2 { border-top: 1px solid var(--line); }
.arow2 { --mark: 40px; --row-gap: 12px; display: flex; flex-flow: row nowrap; align-items: center; gap: var(--row-gap); width: 100%; max-width: 100%; min-width: 0; min-height: 64px; height: auto; padding: 0 2px; box-sizing: border-box; overflow: hidden; color: var(--fg); text-decoration: none; transition: background .15s; }
.arow2:hover { background: rgba(var(--ink-rgb),.03); }
.aav { flex: 0 0 40px; width: 40px; height: 40px; min-width: 40px; max-width: 40px; border-radius: 50%; display: grid; place-items: center; justify-self: start; background: rgba(var(--ink-rgb), .08); color: var(--fg2); }
.aav .icon { width: 18px; height: 18px; }
.aav.send, .aav.pay { background: rgba(225, 29, 46, .16); color: #E11D2E; }
.aav.receive, .aav.topup { background: rgba(52, 199, 123, .16); color: var(--ok); }
.aav.cancel { background: rgba(229, 165, 10, .18); color: #C4840A; }
.aav.deploy { background: rgba(var(--ink-rgb), .10); color: var(--fg); }
.aav.fee { background: rgba(var(--ink-rgb), .08); color: var(--fg2); }
:root[data-theme="light"] .aav.cancel { color: #8A5A00; }
:root[data-theme="light"] .aav.send, :root[data-theme="light"] .aav.pay { color: #C3172A; }
.aic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--s3); }
.aic .icon { width: 18px; height: 18px; }
.aic.in { background: rgba(52,199,123,.12); } .aic.in .icon { stroke: var(--ok); }
.aic.act .icon, .aic.set .icon { stroke: var(--fg2); }
.amain, .aamt { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 2px; height: auto; min-height: calc(20px + 2px + 16px); }
.amain { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.aamt { flex: 0 0 auto; min-width: min-content; overflow: visible; }
.amain .at, .aamt .anum { display: block; height: calc(20em / 15); min-height: calc(20em / 15); max-height: calc(20em / 15); font-size: 15px; font-weight: 500; line-height: calc(20 / 15); color: var(--fg); white-space: nowrap; }
.amain .at { overflow: hidden; text-overflow: ellipsis; }
.aamt .anum { overflow: visible; text-overflow: clip; width: max-content; max-width: none; min-width: max-content; }
.amain .asub, .aamt .asec { display: block; height: calc(16em / 12.5); min-height: calc(16em / 12.5); max-height: calc(16em / 12.5); font-size: 12.5px; font-weight: 400; line-height: calc(16 / 12.5); color: var(--mut); white-space: nowrap; }
.amain .asub { overflow: hidden; text-overflow: ellipsis; }
.aamt .asec { overflow: hidden; text-overflow: ellipsis; }
.aamt .anum .dec, .hamt .anum .dec { font-size: 1em; font-weight: inherit; color: rgba(var(--fg-rgb), .55); }
.aamt .asec .dec { font-size: 1em; font-weight: inherit; color: inherit; }
button.arow2 { width: 100%; margin: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; appearance: none; -webkit-appearance: none; }
.txflat .tmark, .txflat .atile, .txflat .ident, .txflat .av, .txflat .mem-av { width: 40px; height: 40px; min-width: 40px; max-width: 40px; aspect-ratio: 1; border-radius: 50%; padding: 0; flex: 0 0 40px; justify-self: start; }
.arow2 > .aav, .arow2 > .tmark, .arow2 > .atile, .arow2 > .ident, .arow2 > .av, .arow2 > .mem-av { flex: 0 0 40px; width: 40px; height: 40px; min-width: 40px; max-width: 40px; }
.arow2 > .amain { flex: 1 1 45%; min-width: 0; overflow: hidden; }
.arow2 > .aamt { flex: 0 0 auto; width: max-content; min-width: min-content; max-width: 50%; }
.txflat .atile { justify-content: center; align-items: center; }
.txflat .atile .at-sym { display: none; }
.txflat .atile .at-id { font-size: 12px; letter-spacing: 0; }
.aamt { align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; margin-left: auto; width: max-content; max-width: 50%; }
.aamt .anum { width: max-content; max-width: none; min-width: max-content; text-align: right; }
.aamt .asec { width: max-content; min-width: 0; max-width: 100%; text-align: right; }
.private-fields { min-width: 0; }
.private-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 2px 2px 4px; }
.private-head h2 { margin: 0; font-size: 13px; font-weight: 500; line-height: 20px; }
.private-fields .aav.lock { background: rgba(var(--ink-rgb), .10); color: var(--fg); }
.private-fields .arow2 > .aamt { width: max-content; max-width: 50%; min-width: max-content; overflow: visible; }
.private-fields .aamt .anum, .private-fields .aamt .asec { overflow: visible; text-overflow: clip; width: max-content; max-width: none; }
.private-fields .amain .at, .private-fields .aamt .anum {
  font-weight: 500; font-synthesis: none; font-variation-settings: "wght" 500; color: var(--fg);
}
.private-fields .amain .asub, .private-fields .aamt .asec {
  font-weight: 400; font-synthesis: none; color: var(--mut);
}
.private-fields .asub.who-line { display: flex; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.private-fields .who-bit { display: inline-flex; min-width: 0; max-width: 100%; overflow: hidden; }
.private-fields .who-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.private-fields .who-label { flex: 0 1 auto; }
.private-fields .who-bit:has(.who-tail) .who-label { flex: none; overflow: visible; text-overflow: clip; }
.private-fields .who-tail { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.private-fields .who-gap, .private-fields .who-sep { flex: none; white-space: nowrap; }
.private-fields .who-sep, .pf-sheet .who-sep { padding-inline: 0.35em; }
.private-fields .who-gap, .pf-sheet .who-gap { padding-inline: 0.35em; }
.pf-ellipsis, .private-fields .aamt .asec, .pf-sheet .pf-hash {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 400; font-feature-settings: normal;
}
.private-fields .arow2 {
  box-sizing: border-box; height: 64px; min-height: 64px; max-height: 64px; overflow: hidden;
}
.private-fields .pf-chev {
  flex: 0 0 16px; width: 16px; height: 16px; display: grid; place-items: center; color: var(--mut);
}
.private-fields .pf-chev .icon { width: 16px; height: 16px; }
.private-fields .aav.lock.dashed .icon { stroke-linecap: butt; stroke-linejoin: miter; }
.private-fields .aav.lock.dashed .icon :is(path, rect, circle, line) { stroke-dasharray: 5 4; stroke-linecap: butt; }
body:has(.sheet-wrap) .toast { top: 16px; bottom: auto; }
.pf-sheet .pf-rule { margin: 0; color: var(--mut); font-size: 13px; line-height: 1.35; }
.pf-sheet .pf-rule .who-bit { display: inline-flex; max-width: 100%; }
.pf-sheet .pf-fact { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.pf-sheet .pf-k { flex: none; color: var(--mut); font-size: 13px; }
.pf-sheet .pf-v { min-width: 0; text-align: right; font-size: 15px; font-weight: 500; }
.pf-sheet .restricted-value { margin: 0; font-size: 14px; font-weight: 400; line-height: 1.4; color: var(--fg); overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
.pf-sheet .pf-why {
  min-width: 0; max-width: 100%; margin: 0; font-size: 12.5px; font-weight: 400; line-height: 16px; color: var(--mut);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-sheet > .btn { width: 100%; }
.commit-short { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.commit-short .link-btn { font-size: inherit; font-weight: 550; }
.agroups .empty { padding: 22px 4px; color: var(--mut); text-align: center; margin: 0; }
.agroups .loading { list-style: none; display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }
.agroups .loading span { height: 42px; border-radius: 12px; background: linear-gradient(90deg, var(--skel-c) 0%, var(--skel-d) 50%, var(--skel-c) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.agroups .loading .pulse-mark { display: none; }
.amore { display: flex; justify-content: center; padding: 10px 0 2px; }
.amore:empty { display: none; }
.more-btn { min-width: 160px; }
.wallet-tabs { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.wallet-scanline { display: flex; justify-content: flex-end; min-height: 32px; }
.wallet-scanline:empty { display: none; }
.wallet-tx, .wallet-holdings { min-width: 0; }
.asset-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; min-height: 32px; }
.asset-tools .scan-link { cursor: pointer; flex: none; }
.act-tools { display: flex; align-items: center; justify-content: flex-end; min-height: 32px; }
.hold-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hold-open-form { display: flex; flex: 1 1 180px; align-items: center; gap: 8px; min-width: 0; }
.hold-open-form .btn { flex: none; height: 40px; padding: 0 14px; }
.hold-open .aamt { min-width: 0; }
.hold-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.hold-open { display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(7rem, max-content); align-items: center; column-gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.hold-open .tmark, .hold-open .atile { width: 36px; height: 36px; aspect-ratio: 1; padding: 0; border-radius: 10px; flex: none; justify-content: center; align-items: center; }
.hold-open .atile .at-sym { display: none; }
.hold-open .atile .at-id { font-size: 11px; letter-spacing: 0; }
.hold-scan { display: grid; place-items: center; width: 32px; height: 32px; margin-left: 8px; border-radius: 8px; color: var(--fg2); text-decoration: none; }
.hold-scan .icon { width: 16px; height: 16px; }
.hold-scan:hover { color: var(--fg); background: rgba(var(--ink-rgb), .05); }
.hrow .aav { flex: 0 0 40px; width: 40px; height: 40px; min-width: 40px; max-width: 40px; }
@media (min-width: 1024px) {
  .arow2 { padding: 0 8px; border-radius: 0; }
}

/* ---- organization admin: join requests (wallet-admin) */
.req-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; flex: none; }
.mhead .req-badge { margin-right: 2px; }
.org-head { display: flex; align-items: center; gap: 14px; min-height: 44px; }
.org-head .orgav { width: 44px; height: 44px; }
.org-head .grow { display: flex; flex-direction: column; min-width: 0; }
.org-head strong { font-size: 15px; font-weight: 600; }
.org-head small { color: var(--mut); font-size: 13px; }
.org-head .tp-link { align-self: center; }
.rq-count:not(:empty) { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 8px; padding: 0 6px; border-radius: 10px; background: var(--s3); color: var(--fg2); font-size: 11.5px; letter-spacing: 0; vertical-align: 1px; }
/* Flat list: no card, rows aligned to the header's left edge; the hover tint bleeds 12 px past the edges. */
.rq-list { display: flex; flex-direction: column; margin: 0 -12px; }
.rq-list > .loading { padding: 16px 12px; }
.rq-row { display: grid; grid-template-columns: 40px auto minmax(0, 1fr) auto; grid-template-areas: "av name name when" "av addr mail mail" "av roles roles roles";
  position: relative; align-items: center; column-gap: 12px; row-gap: 4px; width: 100%; padding: 14px 12px; border: 0; border-radius: 12px; background: none; color: var(--fg); text-align: left; font: inherit; transition: background .15s; }
button.rq-row { cursor: pointer; }
button.rq-row:hover { background: rgba(var(--ink-rgb), .04); }
.rq-row + .rq-row::before { content: ""; position: absolute; top: 0; left: 12px; right: 12px; border-top: 1px solid var(--line); }
.rq-row:hover::before, .rq-row:hover + .rq-row::before { border-color: transparent; }
.rq-av { grid-area: av; width: 40px; height: 40px; align-self: start; margin-top: 2px; }
.rq-name { grid-area: name; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rq-addr { grid-area: addr; color: var(--mut); font-size: 12.5px; white-space: nowrap; }
.rq-mail { grid-area: mail; display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: var(--mut); font-size: 13px; }
.rq-mtxt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rq-mail > .icon { width: 13px; height: 13px; flex: none; }
.rq-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 600; flex: none; }
.rq-ok .icon { width: 14px; height: 14px; stroke: var(--ok); }
.rq-roles { grid-area: roles; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.rq-roles .role { padding: 2px 8px; font-size: 12px; border-radius: 7px; }
.rq-when { grid-area: when; display: inline-flex; align-items: baseline; gap: 8px; justify-content: flex-end; color: var(--mut); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rq-chev { display: none; }
.rq-state { font-weight: 600; font-size: 12.5px; }
.rq-state.approved { color: var(--ok); }
.rq-state.rejected { color: var(--fg2); }
.rq-empty { display: flex; align-items: center; gap: 14px; padding: 14px 12px; }
.rq-empty > span:last-child { display: flex; flex-direction: column; }
.rq-empty strong { font-weight: 600; }
.rq-empty small { color: var(--mut); font-size: 13px; }
.rq-sheet .rows .kv a { color: var(--fg); text-decoration: none; }
.rq-sheet .rows .kv a:hover { text-decoration: underline; }
.rq-sheet .priv { display: inline-flex; align-items: center; gap: 6px; }
.rq-who { display: flex; align-items: center; gap: 14px; }
.rq-who .ident.lg { width: 48px; height: 48px; }
.rq-who .grow { display: flex; flex-direction: column; min-width: 0; }
.rq-who strong { font-size: 17px; font-weight: 650; }
.rq-who small { color: var(--mut); font-size: 13px; }
.rq-picks { display: flex; flex-direction: column; margin: 0 -12px; }
.rq-pick { position: relative; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 12px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.rq-pick:hover { background: rgba(var(--ink-rgb), .04); }
.rq-pick + .rq-pick::before { content: ""; position: absolute; top: 0; left: 12px; right: 12px; border-top: 1px solid var(--line); }
.rq-pick:hover::before, .rq-pick:hover + .rq-pick::before { border-color: transparent; }
.rq-pick .grow { display: flex; flex-direction: column; }
.rq-pick strong { font-weight: 600; }
.rq-pick small { color: var(--mut); font-size: 12.5px; }
/* Invites: same flat rows as the requests; "Invite" sits on the section title line, like "Open in UTN Scan". */
button.inv-new { display: inline-flex; align-items: center; gap: 4px; align-self: center; height: 28px; margin: -2px -8px -2px 0; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--fg); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .15s; }
button.inv-new:hover { background: rgba(var(--ink-rgb), .06); }
button.inv-new[hidden] { display: none; }
.inv-new .icon { width: 15px; height: 15px; }
.rq-av.sic { width: 40px; height: 40px; border-radius: 12px; }
.rq-empty .grow { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rq-empty .small-btn { flex: none; }
.inv-share { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.inv-link { max-width: 100%; margin: 0; text-align: center; color: var(--mut); }
.inv-share .btn-row { width: 100%; }
.rq-roles.inline { margin-top: 0; justify-content: flex-end; }
.inv-acct { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.inv-acct .mono { font-size: 12.5px; }
.ident.xs { width: 20px; height: 20px; }
.inv-fee { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; }
.inv-fee .icon { width: 14px; height: 14px; }
.inv-about { margin: 0; }
.org-page { gap: 18px; }
.side-orgs { display: contents; }
@media (min-width: 1024px) {
  .side-orgs { display: contents; margin: 0; }
  .side-label { padding: 0 14px 6px; font-size: 11.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); white-space: nowrap; }
  .side-orgs a { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px 0 13px; border-radius: 10px; text-decoration: none; color: var(--fg2); font-weight: 550; font-size: 14px; transition: background .15s, color .15s; }
  .side-orgs a:hover { background: rgba(var(--ink-rgb), .045); color: var(--fg); }
  .side-orgs a.on { background: var(--s2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
  .side-orgs .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shell.rail .side-orgs .req-badge { position: absolute; top: 3px; left: 30px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
  .shell.rail .side-label { height: 0; padding: 0; overflow: hidden; }
  .main.wide .org-page { max-width: 1080px; }
  .rq-row { grid-template-columns: 40px minmax(170px, 1fr) minmax(0, 1.3fr) minmax(0, 1fr) 150px 16px; grid-template-areas: "av name mail roles when chev" "av addr mail roles when chev";
    column-gap: 20px; row-gap: 2px; min-height: 68px; padding: 12px; }
  .rq-av { align-self: center; margin-top: 0; }
  .rq-roles { margin-top: 0; }
  .rq-chev { grid-area: chev; display: grid; place-items: center; color: var(--mut); }
  .rq-chev .icon { width: 16px; height: 16px; }
  .rq-when { flex-direction: column; align-items: flex-end; gap: 2px; }
  .rq-empty { padding: 16px 12px; }
}

/* ============================================================ v9 onboarding
   Phones: one column (hero, buttons, features, links), as before. Desktop (>= 1024 px): a split on one grid:
   the brand side left (hero + the three points as a flat row), the actions panel right (one panel, no cards in
   it), top bar aligned to the same content edges (logo left, network and theme right). */
.w-act { display: contents; }
.w-head { display: none; }
.welcome > .hero { order: 0; }
.welcome .cta { order: 1; }
.welcome > .features { order: 2; }
.welcome .foot { order: 3; }
@media (min-width: 1024px) {
  .shell.bare { --ow: 1160px; --og: max(40px, calc((100% - var(--ow)) / 2)); }
  .shell.bare .top { justify-content: space-between; min-height: 64px; padding: 12px var(--og); }
  .shell.bare .top .brand { display: flex; }
  .shell.bare:not(.onboard) .main { max-width: none; width: 100%; margin: 0; padding: 32px var(--og) 56px; }
  .shell.bare:not(.onboard) .main > * { max-width: 640px; }
  .shell.onboard .main { max-width: none; min-height: calc(100dvh - 65px); display: grid; align-items: center; padding: 0 var(--og) 40px; }
  .shell.onboard .welcome { max-width: none; width: 100%; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; grid-template-rows: auto auto;
    column-gap: clamp(56px, 7vw, 128px); row-gap: 40px; align-items: start; padding: 40px 0 0; }
  .shell.onboard .welcome > .hero { grid-column: 1; grid-row: 1; text-align: left; align-items: flex-start; gap: 16px; padding: 0; }
  .shell.onboard .hero::before { left: 0; top: -80px; transform: translateX(-30%); width: 520px; height: 360px; }
  .shell.onboard .hero-mark { width: 56px; height: 56px; margin-bottom: 4px; }
  .shell.onboard .hero h1 { font-size: clamp(40px, 3.1vw, 54px); line-height: 1.06; letter-spacing: -.03em; max-width: 15ch; margin: 0; }
  .shell.onboard .lead { max-width: 46ch; font-size: 17px; margin: 0; }
  .shell.onboard .welcome > .features { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px;
    padding: 24px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
  .shell.onboard .feature { flex-direction: column; align-items: flex-start; gap: 12px; padding: 0; }
  .shell.onboard .feature .ft { background: rgba(var(--ink-rgb), .06); }
  .shell.onboard .feature .ft .icon { stroke: var(--fg); }
  .shell.onboard .w-act { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; flex-direction: column; gap: 20px;
    padding: 28px; border-radius: 22px; background: var(--s1); border: 1px solid var(--line); }
  .shell.onboard .w-head { display: block; }
  .shell.onboard .w-head h2 { margin: 0 0 6px; font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
  .shell.onboard .w-head p { margin: 0; font-size: 14px; line-height: 1.5; }
  .shell.onboard .w-act .status:empty { display: none; }
  .shell.onboard .w-act .foot { align-items: flex-start; text-align: left; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
}
@media (min-width: 1800px) {
  .shell.bare { --ow: 1320px; }
  .shell.onboard .welcome { grid-template-columns: minmax(0, 1fr) 460px; }
  .shell.onboard .hero h1 { font-size: 60px; }
  .shell.onboard .lead { font-size: 18px; }
}

/* ============================================================ v9 desktop layout (condensed)
   Desktop (>= 1024 px): the sidebar stays; every page sits in ONE condensed column (--cw, 920 px; 960 px from
   1800 px) centered in the area right of the sidebar. The top bar uses the same gutters, so the network pill and
   theme button end on the column's right edge. Inside the column: the important block big, secondary ones beside
   it (CSS grid only; phones keep the DOM order and are untouched). */
@media (min-width: 1024px) {
  .shell:not(.bare) { --cw: 920px; --cg: max(32px, calc((100% - var(--cw)) / 2)); }
  /* .shell.stack also matched the .stack utility (gap 14px), which shifted stack pages 14 px right of tab pages. */
  .shell.stack { gap: 0; }
  .col > .top { padding: 10px var(--cg); }
  .col > .main, .col > .main.wide, .col > .main:has(.dcols) { max-width: none; width: 100%; margin: 0; padding: 22px var(--cg) 56px; }
  .col > .main > section { width: 100%; }

  /* Home / Assets / Activity: balance big on the left, actions and organization beside it, then the list. */
  .home:not(.wallet-home) { grid-template-columns: minmax(0, 1fr) 330px; grid-template-areas: "bal quick" "bal orgs" "slides slides"; gap: 12px 14px; }
  .home > .balance { padding: 20px 22px 18px; }
  .home > .balance .amount { margin-top: 4px; }
  .home .quick { grid-template-columns: 1fr 1fr; gap: 8px; align-self: start; }
  .home .qa { height: 42px; justify-content: flex-start; padding: 0 12px; }
  .home > .orgs, .home > :nth-child(3) { align-self: stretch; }
  .home > .tabpanel { margin-top: 10px; }
  .tabpanel .agrid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }

  /* Stack pages share the column; the header (back, title) spans it. */
  .send-form, .receive-page, .faucet-page, .access-page, .settings-page, .join-page, .mem-box, .native-page, .org-page, .invite-page > .stack { display: grid; gap: 14px; align-items: start; }
  .send-form { grid-template-columns: minmax(0, 1fr) 300px; }
  .send-form > * { grid-column: 1; }
  .send-form > .payfrom { grid-column: 1 / -1; }
  .send-form > .send-fee { grid-column: 2; grid-row: 2 / span 2; }
  .send-form > .send-fee.small { align-self: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--s1); margin: 0; }
  .send-form > .btn.big { justify-self: start; min-width: 240px; }

  .receive-page { grid-template-columns: 1fr; }
  .receive-page .receive-card { display: grid; grid-template-columns: 264px minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: 32px; row-gap: 16px; align-items: center; justify-items: start; padding: 24px; }
  .receive-page .qr-box { grid-row: 1 / span 2; width: 264px; }
  .receive-page .addr-full { max-width: 360px; text-align: left; font-size: 17px; align-self: end; }
  .receive-page .btn-row { align-self: start; width: auto; }
  .receive-page .btn-row .btn { min-width: 140px; }

  .faucet-page { grid-template-columns: minmax(0, 1fr) 400px; column-gap: 32px; }
  .faucet-page > .drop-hero { align-items: flex-start; text-align: left; padding: 6px 0 0; }
  .faucet-page > .drop-hero h1 { font-size: 30px; }
  .faucet-page > .card { grid-column: 2; grid-row: 1 / span 2; }
  .faucet-page > a.btn { grid-column: 1; justify-self: start; }

  .access-page { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .access-page > h1 { grid-column: 1 / -1; }
  .access-page .access { background: none; border: 0; box-shadow: none; padding: 0; }

  .join-page { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 20px; }
  .join-page > * { grid-column: 1 / -1; }
  .join-page > .acct-line { grid-column: 2; grid-row: 3; }
  .join-page > .stack { grid-column: 1; grid-row: 3; }

  .home .orgs .kv > :last-child, .home > :nth-child(3) .kv > :last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .join-page > .acct-line { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; align-items: center; padding: 14px 16px; }
  .join-page > .acct-line .al-k { grid-column: 1 / -1; }
  .join-page > .acct-line .al-av { margin-left: 0; }
  .join-page > .acct-line .al-txt { flex-direction: column; gap: 2px; }
  .mem-box { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  .native-page { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .native-page > .back { grid-column: 1 / -1; }

  .org-page { grid-template-columns: minmax(0, 1fr); }
  .org-page > *,
  .org-page > .sect,
  .org-page > .sect + .sect,
  .org-page > .inv-sect { grid-column: 1; grid-row: auto; }

  .invite-page > .stack { grid-template-columns: minmax(0, 1fr) 380px; column-gap: 28px; }
  .invite-page > .stack > * { grid-column: 2; }
  .invite-page > .stack > .org-head, .invite-page > .stack > .inv-about, .invite-page > .stack > .rq-list, .invite-page > .stack > .status:only-child { grid-column: 1; }
  .invite-page > .stack > .inv-about { grid-row: 2; }
  .invite-page > .stack > .org-head { grid-row: 1; }
  .invite-page > .stack > .sect { grid-row: 1 / span 3; }
  .dside .hrow strong.wrap { overflow-wrap: break-word; word-break: normal; }

  .dcols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
}
@media (min-width: 1800px) { .shell:not(.bare) { --cw: 960px; } }

/* v9 address autocomplete: one flat dropdown under the field (in the flow inside dialogs, so nothing is clipped). */
.ac { position: relative; flex: 1; min-width: 0; }
.ac > input { width: 100%; }
.ac-list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none; max-height: 320px; overflow: auto;
  background: var(--s2); border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 14px 34px rgba(0,0,0,.32); }
.sheet .ac-list { position: static; margin-top: 6px; box-shadow: none; }
.ac-item { display: flex; flex-direction: row; align-items: center; gap: 12px; height: 64px; min-height: 64px; max-height: 64px; padding: 0 10px; border-radius: 10px; cursor: pointer; }
.ac-item.on, .ac-item:hover { background: rgba(var(--ink-rgb), .06); }
.ac-av { width: 38px; height: 38px; flex: none; font-size: 13px; border-radius: 50%; }
.ac-item .tmark.ac-av, .ac-item .orgav.ac-av, .ac-item .sic.ac-av { width: 38px; height: 38px; border-radius: 50%; }
.ac-item .sic.ac-av { display: grid; place-items: center; background: rgba(var(--ink-rgb), .08); }
.ac-item .sic.ac-av .icon { width: 18px; height: 18px; }
.ac-txt, .ac-amt { display: flex; flex-direction: column; justify-content: flex-start; min-width: 0; height: 40px; min-height: 40px; max-height: 40px; gap: 2px; overflow: hidden; flex: none; }
.ac-txt { flex: 1 1 auto; }
.ac-amt { align-items: flex-end; text-align: right; margin-left: auto; }
.ac-txt strong, .ac-pri { display: block; height: 20px; min-height: 20px; max-height: 20px; font-size: 15px; font-weight: 500; line-height: 20px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-txt small, .ac-sec { display: block; height: 16px; min-height: 16px; max-height: 16px; font-size: 12.5px; font-weight: 400; line-height: 16px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .grow strong { font-weight: 500; font-size: 15px; color: var(--fg); }
.srow .grow small { font-weight: 400; font-size: 12.5px; line-height: 16px; min-height: 16px; color: var(--mut); }
.ac-load, .ac-empty { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; color: var(--mut); }
.ac-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--fg2); animation: acspin .7s linear infinite; }
@keyframes acspin { to { transform: rotate(360deg); } }
.scan-manual .paste-row { align-items: start; }
.scan-manual .paste-row .btn { height: 48px; }

/* ============================================================ Organization page
   Vault stays above one horizontal tab row: Overview, and Members for an admin.
   A single Overview tab is hidden. The row scrolls sideways. It does not wrap. */
.org-wrap { display: contents; }
.org-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.org-title h1 { margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; }
.role-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--fg2); font-size: 13px; font-weight: 650; flex: none; }
.role-chip.admin { color: #E11D2E; border-color: rgba(225, 29, 46, .65); }
.otabs-row { position: relative; min-width: 0; }
.otabs { display: flex; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 0; margin: 0; padding: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity; border-bottom: 1px solid var(--line); }
.otabs::-webkit-scrollbar { display: none; }
.otabs button { position: relative; display: flex; align-items: stretch; justify-content: center; gap: 6px; flex: 0 0 auto; min-width: 0; height: 44px; margin: 0; padding: 0 14px; border: 0; border-radius: 0; background: transparent; color: var(--mut); font: inherit; font-size: 14px; font-weight: 600; letter-spacing: -.011em; line-height: 1; cursor: pointer; white-space: nowrap; scroll-snap-align: start; -webkit-appearance: none; appearance: none; }
.otabs button:hover { color: var(--fg); }
.otabs button.on { background: transparent; color: var(--fg); font-weight: 650; }
.otab-label { position: relative; display: inline-flex; align-items: center; height: 100%; }
.otabs button.on .otab-label::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: #E11D2E; }
.otabs button:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.otabs .req-badge { position: static; align-self: center; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
.otabs-more { position: absolute; right: 0; top: 0; bottom: 1px; width: 36px; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--fg2); background: linear-gradient(90deg, transparent, var(--bg) 45%); }
.otabs-more[hidden] { display: none; }
.otabs-more .icon { width: 18px; height: 18px; }
.org-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.org-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; padding: 14px 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--s1); color: var(--fg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.org-act:hover { border-color: rgba(225, 29, 46, .45); }
.org-facts h2, .mem-card h2, .o-decisions h2, .o-records h2 { margin: 0 0 4px; font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.o-recent { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.org-facts .rows > .kv { padding: 12px 0; }
.card-head button.tp-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--fg2); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; }
.card-head button.tp-link .icon { width: 14px; height: 14px; }
.mem-card .card-head { margin-bottom: 2px; }
.mem-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 10px 12px; width: 100%; margin: 0; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: left; font: inherit; cursor: default; }
button.mem-row { cursor: pointer; }
.mem-row:last-child { border-bottom: 0; }
.mem-av { width: 40px; height: 40px; font-size: 13px; }
.mem-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mem-id strong { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-id small { color: var(--mut); font-size: 12.5px; }
.mem-row .role { background: transparent; border: 1px solid var(--line2); border-radius: 999px; }
.mem-row .role.admin { color: #E11D2E; border-color: rgba(225, 29, 46, .65); background: transparent; }
.mem-cap { display: flex; flex-direction: column; align-items: flex-end; min-width: 52px; font-variant-numeric: tabular-nums; }
.mem-cap strong { font-size: 14px; font-weight: 650; }
.mem-cap small { color: var(--mut); font-size: 11px; font-weight: 600; }
.mem-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.mem-actions .btn { flex: none; width: auto; min-height: 34px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 650; gap: 6px; }
.mem-actions .btn .icon { width: 14px; height: 14px; }
.mem-more { display: flex; justify-content: flex-end; gap: 14px; padding-top: 8px; }
.mem-more:empty { display: none; }
.mem-more .tp-link { border: 0; background: none; color: var(--mut); font: inherit; font-size: 13px; cursor: pointer; }
.otab-panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.o-pair { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: stretch; }
.o-card { height: 100%; box-sizing: border-box; }
.o-queue.is-empty { padding: 12px 16px 10px; gap: 4px; }
.queue-empty { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0; color: var(--mut); font-size: 13.5px; font-weight: 400; line-height: 1.35; text-align: center; }
.queue-empty .icon { width: 14px; height: 14px; flex: none; stroke: currentColor; }
.otab-body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.otab-body > * { min-width: 0; }
.o-overview, .o-members, .o-activity, .o-invites, .o-settings, .o-assets, .o-decisions, .o-records { display: flex; flex-direction: column; gap: 18px; }
.honest { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(var(--ink-rgb), .04); color: var(--fg2); font-size: 13px; line-height: 1.45; }
.dst { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 650; background: rgba(var(--ink-rgb), .06); color: var(--fg2); }
.dst.open, .dst.active, .dst.passed { background: rgba(46, 160, 67, .14); color: var(--ok); }
.dst.rejected, .dst.cancelled { background: rgba(225, 29, 46, .1); color: var(--red); }
.dst.expired, .dst.revoked { color: var(--mut); }
.dec-title { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.mem-gas { display: block; margin-top: 2px; color: var(--mut); font-size: 12px; font-weight: 550; }
.vault { gap: 4px; }
.vault .amount { margin-top: 6px; font-size: 48px; }
.vault-toks { display: flex; flex-wrap: wrap; gap: 6px; }
.vault-sub { color: var(--mut); font-size: 13px; }
.vault-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; width: 100%; margin-top: 10px; }
.vault-foot .addr { margin-top: 0; min-width: 0; }
.vault-end { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-left: auto; flex: none; }
.vault-act { display: flex; justify-content: flex-end; flex: none; width: auto; margin: 0; }
.vault-act .btn,
.vault-act .btn.primary { flex: none; width: auto; min-height: 34px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 650; gap: 6px; }
.vault-act .btn .icon { width: 14px; height: 14px; }
.org-invites-btn { min-height: 34px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; gap: 6px; }
.org-invites-btn .icon { width: 14px; height: 14px; }
.o-limit { display: flex; flex-direction: column; gap: 8px; }
.lim-main strong { font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lim-note { margin: 2px 0 0; }
.lbar { display: block; position: relative; width: 100%; height: 6px; border-radius: 3px; background: rgba(var(--ink-rgb), .08); overflow: hidden; }
.lbar > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ok); max-width: 100%; }
.mem-lim { flex-direction: column; align-items: stretch; gap: 4px; }
.mem-lim .lbar { max-width: 160px; height: 4px; }
.role.admin { background: rgba(225, 29, 46, .1); color: var(--red); }
.role.warn { background: rgba(242, 169, 59, .12); color: var(--warn); }
.rq-state.pending { color: var(--warn); }
.rq-state.suspended { color: var(--warn); }
.rq-state.removed, .rq-state.expired, .rq-state.cancelled { color: var(--mut); }
.sect-acts { display: inline-flex; align-items: center; gap: 12px; }
.sect-acts .seg { min-width: 150px; }
.sect-acts .seg button { height: 30px; font-size: 12.5px; }
.unit-field { position: relative; }
.unit-field input { padding-right: 64px; }
.unit-field .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--mut); font-weight: 600; font-size: 13px; pointer-events: none; }
.stepper { display: inline-flex; align-items: center; gap: 14px; }
.stepper .icon-btn { width: 36px; height: 36px; font-size: 18px; color: var(--fg); }
.step-val { min-width: 20px; text-align: center; font-size: 17px; font-variant-numeric: tabular-nums; }
.amount-input { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.group-card.flat .srow { padding-left: 0; padding-right: 0; }
.ap-row .rq-when strong { color: var(--fg); font-weight: 650; }
/* Send: explicit Pay from. Personal is not selected just because Home is open. */
.payfrom { display: flex; flex-direction: column; gap: 8px; }
.pay-ask { margin: 0; color: var(--fg2); font-size: 13.5px; line-height: 1.4; }
.pay-choices { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: stretch; }
.pay-choice { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; min-height: 72px; height: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--s1); color: var(--fg); text-align: left; cursor: pointer; font: inherit; }
.pay-choice strong { font-size: 14.5px; font-weight: 700; }
.pay-choice small { color: var(--mut); font-size: 12.5px; line-height: 1.35; }
.pay-choice.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); background: rgba(225, 29, 46, .08); }
.pay-choice:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
@media (min-width: 640px) {
  .pay-choices { grid-template-columns: 1fr 1fr; }
  .o-pair { grid-template-columns: 1fr 1fr; }
}
.send-memo .hint { color: var(--mut); font-size: 12.5px; }
.pay-note { margin: 0; }
@media (min-width: 1024px) {
  .org-page.o26 { grid-template-columns: minmax(0, 1fr); }
  .org-page.o26 > * { grid-column: 1; }
  .o-overview { display: flex; flex-direction: column; gap: 14px; width: 100%; }
  .vault-act { max-width: none; }
}

/* ============================================================ v11 Settings: one column, compact profile row, flat lists */
.settings-page { gap: 28px; }
.settings-page > .page-head { margin-bottom: -8px; }
.settings-page .group { gap: 6px; }
.settings-page .srow { min-height: 60px; padding: 10px 0; gap: 14px; }
.settings-page .srow .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.settings-page .srow > .icon, .settings-page .srow > .radio, .settings-page .srow > .soon-tag, .settings-page .srow > .right { margin-left: auto; }
.settings-page .group-card > .pad { padding: 8px 0 4px; }
/* profile: left aligned on the same edges as the lists */
.settings-page > .prow { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "av id" "acts acts"; align-items: center; column-gap: 16px; row-gap: 16px; padding: 4px 0 24px; text-align: left; border-bottom: 1px solid var(--line); background: none; border-radius: 0; }
.prow > .av { grid-area: av; width: 56px; height: 56px; font-size: 22px; }
.prow .p-id { grid-area: id; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.prow .p-id h2 { font-size: 20px; letter-spacing: -.02em; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .p-acts { grid-area: acts; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.prow .addr { margin: 0; }
.prow .p-scan { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 550; color: var(--mut); text-decoration: none; }
.prow .p-scan .icon { width: 13px; height: 13px; }
.prow .p-scan:hover { color: var(--fg); }
/* organizations: flat rows like the rest of Settings (Home keeps its card) */
.settings-page .orgs { gap: 0; }
.settings-page .orgs > * + * { border-top: 1px solid var(--line); }
.settings-page .orgs > .mcard { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 14px 0; }
.settings-page .join-row { min-height: 60px; padding: 10px 0; border: 0; border-radius: 0; background: none; }
.settings-page .join-row > .icon { margin-left: auto; }
.settings-page .orgs .mhead { gap: 14px; }
.settings-page .orgs .mhead .orgav { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
.settings-page .orgs .mhead .grow strong { font-size: inherit; }
.settings-page .join-row small { white-space: normal; overflow: visible; text-overflow: clip; }
/* hover: a slightly lighter dark, drawn behind the row so text stays on the column edges */
@media (hover: hover) {
  .settings-page a.srow, .settings-page button.srow, .settings-page .join-row, .settings-page .orgs > .mcard.link { position: relative; isolation: isolate; }
  .settings-page a.srow::before, .settings-page button.srow::before, .settings-page .join-row::before, .settings-page .orgs > .mcard.link::before { content: ""; position: absolute; inset: 1px -12px; z-index: -1; border-radius: 12px; background: transparent; transition: background .15s; }
  .settings-page a.srow:hover::before, .settings-page button.srow:hover::before, .settings-page .join-row:hover::before, .settings-page .orgs > .mcard.link:hover::before { background: var(--s2); }
  .settings-page .join-row:hover { background: none; }
}
@media (min-width: 1024px) {
  .settings-page { display: flex; flex-direction: column; align-items: stretch; gap: 32px; }
  .settings-page > .page-head { margin-bottom: -12px; }
  .settings-page .srow, .settings-page .join-row { min-height: 56px; padding: 8px 0; }
  .settings-page > .prow { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "av id acts"; padding: 0 0 28px; }
  .prow .p-acts { justify-content: flex-end; flex-wrap: nowrap; }
  .settings-page .seg { max-width: 420px; }
}

/* ============================================================ v16 desktop column
   Sidebar stays. The top bar spans the main pane; network and theme sit on its right edge.
   From 600 px upward the same card system applies. Phones (under 600 px) are unchanged. */
@media (min-width: 600px) {
  .shell:not(.bare) { --cg: 0px; --col: 1080px; }
  .side { width: 232px; background: #101114; }
  :root[data-theme="light"] .side { background: #F7F8FA; }
  .shell.rail .side { width: 68px; }
  .side-nav a.on, .side-foot > a.on { background: rgba(225, 29, 46, .10); box-shadow: none; }
  .side-nav a.on .icon, .side-foot > a.on .icon { stroke: var(--red); }

  .col { min-height: 100dvh; }
  .col > .top { width: 100%; justify-content: flex-end; padding: 10px 16px; min-height: 52px; }
  .col > .top .top-actions { justify-content: flex-end; margin-left: auto; }

  .col > .main, .col > .main.wide, .col > .main:has(.dcols) {
    flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    width: 100%; max-width: none; margin: 0; padding: 32px 40px 56px; box-sizing: border-box;
  }
  .col > .main > section { width: min(var(--col), 100%); max-width: var(--col); flex: 0 0 auto; }

  .desk { display: flex; flex-direction: column; gap: 12px; min-width: 0; width: 100%; }
  .pagebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .pagebar-copy { min-width: 0; }
  .pagebar h1 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
  .pagebar p { margin: 4px 0 0; color: var(--mut); font-size: 13.5px; line-height: 1.4; }
  .pagebar-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .tb { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--s1); color: var(--fg); font-family: inherit; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
  .tb .icon { width: 15px; height: 15px; stroke: var(--red); }
  .tb:hover { border-color: rgba(225, 29, 46, .45); background: var(--s2); }
  .tb.primary { background: var(--red); border-color: var(--red); color: #fff; }
  .tb.primary .icon { stroke: #fff; }
  .tb.primary:hover { background: var(--red-d); border-color: var(--red-d); }
  .tb:focus-visible, .filters button:focus-visible, .set-nav button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

  .desk-top { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 12px; margin-top: 4px; }
  .desk-top > * { height: 100%; min-width: 0; }
  .balance.strip { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; height: 100%; min-height: 0; padding: 16px 18px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); box-shadow: none; }
  .balance.strip .wm { display: none; }
  .balance.strip .metric { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
  .balance.strip .bal-label { font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 550; color: var(--fg2); }
  .balance.strip .amount.balance-amt .unit { font-size: 16px; }
  .balance.strip .amount { margin: 0; min-height: 0; justify-content: flex-start; font-size: 28px; }
  .balance.strip .amount .num { letter-spacing: -.03em; }
  .balance.strip .coin-mark { width: 16px; height: 16px; }
  .balance.strip .bal-foot { margin-top: 0; }
  .balance.strip .addr { margin: 0; }
  .balance.strip .skeleton { width: 120px; height: 28px; }
  .balance.strip .card-acts { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }

  .desk-rail { display: flex; flex-direction: column; justify-content: center; height: 100%; min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--s1); box-sizing: border-box; }
  .desk-rail .tp-head { margin-bottom: 2px; }
  .desk-rail .join-row, .desk-rail .mcard, .desk-rail .card { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 8px 0; }
  .desk-rail .join-row { min-height: 0; gap: 10px; }
  .desk-rail .join-row small { white-space: normal; }
  .desk-rail .mcard { gap: 8px; }

  .desk-main { min-width: 0; }
  .desk .tlist, .desk .actable { min-width: 0; width: 100%; }
  .tabpanel .tlist .hrow, .tabpanel .tlist .thead { grid-template-columns: 42px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .85fr) minmax(72px, .8fr); gap: 12px; }
  .desk .tlist .hrow > .tmark { justify-self: start; }
  .desk .tlist .grow { min-width: 0; overflow: hidden; }
  .desk .tlist .grow strong, .desk .tlist .grow small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .desk .tabpanel .actable .hrow, .desk .tabpanel .history.actable .thead { grid-template-columns: 76px minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(68px, .7fr) minmax(80px, .8fr); gap: 8px; }
  .tlist .thead span:nth-child(4), .tlist .c-act { text-align: right; }
  .tlist .c-act { color: var(--mut); font-size: 12.5px; font-weight: 600; }
  .desk .hrow:hover { background: rgba(var(--ink-rgb), .04); }
  .desk .tlist .hrow, .desk .actable .hrow { min-height: 48px; padding: 8px 4px; }
  .desk .grow strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .desk .add-row { padding: 8px 4px; min-height: 48px; }
  .desk .history .empty { text-align: left; padding: 18px 4px; }
  .desk .txflat .empty, .desk .txflat .empty-state { text-align: center; padding: 18px 16px; }
  .desk .actable .aic { width: 32px; height: 32px; border-radius: 8px; }
  .desk .actable .hamt strong.pos { color: var(--ok); }

  .filters { display: flex; flex-wrap: wrap; gap: 4px; }
  .filters button { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--mut); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
  .filters button:hover { color: var(--fg); }
  .filters button.on { color: var(--fg); background: var(--s2); border-color: var(--line); }

  .open-block { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; max-width: none; }
  .open-block > label { margin: 0; color: var(--fg); }
  .open-block .hint { margin: 0; color: var(--mut); font-size: 12.5px; }
  .open-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
  .open-bar input { height: 36px; padding: 0 12px; border-radius: 8px; }
  .empty-desk { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: none; padding: 20px 2px 8px; }
  .empty-desk strong { font-size: 15px; font-weight: 650; }
  .empty-desk p { margin: 0; color: var(--mut); font-size: 13.5px; line-height: 1.5; }
  .asset-groups { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
  .asset-group h3 { margin: 0; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
  .desk .agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

  .col > .main:has(.desk-home),
  .col > .main:has(.desk-page) { justify-content: flex-start; padding: 32px 40px 56px; }
  .col > .main > section.desk-home,
  .col > .main > section.desk-page { width: min(1080px, 100%); max-width: 1080px; }
  .desk-home .pagebar, .desk-page .pagebar { border-bottom: 0; padding-bottom: 0; }
  .desk-home .pagebar h1, .desk-page .pagebar h1 { font-size: 28px; font-weight: 600; }
  .dash-main > .hold-card, .dash-main > .tabpanel, .dash-main > section.stack { min-width: 0; }
  .hold-card > .filters { margin-bottom: 8px; }
  .dash-main .page-head h1, .dash-main > section.stack > h1, .dash-main .drop-hero h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; text-align: left; }
  .dash-main > .faucet-page { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .dash-main > .faucet-page > .drop-hero { align-items: flex-start; text-align: left; padding: 0; }
  .dash-main > .faucet-page > .card,
  .dash-main > .faucet-page > a.btn { grid-column: auto; grid-row: auto; width: 100%; max-width: none; justify-self: stretch; }
  .icon-btn[aria-label="Scan QR code"] { display: none; }
  .dash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: 16px; align-items: start; }
  .dash-main, .dash-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .dash-side .balance.strip, .dash-side .desk-rail { height: auto; justify-content: flex-start; }
  .chart-card, .hold-card { border: 1px solid var(--line); border-radius: 14px; background: var(--s1); padding: 16px 18px 14px; min-width: 0; }
  .chart-body { min-height: 148px; }
  .chart-skel { height: 140px; border-radius: 10px; }
  .chart-empty { margin: 36px 0; color: var(--mut); font-size: 13.5px; line-height: 1.45; }
  .chart-cap { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; }
  .flow-chart { width: 100%; height: auto; display: block; }
  .flow-chart .up { fill: #E11D2E; }
  .flow-chart .down { fill: rgba(225, 29, 46, .38); }
  .flow-chart .flat { fill: var(--line2); }
  .flow-chart .zero { stroke: var(--line2); stroke-width: 1; }
  .flow-chart .tick { fill: var(--mut); font-size: 11px; font-family: inherit; }
  .chart-vals { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 10px; }
  .chart-vals span { display: flex; flex-direction: column; gap: 1px; min-width: 72px; }
  .chart-vals small { color: var(--mut); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
  .chart-vals strong { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
  .chart-vals strong.up { color: #E11D2E; }
  .chart-vals strong.down { color: var(--mut); }

  .col > .main:has(.desk-settings) { justify-content: flex-start; padding: 32px 44px 64px; }
  .col > .main > section.desk-settings { width: min(880px, 100%); max-width: 880px; }
  .desk-settings { gap: 0; width: 100%; }
  .desk-settings .pagebar { border-bottom: 0; padding-bottom: 0; margin-bottom: 24px; }
  .desk-settings .pagebar h1 { font-size: 30px; font-weight: 600; }
  .set-cards { display: flex; flex-direction: column; gap: 32px; }
  .set-card { border: 1px solid var(--line); border-radius: 14px; background: var(--s1); padding: 20px 24px; }
  .set-card-title { margin: 0 0 8px; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
  .desk-settings .group { gap: 0; }
  .desk-settings .group-title { display: none; }
  .desk-settings .group-card { background: none; border: 0; padding: 0; }
  .desk-settings .srow { padding: 16px 0; min-height: 0; }
  .desk-settings .set-rows > .srow + .srow,
  .desk-settings .set-card > .srow { border-top: 1px solid var(--line); }
  .desk-settings .btn { min-height: 40px; }
  .desk-settings .set-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; }
  .desk-settings .set-actions .btn { text-decoration: none; }
  .desk-settings .revoke { min-height: 36px; padding: 0 12px; font-size: 13px; color: var(--fg2); }
  .desk-settings .revoke:hover { color: #E11D2E; border-color: rgba(225, 29, 46, .45); background: rgba(225, 29, 46, .08); }
  .desk-settings .set-note { margin: 4px 0 12px; font-size: 13.5px; line-height: 1.45; }
  .desk-settings .set-acct { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 4px 0 8px; }
  .desk-settings .set-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .desk-settings .set-id strong { font-size: 16px; font-weight: 650; }
  .desk-settings .set-org:empty { display: none; }
  .desk-settings .set-acct .btn { white-space: nowrap; }
  .desk-settings .foot-meta { margin-top: 24px; }
  .desk-settings .set-card .card { background: none; border: 0; box-shadow: none; padding: 8px 0; }
  .set-split { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 8px 16px; align-items: stretch; min-height: 0; }
  .set-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 12px; padding-top: 4px; }
  .set-nav button { display: flex; align-items: center; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--fg2); font: inherit; font-size: 13.5px; font-weight: 550; text-align: left; cursor: pointer; }
  .set-nav button:hover { background: rgba(var(--ink-rgb), .04); color: var(--fg); }
  .set-nav button.on { background: rgba(225, 29, 46, .10); color: var(--fg); }
  .set-nav button[data-id="device"] { margin-top: 12px; }
  .set-detail { min-width: 0; padding: 4px 0 0 16px; border-left: 1px solid var(--line); }
  .set-title { margin: 0 0 8px; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
  .set-pane:not([data-id="account"]) > .group > .group-title { display: none; }
  .desk-settings .prow { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "av id" "acts acts"; align-items: center; column-gap: 12px; row-gap: 10px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
  .desk-settings .p-acts { justify-content: flex-start; flex-wrap: wrap; }
}

/* v13: deployment done screen, "Contract created at 0x…" */
.created-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line2); border-radius: 16px; background: rgba(var(--ink-rgb),.04); }
.created-card .created-addr { font-size: 13.5px; font-weight: 600; word-break: break-all; line-height: 1.45; }
.created-card .created-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.created-card .pill-btn { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.created-card .pill-btn svg { width: 14px; height: 14px; }

/* ============================================================ v21 unified wallet visual system
   One hierarchy from onboarding through detail and organization flows:
   page context -> primary content surface -> explicit actions. */
:root {
  --wallet-max: 1240px;
  --wallet-rail: 320px;
  --surface-r: 16px;
  --surface-pad: 20px;
}

/* Interactive surfaces must look interactive before hover. */
a.mcard.link, a.acard, a.hrow, a.join-row { cursor: pointer; }
a.mcard.link, a.acard, .join-row, button.srow, a.srow {
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .15s var(--ease);
}
a.mcard.link:hover, a.acard:hover, .join-row:hover {
  border-color: rgba(225,29,46,.32);
  box-shadow: 0 0 0 1px rgba(225,29,46,.08);
}
a.mcard.link:active, a.acard:active, .join-row:active { transform: translateY(1px); }
.card-cue {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 -2px -2px; padding-top: 12px; border-top: 1px solid var(--line);
  color: var(--fg2); font-size: 12.5px; font-weight: 650;
}
.card-cue .icon { width: 15px; height: 15px; color: var(--red); }
.acard::after {
  content: "View asset"; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 2px 1px; border-top: 1px solid var(--line);
  color: var(--fg2); font-size: 12px; font-weight: 650;
}
.acard:hover::after { color: var(--red); }
button.srow:hover, a.srow:hover { background: rgba(var(--ink-rgb),.045); }
button.srow > .icon:last-child, a.srow > .icon:last-child { color: var(--mut); transition: color .18s, transform .18s var(--ease); }
button.srow:hover > .icon:last-child, a.srow:hover > .icon:last-child { color: var(--red); transform: translateX(2px); }
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 190px; padding: 28px 20px; text-align: center;
}
.empty-state strong { font-size: 16px; font-weight: 650; }
.empty-state p { max-width: 52ch; margin: 0; font-size: 13.5px; line-height: 1.5; }
.empty-state .btn { min-height: 40px; margin-top: 6px; padding: 8px 14px; }
.filters button.on {
  color: var(--fg); background: var(--red-soft); border-color: rgba(225,29,46,.2);
}

@media (max-width: 599px) {
  .acard::after {
    content: "›"; align-self: center; flex: none; padding: 0; border: 0;
    color: var(--mut); font-size: 24px; font-weight: 400;
  }
  .card-cue { margin-top: 2px; }
}

@media (min-width: 600px) {
  /* Bare/auth pages use the same centered surface system as the wallet. */
  .shell.bare { --ow: 1280px; }
  .shell.bare.auth .main {
    min-height: calc(100dvh - 65px); display: flex; align-items: center; justify-content: center;
    padding: 48px 40px 72px;
  }
  .shell.bare.auth .main > section {
    width: min(640px, 100%); max-width: 640px; padding: 28px;
    border: 1px solid var(--line); border-radius: 20px; background: var(--s1);
    box-shadow: 0 20px 60px -44px rgba(0,0,0,.65);
  }
  .shell.bare.auth .main > section > .back { margin-bottom: 4px; }
  .shell.bare.auth .page-head { align-items: flex-start; }
  .shell.bare.auth .page-head h1, .shell.bare.auth section > h1 { font-size: 30px; font-weight: 650; }
  .shell.onboard .welcome { grid-template-columns: minmax(0, 1fr) 440px; column-gap: clamp(72px, 8vw, 144px); }
  .shell.onboard .w-act { padding: 30px; border-radius: 20px; box-shadow: 0 24px 70px -52px rgba(0,0,0,.7); }
  .shell.onboard .welcome > .features { column-gap: 40px; }

  /* Every signed-in desktop route shares the same canvas and spacing. */
  .shell:not(.bare) { --col: var(--wallet-max); }
  .col > .main, .col > .main.wide, .col > .main:has(.dcols),
  .col > .main:has(.desk-home), .col > .main:has(.desk-page) {
    padding: 36px clamp(32px, 3.2vw, 56px) 72px;
  }
  .col > .main > section.desk-home,
  .col > .main > section.desk-page { width: min(var(--wallet-max), 100%); max-width: var(--wallet-max); }
  .desk, .desk-page { gap: 18px; }
  .pagebar { min-height: 58px; align-items: flex-start; }
  .desk-home .pagebar, .desk-page .pagebar { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .desk-home .pagebar h1, .desk-page .pagebar h1 { font-size: 30px; line-height: 1.1; }
  .pagebar p { max-width: 66ch; margin-top: 6px; font-size: 14px; }
  .dash { grid-template-columns: minmax(0, 1fr) minmax(300px, var(--wallet-rail)); gap: 20px; }
  .dash-main, .dash-side { gap: 20px; }
  .dash-side { position: sticky; top: 76px; }

  /* Surface sizing is deliberate and repeated across dashboards, lists and forms. */
  .chart-card, .hold-card, .balance.strip, .desk-rail,
  .desk-page .dash-main > section.stack > .card,
  .desk-page .dash-main > section.stack > form > .card,
  .desk-page .dash-main .dmain > .card,
  .desk-page .dash-main .dside > .card,
  .desk-page .dash-main .sect > .card {
    border-radius: var(--surface-r); border-color: var(--line); background: var(--s1);
  }
  .chart-card, .hold-card { padding: var(--surface-pad); }
  .balance.strip, .desk-rail { padding: 18px 20px; }
  .hold-card > .filters { margin-bottom: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .desk .hrow[href] { border-radius: 10px; padding-left: 8px; padding-right: 8px; }
  .desk .hrow[href]:hover { background: rgba(var(--ink-rgb),.045); }
  .desk .add-row { border-radius: 10px; padding-left: 8px; padding-right: 8px; }
  .desk .add-row:hover { background: rgba(var(--ink-rgb),.035); }

  /* Stack routes no longer look like phone screens dropped inside a large canvas. */
  .desk-page .dash-main > section.stack,
  .desk-page .dash-main > .org-wrap,
  .desk-page .dash-main > .org-wrap > section { width: 100%; min-width: 0; }
  .desk-page .dash-main > section.stack > .page-head,
  .desk-page .dash-main > section.stack > h1,
  .desk-page .dash-main > .org-wrap > .org-page > .page-head { display: none; }
  .desk-page .dash-main > section.stack > .back,
  .desk-page .dash-main > .org-wrap > .org-page > .back {
    min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px;
    background: rgba(var(--ink-rgb),.025);
  }
  .desk-route-faucet .drop-hero h1, .desk-route-buy .drop-hero h1 { display: none; }
  .desk-route-faucet .drop-hero, .desk-route-buy .drop-hero {
    padding: 4px 0 0; gap: 12px; align-items: flex-start; text-align: left;
  }
  .desk-route-faucet .drop-hero .dt, .desk-route-buy .drop-hero .dt { width: 52px; height: 52px; border-radius: 16px; }
  .desk-route-faucet .faucet-page > .card { padding: 22px; }
  .desk-route-send .send-form > .btn.big { width: 100%; justify-self: stretch; }
  .desk-route-access .access-page { grid-template-columns: 1fr; }
  .desk-page .dash-main .dside > .sect,
  .desk-page .dash-main > section.stack > .sect {
    padding: var(--surface-pad); border: 1px solid var(--line);
    border-radius: var(--surface-r); background: var(--s1);
  }
  .desk-route-sites .group-card { border: 1px solid var(--line); border-radius: var(--surface-r); background: var(--s1); padding: 0 18px; }
  .desk-route-sites .dash-main > section > p { max-width: 66ch; line-height: 1.55; }

  /* Settings remains the intentionally narrower reading column. */
  .col > .main:has(.desk-settings) { padding-top: 36px; }
  .desk-settings .pagebar { min-height: 58px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
  .set-cards { gap: 20px; }
  .set-card { border-radius: var(--surface-r); padding: 22px 24px; }
}

@media (min-width: 1800px) {
  :root { --wallet-max: 1320px; --wallet-rail: 336px; }
  .shell.bare { --ow: 1400px; }
  .shell.onboard .welcome { grid-template-columns: minmax(0, 1fr) 480px; }
}

/* ============================================================ sidebar shell
   Fold-open, tablet, and desktop share the sidebar from 600 px. Only widths under 600 px use the phone tab bar.
   Page content is one narrow centered column. Home puts equal-height cards on a row.
   Account and organization selection is a menu above Home. Log out stays at the bottom. */
@media (min-width: 600px) {
  .shell:not(.bare) { --wallet-max: 800px; --col: 800px; }
  .shell:not(.bare) .top { width: 100%; justify-content: flex-end; }
  .shell:not(.bare) .top .top-actions { margin-left: auto; }
  .toast { bottom: 28px; }
  .side { width: 232px; background: #101114; }
  :root[data-theme="light"] .side { background: #F7F8FA; }
  .side-nav { flex: 1; min-height: 0; overflow: auto; }
  .side-nav a .sl, .side-out .sl { overflow: hidden; text-overflow: ellipsis; }
  .side-nav a.on, .side-foot > a.on { background: rgba(225, 29, 46, .10); box-shadow: none; }
  .side-nav a.on .icon, .side-foot > a.on .icon { stroke: var(--red); }
  .acct-wrap { padding: 2px 2px 6px; }
  .shell.rail .acct-wrap { display: flex; justify-content: center; padding: 2px 0 6px; }
  .side-acct[aria-expanded="true"] { border-color: rgba(225, 29, 46, .45); box-shadow: 0 0 0 3px rgba(225, 29, 46, .12); }
  .side-acct .chev .icon { width: 16px; height: 16px; color: var(--mut); transition: transform .2s var(--ease); }
  .side-acct[aria-expanded="true"] .chev .icon { transform: rotate(180deg); }
  .acct-menu { position: fixed; right: auto; z-index: 40; max-height: min(70vh, 520px); overflow: auto; }
  a.menu-item { color: inherit; text-decoration: none; font: inherit; }
  .acct-menu .grow { min-width: 0; }
  .acct-menu .grow strong { display: block; font-size: 15px; font-weight: 500; line-height: 20px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .acct-menu .grow small { display: block; margin-top: 1px; color: var(--mut); font-size: 12.5px; font-weight: 400; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .acct-menu .av, .acct-menu .orgav { width: 32px; height: 32px; flex: none; font-size: 12px; }
  .acct-menu .menu-item > .icon { width: 18px; height: 18px; flex: none; }

  .col > .main, .col > .main.wide, .col > .main:has(.dcols),
  .col > .main:has(.desk-home), .col > .main:has(.desk-page), .col > .main:has(.desk-settings) {
    align-items: center; width: 100%; max-width: none; margin: 0; padding: 28px 32px 64px;
  }
  .col > .main > section.desk-home,
  .col > .main > section.desk-page,
  .col > .main > section.desk-settings { width: min(800px, 100%); max-width: 800px; }
  .desk, .desk-home, .desk-page { display: flex; flex-direction: column; gap: 14px; width: 100%; min-width: 0; }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .page-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; width: 100%; }
  .desk-page .page-body > section.stack > .page-head,
  .desk-page .page-body > section.stack > h1,
  .desk-route-faucet .drop-hero h1,
  .desk-route-buy .drop-hero h1 { display: none; }
  .desk-route-send .back, .desk-route-receive .back, .desk-route-join .back,
  .desk-route-faucet .back, .desk-route-buy .back, .desk-route-org .org-page > .back { display: none; }

  .home-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(240px, .85fr); gap: 12px; align-items: stretch; }
  .home-row > .balance.strip, .home-row > .home-org { height: 100%; min-height: 100%; box-sizing: border-box; }
  .home-org { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--s1); }
  .home-org .tp-head { margin: 0; }
  .home-org .orgs { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 0; }
  .home-org .mcard, .home-org .join-row, .home-org .card { background: none; border: 0; box-shadow: none !important; border-radius: 0; padding: 8px 0; }
  .home-org .mcard + .mcard, .home-org .orgs > * + * { border-top: 1px solid var(--line); }
  .home-org .card-cue { border-top: 0; margin: 0; padding-top: 4px; }
  .home-org .join-row small { white-space: normal; }
  .balance.strip .card-acts { margin-top: auto; }
  .chart-card, .hold-card { width: 100%; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .side { width: 200px; }
  .shell.rail .side { width: 68px; }
  .col > .main, .col > .main.wide, .col > .main:has(.dcols),
  .col > .main:has(.desk-home), .col > .main:has(.desk-page), .col > .main:has(.desk-settings) { padding: 20px 18px 48px; }
  .home-row { grid-template-columns: minmax(0, 1fr); }
  .shell.onboard .welcome { display: flex; flex-direction: column; grid-template-columns: none; }
  .shell.onboard .w-act { display: contents; }
  .tabpanel .history .thead, .tabpanel .history:not(.tlist) .thead, .tabpanel .tlist .thead,
  .tabpanel .tc { display: none; }
  .tabpanel .history .hrow, .tabpanel .history:not(.tlist) .hrow, .tabpanel .tlist .hrow { display: flex; align-items: center; }
  .desk-home .pagebar h1, .desk-page .pagebar h1 { font-size: 26px; }
}
@media (min-width: 1800px) {
  .shell:not(.bare) { --wallet-max: 880px; --col: 880px; }
  .col > .main > section.desk-home,
  .col > .main > section.desk-page { width: min(880px, 100%); max-width: 880px; }
}

/* Organization: one centered column. One tab panel is visible. Cards in a pair share a height. */
.org-page, .org-page.o26 {
  display: flex; flex-direction: column; align-items: stretch; gap: 14px; width: 100%; max-width: 720px; margin-inline: auto;
}
.org-page > * { grid-column: 1; grid-row: auto; }
.o-overview, .o-members, .o-activity, .o-decisions, .o-records, .o-invites, .o-settings, .o-assets { display: flex; flex-direction: column; gap: 14px; width: 100%; min-width: 0; }
@media (min-width: 600px) {
  .col > .main > section.desk-page.desk-org {
    width: min(720px, 100%);
    max-width: 720px;
    margin-inline: auto;
  }
  .desk-org .org-page,
  .desk-org .org-page.o26 {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
    max-width: 720px;
  }
  .desk-org .org-page > * { grid-column: 1; grid-row: auto; }
  .desk-org > .pagebar { display: none; }
  .desk-org .org-title,
  .desk-org .org-vault-slot,
  .desk-org .otabs-row,
  .desk-org .otab-body { width: 100%; min-width: 0; }
  .desk-org .vault-act { max-width: none; }
}
.scan-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; height: 32px; margin: 0; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--s2); color: var(--fg); box-shadow: none; text-decoration: none; font: inherit; font-size: 13px; font-weight: 650; line-height: 1; letter-spacing: -.01em; white-space: nowrap; vertical-align: middle; cursor: pointer; appearance: none; -webkit-appearance: none; }
button.scan-link { outline: none; }
.scan-link:hover { border-color: rgba(225, 29, 46, .55); background: var(--s3); }
.scan-link:focus { outline: none; }
.scan-link:focus-visible { outline: 2px solid rgba(225, 29, 46, .55); outline-offset: 2px; }
.scan-link .scan-glyph { display: grid; place-items: center; width: 16px; height: 16px; flex: none; }
.scan-link .scan-label { display: block; line-height: 1; }
.scan-link.import-asset .scan-label-short { display: none; }
@media (max-width: 360px) {
  .scan-link.import-asset .scan-label-full { display: none; }
  .scan-link.import-asset .scan-label-short { display: block; }
}
.scan-link .icon { width: 14px; height: 14px; stroke: var(--red); }
.scan-link.compact { height: 32px; padding: 0 12px; font-size: 13px; }
.import-scan { align-self: flex-start; }
.sheet:has(.import-form) .sheet-head h2 { font-size: 18px; font-weight: 650; }
.import-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.import-field label { margin: 0; font-size: 13px; font-weight: 500; color: var(--fg); }
.import-field input { font-size: 15px; }
.import-field .hint { margin: 0; font-size: 12.5px; font-weight: 400; line-height: 1.35; color: var(--mut); }
.page-head .scan-link, .sect-head .scan-link, .tp-head .scan-link, .org-head .scan-link, .card-head .scan-link, .status .scan-link { align-self: center; flex: none; }
.scan-row { display: flex; align-items: center; justify-content: center; }
/* Org week: bars for the last 7 days. Card chrome is global so phones get the same surface as desktop. */
.org-week.chart-card { border: 1px solid var(--line); border-radius: 16px; background: var(--s1); padding: 14px 12px 12px; min-width: 0; overflow: visible; }
.org-week .chart-body { min-height: 148px; overflow: visible; }
.org-week .chart-cap { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--fg2); }
.week-bars { width: 100%; height: auto; display: block; overflow: visible; }
.week-bars .axis { stroke: rgba(var(--ink-rgb), .22); stroke-width: 1px; }
.week-bars .grid { stroke: rgba(var(--ink-rgb), .12); stroke-width: 1px; }
.week-bars .bar.hi { fill: #E11D2E; }
.week-bars .bar.low { fill: #E98B96; }
:root[data-theme="light"] .week-bars .bar.low { fill: #E07A86; }
.week-bars .zero-tick { fill: var(--mut); }
.week-bars .tick, .week-bars .val, .week-bars .ylab { fill: var(--fg2); font-size: 11px; font-family: inherit; font-weight: 600; }
.week-bars .val { fill: var(--fg); font-weight: 650; }
@media (min-width: 600px) {
  .org-week.chart-card { padding: 16px 18px 14px; border-radius: 14px; }
}
a.ext-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
a.ext-link .icon { width: 14px; height: 14px; color: var(--mut); }
.org-tokens { list-style: none; margin: 0; padding: 0; }
.org-tokens-row > .icon { flex: none; width: 16px; height: 16px; margin-left: auto; color: var(--mut); }
.asset-search { display: flex; align-items: center; gap: 8px; }
.asset-search input, .asset-filter { flex: 1; min-width: 0; }
.asset-filter { flex: 0 0 auto; max-width: 42%; }
.fee-pref { cursor: pointer; }
.fee-pref input { width: 18px; height: 18px; }
