:root {
  --page: #f8fafc;
  --card: #ffffff;
  --text: #122033;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #b21b9b;
  --brand-dark: #831172;
  --accent: #0f766e;
  --danger: #dc2626;
}

* { box-sizing: border-box; }

body {
  background:
    linear-gradient(180deg, rgba(178, 27, 155, 0.08), rgba(15, 118, 110, 0.06) 38%, transparent 78%),
    var(--page);
  color: var(--text);
  font-family: Arial, "Microsoft JhengHei", "PingFang TC", sans-serif;
  margin: 0;
}

button, input, select, textarea { font: inherit; }

.page-shell {
  margin: 0 auto;
  padding: 18px 14px 42px;
  width: min(760px, 100%);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  margin: 14px 0;
  padding: 18px;
}

.intro-card { border-top: 5px solid var(--brand); }
h1, h2, p { margin: 0; }
h1 { color: var(--brand-dark); font-size: 28px; line-height: 1.25; }
h2 { font-size: 20px; line-height: 1.35; margin-bottom: 14px; }
.intro-card p { color: var(--muted); font-size: 15px; line-height: 1.6; margin-top: 8px; }
.status-card { color: var(--accent); font-weight: 700; line-height: 1.5; }

.grid-2 {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label, .field-group {
  color: var(--text);
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

input, select, textarea {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: var(--text);
  display: block;
  font-size: 16px;
  margin-top: 7px;
  padding: 12px;
  width: 100%;
}

textarea { min-height: 96px; resize: vertical; }
.field-group + .field-group, .field-group + label, label + .field-group, label + label { margin-top: 16px; }
.group-title { margin-bottom: 8px; }

.option-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-option {
  align-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
  line-height: 1.35;
  min-height: 48px;
  padding: 10px 12px;
}

.check-option input {
  accent-color: var(--brand);
  flex: 0 0 auto;
  height: 18px;
  margin: 0;
  width: 18px;
}

.check-option span { overflow-wrap: anywhere; }
.action-card { bottom: 0; position: sticky; z-index: 4; }

.error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: var(--danger);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 12px;
  padding: 12px;
}

.hide { display: none !important; }

button {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  min-height: 52px;
  padding: 12px 18px;
  width: 100%;
}

button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.modal-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 10;
}

.modal-box {
  background: #fff;
  border-radius: 8px;
  max-width: 360px;
  padding: 24px;
  text-align: center;
  width: 100%;
}

.modal-box p {
  color: var(--muted);
  line-height: 1.6;
  margin: 10px 0 18px;
}

@media (max-width: 620px) {
  .page-shell { padding: 12px 10px 32px; }
  .card { padding: 16px; }
  .grid-2, .option-grid { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
}
