* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: #f3f4f6;
  color: #111827;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 16px 8px;
}
.topbar h1 { margin: 0; font-size: 20px; }
.topbar p { margin: 6px 0 0; color: #6b7280; font-size: 12px; }
.app { padding: 12px 12px 80px; }
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  padding: 12px;
  margin-bottom: 12px;
}
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.title { font-size: 16px; margin: 0 0 8px; font-weight: 700; }
.muted { color: #6b7280; font-size: 13px; }
.btn {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  background: #f97316;
  color: #fff;
}
.btn.secondary { background: #4b5563; }
.btn.ghost { background: #e5e7eb; color: #111827; }
input, textarea, select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-top: 6px;
}
label { display: block; margin-bottom: 10px; font-size: 14px; }
.tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.chip {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.chip.active { border-color: #f97316; color: #f97316; }
.chip.chip--disabled:disabled,
.chip.chip--disabled[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border-top: 1px solid #e5e7eb;
}
.tab {
  border: none;
  background: #fff;
  padding: 10px 4px;
  font-size: 12px;
  color: #6b7280;
}
.tab.active { color: #f97316; font-weight: 700; }
.msg-user, .msg-ai {
  border-radius: 8px;
  padding: 8px 10px;
  margin: 6px 0;
  white-space: pre-wrap;
}
.msg-user { background: #ffedd5; }
.msg-ai { background: #e0f2fe; }

.module-modal[hidden] { display: none; }
.module-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.module-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.module-modal__box {
  position: relative;
  z-index: 1;
  max-width: 360px;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.module-modal__title {
  font-size: 17px;
  margin: 0 0 10px;
  font-weight: 700;
}
.module-modal__text {
  font-size: 15px;
  margin: 0 0 8px;
  line-height: 1.5;
  color: #111827;
}
.module-modal__text--only {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}
.module-modal__sub {
  font-size: 12px;
  margin: 0 0 14px;
  line-height: 1.45;
}
.module-modal__box .btn { width: 100%; }
.tab.module-tab--blocked {
  opacity: 0.45;
  cursor: not-allowed;
}
.rec-float {
  position: sticky;
  top: 56px;
  z-index: 12;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #111827;
  color: #f9fafb;
  border-radius: 10px;
  padding: 8px 10px;
}
