/*
 * 手机屏幕里的样式：屏幕骨架 + 组件。
 * 组件的用法见 core/ui.js，效果见原型里的“基础组件”等页面。
 */

/* ================= 屏幕骨架 ================= */

/* 屏幕：状态栏和底部横条固定在这一层，页面（.app）在里面切换 */
.device__screen {
  position: relative; overflow: hidden; isolation: isolate;
  width: var(--device-w); height: var(--device-h);
  border-radius: 44px; background: var(--page);
}
.device--bare .device__screen { width: 100%; height: 100%; border-radius: 0; }

.app {
  --bg: var(--page);
  --safe-bottom: 20px;
  box-sizing: border-box; /* 顶部给状态栏留的空间算在高度里，底部才不会被挤出屏幕 */
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink-700);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 22px;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
.app--white { --bg: var(--surface); }
/* 基础重置用 :where() 降低优先级，组件的样式才能覆盖它 */
:where(.app) *, :where(.app) *::before, :where(.app) *::after { box-sizing: border-box; }
:where(.app) :where(h1, h2, h3, h4, p) { margin: 0; font: inherit; }
:where(.app) button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0;
  text-align: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
:where(.app) :where(input, textarea) { font: inherit; color: inherit; margin: 0; }
.app :focus-visible { outline: 2px solid var(--orange-400); outline-offset: 2px; }
.app .ic { width: 20px; height: 20px; flex: none; display: block; }

/* 页面切换动画：进入下一页从右边滑入，返回时滑出 */
.app--in-push, .app--out-push, .app--in-pop, .app--out-pop { position: absolute; inset: 0; }
.app--in-push { z-index: 2; animation: fx-push-in .34s var(--ease) both; box-shadow: -10px 0 30px rgba(15, 35, 70, .12); }
.app--out-push { z-index: 1; animation: fx-push-out .34s var(--ease) both; }
.app--in-pop { z-index: 1; animation: fx-pop-in .34s var(--ease) both; }
.app--out-pop { z-index: 2; animation: fx-pop-out .34s var(--ease) both; box-shadow: -10px 0 30px rgba(15, 35, 70, .12); }

/* 带外框时给状态栏留位置 */
.device:not(.device--bare) .app { padding-top: 44px; }

/* 状态栏 */
.app-status {
  position: absolute; top: 0; left: 0; right: 0; z-index: 80; pointer-events: none;
  height: 44px; padding: 0 24px 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600; color: var(--ink-900);
}
.app-status__icons { display: flex; align-items: center; gap: 6px; }

/* 导航栏：左侧标题，右侧小程序胶囊 */
.app-nav {
  flex: none; height: 44px; padding: 0 8px 0 16px;
  display: flex; align-items: center; gap: 2px;
}
.app-nav__back {
  width: 32px; height: 32px; margin-left: -8px;
  display: grid; place-items: center; border-radius: 50%; color: var(--ink-900);
}
.app-nav__back .ic { width: 24px; height: 24px; }
.app-nav__title {
  flex: 1; min-width: 0;
  font-size: var(--fs-heading); font-weight: 600; color: var(--ink-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-nav--root .app-nav__title { font-size: var(--fs-title); font-weight: 700; letter-spacing: .02em; }
.capsule {
  flex: none; width: 87px; height: 32px; border-radius: 16px;
  display: flex; align-items: center; color: var(--ink-900);
  background: rgba(255, 255, 255, .72); box-shadow: inset 0 0 0 .5px rgba(24, 34, 58, .16);
}
.capsule span { flex: 1; height: 100%; display: grid; place-items: center; }
.capsule i { width: 1px; height: 18px; background: rgba(24, 34, 58, .12); }

/* 内容区：自动纵向排列，间距 12 */
.app-body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 12px;
  padding: 4px var(--page-x) 24px;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none;
}
.app-body::-webkit-scrollbar { display: none; }
.app-body > * { flex: none; }
.app.no-bottom .app-body { padding-bottom: calc(24px + var(--safe-bottom)); }

/* 底部：操作区 + 标签栏 */
.app-bottom { flex: none; position: relative; padding-bottom: var(--safe-bottom); background: var(--bg); }
.app.has-tabbar .app-bottom { background: var(--surface); }
.app-footer { position: relative; padding: 8px var(--page-x) 10px; background: var(--bg); }
.app-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 20px;
  background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none;
}
.app-tabbar { display: flex; height: 54px; background: var(--surface); box-shadow: inset 0 .5px 0 var(--line-strong); }
.app-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: var(--fs-micro); line-height: 14px; color: var(--ink-400);
}
.app .app-tab .ic { width: 24px; height: 24px; }
.app-tab.is-active { color: var(--orange-500); font-weight: 600; }
.app-indicator {
  position: absolute; left: 50%; bottom: 8px; z-index: 70; pointer-events: none;
  width: 134px; height: 5px; border-radius: 3px; background: var(--ink-900); transform: translateX(-50%);
}

/* 未设计页面的占位 */
.app-body.is-todo { justify-content: center; align-items: center; text-align: center; }
.todo { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 28px 60px; }
.todo__icon {
  width: 64px; height: 64px; margin-bottom: 10px; border-radius: 20px;
  display: grid; place-items: center; color: var(--ink-300);
  border: 1.5px dashed var(--line-strong);
}
.app .todo__icon .ic { width: 26px; height: 26px; }
.todo__title { font-size: var(--fs-heading); font-weight: 600; color: var(--ink-900); }
.todo__desc { font-size: var(--fs-sub); line-height: 20px; color: var(--ink-400); }
.todo__back { margin-top: 16px; }

/* 页面代码出错时的提示 */
.app-error {
  padding: 12px; border-radius: var(--r-md); background: var(--red-50); color: var(--red-600);
  font: 12px/18px ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-all;
}

/* ================= 文字与布局工具 ================= */

.t-display { font-size: var(--fs-display); line-height: 34px; font-weight: 700; color: var(--ink-900); letter-spacing: .02em; }
.t-title   { font-size: var(--fs-title); line-height: 28px; font-weight: 700; color: var(--ink-900); }
.t-heading { font-size: var(--fs-heading); line-height: 24px; font-weight: 600; color: var(--ink-900); }
.t-body    { font-size: var(--fs-body); line-height: 22px; color: var(--ink-700); }
.t-sub     { font-size: var(--fs-sub); line-height: 19px; color: var(--ink-500); }
.t-micro   { font-size: var(--fs-micro); line-height: 16px; color: var(--ink-400); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.c-orange { color: var(--orange-600); }
.c-red { color: var(--red-500); }
.c-green { color: var(--green-500); }
.c-muted { color: var(--ink-400); }
.link { color: var(--navy-700); }

.row { display: flex; align-items: center; gap: 8px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack--sm { gap: 8px; }
.stack--xs { gap: 4px; }
.stack--lg { gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ================= 组件 ================= */

/* 分组标题 */
.sec { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px 0; }
.sec__title { font-size: var(--fs-body); font-weight: 600; color: var(--ink-900); }
.sec__extra { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-sub); color: var(--ink-400); }
.app .sec__extra .ic { width: 14px; height: 14px; }

/* 卡片 */
.card { display: block; width: 100%; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.card--flush { padding: 0; overflow: hidden; }
.card--soft { background: var(--navy-50); box-shadow: none; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card__title { font-size: var(--fs-body); font-weight: 600; color: var(--ink-900); }
.card__extra { font-size: 12px; color: var(--ink-400); }

/* 标题卡（深蓝） */
.hero {
  position: relative; overflow: hidden;
  padding: 20px 20px 18px; border-radius: var(--r-xl); color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(58, 104, 170, .55) 0%, transparent 55%),
    linear-gradient(160deg, var(--navy-700), var(--navy-900));
  box-shadow: 0 12px 24px -12px rgba(15, 35, 70, .55);
}
.hero::after {
  content: ""; position: absolute; right: -70px; bottom: -110px; width: 220px; height: 220px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); pointer-events: none;
}
.hero__title { font-size: var(--fs-display); line-height: 34px; font-weight: 700; letter-spacing: .02em; }
.hero__desc { margin-top: 6px; font-size: var(--fs-sub); line-height: 19px; color: rgba(255, 255, 255, .72); }
.hero__lights { position: absolute; top: 18px; right: 18px; display: flex; gap: 4px; }
.hero__lights i { width: 6px; height: 6px; border-radius: 50%; background: var(--red-500); }
.hero__lights i:nth-child(2) { background: var(--amber-500); }
.hero__lights i:nth-child(3) { background: var(--green-500); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  font-size: var(--fs-body); font-weight: 600; line-height: 1; white-space: nowrap;
  user-select: none; -webkit-user-select: none;
  transition: transform .12s var(--ease), filter .12s;
}
.app .btn .ic { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #F69548 0%, #EE7D2B 100%);
  box-shadow: 0 8px 18px -8px rgba(226, 113, 31, .7), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn--secondary { color: var(--orange-600); background: var(--orange-50); box-shadow: inset 0 0 0 1px var(--orange-200); }
.btn--outline { color: var(--ink-900); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--dark { color: #fff; background: var(--navy-800); }
.btn--text { height: auto; padding: 4px 2px; color: var(--orange-600); font-weight: 500; font-size: 14px; }
.btn--lg { height: 50px; font-size: var(--fs-heading); letter-spacing: .04em; }
.btn--sm { height: 30px; padding: 0 12px; font-size: var(--fs-sub); }
.app .btn--sm .ic { width: 14px; height: 14px; }
.btn--block { display: flex; width: 100%; }
.btn:disabled { opacity: .4; box-shadow: none; pointer-events: none; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--navy-50); color: var(--ink-500);
}
.tag--orange { background: #FFF0DC; color: #D46F17; }
.tag--navy { background: var(--navy-100); color: var(--navy-800); }
.tag--red { background: var(--red-50); color: var(--red-600); }
.tag--amber { background: var(--amber-50); color: var(--amber-600); }
.tag--green { background: var(--green-50); color: var(--green-600); }
.tag--line { height: 20px; padding: 0 6px; background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-400); font-weight: 500; font-size: 11px; }

/* 对标依据 */
.basis {
  display: inline-flex; align-items: center; min-height: 26px; padding: 4px 12px;
  border-radius: var(--r-pill); background: #FFF0E2; color: #B0612A;
  font-size: 12px; line-height: 18px; font-weight: 600;
}

/* 体检灯 */
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-300); }
.dot--red { background: var(--red-500); box-shadow: 0 0 0 3px rgba(229, 72, 77, .15); }
.dot--amber { background: var(--amber-500); box-shadow: 0 0 0 3px rgba(242, 162, 27, .18); }
.dot--green { background: var(--green-500); box-shadow: 0 0 0 3px rgba(31, 163, 107, .15); }
.dot--lg { width: 10px; height: 10px; }
.light {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.light .dot { width: 6px; height: 6px; box-shadow: none; }
.light--red { background: var(--red-50); color: var(--red-600); }
.light--red .dot { background: var(--red-500); }
.light--amber { background: var(--amber-50); color: var(--amber-600); }
.light--amber .dot { background: var(--amber-500); }
.light--green { background: var(--green-50); color: var(--green-600); }
.light--green .dot { background: var(--green-500); }

/* 红黄绿统计 */
.lights { display: flex; gap: 8px; }
.lights__item { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-md); }
.lights__item--red { background: var(--red-50); }
.lights__item--amber { background: var(--amber-50); }
.lights__item--green { background: var(--green-50); }
.lights__num { font-family: var(--font-num); font-size: 26px; line-height: 30px; font-weight: 700; }
.lights__item--red .lights__num { color: var(--red-500); }
.lights__item--amber .lights__num { color: var(--amber-600); }
.lights__item--green .lights__num { color: var(--green-500); }
.lights__label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-500); }
.lights__label .dot { width: 6px; height: 6px; box-shadow: none; }

/* 综合得分环 */
.score { position: relative; flex: none; width: var(--size, 108px); height: var(--size, 108px); }
.score svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.score__track { stroke: var(--navy-100); }
.score__bar { stroke: var(--orange-500); transition: stroke-dashoffset 1.1s var(--ease); }
.score--green .score__bar { stroke: var(--green-500); }
.score--red .score__bar { stroke: var(--red-500); }
.score__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score__num { font-family: var(--font-num); font-size: 34px; line-height: 36px; font-weight: 700; color: var(--ink-900); }
.score__num small { margin-left: 1px; font-size: 13px; font-weight: 500; color: var(--ink-400); }
.score__label { font-size: var(--fs-micro); color: var(--ink-400); }

/* 上传区 */
.upload {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%;
  padding: 20px 16px 18px; border-radius: var(--r-lg); text-align: center;
  border: 1.5px dashed #F4BE90; background: linear-gradient(180deg, #FFF9F3, #FFF2E4);
}
.upload__icon {
  width: 48px; height: 48px; margin-bottom: 8px; border-radius: 50%;
  display: grid; place-items: center; color: var(--orange-500);
  background: var(--orange-100); box-shadow: 0 0 0 6px rgba(253, 230, 208, .5);
}
.app .upload__icon .ic { width: 24px; height: 24px; }
.upload__title { font-size: var(--fs-heading); font-weight: 600; color: var(--ink-900); }
.upload__desc { font-size: 12px; color: var(--ink-400); }

/* 已选文件 */
.file { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.file__icon {
  flex: none; width: 40px; height: 48px; border-radius: 8px; display: grid; place-items: center;
  font: 700 11px/1 var(--font-num); background: var(--red-50); color: var(--red-500);
}
.file__icon--ppt, .file__icon--pptx { background: var(--orange-50); color: var(--orange-600); }
.file__icon--doc, .file__icon--docx { background: var(--navy-100); color: var(--navy-700); }
.file__body { flex: 1; min-width: 0; }
.file__name { font-size: var(--fs-body); font-weight: 600; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file__meta { font-size: 12px; color: var(--ink-400); }
.file__action { flex: none; font-size: var(--fs-sub); color: var(--orange-600); }

/* 输入框 */
.field { display: block; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.field__label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--ink-500); }
.field__input {
  display: block; width: 100%; padding: 11px 12px; border: 0; outline: 0; resize: none;
  border-radius: var(--r-md); background: var(--navy-50);
  font-size: 14px; line-height: 20px; color: var(--ink-900);
}
.field__input::placeholder { color: var(--ink-400); }
.field__input:focus { background: #fff; box-shadow: inset 0 0 0 1.5px var(--orange-400); }
.field__hint { display: block; margin-top: 6px; font-size: var(--fs-micro); color: var(--ink-400); text-align: right; }

/* 分段选择 */
.seg { display: flex; padding: 3px; border-radius: var(--r-pill); background: #E8ECF3; }
.seg__item { flex: 1; height: 32px; border-radius: var(--r-pill); display: grid; place-items: center; font-size: 14px; color: var(--ink-500); }
.seg__item.is-on { background: var(--surface); color: var(--ink-900); font-weight: 600; box-shadow: 0 1px 3px rgba(21, 48, 90, .14); }

/* 开关 */
.switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line-strong); }
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.switch.is-on { background: var(--orange-500); }
.switch.is-on::after { transform: translateX(18px); }

/* 协议勾选 */
.agree { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 18px; color: var(--ink-400); }
.agree__box {
  flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%;
  display: grid; place-items: center; color: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-300);
}
.app .agree__box .ic { width: 11px; height: 11px; stroke-width: 3; }
.agree.is-on .agree__box { color: #fff; background: var(--orange-500); box-shadow: none; }

/* 列表 */
.list { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.list > * { position: relative; }
.list > * + *::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--line); }
.cell { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 16px; }
.cell__icon { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-700); }
.app .cell__icon .ic { width: 18px; height: 18px; }
.cell__icon--orange { background: var(--orange-50); color: var(--orange-500); }
.cell__icon--green { background: var(--green-50); color: var(--green-500); }
.cell__icon--red { background: var(--red-50); color: var(--red-500); }
.cell__icon--amber { background: var(--amber-50); color: var(--amber-600); }
.cell__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cell__title { font-size: var(--fs-body); color: var(--ink-900); }
.cell__desc { font-size: 12px; line-height: 17px; color: var(--ink-400); }
.cell__value { flex: none; font-size: var(--fs-sub); color: var(--ink-400); }
.cell__arrow { flex: none; color: var(--ink-300); }
.app .cell__arrow .ic { width: 16px; height: 16px; }

/* 带体检灯的列表行 */
.srow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; }
.srow__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.srow__title { display: flex; align-items: center; gap: 6px; font-size: var(--fs-body); font-weight: 600; color: var(--ink-900); }
.srow__desc { font-size: var(--fs-sub); line-height: 18px; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow__state { flex: none; font-size: 12px; font-weight: 600; }
.srow__state--red { color: var(--red-500); }
.srow__state--amber { color: var(--amber-600); }
.srow__state--green { color: var(--green-500); }

/* 四宫格要点 */
.feat {
  display: flex; align-items: center; gap: 10px; padding: 13px 12px; border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow-card);
  font-size: 14px; font-weight: 600; color: var(--ink-900);
}

/* 问题卡片 */
.issue { padding: 16px 16px 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.issue__head { display: flex; align-items: flex-start; gap: 10px; }
.issue__head .dot { margin-top: 7px; }
.issue__title { font-size: 16px; line-height: 24px; font-weight: 700; color: var(--ink-900); }
.issue__desc { margin: 6px 0 0 20px; font-size: 14px; line-height: 21px; color: var(--ink-500); }
.issue__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 0 20px; }

/* 大数字 */
.stat__label { font-size: 12px; color: var(--ink-400); }
.stat__value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin-top: 2px; }
.stat__num { font-family: var(--font-num); font-size: 38px; line-height: 44px; font-weight: 700; color: var(--ink-900); }
.stat__unit { margin-left: -4px; font-size: 20px; font-weight: 700; color: var(--ink-900); }
.stat__trend { font-size: var(--fs-sub); font-weight: 600; color: var(--green-500); }
.stat__trend--down { color: var(--red-500); }

/* 进度条 */
.progress__row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: var(--fs-sub); color: var(--ink-500); }
.progress__row .num { font-weight: 700; color: var(--ink-900); }
.bar { height: 6px; border-radius: 3px; background: var(--navy-100); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #F8AD6B, var(--orange-500)); transition: width .9s var(--ease); }
.bar--navy > i { background: var(--navy-700); }
.bar--green > i { background: var(--green-500); }
.bar--red > i { background: var(--red-500); }
.bar--gray > i { background: var(--ink-300); }

/* 同行对比 */
.compare { display: flex; flex-direction: column; gap: 8px; }
.compare__title { font-size: 14px; font-weight: 600; color: var(--ink-900); }
.compare__line { display: grid; grid-template-columns: 64px 1fr 44px; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-500); }
.compare__line .bar { height: 8px; border-radius: 4px; }
.compare__line .num { text-align: right; font-size: 14px; font-weight: 700; color: var(--ink-900); }
.compare__note { font-size: var(--fs-micro); color: var(--ink-400); }

/* 四象限 */
.quad__plot {
  position: relative; height: 188px; border-radius: var(--r-md); background:
    linear-gradient(var(--line-strong), var(--line-strong)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) 0 50% / 100% 1px no-repeat,
    var(--navy-50);
}
.quad__y { position: absolute; left: 8px; font-size: 11px; color: var(--ink-400); }
.quad__y--top { top: 6px; }
.quad__y--bottom { bottom: 6px; }
.quad__pt { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 3px; transform: translate(-50%, -50%); }
.quad__pt i { width: 16px; height: 16px; border-radius: 50%; background: var(--ink-300); box-shadow: 0 0 0 3px rgba(195, 201, 213, .3); }
.quad__pt b { font-size: 11px; font-weight: 500; color: var(--ink-500); white-space: nowrap; }
.quad__pt.is-me i { width: 26px; height: 26px; background: var(--orange-500); box-shadow: 0 0 0 5px rgba(240, 131, 47, .2); }
.quad__pt.is-me b { font-weight: 700; color: var(--orange-600); }
.quad__x { display: flex; justify-content: space-between; padding: 6px 4px 0; font-size: 11px; color: var(--ink-400); }

/* 星级 */
.stars { display: inline-flex; gap: 1px; color: var(--amber-500); }
.app .stars .ic { width: 12px; height: 12px; }
.stars .is-off { color: var(--line-strong); }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sub); color: var(--ink-500); }

/* 步骤 */
.steps { display: flex; flex-direction: column; }
.step { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: 11px; top: 28px; bottom: 4px; width: 2px; border-radius: 1px; background: var(--line); }
.step:last-child::before { display: none; }
.step.is-done::before { background: rgba(31, 163, 107, .3); }
.step__mark {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy-50); color: var(--ink-400); font-size: 12px;
}
.app .step__mark .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.step.is-done .step__mark { background: var(--green-50); color: var(--green-500); }
.step.is-active .step__mark { background: var(--orange-50); }
.step__body { padding-top: 1px; }
.step__title { font-size: var(--fs-body); line-height: 22px; font-weight: 500; color: var(--ink-900); }
.step.is-todo .step__title { color: var(--ink-400); }
.step__desc { font-size: 12px; line-height: 17px; color: var(--ink-400); }
.step.is-active .step__desc { color: var(--orange-600); }
.steps--compact .step { padding-bottom: 10px; }
.steps--compact .step::before { top: 27px; bottom: 1px; }

/* 选项卡片（单选） */
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px;
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card);
}
.choice.is-on { box-shadow: inset 0 0 0 1.5px var(--orange-500), 0 6px 20px rgba(240, 131, 47, .12); }
.choice__radio { flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-300); }
.choice.is-on .choice__radio { box-shadow: inset 0 0 0 6px var(--orange-500); }
.choice__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.choice__title { display: flex; align-items: center; gap: 6px; font-size: var(--fs-body); font-weight: 600; color: var(--ink-900); }
.choice__desc { font-size: 12px; line-height: 17px; color: var(--ink-400); }
.choice__side { flex: none; font-size: var(--fs-body); font-weight: 600; color: var(--ink-900); }
.choice__extra { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; }
.choice__extra .rating { font-size: 12px; }

/* 价格 */
.price { font-family: var(--font-num); font-size: 20px; line-height: 24px; font-weight: 700; color: var(--ink-900); white-space: nowrap; }
.price small { margin: 0 1px; font-size: 12px; font-weight: 600; color: var(--ink-500); }

/* 修改前后对比 */
.diff { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.diff__part { padding: 14px 16px; }
.diff__part--before { background: var(--navy-50); }
.diff__label { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--ink-400); }
.app .diff__label .ic { width: 14px; height: 14px; }
.diff__part--after .diff__label { color: var(--green-600); }
.diff__text { font-size: 14px; line-height: 22px; color: var(--ink-900); }
.diff__part--before .diff__text { color: var(--ink-500); }

/* 修改稿里的数据：按来源标颜色，点开可以直接改 */
.datum {
  display: inline; margin: 0 1px; padding: 1px 5px; border-radius: 6px;
  font: inherit; font-weight: 700; line-height: inherit; white-space: nowrap; cursor: pointer;
  background: var(--navy-100); color: var(--navy-800); box-shadow: inset 0 -1.5px 0 rgba(30, 65, 117, .35);
}
span.datum { cursor: default; }
.datum--ai { background: #FFEDC2; color: #8F5600; box-shadow: inset 0 -1.5px 0 var(--amber-500); }
.datum--empty { background: var(--red-50); color: var(--red-600); box-shadow: inset 0 0 0 1px rgba(229, 72, 77, .45); font-weight: 600; }
.datum--edited { background: var(--green-50); color: var(--green-600); box-shadow: none; }
.app .datum .ic { display: inline-block; width: 12px; height: 12px; margin-left: 2px; vertical-align: -1px; stroke-width: 2.6; }
.datum-calc { font-weight: 700; color: var(--ink-900); }

/* 打勾清单 */
.checklist { display: flex; flex-direction: column; gap: 10px; }
.checklist__item { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 21px; color: var(--ink-900); }
.app .checklist__item .ic { width: 18px; height: 18px; margin-top: 2px; color: var(--green-500); stroke-width: 2.2; }

/* 加载 */
.spinner {
  display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--orange-100); border-top-color: var(--orange-500);
  animation: fx-spin .8s linear infinite;
}

/* 头像 */
.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff; background: var(--navy-800);
}
.avatar--orange { background: linear-gradient(180deg, #F69548, #EE7D2B); }
.avatar--light { background: var(--navy-100); color: var(--navy-800); }

/* 对话 */
.msg { display: flex; align-items: flex-start; gap: 10px; }
.msg--me { flex-direction: row-reverse; }
.bubble {
  max-width: 262px; padding: 10px 14px; border-radius: 16px;
  font-size: var(--fs-body); line-height: 22px; color: var(--ink-900);
  background: var(--surface); box-shadow: var(--shadow-card);
}
.msg--them .bubble { border-top-left-radius: 4px; font-weight: 600; }
.msg--me .bubble { border-top-right-radius: 4px; background: #E6ECF5; box-shadow: none; color: var(--ink-700); }

/* AI 建议 */
.ai { padding: 14px 16px; border-radius: var(--r-lg); background: var(--orange-50); box-shadow: inset 0 0 0 1px var(--orange-200); }
.ai__head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: var(--fs-sub); font-weight: 600; color: var(--orange-600); }
.app .ai__head .ic { width: 16px; height: 16px; }
.ai__body { font-size: 14px; line-height: 22px; color: var(--ink-900); }
.ai__body ol { margin: 0; padding: 0; list-style: none; counter-reset: ai; }
.ai__body li { display: flex; gap: 6px; counter-increment: ai; }
.ai__body li::before { content: counter(ai) "."; flex: none; min-width: 14px; font-family: var(--font-num); font-weight: 700; }

/* 提示条 */
.notice {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--navy-50); font-size: 12px; line-height: 18px; color: var(--ink-500);
}
.app .notice .ic { width: 16px; height: 16px; margin-top: 1px; color: var(--ink-400); }
.notice--orange { background: var(--orange-50); color: #9A5A22; }
.app .notice--orange .ic { color: var(--orange-500); }
.notice--red { background: var(--red-50); color: var(--red-600); }
.app .notice--red .ic { color: var(--red-500); }
.notice--green { background: var(--green-50); color: var(--green-600); }
.app .notice--green .ic { color: var(--green-500); }

/* 底部小字 */
.foot-note { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 6px; font-size: var(--fs-micro); line-height: 16px; color: var(--ink-400); }
.app .foot-note .ic { width: 12px; height: 12px; }

/* ================= 弹层 ================= */

.app-layer { position: absolute; inset: 0; z-index: 50; display: none; }
.app-layer.is-open { display: block; }
.layer-mask { position: absolute; inset: 0; background: rgba(15, 35, 70, .42); animation: fx-fade .22s var(--ease) both; }

/* 底部弹窗 */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%;
  display: flex; flex-direction: column;
  padding: 8px 16px calc(16px + var(--safe-bottom));
  border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface);
  box-shadow: 0 -8px 30px rgba(15, 35, 70, .12);
  animation: fx-sheet-in .32s var(--ease) both;
}
.sheet__grip { flex: none; width: 36px; height: 4px; margin: 0 auto 6px; border-radius: 2px; background: var(--line-strong); }
.sheet__head { flex: none; position: relative; height: 40px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; }
.sheet__title { font-size: var(--fs-heading); font-weight: 600; color: var(--ink-900); }
.sheet__close {
  position: absolute; right: -4px; top: 4px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-400); background: var(--navy-50);
}
.app .sheet__close .ic { width: 16px; height: 16px; }
.sheet__body { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.sheet__foot { flex: none; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }

/* 对话框 */
.dialog {
  position: absolute; left: 50%; top: 50%; width: 300px; transform: translate(-50%, -50%);
  padding: 24px 20px 16px; border-radius: var(--r-xl); background: var(--surface); text-align: center;
  box-shadow: var(--shadow-float); animation: fx-pop .24s var(--ease) both;
}
.dialog__title { margin-bottom: 8px; font-size: var(--fs-heading); font-weight: 600; color: var(--ink-900); }
.dialog__body { font-size: 14px; line-height: 21px; color: var(--ink-500); }
.dialog__actions { display: flex; gap: 10px; margin-top: 20px; }
.dialog__actions .btn { flex: 1; padding: 0 12px; }

/* 全屏悬浮层 */
.layer--float .layer-mask {
  background: rgba(8, 16, 32, .8);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.float {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 48px 20px calc(12px + var(--safe-bottom));
}
.float > * { pointer-events: auto; }
/* 关闭按钮放在最下面，内容再高也不会挡住 */
.float__close {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
  animation: fx-fade .3s 1s both;
}
.app-layer.is-instant .float__close { animation: none; }
.app .float__close .ic { width: 16px; height: 16px; }
.float__body { display: flex; flex-direction: column; align-items: center; }
.float__actions { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 300px; animation: fx-fade .3s 1s both; }
.float .btn--outline { color: #fff; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }

.app-layer.is-instant .layer-mask,
.app-layer.is-instant .sheet,
.app-layer.is-instant .dialog,
.app-layer.is-instant .float__actions { animation: none; }
.app-layer.is-leaving .layer-mask { animation: fx-fade-out .2s both; }
.app-layer.is-leaving .sheet { animation: fx-sheet-out .2s both; }
.app-layer.is-leaving .dialog,
.app-layer.is-leaving .float { animation: fx-fade-out .16s both; }

/* 轻提示（在屏幕层，页面刷新时不会消失） */
.app-toasts { position: absolute; left: 0; right: 0; top: 42%; z-index: 90; display: flex; justify-content: center; pointer-events: none; }
.toast {
  display: inline-flex; align-items: center; gap: 8px; max-width: 260px; padding: 10px 16px;
  border-radius: 12px; background: rgba(24, 34, 58, .9); color: #fff; font-size: 14px; line-height: 20px;
  animation: fx-toast .2s var(--ease) both;
}
.toast--icon { flex-direction: column; min-width: 128px; padding: 18px 16px 14px; gap: 8px; }
.app .toast--icon .ic { width: 32px; height: 32px; stroke-width: 2; }
.toast.is-leaving { animation: fx-fade-out .2s both; }

/* ================= 动效 ================= */

@keyframes fx-spin { to { transform: rotate(360deg); } }
@keyframes fx-fade { from { opacity: 0; } }
@keyframes fx-fade-out { to { opacity: 0; } }
@keyframes fx-sheet-in { from { transform: translateY(100%); } }
@keyframes fx-sheet-out { to { transform: translateY(100%); } }
@keyframes fx-pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes fx-toast { from { opacity: 0; transform: scale(.92); } }
@keyframes fx-push-in { from { transform: translateX(100%); } }
@keyframes fx-push-out { to { transform: translateX(-28%); filter: brightness(.96); } }
@keyframes fx-pop-in { from { transform: translateX(-28%); filter: brightness(.96); } }
@keyframes fx-pop-out { to { transform: translateX(100%); } }

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