:root {
  --bg: #f3f6fb;
  --panel: #fff;
  --ink: #1a2332;
  --muted: #5f6b7a;
  --line: #e4ebf3;
  --accent: #2f6fed;
  --accent-soft: #eaf1ff;
  --ok: #1f9d63;
  --danger: #d94848;
  --shadow: 0 10px 28px rgba(28, 55, 102, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar {
  background: linear-gradient(180deg, #152033, #101828);
  color: #d7deea;
  padding: 24px 14px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 18px;
}
.brand { display: flex; gap: 10px; align-items: flex-start; padding: 0 6px 8px; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2f6fed, #59a1ff);
  color: #fff; font-size: 18px; flex-shrink: 0;
}
.brand__text h1 { font-size: 15px; font-weight: 800; color: #fff; line-height: 1.35; }
.brand__text p { margin-top: 3px; font-size: 11px; color: #9aa8bf; }
.nav { display: flex; flex-direction: column; gap: 6px; overflow: auto; flex: 1; }
.nav__item {
  text-align: left; padding: 11px 12px; border-radius: 12px;
  font-size: 14px; font-weight: 650; color: #c4cede;
}
.nav__item span { display: block; font-size: 11px; color: #8090a8; margin-bottom: 2px; }
.nav__item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav__item.is-active {
  background: rgba(47,111,237,.22); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(89,161,255,.35);
}
.nav__item.is-active span { color: #9ec2ff; }
.content { padding: 24px 22px 36px; min-width: 0; }
.hero { margin-bottom: 16px; }
.hero h2 { font-size: 26px; font-weight: 850; margin-bottom: 8px; }
.hero p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.panel { display: none; }
.panel.is-active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 0 14px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 700;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: #eef2f8; color: #334155; }
.btn.ghost { background: #fff; color: var(--accent); border: 1px solid #c9dbff; }
.btn.danger { background: var(--danger); }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: #fff; color: var(--ink);
}
.textarea { min-height: 120px; resize: vertical; }
.list-item {
  padding: 12px 0; border-bottom: 1px solid #f0f3f8;
  display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;
}
.list-item:last-child { border-bottom: 0; }
.list-item b { font-size: 15px; }
.list-item small { color: var(--muted); }
.tag {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
  background: #f7f9fc; border-radius: 12px; padding: 12px; text-align: center;
}
.stat b { display: block; font-size: 20px; margin-bottom: 4px; }
.stat span { font-size: 12px; color: var(--muted); }
.progress {
  height: 10px; background: #e8eef7; border-radius: 999px; overflow: hidden; margin: 8px 0 4px;
}
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, #2f6fed, #59a1ff); }
.word-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 10px; background: #f5f8fc; margin: 0 8px 8px 0;
  cursor: pointer; border: 1px solid transparent;
}
.word-chip:hover { border-color: #c9dbff; background: var(--accent-soft); }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: rgba(16,24,40,.92); color: #fff; padding: 10px 16px;
  border-radius: 999px; font-size: 13px; z-index: 50; display: none;
}
.toast.show { display: block; }
.review-card { text-align: center; padding: 24px 12px; }
.review-card .word { font-size: 32px; font-weight: 850; margin: 12px 0 8px; }
.review-card .phone { color: var(--muted); margin-bottom: 16px; }
.essay-box {
  white-space: pre-wrap; line-height: 1.8; background: #f7f9fc;
  border-radius: 12px; padding: 14px; margin-top: 10px;
}
footer { margin-top: 18px; font-size: 12px; color: #8b95a3; }
footer a { color: inherit; text-decoration: none; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; padding: 14px 12px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 8px; }
  .nav__item { flex: 0 0 auto; white-space: nowrap; border-radius: 999px; background: rgba(255,255,255,.04); }
  .nav__item span { display: none; }
  .content { padding: 16px 14px 28px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
