:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  color-scheme: light;
  --bg: #f7f7fa;
  --panel: #ffffff;
  --text: #141417;
  --text-secondary: #50505e;
  --line: #e5e5ec;
  --input-line: #d2d2dd;
  --muted: #686879;
  --subtle: #747484;
  --surface: #f1f1f6;
  --surface-hover: #e9e9f1;
  --accent: #1e1ee8;
  --lime: var(--accent);
  --accent-soft: #eeeeff;
  --accent-line: #d4d4fb;
  --primary: #141417;
  --primary-hover: #303035;
  --on-accent: #ffffff;
  --green: #137447;
  --success-soft: #eff8f3;
  --success-line: #cce6d7;
  --red: #c43d4b;
  --error-soft: #fff2f3;
  --error-line: #f2ccd1;
  --amber: #956019;
  --warning-soft: #fff8eb;
  --warning-line: #ebd8b2;
  --purple: #7757c8;
  --on-primary: #ffffff;
  --auth-glow: #1e1ee808;
  --block-divider: #14141712;
  --heartbeat-clear: #13744700;
  --heartbeat-halo: #13744722;
  --stat-accent-start: #eeeeff;
  --stat-accent-end: #f7f7ff;
  --coin-primary-bg: #dedfff;
  --coin-primary-text: #353593;
  --coin-secondary-bg: #e9e5fa;
  --coin-secondary-text: #675399;
  --range-band: #b3b3f5;
  --event-compound: #087e8b;
  --event-move: #2864c8;
  --modal-shadow: #14141726;
  --modal-backdrop: #14141766;
  --focus-ring: #1e1ee826;
  --popover-shadow: #1414171a;
  --scrollbar-thumb: #c4c4ce;
  --liquidity-bar: #8b8be9;
  --transaction-active-bg: #1e1ee808;
  --transaction-active-line: #1e1ee824;
  --operation-remainder-bg: #1e1ee806;
}
/* Palette only. Keep the existing :root palette as the light default. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0e13;
  --panel: #18181f;
  --text: #f4f4f8;
  --text-secondary: #c7c7d5;
  --line: #31313f;
  --input-line: #4a4a5b;
  --muted: #a4a4b6;
  --subtle: #9595a8;
  --surface: #202029;
  --surface-hover: #2c2c38;
  --accent: #9999ff;
  --lime: var(--accent);
  --accent-soft: #232342;
  --accent-line: #444477;
  --primary: #f2f2f8;
  --primary-hover: #ffffff;
  --on-primary: #141417;
  --on-accent: #101021;
  --green: #68dba2;
  --success-soft: #172e23;
  --success-line: #2d5842;
  --red: #ff8f9d;
  --error-soft: #341f28;
  --error-line: #69404c;
  --amber: #f2c078;
  --warning-soft: #312a1d;
  --warning-line: #665333;
  --purple: #b69af1;

  --auth-glow: #7777ff0e;
  --block-divider: #00000055;
  --heartbeat-clear: #68dba200;
  --heartbeat-halo: #68dba222;
  --stat-accent-start: #272747;
  --stat-accent-end: #1d1d2c;
  --coin-primary-bg: #32325a;
  --coin-primary-text: #ccccff;
  --coin-secondary-bg: #3a3056;
  --coin-secondary-text: #dfc8ff;
  --range-band: #6666ba;
  --event-compound: #6bd4dc;
  --event-move: #8ab7ff;
  --modal-shadow: #00000070;
  --modal-backdrop: #05050ab3;
  --focus-ring: #9999ff40;
  --popover-shadow: #00000080;
  --scrollbar-thumb: #59596c;
  --liquidity-bar: #8585db;
  --transaction-active-bg: #9999ff0a;
  --transaction-active-line: #9999ff32;
  --operation-remainder-bg: #9999ff08;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
.auth-page {
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 50% 0, var(--auth-glow), transparent 60%),
    var(--bg);
}
.auth-page .auth-shell {
  margin: 0 auto;
  width: min(100%, 484px);
  min-height: 100svh;
  padding: 48px 22px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
}
.auth-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 32px;
}
.auth-symbol {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 15px;
  font-size: 26px;
  margin-bottom: 28px;
}
.auth-card .eyebrow {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.5px;
}
.auth-card h1 {
  font-size: 29px;
  letter-spacing: -0.9px;
  margin: 12px 0;
}
.auth-card > p {
  font-size: 14px;
  line-height: 1.65;
}
.auth-card label,
.passkey-name {
  display: block;
  font-size: 12px;
  margin: 24px 0 16px;
}
.auth-card input,
.passkey-name input {
  display: block;
  width: 100%;
  margin-top: 9px;
  font-size: 16px;
}
.auth-card > button {
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  font-size: 14px;
}
.auth-card form > button {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  font-size: 14px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 4px;
  font-size: 11px;
  color: var(--muted);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-password-only .auth-divider {
  display: none;
}
.security-section + .security-section {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 24px;
}
.security-section h3 {
  font-size: 16px;
  margin: 0 0 12px;
}
.security-section label {
  display: block;
  margin: 16px 0;
  font-size: 12px;
}
.security-section input {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-size: 16px;
}
.security-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.security-section p {
  line-height: 1.6;
}
.security-section .error {
  color: var(--red);
}
.auth-card .auth-status {
  min-height: 22px;
  font-size: 12px;
}
.auth-detail {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
  color: var(--muted);
}
.auth-detail p {
  margin: 0;
  font-size: 11px;
  line-height: 1.65;
}
.auth-footer {
  color: var(--muted);
  font-size: 11px;
  margin: 0;
}
.auth-status.error,
#passkey-note.error {
  color: var(--red);
}
.passkey-settings {
  width: 100%;
  margin: 0 0 18px;
}
.mobile-passkey-settings {
  display: none;
}
@media (max-width: 750px) {
  .mobile-passkey-settings {
    display: block;
    padding: 8px;
    font-size: 11px;
  }
  footer {
    flex-wrap: wrap;
    row-gap: 12px;
  }
}
.passkey-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.passkey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}
.passkey-row + .passkey-row {
  border-top: 1px solid var(--line);
}
.passkey-row b {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.passkey-row p {
  margin: 6px 0 0;
}
@media (max-width: 520px) {
  .auth-page .auth-shell {
    padding: 28px 16px;
    gap: 28px;
  }
  .auth-card {
    padding: 26px 22px;
  }
  .auth-card h1 {
    font-size: 26px;
  }
  .passkey-row {
    align-items: flex-start;
  }
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button,
.actions-grid .button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  border-radius: 9px;
  padding: 10px 15px;
  font-size: 13px;
  transition: background 0.15s;
}
button:hover,
.actions-grid .button:hover {
  background: var(--surface-hover);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
.primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  font-weight: 650;
}
.primary:hover {
  background: var(--primary-hover);
}
.actions-grid .button.primary:hover {
  background: var(--primary-hover);
}
.secondary {
  background: transparent;
}
.danger {
  color: var(--red);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  padding: 32px 22px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -1px;
  gap: 10px;
}
.brand-mark {
  width: 31px;
  height: 31px;
  border: 1.5px solid var(--accent);
  border-radius: 9px;
  color: var(--accent);
  display: grid;
  place-items: center;
}
.beta {
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 3px;
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 4px;
}
.workspace-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin: 53px 12px 16px;
}
.nav {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 13px;
  margin: 3px 0;
  color: var(--muted);
  display: flex;
  gap: 13px;
  font-size: 13px;
}
.nav span {
  font-size: 18px;
  line-height: 15px;
}
.nav.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.sidebar-bottom {
  margin-top: auto;
  padding: 18px 10px 0;
  border-top: 1px solid var(--line);
}
.network {
  font-size: 12px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 8px;
}
.network i,
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: var(--green);
}
.sidebar-bottom p {
  font-size: 11px;
  color: var(--muted);
  margin: 10px 0 25px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 11px;
  line-height: 1.8;
}
main {
  margin-left: 236px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
header {
  height: 91px;
  padding: 0 42px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 14px;
  color: var(--subtle);
}
.breadcrumb b {
  color: var(--text);
  font-weight: 500;
}
.header-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
.header-actions button span {
  margin-left: 18px;
}
.pill {
  font-size: 10px;
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 20px;
  white-space: nowrap;
  color: var(--muted);
}
.pill.good {
  color: var(--green);
}
.pill.bad {
  color: var(--red);
}
.network-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.network-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.network-status.good .network-dot {
  animation: network-heartbeat 2s ease-in-out infinite;
}
.block-counter {
  display: inline-flex;
  gap: 1px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.network-separator[hidden],
.block-counter[hidden] {
  display: none;
}
.block-digit {
  --digit-height: 1.5em;
  position: relative;
  width: 0.68em;
  height: var(--digit-height);
  perspective: 65px;
}
.block-half,
.block-leaf {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
  background: var(--success-soft);
  backface-visibility: hidden;
}
.block-upper {
  top: 0;
  border-radius: 2px 2px 0 0;
  transform-origin: bottom;
}
.block-lower {
  bottom: 0;
  border-radius: 0 0 2px 2px;
  transform-origin: top;
}
.block-half > span,
.block-leaf > span {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--digit-height);
  line-height: var(--digit-height);
  text-align: center;
}
.block-upper > span {
  top: 0;
}
.block-lower > span {
  bottom: 0;
}
.block-digit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--block-divider);
  pointer-events: none;
}
.block-leaf {
  z-index: 1;
}
.flipping .block-leaf {
  animation-duration: 600ms;
  animation-delay: var(--flip-delay, 0ms);
  animation-timing-function: cubic-bezier(0.35, 0, 0.65, 1);
  animation-fill-mode: both;
}
.flipping .block-leaf.block-upper {
  animation-name: block-flip-upper;
}
.flipping .block-leaf.block-lower {
  animation-name: block-flip-lower;
}
@keyframes block-flip-upper {
  0% {
    transform: rotateX(0);
    filter: brightness(1);
  }
  50%,
  100% {
    transform: rotateX(-90deg);
    filter: brightness(0.6);
  }
}
@keyframes block-flip-lower {
  0%,
  50% {
    transform: rotateX(90deg);
    filter: brightness(0.6);
  }
  100% {
    transform: rotateX(0);
    filter: brightness(1);
  }
}
@keyframes network-heartbeat {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--heartbeat-clear);
  }
  50% {
    box-shadow: 0 0 0 3px var(--heartbeat-halo);
  }
}
.content {
  padding: 38px 42px;
  max-width: 1550px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}
h1 {
  font-size: 31px;
  letter-spacing: -0.9px;
  font-weight: 550;
  margin: 0 0 12px;
}
h2 {
  font-weight: 550;
  font-size: 18px;
  letter-spacing: -0.3px;
  margin: 0;
}
h3 {
  font-size: 15px;
  font-weight: 550;
}
p {
  line-height: 1.7;
}
.sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.price-stale {
  color: var(--red);
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.heading-actions {
  display: flex;
  gap: 8px;
}
.search {
  display: flex;
  gap: 10px;
  max-width: 650px;
  margin: 26px 0 30px;
}
.search input {
  flex: 1;
  min-width: 0;
}
input,
select {
  border: 1px solid var(--input-line);
  border-radius: 9px;
  background: var(--panel);
  color: inherit;
  padding: 13px 14px;
  min-width: 0;
}
input::placeholder {
  color: var(--subtle);
}
input:focus,
select:focus {
  border-color: var(--accent);
  outline: 1px solid var(--accent);
}
.portfolio-value-chart {
  padding: 26px 28px 18px;
  margin-bottom: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  --value-line-positive: #00b884;
  --value-line-negative: var(--red);
}
.value-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.value-chart-head h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.value-chart-currency { color: var(--muted); font-size: 11px; font-weight: 500; margin-left: 6px; }
.value-chart-time { color: var(--muted); font-size: 13px; min-height: 19px; }
.value-chart-total { display: block; margin: 6px 0 8px; font-size: clamp(28px, 3.6vw, 42px); font-weight: 650; letter-spacing: -1.3px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.value-chart-change { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; min-height: 22px; font-size: 15px; font-variant-numeric: tabular-nums; }
.value-chart-change.positive { color: var(--green); }
.value-chart-change.negative { color: var(--red); }
.value-chart-change small { color: var(--muted); font-size: 11px; }
.value-chart-periods { display: flex; gap: 5px; flex-shrink: 0; padding: 4px; border-radius: 22px; background: var(--surface); }
.value-chart-periods button { min-width: 51px; padding: 7px 12px; border: 0; border-radius: 18px; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.value-chart-periods button.selected { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.value-chart-periods button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.value-chart-plot { position: relative; height: 220px; margin: 14px -10px 14px; }
.value-chart-plot.positive { color: var(--value-line-positive); }
.value-chart-plot.negative { color: var(--value-line-negative); }
.value-chart-plot svg { display: block; width: 100%; height: 100%; overflow: visible; touch-action: pan-y; cursor: crosshair; }
.value-chart-plot svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.value-chart-wait { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; text-align: center; font-size: 13px; color: var(--muted); pointer-events: none; }
.value-chart-axis { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.value-chart-axis time { white-space: nowrap; }
.value-chart-axis span { text-align: center; }
.value-chart-note { min-height: 16px; margin-top: 12px; font-size: 11px; color: var(--muted); text-align: center; }
.value-chart-notice { color: var(--amber); }
.value-chart-note button { padding: 2px 6px; font-size: 11px; }
@media (max-width: 750px) {
  .portfolio-value-chart { padding: 20px 18px 16px; }
  .value-chart-head { gap: 10px; flex-wrap: wrap; }
  .value-chart-head h2 { font-size: 15px; }
  .value-chart-periods { gap: 2px; }
  .value-chart-periods button { min-width: 44px; padding: 6px 8px; }
  .value-chart-plot { height: 190px; margin-top: 12px; }
  .value-chart-axis { flex-wrap: wrap; row-gap: 8px; font-size: 10px; }
  .value-chart-axis span { order: 3; width: 100%; }
  .value-chart-change { font-size: 14px; gap: 4px 10px; }
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 24px;
}
.stat-label {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 17px;
}
.stat strong {
  font-weight: 450;
  letter-spacing: -0.7px;
  font-size: 32px;
  display: block;
}
.stat p {
  margin: 13px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.stat.accent {
  background: linear-gradient(
    120deg,
    var(--stat-accent-start),
    var(--stat-accent-end)
  );
  border-color: var(--accent-line);
}
.stat.accent strong {
  color: var(--accent);
}
.section-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0 17px;
}
.section-bar h2 {
  font-size: 15px;
}
.tabs {
  display: flex;
  gap: 6px;
}
.tabs button {
  border: 0;
  background: transparent;
  font-size: 11px;
  color: var(--muted);
  padding: 8px 12px;
}
.tabs button.selected {
  background: var(--accent-soft);
  color: var(--accent);
}
.panel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  overflow: hidden;
}
.position-row {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.6fr) minmax(150px, 1.2fr) minmax(110px, 1fr)
    minmax(100px, 0.8fr) 90px;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.position-row:last-child {
  border-bottom: 0;
}
.position-row:hover {
  background: var(--surface);
}
.table-head {
  padding: 14px 24px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  cursor: default;
}
.table-head:hover {
  background: var(--surface);
}
.pair {
  display: flex;
  gap: 13px;
  align-items: center;
}
.coins {
  position: relative;
  width: 53px;
  height: 32px;
  flex-shrink: 0;
}
.coin {
  width: 32px;
  height: 32px;
  border: 3px solid var(--panel);
  border-radius: 50%;
  background: var(--coin-primary-bg);
  color: var(--coin-primary-text);
  position: absolute;
  left: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  overflow: hidden;
}
.coin img,
.composition-token img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.overview-position .coins,
.heading .pair .coins {
  display: block;
}
.heading > .pair,
.heading > .pair > div:last-child,
.overview-position .pair > div:last-child {
  min-width: 0;
}
.heading > .pair h1,
.overview-position .pair b {
  overflow-wrap: anywhere;
}
.coin:nth-child(2) {
  left: 23px;
  background: var(--coin-secondary-bg);
  color: var(--coin-secondary-text);
}
.pair b {
  font-size: 14px;
  font-weight: 550;
}
.pair small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.amount strong {
  display: block;
  font-weight: 450;
  font-size: 15px;
  margin-bottom: 5px;
}
.amount small {
  font-size: 10px;
  color: var(--muted);
}
.range-status {
  font-size: 10px;
  color: var(--green);
  margin-bottom: 8px;
}
.range-status.out {
  color: var(--amber);
}
.range-track {
  height: 4px;
  border-radius: 5px;
  background: var(--line);
  position: relative;
  max-width: 160px;
}
.range-track:before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  height: 4px;
  background: var(--range-band);
  border-radius: 5px;
}
.range-track i {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 8px;
  background: var(--accent);
}
.empty {
  padding: 60px 30px;
  text-align: center;
}
.empty-icon {
  margin: 0 auto 23px;
  border: 1px solid var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 20px;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  font-size: 35px;
}
.empty h2 {
  font-size: 22px;
}
.empty p {
  font-size: 13px;
  color: var(--muted);
  max-width: 480px;
  margin: 14px auto 25px;
}
.empty button + button {
  margin-left: 8px;
}
.info-strip {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 12px;
}
.info-strip span:first-child {
  color: var(--accent);
  font-size: 18px;
}
.error,
.warning,
.success {
  border: 1px solid var(--warning-line);
  background: var(--warning-soft);
  color: var(--amber);
  border-radius: 9px;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.error {
  border-color: var(--error-line);
  background: var(--error-soft);
  color: var(--red);
}
.success {
  border-color: var(--success-line);
  background: var(--success-soft);
  color: var(--green);
}
#notice {
  margin-bottom: 24px;
}
.loading {
  padding: 65px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.spinner {
  display: block;
  width: 27px;
  height: 27px;
  margin: 0 auto 20px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(310px, 1fr);
  gap: 20px;
}
.box {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  margin-bottom: 20px;
}
.box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.big-price {
  font-size: 37px;
  letter-spacing: -1px;
  font-weight: 450;
  margin: 30px 0 6px;
}
.position-composition {
  --composition-0: var(--accent);
  --composition-1: var(--purple);
  font-variant-numeric: tabular-nums;
}
.composition-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.composition-heading h2 {
  margin: 0;
}
.composition-heading > span {
  color: var(--muted);
  font-size: 11px;
}
.composition-total {
  margin: 20px 0 30px;
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 1.15;
  letter-spacing: -1.5px;
  overflow-wrap: anywhere;
}
.composition-bar {
  display: flex;
  gap: 4px;
  height: 8px;
  border-radius: 8px;
  overflow: hidden;
}
.composition-bar:empty {
  background: var(--line);
}
.composition-segment {
  flex-basis: 0;
  min-width: 0;
  border-radius: 8px;
}
.composition-segment-0,
.composition-token-0 {
  background: var(--composition-0);
}
.composition-segment-1,
.composition-token-1 {
  background: var(--composition-1);
}
.composition-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 14px 0 30px;
}
.composition-legend > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
}
.composition-legend span:not(.composition-token) {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.composition-legend b {
  font-size: 16px;
  font-weight: 500;
}
.composition-token {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  overflow: hidden;
  color: var(--on-accent);
  font-size: 9px;
  font-weight: 750;
}
.composition-balances {
  display: grid;
  gap: 22px;
}
.composition-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.composition-value {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.composition-value .composition-token {
  width: 38px;
  height: 38px;
  font-size: 12px;
}
.composition-value strong {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.6px;
  overflow-wrap: anywhere;
}
.composition-quantity {
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
}
.composition-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
@media (max-width: 500px) {
  .composition-heading {
    gap: 10px;
  }
  .composition-heading h2 {
    font-size: 18px;
  }
  .composition-heading > span {
    font-size: 10px;
  }
  .composition-value strong {
    font-size: 22px;
  }
  .composition-quantity {
    font-size: 15px;
  }
  .composition-value .composition-token {
    width: 32px;
    height: 32px;
    font-size: 10px;
  }
}
.visual-range {
  padding: 27px 0 35px;
}
.visual-range .range-track {
  max-width: none;
  height: 8px;
}
.visual-range .range-track:before {
  height: 8px;
}
.visual-range .range-track i {
  height: 18px;
  width: 3px;
  top: -5px;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 17px;
  font-size: 11px;
  color: var(--muted);
}
.range-labels b {
  display: block;
  color: var(--text);
  margin-top: 6px;
  font-weight: 500;
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}
.kv:last-child {
  border-bottom: 0;
}
.kv span {
  color: var(--muted);
}
.kv b {
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
  max-width: 72%;
}
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.actions-grid button,
.actions-grid .button {
  padding: 14px 6px;
}
.actions-grid .button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.actions-grid .primary {
  grid-column: span 2;
}
.back {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  margin-bottom: 23px;
  font-size: 12px;
}
.back:hover {
  background: transparent;
  color: var(--accent);
}
.pool-catalog-list {
  width: 100%;
  min-width: 0;
}
.pool-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-radius: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.pool-table {
  width: 100%;
  min-width: 880px;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.pool-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.pool-table th {
  padding: 15px 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  background: var(--surface);
  white-space: nowrap;
}
.pool-table th:first-child { border-radius: 12px 0 0 12px; }
.pool-table th:last-child { border-radius: 0 12px 12px 0; }
.pool-table td {
  height: 86px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--block-divider);
  background: var(--bg);
  transition: background .15s;
}
.pool-table tbody tr:last-child td { border-bottom: 0; }
.pool-table-row { cursor: pointer; }
.pool-table-row:hover td,
.pool-table-row:focus-within td { background: var(--surface); }
.pool-table .pool-table-rank {
  width: 48px;
  padding-right: 8px;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
}
.pool-table .pool-table-pair {
  text-align: left;
  width: 38%;
  min-width: 290px;
}
.pool-table-number {
  text-align: right;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
}
.pool-table-sort {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 0;
  min-height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 500;
}
.pool-table-sort:hover {
  background: transparent;
  color: var(--text);
}
.pool-table-sort.is-active { color: var(--text); }
.pool-table-sort:focus-visible,
.pool-row-link:focus-visible,
.pool-table-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 5px;
}
.pool-row-link {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  text-decoration: none;
}
.pool-row-link:hover { color: var(--text); }
.pool-token-pair {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: 64px;
}
.pool-token-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  overflow: hidden;
  background: hsl(var(--token-hue) 62% 85%);
  color: hsl(var(--token-hue) 48% 25%);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: -.4px;
}
.pool-token-badge + .pool-token-badge { margin-left: -12px; }
.pool-token-badge img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pool-row-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 260px; }
.pool-row-name { font-size: 15px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pool-row-meta { color: var(--muted); font-size: 11px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pool-row-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.pool-catalog-note { line-height: 1.7; }
.pool-catalog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pool-catalog-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  margin: 0 0 12px;
}
.pool-catalog-error {
  color: var(--amber);
}
.pool-catalog-volume-status { display: block; color: var(--muted); margin-top: 3px; }
.pool-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 0;
}
.pool-pagination:empty {
  display: none;
}
.pool-pagination span {
  color: var(--muted);
  font-size: 12px;
}
.pool-liquidity-dialog {
  width: min(1440px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
}
.pool-liquidity-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}
.pli-dialog-content {
  padding: 24px 28px;
}
.pli-heading,
.pli-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.pli-heading h2 {
  font-size: 22px;
  margin: 7px 0 0;
}
.pli-heading {
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
}
.pli-heading > button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  font-size: 25px;
}
.pli-toolbar {
  margin-top: 24px;
  flex-wrap: wrap;
}
.pli-quote,
.pli-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pli-quote > span {
  color: var(--muted);
  font-size: 12px;
  margin-right: 6px;
}
.pli-quote button,
.pli-controls button {
  min-height: 36px;
  padding: 8px 12px;
}
.pli-quote button.active {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}
.pli-current {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 20px 0 8px;
}
.pli-chart {
  position: relative;
  touch-action: none;
  user-select: none;
  cursor: grab;
  border-radius: 8px;
  outline-offset: 3px;
}
.pli-chart:active {
  cursor: grabbing;
}
.pli-chart svg {
  display: block;
  width: 100%;
}
.pli-chart svg text {
  fill: var(--muted);
  font: 11px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pli-grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}
.pli-bar {
  fill: var(--green);
  opacity: 0.88;
}
.pli-unloaded {
  fill: var(--muted);
  opacity: 0.09;
}
.pli-spot {
  stroke: var(--text);
  stroke-width: 2;
  stroke-dasharray: 5 4;
}
.pli-spot-dot {
  fill: var(--text);
}
.pli-empty {
  position: absolute;
  top: 44%;
  left: 15%;
  right: 10%;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.pli-inspection {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  margin-top: 8px;
}
.pli-inspection > label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}
.pli-inspection input {
  width: 100%;
  padding: 0;
  accent-color: var(--accent);
}
.pli-tooltip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  min-width: 0;
  font-size: 12px;
}
.pli-tooltip span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}
.pli-tooltip b {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 550;
}
.pli-tooltip small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.pli-hover {
  position: fixed;
  z-index: 10;
  width: 290px;
  max-width: calc(100vw - 16px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  pointer-events: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  background: var(--panel);
}
.pli-hover[hidden] {
  display: none;
}
.pli-note,
.pli-coverage {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin: 14px 0 0;
}
.pli-coverage.pli-error {
  color: var(--amber);
}
@media (max-width: 650px) {
  .pool-liquidity-dialog {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 12px;
  }
  .pli-dialog-content {
    padding: 18px 12px;
  }
  .pli-heading h2 {
    font-size: 17px;
  }
  .pli-heading .label-top {
    font-size: 8px;
  }
  .pli-toolbar {
    gap: 12px;
    margin-top: 18px;
  }
  .pli-inspection {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .pli-tooltip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
  }
}
@media (max-width: 650px) {
  .pool-catalog-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .pool-pagination {
    gap: 8px;
  }
  .pool-table { min-width: 790px; }
  .pool-table .pool-table-rank { display: none; }
  .pool-table th { padding: 13px 16px; }
  .pool-table td { height: 78px; padding: 13px 16px; }
  .pool-table .pool-table-pair {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 230px;
    width: 230px;
    box-shadow: 9px 0 12px -12px var(--text);
  }
  .pool-table th.pool-table-pair { z-index: 2; border-radius: 12px 0 0 12px; }
  .pool-row-link { gap: 9px; }
  .pool-row-info { max-width: 150px; }
  .pool-token-pair { width: 51px; }
  .pool-token-badge { width: 31px; height: 31px; flex-basis: 31px; font-size: 9px; }
  .pool-token-badge + .pool-token-badge { margin-left: -11px; }
  .pool-row-name { font-size: 13px; }
  .pool-row-meta { font-size: 10px; }
  .pool-table-number { font-size: 13px; }
}
.history-row {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.history-row:last-child {
  border-bottom: 0;
}
.history-row p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 0;
}
.history-row strong {
  font-size: 13px;
  font-weight: 500;
}
.history-row a {
  font-size: 12px;
  color: var(--accent);
}
.position-history {
  min-width: 0;
  margin-top: 8px;
}
.position-history h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.event-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
}
.event-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}
.event-filters button {
  background: transparent;
  padding: 9px 12px;
}
.event-filters button span {
  font-size: 11px;
  margin-left: 5px;
  opacity: 0.65;
}
.event-filters button.active {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.event-table-scroll {
  width: 100%;
  overflow-x: auto;
}
.event-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.event-table th {
  color: var(--muted);
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  padding: 12px 14px;
}
.event-table td {
  padding: 17px 14px;
  border-top: 1px solid var(--line);
}
.event-table tbody tr:hover {
  background: var(--surface);
}
.event-table small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
.event-table .event-number,
.event-table th:nth-child(n + 3):nth-child(-n + 6) {
  text-align: right;
}
.event-number span {
  color: var(--muted);
  font-size: 10px;
}
.event-table b {
  font-weight: 550;
}
.event-deposit {
  --event-color: var(--accent);
}
.event-withdrawal {
  --event-color: var(--red);
}
.event-fees {
  --event-color: var(--purple);
}
.event-compound {
  --event-color: var(--event-compound);
}
.event-move {
  --event-color: var(--event-move);
}
.event-table td:first-child {
  border-left: 3px solid var(--event-color);
}
.event-kind {
  color: var(--event-color);
}
.event-hash {
  display: inline-block;
  padding: 7px 9px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
.event-footnote {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.event-footnote a {
  color: var(--accent);
}
.event-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 750px) {
  .position-history .box-head {
    align-items: flex-start;
  }
  .position-history h2 {
    font-size: 18px;
  }
  .position-history [data-history-refresh] {
    padding: 8px 10px;
  }
  .event-filters {
    gap: 6px;
  }
  .event-filters button {
    padding: 9px;
    font-size: 12px;
  }
}
footer {
  padding: 23px 42px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 25px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
}
footer > span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
footer > a {
  flex: none;
  white-space: nowrap;
}
.footer-brand {
  display: flex;
  flex: none;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.app-version {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
dialog {
  width: min(600px, calc(100vw - 32px));
  padding: 0;
  background: var(--panel);
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 17px;
  max-height: 90vh;
  box-shadow: 0 30px 100px var(--modal-shadow);
}
dialog::backdrop {
  background: var(--modal-backdrop);
  backdrop-filter: blur(5px);
}
.modal-head {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 27px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  font-size: 20px;
}
.modal-head button {
  padding: 5px 10px;
  background: transparent;
}
.modal-body {
  padding: 25px 27px;
}
.modal-foot {
  position: sticky;
  bottom: 0;
  background: var(--panel);
  z-index: 2;
  padding: 19px 27px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.pool-empty {
  grid-column: 1 / -1;
}
.pool-empty button + button {
  margin-left: 8px;
}
input[aria-invalid="true"] {
  border-color: var(--red);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.field {
  margin-bottom: 19px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.field label {
  font-size: 12px;
  color: var(--text-secondary);
}
.field input,
.field select {
  width: 100%;
}
.slippage-field {
  margin-top: 20px;
}
.slippage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 12px;
}
.slippage-heading output {
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.slippage-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 4px;
  gap: 3px;
  border-radius: 30px;
  background: var(--surface);
}
.slippage-options button {
  min-height: 44px;
  padding: 8px 2px;
  border: 1px solid transparent;
  border-radius: 24px;
  background: transparent;
  color: var(--muted);
  font-size: clamp(10px, 3vw, 13px);
  white-space: nowrap;
}
.slippage-options button:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.slippage-options button[aria-pressed="true"] {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}
.slippage-options button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.slippage-custom {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  margin-top: 4px;
}
.field .slippage-custom input {
  width: 110px;
  min-width: 0;
  text-align: right;
}
.select-menu {
  width: 100%;
  min-width: 0;
}
.select-trigger {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid var(--input-line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
  font-size: 14px;
  line-height: 1.4;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.select-trigger:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--input-line);
}
.select-trigger:focus-visible,
.select-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.select-chevron {
  width: 8px;
  height: 8px;
  margin-right: 3px;
  margin-top: -4px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
}
.select-trigger[aria-expanded="true"] .select-chevron {
  transform: rotate(225deg);
  margin-top: 4px;
}
.select-options {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 6px;
  z-index: 100;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 16px 44px var(--popover-shadow);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.select-option {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}
.select-option.active {
  background: var(--accent-soft);
}
.select-option[aria-selected="true"] {
  color: var(--accent);
}
.select-check {
  visibility: hidden;
  flex-shrink: 0;
}
.select-option[aria-selected="true"] .select-check {
  visibility: visible;
}
.select-option[aria-disabled="true"] {
  color: var(--subtle);
  cursor: not-allowed;
}
.field small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}
.field small button {
  font-size: 10px;
  padding: 1px 4px;
  background: transparent;
  border: none;
  color: var(--accent);
}
.presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 17px;
}
.presets button {
  font-size: 11px;
  padding: 8px 12px;
}
.preview-details {
  margin: 20px 0;
}
.preview-details .kv b {
  font-size: 11px;
}
.code {
  font-family: ui-monospace, monospace;
  font-size: 10px !important;
  word-break: break-all;
}
.label-top {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: var(--accent);
  margin-bottom: 12px;
}
.wide {
  width: 100%;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 26px;
  max-width: 450px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  padding: 15px 20px;
  border-radius: 11px;
  font-size: 13px;
  z-index: 10;
}
.wallet-option {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 20px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  font-weight: 500;
  text-align: left;
}
.wallet-option:hover {
  background: var(--surface-hover);
  border-color: var(--input-line);
}
.wallet-option:focus-visible {
  outline: 2px solid #3396ff;
  outline-offset: 3px;
}
.walletconnect-icon,
.rabby-icon {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  height: 48px;
  border: 1px solid #ffffff40;
  border-radius: 13px;
  background: #3396ff;
  color: #fff;
}
.walletconnect-icon svg {
  width: 40px;
  height: 40px;
}
.rabby-icon {
  border: 0;
  background: transparent;
}
.rabby-icon img {
  display: block;
  width: 48px;
  height: 48px;
}
.wallet-option-copy {
  min-width: 0;
  flex: 1;
}
.wallet-option-copy small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}
.wallet-site-url {
  overflow-wrap: anywhere;
}
dialog:has(.wallet-methods) {
  width: min(460px, calc(100vw - 32px));
}
.wallet-methods {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
@media (max-width: 400px) {
  .header-actions {
    gap: 8px;
  }
  .header-actions .network-status {
    font-size: 9px;
    padding: 7px 8px;
  }
  #connect {
    font-size: 12px;
    padding: 10px;
  }
  .wallet-option {
    padding: 16px;
    gap: 14px;
    font-size: 20px;
  }
}
.step-list {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}
.step-list span {
  font-size: 10px;
  flex: 1;
  border-top: 2px solid var(--line);
  padding-top: 9px;
  color: var(--muted);
}
.step-list .current {
  border-color: var(--accent);
  color: var(--accent);
}
.workflow {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.workflow h3 {
  color: var(--accent);
}
@media (min-width: 1600px) {
  .content {
    padding-top: 48px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 195px;
    padding: 28px 15px;
  }
  main {
    margin-left: 195px;
  }
  .content {
    padding: 30px 25px;
  }
  header {
    padding: 0 25px;
  }
  .position-row {
    grid-template-columns: 1.4fr 1fr 1fr 80px;
    gap: 12px;
  }
  .position-row .fees-col {
    display: none;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .breadcrumb {
    display: none;
  }
  .header-actions {
    margin-left: auto;
  }
  footer {
    padding: 20px 25px;
  }
}
@media (max-width: 750px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 17px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .brand {
    font-size: 20px;
  }
  .brand-mark {
    width: 26px;
    height: 26px;
  }
  .workspace-label,
  .sidebar-bottom,
  .beta {
    display: none;
  }
  .sidebar nav {
    display: flex;
  }
  .nav {
    font-size: 11px;
    padding: 9px;
    white-space: nowrap;
  }
  .nav span {
    display: none;
  }
  main {
    margin: 0;
  }
  header {
    height: 70px;
    padding: 0 20px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .content {
    padding: 27px 18px;
  }
  .heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 26px;
  }
  .heading-actions {
    flex-direction: column;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 16px 12px;
  }
  .stat strong {
    font-size: 23px;
  }
  .stat-label {
    font-size: 10px;
    min-height: 25px;
  }
  .stat p {
    font-size: 10px;
  }
  .position-row {
    padding: 20px 15px;
    grid-template-columns: 1.4fr 1fr 30px;
    gap: 8px;
  }
  .position-row .range-col {
    display: none;
  }
  .position-row button {
    font-size: 0;
    padding: 8px;
  }
  .position-row button:after {
    content: "↗";
    font-size: 16px;
  }
  .pair b {
    font-size: 12px;
  }
  .coins {
    display: none;
  }
  .amount strong {
    font-size: 13px;
  }
  .empty {
    padding: 40px 20px;
  }
  .section-bar {
    gap: 10px;
    flex-wrap: wrap;
  }
  footer span {
    display: none;
  }
  footer {
    justify-content: space-between;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-head {
    padding: 20px;
  }
  .box {
    padding: 20px;
  }
  .search button {
    padding: 10px;
  }
  .stat.accent strong {
    font-size: 23px;
  }
  .history-row {
    gap: 12px;
    padding: 18px;
  }
  .history-row strong {
    font-size: 12px;
  }
}
@media (max-width: 500px) {
  .header-actions {
    gap: 10px;
  }
  .header-actions .network-label,
  .header-actions .network-separator {
    display: none;
  }
  .header-actions button span {
    margin-left: 8px;
  }
  #connect {
    white-space: nowrap;
  }
  .sidebar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .nav {
    width: auto;
    min-width: 0;
    min-height: 44px;
    padding: 8px 4px;
    justify-content: center;
    align-items: center;
    text-align: center;
    white-space: normal;
  }
}

.qr-area {
  text-align: center;
  padding: 16px 0;
  min-height: 120px;
}
.wallet-qr {
  display: block;
  width: min(100%, 320px);
  height: auto;
  border-radius: 16px;
  margin: 0 auto 16px;
}
.setup-steps {
  padding-left: 22px;
  line-height: 1.65;
  color: var(--muted);
}
.setup-steps li {
  padding-bottom: 10px;
}

.mode-options {
  padding: 0;
  margin: 0;
  border: 0;
}
.mode-options legend {
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}
.mode-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.6;
  padding: 6px 0;
}
.mode-options input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* Range and deposit cards follow the compact token-entry layout. */
dialog:has(.range-cards),
dialog:has(.deposit-card) {
  background: var(--surface);
}
.range-cards {
  display: grid;
  gap: 4px;
  border-radius: 24px;
  overflow: hidden;
}
.range-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--panel);
  padding: 20px 24px;
  min-height: 128px;
}
.range-card-value {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.range-card label {
  font-size: 14px;
  color: var(--muted);
}
.range-card input {
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  font-size: 27px;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
}
.range-delta {
  font-size: 17px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.range-stepper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.range-stepper button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-hover);
  color: var(--text-secondary);
  font-size: 27px;
  line-height: 1;
}
.range-stepper button:hover:not(:disabled) {
  background: var(--primary-hover);
  color: var(--on-primary);
}
.range-caption {
  margin: 12px 0 0;
}
dialog:has(.range-editor) {
  width: min(1220px, calc(100vw - 32px));
  max-height: 94vh;
  background: var(--panel);
}
dialog:has(.range-editor) .modal-head,
dialog:has(.range-editor) .modal-foot {
  background: var(--panel);
}
dialog:has(.range-editor) .modal-body > .sub {
  margin-bottom: 12px !important;
}
.range-context {
  margin: 0 0 22px;
}
.range-context > summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
}
.range-context > summary b {
  color: var(--text);
  font-weight: 500;
  margin: 0 5px;
}
.range-context[open] > summary {
  margin-bottom: 18px;
}
.range-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  column-gap: 24px;
}
.range-editor-heading,
.range-legend,
.range-comparison,
#range-preview-error {
  grid-column: 1 / -1;
}
.range-charts {
  grid-column: 1;
  grid-row: 3 / 5;
  align-self: start;
}
.range-editor .range-edit-fields {
  grid-column: 2;
  grid-row: 3;
  grid-template-columns: 1fr;
  gap: 15px;
}
.range-editor .range-editor-bottom {
  grid-column: 2;
  grid-row: 4;
  flex-direction: column;
  align-items: stretch;
  margin: 14px 0 0;
  gap: 7px;
}
.range-editor-bottom .presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.range-editor-bottom .presets button {
  font-size: 11px;
  padding: 7px;
}
.range-editor-bottom .presets button:last-child {
  grid-column: 1 / -1;
}
.range-editor .range-edit-input input {
  font-size: 19px;
  padding: 10px 4px;
}
.range-editor .range-edit-input button {
  padding: 7px 12px;
}
.range-editor .range-bound-info {
  font-size: 10px;
  gap: 5px;
}
.range-explanation {
  max-width: 850px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin: -8px 0 24px;
}
.range-position-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 0 24px;
  margin: 0 0 26px;
  border-bottom: 1px solid var(--line);
}
.range-position-stats > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.range-position-stats span,
.range-position-stats small {
  font-size: 12px;
  color: var(--muted);
}
.range-position-stats span {
  margin-bottom: 5px;
}
.range-position-stats b {
  font-size: 16px;
  font-weight: 550;
}
.range-editor-heading,
.range-chart-heading,
.range-editor-bottom,
.range-bound-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.range-editor-heading h3 {
  font-size: 18px;
  margin: 0 0 7px;
}
.range-editor-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.range-quote {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.range-quote > div {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.range-quote button {
  border: 0;
  background: transparent;
  padding: 8px 14px;
}
.range-quote button.active {
  background: var(--accent);
  color: var(--on-accent);
}
.range-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 22px 0 24px;
  font-size: 12px;
  color: var(--text-secondary);
}
.range-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.range-legend i {
  display: inline-block;
  width: 16px;
  height: 3px;
  background: var(--purple);
  border-radius: 2px;
}
.range-legend i.new {
  background: var(--accent);
}
.range-legend i.spot {
  background: var(--text);
}
.range-legend b {
  color: var(--text);
  font-weight: 500;
}
.range-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.range-chart {
  min-width: 0;
}
.range-chart-heading {
  min-height: 33px;
  margin-bottom: 12px;
}
.range-chart h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 550;
}
.chart-zoom {
  display: flex;
  gap: 4px;
}
.chart-zoom button {
  padding: 3px;
  width: 27px;
  height: 27px;
  font-size: 16px;
  border-radius: 6px;
  background: transparent;
}
.range-chart svg {
  display: block;
  width: 100%;
  overflow: visible;
}
.range-chart svg text {
  fill: var(--muted);
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.old-range-fill {
  fill: var(--purple);
  opacity: 0.09;
}
.new-range-fill {
  fill: var(--accent);
  opacity: 0.08;
}
.old-range-rail {
  fill: var(--purple);
  opacity: 0.7;
}
.new-range-rail {
  fill: var(--accent);
}
.liquidity-bar {
  fill: var(--liquidity-bar);
  opacity: 0.75;
}
.spot-line {
  stroke: var(--text);
  stroke-width: 2;
}
.chart-marker line {
  stroke-dasharray: 3 3;
  stroke-width: 1.5;
}
.chart-marker.old line {
  stroke: var(--purple);
}
.chart-marker.old rect {
  fill: var(--purple);
}
.chart-marker.old text {
  fill: var(--on-accent);
  font-weight: 650;
}
.chart-marker.new {
  cursor: ew-resize;
}
.chart-marker.new line {
  stroke: var(--accent);
  stroke-dasharray: none;
}
.chart-marker.new rect {
  fill: var(--accent);
}
.chart-marker.new text {
  fill: var(--on-accent);
  font-size: 9px;
  font-weight: 750;
}
.chart-marker.new circle {
  fill: var(--on-accent);
  stroke: var(--accent);
  stroke-width: 2;
}
.chart-marker.new .drag-hit {
  fill: transparent;
}
.chart-marker:focus {
  outline: none;
}
.chart-marker:focus circle {
  stroke: var(--text);
  stroke-width: 3;
}
.range-distribution {
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.range-distribution:active {
  cursor: grabbing;
}
.chart-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
  min-height: 30px;
  margin: 10px 0 0;
}
.history-price {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}
.history-bound {
  stroke-width: 1.3;
  stroke-dasharray: 5 4;
}
.history-bound.old {
  stroke: var(--purple);
}
.history-bound.new {
  stroke: var(--accent);
  stroke-dasharray: 2 3;
}
.range-chart svg text.old {
  fill: var(--purple);
}
.range-chart svg text.new {
  fill: var(--accent);
  font-size: 9px;
}
.chart-empty {
  aspect-ratio: 540 / 230;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: var(--surface);
  border-radius: 10px;
  color: var(--muted);
}
.chart-empty > span {
  color: var(--subtle);
  font-size: 32px;
}
.chart-empty p {
  margin: 10px 0 8px;
  font-size: 12px;
}
.chart-empty small {
  font-size: 10px;
}
.range-comparison {
  margin: 18px 0;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-variant-numeric: tabular-nums;
}
.range-comparison > div {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr 1.2fr;
  gap: 10px;
  align-items: center;
  min-height: 28px;
  font-size: 12px;
}
.range-comparison > div + div {
  border-top: 1px solid var(--line);
}
.range-comparison span {
  color: var(--muted);
}
.range-comparison b {
  font-weight: 500;
}
.range-comparison .old {
  color: var(--purple);
}
.range-comparison .new,
.range-comparison .in {
  color: var(--accent);
}
.range-comparison .out {
  color: var(--amber);
}
.range-edit-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.range-edit-field > label {
  display: block;
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.range-edit-input {
  display: flex;
  border: 1px solid var(--input-line);
  border-radius: 10px;
  overflow: hidden;
}
.range-edit-input input {
  border: 0;
  min-width: 0;
  width: 100%;
  background: var(--surface);
  border-radius: 0;
  text-align: center;
  padding: 12px 6px;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.range-edit-input button {
  border: 0;
  border-radius: 0;
  padding: 9px 16px;
  font-size: 21px;
  background: var(--surface-hover);
}
.range-bound-info {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}
.range-bound-info > div {
  display: flex;
  gap: 4px;
}
.range-bound-info button {
  padding: 4px 8px;
  font-size: 10px;
  background: transparent;
}
.range-editor-bottom {
  margin: 19px 0 26px;
}
.range-editor-bottom .presets {
  margin: 0;
}
.range-editor-bottom > p {
  font-size: 11px;
}
.compound-action {
  color: var(--accent);
  border-color: var(--accent-line);
}
.compound-total {
  padding: 22px;
  border-radius: 14px;
  background: var(--accent-soft);
  text-align: center;
}
.compound-total strong {
  display: block;
  font-size: 36px;
  letter-spacing: -1px;
  color: var(--accent);
  margin: 12px 0;
  font-weight: 550;
}
.compound-total p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.compound-plan {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.compound-plan li {
  display: flex;
  gap: 14px;
  margin: 18px 0;
}
.compound-plan li > span {
  flex: 0 0 29px;
  height: 29px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 12px;
}
.compound-plan b {
  font-size: 14px;
  font-weight: 550;
}
.compound-plan p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 6px 0 0;
}
.compound-note {
  padding: 14px 16px;
  border: 1px solid var(--input-line);
  border-radius: 9px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}
@media (max-width: 760px) {
  dialog:has(.range-editor) {
    width: calc(100vw - 16px);
    max-height: 95vh;
  }
  dialog:has(.range-editor) .modal-body,
  dialog:has(.range-editor) .modal-head,
  dialog:has(.range-editor) .modal-foot {
    padding: 18px;
  }
  .range-position-stats {
    gap: 12px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 20px;
  }
  .range-position-stats > div:last-child {
    grid-column: 1 / -1;
  }
  .range-position-stats b {
    font-size: 13px;
  }
  .range-editor-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .range-context > summary {
    flex-direction: column;
    gap: 8px;
    line-height: 1.6;
  }
  .range-editor {
    display: block;
  }
  .range-editor .range-edit-fields {
    margin-top: 20px;
  }
  .range-legend {
    gap: 10px 16px;
    font-size: 10px;
  }
  .range-charts {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .range-comparison {
    padding: 6px 10px;
  }
  .range-comparison > div {
    grid-template-columns: 0.8fr 1fr 1fr;
    gap: 7px;
    font-size: 10px;
    min-height: 36px;
  }
  .range-comparison > div > :last-child {
    grid-column: 2 / -1;
    padding-bottom: 7px;
  }
  .range-comparison > .comparison-head > :last-child {
    display: none;
  }
  .range-edit-fields {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .range-editor-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .range-editor-bottom .presets {
    gap: 5px;
    flex-wrap: wrap;
  }
  .range-editor-bottom .presets button {
    font-size: 11px;
    padding: 8px;
  }
}
.deposit-heading {
  margin: 29px 0 18px;
}
.deposit-heading h3 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.4px;
  margin: 0 0 8px;
}
.deposit-heading p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.deposit-amounts {
  display: grid;
  gap: 6px;
}
.deposit-card {
  background: var(--panel);
  border: 1px solid transparent;
  border-radius: 25px;
  padding: 23px 23px 13px;
  min-width: 0;
}
.deposit-card:focus-within {
  border-color: var(--accent-line);
}
.deposit-card:has(input[aria-invalid="true"]) {
  border-color: var(--red);
}
.deposit-card-main {
  display: flex;
  align-items: center;
  gap: 18px;
}
.deposit-card-main input {
  background: transparent;
  border: 0;
  border-radius: 4px;
  outline-offset: 5px;
  padding: 0;
  flex: 1;
  width: 0;
  min-width: 0;
  font-size: 38px;
  letter-spacing: -1.3px;
  line-height: 1.25;
}
.deposit-card-main input::placeholder {
  color: var(--muted);
}
.deposit-card-main input.deposit-long-value {
  font-size: 22px;
  letter-spacing: -0.5px;
}
.deposit-token {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  max-width: 50%;
  font-size: 22px;
  font-weight: 600;
  white-space: nowrap;
}
.deposit-token > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.deposit-token-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 20px;
  font-weight: 600;
}
.deposit-network {
  display: grid;
  place-items: center;
  position: absolute;
  right: -3px;
  bottom: -2px;
  width: 17px;
  height: 17px;
  font-size: 10px;
  line-height: 1;
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--panel);
  border-radius: 6px;
}
.deposit-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.deposit-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
}
.deposit-usd {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.deposit-card .deposit-card-bottom {
  margin-top: 16px;
}
.deposit-portions {
  display: flex;
  gap: 5px;
}
.deposit-portions button {
  border: 1px solid var(--input-line);
  border-radius: 999px;
  padding: 4px 10px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.deposit-portions button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.deposit-balance {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.deposit-fix {
  display: block;
  margin: 0 0 0 auto;
  padding: 2px 0;
  font-size: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.deposit-fix[aria-pressed="true"] {
  color: var(--accent);
}
.deposit-fix:hover {
  background: transparent;
  color: var(--text);
}
.deposit-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}
.deposit-price-row button {
  font-size: 11px;
  padding: 7px 10px;
  white-space: nowrap;
}
.deposit-total {
  font-size: 14px;
  font-weight: 600;
  margin: 18px 0;
}
#deposit-single-total {
  margin: 8px 0 0;
}
.deposit-details {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.deposit-details summary {
  cursor: pointer;
}
#deposit-note {
  margin: 14px 0 0;
  line-height: 1.65;
}
#deposit-error {
  line-height: 1.65;
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}
#deposit-single-status {
  overflow-wrap: anywhere;
  line-height: 1.6;
  margin-top: 14px;
}
#single-deposit .deposit-card-bottom {
  margin-top: 0;
}
@media (max-width: 420px) {
  .range-card {
    padding: 18px;
    gap: 12px;
  }
  .range-card input {
    font-size: 23px;
  }
  .range-stepper button {
    width: 36px;
    height: 36px;
  }
  .deposit-card {
    padding: 20px 17px 12px;
    border-radius: 22px;
  }
  .deposit-card-main {
    gap: 12px;
  }
  .deposit-card-main input {
    font-size: 31px;
  }
  .deposit-card-main input.deposit-long-value {
    font-size: 18px;
  }
  .deposit-token {
    font-size: 19px;
    gap: 8px;
  }
  .deposit-token-icon {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  .deposit-card-bottom {
    gap: 10px;
  }
  .deposit-portions button {
    font-size: 12px;
    padding: 4px 8px;
  }
  .deposit-balance {
    margin-left: auto;
    font-size: 12px;
  }
  .deposit-price-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Wallet queue: the complete plan stays in one dialog throughout signing. */
.transaction-steps {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.transaction-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  padding: 14px 12px;
  border-radius: 14px;
}
.transaction-step + .transaction-step {
  margin-top: 4px;
}
.transaction-step.active {
  background: var(--transaction-active-bg);
  box-shadow: inset 0 0 0 1px var(--transaction-active-line);
}
.step-icon {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  height: 30px;
  border: 1px solid var(--input-line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.step-icon .spinner {
  width: 22px;
  height: 22px;
  margin: 0;
}
.active .step-icon {
  border-color: transparent;
}
.success .step-icon {
  background: var(--green);
  border-color: var(--green);
  color: var(--on-accent);
  font-weight: 700;
}
.error .step-icon {
  color: var(--red);
  border-color: var(--red);
}
.step-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 3px;
}
.step-copy b {
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.step-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.step-status {
  color: var(--muted);
  font-size: 12px;
}
.active .step-status,
.success .step-status {
  color: var(--green);
}
.error .step-status {
  color: var(--red);
}
.step-tx {
  padding: 5px 2px;
}
.transaction-step.success,
.transaction-step.error {
  background: transparent;
  border: 0;
  margin-bottom: 0;
}
.queue-summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
#queue-stop {
  margin-left: auto;
}
@media (prefers-reduced-motion: reduce) {
  .transaction-steps .spinner {
    animation-duration: 2s;
  }
}
dialog:has(.transaction-steps) .modal-head {
  padding: 17px 22px;
}

.notification-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.notification-card {
  padding: 24px;
  margin-bottom: 20px;
  min-width: 0;
}
.notification-card h2 {
  font-size: 21px;
  margin: 14px 0;
}
.notification-card .sub {
  line-height: 1.7;
}
.notification-card .field {
  margin: 20px 0;
}
.notification-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.notification-pair {
  border: 1px solid var(--accent-line);
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
  line-height: 1.6;
}
.notification-pair .button {
  display: inline-block;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  margin: 8px 8px 8px 0;
}
.notification-owner {
  display: flex;
  align-items: center;
  gap: 16px;
}
.notification-owner .field {
  flex: 1;
  min-width: 0;
}
.notification-wallet {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}
.notification-wallet .code {
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  .notification-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
@media (max-width: 600px) {
  .notification-card {
    padding: 18px;
  }
  .notification-owner {
    display: block;
  }
  .notification-wallet .box-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}
dialog:has(.transaction-steps) .modal-body {
  padding: 16px 22px;
}
dialog:has(.transaction-steps) .modal-foot {
  padding: 14px 22px;
}
.transaction-steps {
  margin: 12px 0;
}
.transaction-step {
  padding: 8px 10px;
}
.transaction-step + .transaction-step {
  margin-top: 2px;
}
.step-copy {
  gap: 2px;
}
.step-copy small,
.step-status {
  font-size: 11px;
}

.watch-count {
  font-size: 17px;
}
.address-fields {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.5fr);
  gap: 18px;
}
.address-form-actions,
.address-wallet-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.address-book .notification-wallet {
  border: 1px solid var(--line);
  margin-top: 0;
}
.notification-wallet h2 {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.notification-wallet h2 .pill {
  margin-left: 12px;
  vertical-align: middle;
}
.watch-position {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 0.8fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.watch-position small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.watch-position .range-status {
  font-size: 12px;
}
.notification-settings {
  margin-top: 30px;
}
.notification-settings > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  list-style: none;
}
.notification-settings > summary::-webkit-details-marker {
  display: none;
}
.notification-settings > summary > span::after {
  content: " ＋";
  color: var(--accent);
}
.notification-settings[open] > summary > span::after {
  content: " −";
}
.notification-settings summary small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}
.notification-settings-body {
  border-top: 1px solid var(--line);
  padding: 20px;
}
.notification-settings-body .notification-card {
  margin-bottom: 0;
}
@media (max-width: 1100px) {
  .address-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .watch-position {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .watch-position button {
    justify-self: end;
  }
}
@media (max-width: 600px) {
  .notification-settings > summary {
    padding: 18px;
    font-size: 14px;
  }
  .notification-settings-body {
    padding: 12px;
  }
  .watch-position {
    gap: 12px;
  }
  .notification-wallet h2 .pill {
    display: inline-block;
    margin-left: 0;
    margin-top: 8px;
  }
}

/* Unified positions and monitoring overview. */
.overview-heading {
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
}
.overview-heading > div,
.overview-heading .heading-actions {
  min-width: 0;
  max-width: 100%;
}
.overview-heading .heading-actions {
  align-items: baseline;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}
.overview-heading .heading-actions > button {
  line-height: 20px;
  white-space: nowrap;
}
.positions-refresh-control {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
}
#notifications-refresh.positions-refresh-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  width: 232px;
  max-width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  font-weight: 500;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
#notifications-refresh.positions-refresh-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
#notifications-refresh.positions-refresh-button[data-state="loading"] {
  color: var(--text);
  border-color: var(--accent-line);
}
#notifications-refresh.positions-refresh-button[data-state="loading"]:disabled {
  opacity: 1;
  cursor: progress;
}
#notifications-refresh.positions-refresh-button[data-state="success"] {
  color: var(--green);
  background: var(--success-soft);
  border-color: var(--success-line);
}
#notifications-refresh.positions-refresh-button[data-state="error"] {
  color: var(--red);
  background: var(--error-soft);
  border-color: var(--error-line);
}
#notifications-refresh.positions-refresh-button[data-state="partial"],
#notifications-refresh.positions-refresh-button[data-state="offline"] {
  color: var(--amber);
  background: var(--warning-soft);
  border-color: var(--warning-line);
}
#notifications-refresh.positions-refresh-button[data-state="success"]:hover {
  background: var(--success-soft);
  border-color: var(--green);
}
#notifications-refresh.positions-refresh-button[data-state="error"]:hover {
  background: var(--error-soft);
  border-color: var(--red);
}
#notifications-refresh.positions-refresh-button[data-state="partial"]:hover,
#notifications-refresh.positions-refresh-button[data-state="offline"]:hover {
  background: var(--warning-soft);
  border-color: var(--amber);
}
.positions-refresh-content {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}
.positions-refresh-label,
.positions-refresh-count {
  white-space: nowrap;
}
.positions-refresh-count {
  color: var(--accent);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 20px;
}
.positions-refresh-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex: none;
  width: 16px;
  height: 16px;
}
.positions-refresh-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}
.positions-refresh-symbol {
  display: inline-flex;
  font-size: 19px;
  line-height: 16px;
}
.positions-refresh-symbol[hidden],
.positions-refresh-icon svg[hidden],
.positions-refresh-spinner[hidden] {
  display: none;
}
/* Adapted from Griffin Johnston's MIT-licensed LDRS Tailspin (2022).
   https://github.com/GriffinJohnston/ldrs/blob/main/src/elements/tailspin.scss
   Full attribution and license: docs/third-party-animations.md. */
.positions-refresh-spinner {
  display: block;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  color: var(--accent);
  background: conic-gradient(transparent 25%, currentColor);
  -webkit-mask: radial-gradient(circle 6.4px, transparent 99%, #000 100%);
  mask: radial-gradient(circle 6.4px, transparent 99%, #000 100%);
  border-radius: 50%;
  animation: positions-refresh-tailspin 1.3s linear infinite;
  animation-delay: var(--refresh-animation-offset, 0s);
}
.positions-refresh-fill {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: var(--refresh-progress, 0%);
  background: var(--accent-soft);
  opacity: 0;
  pointer-events: none;
  transition: width 500ms cubic-bezier(.22, .61, .36, 1), opacity 180ms ease;
}
.positions-refresh-sheen {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  background: linear-gradient(105deg, transparent 15%, var(--accent-line) 50%, transparent 85%);
  opacity: .35;
  pointer-events: none;
  transform: translateX(-110%);
}
[data-state="loading"] > .positions-refresh-fill {
  opacity: 1;
}
[data-state="loading"] > .positions-refresh-sheen {
  display: block;
  animation: positions-refresh-sweep 2s ease-in-out infinite;
  animation-delay: var(--refresh-animation-offset, 0s);
}
.positions-refresh-details {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  box-sizing: border-box;
  width: min(380px, calc(100vw - 36px));
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 28px var(--popover-shadow);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  max-height: min(420px, 65vh);
  overflow-y: auto;
}
.positions-refresh-details[hidden] {
  display: none;
}
.positions-refresh-details[data-placement="above"] {
  top: auto;
  bottom: calc(100% + 8px);
}
.positions-refresh-details strong {
  color: var(--text);
  font-weight: 600;
}
.positions-refresh-details h3 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.positions-refresh-details p {
  margin: 0;
  line-height: inherit;
}
.positions-refresh-details p + p,
.positions-refresh-details ul {
  margin-top: 8px;
}
.positions-refresh-details ul {
  margin-bottom: 0;
  padding-left: 17px;
}
.positions-refresh-details li + li {
  margin-top: 7px;
}
.positions-refresh-details code {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.positions-refresh-details small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}
.positions-refresh-problem-message {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.positions-refresh-retry {
  width: 100%;
  margin-top: 12px;
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  line-height: 20px;
  white-space: nowrap;
}
.positions-refresh-retry:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.positions-refresh-retry:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.positions-refresh-retry[hidden] {
  display: none;
}
@keyframes positions-refresh-tailspin {
  to { transform: rotate(360deg); }
}
@keyframes positions-refresh-sweep {
  to { transform: translateX(110%); }
}
@media (max-width: 600px) {
  .overview-heading .heading-actions {
    position: relative;
    width: 100%;
  }
  .overview-heading .positions-refresh-control {
    position: static;
  }
  .positions-refresh-details {
    left: 0;
    right: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  #notifications-refresh.positions-refresh-button,
  .positions-refresh-fill {
    transition: none;
  }
  .positions-refresh-spinner,
  [data-state="loading"] > .positions-refresh-sheen {
    animation: none;
  }
  [data-state="loading"] > .positions-refresh-sheen {
    display: none;
  }
}
.overview-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
}
.overview-filters h2 {
  font-size: 17px;
}
.overview-wallet {
  margin-bottom: 20px;
  overflow: hidden;
}
.connected-wallet {
  border-color: var(--accent-line);
}
.overview-wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 12px;
}
.overview-wallet-title {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.overview-wallet-details {
  min-width: 0;
  flex: 1;
}
.overview-wallet-title h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 17px;
  margin: 0 0 8px;
  white-space: nowrap;
}
.overview-wallet-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.overview-wallet-title .pill {
  margin: 0;
  font-size: 10px;
  padding: 5px 9px;
  flex: none;
}
.wallet-monogram {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}
.connected-wallet .wallet-monogram {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-line);
}
.wallet-icon {
  display: block;
  width: 26px;
  height: 26px;
  background: currentColor;
  -webkit-mask: var(--wallet-icon) center / contain no-repeat;
  mask: var(--wallet-icon) center / contain no-repeat;
}
.wallet-icon-open {
  --wallet-icon: url("/wallet-open.png");
}
.wallet-icon-closed {
  --wallet-icon: url("/wallet-closed.png");
}
.overview-address {
  overflow-wrap: anywhere;
  font-size: 11px;
}
.overview-wallet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  padding: 0 24px 19px;
  font-size: 11px;
  color: var(--muted);
}
.overview-wallet > .warning {
  margin: 0 24px 16px;
}
.overview-discovery-note {
  margin: 18px 0 0;
  line-height: 1.6;
}
.overview-position {
  display: grid;
  grid-template-columns:
    minmax(0, 1.25fr) minmax(0, 1.05fr) minmax(0, 0.9fr)
    minmax(0, 0.65fr) 108px;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.overview-position .pair {
  min-width: 0;
}
.overview-position small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.overview-position .amount strong {
  font-size: 15px;
}
.overview-position .range-status {
  font-size: 11px;
}
.overview-position button {
  padding: 10px 12px;
  font-size: 12px;
  white-space: nowrap;
}
.overview-table-head {
  padding-top: 11px;
  padding-bottom: 11px;
  color: var(--muted);
  font-size: 10px;
  background: var(--surface);
}
.overview-wallet-empty {
  padding: 10px 24px 22px;
  font-size: 13px;
  color: var(--muted);
}
.overview-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.notification-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
@media (max-width: 900px) {
  .overview-position {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
  }
  .overview-table-head {
    display: none;
  }
  .overview-position button {
    grid-column: 2;
    justify-self: end;
  }
  .overview-position .amount:nth-of-type(4)::before {
    content: "Комиссии";
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 5px;
  }
  .overview-wallet-head {
    flex-wrap: wrap;
  }
  .overview-wallet-title {
    flex-basis: 100%;
  }
  .overview-heading {
    flex-wrap: wrap;
    gap: 16px;
  }
  .overview-heading .heading-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
@media (max-width: 500px) {
  .stats {
    grid-template-columns: 1fr;
  }
  .stat-label {
    min-height: 0;
  }
  .stat,
  .stat.accent {
    padding: 18px;
  }
  .overview-wallet-head {
    padding: 18px 16px 12px;
  }
  .overview-wallet-title {
    gap: 10px;
  }
  .overview-wallet-title .pill {
    padding: 5px 7px;
  }
  .wallet-status-detail {
    display: none;
  }
  .overview-wallet-title h2 {
    font-size: 16px;
  }
  .overview-wallet-meta {
    padding: 0 16px 16px;
    gap: 8px;
  }
  .overview-position {
    padding: 18px 16px;
    gap: 16px 12px;
  }
  .overview-position .pair b {
    font-size: 14px;
  }
  .overview-position .amount strong {
    font-size: 15px;
  }
  .overview-position .overview-range {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .overview-position .pair {
    grid-column: 1 / -1;
  }
  .overview-position button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .overview-position .amount:nth-of-type(3)::before {
    content: "Стоимость / состав";
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 5px;
  }
  .overview-filters {
    flex-wrap: wrap;
  }
  .overview-filters .tabs {
    width: 100%;
    display: flex;
  }
  .overview-filters .tabs button {
    flex: 1;
  }
  .overview-scope button {
    font-size: 12px;
    padding: 10px;
  }
  .address-wallet-actions button {
    font-size: 11px;
    padding: 8px 10px;
  }
}

/* Per-operation accounting, shared by the completion dialog and History. */
.operation-summary {
  container: operation-summary / inline-size;
  margin: 20px 0;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.operation-summary .op-header {
  height: auto;
  min-height: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 24px;
}
.operation-summary .op-eyebrow {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.25px;
  line-height: 1.7;
}
.operation-summary .op-eyebrow span {
  letter-spacing: 0;
}
.operation-summary h3 {
  margin: 7px 0 0;
  font-size: 18px;
  font-weight: 550;
  letter-spacing: -0.3px;
  line-height: 1.4;
}
.operation-summary h3 > span {
  color: var(--muted);
  font-weight: 400;
}
.operation-summary .op-status {
  flex-shrink: 0;
  border: 1px solid var(--success-line);
  background: var(--success-soft);
  color: var(--green);
  border-radius: 30px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.4;
}
.operation-summary .op-status-interrupted {
  color: var(--amber);
  background: var(--warning-soft);
  border-color: var(--warning-line);
}
.operation-summary .op-status-pending,
.operation-summary .op-status-partial,
.operation-summary .op-status-prepared {
  color: var(--text-secondary);
  background: var(--surface);
  border-color: var(--line);
}
.operation-summary .op-stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.operation-summary .op-stage {
  padding: 22px 20px 20px;
  min-width: 0;
}
.operation-summary .op-stage + .op-stage {
  border-left: 1px solid var(--line);
}
.operation-summary .op-stage-label {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.6;
  margin-bottom: 15px;
}
.operation-summary .op-stage-label > span {
  color: var(--muted);
  font-size: 10px;
  margin-right: 9px;
}
.operation-summary .op-token-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.operation-summary .op-asset {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 1px;
}
.operation-summary .op-asset-compact {
  display: inline;
}
.operation-summary .op-asset-compact .op-token-usd {
  display: inline;
  margin-left: 4px;
}
.operation-summary .op-token-usd {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  font-weight: 400;
}
.operation-summary .op-price-unknown {
  color: var(--muted);
  font-size: 10px;
}
.operation-summary .op-usd-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 8px;
  border-top: 1px solid var(--line);
  margin-top: 13px;
  padding-top: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.operation-summary .op-usd-total b {
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
}
.operation-summary .op-usd-total small {
  flex-basis: 100%;
  font-size: 10px;
  color: var(--muted);
}
.operation-summary .op-valuation-note {
  margin: 0;
  padding: 13px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.operation-summary .op-token {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  line-height: 1.5;
}
.operation-summary .op-token b {
  font-weight: 550;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.operation-summary .op-token > span {
  font-size: 11px;
  color: var(--text-secondary);
}
.operation-summary .op-caption {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.operation-summary .op-remainder {
  background: var(--operation-remainder-bg);
}
.operation-summary .op-remainder .op-token b {
  color: var(--lime);
}
.operation-summary .op-empty {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.operation-summary .op-swap-count {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
}
.operation-summary .op-swap-count small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 5px;
}
.operation-summary .op-muted {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.operation-summary .op-fees {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-secondary);
}
.operation-summary .op-fees .op-usd-total {
  margin: 0;
  padding: 0;
  border: 0;
  gap: 5px;
}
.operation-summary .op-fees-amounts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.operation-summary .op-fees .op-token-list {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 15px;
}
.operation-summary .op-fees .op-token b {
  font-size: 12px;
}
.operation-summary .op-warning {
  color: var(--amber);
  font-size: 12px;
  line-height: 1.6;
  margin: 16px 24px;
}
.operation-summary .op-footer {
  color: var(--text);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 24px;
  align-items: center;
}
.operation-summary .op-footer > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.operation-summary .op-footer b {
  font-size: 13px;
  font-weight: 550;
}
.operation-summary .op-footer b > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  margin-left: 6px;
}
.operation-summary .op-footer small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.operation-summary .op-budget-note {
  color: var(--muted);
  text-align: right;
  font-size: 10px;
  line-height: 1.7;
}
.operation-summary .op-details {
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.operation-summary .op-details > summary {
  cursor: pointer;
  padding: 16px 24px;
  color: var(--text-secondary);
  font-size: 11px;
}
.operation-summary .op-details > summary > span {
  color: var(--muted);
  font-size: 10px;
  margin-left: 6px;
}
.operation-summary .op-swaps {
  display: grid;
  gap: 12px;
  padding: 0 24px 16px;
}
.operation-summary .op-swap {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.operation-summary .op-swap-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
}
.operation-summary .op-swap-heading > b {
  font-weight: 450;
}
.operation-summary .op-swap-heading > span {
  color: var(--muted);
  font-size: 10px;
}
.operation-summary .op-swap-route {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.operation-summary .op-arrow {
  color: var(--muted);
}
.operation-summary .op-quote {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.operation-summary .op-quote .op-token b,
.operation-summary .op-quote .op-token > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.operation-summary .op-quote-note {
  margin: 0;
  font-size: 10px;
}
.operation-summary .op-transactions {
  padding: 0 24px 8px;
  margin: 0;
  list-style: none;
}
.operation-summary .op-transaction {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.operation-summary .op-transaction-title {
  display: block;
  color: var(--text);
  font-size: 11px;
  line-height: 1.5;
}
.operation-summary .op-transaction-meta {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  margin-top: 4px;
}
.operation-summary .op-transaction > a {
  flex-shrink: 0;
  color: var(--lime);
  text-decoration: none;
  font-size: 10px;
}
@media (max-width: 760px) {
  .operation-summary .op-stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .operation-summary .op-stage:nth-child(3) {
    border-left: 0;
  }
  .operation-summary .op-stage:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .operation-summary .op-header {
    flex-direction: column;
    padding: 20px;
  }
  .operation-summary .op-fees {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px 20px;
  }
  .operation-summary .op-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 20px;
  }
  .operation-summary .op-budget-note {
    text-align: left;
  }
  .operation-summary .op-budget-note br {
    display: none;
  }
  .operation-summary .op-details > summary {
    padding: 16px 20px;
  }
  .operation-summary .op-swaps,
  .operation-summary .op-transactions {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (max-width: 420px) {
  .operation-summary .op-stage {
    padding: 17px 13px;
  }
  .operation-summary .op-token b {
    font-size: 14px;
  }
  .operation-summary .op-stage-label > span {
    display: none;
  }
  .operation-summary h3 {
    font-size: 16px;
  }
  .operation-summary .op-swap-heading {
    flex-direction: column;
  }
}
@container operation-summary (max-width: 680px) {
  .operation-summary .op-stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .operation-summary .op-stage:nth-child(3) {
    border-left: 0;
  }
  .operation-summary .op-stage:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .operation-summary .op-header {
    flex-direction: column;
  }
  .operation-summary .op-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .operation-summary .op-budget-note {
    text-align: left;
  }
  .operation-summary .op-budget-note br {
    display: none;
  }
  .operation-summary .op-fees {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Override the app-wide mobile footer rule inside operation receipts. */
.operation-summary .op-footer span {
  display: initial;
}

/* Theme controls are available in the cabinet and on the login page. */
.theme-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 23px;
  line-height: 1;
  color: var(--text);
  background: var(--panel);
}
.theme-toggle:hover {
  background: var(--surface-hover);
}
.header-actions .theme-toggle span {
  margin: 0;
}
.auth-theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.mobile-theme-toggle {
  display: none;
}
@media (max-width: 500px) {
  .header-actions .theme-toggle {
    display: none;
  }
  .sidebar:has(.mobile-theme-toggle) {
    position: relative;
    top: 0;
  }
  .mobile-theme-toggle {
    display: grid;
    position: absolute;
    top: 14px;
    right: 20px;
  }
}
/* Pool overview and the read-only Revert holder table. */
.pool-details {
  min-width: 0;
}
.pool-details .pd-heading {
  gap: 22px;
  margin-bottom: 26px;
}
.pd-heading .sub a {
  color: var(--accent);
}
.pd-heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.pd-coins {
  display: flex;
  flex: 0 0 auto;
  padding-right: 2px;
}
.pd-coins span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--coin-primary-bg);
  color: var(--coin-primary-text);
  font-size: 12px;
  font-weight: 650;
}
.pd-coins span + span {
  margin-left: -13px;
  background: var(--coin-secondary-bg);
  color: var(--coin-secondary-text);
}
.pd-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.pd-metric {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
  padding: 20px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.pd-metric > span,
.pd-metric > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.pd-metric > strong {
  font-size: clamp(20px, 1.7vw, 28px);
  font-weight: 500;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-metric > small {
  margin-top: auto;
  font-size: 10px;
}
.pd-freshness,
.pd-data-note {
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.pd-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.pd-section-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.pd-section-heading > span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}
.pd-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.pd-chart,
.pd-parameters {
  min-width: 0;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.pd-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.pd-chart-grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}
.pd-price-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
}
.pd-liquidity-bar {
  fill: var(--liquidity-bar);
  opacity: 0.75;
}
.pd-current-tick {
  stroke: var(--text);
  stroke-width: 2;
  stroke-dasharray: 4 4;
}
.pd-chart-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.65;
  background: var(--surface);
  border-radius: 8px;
}
.pd-chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.pd-chart-caption {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.pd-parameters {
  margin-bottom: 34px;
}
.pd-parameter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 28px;
  margin: 0;
}
.pd-parameter {
  min-width: 0;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.pd-parameter dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}
.pd-parameter dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.pd-parameter a {
  color: var(--accent);
}
.pd-code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px !important;
}
.pd-token-parameter small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
}
.pd-holders-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 22px;
}
.pd-holders-heading h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.pd-holders-heading p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.pd-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.pd-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.pd-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  padding: 0;
}
.pd-toggle i {
  position: relative;
  width: 36px;
  height: 20px;
  flex: 0 0 auto;
  border: 1px solid var(--input-line);
  border-radius: 7px;
  background: var(--surface);
  transition: background 0.15s;
}
.pd-toggle i::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 12px;
  top: 3px;
  left: 3px;
  background: var(--muted);
  border-radius: 3px;
  transition: transform 0.15s;
}
.pd-toggle input:checked + i {
  border-color: var(--success-line);
  background: var(--success-soft);
}
.pd-toggle input:checked + i::after {
  background: var(--green);
  transform: translateX(15px);
}
.pd-toggle input:focus-visible + i {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.pd-toggle:has(input:disabled) {
  opacity: 0.5;
  cursor: wait;
}
.pd-table-scroll {
  position: relative;
  overflow: auto;
  padding: 0 1px 4px;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
.pd-holders-table {
  width: 100%;
  min-width: 1270px;
  border-collapse: separate;
  border-spacing: 0 5px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pd-holders-table th {
  padding: 9px 13px 13px;
  text-align: left;
  color: var(--muted);
  font-weight: 400;
  font-size: 10px;
}
.pd-holders-table th:nth-child(n + 3):nth-child(-n + 8) {
  text-align: right;
}
.pd-sort {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--muted);
  font-size: inherit;
  border-radius: 2px;
}
.pd-sort:hover,
.pd-sort.active {
  background: transparent;
  color: var(--text);
}
.pd-sort > span {
  color: var(--subtle);
  font-size: 11px;
}
.pd-sort.active > span {
  color: var(--accent);
}
.pd-info {
  display: inline-block;
  margin-left: 5px;
  color: var(--muted);
  font-family: sans-serif;
  cursor: help;
}
.pd-holders-table td {
  padding: 14px 13px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  height: 66px;
}
.pd-holders-table td:first-child {
  border-left: 5px solid var(--input-line);
  border-radius: 5px 0 0 5px;
  padding-left: 17px;
}
.pd-holders-table td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 8px 8px 0;
}
.pd-holders-table .pd-in-range td:first-child {
  border-left-color: var(--green);
}
.pd-holders-table .pd-out-of-range td:first-child {
  border-left-color: var(--red);
}
.pd-holders-table tr:hover td {
  background: var(--surface);
}
.pd-position-link {
  padding: 0;
  border: 0;
  border-radius: 2px;
  color: var(--accent);
  font: inherit;
  background: transparent;
  font-weight: 500;
}
.pd-position-link:hover {
  color: var(--accent);
  background: transparent;
  text-decoration: underline;
}
.pd-owner a {
  color: var(--accent);
}
.pd-owner a:hover {
  text-decoration: underline;
}
.pd-numeric {
  text-align: right;
}
.pd-positive {
  color: var(--green);
}
.pd-negative {
  color: var(--red);
}
.pd-position-range {
  width: 135px;
}
.pd-range-track {
  position: relative;
  height: 15px;
  margin: 4px 0 5px;
}
.pd-range-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 7px;
  height: 2px;
  background: var(--input-line);
}
.pd-range-band {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 6px;
  height: 4px;
  border-radius: 2px;
  background: var(--range-band);
}
.pd-range-track i {
  position: absolute;
  top: 0;
  height: 15px;
  width: 2px;
  border-radius: 2px;
  background: var(--text);
  transform: translateX(-1px);
}
.pd-range-track.outside i {
  background: var(--red);
}
.pd-range-unknown {
  position: absolute;
  left: 46%;
  background: var(--panel);
  color: var(--muted);
}
.pd-range-values {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  gap: 5px;
}
.pd-copy button {
  padding: 7px 9px;
  background: transparent;
  border-color: var(--input-line);
  border-radius: 6px;
  font: inherit;
  font-size: 10px;
  color: var(--text-secondary);
}
.pd-copy button:hover {
  background: var(--surface-hover);
}
.pd-empty {
  padding: 30px !important;
  text-align: center;
  color: var(--muted);
  white-space: normal;
  font-family: inherit;
}
.pd-holders-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}
.pd-holders-footer p {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}
.pd-holders-footer button {
  flex: 0 0 auto;
}
.pd-status-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.pd-status-key i {
  width: 6px;
  height: 12px;
  background: var(--green);
  border-radius: 1px;
}
.pd-status-key.outside i {
  background: var(--red);
}
.pd-data-warning {
  padding: 14px 16px;
  border: 1px solid var(--warning-line);
  border-radius: 8px;
  color: var(--amber);
  background: var(--warning-soft);
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.pd-source-notes {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.pd-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 1500px) {
  .pd-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .pd-parameter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pd-holders-heading h2 {
    font-size: 18px;
  }
  .pd-filters {
    width: 100%;
  }
  .pd-charts {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .pool-details .pd-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
  .pd-heading .pair {
    width: 100%;
  }
  .pd-heading-actions {
    width: 100%;
  }
  .pd-heading-actions button {
    flex: 1;
  }
  .pd-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .pd-metric {
    padding: 16px 13px;
    gap: 10px;
  }
  .pd-metric > strong {
    font-size: clamp(15px, 3.5vw, 20px);
  }
  .pd-chart,
  .pd-parameters {
    padding: 18px 15px;
  }
  .pd-parameter-grid {
    grid-template-columns: 1fr;
  }
  .pd-section-heading {
    flex-wrap: wrap;
    gap: 8px;
  }
  .pd-toggle {
    flex: 1;
    padding: 10px;
    gap: 8px;
    font-size: 10px;
  }
  .pd-holders-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .pd-holders-footer p {
    gap: 12px;
  }
}

.header-statuses, .price-sources {
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-statuses { flex: none; }
.price-source-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  white-space: nowrap;
  font-size: 10px;
  color: var(--muted);
}
.price-source-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--muted); }
.price-source-indicator[data-state="ok"] .price-source-dot { background: var(--green); }
.price-source-indicator[data-state="error"] .price-source-dot { background: var(--red); }
@media (min-width: 751px) and (max-width: 1450px) {
  .header-statuses .network-label, .header-statuses .network-separator { display: none; }
  .header-actions { gap: 12px; }
}
@media (max-width: 750px) {
  header { height: auto; min-height: 106px; padding-top: 12px; padding-bottom: 12px; }
  .header-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
  .header-statuses { display: contents; }
  #connection { grid-row: 1; grid-column: 1; }
  #connect { grid-row: 1; grid-column: 2; justify-self: end; }
  .price-sources { grid-row: 2; grid-column: 1 / -1; gap: 5px; }
  .price-source-indicator { padding: 5px 8px; }
}

/* Time navigation and transaction markers share the value chart's timeline. */
.value-chart-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 20px; }
.value-chart-zoom { display: flex; align-items: center; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; flex-shrink: 0; }
.value-chart-zoom button { display: grid; place-items: center; height: 30px; padding: 0 10px; border: 0; background: transparent; border-radius: 7px; }
.value-chart-zoom button:hover:not(:disabled) { background: var(--panel); }
.value-chart-zoom .value-chart-reset { font-size: 11px; margin-left: 4px; border-left: 1px solid var(--line); border-radius: 0 7px 7px 0; }
.value-chart-scale { min-width: 38px; text-align: center; font-size: 11px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.value-chart-zoom button:disabled, .value-chart-pan button:disabled, .value-event-navigation button:disabled { opacity: .35; cursor: default; }
.value-chart-plot { margin-bottom: 10px; }
.value-chart-plot svg { overflow: hidden; }
.value-chart-plot.zoomed svg { cursor: grab; }
.value-chart-plot.zoomed svg:active { cursor: grabbing; }
.value-chart-events { position: relative; height: 35px; margin: -4px -10px 9px; border-bottom: 1px solid var(--line); }
.value-event-marker { --event-color: var(--accent); position: absolute; top: 1px; transform: translateX(-50%); display: grid; place-items: center; width: 28px; min-width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--event-color); font-size: 16px; font-weight: 600; line-height: 1; z-index: 1; touch-action: manipulation; }
.event-open, .event-add { --event-color: var(--green); }
.event-close, .event-remove { --event-color: var(--red); }
.event-compound { --event-color: var(--event-compound); }
.event-collect { --event-color: var(--amber); }
.event-move { --event-color: var(--event-move); }
.value-event-marker::before { content: ""; position: absolute; height: 32px; bottom: 100%; left: 50%; border-left: 1px dashed var(--event-color); opacity: .28; pointer-events: none; }
.value-event-marker:hover, .value-event-marker.selected { border-color: var(--event-color); background: var(--surface); box-shadow: 0 0 0 4px var(--surface); z-index: 2; }
.value-event-marker.selected::before { height: 180px; opacity: .4; }
.value-chart-pan { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; }
.value-chart-pan button { border: 0; background: var(--surface); font-size: 20px; padding: 0; width: 30px; height: 30px; border-radius: 7px; }
.value-chart-pan input { flex: 1; min-width: 0; height: 30px; padding: 0; accent-color: var(--accent); cursor: ew-resize; border: 0; box-shadow: none; }
.value-chart-event-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 13px; color: var(--muted); font-size: 11px; }
.value-chart-event-summary > span:first-child { display: flex; align-items: center; gap: 7px; color: var(--text-secondary); }
.value-chart-event-summary i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.value-chart-event-summary b { border-radius: 5px; padding: 2px 5px; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 500; }
.value-event-detail { display: flex; align-items: center; gap: 12px; margin-top: 13px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.value-event-badge { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; background: var(--panel); color: var(--event-color); font-size: 23px; }
.value-event-description { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.value-event-description strong { color: var(--text); font-size: 13px; font-weight: 600; }
.value-event-description span, .value-event-description time { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.value-event-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-left: auto; flex-shrink: 0; }
.value-event-meta strong { font-variant-numeric: tabular-nums; font-size: 13px; }
.value-event-meta a { color: var(--accent); font-size: 11px; text-decoration: none; }
.value-event-meta a:hover { text-decoration: underline; }
.value-event-navigation { display: flex; align-items: center; gap: 3px; margin-left: 8px; flex-shrink: 0; }
.value-event-navigation button { padding: 0; width: 28px; height: 30px; font-size: 20px; background: transparent; border: 0; border-radius: 7px; }
.value-event-navigation button:hover:not(:disabled) { background: var(--panel); }
.value-event-navigation span { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.value-chart-zoom button:focus-visible, .value-event-marker:focus-visible, .value-event-navigation button:focus-visible, .value-chart-pan button:focus-visible, .value-chart-pan input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 750px) {
  .value-chart-toolbar { justify-content: flex-end; margin-top: 16px; }
  .value-chart-zoom button { height: 34px; min-width: 36px; }
  .value-chart-plot { margin-top: 9px; }
  .value-chart-event-summary { flex-wrap: wrap; line-height: 1.5; }
  .value-event-detail { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .value-event-description { flex: 1; }
  .value-event-meta { margin-left: 48px; align-items: flex-start; }
  .value-event-navigation { margin-left: auto; }
  .value-event-navigation button { width: 30px; height: 34px; }
  .value-event-marker { width: 26px; min-width: 26px; height: 28px; }
}
@media (max-width: 750px) {
  .value-event-detail { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; }
  .value-event-badge { width: 34px; height: 34px; }
  .value-event-description { grid-column: 2; }
  .value-event-meta { grid-column: 1 / -1; margin: 4px 0 0; flex-direction: row; justify-content: space-between; align-items: center; }
  .value-event-navigation { grid-column: 1 / -1; justify-self: end; margin-left: 0; }
}

/* About page and its footer navigation. */
.footer-about {
  border: 0;
  padding: 4px 0;
  margin-left: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  line-height: inherit;
  white-space: nowrap;
}
.footer-about:hover,
.footer-about[aria-current="page"] {
  background: transparent;
  color: var(--accent);
}
.footer-about:focus-visible {
  outline: 2px solid var(--accent);
}
.about-page {
  max-width: 940px;
}
.about-heading button {
  white-space: nowrap;
}
.about-copy {
  font-size: 14px;
  margin: 16px 0 0;
}
.about-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.about-facts h3 {
  font-size: 13px;
  margin: 0 0 7px;
}
.about-facts p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.about-credits a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.about-icon-sources {
  display: grid;
  gap: 9px;
  padding-left: 20px;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.7;
}
.about-license {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 750px) {
  footer {
    flex-wrap: wrap;
    align-items: baseline;
    gap: 14px 20px;
  }
  .about-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .about-facts {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
