/* Agent in a Box — product UI
   Simple · Intuitive · Powerful
   External product chrome only (no Praxis branding) */

:root {
  /* KRI approved palette — Hot Pink / Saffron / Denim / Slate / Stone */
  --hot-pink: #fc4bb0;
  --saffron: #dab387;
  --denim: #1a305a;
  --slate: #a8bdd3;
  --stone: #dfdfdf;

  /* Default: saffron-warm across all box surfaces */
  --ink: #1a305a;
  --ink-soft: #3d4f6f;
  --muted: #6b7c94;
  --line: #c4b5a0;
  --paper: #f5f0e8;
  --paper-2: #faf6f0;
  --card: #ffffff;
  --forest: #1a305a;
  --forest-2: #14243f;
  --moss: #dab387;
  --lime: #dab387;
  --lime-ink: #1a305a;
  --amber: #dab387;
  --coral: #d45d4a;
  --sky: #f0e8dc;
  --hot: #dab387;
  --warm: #dab387;
  --accent: #dab387;
  --shadow: 0 12px 40px rgba(26, 48, 90, 0.08);
  --shadow-sm: 0 4px 16px rgba(26, 48, 90, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --max: 920px;
}

/* Force saffron-warm (site default) even if older localStorage themes linger */
html,
html[data-kri-theme],
html[data-kri-theme="saffron-warm"],
html[data-kri-theme="denim-trust"],
html[data-kri-theme="pink-punch"],
html[data-kri-theme="airy-white"],
html[data-kri-theme="denim-slate"] {
  --paper: #f5f0e8;
  --paper-2: #faf6f0;
  --moss: #dab387;
  --forest: #1a305a;
  --forest-2: #14243f;
  --lime: #dab387;
  --accent: #dab387;
  --hot: #dab387;
  --warm: #dab387;
  --line: #c4b5a0;
  --sky: #f0e8dc;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  /* Default product canvas — desk-shell.css overrides for agent desk pages */
  background: var(--paper);
  line-height: 1.45;
}

body:not(.desk-body) {
  background:
    radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--hot-pink) 12%, white) 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--saffron) 20%, white) 0%, transparent 50%),
    var(--paper);
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

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

.app {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 16px calc(28px + var(--safe-b));
}

/* —— Top bar —— */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent, var(--hot-pink)), color-mix(in srgb, var(--accent, var(--hot-pink)) 55%, var(--denim)));
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

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

.brand-text span {
  font-size: 0.78rem;
  color: var(--muted);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--forest-2);
  white-space: nowrap;
}

a.pill--link {
  text-decoration: none;
  color: var(--forest-2);
  border: 1px solid var(--line);
  background: var(--card);
}
a.pill--link:hover {
  border-color: var(--moss);
  color: var(--ink);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* —— Focus band —— */
.focus {
  margin-bottom: 18px;
}

.focus-kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--moss);
}

.focus-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.55rem, 4vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--forest);
}

.focus-sub {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 36rem;
}

/* —— Nav —— */
.nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 6px;
  margin-bottom: 20px;
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 8px;
  z-index: 20;
  box-shadow: var(--shadow-sm);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--denim) 6%, transparent);
}

.nav-item.is-active {
  background: var(--moss);
  color: #fff;
}

.nav-icon {
  opacity: 0.7;
  font-size: 0.85rem;
}

.nav-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--lime-ink);
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.nav-item.is-active .nav-badge {
  background: var(--lime);
}

/* —— Views —— */
.view[hidden],
.subpanel[hidden] {
  display: none !important;
}

.view {
  animation: rise 0.28s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— Stats —— */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  display: block;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--forest);
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

/* —— Action cards —— */
.action-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

@media (min-width: 720px) {
  .action-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.action-card {
  text-align: left;
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.action-card--call {
  background: linear-gradient(160deg, #fff 40%, color-mix(in srgb, var(--hot-pink) 10%, white) 100%);
}

.action-card--approve {
  background: linear-gradient(160deg, #fff 40%, color-mix(in srgb, var(--saffron) 18%, white) 100%);
}

.action-card--pipe {
  background: linear-gradient(160deg, #fff 40%, color-mix(in srgb, var(--slate) 22%, white) 100%);
}

.action-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 8px;
}

.action-card strong {
  display: block;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.action-card p {
  margin: 6px 0 14px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.action-cta {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--forest);
}

/* —— Panels —— */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.panel--quiet {
  background: transparent;
  box-shadow: none;
}

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

.panel-head--loose {
  margin-bottom: 16px;
  align-items: flex-start;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.muted {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 40rem;
}

.linkish {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--moss);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--forest-2);
}

.chip--live {
  background: color-mix(in srgb, var(--saffron) 35%, white);
  color: var(--lime-ink);
}

.chip--warn {
  background: #fceccc;
  color: #7a4a0c;
}

.chip--hot {
  background: color-mix(in srgb, var(--hot-pink) 16%, white);
  color: var(--hot);
}

.chip--warm {
  background: color-mix(in srgb, var(--saffron) 28%, white);
  color: #8a5a10;
}

.chip--ok {
  background: color-mix(in srgb, var(--hot-pink) 12%, white);
  color: var(--moss);
}

.chip--paused {
  background: #eee;
  color: #555;
}

.chip--btn {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--forest);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
}

.chip--btn:hover {
  border-color: var(--slate);
  background: var(--sky);
}

/* —— Live pulse bar —— */
.live-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--hot-pink) 35%, var(--slate));
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--hot-pink) 12%, white) 0%,
    color-mix(in srgb, var(--slate) 18%, white) 100%
  );
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--forest-2);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hot-pink);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--hot-pink) 55%, transparent);
  animation: pulse-dot 1.6s ease-out infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--hot-pink) 45%, transparent);
  }
  70% {
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--hot-pink) 0%, transparent);
  }
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--hot-pink) 0%, transparent);
  }
}

.live-bar-meta {
  margin-left: auto;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.78rem;
}

/* —— KPI scoreboard —— */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .kpi-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi-value {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--forest);
  font-variant-numeric: tabular-nums;
}

.kpi-hint {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

/* —— Demographics —— */
.panel--demos {
  margin-bottom: 18px;
}

.panel-head--tight {
  margin-bottom: 10px;
  align-items: baseline;
}

.muted--inline {
  margin: 0;
}

.demos-layout {
  display: grid;
  gap: 18px;
}

@media (min-width: 720px) {
  .demos-layout {
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
  }
}

.demos-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(80px, 2.2fr) auto;
  gap: 8px 10px;
  align-items: center;
  font-size: 0.84rem;
}

.bar-name {
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--slate) 45%, white);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hot-pink), color-mix(in srgb, var(--hot-pink) 55%, var(--saffron)));
  min-width: 2px;
  transition: width 0.45s ease;
}

.bar-fill--state {
  background: linear-gradient(90deg, var(--denim), var(--slate));
}

.bar-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-align: right;
  min-width: 3.2rem;
}

.demos-empty {
  margin: 0;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}

/* —— Per-ad metrics strip —— */
.ad-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

@media (min-width: 480px) {
  .ad-metrics {
    grid-template-columns: repeat(6, 1fr);
  }
}

.ad-metric {
  background: var(--sky);
  border-radius: 8px;
  padding: 6px 8px;
}

.ad-metric span {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.ad-metric strong {
  display: block;
  margin-top: 2px;
  font-size: 0.86rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--forest);
}

.ad-demos-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ad-demos-mini .chip {
  font-size: 0.7rem;
  padding: 4px 8px;
}

/* —— Subnav —— */
.subnav {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.subnav-item {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
}

.subnav-item.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* —— Lead cards —— */
.lead-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lead-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper-2);
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.lead-card:hover {
  border-color: var(--slate);
  box-shadow: var(--shadow-sm);
}

.lead-main {
  min-width: 0;
}

.lead-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.lead-meta {
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.lead-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.lead-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.84rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--moss);
  color: #fff;
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--hot-pink) 82%, var(--denim));
}

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

.btn-secondary:hover {
  border-color: var(--slate);
  background: color-mix(in srgb, var(--saffron) 18%, white);
}

.btn-lime {
  background: var(--lime);
  color: var(--lime-ink);
}

.btn-danger {
  background: #fde8e4;
  color: var(--hot);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.8rem;
}

/* —— Ads —— */
.ad-grid {
  display: grid;
  gap: 16px;
}

/* Performance cards: one column on phone, two on wide */
@media (min-width: 900px) {
  .ad-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.ad-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

@media (min-width: 560px) {
  .ad-card {
    display: grid;
    grid-template-columns: 140px 1fr;
  }
}

.ad-visual {
  aspect-ratio: 1;
  background: #e8ebe8;
  position: relative;
  overflow: hidden;
  min-height: 140px;
}

@media (min-width: 560px) {
  .ad-visual {
    aspect-ratio: auto;
    height: 100%;
    min-height: 100%;
  }
}

.ad-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-status {
  position: absolute;
  top: 12px;
  left: 12px;
}

.ad-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.ad-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
}

.ad-headline {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.ad-copy {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ad-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ad-warn {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff6e5;
  border: 1px solid #f0d9a8;
  color: #6b4a12;
  font-size: 0.82rem;
  font-weight: 500;
}

.ad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.ad-lander {
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}

.ad-lander a {
  color: var(--moss);
  font-weight: 600;
}

/* —— Web —— */
.web-grid {
  display: grid;
  gap: 12px;
}

.web-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
  .web-card {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.web-card h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
}

.web-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.web-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* —— Pipeline —— */
.pipeline {
  display: grid;
  gap: 12px;
}

@media (min-width: 800px) {
  .pipeline {
    grid-template-columns: repeat(4, 1fr);
    align-items: start;
  }
}

.pipe-col {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: 120px;
}

.pipe-col h3 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

.pipe-card {
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}

.pipe-card strong {
  display: block;
  font-size: 0.92rem;
}

.pipe-card span {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* —— Nurture —— */
.nurture-list {
  display: grid;
  gap: 10px;
}

.nurture-card {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  display: grid;
  gap: 8px;
}

@media (min-width: 640px) {
  .nurture-card {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

/* —— Quiet list —— */
.quiet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.quiet-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.quiet-list li::before {
  content: "·";
  color: var(--moss);
  font-weight: 700;
  line-height: 1.2;
}

/* —— Filter —— */
.filter select {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
  font-size: 0.84rem;
}

/* —— Sheet —— */
.sheet {
  border: none;
  border-radius: 20px 20px 0 0;
  padding: 0;
  width: min(520px, 100%);
  max-height: min(88dvh, 720px);
  margin: auto 0 0 auto;
  background: var(--paper-2);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
}

.sheet::backdrop {
  background: rgba(16, 36, 31, 0.4);
  backdrop-filter: blur(2px);
}

@media (min-width: 640px) {
  .sheet {
    border-radius: 20px;
    margin: auto;
  }
}

.sheet-inner {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 8px;
  border-bottom: 1px solid var(--line);
}

.sheet-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sky);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink-soft);
}

.sheet-body {
  padding: 16px 18px;
  overflow: auto;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.sheet-body dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0;
}

.sheet-body dt {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
}

.sheet-body dd {
  margin: 0;
  color: var(--ink);
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px calc(16px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: #fff;
}

/* —— Toast —— */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 50;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
}

.toast[hidden] {
  display: none;
}

/* —— Footer —— */
.footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-sep {
  margin: 0 6px;
}

/* empty */
.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.4);
}
