:root {
  --bg: #06040a;
  --bg-2: #0d0710;
  --ink: #f6ece4;
  --ink-dim: #b9a79c;
  --ink-faint: #7d6c62;
  --accent: #ff7a2f;
  --accent-2: #ffc752;
  --line: rgba(255, 150, 90, 0.16);
  --glass: rgba(18, 10, 14, 0.66);
  --glass-strong: rgba(14, 8, 11, 0.86);
  --radius: 16px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

/* Author `display` rules would otherwise beat the UA stylesheet's [hidden]. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(120% 90% at 78% 12%, rgba(120, 46, 18, 0.4) 0%, rgba(20, 8, 10, 0) 62%),
    radial-gradient(80% 70% at 8% 92%, rgba(86, 34, 96, 0.32) 0%, rgba(10, 5, 12, 0) 60%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}

.app {
  position: relative;
  width: 100%;
  height: 100%;
}

.scene {
  position: absolute;
  inset: 0;
}

.scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.62) 100%);
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------ topbar */

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  z-index: 6;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand__tag {
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}

.topbar__right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip,
.wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.chip {
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink-dim);
  backdrop-filter: blur(14px);
}

.chip[aria-pressed="true"] {
  color: var(--ink);
  border-color: rgba(255, 150, 90, 0.4);
}

.chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.chip[aria-pressed="true"] .chip__dot {
  background: var(--accent-2);
  box-shadow: 0 0 10px rgba(255, 199, 82, 0.8);
}

.wallet {
  border: 1px solid rgba(255, 160, 90, 0.32);
  background: linear-gradient(180deg, rgba(255, 138, 69, 0.22), rgba(255, 138, 69, 0.08));
  color: var(--ink);
  backdrop-filter: blur(14px);
}

.wallet__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff9a4d;
  box-shadow: 0 0 12px rgba(255, 154, 77, 0.9);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.wallet__dot[data-on="true"] {
  background: #4fe08a;
  box-shadow: 0 0 12px rgba(79, 224, 138, 0.9);
}

.wallet[data-status="connected"] {
  border-color: rgba(79, 224, 138, 0.34);
  text-transform: none;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.wallet[data-status="connecting"] {
  opacity: 0.7;
  pointer-events: none;
}

/* --------------------------------------------------------- wallet popover */

.wallet-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(300px, calc(100vw - 28px));
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6);
  z-index: 11;
  animation: wallet-pop-in 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes wallet-pop-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.wallet-pop__chain {
  margin: 0 0 10px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.wallet-pop__address {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.wallet-pop__address:hover {
  background: rgba(255, 150, 90, 0.12);
}

.wallet-pop__address.is-copied {
  border-color: rgba(79, 224, 138, 0.5);
  color: #9ff0bd;
}

.wallet-pop__address:disabled {
  cursor: default;
  font-family: var(--font);
  color: var(--ink-dim);
}

.wallet-pop__address:disabled:hover {
  background: rgba(255, 255, 255, 0.045);
}

.wallet-pop__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

/* ------------------------------------------------------ wallet picker rows */

.wallet-pop__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wallet-pop__wallet {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.wallet-pop__wallet:hover {
  background: rgba(255, 150, 90, 0.14);
  border-color: rgba(255, 160, 90, 0.34);
  transform: translateY(-1px);
}

.wallet-pop__wallet-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 650;
  color: var(--accent-2);
}

.wallet-pop__wallet-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.wallet-pop__note {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-dim);
}

.wallet-pop__installs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wallet-pop__action {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 550;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease;
}

.wallet-pop__action:hover {
  background: rgba(255, 150, 90, 0.18);
}

.wallet-pop__action--danger {
  color: #ff9d8a;
}

.wallet-pop__action--danger:hover {
  background: rgba(255, 90, 60, 0.16);
}

.chip:hover,
.wallet:hover {
  transform: translateY(-1px);
}

/* ----------------------------------------------------------------- sidebar */

.sidebar {
  position: absolute;
  top: 50%;
  left: 22px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  z-index: 6;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px 9px 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-item:hover {
  background: rgba(255, 140, 70, 0.1);
  color: var(--ink);
}

.nav-item.is-active {
  background: linear-gradient(90deg, rgba(255, 138, 69, 0.26), rgba(255, 138, 69, 0.04));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 160, 90, 0.28);
}

.nav-item__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  flex: none;
}

.nav-item__icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.nav-item__icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.nav-item__key {
  margin-left: auto;
  padding-left: 10px;
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------- hud */

.hud {
  position: absolute;
  left: 22px;
  bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  z-index: 6;
}

.hud__controls {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s ease;
}

.icon-btn:hover {
  background: rgba(255, 150, 90, 0.2);
}

.icon-btn--wide {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.find {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 6px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px);
}

.find__icon {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.6px solid var(--ink-faint);
  position: relative;
  flex: none;
}

.find__icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 6px;
  height: 1.6px;
  background: var(--ink-faint);
  transform: rotate(45deg);
}

.find__input {
  width: 128px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.find__input::placeholder {
  color: var(--ink-faint);
}

.find__go {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 150, 90, 0.2);
  color: var(--ink);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.readout {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px);
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: 0.03em;
}

.readout b {
  color: var(--ink);
  font-weight: 650;
}

.readout__sep {
  width: 1px;
  height: 14px;
  background: var(--line);
}

/* ------------------------------------------------------------------- panel */

.panel {
  position: absolute;
  right: 22px;
  top: 50%;
  width: 320px;
  transform: translateY(-50%) translateX(16px);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 7;
}

.panel.is-open {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

.panel__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.panel__close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.12);
}

.panel__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panel__badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  padding: 5px;
  flex: none;
}

.panel__eyebrow {
  margin: 0 0 4px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.panel__title {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.panel__meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.panel__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.panel__status {
  margin-top: 16px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-dim);
}

.panel__status[data-phase="ready"] {
  border-color: rgba(255, 160, 90, 0.28);
  color: var(--ink);
}

.panel__status[data-phase="confirmed"],
.panel__status[data-phase="claimed"] {
  border-color: rgba(79, 224, 138, 0.34);
  background: rgba(79, 224, 138, 0.08);
  color: #a8f0c6;
}

.panel__status[data-phase="failed"] {
  border-color: rgba(255, 110, 80, 0.34);
  background: rgba(255, 90, 60, 0.08);
  color: #ffb3a1;
}

.panel__status[data-phase="approving"],
.panel__status[data-phase="signing"],
.panel__status[data-phase="pending"],
.panel__status[data-phase="checking"] {
  border-color: rgba(255, 199, 82, 0.3);
}

.tx-link {
  display: block;
  margin-top: 6px;
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

.tx-link:hover {
  text-decoration: underline;
}

.action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.action {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.18s ease, background 0.18s ease;
}

.action:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.action--primary {
  border: 0;
  background: linear-gradient(180deg, #ff9a4d, #f2691f);
  color: #200d03;
  box-shadow: 0 12px 28px rgba(242, 105, 31, 0.32);
}

.action--ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}

.action svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}

/* ----------------------------------------------------------------- overlay */

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 2, 6, 0.78);
  backdrop-filter: blur(9px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 10;
}

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

.overlay__art {
  position: absolute;
  width: min(78vmin, 640px);
  opacity: 0.16;
  filter: blur(2px) saturate(1.2);
  pointer-events: none;
}

.overlay__card {
  position: relative;
  width: min(88vw, 460px);
  padding: 44px 36px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(24, 12, 16, 0.95), rgba(12, 6, 10, 0.95));
  text-align: center;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7);
}

.overlay__eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.overlay__title {
  margin: 0 0 12px;
  font-size: 30px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.overlay__body {
  margin: 0 0 26px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.overlay__close {
  height: 46px;
  padding: 0 26px;
  border: 1px solid rgba(255, 160, 90, 0.34);
  border-radius: 12px;
  background: rgba(255, 150, 90, 0.14);
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.overlay__close:hover {
  background: rgba(255, 150, 90, 0.24);
}

/* ------------------------------------------------------------ map labels */

.map-label {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(10, 6, 10, 0.5);
  border: 1px solid rgba(255, 160, 100, 0.14);
  backdrop-filter: blur(6px);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 4;
}

.map-label__name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 226, 205, 0.92);
}

.map-label__kind {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 170, 120, 0.6);
}

/* ------------------------------------------------------------------ toast */

.toast {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 14px);
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  font-size: 12.5px;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 12;
}

.toast.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------------- docs */

.docs {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 2, 6, 0.82);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 11;
}

.docs.is-open {
  opacity: 1;
  pointer-events: auto;
}

.docs__shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  width: min(1080px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 64px));
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 12, 14, 0.97), rgba(10, 6, 9, 0.97));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.docs__side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 20px;
  border-right: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.docs__logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: contain;
  padding: 4px;
  background: rgba(0, 0, 0, 0.35);
}

.docs__eyebrow {
  margin: 2px 0 8px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.docs__toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs__link {
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-dim);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.docs__link:hover {
  background: rgba(255, 140, 70, 0.12);
  color: var(--ink);
}

.docs__back {
  margin-top: auto;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
}

.docs__back:hover {
  background: rgba(255, 150, 90, 0.18);
}

.docs__body {
  padding: 34px 40px 44px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.docs__header h1 {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.docs__header p {
  margin: 0 0 28px;
  color: var(--ink-dim);
  font-size: 14px;
}

.docs__section {
  margin-bottom: 40px;
  scroll-margin-top: 12px;
}

.docs__section h2 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  font-weight: 640;
}

.docs__h3 {
  margin: 22px 0 8px;
  font-size: 14px;
  font-weight: 640;
  letter-spacing: 0.02em;
  color: var(--accent-2);
}

.docs__body p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink-dim);
}

.docs__body ol,
.docs__body ul {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink-dim);
}

.docs__body li {
  margin-bottom: 5px;
}

.docs__table {
  width: 100%;
  margin: 6px 0 18px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.docs__table th,
.docs__table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 150, 90, 0.12);
  text-align: left;
  vertical-align: top;
}

.docs__table thead th {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

.docs__table tbody th {
  width: 38%;
  font-weight: 550;
  color: var(--ink);
}

.docs__table tbody td {
  color: var(--ink-dim);
}

.docs__contracts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 18px;
}

.docs__contract {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.docs__contract-label {
  width: 96px;
  flex: none;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.docs__contract-address {
  flex: 1 1 260px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.docs__contract-address.is-empty {
  font-family: var(--font);
  font-style: italic;
  color: var(--ink-faint);
}

.docs__contract-link {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-2);
  text-decoration: none;
}

.docs__contract-link:hover {
  text-decoration: underline;
}

.docs__note {
  margin: 4px 0 16px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 199, 82, 0.26);
  background: rgba(255, 199, 82, 0.07);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
}

@media (max-width: 900px) {
  .docs__shell {
    grid-template-columns: 1fr;
    width: calc(100vw - 24px);
    height: calc(100vh - 32px);
  }

  .docs__side {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }

  .docs__logo,
  .docs__eyebrow {
    display: none;
  }

  .docs__toc {
    flex-direction: row;
  }

  .docs__back {
    margin-top: 0;
    white-space: nowrap;
  }

  .docs__body {
    padding: 22px 20px 32px;
  }
}

/* ------------------------------------------------------------------ vault */

.vault {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 2, 6, 0.82);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 11;
}

.vault.is-open {
  opacity: 1;
  pointer-events: auto;
}

.vault__shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(920px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 64px));
  padding: 30px 34px 28px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 12, 14, 0.97), rgba(10, 6, 9, 0.97));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  overflow-y: auto;
}

/* Decorative art. Both images are opaque, so they are blended rather than
   placed directly — screen makes their black areas disappear. */
.vault__art {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  mix-blend-mode: screen;
}

.vault__art--glow {
  top: -150px;
  right: -130px;
  width: 430px;
  opacity: 0.45;
  filter: saturate(1.15) blur(1px);
}

.vault__badge {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  padding: 5px;
  object-fit: contain;
}

.vault__head,
.vault__progress,
.vault__grid,
.vault__action {
  position: relative;
  z-index: 1;
}

.vault__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.vault__headline {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vault__progress {
  margin-bottom: 20px;
}

.vault__progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.vault__progress-head span:last-child {
  font-size: 12.5px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.vault__progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.vault__progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7a2f, #ffc752);
  box-shadow: 0 0 14px rgba(255, 140, 70, 0.55);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.vault__title {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.vault__sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.vault__head-actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.vault__btn {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s ease;
}

.vault__btn:hover {
  background: rgba(255, 150, 90, 0.18);
}

.vault__btn--ghost {
  background: transparent;
  color: var(--ink-dim);
}

.vault__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.vault__card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.vault__card-label {
  margin: 0 0 8px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.vault__card-value {
  margin: 0;
  font-size: 21px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.vault__card-unit {
  margin-left: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-faint);
}

.vault__card-note {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-faint);
}

.vault__card--accent {
  border-color: rgba(255, 160, 90, 0.3);
  background: rgba(255, 150, 90, 0.08);
}

.vault__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 160, 90, 0.26);
  border-radius: 16px;
  background: rgba(255, 150, 90, 0.06);
}

.vault__action-label {
  margin: 0 0 4px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.vault__action-value {
  margin: 0;
  font-size: 26px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.vault__action-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink-dim);
}

.vault__claim {
  flex: none;
  height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff9a4d, #f2691f);
  color: #200d03;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(242, 105, 31, 0.28);
  transition: transform 0.15s ease, filter 0.18s ease;
}

.vault__claim:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.vault__claim:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.vault__empty {
  grid-column: 1 / -1;
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  text-align: center;
  color: var(--ink-dim);
  font-size: 13.5px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .vault__shell {
    width: calc(100vw - 24px);
    padding: 22px 20px;
  }

  .vault__head {
    flex-direction: column;
  }

  .vault__action {
    flex-direction: column;
    align-items: stretch;
  }
}

.debug {
  position: absolute;
  right: 22px;
  bottom: 22px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 6, 10, 0.7);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  z-index: 9;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .panel {
    width: 290px;
  }
}

@media (max-width: 900px) {
  .brand__tag {
    display: none;
  }

  .sidebar {
    top: auto;
    bottom: 86px;
    left: 12px;
    right: 12px;
    transform: none;
    flex-direction: row;
    overflow-x: auto;
    border-radius: 18px;
    padding: 8px;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    padding: 8px 12px 8px 8px;
  }

  .nav-item__key {
    display: none;
  }

  .hud {
    left: 12px;
    right: 12px;
    bottom: 14px;
    gap: 8px;
  }

  .find {
    flex: 1 1 160px;
  }

  .find__input {
    width: 100%;
  }

  .readout {
    display: none;
  }

  .panel {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 150px;
    width: auto;
    transform: translateY(14px);
    max-height: 52vh;
    overflow-y: auto;
  }

  .panel.is-open {
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .topbar {
    padding: 12px 14px;
  }

  .wallet {
    height: 36px;
    padding: 0 12px;
    font-size: 11px;
  }

  .chip {
    height: 36px;
    padding: 0 12px;
    font-size: 11px;
  }

  .brand__logo {
    width: 34px;
    height: 34px;
  }
}
