/* Partner Portal (partners.<brand>) — Obsidian Graphite & Ceramic Daylight, 0Hz Idle, GPU-Only Motion */
:root {
  color-scheme: dark;
  --bg-cavity: #090C11;
  --bg-base: #0D1016;
  --bg-rail: #10141B;
  --bg-card-top: #131720;
  --bg-pass-top: #151A24;
  --bg-elevated: #1B202C;
  --bg-table-head: #11151E;
  --row-hover: rgba(242, 244, 248, 0.04);
  --border: rgba(242, 244, 248, 0.09);
  --border-strong: rgba(242, 244, 248, 0.17);
  --hairline: rgba(242, 244, 248, 0.075);
  --rim-top: rgba(255, 255, 255, 0.08);
  --card-shadow: none;
  --float-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
  --backdrop-scrim: rgba(7, 9, 14, 0.62);
  --ink-primary: #F2F4F8;
  --ink-muted: #A1AAB8;
  --ink-tertiary: #7D8799;
  --accent-primary: #20BC66;
  --accent-primary-text: #32DA7E;
  --status-success-fill: #20BC66;
  --status-success-text: #32DA7E;
  --status-success-soft: rgba(32, 188, 102, 0.13);
  --status-warning-text: #F0B43C;
  --status-warning-soft: rgba(232, 164, 40, 0.13);
  --status-error-text: #F87171;
  --status-error-soft: rgba(229, 83, 83, 0.13);
  --viz-grid-h: rgba(242, 244, 248, 0.06);
  --viz-axis-ink: #7D8799;
  --cta-primary-bg: #F2F4F8;
  --cta-primary-ink: #0B0E14;
  --cta-primary-hover: #FFFFFF;
  --f-display: var(--f-partner-display, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif);
  --f-body: var(--f-partner-sans, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif);
  --f-mono: var(--f-partner-mono, ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, monospace);
  --r-card: 14px;
  --r-dock: 10px;
  --r-control: 8px;
  --r-badge: 6px;
  --motion-snappy: 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --motion-sheet: 280ms cubic-bezier(0.16, 1, 0.3, 1);
  --motion-reveal: 340ms cubic-bezier(0.22, 1, 0.36, 1);
  --rail-w: 236px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg-cavity: #EAE6DD;
  --bg-base: #F3F0EA;
  --bg-rail: #ECE8DF;
  --bg-card-top: #FAF8F4;
  --bg-pass-top: #FCFBF8;
  --bg-elevated: #EAE5DC;
  --bg-table-head: var(--bg-rail);
  --row-hover: rgba(58, 52, 43, 0.04);
  --border: rgba(58, 52, 43, 0.12);
  --border-strong: rgba(58, 52, 43, 0.22);
  --hairline: rgba(58, 52, 43, 0.09);
  --rim-top: transparent;
  --card-shadow: 0 1px 2px rgba(59, 51, 40, 0.04);
  --float-shadow: 0 14px 36px rgba(59, 51, 40, 0.12);
  --backdrop-scrim: rgba(59, 51, 40, 0.32);
  --ink-primary: #171A21;
  --ink-muted: #4D5564;
  --ink-tertiary: #666F7E;
  --accent-primary: #158046;
  --accent-primary-text: #116E3B;
  --status-success-fill: #158046;
  --status-success-text: #116E3B;
  --status-success-soft: rgba(21, 128, 70, 0.10);
  --status-warning-text: #8F5300;
  --status-warning-soft: rgba(180, 105, 14, 0.11);
  --status-error-text: #B4232E;
  --status-error-soft: rgba(200, 40, 52, 0.10);
  --viz-grid-h: rgba(58, 52, 43, 0.07);
  --viz-axis-ink: #666F7E;
  --cta-primary-bg: #171A21;
  --cta-primary-ink: #FAF8F4;
  --cta-primary-hover: #242934;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-base);
  color: var(--ink-primary);
  font-family: var(--f-partner-sans, var(--f-body));
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--f-partner-mono, var(--f-mono)); }
.muted { color: var(--ink-muted); }
.tertiary { color: var(--ink-tertiary); }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-18 { margin-bottom: 18px; }
.section-subhead { margin: 16px 0 10px; }
.qr-frame--center { margin: 0 auto 16px; }
.auth-title { font-size: 20px; margin-bottom: 8px; }

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--bg-card-top);
  color: var(--ink-primary);
  padding: 8px 12px;
  border-radius: var(--r-control);
  border: 1px solid var(--border);
  z-index: 120;
}
.skip-link:focus { left: 16px; }

/* ── Auth / Enroll Gate ── */
.pauth {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.pauth__card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card-top);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: inset 0 1px 0 var(--rim-top), var(--card-shadow);
  padding: 24px;
}
.pauth__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* ── App Shell (Sidebar Default + Template Variants) ── */
.papp {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100dvh;
}

html[data-partner-template="editorial-cards"] .papp {
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
}
html[data-partner-template="editorial-cards"] .prail {
  position: static;
  height: auto;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  border-right: 0;
  border-bottom: 1px solid var(--hairline);
  padding: 12px 24px;
}
html[data-partner-template="editorial-cards"] .pnav-list {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
}
html[data-partner-template="editorial-cards"] .prail__foot {
  border-top: 0;
  padding-top: 0;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
html[data-partner-template="editorial-cards"] .prail__id {
  gap: 8px;
}
html[data-partner-template="editorial-cards"] .pview {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

html[data-partner-template="technical-grid"] .pcard {
  border-radius: 8px;
}
html[data-partner-template="technical-grid"] .kpi-grid {
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
html[data-partner-template="technical-grid"] .kpi-card {
  border-radius: 0;
  border-top: 0;
  border-left: 0;
}

.prail {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: var(--bg-rail);
  border-right: 1px solid var(--hairline);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pbrand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-primary);
  font-weight: 500;
}
.pbrand__mark {
  width: 28px;
  height: 28px;
  border-radius: var(--r-control);
  background: var(--bg-card-top);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}
.pbrand__name { font-size: 15px; font-weight: 500; }
.pbrand__sub { font-size: 12px; color: var(--ink-tertiary); }

.pnav-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.pnav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--r-control);
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background-color var(--motion-snappy), color var(--motion-snappy);
}
.pnav-item:hover {
  background: var(--row-hover);
  color: var(--ink-primary);
}
.pnav-item.is-active {
  background: var(--bg-elevated);
  color: var(--ink-primary);
  box-shadow: inset 0 1px 0 var(--rim-top), var(--card-shadow);
}
.pnav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.prail__foot {
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prail__id {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.prail__links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.prail__ext {
  color: var(--ink-muted);
  font-size: 12px;
  text-decoration: none;
}
.prail__ext:hover { color: var(--ink-primary); }

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

.ptopbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 58px;
  background: var(--bg-base);
  border-bottom: 1px solid var(--hairline);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ptopbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ptopbar__title {
  margin: 0;
  font-family: var(--f-partner-display, var(--f-display));
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
}
.ptopbar__rt {
  font-size: 12px;
  color: var(--ink-tertiary);
}
.ptopbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.balance-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--r-control);
  background: var(--bg-card-top);
  border: 1px solid var(--border);
  color: var(--ink-primary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--card-shadow);
}

.theme-seg {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--r-control);
  background: var(--bg-cavity);
  border: 1px solid var(--hairline);
}
.theme-seg__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color var(--motion-snappy), color var(--motion-snappy);
}
.theme-seg__btn[aria-pressed="true"] {
  background: var(--bg-card-top);
  color: var(--ink-primary);
  box-shadow: inset 0 1px 0 var(--rim-top), var(--card-shadow);
}

.pview {
  padding: 24px;
  max-width: 1180px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Cards, Grids & Controls ── */
.pcard {
  background: var(--bg-card-top);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: inset 0 1px 0 var(--rim-top), var(--card-shadow);
  padding: 20px;
}
.pcard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.pcard__title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
}
.pcard__sub {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 13px;
}

@keyframes kpiReveal {
  from { opacity: 0.94; transform: translate3d(0, 4px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes flashOnce {
  0% { background-color: var(--status-success-soft); }
  100% { background-color: transparent; }
}
.is-flash {
  animation: flashOnce 1s var(--motion-reveal) 1;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.kpi-card {
  background: var(--bg-card-top);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: inset 0 1px 0 var(--rim-top), var(--card-shadow);
  padding: 18px 20px;
  animation: kpiReveal var(--motion-reveal) both;
}
.kpi-card--d1 { animation-delay: 25ms; }
.kpi-card--d2 { animation-delay: 50ms; }
.kpi-card--d3 { animation-delay: 75ms; }
.kpi-card__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-tertiary);
  margin-bottom: 8px;
}
.kpi-card__val {
  font-family: var(--f-partner-display, var(--f-display));
  font-size: 26px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.kpi-card__meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-muted);
}

.split-2 {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.quick-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.quick-link-url {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 240px;
}
.code-box {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border-radius: var(--r-control);
  background: var(--bg-cavity);
  border: 1px solid var(--hairline);
  font-family: var(--f-partner-mono, var(--f-mono));
  font-size: 13px;
  color: var(--ink-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qr-frame {
  width: 72px;
  height: 72px;
  padding: 6px;
  border-radius: var(--r-control);
  background: #FFFFFF;
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-frame--lg {
  width: 148px;
  height: 148px;
  padding: 10px;
}
.qr-frame svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Buttons, Inputs & Pills (Max 1 Pill / Surface) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: var(--r-control);
  font-family: var(--f-partner-sans, var(--f-body));
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color var(--motion-snappy), border-color var(--motion-snappy), opacity var(--motion-snappy), transform var(--motion-snappy);
}
.btn:active:not(:disabled) { transform: scale(0.985); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--primary { background: var(--cta-primary-bg); color: var(--cta-primary-ink); }
.btn--primary:hover:not(:disabled) { background: var(--cta-primary-hover); }
.btn--ghost {
  background: var(--bg-card-top);
  color: var(--ink-primary);
  border-color: var(--border);
}
.btn--ghost:hover:not(:disabled) { background: var(--bg-elevated); }
.btn--danger {
  background: var(--status-error-soft);
  color: var(--status-error-text);
  border-color: rgba(229, 83, 83, 0.28);
}
.btn--sm { padding: 5px 10px; font-size: 12px; }
.btn--full { width: 100%; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-badge);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-elevated);
  color: var(--ink-muted);
  border: 1px solid var(--hairline);
}
.pill--ok { background: var(--status-success-soft); color: var(--status-success-text); }
.pill--warn { background: var(--status-warning-soft); color: var(--status-warning-text); }
.pill--err { background: var(--status-error-soft); color: var(--status-error-text); }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}
.input, .select {
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--r-control);
  background: var(--bg-cavity);
  border: 1px solid var(--border);
  color: var(--ink-primary);
  font-family: var(--f-partner-sans, var(--f-body));
  font-size: 14px;
  transition: border-color var(--motion-snappy);
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--accent-primary);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.form-err {
  color: var(--status-error-text);
  font-size: 13px;
  margin: 6px 0 12px;
}
.form-ok {
  color: var(--status-success-text);
  font-size: 13px;
  margin: 6px 0 12px;
}

/* ── Main 0Hz SVG Chart & Funnel ── */
.chart-box {
  position: relative;
  width: 100%;
  height: 220px;
}
.chart-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.chart-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-control);
  padding: 8px 10px;
  font-size: 12px;
  box-shadow: var(--float-shadow);
  transition: transform var(--motion-snappy), opacity var(--motion-snappy);
  z-index: 5;
}

.funnel-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.funnel-row__head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 5px;
}
.funnel-track {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-cavity);
  overflow: hidden;
}
.funnel-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent-primary);
}

/* ── Tables ── */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--r-dock);
}
.ptable {
  width: 100%;
  border-collapse: collapse;
}
.ptable th, .ptable td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}
.ptable th {
  background: var(--bg-table-head);
  color: var(--ink-tertiary);
  font-size: 12px;
  font-weight: 500;
}
.ptable tbody tr:last-child td { border-bottom: 0; }
.ptable tbody tr.is-clickable {
  cursor: pointer;
  transition: background-color var(--motion-snappy);
}
.ptable tbody tr.is-clickable:hover,
.ptable tbody tr.is-clickable:focus-visible {
  background: var(--row-hover);
  outline: none;
}
.num-col { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Creatives & Postbacks ── */
.creatives-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.creative-card {
  border: 1px solid var(--border);
  border-radius: var(--r-dock);
  padding: 14px;
  background: var(--bg-pass-top);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.creative-preview {
  height: 112px;
  padding: 10px;
  border-radius: var(--r-badge);
  background: var(--bg-cavity);
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.creative-preview img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.check-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.check-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

/* ── Slide-Over Sheet Drawer (--motion-sheet, GPU transform only) ── */
.psheet-backdrop {
  position: fixed;
  inset: 0;
  background: var(--backdrop-scrim);
  z-index: 40;
  opacity: 0;
  transition: opacity var(--motion-sheet);
}
.psheet-backdrop.is-open { opacity: 1; }

.psheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  background: var(--bg-card-top);
  border-left: 1px solid var(--border);
  box-shadow: var(--float-shadow);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translate3d(100%, 0, 0);
  transition: transform var(--motion-sheet);
}
.psheet.is-open { transform: translate3d(0, 0, 0); }
.psheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
}
.psheet__head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}
.psheet__body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.detail-kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}
.detail-kv__val {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-kv:last-child { border-bottom: 0; }

.notice-box {
  padding: 12px 14px;
  border-radius: var(--r-control);
  background: var(--bg-cavity);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

/* ── Mobile Bottom Navigation ── */
.pbottomnav { display: none; }

@media (max-width: 960px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-2, .wallet-grid, .creatives-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .papp { grid-template-columns: 1fr; }
  html[data-partner-template="editorial-cards"] .prail,
  .prail { display: none; }
  .ptopbar {
    height: auto;
    min-height: 58px;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .ptopbar__left {
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 4px 10px;
  }
  .ptopbar__right {
    flex-wrap: wrap;
    gap: 8px;
  }
  .pview { padding: 16px 16px 84px; }
  .form-grid { grid-template-columns: 1fr; }
  .quick-link-url { flex-wrap: wrap; min-width: 0; }
  .quick-link-url .code-box { flex-basis: 100%; }
  .pbottomnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--bg-rail);
    border-top: 1px solid var(--hairline);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .pbottomnav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 4px;
    text-decoration: none;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 500;
    border-radius: var(--r-control);
  }
  .pbottomnav a.is-active {
    color: var(--ink-primary);
    background: var(--bg-elevated);
  }
  .pbottomnav svg { width: 17px; height: 17px; }
}

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