/* ── AI 午茶助手 ─────────────────────────────────── */
.teaai-wrap {
  padding: 4px 0 24px;
}
.teaai-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 28px 20px 24px;
  background: linear-gradient(135deg, #FAF6EC, #F5EDDE, #F0E8DC);
  border-radius: 20px;
  border: 1.5px solid #E0D4C4;
}
.teaai-icon {
  font-size: 40px;
  margin-bottom: 10px;
}
.teaai-title {
  font-size: 22px;
  font-weight: 800;
  color: #4A4038;
  margin-bottom: 6px;
}
.teaai-subtitle {
  font-size: 14px;
  color: #7f6b50;
  font-weight: 500;
}

/* 表單 */
.teaai-form {
  background: #fff;
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  margin-bottom: 16px;
}
.teaai-field {
  margin-bottom: 18px;
}
.teaai-field:last-child {
  margin-bottom: 0;
}
.teaai-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #5A5048;
  margin-bottom: 8px;
}
.teaai-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #E8E2D8;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  color: #4A4038;
  outline: none;
  transition: border-color .18s;
  box-sizing: border-box;
  background: #FAF8F4;
}
.teaai-input:focus {
  border-color: #aa967e;
  background: #fff;
}
.teaai-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #E8E2D8;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: #4A4038;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color .18s;
  box-sizing: border-box;
  background: #FAF8F4;
  line-height: 1.6;
}
.teaai-textarea:focus {
  border-color: #aa967e;
  background: #fff;
}
.teaai-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.teaai-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1.5px solid #E8E2D8;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #6B6058;
  cursor: pointer;
  transition: all .18s;
  user-select: none;
  background: #FAF8F4;
}
.teaai-check-label input[type="checkbox"] {
  display: none;
}
.teaai-check-label.checked {
  background: linear-gradient(135deg, #FAF6EC, #F5F0E8);
  border-color: #aa967e;
  color: #7f6b50;
}
.teaai-run-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #aa967e, #7f6b50);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 22px;
  transition: opacity .18s, transform .1s;
  letter-spacing: .02em;
}
.teaai-run-btn:hover { opacity: .9; }
.teaai-run-btn:active { transform: scale(.98); }
.teaai-run-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.teaai-spinner-wrap {
  text-align: center;
  padding: 40px 20px;
  color: #7f6b50;
}
.teaai-spinner {
  display: inline-block;
  width: 38px;
  height: 38px;
  border: 3px solid #F5F0E8;
  border-top-color: #aa967e;
  border-radius: 50%;
  animation: teaai-spin .8s linear infinite;
  margin-bottom: 14px;
}
@keyframes teaai-spin { to { transform: rotate(360deg); } }
.teaai-spinner-text {
  font-size: 14px;
  font-weight: 600;
  color: #7f6b50;
}

/* 結果區 */
.teaai-result-wrap {
  margin-top: 20px;
}
.teaai-result-header {
  font-size: 16px;
  font-weight: 800;
  color: #4A4038;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.teaai-result-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  background: #F5F0E8;
  color: #7f6b50;
  border-radius: 20px;
}
.teaai-plan-card {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid #E8E2D8;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.teaai-plan-card-header {
  padding: 14px 18px 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid #F0EBE2;
}
.teaai-plan-rank {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}
.teaai-plan-rank.r1 { background: #F5EDDE; color: #8A7355; }
.teaai-plan-rank.r2 { background: #F0EBE2; color: #6B6058; }
.teaai-plan-rank.r3 { background: #fdf2f8; color: #be185d; }
.teaai-plan-name {
  font-size: 16px;
  font-weight: 700;
  color: #4A4038;
  line-height: 1.3;
}
.teaai-plan-desc {
  font-size: 12px;
  color: #8C8074;
  margin-top: 3px;
  line-height: 1.5;
}
.teaai-plan-body {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.teaai-plan-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #5A5048;
}
.teaai-plan-row-label {
  font-size: 12px;
  color: #A89C90;
  font-weight: 600;
  width: 48px;
  flex-shrink: 0;
}
.teaai-plan-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.teaai-plan-item-chip {
  padding: 4px 10px;
  background: #F0EBE2;
  border-radius: 12px;
  font-size: 12px;
  color: #4A4038;
  font-weight: 500;
}
.teaai-plan-budget-chip {
  padding: 4px 12px;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #065f46;
}
.teaai-plan-tip {
  background: linear-gradient(135deg, #FAF6EC, #F5EDDE);
  border: 1px solid #E8D5B0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: #6B5842;
  line-height: 1.6;
}
.teaai-plan-tip-icon { margin-right: 4px; }
.teaai-redo-btn {
  width: 100%;
  padding: 12px;
  background: #F0EBE2;
  color: #6B6058;
  border: 1.5px solid #E8E2D8;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s;
}
.teaai-redo-btn:hover { background: #E8E2D8; }

@media (max-width: 640px) {
  .teaai-plan-card-header { flex-wrap: wrap; }
}
