.card-title {
  font-size: 1.5rem;
}

#instructions,
.good-instructions {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1rem;
}

fieldset {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

legend,
.field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

@media (max-width: 480px) {
  .date-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .slot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.date-btn,
.slot-btn {
  min-height: 44px;
  padding: 6px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition:
    background-color var(--t),
    border-color var(--t);
}

.date-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.date-wd {
  font-size: 0.75rem;
  color: var(--muted);
}

.date-day {
  font-size: 0.85rem;
  font-weight: 600;
}

.date-btn:hover,
.slot-btn:hover:not(:disabled) {
  border-color: var(--primary);
}

.date-btn.selected,
.slot-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.date-btn.selected .date-wd {
  color: inherit;
}

.slot-btn:disabled {
  color: #77737f;
  background: #f4f3f6;
  cursor: not-allowed;
}

input[type='text'] {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #a9a3b0;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

input[type='text']:focus-visible {
  border-color: var(--primary);
}

.field-error {
  min-height: 1.5em;
  margin: 6px 0 10px;
  color: var(--danger);
  font-size: 0.92rem;
  font-weight: 500;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#booking-card.card-error {
  outline: 3px solid var(--danger);
  outline-offset: 4px;
}

#booking-card.is-booked .actions {
  opacity: 0.6;
}

/* Fake Disabled: looks disabled, still works. */
.btn.looks-disabled,
.btn.looks-disabled:hover {
  background: #cfcdd5;
  color: #66626e;
  border-color: #c2bfca;
  opacity: 0.75;
  cursor: not-allowed;
}

.shake {
  animation: shake 400ms ease;
}

.flash {
  animation: none;
  box-shadow: 0 0 0 4px #f5b8b2;
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

#progress {
  margin-top: 16px;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e8e6ee;
  overflow: hidden;
}

#progress-bar {
  width: 0;
  height: 100%;
  background: var(--primary);
  transition: width 80ms linear;
}

#progress-label {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

#success-msg {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #e3f4ea;
  color: var(--success);
  font-weight: 600;
}

/* C3: always on top, never affected by tactics. */
#skip-link {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 10000;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: #5b5765;
  background: rgb(255 255 255 / 0.7);
  border-radius: 6px;
}

#mercy-indicator {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 10000;
}

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 9000;
  max-width: min(90vw, 440px);
  padding: 10px 18px;
  border-radius: 999px;
  background: #1c1a21;
  color: #fff;
  font-weight: 500;
  text-align: center;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 200ms,
    transform 200ms;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Good Version */
.good-wrap {
  width: 100%;
  max-width: 520px;
}

.helper {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.good-success {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: #e3f4ea;
}

.good-success p {
  margin: 0 0 8px;
}

#good-success-text {
  color: var(--success);
  font-weight: 600;
}

.good-result {
  font-size: 1.05rem;
  font-weight: 700;
}

.why {
  margin: 4px 0 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.why summary {
  cursor: pointer;
  width: fit-content;
}

.why p {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-left: 3px solid var(--primary);
  background: #f5f4fb;
  border-radius: 0 6px 6px 0;
}
