*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.5;
  font-size: 16px;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

header {
  margin-bottom: 32px;
}
header h1 {
  font-size: 24px;
  margin: 0 0 4px;
  font-weight: 600;
}
header .sub {
  margin: 0;
  color: #86868b;
  font-size: 14px;
}

footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e5e5e7;
  text-align: center;
  color: #86868b;
}
footer small { font-size: 12px; }

.intro {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 1px solid #e5e5e7;
}
.intro p { margin: 0 0 8px; }
.intro .tip {
  margin-bottom: 0;
  color: #86868b;
  font-size: 13px;
}

h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 28px 0 12px;
}

.day-list {
  display: grid;
  gap: 10px;
}

.day-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1.5px solid #e5e5e7;
  overflow: hidden;
  transition: border-color 0.15s;
}
.day-card[open] {
  border-color: #007aff;
}
.day-card summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.day-card summary::-webkit-details-marker { display: none; }
.day-card summary::after {
  content: "▾";
  margin-left: 8px;
  color: #86868b;
  transition: transform 0.2s;
}
.day-card[open] summary::after {
  transform: rotate(180deg);
}
.day-card[open] summary {
  border-bottom: 1px solid #f0f0f3;
}
.day-label {
  font-size: 16px;
  font-weight: 600;
}
.day-meta {
  color: #86868b;
  font-size: 13px;
  margin-left: auto;
  margin-right: 10px;
}

.slot-list {
  list-style: none;
  padding: 12px 14px 14px;
  margin: 0;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.slot-card {
  display: flex;
  flex-direction: column;
  background: #f9f9fb;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.slot-card:hover {
  border-color: #007aff;
  background: #f0f8ff;
}
.slot-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.slot-card:has(input:checked) {
  border-color: #007aff;
  background: #e8f3ff;
}
.slot-card:has(input:checked) .slot-time {
  font-weight: 700;
  color: #007aff;
}
.slot-time {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 2px;
}
.slot-meta {
  color: #86868b;
  font-size: 12px;
}

.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}
.field label small {
  font-weight: normal;
  color: #86868b;
  font-size: 12px;
}
.req { color: #ff3b30; }

.field input,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 16px;
  border: 1.5px solid #d2d2d7;
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: #007aff;
}
.field textarea {
  resize: vertical;
  min-height: 80px;
}

button.primary {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  background: #007aff;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
button.primary:hover {
  background: #0066d6;
}

.success, .error {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  border: 1px solid #e5e5e7;
}
.success .check {
  width: 56px; height: 56px;
  border-radius: 28px;
  background: #34c759;
  color: white;
  font-size: 32px;
  line-height: 56px;
  display: inline-block;
  margin-bottom: 16px;
}
.error .cross {
  width: 56px; height: 56px;
  border-radius: 28px;
  background: #ff3b30;
  color: white;
  font-size: 32px;
  line-height: 56px;
  display: inline-block;
  margin-bottom: 16px;
  font-weight: bold;
}
.success h2, .error h2 {
  margin: 0 0 12px;
}
.success p, .error p {
  margin: 8px 0;
}
.success .big {
  font-size: 17px;
  margin-top: 16px;
}
.success .slot-confirm {
  font-size: 20px;
  font-weight: 600;
  background: #f5f5f7;
  padding: 12px 20px;
  border-radius: 8px;
  display: inline-block;
  margin: 16px 0;
}
.error .back {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  background: #007aff;
  color: white;
  text-decoration: none;
  border-radius: 8px;
}
