/* 自定义样式 */
[x-cloak] { display: none !important; }

:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
}

body {
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
  z-index: 30;
  transition: transform 0.15s;
}

.fab:active {
  transform: scale(0.92);
}

/* 勾选按钮 - 拇指友好 */
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 0.85rem;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  border: 2px solid transparent;
}

.check-pill input[type="checkbox"] {
  display: none;
}

.check-pill.is-checked {
  background: var(--primary);
  color: white;
  border-color: var(--primary-light);
}

.check-pill:active {
  transform: scale(0.95);
}

/* 评价档位按钮 */
.rating-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.15s;
}

.rating-btn.is-active {
  font-weight: 600;
}

.rating-btn.great.is-active {
  background: #fef3c7;
  color: #92400e;
  border-color: #fbbf24;
}

.rating-btn.good.is-active {
  background: #d1fae5;
  color: #065f46;
  border-color: #34d399;
}

.rating-btn.concern.is-active {
  background: #fee2e2;
  color: #991b1b;
  border-color: #f87171;
}

/* 课程类别卡 */
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  border-radius: 1rem;
  background: white;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.cat-card.is-active {
  border-color: var(--primary);
  background: #eef2ff;
  color: var(--primary);
}

.cat-card:active {
  transform: scale(0.96);
}

.cat-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.cat-card-name {
  font-size: 0.75rem;
  font-weight: 500;
}

/* 孩子卡片 */
.child-card {
  display: block;
  background: white;
  border-radius: 1.25rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #f1f5f9;
  transition: transform 0.15s;
}

.child-card:active {
  transform: scale(0.98);
}

.child-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #818cf8, #c084fc);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.child-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, #c7d2fe, #e9d5ff, transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: 0.5rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background: var(--primary);
  border: 2px solid white;
  box-shadow: 0 0 0 2px #e0e7ff;
}

.obs-card {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid #f1f5f9;
}

/* 照片网格 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.photo-item {
  aspect-ratio: 1;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f1f5f9;
  position: relative;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 表单样式 */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  outline: none;
  transition: all 0.15s;
  background: white;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.5rem;
}

/* Tab 切换 */
.tab-btn {
  flex: 1;
  padding: 0.6rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn.is-active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
}
