:root {
  color-scheme: dark;
  --app-bg: #0b0e0f;
  --surface: #151a1b;
  --surface-2: #1d2425;
  --surface-3: #222a2b;
  --text: #f5f7f2;
  --muted: #9ca6a2;
  --quiet: #89938f;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: #d4fc50;
  --accent-hover: #c4ef3c;
  --accent-ink: #10120c;
  --danger: #ff655e;
  --danger-soft: #2a1818;
  --success: #84d99a;
  --warning: #ffcf72;
  --top-safe: env(safe-area-inset-top, 0px);
  --right-safe: env(safe-area-inset-right, 0px);
  --bottom-safe: env(safe-area-inset-bottom, 0px);
  --left-safe: env(safe-area-inset-left, 0px);
  --visual-height: 100dvh;
  --visual-top: 0px;
  --header-h: 64px;
  --nav-h: 74px;
  --page-pad: 16px;
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-width: 300px;
  min-height: 100%;
  overflow: hidden;
  background: #050707;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: pan-x pan-y;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body {
  min-width: 300px;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #050707;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.sheet-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: default;
  opacity: 0.42;
}

input,
textarea,
[contenteditable] {
  font-size: 16px;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

.copy-buffer {
  position: fixed;
  top: -1000px;
  left: -1000px;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(212, 252, 80, 0.34);
  outline-offset: 2px;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  pointer-events: none;
  -webkit-user-drag: none;
  user-drag: none;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  position: fixed;
  z-index: 1;
  top: var(--visual-top);
  left: 50%;
  width: min(100%, 520px);
  height: var(--visual-height);
  min-height: 0;
  overflow: hidden;
  transform: translateX(-50%);
  background: var(--app-bg);
  border-inline: 1px solid rgba(255, 255, 255, 0.04);
}

.topbar {
  position: absolute;
  z-index: 30;
  inset: 0 0 auto;
  padding-top: var(--top-safe);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 14, 15, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2);
}

.topbar-row {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 62px;
  padding: 0 max(var(--page-pad), var(--right-safe)) 0 max(var(--page-pad), var(--left-safe));
}

.topbar-spacer {
  flex: 1 1 auto;
}

.brand-button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: transparent;
  text-align: left;
}

.brand-button img {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1;
}

.brand-copy strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.network-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  min-width: 44px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.chain-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 0;
  object-fit: contain;
}

.connect-button {
  min-width: 76px;
  max-width: 104px;
  height: 44px;
  padding: 0 13px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connect-button:active,
.icon-button:active,
.chip:active,
.secondary-button:active,
.nav-button:active {
  transform: scale(0.97);
}

.connect-button.connected {
  border-color: rgba(212, 252, 80, 0.32);
  background: rgba(212, 252, 80, 0.08);
  color: var(--accent);
}

.truth-strip {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 max(var(--page-pad), var(--right-safe)) 1px max(var(--page-pad), var(--left-safe));
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--quiet);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.truth-strip button {
  min-height: 44px;
  padding: 0 3px;
  background: transparent;
  color: var(--muted);
  font-size: inherit;
  font-weight: inherit;
}

.main-viewport {
  position: absolute;
  inset: calc(var(--header-h) + var(--top-safe)) 0 calc(var(--nav-h) + var(--bottom-safe)) 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.main-viewport::-webkit-scrollbar,
.chip-scroller::-webkit-scrollbar,
.segmented-scroller::-webkit-scrollbar {
  display: none;
}

.screen {
  width: 100%;
  min-height: 100%;
  padding: 24px max(var(--page-pad), var(--right-safe)) 34px max(var(--page-pad), var(--left-safe));
}

.page-heading {
  margin-bottom: 20px;
}

.page-kicker,
.eyebrow,
.section-kicker,
.sheet-kicker,
.field-label,
.reference-label {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 5px 0 7px;
  color: var(--text);
  font-size: clamp(31px, 10vw, 44px);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.page-heading p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 12px;
}

.section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.section-head p {
  margin: 0;
  color: var(--quiet);
  font-size: 11px;
}

.search-trigger,
.field-control,
.amount-field,
.url-control {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  text-align: left;
}

.search-trigger svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--muted);
}

.search-trigger span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-stack {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.chip-scroller,
.segmented-scroller {
  display: flex;
  gap: 8px;
  margin-inline: calc(-1 * var(--page-pad));
  padding-inline: var(--page-pad);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-padding-inline: var(--page-pad);
}

.chip {
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.chip.active {
  border-color: var(--accent);
  background: rgba(212, 252, 80, 0.08);
  color: var(--accent);
}

.chip.compact {
  min-height: 40px;
  padding-inline: 13px;
}

.market-empty,
.empty-panel,
.notice-card,
.wallet-empty,
.analytics-card,
.summary-card,
.reference-card,
.token-row,
.detail-market,
.amount-panel,
.overview-card,
.draft-note,
.profile-card {
  border: 1px solid var(--line);
  background: var(--surface);
}

.market-empty,
.empty-panel,
.wallet-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  margin-top: 18px;
  padding: 28px 22px;
  border-radius: var(--radius-xl);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
}

.empty-icon svg {
  width: 27px;
  height: 27px;
}

.market-empty h2,
.empty-panel h2,
.wallet-empty h2 {
  max-width: 290px;
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.market-empty p,
.empty-panel p,
.wallet-empty p {
  max-width: 310px;
  margin: 9px 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.primary-button,
.secondary-button,
.danger-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 750;
}

.primary-button svg,
.secondary-button svg,
.danger-button svg,
.text-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.primary-button:active {
  background: var(--accent-hover);
  transform: scale(0.985);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
}

.danger-button {
  border: 1px solid rgba(255, 101, 94, 0.35);
  background: var(--danger-soft);
  color: var(--danger);
}

.text-button {
  padding-inline: 10px;
  background: transparent;
  color: var(--muted);
}

.full-width {
  width: 100%;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reference-section {
  margin-top: 26px;
}

.reference-label {
  margin: 0 0 9px 3px;
}

.reference-card,
.token-row {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 78px;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  overflow: hidden;
  border-radius: var(--radius-md);
  text-align: left;
}

.reference-card:active,
.token-row:active {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.token-artwork,
.token-monogram {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--app-bg);
  object-fit: cover;
}

.token-artwork.original {
  object-fit: contain;
}

.token-monogram {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
}

.token-copy {
  display: grid;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  gap: 4px;
}

.token-name-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.token-name-line strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-name-line span {
  min-width: 0;
  max-width: 42%;
  overflow: hidden;
  flex: 0 1 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-address {
  overflow: hidden;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-right {
  display: grid;
  width: clamp(76px, 25vw, 102px);
  min-width: 0;
  max-width: 102px;
  overflow: hidden;
  flex: 0 1 auto;
  margin-left: auto;
  gap: 4px;
  text-align: right;
}

.token-right strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-right span {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-action-note {
  flex: 0 0 auto;
  max-width: 78px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}

.change-positive { color: var(--success) !important; }
.change-negative { color: var(--danger) !important; }

.token-chevron {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-left: 3px;
  color: var(--muted);
}

.token-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.list-status {
  margin: 12px 2px 0;
  color: var(--quiet);
  font-size: 11px;
}

.bottom-nav {
  position: absolute;
  z-index: 25;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: calc(var(--nav-h) + var(--bottom-safe));
  padding: 7px max(6px, var(--right-safe)) var(--bottom-safe) max(6px, var(--left-safe));
  border-top: 1px solid var(--line);
  background: rgba(11, 14, 15, 0.96);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 58px;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 3px 2px;
  border-radius: 14px;
  background: transparent;
  color: var(--quiet);
}

.nav-button svg {
  width: 22px;
  height: 22px;
}

.nav-button span {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-button.active {
  color: var(--accent);
}

.nav-button.active::before {
  position: absolute;
  top: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
}

.app-shell.keyboard-open .bottom-nav {
  pointer-events: none;
  opacity: 0;
  transform: translateY(110%);
}

.app-shell.keyboard-open .main-viewport {
  bottom: 0;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -5px 0 18px;
}

.detail-identity {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
}

.detail-identity .token-artwork,
.detail-identity .token-monogram {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.detail-identity-copy {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  gap: 2px;
}

.detail-identity-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-identity-copy span {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-chain {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  margin: 0 0 13px 54px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.detail-market {
  padding: 20px 14px 14px;
  border-radius: var(--radius-xl);
}

.market-state-copy {
  text-align: center;
}

.market-state-copy h1 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.market-state-copy p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.market-state-copy .secondary-button {
  min-width: 132px;
  margin: 14px auto 0;
}

.live-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.live-metric {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--app-bg);
}

.live-metric span {
  display: block;
  color: var(--quiet);
  font-size: 11px;
}

.live-metric strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-empty {
  position: relative;
  height: 150px;
  margin-top: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--app-bg);
}

.chart-grid {
  position: absolute;
  inset: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.chart-grid span {
  border-right: 1px solid rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.chart-grid span:nth-child(4n) { border-right: 0; }
.chart-grid span:nth-last-child(-n + 4) { border-bottom: 0; }

.chart-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--quiet);
  font-size: 11px;
  text-align: center;
}

.chart-line {
  position: absolute;
  inset: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  color: var(--accent);
  opacity: 0.85;
}

.chart-line path {
  vector-effect: non-scaling-stroke;
}

.trade-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.trade-panel > .notice-card {
  margin-top: 0;
}

.trade-check,
.trade-followup {
  margin-top: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.segment-button {
  min-width: 0;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.segment-button.active {
  background: rgba(212, 252, 80, 0.1);
  color: var(--accent);
}

.order-type-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.order-type-button {
  min-height: 44px;
  flex: 1 1 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.order-type-button.active {
  border-color: rgba(212, 252, 80, 0.4);
  color: var(--text);
}

.amount-panel {
  margin-top: 10px;
  padding: 14px;
  border-radius: var(--radius-lg);
}

.amount-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.amount-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.amount-input-row input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 31px;
  font-weight: 620;
  letter-spacing: -0.035em;
}

.amount-input-row input::placeholder {
  color: var(--quiet);
}

.asset-pill {
  display: inline-flex;
  min-width: 76px;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--app-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
}

.asset-icon,
.asset-pill .token-artwork,
.asset-pill .token-monogram {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.asset-icon {
  border-radius: 0;
  object-fit: contain;
}

.asset-pill .token-artwork,
.asset-pill .token-monogram {
  border-radius: 50%;
  object-fit: cover;
}

.asset-pill .token-monogram {
  display: grid;
  place-items: center;
  font-size: 8px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 11px;
}

.quick-button {
  min-width: 0;
  min-height: 44px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--app-bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.detail-row-button,
.summary-row,
.network-row,
.about-link,
.profile-row {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.detail-row-button {
  margin-top: 9px;
  padding-inline: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.detail-row-button strong,
.summary-row strong,
.network-row strong,
.profile-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-row-button svg,
.about-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.trade-cta {
  width: 100%;
  min-height: 54px;
  margin-top: 11px;
  border-radius: 16px;
}

.custody-note {
  margin: 10px 14px 0;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.overview-card {
  margin-top: 12px;
  padding: 2px 14px;
  border-radius: var(--radius-lg);
}

.summary-row:last-child,
.network-row:last-child,
.profile-row:last-child {
  border-bottom: 0;
}

.summary-row span,
.network-row span,
.profile-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.summary-row strong.mono,
.network-row strong.mono,
.profile-row strong.mono {
  font-family: var(--mono);
  font-size: 11px;
}

.summary-row > span:first-child {
  min-width: 76px;
  flex: 0 0 auto;
}

.summary-row > strong:last-child {
  flex: 1 1 auto;
  text-align: right;
}

.analytics-controls {
  margin-top: -2px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.analytics-card {
  min-width: 0;
  min-height: 116px;
  padding: 15px;
  border-radius: var(--radius-lg);
}

.analytics-card.wide {
  grid-column: 1 / -1;
}

.analytics-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.analytics-card strong {
  display: block;
  margin-top: 18px;
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-card small {
  display: block;
  margin-top: 6px;
  color: var(--quiet);
  font-size: 11px;
}

.analytics-empty {
  margin-top: 14px;
}

.create-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.create-heading-copy {
  min-width: 0;
}

.create-heading-copy h1 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 720;
  letter-spacing: -0.04em;
}

.create-heading-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.progress-head strong {
  color: var(--text);
  font-size: 13px;
}

.progress-head span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.progress-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 24px;
}

.progress-track span {
  height: 3px;
  border-radius: 3px;
  background: var(--surface-3);
}

.progress-track span.complete,
.progress-track span.active {
  background: var(--accent);
}

.form-stack {
  display: grid;
  gap: 16px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-spaced-sm {
  margin-top: 10px;
}

.field-spaced {
  margin-top: 16px;
}

.field-label {
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.field-label span {
  color: var(--quiet);
  font-weight: 500;
}

.field-control,
.url-control {
  height: 54px;
  padding: 0 14px;
  outline: 0;
}

textarea.field-control {
  min-height: 116px;
  padding-block: 14px;
  resize: none;
  line-height: 1.45;
}

.field-control::placeholder,
.url-control::placeholder {
  color: var(--quiet);
  opacity: 1;
}

.field-control:focus,
.url-control:focus {
  border-color: rgba(212, 252, 80, 0.55);
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
  color: var(--quiet);
  font-size: 11px;
}

.upload-button {
  display: grid;
  width: 100%;
  min-height: 134px;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.upload-button svg {
  width: 30px;
  height: 30px;
  margin: 0 auto 10px;
}

.upload-button strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.upload-button small {
  display: block;
  margin-top: 5px;
  color: var(--quiet);
  font-size: 11px;
}

.upload-button.has-image {
  border-style: solid;
  border-color: rgba(212, 252, 80, 0.4);
}

.draft-note,
.notice-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 17px;
  padding: 14px;
  border-radius: var(--radius-md);
}

.draft-note svg,
.notice-card svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  color: var(--accent);
}

.draft-note strong,
.notice-card strong {
  display: block;
  color: var(--text);
  font-size: 12px;
}

.draft-note p,
.notice-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.create-actions {
  position: sticky;
  z-index: 4;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(86px, 0.7fr) minmax(0, 1.3fr);
  gap: 9px;
  margin: 24px calc(-1 * var(--page-pad)) 0;
  padding: 13px var(--page-pad);
  border-top: 1px solid var(--line);
  background: rgba(11, 14, 15, 0.96);
}

.review-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.review-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  min-height: 52px;
  align-items: center;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
}

.review-row:last-child { border-bottom: 0; }

.review-row span {
  color: var(--muted);
  font-size: 11px;
}

.review-row strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  text-align: right;
}

.profile-card {
  overflow: hidden;
  padding: 4px 14px;
  border-radius: var(--radius-lg);
}

.profile-address {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(212, 252, 80, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(212, 252, 80, 0.055);
}

.address-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(212, 252, 80, 0.35);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}

.profile-address-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.profile-address-copy span {
  color: var(--muted);
  font-size: 11px;
}

.profile-address-copy strong {
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-section {
  margin-top: 18px;
}

.profile-manage {
  margin-top: 20px;
}

.profile-section .section-head {
  margin-top: 0;
}

.tiny-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 11px;
}

.sheet-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: max(16px, var(--top-safe));
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  width: min(100%, 520px);
  max-height: min(82vh, calc(var(--visual-height) - max(22px, var(--top-safe))));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: var(--surface-2);
  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.45);
  transform: translateY(105%);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet-overlay.open .sheet {
  transform: translateY(0);
}

.sheet-grabber {
  width: 38px;
  height: 4px;
  margin: 9px auto 3px;
  border-radius: 4px;
  background: var(--line-strong);
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px max(var(--page-pad), var(--right-safe)) 13px max(var(--page-pad), var(--left-safe));
  border-bottom: 1px solid var(--line);
}

.sheet-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.sheet-heading h2 {
  overflow-wrap: anywhere;
  margin: 5px 0 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.sheet-heading p {
  overflow-wrap: anywhere;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.sheet-close {
  background: var(--app-bg);
}

.sheet-body {
  max-height: calc(min(82vh, var(--visual-height)) - 118px);
  padding: 15px max(var(--page-pad), var(--right-safe)) calc(18px + var(--bottom-safe)) max(var(--page-pad), var(--left-safe));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.upload-preview {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--app-bg);
  object-fit: cover;
  margin: 0 auto 10px;
}

.sheet-actions {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.sheet-actions.two {
  grid-template-columns: 1fr 1fr;
}

.waiting-mark {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: 4px auto 16px;
  border: 1px solid rgba(212, 252, 80, 0.32);
  border-radius: 18px;
  background: rgba(212, 252, 80, 0.06);
  color: var(--accent);
}

.waiting-mark svg {
  width: 27px;
  height: 27px;
}

.waiting-pulse {
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(212, 252, 80, 0.2);
  border-radius: 22px;
  animation: waiting-pulse 1.8s ease-in-out infinite;
}

@keyframes waiting-pulse {
  0%, 100% { opacity: 0.2; transform: scale(0.94); }
  50% { opacity: 0.8; transform: scale(1); }
}

.waiting-copy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.slippage-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.slippage-preset {
  min-width: 0;
  min-height: 44px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--app-bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.slippage-preset.active {
  border-color: var(--accent);
  color: var(--accent);
}

.slippage-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.slippage-custom input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: 0;
  background: var(--app-bg);
  color: var(--text);
}

.slippage-custom span {
  color: var(--muted);
  font-size: 15px;
}

.about-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--app-bg);
}

.about-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.about-brand strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.about-brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.about-links {
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--app-bg);
}

.about-link {
  min-height: 52px;
  padding: 0 13px;
}

.about-link:last-child { border-bottom: 0; }

.about-link span {
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.risk-copy {
  margin-top: 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.search-sheet-input {
  position: relative;
}

.search-sheet-input svg {
  position: absolute;
  top: 17px;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
}

.search-sheet-input input {
  width: 100%;
  height: 54px;
  padding: 0 14px 0 43px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  outline: 0;
  background: var(--app-bg);
  color: var(--text);
}

.search-results {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.search-hint {
  margin: 20px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 14px;
  bottom: calc(var(--nav-h) + var(--bottom-safe) + 12px);
  left: 14px;
  width: fit-content;
  max-width: calc(100% - 28px);
  min-height: 42px;
  margin-inline: auto;
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #202728;
  color: var(--text);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

body[data-view="create"] .toast {
  bottom: calc(var(--nav-h) + var(--bottom-safe) + 112px);
}

body[data-view="create"].keyboard-open .toast {
  bottom: calc(var(--bottom-safe) + 92px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.noscript {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  background: var(--app-bg);
  color: var(--text);
  text-align: center;
}

@media (max-width: 374px) {
  :root {
    --page-pad: 14px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-button {
    gap: 6px;
  }

  .brand-button img {
    width: 31px;
    height: 31px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .network-pill {
    gap: 4px;
    padding-inline: 8px;
  }

  .connect-button {
    min-width: 70px;
    padding-inline: 10px;
  }

  .truth-strip {
    font-size: 11px;
  }

  .screen {
    padding-top: 20px;
  }

  .market-empty,
  .empty-panel,
  .wallet-empty {
    min-height: 244px;
    padding: 24px 16px;
  }

  .market-empty h2,
  .empty-panel h2,
  .wallet-empty h2 {
    font-size: 18px;
  }

  .detail-chain {
    margin-left: 0;
  }

  .amount-panel {
    padding: 12px;
  }

  .amount-input-row input {
    font-size: 28px;
  }

  .review-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }
}

@media (min-width: 480px) {
  .screen {
    padding-inline: 22px;
  }

  .chip-scroller,
  .segmented-scroller {
    margin-inline: -22px;
    padding-inline: 22px;
  }

  .create-actions {
    margin-inline: -22px;
    padding-inline: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .nav-button.active::before,
  .progress-track span.complete,
  .progress-track span.active {
    background: Highlight;
  }
}
