/* tghelper workspace — flat dark console, no external assets. */
:root {
  color-scheme: dark;
  --bg: #0c0c0f;
  --surface: #141418;
  --surface-2: #1b1b21;
  --surface-3: #222229;
  --line: #292930;
  --line-strong: #3b3b46;
  --text: #f0f0f4;
  --muted: #b3b3c0;
  --faint: #8e8e9d;
  --ink: #101014;
  --focus: #9cc2ff;
  --good: #75d6a1;
  --good-bg: rgba(117, 214, 161, .1);
  --warn: #e8c27c;
  --warn-bg: rgba(232, 194, 124, .1);
  --danger: #f0908c;
  --danger-bg: rgba(240, 144, 140, .1);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.16; letter-spacing: -.025em; font-weight: 600; }
h2 { font-size: 19px; line-height: 1.25; letter-spacing: -.015em; font-weight: 600; }
h3 { font-size: 16px; line-height: 1.3; font-weight: 600; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
a:hover { text-decoration-color: var(--muted); }
svg { display: block; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.hidden { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 200;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--text); color: var(--ink); font-size: 13px; font-weight: 600;
  text-decoration: none; transform: translateY(-160%); transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); }
.noscript {
  margin: 0; padding: 10px 20px; text-align: center;
  background: var(--warn-bg); color: var(--warn); font-size: 13px;
  border-bottom: 1px solid rgba(232, 194, 124, .22);
}

:where(button, a, input, summary):focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
button:disabled, input:disabled { cursor: not-allowed; opacity: .55; }

/* ---------- primitives ---------- */
.eyebrow {
  color: var(--faint); font-size: 11px; font-weight: 650;
  letter-spacing: .11em; text-transform: uppercase;
}
.lede { color: var(--muted); font-size: 15px; margin-top: 10px; max-width: 62ch; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span { color: var(--muted); font-size: 13px; font-weight: 550; }
.field input {
  width: 100%; min-width: 0; height: 46px; padding: 0 14px;
  color: var(--text); background: #0e0e12;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 15px; transition: border-color .15s ease, background .15s ease;
}
.field input::placeholder { color: #6f6f7d; }
.field input:hover { border-color: var(--line-strong); }
.field input:focus { border-color: var(--line-strong); background: #101015; }
.field input[aria-invalid="true"] { border-color: rgba(240, 144, 140, .65); }
.field-hint { color: var(--faint); font-size: 12.5px; line-height: 1.45; margin-top: 8px; }

.button {
  min-height: 46px; padding: 0 18px; border: 1px solid transparent;
  border-radius: var(--radius-sm); display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; font-size: 14.5px; font-weight: 600;
  line-height: 1; text-decoration: none; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.button-primary { background: var(--text); color: var(--ink); }
.button-primary:hover { background: #fff; }
.button-secondary { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.button-secondary:hover { border-color: var(--line-strong); background: var(--surface-3); }
.button-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.button-ghost:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.button-block { width: 100%; }
.text-link, .back-button {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0;
  background: none; border: 0; color: var(--muted); font-size: 13px;
  font-weight: 550; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}
.text-link:hover, .back-button:hover { color: var(--text); }
.form-error, .form-feedback {
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.45;
}
.form-error { color: var(--danger); background: var(--danger-bg); border: 1px solid rgba(240, 144, 140, .2); }
.form-feedback { color: var(--good); background: var(--good-bg); border: 1px solid rgba(117, 214, 161, .2); }
.form-feedback.is-error { color: var(--danger); background: var(--danger-bg); border-color: rgba(240, 144, 140, .2); }
.form-feedback.is-neutral { color: var(--muted); background: var(--surface-2); border-color: var(--line); }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; color: var(--faint); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- auth ---------- */
.auth-shell { min-height: 100dvh; display: grid; place-items: center; padding: 32px 20px; }
.auth-card {
  width: 100%; max-width: 444px; padding: 34px 32px 28px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow);
}
.brand-lockup { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.brand-mark { width: 34px; height: 34px; color: var(--text); flex: none; }
.brand-word { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.brand-tag { flex-basis: 100%; padding-left: 43px; margin-top: -7px; color: var(--faint); font-size: 12px; }
.auth-card h1 { font-size: 29px; }
.auth-card .lede { margin-top: 9px; }
.signin { display: grid; gap: 15px; margin-top: 26px; }
.signin .form-error { margin: 0; }
.auth-note { margin-top: 16px; color: var(--faint); font-size: 12.5px; line-height: 1.5; text-align: center; }
.auth-foot {
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line);
  color: var(--faint); font-size: 12px; line-height: 1.55; display: grid; gap: 7px;
}
.auth-foot a { color: var(--muted); }

/* ---------- topbar / dashboard ---------- */
.app-shell { display: none; min-height: 100dvh; }
.route-new .app-shell { display: none; }
.route-new #tab-files { display: none; }
.route-dashboard .auth-shell { display: none; }
.route-dashboard .app-shell { display: block; }
.route-dashboard #file-gate { display: none; }
#accounts-section { scroll-margin-top: 84px; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-inner {
  max-width: 1080px; margin: 0 auto; height: 66px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.brand .brand-mark { width: 29px; height: 29px; }
.brand .brand-word { font-size: 16px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-pill); font-size: 13px; white-space: nowrap;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip strong { color: var(--text); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.workspace { max-width: 1080px; margin: 0 auto; padding: 36px 24px 44px; }
.workspace-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.workspace-head h1 { margin-top: 4px; }
.workspace-actions { display: flex; gap: 9px; flex: none; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.summary-card {
  min-height: 122px; padding: 17px 18px; display: flex; flex-direction: column; gap: 3px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.summary-label { color: var(--faint); font-size: 12px; font-weight: 550; }
.summary-value { color: var(--text); font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.summary-hint { color: var(--faint); font-size: 12px; line-height: 1.4; }
.summary-card--money .text-link { margin-top: auto; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 20px 22px; }
.panel-sub { margin-top: 4px; color: var(--faint); font-size: 13px; }
.search { width: 288px; flex: none; }
.search input {
  width: 100%; height: 42px; padding: 0 13px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 13px;
}
.search input::placeholder { color: #737382; }
.search input:focus { border-color: var(--line-strong); }
.account-list { border-top: 1px solid var(--line); }
.account-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center;
  gap: 14px; padding: 15px 22px; border-top: 1px solid var(--line);
}
.account-row:first-child { border-top: 0; }
.account-row:hover { background: rgba(255, 255, 255, .014); }
.avatar {
  width: 44px; height: 44px; display: grid; place-items: center; overflow: hidden;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 13px; font-size: 14px; font-weight: 600; letter-spacing: .02em;
}
.account-main { min-width: 0; }
.account-name { color: var(--text); font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-meta { margin-top: 2px; color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-status { justify-self: end; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  color: var(--muted); background: var(--surface-2); font-size: 12px;
  font-weight: 550; line-height: 1.3; white-space: nowrap;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.tone-good { color: var(--good); background: var(--good-bg); border-color: rgba(117, 214, 161, .22); }
.tone-warn { color: var(--warn); background: var(--warn-bg); border-color: rgba(232, 194, 124, .22); }
.tone-danger { color: var(--danger); background: var(--danger-bg); border-color: rgba(240, 144, 140, .22); }
.tone-neutral { color: var(--faint); }

.state-card { padding: 40px 22px; display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--faint); font-size: 13.5px; }
.state-card strong { color: var(--text); font-size: 15px; font-weight: 600; }
.state-card .button { margin-top: 10px; }
.app-foot {
  margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: var(--faint); font-size: 12px;
}
.app-foot a { color: var(--muted); }

/* ---------- dialogs ---------- */
dialog.modal {
  width: min(560px, calc(100vw - 32px)); max-width: none;
  max-height: min(90dvh, 920px); margin: auto; padding: 0;
  color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: 0 24px 80px rgba(0, 0, 0, .5); overflow: auto;
}
dialog.modal-wide { width: min(820px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(4, 4, 6, .72); }
dialog.modal[open] { animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-card { padding: 24px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.modal-head h2 { margin-top: 3px; }
.modal-sub { margin-top: 5px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.modal-close {
  flex: none; width: 44px; height: 44px; margin: -10px -10px 0 0; display: grid;
  place-items: center; border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--muted); font-size: 25px; line-height: 1;
}
.modal-close:hover { color: var(--text); background: var(--surface-2); }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
}
.modal-footnote { color: var(--faint); font-size: 12px; line-height: 1.5; max-width: 72%; }

.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 20px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.tab {
  flex: 1; min-height: 40px; padding: 0 10px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tab-panel { min-height: 180px; }
.panel-kicker { color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.tab-panel h3 { margin-bottom: 2px; }
.tab-panel > div > .field { margin-top: 16px; }
.tab-panel .back-button { margin-bottom: 14px; }
.tab-panel .button-block { margin-top: 18px; }
.tab-panel .form-error { margin-top: 12px; }
.code-boxes { display: flex; gap: 8px; margin: 20px 0 12px; }
.code-box {
  width: 52px; height: 58px; min-width: 0; padding: 0; text-align: center;
  color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.code-box:focus { border-color: var(--line-strong); }
.code-box[aria-invalid="true"] { border-color: rgba(240, 144, 140, .65); }
#code-step .text-link { display: block; margin-top: 10px; }
#resend:disabled { color: var(--faint); text-decoration: none; opacity: 1; cursor: default; }

.dropzone {
  width: 100%; min-height: 126px; padding: 22px; display: grid; place-items: center; gap: 4px;
  color: var(--text); background: var(--bg); border: 1px dashed var(--line-strong);
  border-radius: 14px; text-align: center; transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.is-dragging { border-color: var(--muted); background: #101015; }
.dropzone-title { font-size: 15px; font-weight: 600; }
.dropzone-sub { color: var(--faint); font-size: 13px; }
.file-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 7px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.file-info { min-width: 0; flex: 1; }
.file-name { color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { color: var(--faint); font-size: 11.5px; }
.file-status { flex: none; color: var(--faint); font-size: 11.5px; }
.file-remove { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--faint); font-size: 18px; }
.file-remove:hover { color: var(--danger); background: var(--danger-bg); }
.import-progress { margin-top: 18px; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; }
.progress-head strong { font-size: 14px; font-weight: 600; }
.progress-head span { color: var(--faint); font-variant-numeric: tabular-nums; }
.progress-bar { height: 4px; margin: 11px 0 10px; overflow: hidden; background: var(--surface-3); border-radius: var(--radius-pill); }
.progress-bar span { display: block; width: 38%; height: 100%; background: var(--text); border-radius: inherit; animation: indeterminate 1.15s ease-in-out infinite; }
@keyframes indeterminate { 0% { transform: translateX(-110%); } 100% { transform: translateX(310%); } }
.import-progress.is-done .progress-bar span { width: 100%; opacity: .35; transform: none; animation: none; }
.progress-file { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-note { margin-top: 5px; color: var(--faint); font-size: 12px; line-height: 1.45; }
.log { margin-top: 12px; color: var(--faint); font-size: 12px; }
.log summary { cursor: pointer; min-height: 28px; display: flex; align-items: center; }
.log ol { max-height: 170px; margin: 6px 0 0; padding-left: 20px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.55; overflow-wrap: anywhere; }
.import-summary { margin-top: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: 13px; line-height: 1.45; }
.import-summary.is-good { color: var(--good); border-color: rgba(117, 214, 161, .22); background: var(--good-bg); }
.import-summary.is-bad { color: var(--danger); border-color: rgba(240, 144, 140, .22); background: var(--danger-bg); }

/* ---------- wallet ---------- */
.wallet-balance { padding: 18px 20px; margin-bottom: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.wallet-amount { display: flex; align-items: baseline; gap: 2px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.wallet-amount > span { color: var(--muted); font-size: 22px; }
.wallet-amount strong { font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; }
.wallet-network { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--faint); font-size: 12px; }
.network-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.wallet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wallet-card { padding: 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.wallet-copy { margin: 5px 0 14px; color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.wallet-card .field { margin-top: 12px; }
.wallet-card .field input { height: 42px; font-size: 14px; }
.wallet-card .button { margin-top: 14px; min-height: 42px; }
.deposit-instructions { margin-top: 16px; padding: 17px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
.deposit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.deposit-head p { margin-top: 3px; color: var(--faint); font-size: 12.5px; }
.deposit-amount { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 12.5px; }
.deposit-amount strong { color: var(--text); font-size: 24px; font-variant-numeric: tabular-nums; }
.address-row { display: flex; align-items: stretch; gap: 8px; margin: 10px 0 8px; }
.address-row code { flex: 1; min-width: 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.address-row .button { min-height: 42px; }
.wallet-history { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.wallet-history .panel-head { padding: 0 0 10px; align-items: flex-start; }
.withdrawal-list { color: var(--faint); font-size: 13px; }
.withdrawal-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.withdrawal-row:first-child { border-top: 0; }
.withdrawal-main { min-width: 0; }
.withdrawal-amount { color: var(--text); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.withdrawal-meta { color: var(--faint); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- toast / offline ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 11px 17px; border-radius: var(--radius-pill);
  background: var(--text); color: var(--ink); font-size: 13px; font-weight: 600;
  animation: toast-in .16s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.offline-shell { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.offline-card { width: 100%; max-width: 420px; padding: 32px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.offline-card .brand-lockup { justify-content: center; margin-bottom: 22px; }
.offline-card .brand-tag { flex-basis: auto; padding-left: 0; margin-top: 0; }
.offline-icon { width: 50px; height: 50px; margin: 0 auto 18px; display: grid; place-items: center; color: var(--warn); background: var(--warn-bg); border: 1px solid rgba(232, 194, 124, .22); border-radius: 15px; font-size: 22px; font-weight: 600; }
.offline-card h1 { font-size: 26px; }
.offline-card p { margin: 10px auto 0; max-width: 34ch; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.offline-card .button { margin-top: 22px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wallet-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .topbar-inner { padding: 0 16px; height: 62px; }
  .workspace { padding: 28px 16px 36px; }
  .workspace-head { align-items: flex-start; flex-direction: column; gap: 18px; }
  .workspace-actions { width: 100%; }
  .workspace-actions .button { flex: 1; }
  .panel-head { align-items: flex-start; flex-direction: column; gap: 12px; padding: 18px; }
  .search { width: 100%; }
  .account-row { padding: 14px 18px; }
  .app-foot { align-items: flex-start; flex-direction: column; }
  .auth-shell { padding: 20px 16px; }
  .auth-card { padding: 28px 22px 24px; }
  .auth-card h1 { font-size: 26px; }
  dialog.modal, dialog.modal-wide { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 17px; }
  .modal-card { padding: 20px; }
  .modal-close { margin: -8px -8px 0 0; }
  .modal-foot { align-items: flex-start; flex-direction: column; }
  .modal-footnote { max-width: none; }
  .toast { bottom: 16px; }
}
@media (max-width: 480px) {
  .brand .brand-word { display: none; }
  .chip { padding: 0 11px; gap: 6px; }
  .summary-card { min-height: 112px; padding: 15px; }
  .summary-value { font-size: 25px; }
  .account-row { grid-template-columns: 40px minmax(0, 1fr); gap: 11px; }
  .avatar { width: 40px; height: 40px; border-radius: 12px; }
  .account-status { grid-column: 2; justify-self: start; margin-top: -2px; }
  .code-boxes { gap: 6px; }
  .code-box { width: auto; flex: 1; height: 54px; }
  .address-row { flex-direction: column; }
  .address-row .button { width: 100%; }
}
@media (max-width: 360px) {
  .topbar-inner { padding: 0 12px; gap: 8px; }
  .topbar-actions { gap: 6px; }
  .chip { padding: 0 9px; font-size: 12px; }
  .chip strong { font-size: 12.5px; }
  .workspace { padding-left: 12px; padding-right: 12px; }
  .auth-shell { padding-left: 10px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .progress-bar span { width: 100%; opacity: .35; animation: none; transform: none; }
}
