:root {
  --ink: #0b1220;
  --ink-soft: #5c6b80;
  --line: #dce3ee;
  --paper: #ffffff;
  --sky: #f2f6fc;
  --bg: #f4f7fb;
  --blue: #2060f0;
  --blue-deep: #1648be;
  --blue-soft: #eef3ff;
  --coral: #e85d4c;
  --coral-deep: #c2412d;
  --green: #0f766e;
  --green-soft: #e6f5f3;
  --amber: #b45309;
  --amber-soft: #fff7ed;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --radius: 10px;
  --sidebar-w: 232px;
  --shadow: 0 8px 24px rgba(11, 18, 32, 0.06);
  --tap: 44px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.mock-banner {
  background: #111827;
  color: #e5e7eb;
  font-size: 0.8125rem;
  text-align: center;
  padding: 0.45rem 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-disclosure {
  display: contents;
}

.filter-disclosure > summary {
  display: none;
  list-style: none;
}

.filter-disclosure > summary::-webkit-details-marker {
  display: none;
}

.filter-disclosure-body {
  display: contents;
}

.mock-banner strong {
  color: #93c5fd;
}

.mock-banner a {
  display: inline-block;
  color: #93c5fd;
  font-weight: 650;
  padding: 0.2rem 0.35rem;
  min-height: 32px;
  line-height: 1.6;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
}

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

.stats-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.form-error {
  display: none;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.88rem;
}

.form-error:not([hidden]) {
  display: block;
}

/* Monthly performance — KPI column + Chart.js (~2:1 area chart) */
.perf-body {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1rem 1.35rem;
  align-items: stretch;
}

.perf-kpis {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.perf-kpi .stat-value {
  font-size: 1.4rem;
}

@media (max-width: 800px) {
  .perf-body {
    grid-template-columns: 1fr;
  }

  .perf-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.perf-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.perf-delta.up {
  color: var(--green);
}

.perf-delta.down {
  color: var(--coral-deep);
}

.perf-delta.flat {
  color: var(--ink-soft);
}

/* Chart.js area/bar — height tuned for ~2:1 like Chart.js defaults */
.perf-viz {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7fb 100%);
  padding: 0.65rem 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
}

.perf-viz-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.perf-viz-label {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.perf-chart-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 200px;
  height: 200px;
  max-height: 220px;
}

@media (max-width: 800px) {
  .perf-chart-wrap {
    min-height: 220px;
    height: 220px;
  }
}

.perf-range {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.perf-range button {
  border: 0;
  background: transparent;
  min-height: 32px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}

.perf-range button.is-on {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.balance-strip {
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.balance-strip-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.85rem;
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 0.95rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.balance-strip-toggle:hover {
  background: var(--sky);
}

.balance-strip-toggle:focus-visible {
  outline: 2px solid rgba(32, 96, 240, 0.35);
  outline-offset: -2px;
}

.balance-strip-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.balance-strip-right {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-left: auto;
}

.balance-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.balance-chip.pending {
  background: #eef1f5;
  color: #5c6570;
}

.balance-chip.available {
  background: var(--green-soft);
  color: var(--green);
}

.balance-chip .amt {
  font-weight: 800;
}

.balance-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--ink-soft);
  transition: transform 0.15s ease;
}

.balance-strip.is-open .balance-chevron {
  transform: rotate(180deg);
}

.balance-strip-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 0.85rem 1rem 1rem;
  background: #fafbfd;
}

.balance-strip.is-open .balance-strip-panel {
  display: block;
}

.balance-detail {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .balance-detail {
    grid-template-columns: 1fr 1fr;
  }
}

.balance-detail-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  background: #fff;
}

.balance-detail-card .stat-value {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.balance-detail-card.pending .stat-value {
  color: #5c6570;
}

.balance-detail-card.available .stat-value {
  color: var(--green);
}

.balance-detail-card .stat-hint {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.balance-strip-note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
}

.app {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100dvh - 36px);
}

.sidebar {
  display: none;
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 1.25rem 1rem 2rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.25rem 0.5rem 1.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}

.brand-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

.brand strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: var(--tap);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a:hover {
  background: var(--sky);
  color: var(--ink);
  text-decoration: none;
}

.nav a.is-active {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.nav-ico {
  width: 1.15rem;
  text-align: center;
  opacity: 0.85;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.1rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-size: 1.05rem;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.menu-btn:hover {
  background: var(--sky);
}

.topbar h1 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--green-soft);
  color: var(--green);
}

.pill.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.content {
  padding: 1.15rem 1.1rem calc(5.5rem + var(--safe-b));
  width: min(1040px, 100%);
}

body[data-wide-content] .content {
  width: min(1180px, 100%);
}

.page-lede {
  margin: 0 0 1.15rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 40rem;
}

.grid {
  display: grid;
  gap: 0.85rem;
}

.stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
}

.card h2,
.card h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.stat-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.stat-value {
  margin: 0.2rem 0 0.15rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.muted {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  background: var(--blue);
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: var(--blue-deep);
  text-decoration: none;
}

.btn.coral {
  background: var(--coral);
}

.btn.coral:hover {
  background: var(--coral-deep);
}

.btn.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.btn.secondary:hover {
  border-color: #c5d0e0;
  background: var(--sky);
}

.btn:disabled,
.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.alert {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: var(--amber-soft);
  border: 1px solid #fde68a;
  font-size: 0.9rem;
}

.alert.info {
  background: var(--blue-soft);
  border-color: #c7d7ff;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th,
td {
  text-align: left;
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--ink-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--sky);
  color: var(--ink-soft);
  white-space: nowrap;
}

.chip.paid,
.chip.available {
  background: var(--green-soft);
  color: var(--green);
}

.chip.pending,
.chip.review {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.chip.shipped {
  background: #ecfdf5;
  color: #047857;
}

.chip.hold {
  background: var(--amber-soft);
  color: var(--amber);
}

.chip.clawback {
  background: #f3f4f6;
  color: #6b7280;
}

.earn-cell,
.keep-cell {
  text-align: right;
  white-space: nowrap;
}

.earn-cell .earn-amt,
.keep-cell .keep-amt {
  display: block;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.earn-cell .earn-status,
.keep-cell .keep-status {
  display: inline-flex;
  margin-top: 0.25rem;
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  align-items: flex-end;
}

.filter-toolbar .field {
  margin: 0;
  min-width: 140px;
}

.filter-toolbar .field.grow {
  flex: 1;
  min-width: 180px;
}

.filter-empty {
  display: none;
  padding: 1.25rem 0.25rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.filter-empty.is-visible {
  display: block;
}

.track-bar {
  min-width: 148px;
  max-width: 220px;
}

.track-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 0.35rem;
}

.track-step {
  position: relative;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #d5dde9;
  flex-shrink: 0;
  z-index: 1;
}

.track-step + .track-step {
  margin-left: 1.15rem;
}

.track-step + .track-step::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: 1.15rem;
  height: 2px;
  background: #d5dde9;
  transform: translateY(-50%);
}

.track-step.is-done {
  background: var(--green);
}

.track-step.is-done + .track-step.is-done::before,
.track-step.is-done + .track-step.is-current::before {
  background: var(--green);
}

.track-step.is-current {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(32, 96, 240, 0.18);
}

.track-step.is-hold {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.16);
}

.track-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.25;
}

.track-bar.is-shipped .track-label {
  color: #047857;
}

.track-bar.is-hold .track-label {
  color: var(--amber);
}

.track-bar.is-review .track-label,
.track-bar.is-pharmacy .track-label {
  color: var(--blue-deep);
}

.earn-panel,
.keep-panel {
  display: grid;
  gap: 0.65rem;
}

.earn-panel .earn-hero,
.keep-panel .keep-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.earn-panel .earn-hero .stat-value,
.keep-panel .keep-hero .stat-value {
  margin: 0;
}

.payout-list {
  display: grid;
  gap: 0.65rem;
}

.payout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.payout-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem 1rem;
  align-items: center;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.payout-summary:hover {
  background: var(--sky);
}

.payout-summary:focus-visible {
  outline: 2px solid rgba(32, 96, 240, 0.35);
  outline-offset: -2px;
}

.payout-title {
  margin: 0;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.payout-meta {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.payout-amt {
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
}

.payout-amt.is-out {
  color: var(--coral-deep);
}

.payout-amt.is-returned {
  color: var(--amber);
}

.payout-amt-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-soft);
}

.payout-balance-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.payout-balance-line .bal {
  color: var(--ink);
  font-weight: 800;
}

.payout-balance-line .arrow {
  color: #9aa8bc;
}

.payout-math {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.8rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
}

.payout-math-cell {
  min-width: 0;
}

.payout-math-cell .label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.payout-math-cell .value {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.payout-math-cell .value.is-out {
  color: var(--coral-deep);
}

.payout-math-cell .value.is-after {
  color: var(--green);
}

.payout-math-cell .value.is-restored {
  color: var(--amber);
}

.payout-math-note {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.payout-body {
  display: none;
  border-top: 1px solid var(--line);
  padding: 0.75rem 1rem 1rem;
  background: #fafbfd;
}

.payout.is-open .payout-body {
  display: block;
}

.payout-body h3 {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .payout-math {
    grid-template-columns: 1fr;
  }

  .payout-summary {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .payout-amt,
  .payout-amt-sub {
    text-align: left;
  }
}

.payout-body table {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.payout-body th,
.payout-body td {
  padding: 0.65rem 0.75rem;
}

.payout-chevron {
  display: inline-block;
  margin-left: 0.35rem;
  transition: transform 0.15s ease;
  color: var(--ink-soft);
}

.payout.is-open .payout-chevron {
  transform: rotate(180deg);
}

.credit-note {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* —— Storefront CMS —— */
.path-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.path-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.path-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.path-pill.is-active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.mode-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.mode-switch button {
  border: 0;
  background: transparent;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.mode-switch button.is-on {
  background: var(--blue);
  color: #fff;
}

.cms-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.cms-shell {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 900px) {
  .cms-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }
}

.cms-nav {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

@media (min-width: 900px) {
  .cms-nav {
    flex-direction: column;
    overflow: visible;
    position: sticky;
    top: 4.5rem;
  }
}

.cms-nav button {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: left;
  white-space: nowrap;
}

.cms-nav button.is-active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.cms-nav button .nav-hint {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 0.1rem;
}

.cms-panel[hidden] {
  display: none !important;
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1.5px dashed #b7c6df;
  border-radius: 10px;
  background:
    radial-gradient(500px 180px at 20% 0%, rgba(32, 96, 240, 0.08), transparent 60%),
    var(--sky);
  text-align: center;
  padding: 1.25rem;
  cursor: pointer;
  position: relative;
}

.upload-zone:hover {
  border-color: var(--blue);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-zone strong {
  display: block;
  margin-bottom: 0.25rem;
}

.upload-zone.has-file {
  border-style: solid;
  border-color: #9fd4cc;
  background: var(--green-soft);
}

.media-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 760px) {
  .media-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.testimonial-list {
  display: grid;
  gap: 0.65rem;
}

.testimonial-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: #fff;
}

.testimonial-card .field {
  margin-bottom: 0.65rem;
}

.testimonial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: space-between;
  align-items: center;
}

.snippet-pick {
  display: grid;
  gap: 0.45rem;
}

.snippet-pick label {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.snippet-pick label.is-on {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.preview-frame {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.preview-frame .preview-hero {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(180deg, #f2f6fc, #fff);
}

@media (min-width: 700px) {
  .preview-frame .preview-hero {
    grid-template-columns: 180px 1fr;
    align-items: center;
  }
}

.preview-face {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  background: #dbe7ff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 2rem;
  color: var(--blue-deep);
}

.preview-frame .preview-body {
  padding: 0 1.25rem 1.25rem;
}

.preview-quote {
  border-left: 3px solid var(--blue);
  padding: 0.35rem 0 0.35rem 0.85rem;
  margin: 0.65rem 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.section-head h2 {
  margin: 0;
}

.draft-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}

.tabs a,
.tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: 40px;
  padding: 0.5rem 0.85rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs a.is-active,
.tabs button.is-active {
  color: var(--blue-deep);
  border-bottom-color: var(--blue);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
}

.field label {
  font-size: 0.8rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field select:focus,
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(32, 96, 240, 0.16);
}

/* Kayak-style custom select (trigger + floating menu) */
.fm-select {
  position: relative;
  width: 100%;
}

.fm-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.fm-select-trigger {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.75rem 0.55rem 0.85rem;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.fm-select-trigger:hover {
  border-color: #b4bfd0;
  background: #fafbfd;
}

.fm-select.is-open .fm-select-trigger,
.fm-select-trigger:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(32, 96, 240, 0.14);
}

.fm-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fm-select-chevron {
  flex: 0 0 auto;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid #6b778a;
  border-bottom: 2px solid #6b778a;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.15s ease;
}

.fm-select.is-open .fm-select-chevron {
  transform: rotate(225deg) translateY(-1px);
}

.fm-select-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 100%;
  max-height: min(280px, 50vh);
  overflow: auto;
  padding: 0.35rem;
  border: 1px solid #d5dbe6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
  -webkit-overflow-scrolling: touch;
}

.fm-select-option {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.fm-select-option:hover,
.fm-select-option:focus {
  outline: none;
  background: #f1f4f9;
}

.fm-select-option.is-selected {
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-weight: 750;
}

.fm-select-option.is-selected:hover,
.fm-select-option.is-selected:focus {
  background: #d9e6ff;
}

.fm-select-divider {
  height: 1px;
  margin: 0.35rem 0.5rem;
  background: var(--line);
}

.fm-select--compact {
  width: auto;
  min-width: 168px;
}

.fm-select--compact .fm-select-trigger {
  min-height: 40px;
  padding: 0.45rem 0.7rem 0.45rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.fm-select--compact .fm-select-menu {
  min-width: max(100%, 12.5rem);
}

.period-field {
  position: relative;
}

.period-field label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.filter-toolbar .fm-select--compact {
  min-width: 148px;
}

.price-input {
  max-width: 7.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* Pricing studio: Product → Pharmacy → Weeks → Strength */
.price-studio-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.price-studio-sub {
  margin: 0.3rem 0 0;
  max-width: 36rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.price-step {
  margin-bottom: 1.35rem;
}

.price-step--pharmacy,
.price-step--strengths {
  padding-top: 0.15rem;
}

.price-step-label {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.price-step-hint {
  margin: -0.2rem 0 0.6rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.price-step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.55rem;
}

.price-step-head .price-step-label {
  margin: 0;
}

/* Product catalog: one compact pill list — live + soon in the same pattern */
.price-catalog {
  display: grid;
  gap: 0.75rem;
}

.price-catalog-list {
  padding: 0.35rem 0.15rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbfd;
  overflow: hidden;
}

.price-product-groups {
  display: grid;
}

.price-product-row {
  display: grid;
  grid-template-columns: minmax(7.25rem, 8.75rem) minmax(0, 1fr);
  gap: 0.55rem 0.9rem;
  align-items: center;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid #e8edf5;
}

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

.price-product-cat {
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.price-product-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.price-product-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.price-product-chip.is-live {
  border-color: #b8c6dc;
  color: var(--ink);
  font-weight: 700;
}

.price-product-chip.is-soon {
  color: var(--ink-soft);
}

.price-product-chip:hover {
  border-color: #b4bfd0;
  color: var(--ink);
}

.price-product-chip.is-on {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-deep);
  box-shadow: 0 0 0 2px rgba(32, 96, 240, 0.12);
}

.price-product-soon {
  display: inline-flex;
  align-items: center;
  min-height: 1.15rem;
  padding: 0.06rem 0.35rem;
  border-radius: 999px;
  background: #eef1f5;
  color: #5c6570;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.price-product-chip.is-on .price-product-soon {
  background: #fff;
  color: var(--blue-deep);
}

.price-locked {
  margin-top: 0.35rem;
  padding: 1rem 1.05rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fafbfd;
}

.price-locked-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.price-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--sky);
  border: 1px solid var(--line);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.price-seg button {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: 36px;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  font-weight: 750;
  font-size: 0.88rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.price-seg button.is-on {
  background: #fff;
  color: var(--blue-deep);
  box-shadow: 0 1px 3px rgba(11, 18, 32, 0.08);
}

.pharmacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.pharmacy-card {
  appearance: none;
  display: grid;
  gap: 0.4rem;
  text-align: left;
  padding: 0.95rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pharmacy-card:hover {
  border-color: #b8c6dc;
}

.pharmacy-card.is-on {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(32, 96, 240, 0.12);
}

.pharmacy-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.pharmacy-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.pharmacy-count {
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--blue-deep);
  white-space: nowrap;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(32, 96, 240, 0.18);
}

.pharmacy-card:not(.is-on) .pharmacy-count {
  color: var(--ink-soft);
  border-color: var(--line);
  background: var(--sky);
}

.pharmacy-blurb {
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.pharmacy-card-actions {
  margin-top: 0.2rem;
}

.pharmacy-view-states {
  font-size: 0.82rem;
  font-weight: 700;
}

.state-panel {
  margin-top: 0.65rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--sky);
}

.state-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.state-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.state-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.price-context {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.85rem 1.35rem;
  margin: 0.15rem 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7faff 0%, #eef3fb 100%);
  border: 1px solid var(--line);
}

.price-context-main {
  min-width: 0;
}

.price-context-label {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.price-crumb {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1rem;
  line-height: 1.3;
}

.price-bulk label {
  display: block;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}

.price-studio-foot {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  line-height: 1.45;
}

.price-bulk-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.price-bulk-row .price-input {
  min-height: 40px;
  max-width: 6.5rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 720px) {
  .pharmacy-grid {
    grid-template-columns: 1fr;
  }
}

.path-list {
  display: grid;
  gap: 0.65rem;
}

.path {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.9rem 1rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  min-width: 0;
}

.path input {
  appearance: none;
  width: 1rem;
  height: 1rem;
  margin: 0.2rem 0 0;
  border: 2px solid #c5d0e0;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
}

.path input:checked,
.path.is-active input {
  border-color: var(--blue);
  background: radial-gradient(circle at center, var(--blue) 0 38%, #fff 42%);
}

.path.is-active {
  border-color: var(--blue);
  background: linear-gradient(180deg, #f7faff, #fff);
  box-shadow: none;
}

.path strong {
  display: block;
}

.path span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.link-box {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.link-box input {
  flex: 1;
  min-width: 180px;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  background: var(--sky);
}

pre.embed {
  margin: 0.5rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
  font-size: 0.78rem;
  overflow-x: auto;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.75rem;
  padding-bottom: 1rem;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 1rem;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline li:last-child::before {
  display: none;
}

.dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--line);
  margin-top: 0.2rem;
  z-index: 1;
}

.timeline li.is-done .dot {
  background: var(--green);
}

.timeline li.is-current .dot {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(32, 96, 240, 0.18);
}

.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 0.3rem 0.1rem calc(0.3rem + var(--safe-b));
  z-index: 20;
  /* Keep labels above home-indicator without crowding */
  box-shadow: 0 -4px 16px rgba(11, 18, 32, 0.04);
}

.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 52px;
  min-width: 0;
  font-size: 0.625rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.2rem 0.05rem;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav a > span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-nav .nav-ico {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.mobile-nav a.is-active {
  color: var(--blue-deep);
}

.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.4);
  z-index: 30;
}

.drawer-backdrop.is-open {
  display: block;
}

.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.25rem 1rem calc(1.75rem + var(--safe-b));
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(32, 96, 240, 0.16), transparent 55%),
    linear-gradient(180deg, #f2f6fc 0%, var(--bg) 55%);
}

.login-card {
  width: min(420px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.35rem 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0.35rem 0 0.35rem;
  font-size: clamp(1.35rem, 5.5vw, 1.55rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.login-card .field input {
  font-size: 16px; /* avoid iOS zoom */
}

.login-card .btn {
  width: 100%;
  margin-top: 0.35rem;
}

.login-card .login-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.login-card .login-meta .text-link {
  min-height: 44px;
  padding: 0.35rem 0.15rem;
}

.toast {
  display: none;
  margin-top: 0.65rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 0.85rem;
  font-weight: 650;
}

.toast.show {
  display: block;
}

.bank-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  border: 1px dashed #b7c6df;
  background: var(--sky);
}

.bank-card.is-linked {
  border-style: solid;
  border-color: #9fd4cc;
  background: var(--green-soft);
}

.split-2 {
  grid-template-columns: 1fr;
  align-items: start;
}

.split-2 > * {
  min-width: 0;
}

@media (min-width: 760px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .split-2 {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

  .content {
    padding: 1.35rem 1.5rem 2.5rem;
  }
}

@media (min-width: 960px) {
  .app {
    grid-template-columns: var(--sidebar-w) 1fr;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100dvh;
  }

  .sidebar-top .brand {
    border-bottom: 1px solid var(--line);
    margin-bottom: 1rem;
    padding-bottom: 1.25rem;
  }

  .menu-btn,
  .drawer-close,
  .mobile-nav,
  .drawer-backdrop {
    display: none !important;
  }

  .content {
    padding-bottom: 2.5rem;
  }
}

body.drawer-open .sidebar {
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(280px, 86vw);
  z-index: 40;
  box-shadow: var(--shadow);
  padding-bottom: calc(1rem + var(--safe-b));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.sidebar-top .brand {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0.85rem;
}

.drawer-close {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  margin-top: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.drawer-close:hover {
  background: var(--sky);
}

body.drawer-open .drawer-close {
  display: inline-flex;
}

body.drawer-open .sidebar-top {
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.85rem;
}

.sidebar-foot {
  display: none;
  margin-top: auto;
  padding: 0.85rem 0.9rem 1rem;
  border-top: 1px solid var(--line);
  gap: 0.45rem;
  flex-direction: column;
}

.sidebar-foot .btn {
  width: 100%;
  justify-content: center;
  min-height: var(--tap);
}

.table-scroll-hint {
  display: none;
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-soft);
}

/* —— Phone / small tablet polish (partners on phones) —— */
@media (max-width: 640px) {
  .mock-banner {
    font-size: 0.72rem;
    padding: 0.45rem 0.65rem;
    line-height: 1.35;
  }

  .mock-banner a {
    min-height: 36px;
    padding: 0.25rem 0.4rem;
  }

  .content {
    padding: 0.85rem 0.8rem calc(5.75rem + var(--safe-b));
    width: 100%;
  }

  .card {
    padding: 0.85rem 0.8rem;
  }

  .topbar {
    padding: 0.55rem 0.75rem;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .topbar h1 {
    font-size: 1.02rem;
  }

  /* Secondary actions live in the drawer on phones — free vertical space */
  .topbar-right {
    display: none;
  }

  body.drawer-open .sidebar-foot {
    display: flex;
  }

  body.drawer-open {
    overflow: hidden;
  }

  .page-lede {
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .section-head .row {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .period-field {
    flex: 1 1 auto;
    min-width: 0;
  }

  .period-field .fm-select,
  .period-field .fm-select-trigger {
    width: 100%;
    min-width: 0;
  }

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

  .filter-toolbar .field,
  .filter-toolbar .field.grow {
    width: 100%;
    min-width: 0;
  }

  /* Phone: search first, filters collapsed so cards show above the fold */
  .filter-disclosure {
    display: block;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
  }

  .filter-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    font-weight: 750;
    font-size: 0.9rem;
    cursor: pointer;
  }

  .filter-disclosure > summary::after {
    content: "▾";
    color: var(--ink-soft);
    font-size: 0.85rem;
  }

  .filter-disclosure[open] > summary::after {
    content: "▴";
  }

  .filter-disclosure-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0 0.85rem 0.85rem;
  }

  .filter-disclosure-body .field {
    width: 100%;
  }

  table.table-cards .earn-cell {
    white-space: normal;
  }

  .balance-strip-toggle {
    gap: 0.5rem;
    padding: 0.65rem 0.8rem;
  }

  .balance-strip-right {
    width: 100%;
    justify-content: flex-start;
  }

  .perf-body {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .perf-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .perf-viz {
    overflow: hidden;
  }

  .perf-chart-wrap {
    min-height: 180px;
    height: 180px;
    max-height: 200px;
  }

  .price-studio-head {
    flex-direction: column;
    align-items: stretch;
  }

  .price-studio-head .btn {
    width: 100%;
  }

  .price-seg {
    width: 100%;
  }

  .price-seg button {
    flex: 1 1 auto;
    text-align: center;
  }

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

  .price-bulk-row {
    width: 100%;
  }

  .price-bulk-row .price-input {
    flex: 1;
    max-width: none;
  }

  .link-box {
    flex-wrap: wrap;
  }

  .link-box input {
    min-width: 0;
    flex: 1 1 100%;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .grid.stats[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .mobile-nav a {
    font-size: 0.65rem;
    min-height: 56px;
    gap: 0.15rem;
  }

  .mobile-nav .nav-ico {
    font-size: 1.05rem;
  }

  .table-scroll-hint {
    display: none; /* cards mode — no swipe needed */
  }

  /* Stack wide tables into tappable cards */
  table.table-cards thead {
    display: none;
  }

  table.table-cards,
  table.table-cards tbody,
  table.table-cards tr,
  table.table-cards td {
    display: block;
    width: 100%;
  }

  table.table-cards tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    padding: 0.7rem 0.75rem;
    margin-bottom: 0.65rem;
  }

  table.table-cards td {
    border: 0;
    padding: 0.35rem 0;
    text-align: left !important;
  }

  table.table-cards td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 0.15rem;
  }

  table.table-cards td.earn-cell .earn-amt,
  table.table-cards td .earn-amt {
    display: inline;
  }

  table.table-cards .price-input {
    max-width: none;
    width: 100%;
    text-align: left;
  }

  table.table-cards tr.is-total {
    background: var(--sky);
  }

  table.table-cards tr.is-total td::before {
    display: none;
  }

  table.table-cards td:not([data-label])::before {
    display: none;
  }

  .track-bar {
    max-width: none;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .payout-balance-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.35rem;
    font-size: 0.8rem;
  }

  .btn.coral,
  .row .btn {
    min-height: 44px;
  }
}

@media (max-width: 360px) {
  /* iPhone SE / 320 — keep 6 labels readable, never shrink below ~10px */
  .mobile-nav {
    padding: 0.25rem 0 calc(0.25rem + var(--safe-b));
  }

  .mobile-nav a {
    font-size: 0.625rem;
    padding: 0.15rem 0;
    min-width: 0;
    letter-spacing: -0.02em;
  }

  .mobile-nav .nav-ico {
    font-size: 0.95rem;
  }

  .topbar h1 {
    font-size: 0.98rem;
  }

  .login-card {
    padding: 1.15rem 0.95rem 1.1rem;
  }

  .mock-banner {
    font-size: 0.68rem;
  }
}

@media (min-width: 641px) and (max-width: 959px) {
  .topbar-right .btn {
    min-height: 40px;
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
  }

  .content {
    padding: 1.1rem 1.15rem calc(5.5rem + var(--safe-b));
  }

  .filter-toolbar .field {
    min-width: 140px;
  }

  body.drawer-open .sidebar-foot {
    display: flex;
  }
}

/* ==========================================================================
   Page-scoped polish (pricing / earnings / storefront / settings)
   Keep selectors namespaced to reduce conflicts with other portal pages.
   ========================================================================== */

/* —— Pricing —— */
body[data-page="pricing"] .price-earn-legend {
  margin: 0;
  font-size: 0.78rem;
  white-space: nowrap;
}

body[data-page="pricing"] .price-table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

body[data-page="pricing"] .price-table-wrap table {
  margin: 0;
}

body[data-page="pricing"] .price-table-wrap thead th {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
}

body[data-page="pricing"] .price-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

body[data-page="pricing"] table.table-cards th,
body[data-page="pricing"] table.table-cards td {
  vertical-align: middle;
}

body[data-page="pricing"] table.table-cards tbody td {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

body[data-page="pricing"] .price-strength-label {
  display: inline-block;
  font-weight: 750;
  font-size: 0.92rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

body[data-page="pricing"] .price-floor-amt {
  display: inline-block;
  font-weight: 750;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  color: var(--ink-soft);
}

body[data-page="pricing"] .price-your-cell .price-input-wrap {
  margin-left: auto;
}

body[data-page="pricing"] .earn-cell .earn-amt {
  display: inline-block;
  line-height: 1.25;
}

body[data-page="pricing"] .price-input-wrap {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 8.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

body[data-page="pricing"] .price-input-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(32, 96, 240, 0.14);
}

body[data-page="pricing"] .price-input-prefix,
body[data-page="pricing"] .price-bulk-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0 0.3rem;
  background: #f3f6fb;
  color: var(--ink-soft);
  font-weight: 800;
  font-size: 0.88rem;
  border-right: 1px solid var(--line);
}

body[data-page="pricing"] .price-input-wrap .price-input {
  flex: 1;
  min-width: 0;
  max-width: none;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.4rem 0.55rem;
  font-size: 0.95rem;
  text-align: left;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

body[data-page="pricing"] .price-input-wrap .price-input:focus {
  outline: none;
  box-shadow: none;
}

body[data-page="pricing"] .price-strength-meta {
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

body[data-page="pricing"] .price-earn-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink-soft);
}

body[data-page="pricing"] .earn-cell .earn-amt {
  color: var(--green);
  font-size: 0.98rem;
  font-weight: 800;
}

body[data-page="pricing"] .price-bulk-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 16rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

body[data-page="pricing"] .price-bulk-row .price-input {
  flex: 1;
  min-width: 0;
  max-width: none;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  padding: 0.4rem 0.55rem;
  font-size: 0.95rem;
  text-align: left;
  background: transparent;
}

body[data-page="pricing"] .price-bulk-row .btn {
  border-radius: 0;
  border: 0;
  border-left: 1px solid var(--line);
  white-space: nowrap;
  min-height: 38px;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

body[data-page="pricing"] .price-bulk-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
}

@media (max-width: 640px) {
  body[data-page="pricing"] .price-studio,
  body[data-page="pricing"] .price-context,
  body[data-page="pricing"] .price-bulk,
  body[data-page="pricing"] .price-crumb {
    min-width: 0;
    max-width: 100%;
  }

  body[data-page="pricing"] .price-crumb {
    overflow-wrap: anywhere;
  }

  body[data-page="pricing"] .price-save-btn {
    position: fixed;
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    bottom: calc(4.25rem + var(--safe-b));
    z-index: 25;
    width: auto;
    max-width: none;
    min-height: 48px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.18);
  }

  body[data-page="pricing"] .content {
    padding-bottom: calc(8.5rem + var(--safe-b));
    overflow-x: clip;
  }

  body[data-page="pricing"] table.table-cards tr.price-strength-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 0.75rem;
    padding: 0.85rem 0.85rem;
    min-width: 0;
  }

  body[data-page="pricing"] table.table-cards tr.price-strength-card td[data-label="Strength"] {
    grid-column: 1 / -1;
    order: 1;
    padding-bottom: 0.15rem;
  }

  body[data-page="pricing"] table.table-cards tr.price-strength-card td[data-label="Your price"] {
    grid-column: 1 / -1;
    order: 2;
  }

  body[data-page="pricing"] table.table-cards tr.price-strength-card td[data-label="Floor"] {
    order: 3;
  }

  body[data-page="pricing"] table.table-cards tr.price-strength-card td[data-label="You earned"] {
    order: 4;
  }

  body[data-page="pricing"] .price-input-wrap {
    max-width: none;
  }

  body[data-page="pricing"] .price-input-wrap .price-input {
    min-height: 48px;
    font-size: 1.05rem;
  }

  body[data-page="pricing"] .earn-cell .earn-amt {
    font-size: 1.15rem;
  }

  body[data-page="pricing"] .price-bulk-row {
    max-width: none;
    width: 100%;
    min-width: 0;
  }

  body[data-page="pricing"] .price-bulk-row .price-input {
    min-width: 0;
    width: 100%;
  }

  body[data-page="pricing"] .price-bulk-row .btn {
    flex: 0 0 auto;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
    font-size: 0.85rem;
  }

  body[data-page="pricing"] .price-seg {
    max-width: 100%;
  }

  body[data-page="pricing"] .price-seg button {
    min-height: 40px;
    min-width: 0;
  }

  body[data-page="pricing"] .price-product-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 0.75rem 0.85rem;
    align-items: start;
  }

  body[data-page="pricing"] .price-step-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  body[data-page="pricing"] .price-earn-legend {
    white-space: normal;
  }

  body[data-page="pricing"] .price-table-wrap {
    border-radius: 10px;
  }

  body[data-page="pricing"] .price-your-cell .price-input-wrap {
    margin-left: 0;
    max-width: none;
  }

  body[data-page="pricing"] table.table-cards tr.price-strength-card td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  body[data-page="pricing"] table.table-cards tr.price-strength-card td[data-label="Strength"] {
    display: block;
  }

  body[data-page="pricing"] table.table-cards tr.price-strength-card td[data-label="Your price"] {
    display: grid;
    gap: 0.35rem;
  }

  body[data-page="pricing"] table.table-cards tr.price-strength-card td[data-label="Your price"]::before {
    margin-bottom: 0;
  }
}

/* —— Earnings —— */
body[data-page="earnings"] .earn-how-details > summary {
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}

body[data-page="earnings"] .earn-how-details > summary::-webkit-details-marker {
  display: none;
}

body[data-page="earnings"] .earn-how-details > summary::after {
  content: " ▾";
  color: var(--ink-soft);
  font-weight: 650;
  font-size: 0.85rem;
}

body[data-page="earnings"] .earn-how-details[open] > summary::after {
  content: " ▴";
}

@media (min-width: 641px) {
  body[data-page="earnings"] .earn-how-details {
    /* Desktop: show explainer open by default via open attr set in HTML only on phone intent — keep open always on wide */
  }
}

body[data-page="earnings"] .earn-withdraw-note {
  margin: 0.85rem 0 0;
}

body[data-page="earnings"] .earn-withdraw-actions {
  margin-top: 0.9rem;
}

body[data-page="earnings"] .earn-tabs {
  scrollbar-width: thin;
}

body[data-page="earnings"] .unpaid-earnings-cards .earn-amt {
  font-size: 1.05rem;
  color: var(--ink);
}

body[data-page="earnings"] .payout-balance-line .bal-step {
  display: inline;
}

@media (max-width: 640px) {
  body[data-page="earnings"] .earn-balance-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.55rem;
  }

  body[data-page="earnings"] .earn-balance-card {
    padding: 0.75rem 0.7rem;
  }

  body[data-page="earnings"] .earn-balance-card .stat-value {
    font-size: 1.35rem;
  }

  body[data-page="earnings"] .earn-balance-card .stat-hint {
    font-size: 0.72rem;
    line-height: 1.3;
  }

  body[data-page="earnings"] .earn-withdraw-actions {
    flex-direction: column;
  }

  body[data-page="earnings"] .earn-withdraw-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  body[data-page="earnings"] .bank-card {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-page="earnings"] .bank-card .btn {
    width: 100%;
    min-height: 44px;
  }

  body[data-page="earnings"] .earn-tabs {
    margin-left: -0.15rem;
    margin-right: -0.15rem;
    padding: 0 0.15rem;
    gap: 0.15rem;
  }

  body[data-page="earnings"] .earn-tabs button {
    min-height: 44px;
    padding: 0.55rem 0.75rem;
  }

  body[data-page="earnings"] .payout-summary {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    text-align: left;
  }

  body[data-page="earnings"] .payout-summary > div:last-child {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--line);
  }

  body[data-page="earnings"] .payout-amt,
  body[data-page="earnings"] .payout-amt-sub {
    text-align: left;
  }

  body[data-page="earnings"] .payout-balance-line {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  body[data-page="earnings"] .payout-balance-line .arrow {
    display: none;
  }

  body[data-page="earnings"] .payout-balance-line .bal-step {
    display: block;
  }

  body[data-page="earnings"] .payout-math {
    grid-template-columns: 1fr;
  }

  body[data-page="earnings"] .unpaid-earnings-cards tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem 0.75rem;
  }

  body[data-page="earnings"] .unpaid-earnings-cards td[data-label="Order"] {
    grid-column: 1 / -1;
  }

  body[data-page="earnings"] .unpaid-earnings-cards td[data-label="Balance"] {
    grid-column: 1;
  }

  body[data-page="earnings"] .unpaid-earnings-cards td[data-label="Earned"] {
    grid-column: 2;
    text-align: right !important;
  }

  body[data-page="earnings"] .unpaid-earnings-cards td[data-label="Notes"] {
    grid-column: 1 / -1;
  }

  body[data-page="earnings"] .unpaid-earnings-cards .earn-amt {
    font-size: 1.12rem;
  }
}

@media (max-width: 360px) {
  body[data-page="earnings"] .earn-balance-grid {
    grid-template-columns: 1fr !important;
  }

  body[data-page="earnings"] .payout-math-cell .value {
    font-size: 1.05rem;
  }
}

/* —— Storefront —— */
body[data-page="storefront"] .sf-share,
body[data-page="storefront"] .sf-embed {
  margin-top: 0.85rem;
  min-width: 0;
}

body[data-page="storefront"] .sf-share-label {
  margin: 0 0 0.45rem;
}

body[data-page="storefront"] .sf-link-box {
  min-width: 0;
}

body[data-page="storefront"] .sf-link-box input {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="storefront"] .sf-embed-snippet {
  max-width: 100%;
  box-sizing: border-box;
}

body[data-page="storefront"] .sf-embed-actions {
  margin-top: 0.65rem;
}

@media (max-width: 640px) {
  body[data-page="storefront"] .sf-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-page="storefront"] .sf-path-block {
    min-width: 0;
  }

  body[data-page="storefront"] .sf-path-pills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
  }

  body[data-page="storefront"] .sf-path-pills .path-pill {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    border-radius: 10px;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    font-size: 0.72rem;
    text-align: center;
  }

  body[data-page="storefront"] .sf-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: stretch;
  }

  body[data-page="storefront"] .sf-actions .mode-switch {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  body[data-page="storefront"] .sf-actions .mode-switch button {
    width: 100%;
    min-height: 44px;
  }

  body[data-page="storefront"] .sf-actions > .btn {
    min-height: 44px;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body[data-page="storefront"] .sf-link-box {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-page="storefront"] .sf-link-box input {
    flex: none;
    width: 100%;
    min-width: 0;
    font-size: 0.78rem;
  }

  body[data-page="storefront"] .sf-link-box .btn {
    width: 100%;
    min-height: 44px;
  }

  body[data-page="storefront"] .sf-embed-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  body[data-page="storefront"] .cms-nav {
    margin: 0 -0.1rem;
    padding-bottom: 0.25rem;
  }

  body[data-page="storefront"] .cms-nav button {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 44px;
  }
}

/* —— Settings —— */
body[data-page="settings"] .settings-live-url {
  margin: 0 0 0.85rem;
  overflow-wrap: anywhere;
}

body[data-page="settings"] .settings-section-note {
  margin: 0 0 0.75rem;
}

body[data-page="settings"] .settings-subhead {
  margin-top: 1.5rem;
  margin-bottom: 0.45rem;
}

body[data-page="settings"] .settings-actions {
  margin-top: 0.85rem;
}

body[data-page="settings"] .settings-logout-wrap {
  display: none;
  margin: 1rem 0 0;
  text-align: center;
}

body[data-page="settings"] .settings-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (max-width: 640px) {
  body[data-page="settings"] .settings-stack {
    gap: 0.85rem;
  }

  body[data-page="settings"] .settings-section .field {
    width: 100%;
  }

  body[data-page="settings"] .settings-section .field input {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    min-height: 48px;
    font-size: 1rem;
  }

  body[data-page="settings"] .settings-primary-btn,
  body[data-page="settings"] .settings-full-btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  body[data-page="settings"] .settings-actions {
    flex-direction: column;
  }

  body[data-page="settings"] .settings-actions .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  body[data-page="settings"] .settings-bank-card {
    flex-direction: column;
    align-items: flex-start;
  }

  body[data-page="settings"] .settings-logout-wrap {
    display: block;
    margin: 0.35rem 0 0.5rem;
  }
}
