:root {
  --paper: #f5efe3;
  --paper-2: #fbf8f1;
  --paper-3: #efe7d8;
  --ink: #1d1a16;
  --ink-2: #4b443a;
  --ink-3: #8a8173;
  --line: #e0d5c3;
  --line-2: #ece4d5;
  --cinnabar: #a6402f;
  --cinnabar-2: #c2553f;
  --cinnabar-soft: #f6e7e2;
  --jade: #46685a;
  --jade-soft: #e6efe9;
  --gold: #a8823f;
  --gold-soft: #f4ecdb;
  --shadow: 0 1px 2px rgba(60, 45, 25, 0.04), 0 8px 24px -16px rgba(60, 45, 25, 0.18);
  --radius: 14px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", "Source Han Serif SC", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

body::before {
  /* 极淡的宣纸纹理 */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(circle at 1px 1px, rgba(150, 130, 100, 0.09) 1px, transparent 0);
  background-size: 22px 22px;
  z-index: 0;
}

a { color: var(--cinnabar); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: 0.01em; }
::selection { background: #f0d9b8; }

/* ------------------------------------------------------------ 布局 */
#app { position: relative; z-index: 1; min-height: 100vh; }

.layout { display: flex; min-height: 100vh; }

.sidebar {
  display: none;
  width: 228px;
  flex: 0 0 228px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fbf7ee, #f4ecdd);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-direction: column;
  gap: 6px;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-seal {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--cinnabar); color: #fdf6e9;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 20px; font-weight: 700;
  box-shadow: inset 0 0 0 1.5px rgba(255, 245, 225, 0.5);
  flex: 0 0 auto;
}
.brand-text b { font-family: var(--serif); font-size: 17px; letter-spacing: 0.06em; display: block; line-height: 1.2; }
.brand-text span { font-size: 11px; color: var(--ink-3); letter-spacing: 0.14em; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--ink-2); font-size: 14.5px; cursor: pointer;
  border: 1px solid transparent; background: none; width: 100%; text-align: left;
  transition: background 0.16s, color 0.16s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.6); }
.nav-item.active { background: #fffdf8; border-color: var(--line); color: var(--ink); box-shadow: var(--shadow); }
.nav-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; opacity: 0.85; }
.nav-item .dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--cinnabar); }

.sidebar-foot { margin-top: auto; padding: 12px 10px; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(245, 239, 227, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  min-height: 56px;
}
.appbar h1 { font-size: 17px; letter-spacing: 0.04em; }
.appbar .sub { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.06em; }
.appbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.page { padding: 16px 14px 96px; max-width: 900px; width: 100%; margin: 0 auto; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; background: rgba(251, 248, 241, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; border: 0; background: none; padding: 9px 4px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink-3); font-size: 11px; letter-spacing: 0.04em;
}
.tabbar button svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.55; }
.tabbar button.active { color: var(--cinnabar); }
.tabbar button.active svg { stroke-width: 1.9; }

@media (min-width: 960px) {
  .sidebar { display: flex; }
  .tabbar { display: none; }
  .page { padding: 26px 28px 60px; }
  .appbar { padding: 12px 28px; }
  .appbar .brand-seal-sm { display: none; }
}

/* ------------------------------------------------------------ 通用组件 */
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card + .card { margin-top: 12px; }
.card.flush { padding: 0; overflow: hidden; }

.sec-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--serif); font-size: 15px; letter-spacing: 0.06em;
  color: var(--ink); margin: 20px 2px 10px;
}
.sec-title::before { content: ""; width: 3px; height: 14px; background: var(--cinnabar); border-radius: 2px; }
.sec-title .hint { margin-left: auto; font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); letter-spacing: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: #fffdf8; color: var(--ink-2);
  font-size: 14px; transition: transform 0.08s, background 0.16s, border-color 0.16s;
  white-space: nowrap;
}
.btn:hover { background: #fff; border-color: #d6c9b2; }
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.btn.sm svg { width: 15px; height: 15px; }
.btn.ghost svg { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fbf6ea; }
.btn.primary:hover { background: #2c2823; }
.btn.accent { background: var(--cinnabar); border-color: var(--cinnabar); color: #fdf5ea; }
.btn.accent:hover { background: var(--cinnabar-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-3); padding: 6px 8px; }
.btn.ghost:hover { color: var(--ink); background: rgba(0, 0, 0, 0.03); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px;
  background: var(--paper-3); color: var(--ink-2); border: 1px solid var(--line);
}
.chip.cinnabar { background: var(--cinnabar-soft); border-color: #eccfc7; color: #8f3423; }
.chip.jade { background: var(--jade-soft); border-color: #d5e3d9; color: #35563f; }
.chip.gold { background: var(--gold-soft); border-color: #e6d9bb; color: #7c5d21; }
.chip.gray { background: #efece5; border-color: #e0dad0; color: #6d675c; }

.badge {
  flex: 0 0 auto; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 5px;
  background: var(--paper-3); color: var(--ink-3); border: 1px solid var(--line-2);
}
.badge.ok { background: var(--jade-soft); color: var(--jade); border-color: #d3e2d7; }
.badge.warn { background: #fbf0dc; color: #8a6626; border-color: #eddfc2; }
.badge.err { background: var(--cinnabar-soft); color: var(--cinnabar); border-color: #eccfc7; }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-3); margin-bottom: 5px; letter-spacing: 0.04em; }
.field .req { color: var(--cinnabar); margin-left: 2px; }

input[type="text"], input[type="password"], input[type="date"], input[type="number"], textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fffdf8; color: var(--ink);
  outline: none; transition: border-color 0.16s, box-shadow 0.16s;
  font-size: 15px;
}
input:focus, textarea:focus, select:focus { border-color: #c8b391; box-shadow: 0 0 0 3px rgba(176, 138, 75, 0.12); }
textarea { resize: vertical; min-height: 76px; line-height: 1.65; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }

.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.row.gap { gap: 10px; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }

.empty {
  text-align: center; padding: 44px 20px; color: var(--ink-3);
}
.empty .glyph { font-family: var(--serif); font-size: 34px; opacity: 0.28; letter-spacing: 0.2em; }

.divider { height: 1px; background: var(--line-2); margin: 14px 0; }

/* ------------------------------------------------------------ 医案列表 */
.case-item {
  display: block; padding: 14px 16px; border-bottom: 1px solid var(--line-2);
  cursor: pointer; transition: background 0.14s; position: relative;
}
.case-item:last-child { border-bottom: 0; }
.case-item:hover { background: #fffdf8; }
.case-item .top { display: flex; align-items: baseline; gap: 8px; }
.case-item .code { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.02em; }
.case-item .date { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.case-item .chief { margin-top: 4px; font-size: 15px; color: var(--ink); line-height: 1.5; }
.case-item .meta { margin-top: 7px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.searchbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.searchbar input { flex: 1; }

/* ------------------------------------------------------------ 图片 */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.thumb {
  position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: var(--paper-3); cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .kind {
  position: absolute; left: 5px; bottom: 5px; font-size: 10px;
  background: rgba(20, 16, 12, 0.62); color: #f7f0e3; padding: 1px 6px; border-radius: 4px;
  letter-spacing: 0.04em;
}
.thumb .del {
  position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(20, 16, 12, 0.55); color: #fff; border: 0; font-size: 13px; line-height: 1;
  display: grid; place-items: center;
}
.upload-tile {
  aspect-ratio: 3 / 4; border: 1.5px dashed #d8c9ae; border-radius: 10px;
  display: grid; place-items: center; gap: 4px; color: var(--ink-3); cursor: pointer;
  background: rgba(255, 253, 248, 0.6); font-size: 12px; text-align: center;
}
.upload-tile:hover { border-color: var(--cinnabar); color: var(--cinnabar); }
.upload-tile .plus { font-size: 22px; line-height: 1; font-family: var(--serif); }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(18, 14, 10, 0.92);
  display: grid; place-items: center; padding: 20px;
}
.lightbox img { max-width: 96vw; max-height: 88vh; border-radius: 6px; }
.lightbox .close { position: absolute; top: 14px; right: 14px; color: #f2e9d8; background: none; border: 0; font-size: 26px; }

/* ------------------------------------------------------------ 药味表 */
.herb-row {
  display: grid; grid-template-columns: 1.35fr 0.75fr 0.55fr 26px; gap: 7px;
  align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line-2);
}
.herb-row input { padding: 6px 8px; font-size: 14px; border-radius: 7px; }
.herb-row .x { border: 0; background: none; color: var(--ink-3); font-size: 15px; cursor: pointer; }
.herb-row .x:hover { color: var(--cinnabar); }
.herb-head { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.06em; }
.herb-warn { color: var(--cinnabar); font-size: 11.5px; }

/* ------------------------------------------------------------ 方义分层 */
.layer {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2);
  overflow: hidden; box-shadow: var(--shadow); margin-bottom: 12px;
}
.layer-head {
  display: flex; align-items: center; gap: 9px; padding: 12px 15px;
  border-bottom: 1px solid var(--line-2); background: linear-gradient(180deg, #fdfaf3, #f8f3e8);
}
.layer-head .idx {
  font-family: var(--serif); font-size: 12px; letter-spacing: 0.1em;
  color: #fdf6e9; background: var(--ink); padding: 2px 7px; border-radius: 5px;
}
.layer-head h3 { font-size: 15px; letter-spacing: 0.05em; }
.layer-head .badge { margin-left: auto; }
.layer-body { padding: 14px 15px; }

.kv { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.kv:last-child { border-bottom: 0; }
.kv .k { flex: 0 0 66px; color: var(--ink-3); font-size: 12.5px; padding-top: 1px; }
.kv .v { flex: 1; }

.evidence { margin: 6px 0 0; padding: 0; list-style: none; }
.evidence li { font-size: 13.5px; color: var(--ink-2); padding: 3px 0 3px 14px; position: relative; }
.evidence li::before {
  content: "◦"; position: absolute; left: 2px; color: var(--cinnabar); top: 2px;
}
.evidence li b { color: var(--ink); font-weight: 600; }

.role-tag {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  font-family: var(--serif); font-size: 13px; font-weight: 700; flex: 0 0 auto;
}
.role-君 { background: var(--cinnabar); color: #fdf5ea; }
.role-臣 { background: var(--jade); color: #f2f8f3; }
.role-佐 { background: var(--gold); color: #fdf8ec; }
.role-使 { background: #8e8577; color: #fbf6ec; }

.herb-block { padding: 11px 0; border-bottom: 1px dashed var(--line-2); }
.herb-block:last-child { border-bottom: 0; }
.herb-block .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.herb-block .head .name { flex: 1 1 auto; min-width: 0; }
.herb-block .name { font-family: var(--serif); font-size: 15.5px; font-weight: 600; }
.herb-block .dose { font-size: 12.5px; color: var(--ink-3); font-family: var(--mono); }
.herb-block .why { margin-top: 5px; font-size: 13.5px; color: var(--ink-2); }
.herb-block .contrast {
  margin-top: 6px; font-size: 13px; color: #5c5340; background: var(--gold-soft);
  border-left: 2px solid var(--gold); padding: 5px 9px; border-radius: 0 6px 6px 0;
}
.src { flex: 0 0 auto; margin-left: 7px; font-size: 10.5px; color: var(--ink-3); border: 1px solid var(--line); padding: 0 5px; border-radius: 4px; margin-left: 6px; white-space: nowrap; }

.mark-bar { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.mark-btn {
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fffdf8; color: var(--ink-3);
}
.mark-btn:hover { border-color: #cdbb9b; }
.mark-btn.on.agree { background: var(--jade-soft); border-color: #bcd3c4; color: var(--jade); }
.mark-btn.on.doubt { background: #fbf0dc; border-color: #e6d3a9; color: #8a6626; }
.mark-btn.on.add { background: var(--cinnabar-soft); border-color: #e6c5bb; color: var(--cinnabar); }

.quest { display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: 13.8px; }
.quest:last-child { border-bottom: 0; }
.quest .n {
  flex: 0 0 20px; height: 20px; border-radius: 50%; background: var(--cinnabar-soft);
  color: var(--cinnabar); font-size: 11.5px; display: grid; place-items: center; margin-top: 1px;
}

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.tbl th { color: var(--ink-3); font-weight: 500; font-size: 11.5px; letter-spacing: 0.05em; background: #f9f4ea; }
table.tbl tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------------------ 笔记 */
.note-editor {
  width: 100%; min-height: 60vh; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; background: #fffdf9; font-family: var(--serif); font-size: 15px; line-height: 1.85;
}
.md { font-size: 14.8px; line-height: 1.85; color: var(--ink-2); }
.md h1 { font-size: 20px; margin: 4px 0 12px; color: var(--ink); }
.md h2 {
  font-size: 15.5px; margin: 22px 0 8px; color: var(--ink);
  padding-bottom: 5px; border-bottom: 1px solid var(--line-2);
}
.md h3 { font-size: 14.5px; margin: 16px 0 6px; color: var(--cinnabar); }
.md p { margin: 7px 0; }
.md ul { margin: 6px 0; padding-left: 20px; }
.md li { margin: 3px 0; }
.md blockquote {
  margin: 8px 0; padding: 7px 12px; border-left: 3px solid var(--line);
  background: #f9f4ea; color: var(--ink-3); font-size: 13.5px; border-radius: 0 6px 6px 0;
}
.md strong { color: var(--ink); font-weight: 600; }
.md hr { border: 0; border-top: 1px dashed var(--line); margin: 16px 0; }
.md code { background: var(--paper-3); padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: 12.5px; }

/* ------------------------------------------------------------ 知识库 */
.kb-item { padding: 12px 15px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.kb-item:last-child { border-bottom: 0; }
.kb-item:hover { background: #fffdf8; }
.kb-item .n { font-family: var(--serif); font-size: 15.5px; }
.kb-item .f { font-size: 12.8px; color: var(--ink-3); margin-top: 2px; }

.seg { display: inline-flex; background: var(--paper-3); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: none; padding: 5px 13px; border-radius: 7px;
  font-size: 13px; color: var(--ink-3); cursor: pointer;
}
.seg button.on { background: #fffdf8; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.06); }

/* ------------------------------------------------------------ 登录 */
.gate {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(120% 90% at 50% 0%, #fbf6ea 0%, #f2e9d8 55%, #ece1cd 100%);
}
.gate-inner { width: 100%; max-width: 360px; text-align: center; }
.gate-seal {
  width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 14px;
  background: var(--cinnabar); color: #fdf6e9; display: grid; place-items: center;
  font-family: var(--serif); font-size: 30px; font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(255, 246, 230, 0.45), 0 10px 26px -12px rgba(140, 50, 30, 0.55);
}
.gate h1 { font-size: 22px; letter-spacing: 0.14em; margin-bottom: 6px; }
.gate .tagline { font-size: 12.5px; color: var(--ink-3); letter-spacing: 0.1em; margin-bottom: 26px; }
.gate form { display: grid; gap: 10px; }
.gate input { text-align: center; letter-spacing: 0.2em; }
.gate .foot { margin-top: 22px; font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }

/* ------------------------------------------------------------ 浮层 */
.toast-wrap {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: rgba(29, 26, 22, 0.94); color: #f8f1e3; padding: 9px 16px; border-radius: 999px;
  font-size: 13.5px; box-shadow: 0 8px 24px -10px rgba(0,0,0,.5); max-width: 86vw;
  animation: toastIn 0.22s ease-out;
}
.toast.err { background: rgba(166, 64, 47, 0.96); }
.toast.ok { background: rgba(70, 104, 90, 0.96); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sheet-mask {
  position: fixed; inset: 0; background: rgba(28, 22, 16, 0.42); z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade 0.18s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 620px; background: var(--paper-2);
  border-radius: 18px 18px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow: auto; animation: sheetUp 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes sheetUp { from { transform: translateY(18px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) {
  .sheet-mask { align-items: center; }
  .sheet { border-radius: 18px; }
}
.sheet h3 { font-size: 16px; margin-bottom: 12px; letter-spacing: 0.05em; }

.spinner {
  width: 15px; height: 15px; border: 2px solid rgba(120, 100, 70, 0.25);
  border-top-color: var(--cinnabar); border-radius: 50%;
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, #efe7d8 25%, #f7f2e7 50%, #efe7d8 75%);
  background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 8px;
}
@keyframes sk { to { background-position: -200% 0; } }

.progress { height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--cinnabar); transition: width 0.4s; }

.analysis-loading { text-align: center; padding: 34px 20px; }
.analysis-loading .steps { margin-top: 16px; display: grid; gap: 7px; text-align: left; max-width: 300px; margin-inline: auto; }
.analysis-loading .steps div { font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.analysis-loading .steps div.on { color: var(--ink); }
