:root {
  --ink: #142b2d;
  --ink-2: #264246;
  --muted: #6d7f7d;
  --paper: #f5f3ec;
  --surface: #fffef9;
  --surface-2: #eef2ec;
  --line: #dce2da;
  --brand: #0f766e;
  --brand-dark: #0c5d57;
  --brand-soft: #dff2ec;
  --accent: #f39a45;
  --accent-soft: #fff0df;
  --red: #d95c59;
  --green: #388d69;
  --blue: #3c6ea8;
  --shadow: 0 18px 55px rgba(27, 54, 51, .12);
  --shadow-sm: 0 8px 24px rgba(27, 54, 51, .08);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Avenir Next", "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--ink);
  box-shadow: inset 0 -7px 0 rgba(255,255,255,.06);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.brand { color: var(--brand-dark); background: var(--brand-soft); }
.pill.accent { color: #935014; background: var(--accent-soft); }
.pill.danger { color: #9f3938; background: #ffe8e6; }

.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.primary { color: #fff; border-color: var(--brand); background: var(--brand); }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; }
.btn.accent { color: #5e330f; border-color: #ffd5ad; background: var(--accent-soft); }
.btn.small { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 12px; }

.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.86);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #294c4d, #0f766e 63%, #f39a45);
  box-shadow: 0 7px 20px rgba(20, 43, 45, .18);
  font-weight: 900;
}

.avatar.warm { background: linear-gradient(145deg, #9a5f2b, #f39a45); }
.avatar.blue { background: linear-gradient(145deg, #294b79, #4e86bf); }
.avatar.plum { background: linear-gradient(145deg, #704356, #bc758f); }

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(56,141,105,.12);
}

.toast {
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 34px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 12px;
  color: #fff;
  background: rgba(20, 43, 45, .94);
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity .2s ease, transform .2s ease;
}

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

.modal-backdrop {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 29, 30, .48);
  backdrop-filter: blur(6px);
}

.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 32px 90px rgba(9, 35, 35, .28);
}

.modal-head, .modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-foot { justify-content: flex-end; border-top: 1px solid var(--line); border-bottom: 0; }
.modal-body { padding: 20px; }

.demo-badge {
  position: fixed;
  z-index: 1000;
  right: 14px;
  bottom: 14px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  color: #fff;
  background: rgba(20,43,45,.82);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}

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

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

