:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #86868b;
  --line: #d2d2d7;
  --accent: #0071e3;
  --accent-active: #0077ed;
  --accent-wash: rgba(0, 113, 227, 0.08);
  --danger: #ff3b30;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 12px 32px rgba(0,0,0,0.06);
  padding: 40px;
}

@media (max-width: 480px) {
  .card { padding: 28px 22px; border-radius: 14px; }
}

/* ---------- Header ---------- */

.card__header { margin-bottom: 24px; }

.card__header h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

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

/* ---------- Info list (Apple settings-style rows) ---------- */

.info-list {
  margin: 0 0 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.info-list__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
}
.info-list__row + .info-list__row { border-top: 1px solid var(--line); }

.info-list__row dt {
  font-size: 14px;
  color: var(--muted);
}
.info-list__row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}

/* ---------- Steps ---------- */

.step__title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 12px;
}
.step__title--spaced { margin-top: 28px; }

.step__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.step__head .step__title { margin-bottom: 0; }

.link-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 14px;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { color: var(--accent-active); }

/* ---------- Date strip ---------- */

.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  margin-bottom: 4px;
}

.chip-date {
  flex: 0 0 auto;
  font-family: var(--font);
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition: background 0.15s ease, color 0.15s ease;
}

.chip-date .dow {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.chip-date .dom {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.chip-date:hover { background: #ebebee; }

.chip-date.is-selected { background: var(--ink); }
.chip-date.is-selected .dow,
.chip-date.is-selected .dom { color: #fff; }

/* ---------- Time slot grid ---------- */

.slots-empty {
  font-size: 14px;
  color: var(--muted);
  padding: 4px 0;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}

.slot-btn {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 6px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.slot-btn:hover { background: #ebebee; }

.slot-btn.is-selected {
  background: var(--accent);
  color: #fff;
}

.slot-btn:disabled,
.slot-btn--taken {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--line);
  cursor: not-allowed;
  text-decoration: line-through;
}
.slot-btn--taken:hover { background: transparent; }

/* ---------- Details step ---------- */

.selected-summary {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 22px;
}
.selected-summary strong { color: var(--ink); font-weight: 600; }

.field {
  display: block;
  margin-bottom: 16px;
}
.field span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}

.form-error {
  font-size: 13px;
  color: var(--danger);
  margin: -6px 0 16px;
}

.btn-primary {
  font-family: var(--font);
  font-weight: 600;
  font-size: 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 980px;
  padding: 13px 22px;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s ease;
}
.btn-primary:hover { background: var(--accent-active); }
.btn-primary:disabled { opacity: 0.5; cursor: default; }

/* ---------- Done step ---------- */

.done-mark {
  margin: 4px 0 16px;
}
.done-mark svg {
  width: 52px;
  height: 52px;
}
.done-mark circle {
  fill: none;
  stroke: #34c759;
  stroke-width: 2;
}
.done-mark path {
  stroke: #34c759;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#step-done .step__title {
  font-size: 22px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
}

.done-note {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* ---------- Focus & motion ---------- */

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
