:root {
  --bg: #f2f4f7;
  --surface: #fff;
  --ink: #141a22;
  --muted: #667085;
  --faint: #98a2b3;
  --accent: #0e7a6e;
  --accent-soft: #e6f3f1;
  --rec: #e5484d;
  --rec-soft: #fdecec;
  --warn: #b54708;
  --warn-soft: #fef0c7;
  --line: #e4e7ec;
  --ok: #039855;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --radius: 16px;
  --tab-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: #d9dee6;
  color: var(--ink);
  line-height: 1.45;
  display: flex;
  align-items: center;
  justify-content: center;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.phone {
  width: 390px;
  height: 844px;
  max-height: 100vh;
  background: var(--bg);
  border-radius: 40px;
  box-shadow: 0 0 0 10px #0f1419, 0 0 0 12px #2a313c, 0 30px 60px rgba(15, 20, 25, 0.35);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (max-width: 430px) {
  body { background: var(--bg); }
  .phone { width: 100%; height: 100vh; max-height: none; border-radius: 0; box-shadow: none; }
}

.statusbar {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  position: relative;
  z-index: 5;
}
.statusbar .pill {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}
.statusbar .pill.bad { color: var(--warn); background: var(--warn-soft); }
.statusbar .pill.good { color: var(--accent); background: var(--accent-soft); }

.screens { flex: 1; position: relative; overflow: hidden; }
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
.screen.active { display: flex; }
.screen.dark { background: #0c1014; color: #f5f7fa; }

.scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 18px calc(var(--tab-h) + 24px);
}
.screen.full .scroll { padding-bottom: 28px; }

.navbar {
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 4px;
}
.navbar .back { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; }
.navbar .back:active { background: rgba(0, 0, 0, 0.05); }
.navbar .title { flex: 1; text-align: center; font-weight: 600; padding-right: 40px; }

.head { padding: 6px 18px 14px; }
.head .eyebrow { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.head h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.head .sub { margin-top: 6px; font-size: 14px; color: var(--muted); }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(228, 231, 236, 0.85);
}
.card + .card { margin-top: 12px; }
.stats-row > .card + .card { margin-top: 0; }

.section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 16px 2px 8px;
}
.section-label h2 { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.section-label .more { font-size: 13px; color: var(--accent); font-weight: 500; min-height: 28px; padding: 2px 0; }

.hero {
  margin-top: 2px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(160deg, #1a2430 0%, #0e7a6e 140%);
  color: #f5f7fa;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(14, 122, 110, 0.22);
}
.hero .tag { font-size: 12px; font-weight: 600; opacity: 0.85; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.hero .tag i { width: 6px; height: 6px; border-radius: 50%; background: #5eead4; box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.25); }
.hero h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.hero .meta { margin-top: 8px; font-size: 13px; opacity: 0.78; }
.hero-input {
  width: 100%;
  height: 42px;
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0 14px;
  outline: none;
}
.hero-input::placeholder { color: rgba(245, 247, 250, 0.45); }
.hero-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-light { background: #fff; color: var(--ink); }
.btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.18); }
.btn-primary { background: var(--ink); color: #fff; width: 100%; }
.btn-accent { background: var(--accent); color: #fff; width: 100%; }
.btn-danger { background: var(--rec-soft); color: var(--rec); width: 100%; }
.btn-outline { background: var(--surface); color: var(--ink); border: 1px solid var(--line); width: 100%; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.badge.ok { background: var(--accent-soft); color: var(--accent); }
.badge.sug { background: var(--warn-soft); color: var(--warn); }
.badge.rec { background: var(--rec-soft); color: var(--rec); }
.badge.mut { background: #f2f4f7; color: var(--muted); }

.meet {
  width: 100%;
  text-align: left;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.meet + .meet { border-top: 1px solid var(--line); }
.meet:active { background: #f8f9fb; }
.meet .body { flex: 1; min-width: 0; }
.meet .t { font-size: 15px; font-weight: 600; }
.meet .m { margin-top: 4px; font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.meet time { font-family: var(--mono); font-size: 11px; color: var(--faint); }

.meet-tools {
  padding: 12px;
  margin-bottom: 10px;
}
.home-search {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8f9fb;
  padding: 0 12px;
  font-size: 14px;
  margin-bottom: 10px;
}
.home-search:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(14, 122, 110, 0.12);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.chip-row + .chip-row { margin-top: 8px; }
.chip-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-right: 2px;
}
.chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
}
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip:active { transform: scale(0.97); }

.todo-card { padding: 14px; }
.todo-card + .todo-card { margin-top: 10px; }
.todo-top { display: flex; gap: 10px; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar.empty { background: #e4e7ec; color: var(--muted); }
.todo-body { flex: 1; min-width: 0; }
.todo-body .t { font-size: 14px; font-weight: 600; line-height: 1.4; }
.todo-body .m { margin-top: 4px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.evidence {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  background: #f8f9fb;
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.45;
}
.todo-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.todo-actions .btn { height: 34px; font-size: 12px; padding: 0 12px; width: auto; }
.field-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.field-row select, .field-row input {
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 10px;
  min-width: 0;
  flex: 1;
}

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: #e8ecf1;
  border-radius: 12px;
  margin: 4px 0 14px;
  position: sticky;
  top: 0;
  z-index: 3;
}
.seg button {
  height: 34px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08); }

.panel { display: none; }
.panel.active { display: block; }

.summary-block { padding: 16px; }
.summary-block h3 { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 10px; }
.summary-block p, .summary-block li { font-size: 14px; color: #2a3441; line-height: 1.6; }
.summary-block ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.summary-block li { padding-left: 14px; position: relative; }
.summary-block li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.5; }
.decision {
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
  font-size: 14px;
  font-weight: 500;
  color: #0a4f47;
  line-height: 1.5;
}

.tscript {
  padding: 12px 14px;
  font-size: 13px;
  color: #2a3441;
  white-space: pre-wrap;
  line-height: 1.6;
}

.rec-screen { flex: 1; display: flex; flex-direction: column; background: #0c1014; color: #f5f7fa; }
.rec-top { padding: 8px 16px 0; display: flex; justify-content: space-between; align-items: center; }
.rec-live { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; color: #f87171; letter-spacing: 0.04em; }
.rec-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: blink 1.2s ease infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.rec-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 24px; }
.rec-timer { font-family: var(--mono); font-size: 52px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.rec-hint { margin-top: 10px; font-size: 13px; color: rgba(245, 247, 250, 0.45); text-align: center; }
.wave-wrap { margin-top: 24px; height: 64px; display: flex; align-items: center; gap: 3px; }
.wave-wrap .bar { width: 4px; border-radius: 4px; background: #5eead4; height: 8px; animation: wave 1.1s ease-in-out infinite; }
@keyframes wave { 0%, 100% { height: 8px; opacity: 0.45; } 50% { height: var(--h, 40px); opacity: 0.95; } }
.rec-controls { padding: 20px 0 36px; display: flex; align-items: center; justify-content: center; gap: 40px; }
.stop-btn {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--rec);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 8px rgba(229, 72, 77, 0.18);
}
.stop-btn i { width: 24px; height: 24px; border-radius: 6px; background: #fff; display: block; }
.rec-side {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 247, 250, 0.75);
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.proc-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  gap: 8px;
}
.proc-orb {
  width: 92px; height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e6f3f1, #0e7a6e 70%);
  box-shadow: 0 12px 40px rgba(14, 122, 110, 0.28);
  margin-bottom: 16px;
  animation: breathe 2.2s ease infinite;
}
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.proc-wrap h2 { font-size: 20px; font-weight: 700; }
.proc-wrap p { font-size: 14px; color: var(--muted); max-width: 280px; }

.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--tab-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(228, 231, 236, 0.9);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 20;
}
.tabbar.hidden { display: none; }
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 500;
  height: 100%;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--ink); }
.tab-record .dot {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  margin-top: -16px;
  box-shadow: 0 4px 14px rgba(20, 26, 34, 0.28);
}
.tab-record:active .dot { background: var(--rec); }

.set-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
}
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row .body { flex: 1; }
.set-row .t { font-size: 15px; font-weight: 600; }
.set-row .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.member {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  margin: 0 6px 8px 0;
  cursor: pointer;
}
.member.is-me {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.member .avatar { width: 26px; height: 26px; font-size: 11px; }

.profile-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  align-items: center;
  background: linear-gradient(145deg, #1a2430 0%, #14352f 100%);
  color: #f5f7fa;
  border: none;
  min-height: 72px;
}
.avatar.large {
  width: 48px;
  height: 48px;
  font-size: 18px;
  background: rgba(94, 234, 212, 0.2);
  color: #5eead4;
  border: 1px solid rgba(94, 234, 212, 0.35);
}
.avatar.large.empty { background: rgba(255, 255, 255, 0.08); color: rgba(245, 247, 250, 0.5); border-color: rgba(255, 255, 255, 0.12); }
.profile-body { flex: 1; min-width: 0; }
.profile-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.profile-sub { font-size: 12px; opacity: 0.72; margin-top: 2px; }
.stats-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}
.stats-row > .stat {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 12px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  box-sizing: border-box;
}
.stat-n {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  width: 100%;
}
.stat-l {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.2;
  width: 100%;
  white-space: nowrap;
}
.stat.is-sug .stat-n { color: var(--warn); }
.stat.is-open .stat-n { color: var(--accent); }
.stat.is-done .stat-n { color: var(--ok); }
.mini-select {
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 8px;
  font-size: 13px;
}
.set-row { min-height: 52px; }
.set-row .t { font-size: 14px; font-weight: 600; }
.set-row .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.info-card { padding: 12px 14px; font-size: 13px; color: #2a3441; line-height: 1.55; }
.info-card .info-sub { margin-top: 6px; font-size: 12px; color: var(--muted); }
.meta-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.proc-note { margin-top: 12px; font-size: 12px; color: var(--faint); }
.rec-side {
  width: auto;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 247, 250, 0.75);
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.app-foot {
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  padding: 18px 0 8px;
}
.chev { color: var(--faint); }

/* Login */
.login-layer {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: linear-gradient(165deg, #12181f 0%, #0e7a6e 140%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 22px;
}
.login-layer[hidden] { display: none; }
.login-card {
  width: 100%;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  padding: 28px 22px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.login-brand {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
}
.login-tip {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 20px;
}
.login-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px 2px;
}
.login-input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  margin-bottom: 14px;
  font-size: 15px;
}
.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 122, 110, 0.15);
  outline: none;
}
.login-error {
  background: var(--rec-soft);
  color: var(--rec);
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.login-submit { margin-top: 4px; height: 44px; }
.login-hint {
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.4;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tab-h) + 18px);
  transform: translateX(-50%) translateY(16px);
  background: rgba(20, 26, 34, 0.94);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 12px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 300px;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty-note { text-align: center; padding: 28px 12px; color: var(--muted); font-size: 13px; }
.mono { font-family: var(--mono); }

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