:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e8eef5;
  --primary: #0f766e;
  --primary-2: #14b8a6;
  --amber: #f59e0b;
  --navy: #0b1f2a;
  --shadow: 0 12px 30px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
.phone {
  width: 100%; max-width: 430px; min-height: 100vh; margin: 0 auto;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
  position: relative; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .06), 0 30px 80px rgba(15, 23, 42, .18);
}
@media (min-width: 700px) {
  body { padding: 24px 0; }
  .phone { min-height: calc(100vh - 48px); border-radius: 32px; }
}
.page { min-height: 100vh; padding-bottom: 92px; }
.home-page { padding-bottom: 100px; }
.home-head { padding: 18px 18px 10px; display: flex; align-items: center; gap: 12px; }
.logo {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, #0f766e, #0b3b3a);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .28);
}
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.avatar {
  margin-left: auto; width: 38px; height: 38px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted);
}
.search-trigger {
  margin: 6px 18px 16px; height: 50px; border-radius: 16px; background: #fff;
  border: 1px solid #e5ebf2; box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
  display: flex; align-items: center; gap: 10px; padding: 0 14px; color: #94a3b8; text-align: left;
}
.search-trigger .kbd { margin-left: auto; font-size: 10px; background: #f1f5f9; color: #64748b; padding: 4px 8px; border-radius: 8px; }
.hero {
  margin: 0 18px 18px; border-radius: 24px; padding: 20px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #14b8a6 0%, #0f766e 42%, #0b3b3a 100%);
  position: relative; overflow: hidden; box-shadow: 0 16px 30px rgba(15, 118, 110, .22);
}
.hero:before {
  content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18); right: -60px; top: -50px;
}
.hero:after {
  content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12); right: 12px; bottom: -70px;
}
.hero-kicker { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; opacity: .78; position: relative; z-index: 1; }
.hero h1 { font-size: 25px; line-height: 1.25; margin: 10px 0 8px; font-weight: 800; letter-spacing: -.02em; position: relative; z-index: 1; }
.hero p { font-size: 11.5px; line-height: 1.7; margin: 0 0 16px; opacity: .82; max-width: 280px; position: relative; z-index: 1; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 7px; background: #fff; color: #0f766e;
  font-size: 11.5px; font-weight: 700; padding: 10px 14px; border-radius: 12px; position: relative; z-index: 1;
}
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0 18px 18px; }
.quick {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 5px 10px; text-align: center; box-shadow: 0 4px 12px rgba(15, 23, 42, .03);
}
.quick .qi { width: 38px; height: 38px; border-radius: 12px; margin: 0 auto 7px; display: grid; place-items: center; }
.quick span { font-size: 10.5px; font-weight: 600; color: #334155; }
.tone-blue { background: #e0f2fe; color: #0284c7; }
.tone-teal { background: #ccfbf1; color: #0f766e; }
.tone-amber { background: #fef3c7; color: #b45309; }
.tone-rose { background: #ffe4e6; color: #be123c; }
.tone-violet { background: #ede9fe; color: #6d28d9; }
.tone-slate { background: #e2e8f0; color: #475569; }
.tone-green { background: #dcfce7; color: #15803d; }
.section { padding: 0 18px 18px; }
.section-head { display: flex; align-items: center; margin-bottom: 10px; }
.section-head h2 { font-size: 15px; margin: 0; font-weight: 800; letter-spacing: -.01em; }
.section-head .more { margin-left: auto; font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 2px; }
.card-list { background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 8px 20px rgba(15, 23, 42, .04); }
.row-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-bottom: 1px solid #f1f5f9; }
.row-card:last-child { border-bottom: 0; }
.row-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; }
.row-icon.fault { background: #ecfdf5; color: #0f766e; }
.row-icon.code { background: #fff7ed; color: #ea580c; }
.row-icon.sop { background: #eff6ff; color: #2563eb; }
.row-main { min-width: 0; flex: 1; }
.row-title { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.45; }
.row-sub { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.mini-chip { font-size: 9px; color: #64748b; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 6px; padding: 2px 6px; }
.row-arrow { color: #cbd5e1; margin-top: 12px; }
.code-strip { display: flex; gap: 8px; overflow-x: auto; padding: 0 18px 18px; scrollbar-width: none; }
.code-strip::-webkit-scrollbar { display: none; }
.code-pill {
  flex: 0 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px; min-width: 74px; box-shadow: 0 4px 12px rgba(15, 23, 42, .03);
}
.code-pill b { display: block; font-size: 18px; color: #0f766e; letter-spacing: .02em; }
.code-pill span { font-size: 9px; color: var(--muted); }
.code-more { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; padding: 0 4px; font-size: 10.5px; color: var(--muted); }
.bottom-nav {
  position: fixed; z-index: 40; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(18px); border-top: 1px solid var(--line);
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 9.5px; color: #94a3b8; padding: 4px 0; }
.nav-item.active { color: #0f766e; }
.nav-item.active .nav-icon { background: #ecfdf5; }
.nav-icon { width: 34px; height: 26px; border-radius: 10px; display: grid; place-items: center; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; background: rgba(247, 249, 252, .92);
  backdrop-filter: blur(16px); border-bottom: 1px solid rgba(226, 232, 240, .7);
}
.topbar h1 { font-size: 16px; margin: 0; font-weight: 700; letter-spacing: .01em; }
.topbar .spacer { flex: 1; }
.back-btn, .icon-btn {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); color: var(--muted);
}
.icon-btn.active { color: #0f766e; background: #ecfdf5; border-color: #99f6e4; }
.search-page { padding: 14px 18px 30px; }
.search-field {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px;
  background: #fff; border: 1.5px solid #0f766e; border-radius: 16px;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .08);
}
.search-field input { border: 0; outline: 0; flex: 1; font: inherit; font-size: 14px; background: transparent; color: var(--ink); min-width: 0; }
.search-field input::placeholder { color: #94a3b8; }
.filter-row { display: flex; gap: 8px; margin: 14px 0 16px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter { flex: 0 0 auto; font-size: 11px; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: #64748b; }
.filter.active { background: #0f766e; border-color: #0f766e; color: #fff; }
.result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 10.5px; color: var(--muted); }
.empty { text-align: center; padding: 50px 20px; color: #94a3b8; }
.empty .empty-icon { width: 64px; height: 64px; border-radius: 20px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto 12px; color: #cbd5e1; }
.empty h3 { font-size: 14px; color: #475569; margin: 0 0 6px; }
.empty p { font-size: 11px; line-height: 1.6; margin: 0; }
.detail { padding-bottom: 110px; }
.detail-hero { padding: 18px 18px 20px; background: linear-gradient(180deg, #fff 0%, #f7fafc 100%); border-bottom: 1px solid var(--line); }
.detail-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { font-size: 9.5px; padding: 5px 9px; border-radius: 8px; background: #ecfdf5; color: #0f766e; font-weight: 600; }
.chip.gray { background: #f1f5f9; color: #64748b; font-weight: 500; }
.chip.amber { background: #fffbeb; color: #b45309; }
.detail-hero h1 { font-size: 23px; line-height: 1.35; margin: 0 0 8px; letter-spacing: -.02em; }
.detail-hero p { font-size: 11.5px; color: var(--muted); line-height: 1.65; margin: 0 0 14px; }
.detail-meta { display: flex; gap: 12px; font-size: 10px; color: #94a3b8; flex-wrap: wrap; }
.detail-meta b { color: #475569; font-weight: 600; }
.detail-warning { display: flex; gap: 8px; align-items: flex-start; margin: 12px 18px 0; padding: 10px 12px; border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; border-radius: 10px; font-size: 11.5px; line-height: 1.65; }
.detail-warning svg { flex: 0 0 auto; margin-top: 1px; }
.review-banner { display: flex; gap: 8px; align-items: flex-start; margin: 12px 18px 0; padding: 10px 12px; border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; border-radius: 10px; font-size: 11.5px; line-height: 1.65; }
.review-banner svg { flex: 0 0 auto; margin-top: 1px; }
.block { padding: 18px; border-bottom: 1px solid #eef2f7; }
.block h2 { font-size: 14px; margin: 0 0 10px; display: flex; align-items: center; gap: 6px; }
.symptom-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.symptom-list li { position: relative; padding-left: 16px; font-size: 11.5px; color: #475569; line-height: 1.6; }
.symptom-list li:before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: #14b8a6; }
.cause-list { display: grid; gap: 10px; }
.cause-row { display: grid; grid-template-columns: 1fr 36px; gap: 8px; align-items: center; }
.cause-name { font-size: 11.5px; color: #334155; line-height: 1.4; }
.cause-pct { font-size: 10px; color: #94a3b8; text-align: right; }
.cause-bar { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.cause-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #14b8a6, #0f766e); }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; gap: 11px; padding-bottom: 14px; position: relative; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child):before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 0; width: 1px; background: #dbeafe; }
.step-no { width: 25px; height: 25px; border-radius: 50%; background: #0f766e; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; flex: 0 0 auto; z-index: 1; }
.step-text { font-size: 11.5px; color: #475569; line-height: 1.7; padding-top: 3px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-block h3 { font-size: 10.5px; color: #94a3b8; margin: 0 0 8px; font-weight: 600; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 9.5px; background: #f8fafc; border: 1px solid var(--line); color: #475569; padding: 4px 8px; border-radius: 7px; }
.safety { margin: 16px 18px; padding: 14px; border-radius: 16px; background: #fffbeb; border: 1px solid #fde68a; }
.safety h3 { margin: 0 0 8px; font-size: 12px; color: #b45309; display: flex; align-items: center; gap: 6px; }
.safety p { margin: 5px 0; font-size: 10.5px; line-height: 1.6; color: #92400e; }
.source { margin: 0 18px 16px; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.source .src-label { font-size: 9.5px; color: #94a3b8; }
.source .src-title { font-size: 11.5px; font-weight: 600; margin: 5px 0 8px; }
.source button { font-size: 10.5px; color: #0f766e; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.feedback { margin: 0 18px 20px; text-align: center; }
.feedback p { font-size: 10.5px; color: #94a3b8; margin-bottom: 8px; }
.feedback .fb-row { display: flex; gap: 8px; justify-content: center; }
.feedback button { font-size: 10.5px; padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: #475569; }
.detail-actions {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px;
  display: flex; gap: 10px; padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(18px); border-top: 1px solid var(--line); z-index: 40;
}
.btn-ghost { flex: 0 0 auto; width: 52px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: #475569; }
.btn-ghost.active { color: #0f766e; background: #ecfdf5; border-color: #99f6e4; }
.btn-primary { flex: 1; height: 44px; border-radius: 14px; background: #0f766e; color: #fff; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; }
.codes-page { padding: 16px 18px 30px; }
.code-search {
  display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px;
  background: #fff; border: 1.5px solid #0f766e; border-radius: 16px;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .08);
}
.code-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 22px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: transparent; min-width: 0; }
.brand-row { display: flex; gap: 8px; margin: 14px 0 18px; }
.brand-pill { font-size: 10.5px; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: #94a3b8; }
.brand-pill.active { color: #0f766e; border-color: #99f6e4; background: #f0fdfa; font-weight: 600; }
.code-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: 0 10px 24px rgba(15, 23, 42, .05); }
.code-top { display: flex; align-items: center; gap: 14px; }
.code-big { width: 70px; height: 70px; border-radius: 18px; background: #0f766e; color: #fff; font-size: 24px; font-weight: 800; display: grid; place-items: center; letter-spacing: .04em; flex: 0 0 auto; }
.code-title { font-size: 15px; font-weight: 800; line-height: 1.4; }
.code-sub { font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.code-note { font-size: 9.5px; color: #94a3b8; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); line-height: 1.6; }
.fav-page, .me-page { padding: 0 18px 30px; }
.empty-fav { text-align: center; padding: 60px 20px; }
.profile-card { margin-top: 18px; padding: 20px; border-radius: 24px; background: linear-gradient(135deg, #0f766e, #0b3b3a); color: #fff; position: relative; overflow: hidden; }
.profile-card:after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); right: -50px; top: -50px; }
.profile-row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.profile-avatar { width: 48px; height: 48px; border-radius: 16px; background: rgba(255,255,255,.16); display: grid; place-items: center; }
.profile-name { font-size: 16px; font-weight: 800; }
.profile-role { font-size: 10.5px; opacity: .7; margin-top: 3px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; position: relative; z-index: 1; }
.profile-stat b { display: block; font-size: 16px; }
.profile-stat span { font-size: 9.5px; opacity: .65; }
.menu { margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid #f1f5f9; font-size: 12px; color: #475569; }
.menu-row:last-child { border-bottom: 0; }
.menu-row .menu-icon { width: 32px; height: 32px; border-radius: 10px; background: #f8fafc; display: grid; place-items: center; color: #64748b; }
.menu-row .menu-arrow { margin-left: auto; color: #cbd5e1; }
.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(10px);
  background: rgba(15, 23, 42, .9); color: #fff; font-size: 11.5px; padding: 10px 16px;
  border-radius: 12px; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
