:root {
  --accent: #7c3aed;
  --accent-soft: #ede9fe;
  --text: #1f2430;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f6f5f8;
  --card: #ffffff;
  --green: #059669;
  --green-bg: #ecfdf5;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --gray-bg: #f3f4f6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.header { text-align: center; margin-bottom: 28px; }

.header h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.search-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.search-form { display: flex; flex-direction: column; gap: 12px; }

.field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label { font-size: 13px; color: var(--text-muted); }

.search-input {
  width: 100%;
  min-width: 0;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.search-btn:hover { background: #6d28d9; }
.search-btn:active { background: #5b21b6; }

.hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.hint.error { color: #b91c1c; }

.result { margin-top: 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

/* 状态横幅 */
.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
}

.status-banner.found {
  background: var(--green-bg);
  color: var(--green);
}

.status-banner.miss {
  background: #fef2f2;
  color: #b91c1c;
}

.status-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: currentColor;
  color: #fff;
  flex-shrink: 0;
}

/* 基本信息 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.info-item { min-width: 0; }

.info-item .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.info-item .value {
  font-size: 16px;
  font-weight: 600;
  word-break: break-all;
}

/* 章节标题 */
.section-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.section + .section { margin-top: 22px; }

/* 标签芯片 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  background: var(--gray-bg);
  color: var(--text);
  border: 1px solid transparent;
}

.chip .day { color: var(--text-muted); margin-right: 4px; }

.chip.free { background: var(--green-bg); color: var(--green); }
.chip.busy { background: var(--amber-bg); color: var(--amber); }
.chip.plain { background: var(--gray-bg); color: var(--text-muted); }

/* 动员会时段 */
.slot-group { margin-bottom: 14px; }
.slot-group:last-child { margin-bottom: 0; }

.slot-day {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.slot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-list.empty { color: var(--text-muted); font-size: 14px; }

.slot-pill {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

/* 自由文本 */
.text-block {
  margin: 0;
  font-size: 15px;
  white-space: pre-wrap;
  word-break: break-word;
}

.text-block.muted { color: var(--text-muted); }

.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .page { padding: 24px 14px 48px; }
  .header h1 { font-size: 21px; }
}
