/* ============================================================
 * 交互原型 · 桌面外壳与演示控制台
 * 注意：本文件的样式只属于「原型浏览器外壳」与「演示控制台」，
 *       不属于微信小程序 UI。小程序页面样式全部在 components.css。
 * ============================================================ */
.app-head {
  background: #fff; border-bottom: 1px solid #DFE6EE; padding: 14px 26px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.app-head .logo { width: 34px; height: 34px; border-radius: 8px; }
.app-head h1 { font-size: 16px; font-weight: 700; color: var(--ink-900); }
.app-head .sub { font-size: var(--fs-xs); color: var(--ink-500); margin-top: 2px; }
.app-head .chips { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: var(--fs-tag); color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-line); padding: 4px 8px; border-radius: 4px; white-space: nowrap; }
.chip.gray { color: var(--ink-500); background: #F1F4F7; border-color: #E1E7EE; }

.app-main { display: flex; align-items: flex-start; gap: 30px; padding: 26px; min-height: calc(100vh - 68px); }

/* ---------- 左侧：设备区 ---------- */
.stage { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.stage-bar { width: var(--phone-w); display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: var(--fs-xs); color: var(--ink-500); gap: 8px; }
.stage-bar .path { color: var(--brand); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-bar .depth { flex: none; }
.device-note { width: var(--phone-w); margin-top: 14px; font-size: var(--fs-tag); color: var(--ink-400); line-height: 1.8; text-align: center; }
.device-note code { background: #E8EDF3; padding: 1px 4px; border-radius: 3px; color: var(--ink-700); }

/* ---------- 右侧：控制台 ---------- */
.console {
  width: 328px; flex: none; background: #fff; border: 1px solid #DFE6EE;
  border-radius: 12px; box-shadow: var(--sh-card); overflow: hidden;
  position: sticky; top: 26px; max-height: calc(100vh - 52px); display: flex; flex-direction: column;
}
.console-head { padding: 14px 16px; border-bottom: 1px solid var(--line); flex: none; }
.console-head h2 { font-size: var(--fs-h3); font-weight: 700; color: var(--ink-900); }
.console-head p { font-size: var(--fs-tag); color: var(--ink-400); margin-top: 4px; line-height: 1.6; }
.console-body { overflow-y: auto; padding: 4px 16px 16px; }
.console-body::-webkit-scrollbar { width: 5px; }
.console-body::-webkit-scrollbar-thumb { background: #D6DEE8; border-radius: 3px; }

.cgroup { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.cgroup:last-child { border-bottom: 0; }
.cgroup > h3 { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-900); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.cgroup > h3 .no { font-size: 9px; color: #fff; background: var(--brand); width: 16px; height: 16px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; }
.cgroup .hint { font-size: var(--fs-tag); color: var(--ink-400); line-height: 1.6; margin-bottom: 9px; }
.cgroup .hint b { color: var(--ink-700); }

.opt-list { display: grid; gap: 6px; }
.opt {
  display: flex; align-items: center; gap: 8px; min-height: 34px;
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px;
  font-size: var(--fs-xs); color: var(--ink-700); cursor: pointer; background: #fff;
  text-align: left; width: 100%; transition: all .14s ease;
}
.opt:hover { border-color: var(--brand-line); background: #FAFCFE; }
.opt.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.opt .swatch { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-400); flex: none; }
.opt.on .swatch { background: var(--brand); }
.opt small { margin-left: auto; font-size: 9px; color: var(--ink-400); font-weight: 400; }
.opt.on small { color: var(--brand); }

.grid-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grid-btns .opt { justify-content: flex-start; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-btn { flex: 1; min-width: 84px; min-height: 32px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: var(--fs-xs); color: var(--ink-700); }
.mini-btn:hover { border-color: var(--brand-line); color: var(--brand); }
.mini-btn.warn { border-color: var(--danger-line); color: var(--danger); }
.mini-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.state-table { width: 100%; font-size: var(--fs-tag); border-collapse: collapse; }
.state-table td { padding: 5px 0; border-bottom: 1px solid #F1F4F7; color: var(--ink-500); vertical-align: top; }
.state-table td:last-child { text-align: right; color: var(--ink-900); font-weight: 600; max-width: 170px; word-break: break-all; }
.state-table tr:last-child td { border-bottom: 0; }

.check-list { font-size: var(--fs-tag); line-height: 1.9; color: var(--ink-700); }
.check-list li { display: flex; gap: 6px; align-items: flex-start; }
.check-list li::before { content: "✓"; color: var(--ok); font-weight: 700; flex: none; }
.check-list li.warn::before { content: "!"; color: var(--warn); }
.check-list code { background: #F1F4F7; padding: 0 3px; border-radius: 2px; }

.console-foot { padding: 10px 16px; border-top: 1px solid var(--line); background: #FAFCFE; font-size: 9px; color: var(--ink-400); line-height: 1.6; flex: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .app-main { flex-direction: column; align-items: center; padding: 16px; gap: 18px; }
  .console { width: 100%; max-width: 420px; position: static; max-height: none; }
  .console-body { max-height: 460px; }
  .stage { width: 100%; }
}
