:root {
  --honda-red: #e60012;
  --honda-red-dark: #b8000e;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

main { max-width: 600px; margin: 0 auto; padding-bottom: 40px; }

.hero {
  background: linear-gradient(135deg, var(--honda-red) 0%, var(--honda-red-dark) 100%);
  color: #fff;
  padding: 28px 20px;
}
.hero-inner { max-width: 600px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.18);
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 26px;
}
.hero h1 { margin: 0; font-size: 22px; font-weight: 700; }
.hero .sub { margin: 2px 0 0; font-size: 13px; opacity: 0.9; }

.card {
  background: var(--card);
  margin: 16px;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card h2 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-num {
  width: 26px; height: 26px;
  background: var(--honda-red);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 600;
}
.hint { font-size: 13px; color: var(--text-muted); margin: -8px 0 12px; }

.hidden { display: none !important; }

/* Date strip */
.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.date-strip::-webkit-scrollbar { display: none; }
.date-chip {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 10px 8px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  scroll-snap-align: start;
  transition: all 0.15s;
}
.date-chip .dow { display: block; font-size: 12px; color: var(--text-muted); }
.date-chip .day { display: block; font-size: 20px; font-weight: 600; margin: 2px 0; }
.date-chip .mon { display: block; font-size: 11px; color: var(--text-muted); }
.date-chip.selected {
  background: var(--honda-red);
  border-color: var(--honda-red);
  color: #fff;
}
.date-chip.selected .dow,
.date-chip.selected .mon { color: rgba(255,255,255,0.85); }

/* Slot grid */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}
.slot {
  padding: 12px 6px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-weight: 500;
  transition: all 0.15s;
}
.slot .slot-time { font-size: 15px; }
.slot .slot-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.slot:hover:not(.disabled):not(.selected) { border-color: var(--honda-red); }
.slot.selected {
  background: var(--honda-red);
  border-color: var(--honda-red);
  color: #fff;
}
.slot.selected .slot-meta { color: rgba(255,255,255,0.85); }
.slot.disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
  border-color: transparent;
}

/* Form */
.field { display: block; margin-bottom: 16px; }
.field .label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}
.field .label em { color: var(--honda-red); font-style: normal; }
.field input,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--honda-red);
}
.field textarea { resize: vertical; min-height: 90px; }

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.tag {
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s;
}
.tag:active { transform: scale(0.96); }

.summary {
  background: #fef2f3;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  display: none;
}
.summary.show { display: block; }
.summary strong { color: var(--honda-red); }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--honda-red);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:active { background: var(--honda-red-dark); }
.btn-primary:disabled { background: #d1d5db; cursor: not-allowed; }
.btn-secondary {
  width: 100%;
  padding: 14px;
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 16px;
}
.btn-danger {
  width: 100%;
  padding: 14px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}
.btn-danger:active { background: #b91c1c; }
.btn-danger:disabled { background: #d1d5db; cursor: not-allowed; }
.cancelled-icon { background: var(--text-muted); }

.cancel-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--danger);
  font-size: 13px;
  text-decoration: underline;
}
.cancel-link:hover { color: #b91c1c; }

/* Success */
.success { text-align: center; }
.success-icon {
  width: 64px; height: 64px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 36px;
  margin: 0 auto 16px;
}
.success h2 { justify-content: center; }
.receipt {
  background: #f9fafb;
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
  text-align: left;
}
.receipt .row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}
.receipt .row .key { color: var(--text-muted); }
.receipt .row .val { font-weight: 500; }

/* Skeleton loader */
.skeleton-row { display: flex; gap: 8px; }
.skeleton {
  flex: 1;
  height: 64px;
  background: linear-gradient(90deg, #f0f0f0 0%, #f8f8f8 50%, #f0f0f0 100%);
  background-size: 200% 100%;
  border-radius: 12px;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 1000;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.toast.error { background: var(--danger); }

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.7);
  display: grid;
  place-items: center;
  z-index: 999;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--honda-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 14px;
}
