/* =========================================================================
   VALTERRA design system
   ~72% navy · ~20% white/cool-grey · ~8% gold
   Metallic edge lighting · pill controls · restrained patterns
   ========================================================================= */

:root {
  /* PAGE */
  --bg-page: #060b0f;
  --bg-deep: #060b0f;
  --bg-page-deep: var(--bg-deep);

  /* SURFACES */
  --surface-01: #0b1015;
  --surface-02: #0e151c;
  --surface-03: #1e232b;
  --surface-04: #1e232b;
  --surface-glass: linear-gradient(
    180deg,
    rgba(14, 21, 28, 0.96) 0%,
    rgba(11, 16, 21, 0.97) 100%
  );

  /* Card fills (DS §6) — opaque so they don’t muddy over page bg */
  --bg-card: linear-gradient(var(--vt-panel), var(--vt-panel));
  --bg-card-premium: linear-gradient(var(--vt-panel), var(--vt-panel));
  --bg-card-membership: linear-gradient(var(--vt-panel), var(--vt-panel));
  --bg-card-flat: var(--surface-02);
  --card-fill-top: #0b1015;
  --card-fill-bottom: #0b1015;
  --card-fill: #0b1015;
  --card-padding-small: 16px;
  --card-padding-standard: 20px;
  --card-padding-hero: 24px;

  /* Metallic strokes (DS §6) — used via background-clip (mask unreliable) */
  --stroke-standard: linear-gradient(var(--vt-border), var(--vt-border));
  --stroke-premium: linear-gradient(var(--vt-border), var(--vt-border));

  /* VALTERRA BRAND TOKENS (Brand Guidelines: Web, Platform and Design) */
  --vt-gold: #c3a05c;
  --vt-gold-light: #e3cb94;
  --vt-gold-dark: #7e6232;
  --vt-gold-gradient: linear-gradient(100deg, #8a6f3e 0%, #c3a05c 30%, #e3cb94 50%, #b89251 70%, #8a795b 100%);
  --vt-midnight: #060b0f;
  --vt-panel: #0b1015;
  --vt-panel-raised: #0e151c;
  --vt-charcoal: #1e232b;
  --vt-ivory: #f5f3ee;
  --vt-stone: #c9c2b5;
  --vt-muted: #9a9384;
  --vt-border: rgba(195, 160, 92, 0.25);
  --vt-divider: rgba(201, 194, 181, 0.12);
  --vt-track-eyebrow: 0.3em;
  --vt-track-button: 0.12em;
  --vt-tap: 44px;
  --vt-motion: 200ms ease-out;

  /* GOLD */
  --gold-50: #f5f3ee;
  --gold-100: #e3cb94;
  --gold-200: #e3cb94;
  --gold-300: #e3cb94;
  --gold-400: #c3a05c;
  --gold-500: #c3a05c;
  --gold-600: #7e6232;
  --gold-soft: rgba(195, 160, 92, 0.14);
  --gold-line-soft: rgba(195, 160, 92, 0.26);
  --gold-line: rgba(195, 160, 92, 0.46);
  --gold-line-strong: rgba(227, 203, 148, 0.68);
  --gold-border: var(--gold-line);
  --gold-border-strong: var(--gold-line-strong);

  /* TEXT */
  --text-primary: #f5f3ee;
  --text-secondary: #c9c2b5;
  --text-tertiary: #9a9384;
  --text-muted: #9a9384;
  --text-disabled: #9a9384;
  --text-dark: #060b0f;
  --text-editorial: #f5f3ee;

  /* LINE / BORDER */
  --line-subtle: rgba(201, 194, 181, 0.26);
  --line-medium: rgba(201, 194, 181, 0.42);
  --line-strong: rgba(201, 194, 181, 0.52);
  --border-subtle: var(--line-subtle);
  --border-medium: var(--line-medium);
  --border-bright: var(--line-strong);
  --border-gold: var(--gold-line);

  /* SEMANTIC */
  --success: #6e9e74;
  --success-soft: rgba(110, 158, 116, 0.14);
  --danger: #c0574a;
  --danger-soft: rgba(192, 87, 74, 0.15);
  --neutral: #9a9384;
  --neutral-soft: rgba(154, 147, 132, 0.14);
  --warning: #c9a045;

  /* Typography */
  --font-ui: "Montserrat", Arial, sans-serif;
  --font-editorial: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-display: var(--font-editorial);
  --font-mono: "Montserrat", Arial, sans-serif;
  --font-body: var(--font-ui);
  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 6px;
  --radius-md: 6px;
  --radius-lg: 6px;
  --radius-xl: 6px;
  --radius-2xl: 6px;
  --radius-pill: 6px;
  --r-card: 6px;
  --r-input: 6px;
  --r-btn: var(--radius-pill);
  --r-pill: var(--radius-pill);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --s-1: var(--space-1);
  --s-2: var(--space-2);
  --s-3: var(--space-3);
  --s-4: var(--space-4);
  --s-5: var(--space-5);
  --s-6: var(--space-6);
  --s-7: var(--space-7);

  --button-sm: 40px;
  --button-md: 46px;
  --button-lg: 52px;
  --button-xl: 56px;
  --ease-premium: cubic-bezier(0.22, 0.8, 0.3, 1);

  /* Compat aliases */
  --bg-app: var(--bg-page);
  --bg-surface-1: var(--surface-01);
  --bg-surface-2: var(--surface-02);
  --bg-surface-3: var(--surface-03);
  --bg-base: var(--bg-page);
  --bg-elev: var(--surface-03);
  --bg-elev-2: var(--surface-04);
  --gold-700: var(--gold-600);
  --success-bg: var(--success-soft);
  --danger-bg: var(--danger-soft);
  --neutral-bg: var(--neutral-soft);

  --p-900: var(--bg-deep);
  --p-800: var(--bg-page);
  --p-700: var(--surface-01);
  --p-600: var(--surface-02);
  --p-500: var(--surface-03);
  --p-400: #1e232b;
  --p-300: var(--text-tertiary);
  --p-200: var(--text-secondary);
  --p-100: #f5f3ee;

  --s-900: var(--bg-page);
  --s-800: var(--surface-01);
  --s-700: var(--surface-02);
  --s-600: var(--surface-03);
  --s-500: var(--text-tertiary);
  --s-400: var(--text-secondary);
  --s-300: #c9c2b5;
  --s-200: #c9c2b5;
  --s-100: #f5f3ee;

  --n-900: var(--bg-deep);
  --n-800: var(--bg-page);
  --n-700: var(--surface-01);
  --n-600: var(--surface-02);
  --n-500: #1e232b;
  --n-400: var(--text-tertiary);
  --n-300: var(--text-secondary);
  --n-200: #c9c2b5;
  --n-100: #f5f3ee;
  --n-50: #f5f3ee;
  --n-30: #f5f3ee;
  --n-0: #ffffff;

  --a-900: var(--gold-600);
  --a-700: var(--gold-500);
  --a-500: var(--gold-400);
  --a-400: var(--gold-400);
  --a-300: var(--gold-300);
  --a-200: var(--gold-200);
  --a-100: var(--gold-100);

  --r-100: #c0574a;
  --r-80: var(--danger);
  --r-20: #c0574a;
  --r-10: #f5f3ee;
  --w-100: #c9a045;
  --w-80: var(--warning);
  --w-20: #c9a045;
  --w-10: #f5f3ee;
  --g-100: #6e9e74;
  --g-80: var(--success);
  --g-20: #6e9e74;
  --g-10: #f5f3ee;
  --b-100: var(--bg-page);
  --b-80: var(--surface-03);
  --b-20: #c9c2b5;
  --b-10: #f5f3ee;

  --surface-light: #f5f3ee;
  --glass: rgba(245, 243, 238, 0.04);
  --glass-2: rgba(245, 243, 238, 0.08);
  --glass-blur: blur(20px) saturate(140%);
  --glass-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
  --card-navy: var(--card-fill);
  --card-navy-2: var(--surface-03);
  --card-border: var(--line-subtle);
  --grad-app:
    radial-gradient(circle at 82% -8%, rgba(195, 160, 92, 0.055) 0%, rgba(195, 160, 92, 0.018) 24%, transparent 46%),
    radial-gradient(circle at 5% 45%, rgba(195, 160, 92, 0.08), transparent 38%),
    linear-gradient(180deg, #060b0f 0%, #060b0f 48%, #060b0f 100%);
  --grad-connect: linear-gradient(165deg, var(--surface-04), var(--surface-01));
  --grad-drop: linear-gradient(150deg, var(--surface-04), var(--surface-01));
  --grad-role: var(--bg-card);
  --grad-proto: var(--bg-card);
  --grad-asset: var(--bg-card-premium);
  --grad-surface-card: var(--bg-card);
  --surface: rgba(255, 255, 255, 0.018);
  --surface-2: rgba(255, 255, 255, 0.04);
  --border: var(--line-subtle);
  --border-strong: var(--line-medium);
  --border-teal: var(--line-medium);

  --fg: var(--text-primary);
  --fg-2: var(--text-secondary);
  --fg-muted: var(--text-tertiary);

  --asset: var(--gold-400);
  --asset-hi: var(--gold-300);
  --asset-soft: var(--gold-soft);
  --asset-line: var(--gold-line);
  --ink-on-gold: var(--text-dark);

  --proto: var(--text-secondary);
  --proto-hi: #c9c2b5;
  --proto-soft: rgba(201, 194, 181, 0.18);
  --proto-line: var(--line-medium);

  --ok: var(--success);
  --ok-soft: var(--success-soft);
  --warn: var(--warning);
  --bad: var(--danger);
  --bad-soft: var(--danger-soft);

  --vote-for: var(--success);
  --vote-against: var(--danger);
  --vote-neutral: var(--neutral);
  --vote-for-muted: #c9c2b5;
  --vote-against-muted: #9a9384;

  --ease: var(--ease-premium);
  --dur: 160ms;
  --icon-default: #c9c2b5;
  --nav-inactive: #9a9384;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg-page-deep);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
}

.ico {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico--xs { width: 14px; height: 14px; stroke-width: 2; }
.ico--sm { width: 18px; height: 18px; }
.ico--lg { width: 34px; height: 34px; stroke-width: 1.4; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.heading-editorial {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.u-asset { color: var(--asset-hi); }
.u-proto { color: var(--proto-hi); }
.u-ok { color: var(--ok); }
.is-hidden { display: none !important; }

.lbl {
  display: block;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* Product UI defaults to sans; serif reserved via .type-display */
h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 20px; line-height: 1.25; }
h3 { font-size: 16px; line-height: 1.3; }

.type-display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.text-page-title {
  font-family: var(--font-ui);
  font-size: 30px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.text-editorial-title {
  font-family: var(--font-editorial);
  font-size: 30px;
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--text-editorial);
}
.text-card-title {
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 650;
}
.text-body {
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
}
.text-label {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.text-meta {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
}
.text-balance {
  font-size: 40px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.whisky-title {
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1.08;
  font-weight: 500;
  color: #f5f3ee;
}
.balance-value {
  font-family: var(--font-ui);
  font-size: clamp(38px, 9vw, 48px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}
.balance-value.loyal { color: var(--gold-300); }

.divider {
  height: 1px;
  border: 0;
  background: #232629;
}
.divider-gold {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(195, 160, 92, 0.44), transparent);
}

/* =========================== stage / device =========================== */

.stage {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

.view-switcher { display: none; }

.device {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: hidden;
}

.device__notch { display: none; }

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
  overflow-x: hidden;
  border-radius: 0;
  color: var(--text-primary);
  background: var(--grad-app);
}
/* Subtle gold dotted texture — never pure black */
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(195, 160, 92, 0.18) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at 100% 10%, black 0%, transparent 40%);
  -webkit-mask-image: radial-gradient(circle at 100% 10%, black 0%, transparent 40%);
  opacity: 0.05;
  pointer-events: none;
}
.app::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("assets/pattern-circuit.svg") 108% -4% / 320px no-repeat;
  opacity: 0.04;
  pointer-events: none;
}
.app > * { position: relative; z-index: 1; }

/* =============================== topbar =============================== */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 92px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--space-5) 12px;
  border-bottom: 1px solid #232629;
  background: rgba(6, 11, 15, 0.72);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  z-index: 4;
}
.topbar__back {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.topbar__back .ico { width: 22px; height: 22px; }
.topbar__title {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 112px);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.topbar--back {
  position: relative;
  justify-content: flex-start;
  min-height: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.topbar--back .topbar__back { display: grid; }
/* Reached from a Task Center task: the tab screen keeps its title and gains a back arrow to Task Center. */
.topbar--return { justify-content: flex-start; }
.topbar--return .topbar__back { display: grid; flex: none; margin-left: -8px; }
.topbar--return .topbar__tools { margin-left: auto; }
.topbar--back .brand,
.topbar--back .topbar__tools,
.topbar--back .topbar__title { display: none; }
.topbar--back.topbar--scrolled {
  border-bottom-color: transparent;
  background: var(--bg-base);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand__lockup {
  display: none;
  height: 40px;
  width: auto;
  max-width: min(220px, 58vw);
  object-fit: contain;
  object-position: left center;
  flex: none;
}
.brand__mark {
  display: block;
  width: 32px;
  height: 32px;
  flex: none;
  object-fit: contain;
  border-radius: 50%;
}

.brand__text { min-width: 0; }
.brand__name {
  display: block;
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand__tag {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Home: use attached VALTERRA lockup as the heading logo */
.topbar--brand .brand__lockup {
  display: block;
}
.topbar--brand .brand__mark,
.topbar--brand .brand__text {
  display: none;
}
.topbar--brand #notify {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  color: var(--text-primary);
  background: transparent;
}
.topbar--brand #notify:hover {
  background: transparent;
  color: var(--text-primary);
}
.topbar--brand #notify .ico {
  width: 22px;
  height: 22px;
  color: var(--text-primary);
}
.topbar--brand .iconbtn__badge {
  top: 8px;
  right: 9px;
  width: 7px;
  height: 7px;
  background: var(--gold-400);
  box-shadow: none;
}

.topbar__tools {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.chainpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 0;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.33;
  color: var(--proto-hi);
  background: var(--proto-soft);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--proto-hi);
  flex: none;
}
.dot--live { animation: pulse 2s var(--ease) infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.78); }
}

.iconbtn {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.iconbtn:hover { background: transparent; color: var(--fg); }
.iconbtn__badge {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--asset);
  box-shadow: 0 0 0 2px var(--bg-base);
}

/* =============================== screens =============================== */

.screen {
  display: none;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4) var(--space-5) 110px;
  gap: var(--space-7);
  flex-direction: column;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.is-active { display: flex; animation: screen-in var(--dur) var(--ease); }
/* Sections keep their full height so the screen scrolls; otherwise a clipped block (Me's menu list) gets squeezed. */
.screen > * { flex-shrink: 0; }
#screen-tx {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  flex: none;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: var(--grad-app);
}
#screen-tx.is-active {
  display: flex;
  animation: screen-tx-in 420ms cubic-bezier(0.65, 0, 0.35, 1) both;
}
#screen-tx.is-leaving {
  display: flex;
  animation: screen-tx-out 420ms cubic-bezier(0.65, 0, 0.35, 1) both;
}
.tx-bar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  flex: none;
  min-height: 56px;
  padding: max(10px, env(safe-area-inset-top, 0px)) 14px 10px;
  border-bottom: 0;
  background: #0e151c;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.tx-bar__back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.tx-bar__back .ico { width: 22px; height: 22px; }
.tx-bar__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  color: var(--text-primary);
}
.tx-bar__spacer { width: 40px; height: 40px; }
.tx-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s-4) var(--s-4) calc(24px + env(safe-area-inset-bottom, 0px));
  scrollbar-width: none;
}
.tx-scroll::-webkit-scrollbar { display: none; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes screen-tx-in {
  from { transform: translateX(100%); }
  to { transform: none; }
}
@keyframes screen-tx-out {
  from { transform: none; }
  to { transform: translateX(100%); }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* =============================== buttons =============================== */
/* Whisky: Primary P700 → P600 hover → P800 pressed; Secondary S*; CTA A* */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 var(--s-5);
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
  appearance: none;
  -webkit-appearance: none;
  background-clip: padding-box;
  overflow: hidden;
  cursor: pointer;
  transition: transform 140ms var(--ease), background var(--dur) var(--ease),
    border-color var(--dur) var(--ease), color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--block { width: 100%; }
.btn--sm {
  min-height: 36px;
  font-size: 13px;
  line-height: 1.43;
  padding: 0 14px;
  border-radius: var(--r-pill);
}
.btn--lg {
  min-height: 52px;
  font-size: 16px;
  line-height: 1.5;
}

/* Metallic gold CTA — DS §9 */
.btn--primary,
.btn--cta {
  height: var(--button-lg);
  min-height: var(--button-lg);
  padding: 0 26px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--vt-gold-gradient);
  color: #060b0f;
  font-weight: 700;
  font-size: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(88, 48, 6, 0.15),
    0 7px 18px rgba(195, 160, 92, 0.18);
  transition:
    transform 160ms var(--ease-premium),
    filter 160ms var(--ease-premium);
}
.btn--primary:hover,
.btn--cta:hover {
  filter: brightness(1.04);
  background: var(--vt-gold-gradient);
  border-color: transparent;
  color: #060b0f;
}
.btn--primary:active,
.btn--cta:active {
  transform: scale(0.985);
  background: var(--vt-gold-gradient);
  border-color: transparent;
  color: #060b0f;
  filter: none;
}

/* Secondary pill — DS §10 */
.btn--proto {
  height: 48px;
  min-height: 48px;
  padding: 0 22px;
  background: linear-gradient(180deg, rgba(30, 35, 43, 0.94), rgba(11, 16, 21, 0.94));
  border: 1px solid var(--line-medium);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
}
.btn--proto:hover {
  filter: brightness(1.04);
  background: linear-gradient(180deg, rgba(30, 35, 43, 0.94), rgba(11, 16, 21, 0.94));
  border-color: var(--line-medium);
}
.btn--proto:active {
  transform: scale(0.985);
  filter: none;
}

/* Outline gold — DS §11 */
.btn--ghost {
  height: var(--button-md);
  min-height: var(--button-md);
  padding: 0 20px;
  background: rgba(195, 160, 92, 0.025);
  border: 1px solid var(--gold-line);
  color: var(--gold-300);
  font-weight: 600;
}
.btn--ghost:hover {
  background: rgba(195, 160, 92, 0.08);
  border-color: var(--gold-line-strong);
  color: var(--gold-200);
}
.btn--ghost:active {
  background: rgba(195, 160, 92, 0.12);
  border-color: var(--gold-400);
  color: var(--gold-300);
}

.btn.is-disabled,
.btn:disabled {
  background: rgba(195, 160, 92, 0.18);
  border-color: transparent;
  color: rgba(12, 15, 23, 0.35);
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}
/* Primary CTA: keep gold readable when disabled — avoid muddy wash */
.btn--primary.is-disabled,
.btn--primary:disabled,
.btn--cta.is-disabled,
.btn--cta:disabled {
  background: linear-gradient(180deg, rgba(227, 203, 148, 0.28) 0%, rgba(195, 160, 92, 0.22) 100%);
  color: rgba(195, 160, 92, 0.55);
  box-shadow: none;
  filter: none;
}
.btn--ghost.is-disabled,
.btn--ghost:disabled {
  background: transparent;
  border-color: rgba(195, 160, 92, 0.25);
  color: rgba(195, 160, 92, 0.35);
}
.btn.is-disabled:active,
.btn:disabled:active { transform: none; }

.backbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  min-height: 44px;
  padding: 0 12px 0 6px;
  border: 1px solid transparent;
  border-radius: var(--r-input);
  background: var(--surface);
  color: var(--fg-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: 0;
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}
.backbtn:hover { border-color: var(--border); color: var(--fg); }

:where(button, a, input, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--asset);
  outline-offset: 2px;
  border-radius: 6px;
}
.tab:focus-visible {
  outline: none;
  color: var(--asset-hi);
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
}

/* ============================ connect gate ============================ */

#screen-home {
  position: relative;
}
#screen-home:has(#connect-gate:not(.is-hidden)) {
  overflow: hidden;
}
#screen-home:has(#connect-gate:not(.is-hidden)) #wallet-scope {
  pointer-events: none;
  user-select: none;
}

.connect-gate {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 88px 16px 24px;
}
.connect-gate__scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 21, 0.42);
  -webkit-backdrop-filter: blur(2px) saturate(105%);
  backdrop-filter: blur(2px) saturate(105%);
}

.connect-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
  width: 100%;
  max-width: 340px;
  margin: 0;
  padding: 28px 22px 24px;
  text-align: center;
  border: 0;
  border-radius: 6px;
  background:
    var(--bg-card-premium);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  overflow: hidden;
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.connect-card::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -10px;
  z-index: 1;
  width: 220px;
  height: 180px;
  background: url("assets/pattern-circuit.svg") center / contain no-repeat;
  opacity: 0.045;
  pointer-events: none;
}
.connect-card > * { position: relative; z-index: 1; }
.connect-card__art {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-top: 0;
}
.connect-card__seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.connect-card__seal::before,
.connect-card__seal::after { display: none; }
.connect-card__seal img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.connect-card__kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: -12px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}
.connect-card__kicker .ico { color: var(--icon-default); }

.connect-card h2 {
  font-family: var(--font-editorial);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--text-editorial);
}
.connect-card h2 span { color: var(--gold-300); font-style: italic; font-weight: 400; }
.connect-card > p {
  max-width: 280px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
}
.connect-card .btn { position: relative; z-index: 1; margin-top: 12px; }


/* ===================== metallic card stroke (DS §5–6) ===================== */
/*
  Reliable metallic 1px edge (same gradients as DS).
  Uses transparent border + background-clip instead of mask (mask often fails).
*/
.tcard,
.minicard,
.panel,
.swap-card,
.prop,
.pdetail__hero,
.pdetail__quorum,
.pdetail__vote,
.profile,
.rows,
.me-card,
.me-list--card,
.connect-card {
  --card-stroke: var(--stroke-standard);
  border: 1px solid transparent !important;
  background:
    var(--bg-card) padding-box,
    var(--card-stroke) border-box !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

/* Kill old mask pseudo-strokes so they cannot wash the card */
.tcard::before,
.minicard::before,
.panel::before,
.swap-card::before,
.card::before,
.prop::before,
.pdetail__hero::before,
.pdetail__quorum::before,
.pdetail__vote::before,
.profile::before,
.rows::before,
.me-card::before,
.me-list--card::before,
.connect-card::before,
.club-reserve::before {
  content: none !important;
  display: none !important;
}

/* Premium surfaces — DS §6B (membership face handles its own stroke) */
.tcard--proto,
.tcard--asset,
.minicard--asset,
.pdetail__hero {
  --card-stroke: var(--stroke-premium);
  background:
    radial-gradient(circle at 88% 6%, rgba(195, 160, 92, 0.07), transparent 36%) padding-box,
    linear-gradient(180deg, #0b1015 0%, #0b1015 100%) padding-box,
    var(--stroke-premium) border-box !important;
  background-origin: border-box !important;
  background-clip: padding-box, padding-box, border-box !important;
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* =============================== account =============================== */

.acct {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 0 2px;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}
.acct > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.acct .acct__wallet-lbl.lbl,
.acct__wallet-lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
  color: var(--text-tertiary) !important;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}
.acct__wallet-ico { display: none; }
.acct__addr-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  min-width: 0;
}
.acct__addr {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}
.acct__copy {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
}
.acct__copy:hover,
.acct__copy:focus-visible { color: var(--fg); background: var(--surface); }
.acct__copy:active { transform: scale(0.94); }
.acct .badge--proto {
  border: 0;
  background: rgba(201, 194, 181, 0.22);
  color: #c9c2b5;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  color: var(--fg-2);
  white-space: nowrap;
}
.badge--proto { background: var(--proto-soft); color: var(--proto-hi); }
.badge--asset { background: var(--asset-soft); color: var(--asset-hi); }
.badge--ok,
.badge--approved {
  background: var(--success-soft);
  color: var(--success);
}
.badge--bad,
.badge--rejected {
  background: var(--danger-soft);
  color: #c0574a;
}
.badge--live { background: var(--proto-soft); color: var(--proto-hi); }
.badge--open {
  background: rgba(201, 194, 181, 0.18);
  color: #c9c2b5;
  box-shadow: none;
}
.badge--closed {
  background: rgba(245, 243, 238, 0.06);
  color: var(--text-tertiary);
}
.badge--review {
  background: rgba(195, 160, 92, 0.16);
  color: var(--gold-300);
  box-shadow: none;
}
.badge--member,
.badge--premium {
  background: rgba(195, 160, 92, 0.13);
  color: var(--gold-300);
}

/* ========================= the two-tier tokens ========================= */

.tokens {
  position: relative;
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.balance-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  /* do NOT set overflow:hidden here — as a flex item it collapses min-height to 0 and clips cards */
  isolation: isolate;
}
.balance-section::before {
  content: "";
  position: absolute;
  right: 0;
  top: -10px;
  width: 140px;
  height: 140px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(195, 160, 92, 0.08), transparent 62%),
    url("assets/memcard-globe.png") center / contain no-repeat;
  opacity: 0.06;
  mask-image: radial-gradient(circle at 55% 45%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 55% 45%, #000 0%, transparent 72%);
}
.balance-section > * { position: relative; z-index: 1; }

.section-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0 2px;
}
.section-intro h2,
.section-intro__label,
#your-balances-title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--text-tertiary) !important;
}
.section-intro p { margin: 0; color: var(--fg-muted); font-size: 13px; }

.tcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: var(--card-padding-standard);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.tcard--proto,
.tcard--asset {
  z-index: 1;
  overflow: hidden;
}
.tcard > * { position: relative; z-index: 1; }

.tcard header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--s-3);
}
.tcard__name-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.tcard__title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.tcard__name-row h3 {
  flex: none;
}
.tcard__name-row .tipbtn {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
}
.tcard__name-row .tipbtn .ico {
  width: 13px;
  height: 13px;
}
.tcard__token {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: #0a0a0a;
}
.tcard__kind { display: none; }
.tcard__owner { display: none; }
.tcard--proto h3,
.tcard--asset h3 { color: var(--text-primary); }
.tcard h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.tipbtn {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -5px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--icon-default);
  cursor: pointer;
  transition: color 160ms var(--ease-premium);
}
.tipbtn .ico { width: 15px; height: 15px; pointer-events: none; }
.tipbtn:hover,
.tipbtn:focus-visible { color: var(--text-primary); }

.tcard__amt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin: 0;
}
.tcard__amt-row .btn {
  flex: none;
  white-space: nowrap;
}
.tcard__amt {
  margin: 0;
  font-size: clamp(22px, 5.5vw, 26px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.tcard__amt-row .tcard__amt { margin: 0; min-width: 0; }
.tcard--proto .tcard__amt,
.tcard--asset .tcard__amt { color: var(--text-primary); }

.tcard__rule {
  display: block;
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 194, 181, 0.36) 8%,
    rgba(201, 194, 181, 0.36) 92%,
    transparent
  );
}

.tcard__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
  padding-top: 0;
}
.tcard__meta div { display: flex; flex-direction: column; gap: 4px; }
.tcard__meta dt {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.tcard__meta dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
}
.tcard--proto .tcard__meta dd,
.tcard--asset .tcard__meta dd { color: var(--text-primary); }

.tcard__perks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tcard__perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-secondary);
}
.tcard__perks li > span:last-child { color: var(--text-secondary); }
.tcard__check {
  flex: none;
  width: 14px;
  height: 14px;
  background: transparent;
  box-shadow: none;
  position: relative;
}
.tcard__check::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--gold-300);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.balance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 2px;
  align-items: stretch;
}
.balance-actions .btn,
.balance-actions .btn--primary,
.balance-actions .btn--ghost {
  width: 100%;
  min-width: 0;
  height: var(--button-md);
  min-height: var(--button-md);
  max-height: var(--button-md);
  padding: 0 12px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  box-sizing: border-box;
}

.tokens__flow-btn,
.tokens__flow-label { display: none !important; }

.tokens--compact { grid-template-columns: 1fr 1fr; gap: 10px; }
.minicard {
  position: relative;
  padding: 20px;
  border: 0;
  border-radius: 6px;
  background: var(--bg-card);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.minicard strong { display: block; margin-top: 6px; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.minicard--proto {
  border: 0;
  background: var(--bg-card);
}
.minicard--proto strong { color: var(--proto-hi); }
.minicard--asset {
  border: 0;
}
.minicard--asset strong { color: var(--asset); }

/* =============================== panels =============================== */

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--card-padding-standard);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.panel > * { position: relative; z-index: 1; }
.panel--proto {
  border: 0;
  background: var(--bg-card);
}
.panel--ledger {
  position: relative;
  background: var(--bg-card);
}
.panel,
.club-reserve,
.tcard {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.club-reserve {
  position: relative;
  border: 0;
  background: var(--bg-card);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
#wallet-scope > .panel--proto {
  border: 0;
  background: var(--bg-card);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.scope-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: var(--s-2);
  border-bottom: 1px solid #232629;
}
.scope-label__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}
.scope-label__row > span:first-child {
  padding: 4px 8px;
  border: 0;
  border-radius: var(--r-pill);
  background: rgba(201, 194, 181, 0.18);
  color: #c9c2b5;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.club-reserve .scope-label__row > span:first-child {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}
.scope-label__verified {
  color: #c9c2b5;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  opacity: 1;
}
.scope-label p { margin: 0; color: var(--fg-muted); font-size: 12px; font-weight: 500; }
.panel--folio {
  position: relative;
  flex: none;
  overflow: hidden;
  background: var(--bg-card);
}
.panel--folio::after {
  content: attr(data-folio);
  position: absolute;
  right: 14px;
  top: 14px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 0.75;
}
.panel--proto.panel--folio {
  background: var(--grad-role);
}
.panel--proto.panel--folio::after { color: var(--proto-hi); opacity: 0.85; }

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.panel__head h2 {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.panel__head .lbl { white-space: nowrap; } /* let the heading wrap, not the eyebrow */
.panel__head--bare { padding-top: var(--s-2); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2);
  min-width: 0;
}
.stats div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: var(--s-3) var(--s-2);
  border: 0;
  border-radius: 6px;
  background: var(--surface);
}
.stats strong { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; }
.stats .lbl {
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.06em;
}

/* ------- collection reference value + history (not a return chart) ------- */

.lum { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.lum__value { font-size: 24px; font-weight: 600; line-height: 1.05; margin: 4px 0 0; }

.chart-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chart { margin: 0; }
.chart svg { display: block; width: 100%; height: 84px; overflow: visible; }
.chart__line {
  fill: none;
  stroke: var(--asset-hi);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart__area {
  opacity: 0;
}
.chart.is-drawn .chart__area {
  opacity: 1;
  transition: opacity 0.45s ease 0.55s;
}
.chart__dot {
  fill: var(--asset-hi);
  stroke: var(--bg-elev);
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.4);
}
.chart.is-drawn .chart__dot {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.22s ease 1.05s, transform 0.28s cubic-bezier(0.2, 0.9, 0.2, 1.2) 1.05s;
}
.chart__tick {
  fill: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  opacity: 0;
}
.chart.is-drawn .chart__tick {
  opacity: 1;
  transition: opacity 0.35s ease 0.85s;
}
@media (prefers-reduced-motion: reduce) {
  .chart__area,
  .chart__dot,
  .chart__tick { opacity: 1; transform: none; transition: none; }
}

/* venue attribution — the quote is somebody else's number, so it is credited */
.venue {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--proto-soft);
  font-size: 11px;
  font-weight: 600;
  color: var(--proto-hi);
  white-space: nowrap;
}
.venue--plain {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--fg-muted);
  font-weight: 500;
}
.kv__src { font-family: var(--font-body); font-size: 11px; font-weight: 500; color: var(--fg-muted); }
.field input,
.quote strong,
.kv strong.mono { font-family: var(--font-mono); }

.rowlink {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--asset);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity var(--dur) var(--ease);
}
.rowlink:hover { background: transparent; opacity: 0.85; }
.rowlink span { flex: 1; color: var(--asset); }
.rowlink__chev { color: var(--asset); }

.teaser__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* quorum / progress bars */
.quorum { display: flex; flex-direction: column; gap: 6px; }
.quorum__bar,
.ladder__bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: #1e232b;
  overflow: hidden;
}
.quorum__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--proto-hi);
  transition: width 600ms var(--ease);
}
.ladder__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c9c2b5, var(--gold-500));
}
.quorum .lbl b { color: var(--fg); }

/* ============================ forms / quotes ============================ */

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  font-size: 14px;
  color: var(--fg-2);
}
.panel--folio > .kv {
  min-height: 34px;
  padding: 7px 0;
  border-bottom: 1px solid #232629;
}
.panel--folio > .kv + .field { margin-top: 2px; }
.kv strong { font-weight: 600; color: var(--fg); }
.kv--sub { font-size: 12.5px; color: var(--fg-muted); }
.kv--sub strong { font-weight: 500; color: var(--fg-2); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span,
.field__label-row {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.33;
  letter-spacing: 0;
  color: var(--fg-muted);
}
.field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}
.field__max {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--asset);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.field__max:hover { color: var(--asset-hi); }
.field input {
  width: 100%;
  height: 52px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(201, 194, 181, 0.4);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(6, 11, 15, 0.82), rgba(6, 11, 15, 0.94));
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.43;
  font-variant-numeric: tabular-nums;
  outline: 0;
  transition:
    border-color 160ms var(--ease-premium),
    box-shadow 160ms var(--ease-premium);
}
.field input::placeholder { color: var(--text-tertiary); }
.field input:hover { border-color: var(--line-medium); }
.field input:focus {
  border-color: rgba(195, 160, 92, 0.58);
  box-shadow: 0 0 0 3px rgba(195, 160, 92, 0.07);
  outline: 0;
}
.field.is-error input,
.field input.is-error {
  background: var(--r-10);
  border-color: var(--r-80);
  color: var(--n-800);
}
.field input::-webkit-outer-spin-button,
.field input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.field input[type="number"] { appearance: textfield; -moz-appearance: textfield; }

.quote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(203, 154, 72, 0.07) 0 1px, transparent 1px 100%),
    rgba(0, 0, 0, 0.25);
}
.quote__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quote__label span {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.quote__label small {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--fg-muted);
  opacity: 0.85;
}
.quote strong { font-size: 20px; font-weight: 500; }

.quote-details {
  border-top: 1px solid #232629;
  border-bottom: 1px solid #232629;
}
.quote-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;
}
.quote-details summary::-webkit-details-marker { display: none; }
.quote-details summary::after { content: "+"; color: var(--proto-hi); font-family: var(--font-mono); font-size: 16px; }
.quote-details[open] summary::after { content: "−"; }
.quote-details .kv { min-height: 36px; padding: 8px 0; border-top: 1px solid #232629; }

.warnbar {
  display: flex;
  gap: var(--s-2);
  padding: var(--s-3);
  border: 1px solid rgba(209, 107, 0, 0.35);
  border-radius: 6px;
  background: rgba(209, 107, 0, 0.12);
  color: var(--warn);
}
.warnbar p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--w-20); }

.notice {
  margin: 0;
  padding: var(--s-3);
  border-left: 2px solid var(--border-strong);
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg-muted);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.notice.is-updated { color: var(--asset-hi); border-color: var(--asset); }
.notice--tight {
  padding: 0;
  border-left: 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.45;
}

/* ============================ get SIPV swap ============================ */

.swap-sheet {
  position: absolute;
  inset: 0;
  z-index: 14;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.swap-sheet[hidden] { display: none !important; }
.swap-sheet__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(6, 11, 15, 0.58);
  cursor: pointer;
}
.swap-sheet__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100% - 52px);
  max-height: calc(100% - 52px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--bg-base);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.45);
  color: var(--fg);
  animation: swap-sheet-up 560ms cubic-bezier(0.65, 0, 0.35, 1) both;
  overflow: hidden;
}
.swap-sheet.is-closing .swap-sheet__panel {
  animation: swap-sheet-down 560ms cubic-bezier(0.65, 0, 0.35, 1) both;
}
.swap-sheet.is-closing .swap-sheet__backdrop {
  animation: swap-sheet-fade-out 560ms cubic-bezier(0.65, 0, 0.35, 1) both;
}
.swap-sheet__bar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 12px 14px 8px;
}
.swap-sheet__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  color: var(--text-primary);
}
.swap-sheet__iconbtn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.swap-sheet__iconbtn:hover,
.swap-sheet__iconbtn:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}
.swap-sheet__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--s-4);
  min-height: 0;
  padding: 4px 18px 16px;
  overflow: auto;
}
.swap-sheet__venue {
  margin: 0;
  text-align: left;
}

.swap-meta-block {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
  border-top: 1px solid #232629;
}
.swap-meta-block .swap-rate {
  padding: 12px 0;
  border-bottom: 1px solid #232629;
}
.swap-meta-block .swap-aside {
  opacity: 1;
}
.swap-meta-block .quote-details {
  border-top: 0;
}

.swap-notes {
  margin: 10px 0 4px;
  border: 0;
  text-align: center;
}
.swap-notes summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
}
.swap-notes summary::-webkit-details-marker { display: none; }
.swap-notes__ico {
  display: block;
  width: 14px;
  height: 14px;
  flex: none;
  color: inherit;
  transition: transform 160ms ease;
}
.swap-notes[open] .swap-notes__ico {
  transform: rotate(180deg);
}
.swap-notes .notice {
  margin: 8px auto 0;
  max-width: 320px;
  text-align: center;
}

.swap-panel {
  gap: var(--s-4);
}

.swap-core {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0 2px;
}

.swap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border: 0;
  border-radius: 6px;
  background: var(--bg-card);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.swap-card > * { position: relative; z-index: 1; }
.swap-card--usdt,
.swap-card--viq {
  background: var(--bg-card);
}
.swap-card--loyal {
  background:
    var(--bg-card) padding-box,
    var(--stroke-standard) border-box !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
}
.swap-card--loyal .swap-leg__amt {
  color: var(--asset-hi);
}
.swap-card--viq .field__max {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--asset);
  font-size: 12px;
  font-weight: 600;
}
.swap-card--viq .field__max:hover {
  color: var(--asset-hi);
  border: 0;
  background: transparent;
}
.swap-card__input--proto {
  border-bottom-color: rgba(201, 194, 181, 0.4);
}
.swap-card--viq .swap-card__input--proto input {
  color: var(--proto-hi);
}
.swap-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}
.swap-card__title,
.swap-rate__label {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9a9384;
}
.swap-card__est {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #9a9384;
}
.swap-card__row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}
.swap-leg__token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  width: 104px;
  font-size: 13px;
  font-weight: 600;
  color: #9a9384;
}
.swap-leg__token > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.swap-leg__ico {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  background: #0a0a0a;
}
.swap-card__input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  min-width: 0;
  min-height: 74px;
  padding: 16px 18px;
  border: 1px solid var(--gold-line-soft);
  border-radius: 6px;
  background: rgba(6, 11, 15, 0.72);
}
.swap-card__input input,
.swap-leg__amt {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 28px;
  font-weight: 550;
  letter-spacing: -0.03em;
  text-align: left;
  min-width: 0;
  outline: 0;
}
.swap-card__input input {
  flex: 1;
  min-width: 0;
  width: 0;
}
.swap-leg__amt {
  flex: none;
}
.swap-card--usdt .swap-card__input input {
  color: var(--text-primary);
}
.swap-card--viq .swap-leg__amt {
  color: var(--text-primary);
}
.swap-card__input .field__max {
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--asset);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.swap-card__input .field__max:hover {
  color: var(--asset-hi);
  background: transparent;
}
.swap-card__input .field__max.is-hidden { display: none; }
.swap-card__input input:hover,
.swap-card__input input:focus {
  border: 0;
  box-shadow: none;
}
.swap-card__input input::-webkit-outer-spin-button,
.swap-card__input input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
.swap-card__input input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
.swap-card__clear {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg-muted);
  cursor: pointer;
}
.swap-card__clear:hover,
.swap-card__clear:focus-visible {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.14);
}
.swap-card__clear.is-hidden { display: none; }
.swap-card__bal {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: #9a9384;
}
.swap-card__bal strong {
  font-size: 11px;
  font-weight: 500;
  color: inherit;
}

.swap-core__bridge {
  display: grid;
  place-items: center;
  z-index: 1;
  width: 36px;
  height: 36px;
  margin: -14px auto;
  border: 5px solid #0b1015;
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--asset);
  box-shadow: none;
  box-sizing: content-box;
}

.swap-rate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding: 0 2px;
}
.swap-rate__value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
}
.swap-rate__arrow {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: var(--fg-muted);
}
.swap-rate.is-fresh .swap-rate__value {
  color: var(--proto-hi);
  transition: color 0.35s ease;
}

.swap-aside {
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0.92;
}
.swap-aside .quote-details {
  margin-top: 2px;
}

.swap-cta {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 12px;
  margin-top: 0;
  padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 0;
  background: var(--bg-base);
}
.swap-cta .btn--lg {
  min-height: 56px;
  font-size: 17px;
  font-weight: 600;
  border-radius: var(--r-pill);
  box-shadow: none;
}
.swap-cta .btn--lg .ico {
  width: 18px;
  height: 18px;
}

.tx-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 48px 12px 28px;
  text-align: center;
}
.tx-empty__art {
  display: block;
  width: min(200px, 68%);
  height: auto;
  color: #9a9384;
}
.tx-empty__copy {
  margin: 0;
  max-width: 260px;
  color: var(--fg-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ================================ shop ================================ */

.balbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.balbar__amt-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--asset-hi);
}
.balbar__token {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.balbar__amt-pill strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: inherit;
}
.balbar__convert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--asset-hi);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.balbar__convert:hover,
.balbar__convert:focus-visible {
  background: transparent;
  color: var(--asset);
}
.balbar__convert:active { transform: none; opacity: 0.85; }

#screen-shop {
  padding-top: 8px;
  gap: 14px;
}

.segmented {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 4px;
  border: 1px solid rgba(201, 194, 181, 0.18);
  border-radius: var(--radius-pill);
  background: #0b1015;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.segmented__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 2);
  border-radius: var(--radius-pill);
  border: 0;
  background: linear-gradient(180deg, rgba(201, 194, 181, 0.96), rgba(30, 35, 43, 0.96));
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transform: translateX(0);
  transition: transform 360ms var(--ease-premium);
  pointer-events: none;
  z-index: 0;
}
.segmented[data-active="vouchers"] .segmented__thumb {
  transform: translateX(100%);
}
.seg {
  position: relative;
  z-index: 1;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 160ms var(--ease-premium);
}
.seg.is-active {
  color: var(--text-primary);
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.drop-card {
  position: relative;
  display: block;
  flex: none;
  width: calc(100% + (2 * var(--space-5)));
  max-width: none;
  margin: 0 calc(-1 * var(--space-5));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--bg-page-deep);
  box-shadow: none;
  overflow: hidden;
}
.drop-card__media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 415;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: var(--surface-02);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms var(--ease-premium), background 180ms var(--ease-premium);
  animation: card-in 380ms var(--ease) both;
}
.card:nth-child(2) { animation-delay: 45ms; }
.card:nth-child(3) { animation-delay: 90ms; }
.card:nth-child(4) { animation-delay: 135ms; }
.card:nth-child(5) { animation-delay: 180ms; }
.card:nth-child(6) { animation-delay: 225ms; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.card:hover {
  transform: translateY(-1px);
  background: var(--surface-03);
}

/* Abstract macro-texture art instead of bottle glamour shots —
   material and modern rather than collector-catalogue. */
.art {
  position: relative;
  flex: none;
  aspect-ratio: 1.22 / 1;
  overflow: hidden;
}
.art::before {
  content: "";
  position: absolute;
  z-index: 1;
  width: 74px;
  height: 74px;
  top: -28px;
  right: -18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: transform 380ms var(--ease);
}
.card:nth-child(even) .art::before {
  top: auto;
  right: -24px;
  bottom: -34px;
  border-style: dashed;
}
.card:hover .art::before { transform: scale(1.16) rotate(18deg); }
.art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(6, 11, 15, 0.88) 100%);
}
.art__tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 2;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-pill);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 100%),
    rgba(6, 11, 15, 0.28);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg);
}
.card__body { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.card__name {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.card__sub { font-size: 12px; color: var(--text-secondary); }
.card__price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--gold-300);
}
.card__token {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

/* ============================ item detail ============================ */

.hero {
  position: relative;
  flex: none;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  border: 0;
  overflow: hidden;
  background: var(--bg-elev);
  box-sizing: border-box;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 8px),
    radial-gradient(120% 90% at 22% 0%, rgba(255, 255, 255, 0.18), transparent 62%);
  mix-blend-mode: soft-light;
}
.hero__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: rgba(6, 11, 15, 0.78);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--proto-hi);
}

.detail__name {
  margin: 0;
  padding-bottom: 10px;
  font-family: var(--font-editorial);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-editorial);
}
.detail__desc { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-secondary); }

.specs { display: grid; gap: 0; margin: 0; width: 100%; max-width: 100%; min-width: 0; }
.specs div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  padding: 10px 0;
  border-bottom: 1px solid #232629;
  font-size: 12.5px;
  min-width: 0;
}
.specs div:last-child { border-bottom: 0; }
.specs dt {
  color: var(--text-tertiary);
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
  flex: none;
}
.specs dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
  min-width: 0;
}
.specs--redeem {
  margin-top: 0;
  border-top: 1px solid #232629;
}
.specs--redeem div {
  padding-top: 10px;
  padding-bottom: 0;
  border-bottom: 0;
}
.specs__price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--gold-300);
}
.btn__token {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
#do-buy {
  gap: 8px;
}

/* Item detail: no bottom nav, sticky redeem bar */
.screen--detail {
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.screen--detail.is-active {
  display: flex;
  flex-direction: column;
}
.detail-body {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5) 20px;
  box-sizing: border-box;
  scrollbar-width: none;
}
.detail-body::-webkit-scrollbar { display: none; }

/* Detail copy is flat content — must escape the shared metallic .panel stroke */
.panel.panel--detail,
.panel--folio.panel--detail {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  background-image: none !important;
  gap: var(--space-3);
  overflow: visible !important;
}
.panel--detail::before,
.panel--detail::after {
  content: none !important;
  display: none !important;
}
.panel--detail #d-specs {
  margin-bottom: 0;
}
.panel--detail #d-specs + .specs--redeem {
  margin-top: calc(-1 * var(--space-3));
}
.detail-bar {
  flex: none;
  z-index: 5;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px var(--space-5) calc(12px + env(safe-area-inset-bottom, 0px));
  background:
    linear-gradient(180deg, rgba(11, 16, 21, 0) 0%, rgba(11, 16, 21, 0.92) 28%, rgba(11, 16, 21, 0.98) 100%);
  border-top: 0;
}
body.detail-open .tabbar {
  display: none !important;
}
body.preview-device #screen-item.screen--detail,
body:not(.preview-device) #screen-item.screen--detail,
body.preview-device #screen-proposal.screen--detail,
body:not(.preview-device) #screen-proposal.screen--detail,
body.preview-device #screen-propose.screen--propose,
body:not(.preview-device) #screen-propose.screen--propose,
body.preview-device #screen-propose-detail.screen--propose,
body:not(.preview-device) #screen-propose-detail.screen--propose {
  align-items: stretch;
}
body.preview-device #screen-item.screen--detail > *,
body:not(.preview-device) #screen-item.screen--detail > *,
body.preview-device #screen-proposal.screen--detail > *,
body:not(.preview-device) #screen-proposal.screen--detail > *,
body.preview-device #screen-propose.screen--propose > *,
body:not(.preview-device) #screen-propose.screen--propose > *,
body.preview-device #screen-propose-detail.screen--propose > *,
body:not(.preview-device) #screen-propose-detail.screen--propose > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}

/* ================================ DAO / membership card ================================ */

.memcard {
  --mem-ink: var(--text-primary);
  --mem-ink-soft: var(--text-secondary);
  --mem-ink-mute: var(--text-tertiary);
  --mem-ink-light: var(--text-muted);
  --mem-gold: var(--gold-300);
  --mem-gold-deep: var(--gold-600);
  position: relative;
  flex: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  perspective: 1400px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
}
.memcard__inner {
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: 6px;
  transform-style: preserve-3d;
  transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}
.memcard.is-flipped .memcard__inner {
  transform: rotateY(180deg);
}
.memcard__face {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 6px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* inset ring stays inside radius — avoids background-clip / overflow mismatch */
  border: 0 !important;
  background:
    radial-gradient(circle at 88% 8%, rgba(195, 160, 92, 0.08), transparent 34%),
    linear-gradient(145deg, #0b1015 0%, #0b1015 74%);
  box-shadow:
    inset 0 0 0 1px rgba(227, 203, 148, 0.48),
    0 16px 38px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.memcard__face--front {
  position: relative;
  padding: 22px;
  color: var(--mem-ink);
}
.memcard__face--front::before,
.memcard__face--back::before {
  content: none !important;
  display: none !important;
}
.memcard__face--front::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 140px;
  top: 0;
  right: 0;
  background: url("assets/pattern-circuit.svg") top right / contain no-repeat;
  opacity: 0.045;
  pointer-events: none;
  border-radius: inherit;
}
.memcard__face--back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 24px;
  box-sizing: border-box;
  color: var(--fg);
  transform: rotateY(180deg);
}
.memcard__face--back::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 180px;
  height: 140px;
  background: url("assets/pattern-circuit.svg") top right / contain no-repeat;
  opacity: 0.045;
  pointer-events: none;
  border-radius: inherit;
}
.memcard__front-body,
.memcard__back-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  box-sizing: border-box;
  min-height: 0;
}
.memcard__face--front .memcard__front-body {
  padding: 0;
}
.memcard__face--back .memcard__back-body {
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  min-height: 0;
  padding: 0;
  gap: 16px;
  justify-content: center;
  overflow: hidden;
}
.memcard__title {
  margin: 0;
  font-family: var(--font-editorial);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--gold-300);
}
.memcard__face--back .memcard__title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--gold-300);
}
.memcard__hint {
  margin: 4px 0 0;
  flex: none;
  color: var(--fg-2);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}
.memcard__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}
.memcard__stat-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--mem-ink-mute);
  font-size: 11px;
  font-weight: 500;
}
.memcard__stat-value {
  margin: 2px 0 0;
  color: var(--mem-ink);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.tipbtn--on-gold {
  width: 20px;
  height: 20px;
  margin: -2px 0 -2px -2px;
  color: var(--mem-ink-light);
}
.tipbtn--on-gold:hover,
.tipbtn--on-gold:focus-visible {
  color: var(--mem-ink-soft);
}
.tipbtn--on-gold .ico {
  width: 12px;
  height: 12px;
}
.memcard__progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.memcard__progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--mem-ink);
  font-size: 11.5px;
  font-weight: 500;
}
.memcard__bar {
  height: 8px;
  border-radius: 6px;
  background: #1e232b;
  overflow: hidden;
  box-shadow: none;
}
.memcard__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c3a05c, #e3cb94);
  box-shadow: none;
}
.memcard__flipcue {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  align-self: stretch;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mem-ink-mute);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  text-align: right;
  cursor: pointer;
}
.memcard__flipcue .ico {
  width: 13px;
  height: 13px;
  flex: none;
  opacity: 0.85;
}
.memcard__flipcue--back {
  color: var(--asset);
  justify-content: flex-end;
}
.memcard__back-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: none;
}
.memcard__perks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: none;
}
.memcard__perks li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--fg-2);
}
.memcard__perks li.is-locked {
  color: var(--fg-muted);
}
.memcard__perks .u-ok {
  color: var(--asset);
}

.filters {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#screen-dao .filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}
#screen-dao .chip {
  flex: 1 1 0;
  min-width: 0;
  font-size: 12px;
  padding: 0 10px;
}
.chip {
  position: relative;
  flex: 1;
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 160ms var(--ease-premium),
    background 160ms var(--ease-premium),
    border-color 160ms var(--ease-premium);
}
.chip.is-active {
  color: #060b0f;
  border-color: transparent;
  background: linear-gradient(180deg, var(--gold-200), var(--gold-400));
  box-shadow: none;
}
.chip:not(.is-active) {
  background: transparent;
}

.proplist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.proplist .me-empty--art {
  padding: 28px 12px 20px;
}

.prop {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--card-padding-standard);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms var(--ease-premium), background 180ms var(--ease-premium);
}
.prop > * { position: relative; z-index: 1; }
.prop:hover {
  background:
    linear-gradient(180deg, #1e232b 0%, #0e151c 100%) padding-box,
    var(--stroke-standard) border-box !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
}
.prop--closed {
  background:
    var(--bg-card) padding-box,
    var(--stroke-standard) border-box !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  opacity: 0.92;
}
.prop--closed:hover {
  background:
    linear-gradient(180deg, #1e232b 0%, #0e151c 100%) padding-box,
    var(--stroke-standard) border-box !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
}
.prop--closed .prop__title {
  color: #9a9384;
}
.prop__topic {
  margin: -2px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-muted);
}
.prop__await {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--gold-300);
}
.prop--review .prop__title {
  color: var(--text-primary);
}
.prop--closed .prop__split-for {
  background: #c9c2b5;
}
.prop--closed .prop__split-against {
  background: #9a9384;
}
.prop--closed .prop__pct--for {
  color: #c9c2b5;
}
.prop--closed .prop__pct--against {
  color: #9a9384;
}
.prop__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.prop__badges {
  display: flex;
  flex: none;
  align-items: flex-end;
  gap: 4px;
}
.prop__outcome {
  flex: none;
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 2px 7px;
  min-height: 0;
  line-height: 1.25;
}
.prop__title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-align: left;
  color: var(--text-primary);
}
.prop__split {
  display: flex;
  height: 8px;
  margin-top: 2px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: #1e232b;
}
.prop__split-for,
.prop__split-against,
.prop__split-abstain {
  display: block;
  height: 100%;
  min-width: 0;
}
.prop__split-for { background: var(--success); }
.prop__split-against { background: var(--danger); }
.prop__split-abstain { background: var(--neutral); }
.prop__breakdown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}
.prop__sep {
  margin: 0 6px;
  color: var(--fg-muted);
  font-weight: 400;
}
.prop__pct--for { color: var(--ok); }
.prop__pct--against { color: var(--bad); }
.prop__pct--abstain { color: #9a9384; }
.prop__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px var(--s-3);
  font-size: 12px;
  color: var(--fg-muted);
}
.prop__foot-left {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px var(--s-3);
  min-width: 0;
}
.prop__voted { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); }

.tally { display: flex; flex-direction: column; gap: 10px; }
.tally__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 0;
}
.tally__row--for,
.tally__row--against,
.tally__row--abstain {
  background: linear-gradient(135deg, rgba(30, 35, 43, 0.95) 0%, rgba(30, 35, 43, 0.88) 100%);
}
.tally__ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: rgba(245, 243, 238, 0.06);
  color: var(--fg-muted);
}
.tally__ico .ico {
  width: 16px;
  height: 16px;
}
.tally__row--for .tally__ico {
  color: var(--ok);
  background: rgba(110, 158, 116, 0.18);
  box-shadow: inset 0 0 0 1.5px rgba(110, 158, 116, 0.55);
}
.tally__row--against .tally__ico {
  color: var(--bad);
  background: rgba(192, 87, 74, 0.18);
  box-shadow: inset 0 0 0 1.5px rgba(192, 87, 74, 0.5);
}
.tally__row--abstain .tally__ico {
  color: #9a9384;
  background: rgba(201, 194, 181, 0.22);
  box-shadow: inset 0 0 0 1.5px rgba(201, 194, 181, 0.4);
}
.tally__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.tally__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tally__label {
  min-width: 0;
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
}
.tally__track {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: var(--r-pill);
  background: #1e232b;
  overflow: hidden;
}
.tally__fill { display: block; height: 100%; border-radius: inherit; transition: width 600ms var(--ease); }
.tally__row--for .tally__fill { background: var(--success); }
.tally__row--against .tally__fill { background: var(--danger); }
.tally__row--abstain .tally__fill { background: var(--neutral); }
.tally__pct {
  flex: none;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
}
.tally__row--for .tally__pct { color: var(--success); }
.tally__row--against .tally__pct { color: var(--danger); }
.tally__row--abstain .tally__pct { color: var(--text-secondary); }

.votebox {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.votebox .lbl b,
.pdetail__vote-power b { color: var(--fg); }
.votebtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.vbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 50px;
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.018);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 160ms var(--ease-premium),
    border-color 160ms var(--ease-premium),
    color 160ms var(--ease-premium),
    box-shadow 160ms var(--ease-premium);
}
.vbtn .ico { flex: none; }
.vbtn--for {
  border-color: rgba(110, 158, 116, 0.5);
  background: rgba(110, 158, 116, 0.12);
  color: var(--success);
  box-shadow: inset 0 1px 0 rgba(110, 158, 116, 0.12);
}
.vbtn--against {
  border-color: rgba(192, 87, 74, 0.5);
  background: rgba(192, 87, 74, 0.12);
  color: var(--danger);
  box-shadow: inset 0 1px 0 rgba(192, 87, 74, 0.1);
}
.vbtn--abstain {
  border-color: rgba(201, 194, 181, 0.45);
  background: rgba(154, 147, 132, 0.14);
  color: var(--neutral);
  box-shadow: inset 0 1px 0 rgba(201, 194, 181, 0.08);
}
.vbtn--for:hover {
  background: rgba(110, 158, 116, 0.2);
  border-color: rgba(110, 158, 116, 0.72);
  color: var(--success);
}
.vbtn--against:hover {
  background: rgba(192, 87, 74, 0.2);
  border-color: rgba(192, 87, 74, 0.72);
  color: #c0574a;
}
.vbtn--abstain:hover {
  background: rgba(154, 147, 132, 0.22);
  border-color: rgba(201, 194, 181, 0.65);
  color: #c9c2b5;
}
.vbtn--for.is-cast {
  border-color: rgba(110, 158, 116, 0.85);
  background: rgba(110, 158, 116, 0.28);
  color: var(--success);
  box-shadow:
    inset 0 1px 0 rgba(110, 158, 116, 0.2),
    0 0 0 1px rgba(110, 158, 116, 0.2);
}
.vbtn--against.is-cast {
  border-color: rgba(192, 87, 74, 0.85);
  background: rgba(192, 87, 74, 0.28);
  color: #c0574a;
  box-shadow:
    inset 0 1px 0 rgba(192, 87, 74, 0.18),
    0 0 0 1px rgba(192, 87, 74, 0.18);
}
.vbtn--abstain.is-cast {
  border-color: rgba(201, 194, 181, 0.75);
  background: rgba(154, 147, 132, 0.28);
  color: #c9c2b5;
  box-shadow:
    inset 0 1px 0 rgba(201, 194, 181, 0.14),
    0 0 0 1px rgba(201, 194, 181, 0.14);
}
.votebox.is-closed { pointer-events: none; }
.pdetail__closed-note {
  margin: 0;
  padding: 12px 16px;
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: rgba(245, 243, 238, 0.08);
}

/* Proposal detail layout */
.pdetail {
  gap: 14px;
}
.pdetail__hero,
.pdetail__quorum,
.pdetail__vote {
  position: relative;
  border: 0;
  border-radius: 6px;
  background: var(--bg-card);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.pdetail__hero > *,
.pdetail__quorum > *,
.pdetail__vote > * { position: relative; z-index: 1; }
.pdetail__hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  overflow: visible;
  background:
    var(--bg-card-premium);
}
.pdetail__topline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.pdetail__head {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.pdetail__badges {
  display: flex;
  flex: none;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 0;
}
.pdetail__badges .badge {
  height: 22px;
  padding: 0 8px;
  font-size: 10px;
}
.pdetail__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  margin-top: 1px;
  border-radius: 50%;
  border: 1px solid rgba(195, 160, 92, 0.45);
  background:
    radial-gradient(circle at 35% 30%, rgba(227, 203, 148, 0.28), transparent 55%),
    linear-gradient(145deg, var(--gold-300) 0%, var(--gold-600) 100%);
  color: var(--ink-on-gold);
  box-shadow: inset 0 1px 0 rgba(227, 203, 148, 0.35);
}
.pdetail__icon .ico {
  width: 18px;
  height: 18px;
}
.pdetail__title {
  margin: 0;
  flex: none;
  width: 100%;
  min-width: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.pdetail__rule {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pdetail__rule::before,
.pdetail__rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(195, 160, 92, 0.55), transparent);
}
.pdetail__rule i {
  display: block;
  width: 6px;
  height: 6px;
  flex: none;
  border: 1px solid rgba(195, 160, 92, 0.7);
  transform: rotate(45deg);
  background: rgba(195, 160, 92, 0.35);
}
.pdetail__desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--fg-2);
  overflow: visible;
}
.pdetail__topic {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted);
}
.pdetail__meta {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--text-tertiary);
}
.pdetail__council-note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 2px;
}
.pdetail__council-note .me-note { margin: 0; }
.detail-bar--stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-bar--stack .btn--primary,
.detail-bar--stack .btn--ghost {
  width: 100%;
}
.proplist .badge {
  height: 22px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.pdetail__quorum {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
}
.pdetail__ring {
  --q: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background:
    conic-gradient(var(--ok) calc(var(--q) * 1%), rgba(245, 243, 238, 0.1) 0);
}
.pdetail__ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #1e232b;
}
.pdetail__ring-val {
  position: relative;
  z-index: 1;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.pdetail__quorum-meta {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: #9a9384;
}
.pdetail__quorum-meta .mono {
  color: #9a9384;
  font-weight: 600;
}
.pdetail__results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.pdetail__section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--asset);
}
.pdetail__section-head::before,
.pdetail__section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 194, 181, 0.36) 10%,
    rgba(201, 194, 181, 0.36) 90%,
    transparent
  );
}
.pdetail__vote {
  gap: 14px;
  padding: 20px;
  border-top: 0;
}
.pdetail__vote-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pdetail__vote-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.pdetail__vote-power {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-muted);
}
.pdetail__token {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
#screen-proposal.is-closed .pdetail__title {
  color: #9a9384;
}
#screen-proposal.is-closed .tally__row--for,
#screen-proposal.is-closed .tally__row--against {
  background: linear-gradient(135deg, rgba(30, 35, 43, 0.95) 0%, rgba(30, 35, 43, 0.88) 100%);
}
#screen-proposal.is-closed .tally__row--for .tally__fill {
  background: #c9c2b5;
}
#screen-proposal.is-closed .tally__row--for .tally__ico {
  color: #c9c2b5;
  background: rgba(201, 194, 181, 0.16);
  box-shadow: inset 0 0 0 1.5px rgba(201, 194, 181, 0.45);
}
#screen-proposal.is-closed .tally__row--for .tally__pct {
  color: #c9c2b5;
}
#screen-proposal.is-closed .tally__row--against .tally__fill {
  background: #9a9384;
}
#screen-proposal.is-closed .tally__row--against .tally__ico {
  color: #9a9384;
  background: rgba(201, 194, 181, 0.22);
  box-shadow: inset 0 0 0 1.5px rgba(201, 194, 181, 0.45);
}
#screen-proposal.is-closed .tally__row--against .tally__pct {
  color: #9a9384;
}
#screen-proposal.is-closed .pdetail__ring {
  background: conic-gradient(#c9c2b5 calc(var(--q) * 1%), rgba(245, 243, 238, 0.1) 0);
}
.pdetail__badges .badge--ok,
.pdetail__badges .badge--bad {
  font-size: 11px;
  padding: 4px 9px;
}

/* ================================= me ================================= */

.profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 16px 14px 16px 16px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: background var(--dur) var(--ease);
}
.profile:hover { background: var(--surface-02); }
.profile > * { position: relative; z-index: 1; }
.profile__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--surface-03, #0e151c);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px var(--line-subtle);
}
.profile h2 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--text-primary);
}
.profile__tier {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--gold-300);
}
.profile__meta {
  margin: 6px 0 0;
  color: var(--text-tertiary);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.profile__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.profile__chev {
  flex: none;
  color: var(--text-muted);
}

.rows {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.rows button {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 14px 0 16px;
  border: 0;
  border-bottom: 1px solid #232629;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.rows button:last-child { border-bottom: 0; }
.rows button:hover { background: rgba(255, 255, 255, 0.03); }
.rows__ico {
  flex: none;
  color: var(--text-secondary);
}
.rows button span { flex: 1; min-width: 0; }
.rows__value {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.rows__chev {
  flex: none;
  color: var(--text-muted);
}
.rows button strong {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Me sub-screens */
.me-page-title {
  margin: 0 0 12px;
  font-family: var(--font-ui);
  font-size: var(--text-xl);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.me-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.me-card--list { gap: 10px; }
.me-card__identity {
  display: flex;
  align-items: center;
  gap: 14px;
}
.me-card__name {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
}
.me-card__tier {
  margin: 4px 0 0;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--gold-300);
}
.me-card__heading {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.me-kv {
  display: grid;
  gap: 0;
  margin: 0;
}
.me-kv > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #232629;
  font-size: 13px;
}
.me-kv > div:last-child { border-bottom: 0; }
.me-kv dt { color: var(--text-tertiary); }
.me-kv dd {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  text-align: right;
}
.me-wallet-addr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 4px;
}
.me-wallet-addr__text {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 15px;
  color: var(--text-primary);
}
.me-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.me-balance {
  margin: 0;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--gold-300);
  line-height: 1.1;
}
.me-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.me-actions .btn,
.me-actions .btn--primary,
.me-actions .btn--ghost {
  height: var(--button-md);
  min-height: var(--button-md);
  max-height: var(--button-md);
  box-sizing: border-box;
}

/* Propose flow: no tabbar, sticky CTA */
.screen--propose {
  gap: 0;
  padding: 0;
  overflow: hidden;
  min-height: 0;
}
.screen--propose.is-active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.propose-scroll {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 16px;
  box-sizing: border-box;
  scrollbar-width: none;
}
.propose-scroll::-webkit-scrollbar { display: none; }
.screen--propose .me-page-title {
  margin: 0 0 4px;
}
.screen--propose .detail-bar {
  flex: none;
  margin-top: auto;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
}
.screen--propose .detail-bar .btn--primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: var(--button-lg);
  min-height: var(--button-lg);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--vt-gold-gradient);
  color: #060b0f;
  font-weight: 700;
  font-size: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(88, 48, 6, 0.15),
    0 7px 18px rgba(195, 160, 92, 0.18);
}
.screen--propose .detail-bar .btn--primary.is-disabled,
.screen--propose .detail-bar .btn--primary:disabled {
  background: linear-gradient(180deg, rgba(227, 203, 148, 0.45) 0%, rgba(195, 160, 92, 0.38) 100%);
  color: rgba(6, 11, 15, 0.55);
  box-shadow: none;
}
.propose-lead {
  margin: 0;
}
.propose-topics {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.propose-topic {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 14px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-02);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.propose-topic__mark {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid var(--line-medium);
  border-radius: 50%;
  box-sizing: border-box;
}
.propose-topic.is-selected {
  border-color: rgba(195, 160, 92, 0.55);
  background: rgba(195, 160, 92, 0.08);
}
.propose-topic.is-selected .propose-topic__mark {
  border-color: var(--gold-300);
  background:
    radial-gradient(circle at center, var(--gold-300) 0 5px, transparent 6px);
}
.propose-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.propose-topic-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.propose-topic-bar__value {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
}
.propose-topic-bar .textbtn {
  flex: none;
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold-300);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.propose-topic-bar .textbtn:active {
  opacity: 0.75;
}
.propose-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.propose-field__box {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.propose-input,
.propose-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  background: rgba(6, 11, 15, 0.65);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  resize: vertical;
}
.propose-textarea {
  min-height: 140px;
  resize: vertical;
}
.propose-input:focus,
.propose-textarea:focus {
  outline: none;
  border-color: rgba(195, 160, 92, 0.55);
}
.propose-count {
  align-self: flex-end;
  margin: 0;
  padding: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.propose-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
}

.me-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 12px;
}
#events-seg .chip {
  flex: 1 1 0;
  min-width: 0;
}
.me-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.me-list--card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.me-list__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #232629;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}
.me-list__row:last-child { border-bottom: 0; }
.me-list__row:hover { background: rgba(255, 255, 255, 0.03); }
.me-list__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.me-list__title {
  margin: 0;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.35;
  color: var(--text-primary);
}
.me-list__meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-tertiary);
}
.me-list__side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  max-width: 40%;
}
.me-list__value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-secondary);
  white-space: nowrap;
  text-align: right;
}
.me-list__status {
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}
.me-list__row.is-unread .me-list__title { color: var(--text-primary); }
.me-list__row.is-unread .me-list__status { color: var(--gold-300); }
.me-empty {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}
.me-empty--art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 36px 16px 32px;
}
.me-empty__art {
  display: block;
  width: min(168px, 62%);
  height: auto;
  color: #9a9384;
}
.me-empty__copy {
  margin: 0;
  max-width: 240px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-tertiary);
}
.me-help article {
  padding-bottom: 14px;
  border-bottom: 1px solid #232629;
}
.me-help article:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}
.me-help h2 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.me-help p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
#events-browse { margin-top: 14px; }
.me-settings-rows .rows__static {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid #232629;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}
.me-settings-rows .rows__static span:nth-child(2) { flex: 1; }
.switch {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 26px;
  flex: none;
  cursor: pointer;
}
.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.switch__ui {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--surface-03);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
  transition: background 160ms ease;
}
.switch__ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: transform 160ms ease, background 160ms ease;
}
.switch input:checked + .switch__ui {
  background: rgba(195, 160, 92, 0.28);
  box-shadow: inset 0 0 0 1px rgba(195, 160, 92, 0.45);
}
.switch input:checked + .switch__ui::after {
  transform: translateX(18px);
  background: var(--gold-300);
}
.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.iconbtn__badge.is-hidden { display: none; }

/* =============================== tabbar =============================== */
/* Floating pill dock + orb — colors unchanged (gold active / muted idle) */

.tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px calc(18px + env(safe-area-inset-bottom, 0px));
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  z-index: 4;
  pointer-events: none;
}
/* Bottom fade — light enough that glass can frost content behind */
.tabbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 11, 15, 0) 0%,
    rgba(6, 11, 15, 0.22) 48%,
    rgba(6, 11, 15, 0.48) 100%
  );
  pointer-events: none;
  z-index: 0;
}
.tabbar__dock {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 0;
  min-height: 72px;
  padding: 6px;
  border: 1px solid rgba(201, 194, 181, 0.44);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(30, 35, 43, 0.94), rgba(11, 16, 21, 0.97));
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  pointer-events: auto;
}
.tabbar__thumb {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 72px;
  height: 52px;
  border-radius: 6px;
  border: 0;
  background:
    radial-gradient(
      circle,
      rgba(195, 160, 92, 0.22),
      rgba(195, 160, 92, 0.08) 65%,
      transparent 100%
    );
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transform: translate(8px, 6px);
  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    width 360ms cubic-bezier(0.22, 1, 0.36, 1),
    height 360ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.tab {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 56px;
  padding: 8px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--nav-inactive);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  transition:
    color 160ms var(--ease-premium),
    transform 160ms var(--ease-premium);
}
.tab:active { transform: scale(0.985); }
.tab .ico { width: 22px; height: 22px; color: inherit; }
.tab.is-active,
.tab.is-active:hover,
.tab.is-active:focus,
.tab.is-active:focus-visible {
  background: transparent;
  color: var(--gold-300);
  box-shadow: none;
  border: 0;
  outline: none;
  font-weight: 600;
}
.tab.is-active .ico { color: var(--gold-300); }

/* ============================ info sheet ============================ */

.sheet {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet[hidden] { display: none !important; }
.sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(6, 11, 15, 0.58);
  cursor: pointer;
}
.sheet__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--bg-base);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.45);
  color: var(--fg);
  animation: sheet-up 220ms var(--ease) both;
}
.sheet__handle {
  width: 40px;
  height: 4px;
  margin: 2px auto 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
}
.sheet__panel h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.sheet__panel p {
  margin: 0;
  color: var(--fg-2);
  font-size: 14px;
  line-height: 1.55;
}
@keyframes sheet-up {
  from { transform: translateY(18px); opacity: 0.7; }
  to { transform: none; opacity: 1; }
}
@keyframes swap-sheet-up {
  from { transform: translateY(100%); opacity: 0.85; }
  to { transform: none; opacity: 1; }
}
@keyframes swap-sheet-down {
  from { transform: none; opacity: 1; }
  to { transform: translateY(100%); opacity: 0.85; }
}
@keyframes swap-sheet-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* =============================== toast =============================== */

.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 96px;
  z-index: 30; /* above the Get SIPV and Convert sheets */
  width: auto;
  max-width: none;
  transform: translateY(14px);
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background-color: rgba(245, 243, 238, 0.06);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(245, 243, 238, 0.08);
  color: var(--fg);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  visibility: hidden;
  pointer-events: none;
  transition: transform var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.toast.is-shown {
  visibility: visible;
  transform: translateY(0);
}

/* ============================= responsive ============================= */
/* Desktop-app layout (sidebar, wide grids) — never apply inside Mobile app
   phone preview, or the shell and in-phone UI fight each other. */

@media (min-width: 768px) {
  body:not(.preview-device) .topbar {
    min-height: 76px;
    padding: var(--s-4) clamp(28px, 4vw, 64px) var(--s-4) 116px;
  }

  body:not(.preview-device) .brand__mark { width: 36px; height: 36px; }
  body:not(.preview-device) .brand__name { font-size: 24px; }
  body:not(.preview-device) .brand__tag { font-size: 12px; }

  body:not(.preview-device) .screen {
    width: calc(100% - 88px);
    max-width: calc(100% - 88px);
    margin-left: 88px;
    padding: clamp(24px, 3vw, 48px) clamp(28px, 4vw, 64px) 48px;
  }

  body:not(.preview-device) .tabbar {
    top: 76px;
    right: auto;
    bottom: 24px;
    left: 12px;
    width: 72px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 0;
  }
  body:not(.preview-device) .tabbar::before { display: none; }
  body:not(.preview-device) .tabbar__dock {
    flex: none;
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 0;
    padding: 8px 6px;
    border-radius: 6px;
  }
  body:not(.preview-device) .tab { min-height: 56px; gap: 4px; font-size: 10.5px; }
  body:not(.preview-device) .tab .ico { width: 22px; height: 22px; }

  body:not(.preview-device) #screen-home .connect-card {
    max-width: 400px;
    padding: var(--s-6) clamp(28px, 4vw, 40px);
  }

  body:not(.preview-device) #wallet-scope {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
    grid-template-areas:
      "account account"
      "tokens asset"
      "tokens vote";
    align-items: start;
    gap: var(--s-4);
  }
  body:not(.preview-device) #wallet-scope > .acct { grid-area: account; }
  body:not(.preview-device) #wallet-scope > .balance-section { grid-area: tokens; }
  body:not(.preview-device) #wallet-scope > .club-reserve { grid-area: asset; }
  body:not(.preview-device) #wallet-scope > .panel--proto { grid-area: vote; }

  body:not(.preview-device) #screen-shop > *,
  body:not(.preview-device) #screen-dao > * {
    width: 100%;
    max-width: 1180px;
    margin-right: auto;
    margin-left: auto;
  }
  body:not(.preview-device) #screen-shop .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body:not(.preview-device) #screen-shop .drop-card {
    width: calc(100% + (2 * var(--space-5)));
    max-width: none;
    margin-left: calc(-1 * var(--space-5));
    margin-right: calc(-1 * var(--space-5));
    min-height: 0;
    padding: 0;
    border-radius: 0;
  }

  body:not(.preview-device) #screen-tx,
  body:not(.preview-device) #screen-proposal,
  body:not(.preview-device) #screen-me,
  body:not(.preview-device) #screen-item {
    align-items: center;
  }
  body:not(.preview-device) #screen-tx > *,
  body:not(.preview-device) #screen-proposal > *,
  body:not(.preview-device) #screen-me > * { width: 100%; max-width: 720px; }
  body:not(.preview-device) #screen-item > * { width: 100%; max-width: 900px; }
  body:not(.preview-device) #screen-tx > .backbtn,
  body:not(.preview-device) #screen-proposal > .backbtn,
  body:not(.preview-device) #screen-item > .backbtn { align-self: center; }

  body:not(.preview-device) .toast {
    left: calc(88px + 16px);
    right: 16px;
    bottom: 32px;
  }
}

@media (min-width: 768px) and (max-width: 960px) {
  body:not(.preview-device) #wallet-scope {
    grid-template-columns: 1fr;
    grid-template-areas:
      "account"
      "tokens"
      "asset"
      "vote";
    max-width: 720px;
  }
  body:not(.preview-device) #screen-shop .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile app presentation shell — always on for body.preview-device,
   not gated by viewport width (narrow previews were falling back to full-bleed). */
.view-switcher {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  display: none;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: rgba(6, 11, 15, 0.76);
  -webkit-backdrop-filter: blur(16px) saturate(118%);
  backdrop-filter: blur(16px) saturate(118%);
  transform: translateX(-50%);
  box-shadow: 0 14px 38px -22px rgba(0, 0, 0, 0.85);
}
body.preview-device .view-switcher,
body.preview-web .view-switcher {
  display: flex;
}
.view-switcher button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 13px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg-muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.view-switcher button.is-active {
  background: rgba(245, 243, 238, 0.075);
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--border);
}

body.preview-device .stage {
  display: grid;
  grid-template-columns: minmax(280px, 390px);
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vw, 64px);
  max-width: 1400px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 64px clamp(16px, 3vw, 64px) 28px;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 20%, rgba(195, 160, 92, 0.12), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(195, 160, 92, 0.05), transparent 36%),
    linear-gradient(180deg, #060b0f 0%, #060b0f 48%, #060b0f 100%);
}
body.preview-device .device {
  position: relative;
  width: min(390px, 100%);
  height: min(844px, calc(100dvh - 96px));
  max-width: 390px;
  padding: 10px;
  border-radius: 6px;
  background: linear-gradient(145deg, #1e232b 0%, #0b1015 40%, #060b0f 100%);
  box-shadow:
    0 0 0 1px rgba(201, 194, 181, 0.28),
    0 44px 110px -32px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  z-index: 2;
  overflow: hidden;
}
body.preview-device .device::before,
body.preview-device .device::after {
  content: "";
  position: absolute;
  right: -3px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #1e232b;
}
body.preview-device .device::before { top: 160px; height: 68px; }
body.preview-device .device::after { top: 246px; height: 98px; }
body.preview-device .device__notch {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 8;
  display: block;
  width: 104px;
  height: 26px;
  border-radius: var(--r-pill);
  background: #060b0f;
  transform: translateX(-50%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}
/* Inner screen radius ≈ device radius − padding (44 − 10), keep slightly tighter so corners sit inside the bezel */
body.preview-device .app {
  border-radius: 6px;
  overflow: hidden;
}

body.preview-device .topbar {
  min-height: 72px;
  padding: 44px var(--space-5) 12px;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
}
body.preview-device .topbar.topbar--back {
  padding: 44px var(--space-5) 0;
}
body.preview-device .tx-bar {
  padding-top: 44px;
}
body.preview-device .brand__mark { width: 32px; height: 32px; }
body.preview-device .brand__name { font-size: 20px; }
body.preview-device .brand__tag { font-size: 11px; }

body.preview-device .screen {
  margin-left: 0;
  padding: var(--space-4) var(--space-5) 110px;
  align-items: stretch;
  gap: var(--space-7);
}
body.preview-device .screen.screen--detail,
body.preview-device .screen.screen--propose {
  padding: 0;
  gap: 0;
  overflow: hidden;
}
body.preview-device .tabbar {
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 0 20px calc(18px + env(safe-area-inset-bottom, 0px));
  border: 0;
}
body.preview-device .tabbar::before {
  display: block;
}
body.preview-device .tabbar__dock {
  flex: 1;
  grid-template-columns: repeat(5, 1fr);
  min-height: 72px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid rgba(201, 194, 181, 0.46);
  background: linear-gradient(180deg, rgba(30, 35, 43, 0.93), rgba(11, 16, 21, 0.96));
  box-shadow:
    0 14px 42px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
}
body.preview-device .tab { min-height: 56px; gap: 3px; font-size: 10.5px; }
body.preview-device .tab .ico { width: 21px; height: 21px; }

body.preview-device #screen-home .connect-card {
  max-width: 340px;
  padding: 28px 22px 24px;
}
body.preview-device #wallet-scope {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  min-width: 0;
}
body.preview-device #screen-shop > *,
body.preview-device #screen-dao > * {
  width: auto;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}
body.preview-device #screen-shop .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.preview-device #screen-shop .drop-card {
  width: calc(100% + (2 * var(--space-5)));
  max-width: none;
  margin-left: calc(-1 * var(--space-5));
  margin-right: calc(-1 * var(--space-5));
  min-height: 0;
  padding: 0;
  border-radius: 0;
}
body.preview-device #screen-tx,
body.preview-device #screen-proposal,
body.preview-device #screen-propose,
body.preview-device #screen-propose-detail,
body.preview-device #screen-me,
body.preview-device #screen-profile,
body.preview-device #screen-wallet,
body.preview-device #screen-loyalty,
body.preview-device #screen-orders,
body.preview-device #screen-events,
body.preview-device #screen-notify,
body.preview-device #screen-settings,
body.preview-device #screen-help,
body.preview-device #screen-item { align-items: stretch; }
body.preview-device #screen-tx > *,
body.preview-device #screen-proposal > *,
body.preview-device #screen-propose > *,
body.preview-device #screen-propose-detail > *,
body.preview-device #screen-me > *,
body.preview-device #screen-profile > *,
body.preview-device #screen-wallet > *,
body.preview-device #screen-loyalty > *,
body.preview-device #screen-orders > *,
body.preview-device #screen-events > *,
body.preview-device #screen-notify > *,
body.preview-device #screen-settings > *,
body.preview-device #screen-help > *,
body.preview-device #screen-item > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
body.preview-device #screen-tx > .backbtn,
body.preview-device #screen-proposal > .backbtn,
body.preview-device #screen-item > .backbtn { align-self: flex-start; }
body.preview-device .toast {
  left: 16px;
  right: 16px;
  bottom: 96px;
}


@media (max-width: 860px) {
  body.preview-device .stage {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-top: 72px;
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar,
  .tabbar,
  .view-switcher,
  .toast { background-color: rgba(245, 243, 238, 0.1); }
  .connect-card,
  .acct,
  .tcard,
  .panel,
  .balbar,
  .drop-card,
  .card,
  .prop,
  .profile,
  .rows,
  .minicard {
    background-color: var(--card-fill);
  }
}

@media (max-width: 767px) {
  .connect-card { margin-top: 0; }
}

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

/* =========================================================================
   Investor demo flows — redemption, orders, Club Collection, wallet confirm
   ========================================================================= */

body.preview-device #screen-redeem,
body.preview-device #screen-order,
body.preview-device #screen-reserve { align-items: stretch; }
body.preview-device #screen-tasks { align-items: stretch; }
body.preview-device #screen-order > *,
body.preview-device #screen-reserve > *,
body.preview-device #screen-tasks > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
body:not(.preview-device) #screen-redeem,
body:not(.preview-device) #screen-order,
body:not(.preview-device) #screen-reserve,
body:not(.preview-device) #screen-tasks { align-items: center; }
body:not(.preview-device) #screen-redeem > * { width: 100%; max-width: 900px; }
body:not(.preview-device) #screen-order > *,
body:not(.preview-device) #screen-reserve > *,
body:not(.preview-device) #screen-tasks > * { width: 100%; max-width: 720px; }
#screen-redeem .detail-body > * { flex: none; }

.demo-flag {
  margin: -8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-tertiary);
}
.demo-flag a { color: var(--asset); }

/* --- Club Collection ---------------------------------------------------- */

.reserve-list__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
#reserve-list { margin: 0 -16px -18px; }
.reserve-row { cursor: default; }
.reserve-row:hover { background: transparent; }

/* --- price chart (Get SIPV) ---------------------------------------------- */

.price-chart {
  margin: 0 0 var(--s-3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.price-chart__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.price-chart__now {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.price-chart__now strong { font-size: 16px; color: var(--text-primary); }
.price-chart__delta { font-size: 12px; color: var(--success); }
.price-chart__delta.is-down { color: var(--bad); }
.price-chart__plot svg { display: block; width: 100%; height: 72px; overflow: visible; }
.price-chart__plot .chart__line { vector-effect: non-scaling-stroke; }
.price-chart__plot .chart__dot { opacity: 1; transform: none; }
.price-chart__note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

/* --- redeem ------------------------------------------------------------- */

.redeem-item {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.redeem-item__art {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background-color: var(--bg-elev);
}
.redeem-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line-subtle);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.choice:hover { border-color: var(--line-medium); }
.choice.is-selected {
  border-color: var(--gold-line-strong);
  background: var(--gold-soft);
  color: var(--text-primary);
}
.choice__code {
  flex: none;
  font-size: 11px;
  color: var(--text-tertiary);
}
.choice.is-selected .choice__code { color: var(--gold-300); }
.choice__name { font-weight: 600; }
.choice__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.choice__meta {
  font-size: 12px;
  color: var(--text-tertiary);
}
.choice__fee {
  flex: none;
  font-size: 12px;
  color: var(--text-secondary);
}

.redeem-address {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.redeem-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
  cursor: pointer;
}
.redeem-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--gold-400);
}

/* --- order detail ------------------------------------------------------- */

.order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.order-head .me-page-title { margin-top: 4px; }
.order-head .badge { flex: none; margin-top: 2px; }

.order-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.order-step {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
}
.order-step:last-child { padding-bottom: 0; }
.order-step::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--line-subtle);
}
.order-step:last-child::before { display: none; }
.order-step.is-done::before { background: var(--gold-line); }
.order-step__dot {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 2px solid var(--line-medium);
  border-radius: 50%;
  background: var(--bg-base);
  box-sizing: border-box;
}
.order-step.is-done .order-step__dot {
  border-color: var(--gold-400);
  background: var(--gold-400);
}
.order-step.is-current .order-step__dot {
  border-color: var(--gold-300);
  box-shadow: 0 0 0 4px var(--gold-soft);
}
.order-step__label {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary);
}
.order-step.is-done .order-step__label,
.order-step.is-current .order-step__label { color: var(--text-primary); }
.order-step__note {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-tertiary);
}
.me-list__status.is-live { color: var(--gold-300); }

/* --- wallet confirm (demo) --------------------------------------------- */

.wallet-sheet { z-index: 30; }
.wallet-sheet__panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wallet-sheet__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wallet-sheet__head h3 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.wallet-sheet__ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--gold-soft);
  color: var(--gold-300);
}
.wallet-sheet__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wallet-sheet__actions[hidden],
.wallet-sheet__state[hidden] { display: none; }
.wallet-sheet__state {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  font-size: 14px;
  color: var(--text-secondary);
}
.wallet-sheet__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-medium);
  border-top-color: var(--gold-300);
  border-radius: 50%;
  animation: wallet-spin 0.8s linear infinite;
}
@keyframes wallet-spin { to { transform: rotate(360deg); } }
.wallet-sheet__demo {
  margin: 0;
  font-size: 11px;
  text-align: center;
  color: var(--text-muted);
}

/* --- demo controls (outside the app frame) ----------------------------- */

.demo-bar { display: none; }
@media (min-width: 768px) {
  body.preview-device .demo-bar,
  body.preview-web .demo-bar {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 3px 3px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-pill);
    background: rgba(6, 11, 15, 0.76);
    -webkit-backdrop-filter: blur(16px) saturate(118%);
    backdrop-filter: blur(16px) saturate(118%);
  }
}
.demo-bar__tag {
  margin-right: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-300);
}
.demo-bar__btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg-muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.demo-bar__btn:hover {
  background: rgba(245, 243, 238, 0.075);
  color: var(--fg);
}
.wallet-sheet__addr { text-transform: none; letter-spacing: 0; }

/* --- Home: SIPV card, market overview, top holdings ---------------------- */

.viq-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.viq-card__price {
  flex: none;
  margin: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.viq-card__delta { font-size: 12px; color: var(--success); }
.viq-card__delta.is-down { color: var(--bad); }
.viq-card__usd {
  margin: 0;
  font-size: clamp(28px, 7vw, 34px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.viq-card__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-tertiary);
}
.viq-chart {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.viq-chart__plot svg { display: block; width: 100%; height: 84px; overflow: visible; }
.viq-chart__plot .chart__line { vector-effect: non-scaling-stroke; }
.viq-chart__plot .chart__dot { opacity: 1; transform: none; }
.chart__line.is-down { stroke: var(--bad); }
.viq-chart__ranges {
  display: flex;
  gap: 4px;
  align-self: flex-end;
}
.viq-range {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-tertiary);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.viq-range.is-active {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold-200);
}

.market {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.market__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}
.market__head h2 { margin: 0; }
.market__src { font-size: 11px; color: var(--text-muted); }
.market-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mtile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 6px;
  background: #0e151c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.mtile--wide {
  grid-column: 1 / -1;
  padding: 16px;
  background:
    radial-gradient(circle at 92% 0%, rgba(195, 160, 92, 0.1), transparent 46%),
    #0e151c;
}
.mtile__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.mtile__value {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.mtile--wide .mtile__value { font-size: 26px; color: var(--gold-300); }
.mtile__chg { font-size: 12px; color: var(--success); }
.mtile__chg.is-down { color: var(--bad); }
.mtile__note { font-size: 12px; color: var(--text-tertiary); }

.holdings {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.holdings__head {
  display: flex;
  justify-content: space-between;
}
.holdings__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.holding {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #232629;
}
.holding:last-child { border-bottom: 0; }
.holding__rank {
  flex: none;
  width: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.holding__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.holding__name {
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.holding__bar {
  display: block;
  height: 3px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}
.holding__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold-400);
}
.holding__share {
  flex: none;
  font-size: 12px;
  color: var(--text-secondary);
}

@media (min-width: 768px) {
  body:not(.preview-device) #wallet-scope {
    grid-template-areas:
      "account account"
      "tokens asset"
      "market asset";
  }
  body:not(.preview-device) #wallet-scope > .market { grid-area: market; }
  body:not(.preview-device) #wallet-scope > * { min-width: 0; }
  body:not(.preview-device) .market-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- Convert sheet: direction toggle and lock --------------------------- */

.dir-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: var(--s-3);
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.04);
}
.dir-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-tertiary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.dir-toggle__btn.is-active {
  background: var(--gold-soft);
  color: var(--gold-200);
}
.dir-toggle__lock { opacity: 0.8; }

.cv-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  border-radius: 6px;
  background: var(--bg-card);
  text-align: center;
}
.cv-locked[hidden],
#cv-core[hidden],
#cv-meta[hidden] { display: none !important; }
.cv-locked__ico,
.task-unlock__ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: var(--gold-soft);
  color: var(--gold-300);
}
.cv-locked h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.cv-locked p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.cv-locked .task-meter { width: 100%; }
.cv-locked__count { font-size: 12px; color: var(--text-tertiary) !important; }

/* --- Task Center -------------------------------------------------------- */

.task-meter {
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.task-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold-400);
  transition: width 0.3s var(--ease);
}
.task-meter--sm { height: 4px; margin-top: 4px; }

.task-unlock__top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.task-unlock__top .me-note { margin-top: 2px; }
.task-unlock__count {
  margin: 0;
  font-size: 12px;
  color: var(--text-tertiary);
}
.task-unlock.is-unlocked .task-unlock__ico {
  background: rgba(110, 158, 116, 0.14);
  color: var(--success);
}

.task-list { margin: 0 -16px -18px; }
.task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #232629;
}
.task:last-child { border-bottom: 0; }
.task__check {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.5px solid var(--line-medium);
  border-radius: 50%;
  color: transparent;
}
.task.is-done .task__check {
  border-color: var(--success);
  background: var(--success);
  color: var(--text-dark);
}
.task__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.task__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.task.is-done .task__title { color: var(--text-secondary); }
.task__note {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-tertiary);
}
.task__side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.task__count { font-size: 12px; color: var(--text-secondary); }
.task__side .btn { white-space: nowrap; }

/* --- Launchpad ---------------------------------------------------------- */

body.preview-device #screen-launch,
body.preview-device #screen-round { align-items: stretch; }
body.preview-device #screen-launch > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
body:not(.preview-device) #screen-launch,
body:not(.preview-device) #screen-round { align-items: center; }
body:not(.preview-device) #screen-launch > * { width: 100%; max-width: 900px; }
body:not(.preview-device) #screen-round > * { width: 100%; max-width: 900px; }
#screen-round .detail-body > * { flex: none; }

.launch-bar {
  display: block;
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.launch-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  transition: width 0.4s var(--ease);
}
.launch-bar--lg { height: 8px; border-radius: 6px; }

/* Home teaser */
.launch-teaser {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--gold-line-soft);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(195, 160, 92, 0.16), transparent 52%),
    var(--bg-card);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.launch-teaser__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-tertiary);
}
.launch-teaser__kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-300);
}
.launch-teaser__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.launch-teaser__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Launchpad list */
.launch-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 18px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 8%, rgba(195, 160, 92, 0.18), transparent 46%),
    linear-gradient(160deg, #1e232b 0%, #0b1015 100%);
}
.launch-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-300);
}
.launch-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--text-editorial);
}
.launch-hero p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.launch-hero .stats { margin-top: 4px; }

.launch-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.launch-group__sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.launch-group__sec h2 { margin: 0 2px; }

.lcard {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lcard--live { box-shadow: inset 0 0 0 1px var(--gold-line-soft); }
.lcard__art {
  position: relative;
  flex: none;
  width: 92px;
  border-radius: 6px;
  background-color: var(--bg-elev);
}
.lcard__art .badge {
  position: absolute;
  left: 6px;
  top: 6px;
  height: 22px;
  padding: 0 8px;
  font-size: 10.5px;
}
.lcard--ended .lcard__art { filter: saturate(0.6) brightness(0.8); }
.lcard__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lcard__body .lbl { font-size: 10.5px; }
.lcard__name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}
.lcard__meta,
.lcard__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.lcard__foot { color: var(--text-tertiary); }
.lcard--live .lcard__foot > :last-child { color: var(--gold-300); }

.launch-how {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: how;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.launch-how li {
  counter-increment: how;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 34px;
  font-size: 13px;
}
.launch-how li::before {
  content: counter(how);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-300);
  font-family: var(--font-mono);
  font-size: 11px;
}
.launch-how b { color: var(--text-primary); font-weight: 600; }
.launch-how span { color: var(--text-tertiary); line-height: 1.45; }

/* Round detail */
.round-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.round-head .me-page-title { margin: 0; }
.round-head__clock {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--gold-300);
}
.round-raise {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.round-raise__amt {
  margin: 4px 0 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--gold-300);
}
.round-raise__of {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text-tertiary);
}
.round-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.round-mine { box-shadow: inset 0 0 0 1px var(--gold-line-soft); }
.round-mine__demo {
  align-self: center;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--text-tertiary);
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.round-mine__demo:hover { color: var(--gold-300); }
.round-docs {
  display: flex;
  flex-direction: column;
  margin: 0 -16px -18px;
}
.round-docs button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-top: 1px solid #232629;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.round-docs button .ico { color: var(--text-tertiary); }
.lcard__foot > * { white-space: nowrap; }

/* --- Trust details: vault record, reserve check, allocation tiers ------- */

.vault-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vault-card__head .me-note { margin-top: 2px; }
.vault-card__ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: rgba(110, 158, 116, 0.12);
  color: var(--success);
}
.vault-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.vault-checks li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-secondary);
}
.vault-checks .ico { flex: none; margin-top: 2px; color: var(--success); }
#screen-item .detail-body > .vault-card { flex: none; }

.tier-table {
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line-subtle);
}
.tier-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #232629;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.tier-row:last-child { border-bottom: 0; }
.tier-row__name { font-weight: 600; color: var(--text-primary); }
.tier-row__cap { text-align: right; }
.tier-row.is-mine { background: var(--gold-soft); }
.tier-row.is-mine .tier-row__name,
.tier-row.is-mine .tier-row__cap { color: var(--gold-200); }
.round-rules {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.round-rules li::marker { color: var(--gold-400); }

.redeem-gift { font-weight: 500; color: var(--text-primary); }

/* --- Vote links, lock-up, invites, proof of reserve --------------------- */

body.preview-device #screen-lock,
body.preview-device #screen-por { align-items: stretch; }
body.preview-device #screen-por > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
body:not(.preview-device) #screen-lock,
body:not(.preview-device) #screen-por { align-items: center; }
body:not(.preview-device) #screen-lock > *,
body:not(.preview-device) #screen-por > * { width: 100%; max-width: 720px; }
#screen-lock .detail-body > * { flex: none; }

.round-vote {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 10px;
  border: 1px solid var(--gold-line-soft);
  border-radius: var(--r-pill);
  background: var(--gold-soft);
  color: var(--gold-200);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.lock-card__ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--gold-soft);
  color: var(--gold-300);
}
.lock-list:empty { display: none; }
.lock-list { margin: 0 -16px; border-top: 1px solid #232629; border-bottom: 1px solid #232629; }
.tier-row__cap .mono { color: inherit; }

.invite-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--gold-line);
  border-radius: 6px;
  background: var(--gold-soft);
}
.invite-code__value {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-200);
}
.invite-list { margin: 0 -16px; border-top: 1px solid #232629; }
.invite-list:empty { display: none; }

.por-ok { color: var(--success); font-weight: 600; }

/* ===================== Launch tab · SIPV project page ===================== */
#screen-launch { gap: 14px; }
#screen-launch > * { flex: none; }

.pj-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 236px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(6, 11, 15, 0.05) 0%, rgba(6, 11, 15, 0.55) 52%, rgba(6, 11, 15, 0.94) 100%),
    url("assets/viq-campaign-hero.jpg") center 30% / cover no-repeat;
}
.pj-hero__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}
.pj-kicker {
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.pj-hero__id { display: flex; align-items: center; gap: 12px; }
.pj-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  background: rgba(11, 16, 21, 0.72);
}
.pj-hero h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-editorial);
}
.pj-by { margin: 4px 0 0; font-size: 12px; color: var(--text-secondary); }
.pj-tagline {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.3;
  color: var(--gold-200);
}

/* key figures */
.pj-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pj-fig {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 13px 14px;
  border-radius: 6px;
  background: var(--bg-card);
}
.pj-fig__label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.pj-fig__value { font-size: 20px; font-weight: 500; color: var(--text-primary); }
.pj-fig__note { font-size: 11.5px; line-height: 1.35; color: var(--text-secondary); }
.pj-fig--tbc { background: transparent; box-shadow: inset 0 0 0 1px var(--gold-line); border: 0; }
.pj-fig--tbc .pj-fig__value { font-size: 15px; color: var(--gold-200); }
.pj-gold { color: var(--gold-300); }

.pj-text { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); }
.pj-note {
  padding: 12px 14px;
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  background: var(--gold-soft);
}
.pj-note strong { font-size: 13px; color: var(--gold-200); }
.pj-note p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); }

.pj-facts { margin: 0; padding: 0; list-style: none; }
.pj-facts li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 0;
  border-top: 1px solid #232629;
}
.pj-facts li:first-child { border-top: 0; padding-top: 0; }
.pj-facts b { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.pj-facts span { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }

.pj-pill { grid-column: 2; grid-row: 1 / span 2; }

.pj-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}
.pj-pill--ok { background: var(--success-soft); color: var(--success); }
.pj-pill--live { background: var(--gold-soft); color: var(--gold-200); }


.pj-docs { margin: 0; padding: 0; list-style: none; }
.pj-docs li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  border-top: 1px solid #232629;
  font-size: 13.5px;
  color: var(--text-primary);
}
.pj-docs li:first-child { border-top: 0; }
/* Each document has one control on the right: Upcoming (not yet published) or Open. */
.pj-docbtn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 88px;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.pj-docbtn--open { background: var(--gold-soft); color: var(--gold-200); }
.pj-docbtn--open .ico { margin-right: -4px; }
.pj-docbtn:hover,
.pj-docbtn:focus-visible { filter: brightness(1.18); }

.pj-risk {
  margin: 6px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line-subtle);
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-tertiary);
}
.pj-risk b { color: var(--text-secondary); }

.pj-h {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.pj-cols { display: flex; flex-direction: column; gap: 14px; }
.pj-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.pj-batches {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pj-batches li { display: flex; align-items: flex-start; gap: 12px; }
.pj-batches .pj-pill { flex: none; width: 74px; margin-top: 1px; text-align: center; }
.pj-batches b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.pj-batches span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); }
.pj-pill--done { background: rgba(255, 255, 255, 0.09); color: var(--text-primary); }

/* Desktop app: wide hero, three-up figures, main column + documents sidebar */
body:not(.preview-device) #screen-launch { align-items: center; }
body:not(.preview-device) #screen-launch > * { width: 100%; max-width: 1040px; }
@media (min-width: 768px) {
  body:not(.preview-device) .pj-hero { min-height: 320px; }
  body:not(.preview-device) .pj-hero__body { padding: 28px 32px; }
  body:not(.preview-device) .pj-hero h1 { font-size: 64px; }
  body:not(.preview-device) .pj-tagline { font-size: 24px; }
  body:not(.preview-device) .pj-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body:not(.preview-device) .pj-facts li { flex-direction: row; gap: 16px; }
  body:not(.preview-device) .pj-facts b { flex: none; width: 140px; }
}
@media (min-width: 1100px) {
  body:not(.preview-device) .pj-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
  body:not(.preview-device) .pj-col--side { position: sticky; top: 0; }
}

/* ===================== Conversion quota · check-in ===================== */
#convert-sheet .swap-cta[hidden],
.cv-quota[hidden],
.cv-tasks[hidden] { display: none !important; }

.task__reward {
  align-self: flex-start;
  margin-top: 3px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--gold-soft);
  font-size: 11px;
  color: var(--gold-200);
}
.task.is-done .task__reward { background: rgba(255, 255, 255, 0.05); color: var(--text-tertiary); }
.task__state { font-size: 12px; font-weight: 600; color: var(--success); white-space: nowrap; }
.task.is-claimable { background: linear-gradient(90deg, rgba(195, 160, 92, 0.08), transparent 70%); }
.task.is-claimable .task__check { border-color: var(--gold-400); }

.cv-quota {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 6px;
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}
.cv-quota__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.cv-quota__value { margin: 2px 0 0; font-size: 13px; color: var(--text-secondary); }
.cv-quota__value strong { font-size: 24px; font-weight: 500; color: var(--gold-200); }
.cv-quota.is-empty .cv-quota__value strong { color: var(--text-primary); }
.cv-quota__cap { font-size: 11px; color: var(--text-tertiary); text-align: right; }
.cv-quota__note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-secondary); }

.cv-tasks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 0;
  border-radius: 6px;
  background: var(--bg-card);
  overflow: hidden;
}
.cv-tasks__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.cv-tasks__title { margin: 0; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.cv-tasks__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--gold-300);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

/* Direction toggle stays put above the scrolling body, so the member always sees which way they convert. */
.cv-dirbar { flex: none; padding: 4px 18px 0; }
/* Inside the scrolling sheet body these must keep their height, not shrink to fit. */
.cv-quota,
.cv-tasks { flex: none; }
.cv-dirbar .dir-toggle { margin-bottom: 8px; }
.cv-quota__go { margin-top: 4px; }
.cv-quota__go[hidden] { display: none !important; }
.cv-quota.is-bumped { animation: cv-bump 1.2s ease-out; }
.cv-quota.is-bumped .cv-quota__value strong { animation: cv-bump-num 1.2s ease-out; }
@keyframes cv-bump {
  0% { box-shadow: inset 0 0 0 1px var(--gold-line), 0 0 0 0 rgba(195, 160, 92, 0.55); }
  40% { box-shadow: inset 0 0 0 1.5px var(--gold-400), 0 0 0 8px rgba(195, 160, 92, 0); }
  100% { box-shadow: inset 0 0 0 1px var(--gold-line), 0 0 0 0 rgba(195, 160, 92, 0); }
}
@keyframes cv-bump-num {
  0% { transform: scale(1); }
  30% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.cv-quota__value strong { display: inline-block; transform-origin: left bottom; }
.task-list--sheet { margin: 0 -16px; }

.quota-card__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.quota-card__value { margin: 2px 0 0; font-size: 14px; color: var(--text-secondary); }
.quota-card__value strong { font-size: 30px; font-weight: 500; color: var(--gold-200); }
.quota-card__ready { margin: -6px 0 0; font-size: 12.5px; font-weight: 600; color: var(--gold-300); }
.quota-card__ready:empty { display: none; }

.checkin-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.checkin-card__streak { font-size: 12px; color: var(--gold-300); }
.ci-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ci-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}
.ci-day__amt { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.ci-day__lbl { font-size: 9.5px; color: var(--text-tertiary); }
.ci-day.is-bonus .ci-day__amt { color: var(--gold-300); }
.ci-day.is-done { background: var(--gold-soft); }
.ci-day.is-done .ci-day__amt { color: var(--gold-200); }
.ci-day.is-next { box-shadow: inset 0 0 0 1.5px var(--gold-400); }
#ci-btn:disabled,
#task-convert-back:disabled { opacity: 0.5; cursor: default; }
.task__side .btn--sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.cv-quota .lbl,
.quota-card__top .lbl { white-space: nowrap; }
.cv-quota__cap { max-width: 50%; }

/* ===================== Get SIPV · Uniswap-style swap ===================== */
/* Dark Uniswap palette, scoped to the sheet so it reads as the embedded Uniswap widget. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.swap-sheet__panel.uni {
  --uni-bg: #131313;
  --uni-s2: #1b1b1b;
  --uni-s3: rgba(255, 255, 255, 0.12);
  --uni-line: rgba(255, 255, 255, 0.08);
  --uni-n1: #ffffff;
  --uni-n2: #9b9b9b;
  --uni-n3: #5e5e5e;
  --uni-pink: #fc72ff;
  --uni-pink-soft: #1e232b;
  --uni-green: #21c95e;
  --uni-red: #ff593c;
  border-color: var(--uni-line);
  background: var(--uni-bg);
  color: var(--uni-n1);
  font-family: "Inter", system-ui, sans-serif;
}
.uni .mono {
  font-family: "Inter", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.uni .swap-sheet__iconbtn { color: var(--uni-n2); }
.uni-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--uni-pink);
}
.uni-brand__logo { display: block; width: auto; height: 26px; }
.uni-route { display: inline-flex; align-items: center; gap: 6px; }
.uni-route img { flex: none; }
.uni-body { gap: 0; padding: 4px 12px 24px; }

/* tabs */
.uni-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.uni-tabs__list { display: flex; gap: 2px; }
.uni-tab {
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--uni-n2);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
}
.uni-tab.is-active { background: var(--uni-s2); color: var(--uni-n1); }
.uni-gear {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--uni-n2);
  cursor: pointer;
}
.uni-gear svg,
.uni-token__chev,
.uni-flip svg,
.uni-details svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.uni-gear svg { width: 20px; height: 20px; }

/* sell / buy panels */
.uni-swap { position: relative; display: flex; flex-direction: column; gap: 4px; }
.uni-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 6px;
}
.uni-panel--in { box-shadow: inset 0 0 0 1px var(--uni-s3); }
.uni-panel--in:focus-within { background: var(--uni-s2); box-shadow: none; }
.uni-panel--out { background: var(--uni-s2); }
.uni-panel__label { font-size: 15px; color: var(--uni-n2); }
.uni-panel__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.uni-amount {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--uni-n1);
  font: inherit;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uni-amount::placeholder,
.uni-amount.is-empty { color: var(--uni-n3); }
.uni-token {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--uni-s3);
  border-radius: 6px;
  background: var(--uni-bg);
  color: var(--uni-n1);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}
.uni-token img { width: 28px; height: 28px; border-radius: 50%; }
.uni-token__chev { width: 16px; height: 16px; color: var(--uni-n2); }
.uni-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--uni-n2);
}
.uni-panel__bal { display: inline-flex; align-items: center; gap: 6px; }
.uni-max {
  padding: 2px 8px;
  border: 0;
  border-radius: 6px;
  background: var(--uni-pink-soft);
  color: var(--uni-pink);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.uni-flip {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 4px solid var(--uni-bg);
  border-radius: 6px;
  background: var(--uni-s2);
  color: var(--uni-n1);
  cursor: pointer;
  transition: transform 0.25s ease;
}
.uni-flip svg { width: 18px; height: 18px; }
.uni-flip.is-turned { transform: rotate(180deg); }

/* CTA */
.uni-cta {
  width: 100%;
  min-height: 56px;
  margin-top: 6px;
  border: 0;
  border-radius: 6px;
  background: var(--uni-pink);
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}
.uni-cta:disabled { background: var(--uni-s2); color: var(--uni-n2); cursor: default; }
.uni-cta.is-error:disabled { background: var(--uni-s2); color: var(--uni-red); }

/* rate + details */
.uni-details { margin-top: 10px; padding: 0 4px; }
.uni-details[hidden] { display: none; }
.uni-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  list-style: none;
  font-size: 13px;
  color: var(--uni-n1);
  cursor: pointer;
}
.uni-details summary::-webkit-details-marker { display: none; }
.uni-details__gas { display: inline-flex; align-items: center; gap: 4px; color: var(--uni-n2); }
.uni-details__gas svg { width: 15px; height: 15px; }
.uni-details__chev { transition: transform 0.2s ease; }
.uni-details[open] .uni-details__chev { transform: rotate(180deg); }
.uni-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--uni-n2);
}
.uni-kv strong { font-weight: 500; color: var(--uni-n1); }
.uni-auto {
  margin-right: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--uni-s2);
  font-style: normal;
  font-size: 11px;
  color: var(--uni-n2);
}
#uni-rate.is-fresh { color: var(--uni-pink); transition: color 0.3s; }

/* token header */
.uni-tokenhead {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 26px;
  padding: 18px 4px 0;
  border-top: 1px solid #232629;
}
.uni-tokenhead__id { display: flex; align-items: center; gap: 12px; }
.uni-tokenhead__id img { border-radius: 50%; }
.uni-tokenhead__name { margin: 0; font-size: 18px; font-weight: 600; }
.uni-tokenhead__meta { margin: 2px 0 0; font-size: 13px; color: var(--uni-n2); }
.uni-tokenhead__price { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.uni-tokenhead__price strong { font-size: 30px; font-weight: 500; }
.uni .price-chart__delta { font-size: 14px; color: var(--uni-green); }
.uni .price-chart__delta.is-down { color: var(--uni-red); }
.uni-muted { color: var(--uni-n2); font-size: 13px; }
.uni-chart { --asset: var(--uni-pink); }

/* transactions / pools */
.uni-activity { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.uni-activity__tabs { display: flex; gap: 18px; padding: 0 4px; }
.uni-activity__tab {
  padding: 0;
  border: 0;
  background: none;
  color: var(--uni-n2);
  font: inherit;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
}
.uni-activity__tab.is-active { color: var(--uni-n1); }
.uni-table[hidden] { display: none; }
.uni-row {
  display: grid;
  grid-template-columns: 26px 30px minmax(0, 1fr) minmax(0, 1.15fr) 94px;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  font-size: 12.5px;
  color: var(--uni-n1);
}
.uni-row--head {
  min-height: 38px;
  border-radius: 6px;
  background: var(--uni-s2);
  font-size: 12px;
  color: var(--uni-n2);
}
.uni-col-usd { display: none; }
.uni-num { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uni-wallet { overflow: visible; }
.uni-side--buy { color: var(--uni-green); }
.uni-side--sell { color: var(--uni-red); }
.uni-for { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; }
.uni-for img { flex: none; border-radius: 50%; }
.uni-wallet { color: var(--uni-n1); }
.uni-row.is-mine .uni-wallet { color: var(--uni-pink); font-weight: 600; }
.uni-row.is-fresh { animation: uni-fresh 1.4s ease-out; }
@keyframes uni-fresh {
  from { background: rgba(252, 114, 255, 0.14); }
  to { background: transparent; }
}
.uni-row--pool { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); min-height: 52px; }
.uni-pool { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.uni-pool__icons { display: inline-flex; flex: none; }
.uni-pool__icons img { border-radius: 50%; }
.uni-pool__icons img + img { margin-left: -6px; box-shadow: 0 0 0 2px var(--uni-bg); }
.uni-pool__tag {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: var(--uni-n2);
}
.uni-note { margin: 18px 4px 0; font-size: 11.5px; line-height: 1.5; color: var(--uni-n3); }

/* Wider sheets (desktop app) show the USD column like Uniswap's token page. */
@media (min-width: 768px) {
  body:not(.preview-device) .uni-row:not(.uni-row--pool) {
    grid-template-columns: 52px 52px repeat(3, minmax(0, 1fr)) 110px;
    font-size: 14px;
  }
  body:not(.preview-device) .uni-col-usd { display: block; }
}
.uni-chart .chart__line { stroke: var(--uni-pink); }
.uni-chart .chart__dot { fill: var(--uni-pink); }
#task-convert-back { flex: none; white-space: nowrap; min-height: 36px; padding: 0 16px; }
@media (min-width: 768px) {
  body:not(.preview-device) .uni-body { align-items: center; }
  body:not(.preview-device) .uni-body > * { width: 100%; max-width: 860px; }
  body:not(.preview-device) .uni-body > .uni-tabs,
  body:not(.preview-device) .uni-body > .uni-swap,
  body:not(.preview-device) .uni-body > .uni-cta,
  body:not(.preview-device) .uni-body > .uni-details { max-width: 480px; }
}

/* ============================ Venue stamps ============================ */
.stamp-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stamp-card__sub { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--text-secondary); }
.stamp-card__count {
  flex: none;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--gold-soft);
  font-size: 12px;
  color: var(--gold-200);
}
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 10px;
  margin: 0;
  padding: 6px 0 2px;
  list-style: none;
}
.stamp { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-align: center; }
.stamp__disc {
  display: grid;
  place-content: center;
  justify-items: center;
  width: 100%;
  max-width: 84px;
  aspect-ratio: 1;
  margin-bottom: 6px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  color: var(--text-tertiary);
}
.stamp__disc .ico { width: 22px; height: 22px; opacity: 0.45; }
.stamp.is-on .stamp__disc {
  border: 2px solid currentColor;
  background: radial-gradient(circle, rgba(195, 160, 92, 0.14), rgba(195, 160, 92, 0.03) 72%);
  box-shadow: inset 0 0 0 3px var(--bg-card), inset 0 0 0 4px currentColor;
  color: var(--gold-300);
  transform: rotate(var(--r, -6deg));
}
.stamp__top { font-size: 7px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.85; }
.stamp__mark { margin: 1px 0; font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1; }
.stamp__date { font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.stamp__name {
  display: -webkit-box;
  max-width: 100%;
  min-height: 2.5em; /* two lines, so the city lines stay level across a row */
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-secondary);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.stamp__city { font-size: 10px; color: var(--text-tertiary); }
.stamp.is-on .stamp__name { color: var(--text-primary); }
.stamp.is-new .stamp__disc { animation: stamp-in 0.7s cubic-bezier(0.2, 0.8, 0.3, 1.2) both; }
@keyframes stamp-in {
  0% { opacity: 0; transform: rotate(calc(var(--r) - 18deg)) scale(1.9); }
  55% { opacity: 1; transform: rotate(var(--r)) scale(0.9); }
  78% { transform: rotate(var(--r)) scale(1.05); }
  100% { transform: rotate(var(--r)) scale(1); }
}
.stamp-reward {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
  color: var(--gold-300);
}
.stamp-reward .ico { flex: none; }
.stamp-reward p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-secondary); }
.stamp-reward b { font-weight: 600; color: var(--text-primary); }
.stamp-card.is-complete .stamp-reward { background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-line); }

/* scan sheet */
.stamp-sheet { z-index: 26; }
.stamp-sheet__panel { text-align: center; }
.stamp-sheet__panel h3 { margin-bottom: 4px; }
.stamp-scan {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 20px auto 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.stamp-scan::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 3px solid var(--gold-300);
  border-radius: 6px;
  -webkit-mask:
    linear-gradient(#000 0 0) top left / 42px 42px no-repeat,
    linear-gradient(#000 0 0) top right / 42px 42px no-repeat,
    linear-gradient(#000 0 0) bottom left / 42px 42px no-repeat,
    linear-gradient(#000 0 0) bottom right / 42px 42px no-repeat;
  mask:
    linear-gradient(#000 0 0) top left / 42px 42px no-repeat,
    linear-gradient(#000 0 0) top right / 42px 42px no-repeat,
    linear-gradient(#000 0 0) bottom left / 42px 42px no-repeat,
    linear-gradient(#000 0 0) bottom right / 42px 42px no-repeat;
}
.stamp-scan__qr {
  position: absolute;
  inset: 34px;
  padding: 10px;
  border-radius: 6px;
  background: #f5f3ee;
  color: #0e151c;
  transform: rotate(-4deg);
}
.stamp-scan__qr svg { display: block; width: 100%; height: 100%; }
.stamp-scan__line {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 16px;
  z-index: 1;
  height: 2px;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent, var(--gold-300), transparent);
  box-shadow: 0 0 14px 2px rgba(195, 160, 92, 0.55);
  animation: stamp-scan 1.5s ease-in-out infinite alternate;
}
@keyframes stamp-scan {
  from { transform: translateY(0); }
  to { transform: translateY(176px); }
}
.stamp-scan__ok {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgba(6, 11, 15, 0.55);
  color: #0e151c;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.stamp-scan__ok .ico {
  width: 64px;
  height: 64px;
  padding: 16px;
  border-radius: 50%;
  background: var(--gold-300);
  transform: scale(0.6);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1.3);
}
.stamp-scan.is-done .stamp-scan__line { display: none; }
.stamp-scan.is-done .stamp-scan__ok { opacity: 1; }
.stamp-scan.is-done .stamp-scan__ok .ico { transform: scale(1); }
.stamp-sheet__panel .stamp-sheet__demo { margin-top: 10px; font-size: 11px; color: var(--text-tertiary); }


/* =========================================================================
   VALTERRA BRAND LAYER — Brand Guidelines: Web, Platform and Design (12 Nov 2026)
   Sharp 2px corners, thin gold lines, Cinzel + Montserrat, metallic gold only.
   Sits last so it wins over earlier component styles.
   ========================================================================= */
body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  background: var(--vt-midnight);
}
@media (min-width: 768px) { body { font-size: 16px; } }

/* Headings: Cinzel 600, title case, tracked. Never italic. */
h1, h2, h3,
.text-editorial-title, .whisky-title, .type-display {
  font-family: var(--font-editorial);
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: none;
}
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; letter-spacing: 0.04em; }
h3 { font-size: 18px; letter-spacing: 0.02em; }
@media (min-width: 768px) { h1 { font-size: 56px; } h2 { font-size: 36px; } h3 { font-size: 22px; } }
.connect-card h2 span,
em, i { font-style: normal; }
.connect-card h2 span {
  background: var(--vt-gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Eyebrow labels: Montserrat 600, 11px, 0.3em, uppercase */
.text-label, .eyebrow, .connect-card__kicker, .brand__tag {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: var(--vt-track-eyebrow);
  text-transform: uppercase;
}

/* Small / caption */
.text-meta, .field > span { font-size: 12px; letter-spacing: 0.01em; }

/* Buttons: min 44px, uppercase Montserrat 600 13px, 0.12em, 2px radius */
.btn {
  min-height: var(--vt-tap);
  border-radius: 6px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: var(--vt-track-button);
  text-transform: uppercase;
  transition: background var(--vt-motion), border-color var(--vt-motion), color var(--vt-motion), filter var(--vt-motion), transform 120ms ease-out;
}
.btn--sm { min-height: var(--vt-tap); font-size: 12px; padding: 0 14px; }
.btn--primary, .btn--cta {
  height: auto;
  min-height: var(--vt-tap);
  padding: 14px 28px;
  border: 0;
  border-radius: 6px;
  background: var(--vt-gold-gradient);
  color: var(--vt-midnight);
  font-weight: 600;
  box-shadow: none;
}
.btn--primary:hover, .btn--cta:hover { filter: brightness(1.08); }
.btn--ghost, .btn--proto {
  height: auto;
  min-height: var(--vt-tap);
  padding: 14px 24px;
  background: transparent;
  border: 1px solid var(--vt-gold);
  color: var(--vt-gold);
  font-weight: 600;
}
.btn--ghost:hover, .btn--proto:hover {
  background: rgba(195, 160, 92, 0.1);
  border-color: var(--vt-gold);
  color: var(--vt-gold);
  filter: none;
}

/* Cards: Panel, 1px gold-25% border, 2px radius, no heavy shadow */
.tcard, .minicard, .panel, .swap-card, .prop,
.pdetail__hero, .pdetail__quorum, .pdetail__vote,
.profile, .rows, .me-card, .me-list--card, .connect-card {
  border-radius: 6px !important;
  box-shadow: none !important;
}

/* Inputs: Panel raised, 1px stone-25% border, gold focus, no glow */
.field input {
  background: var(--vt-panel-raised);
  border: 1px solid rgba(201, 194, 181, 0.25);
  border-radius: 6px;
  color: var(--vt-ivory);
}
.field input::placeholder { color: var(--vt-muted); }
.field input:focus { border-color: var(--vt-gold); box-shadow: none; }

/* Badges / chips: 1px gold border, gold uppercase 11px, 0.2em */
.badge {
  height: auto;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid var(--vt-gold);
  border-radius: 6px;
  background: transparent;
  color: var(--vt-gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Links: gold, underline on hover */
a { color: var(--vt-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Icons: 1.5px line, gold or stone */
.ico { stroke-width: 1.5; }

/* Motion: subtle 150–250ms, no bounce */
@media (prefers-reduced-motion: no-preference) {
  * { scroll-behavior: auto; }
}


/* =========================================================================
   DEVICE SHELL — kept as the original presentation frame (phone bezel, notch,
   demo controls). Only the content inside the screen follows the brand layer.
   ========================================================================= */
body.preview-device .stage,
body.preview-web .stage {
  background:
    radial-gradient(circle at 18% 20%, rgba(43, 87, 132, 0.12), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(217, 160, 67, 0.05), transparent 36%),
    linear-gradient(180deg, #071423 0%, #06111f 48%, #040c16 100%);
}
body.preview-device .device {
  border-radius: 44px;
  background: linear-gradient(145deg, #1a2b42 0%, #0a1727 40%, #06111f 100%);
  box-shadow:
    0 0 0 1px rgba(136, 154, 181, 0.28),
    0 44px 110px -32px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
body.preview-device .device::before,
body.preview-device .device::after {
  border-radius: 0 3px 3px 0;
  background: #34322e;
}
body.preview-device .device__notch {
  border-radius: 999px;
  background: #040b14;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}
body.preview-device .app { border-radius: 30px; }
body.preview-device .topbar {
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
}

/* demo controls outside the frame */
.view-switcher,
body.preview-device .demo-bar,
body.preview-web .demo-bar {
  border: 1px solid rgba(154, 174, 197, 0.32);
  border-radius: 999px;
  background: rgba(8, 8, 7, 0.76);
  box-shadow: 0 14px 38px -22px rgba(0, 0, 0, 0.85);
}
.view-switcher button,
.demo-bar__btn {
  border-radius: 999px;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #9aa6b8;
}
.view-switcher button.is-active {
  background: rgba(242, 234, 218, 0.075);
  color: #f5f3ee;
  box-shadow: inset 0 0 0 1px rgba(154, 174, 197, 0.32);
}
.demo-bar__tag { color: var(--gold-300); letter-spacing: 0.04em; text-transform: none; }

/* Overlap fixes: keep the Mobile/Desktop switcher clear of the phone frame,
   and stop scrolled content showing through the gap under the tab dock. */
body.preview-device .stage { padding-top: 88px; }
body.preview-device .device { height: min(844px, calc(100dvh - 120px)); }
@media (max-width: 860px) { body.preview-device .stage { padding-top: 96px; } }
.tabbar::before {
  background: linear-gradient(
    180deg,
    rgba(6, 11, 15, 0) 0%,
    rgba(6, 11, 15, 0.88) 45%,
    #060b0f 100%
  );
}

/* Logo: supplied mark and stacked lockup only (no recolour, no stretch). */
.brand__lockup { height: 58px; width: auto; max-width: none; object-fit: contain; }
.brand__mark { width: auto; height: 34px; border-radius: 0; object-fit: contain; }
body.preview-device .brand__mark { width: auto; height: 34px; }
.connect-card__seal { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.connect-card__seal img { width: auto; height: 52px; border-radius: 0; object-fit: contain; }
.pj-mark img { width: auto; height: 38px; border-radius: 0; object-fit: contain; }

/* Project icon: SIPV coin artwork, shown as supplied (no frame). */
.pj-mark { border: 0; background: transparent; border-radius: 0; }
.pj-mark img { width: 52px; height: 52px; border-radius: 0; object-fit: contain; }

/* Launch page: card background #0E151C */
#screen-launch .pj-fig:not(.pj-fig--tbc) { background: #0e151c; }
#screen-launch .me-card {
  background:
    linear-gradient(#0e151c, #0e151c) padding-box,
    var(--card-stroke) border-box !important;
}

/* Me: profile card has no stroke */
.profile {
  border: 0 !important;
  background: var(--bg-card) !important;
}

/* =========================================================================
   v1 member app (live data): Test label, banners, wallet sign-in, Get SIPV,
   conversion progress, figure notes. Built on the tokens above.
   ========================================================================= */
.env-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-pill);
  color: var(--gold-300);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: var(--vt-track-button);
  text-transform: uppercase;
}
.env-tag[hidden] { display: none; }
.demo-bar[hidden] { display: none !important; }
.topbar__tools { display: flex; align-items: center; gap: 8px; }

.app-banners { display: flex; flex-direction: column; gap: 6px; padding: 0 var(--space-5); flex: none; }
.app-banners:empty { display: none; }
.banner {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-card);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
  background: var(--surface-02);
}
.banner b { color: var(--text-primary); }
.banner a, .banner .textbtn { color: var(--gold-300); }
.banner--bad { border-color: rgba(192, 87, 74, 0.5); background: var(--danger-soft); }
.banner--warn { border-color: var(--gold-line); background: var(--gold-soft); }

.connect-card--inline { max-width: none; align-self: stretch; }

.figure-note { margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: var(--text-tertiary); }
.figure-note[hidden] { display: none; }
.field-error { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: #e08a7f; }
.field-error[hidden] { display: none; }
.textbtn { background: none; border: 0; padding: 0; color: var(--gold-300); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.tcard__meta--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.market-chart { margin: 0 0 12px; }
.balance-section { display: flex; flex-direction: column; gap: var(--space-4); }

/* Get SIPV */
.buy-card { gap: 14px; }
.buy-card__head { display: flex; align-items: center; gap: 12px; }
.buy-card__name { margin: 0; font-size: 18px; font-weight: 600; color: var(--text-primary); }
.buy-card__price { display: flex; flex-direction: column; gap: 4px; }
.buy-card__price strong { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); }
.buy-closed {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--gold-line);
  border-radius: var(--r-card);
  background: var(--gold-soft);
  color: var(--text-primary);
  font-size: 14px;
}
.buy-closed p { margin: 0; }
.buy-closed .ico { color: var(--gold-300); flex: none; }
#buy-uniswap { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.is-disabled, a.btn.is-disabled { opacity: 0.45; pointer-events: auto; cursor: not-allowed; }
.addr-line, .me-wallet-addr { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.addr-line__link { display: inline-flex; align-items: center; gap: 4px; color: var(--gold-300); font-size: 12px; text-decoration: none; }
.addr-line__link[hidden] { display: none; }

/* Convert */
#cv-form { display: flex; flex-direction: column; gap: 14px; }
.cv-kv { margin: 0; }
.cv-kv dd { text-align: right; }
.cv-track { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.order-step.is-failed .order-step__dot { border-color: var(--danger); background: var(--danger); }
.order-step.is-failed .order-step__label { color: #e08a7f; }
.order-step__note a, .me-list__status a, .tx-row a { color: var(--gold-300); }

/* Wallet sign-in and signature sheets */
.wallet-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.wallet-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: var(--vt-tap);
  padding: 10px 12px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-card);
  background: var(--surface-02);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.wallet-opt:hover, .wallet-opt:focus-visible { border-color: var(--gold-line); }
.wallet-opt > span:not(.wallet-opt__ico) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.wallet-opt small { font-size: 12px; font-weight: 400; color: var(--text-tertiary); }
.wallet-opt img { border-radius: 6px; }
.wallet-opt__ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--gold-soft); color: var(--gold-300); }
.wallet-none { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.wallet-none p { margin: 0; }
.sign-text {
  max-height: 180px;
  margin: 10px 0;
  padding: 10px 12px;
  overflow: auto;
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-card);
  background: var(--surface-01);
  color: var(--text-secondary);
  font: 12px/1.5 var(--font-ui);
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

/* Venue stamp camera */
.stamp-cam { width: 100%; max-width: 280px; aspect-ratio: 1; margin: 14px auto; overflow: hidden; border: 1px solid var(--gold-line); border-radius: var(--r-card); background: #000; }
.stamp-cam video { width: 100%; height: 100%; object-fit: cover; }

/* Club */
.club-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.memcard__deleg { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: inherit; opacity: 0.85; }
.memcard__perks li small { display: block; font-size: 11px; opacity: 0.75; }
.pj-excluded { margin: 8px 0 0; padding-left: 18px; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.prop__pct { font-size: 12px; color: var(--text-tertiary); }

/* Shop */
.card--soldout .art { filter: grayscale(0.7) brightness(0.7); }
.thumbs { display: flex; gap: 8px; }
.thumbs span { width: 56px; height: 56px; border-radius: var(--r-card); border: 1px solid var(--line-subtle); }
.reserve-head { display: flex; justify-content: flex-end; }

/* Lists */
.tx-row .me-list__side { align-items: flex-end; text-align: right; }
.me-list__row .me-list__meta + .me-list__meta { margin-top: 2px; }
