* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f0f2f5;
  color: #1f2329;
}
.page {
  max-width: 460px;
  margin: 0 auto;
  padding: 12px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- 测试控制台 ---------- */
.console {
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border: 1px solid #eef0f3;
}
.console-title { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.console-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.cl-label { font-size: 13px; color: #5a6573; min-width: 92px; }
.picker {
  flex: 1; min-width: 140px; padding: 6px 8px;
  border: 1px solid #d0d4da; border-radius: 8px; font-size: 14px;
  background: #fafbfc;
}
#timeout-switch { width: 18px; height: 18px; }
.btn-primary {
  background: #07c160; color: #fff; border: none; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; cursor: pointer;
}
.btn-primary:active { background: #06ad56; }
.btn-ghost {
  background: #f2f3f5; color: #5a6573; border: none; border-radius: 8px;
  padding: 8px 12px; font-size: 13px; cursor: pointer;
}
.test-info {
  font-size: 12px; color: #07c160; background: #e8f8ef;
  padding: 6px 8px; border-radius: 6px; margin-bottom: 4px;
}
.evt-title { font-size: 13px; font-weight: 600; margin: 8px 0 4px; color: #5a6573; }
.event-log {
  background: #0f1419; color: #d6e2f0; border-radius: 8px;
  padding: 8px; height: 150px; overflow-y: auto; font-size: 11px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; line-height: 1.5;
}
.evt-row { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evt-home_order { color: #ffd479; }
.evt-module_click { color: #8be9fd; }

/* ---------- 手机预览框 ---------- */
.phone {
  background: #fff; border-radius: 22px; overflow: hidden;
  border: 8px solid #1f2329; box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.phone-status {
  background: #1f2329; color: #fff; text-align: center;
  font-size: 12px; padding: 6px 0; letter-spacing: 1px;
}
.phone-home { padding: 10px; min-height: 340px; background: #f6f7f9; }
.phone-tabbar {
  display: flex; border-top: 1px solid #eceef0; background: #fff;
}
.phone-tabbar .tab {
  flex: 1; text-align: center; font-size: 12px; color: #9aa3ad; padding: 8px 0;
}
.phone-tabbar .tab.active { color: #07c160; font-weight: 600; }

/* ---------- 动态模块样式 ---------- */
.mod-banner {
  border-radius: 12px; padding: 18px 16px; color: #fff; margin-bottom: 10px;
}
.banner-title { font-size: 18px; font-weight: 700; }
.banner-sub { font-size: 13px; opacity: .92; margin-top: 4px; }

.mod-cat {
  display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap;
}
.cat-item { flex: 1; min-width: 56px; text-align: center; }
.cat-icon { height: 44px; border-radius: 10px; margin-bottom: 4px; }
.cat-name { font-size: 12px; color: #5a6573; }

.mod-floor { margin-bottom: 10px; }
.floor-title {
  font-size: 15px; font-weight: 700; margin: 6px 0 8px; color: #1f2329;
}
.mod-floor.seckill .floor-title { color: #ef5350; }
.goods-list { display: flex; gap: 8px; flex-wrap: wrap; }
.goods-card {
  width: calc(50% - 4px); border-radius: 10px; padding: 10px;
  cursor: pointer; transition: transform .08s;
}
.goods-card:active { transform: scale(.97); }
.goods-title { font-size: 13px; color: #1f2329; min-height: 34px; }
.goods-price { font-size: 15px; font-weight: 700; color: #fa5151; margin-top: 4px; }

.mod-unknown {
  background: #fff3e0; color: #b26a00; border-radius: 8px;
  padding: 10px; font-size: 12px; margin-bottom: 10px;
}
.empty {
  text-align: center; color: #9aa3ad; font-size: 13px;
  padding: 40px 0;
}

/* ---------- ICP ---------- */
.icp { text-align: center; font-size: 11px; }
.icp a { color: #9aa3ad; text-decoration: none; }

/* ---------- AI 生成面板 ---------- */
.ai-console { border: 1px solid #d7e9ff; background: #f5faff; }
.ai-prompt {
  width: 100%; border: 1px solid #c9d6e3; border-radius: 8px;
  padding: 8px; font-size: 13px; resize: vertical; margin-bottom: 10px;
  font-family: inherit;
}
.ai-console .test-info { color: #1763b5; background: #e3f0ff; }
#ai-gen { background: #1763b5; }
#ai-gen:active { background: #14529a; }
#ai-gen:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- A2UI 通用组件 ---------- */
.a2ui-col { display: flex; flex-direction: column; }
.a2ui-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.a2ui-card { border: 1px solid #eceef0; border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.a2ui-text { font-size: 14px; color: #1f2329; margin-bottom: 8px; }
.a2ui-img { width: 100%; border-radius: 10px; margin-bottom: 10px; }
.a2ui-btn {
  background: #07c160; color: #fff; border: none; border-radius: 8px;
  padding: 9px 14px; font-size: 14px; cursor: pointer; margin-bottom: 10px;
}
.a2ui-btn:active { background: #06ad56; }
