:root {
  --blue-950: #061a44;
  --blue-800: #083074;
  --blue-700: #0b43bd;
  --blue-600: #216dff;
  --blue-100: #dcecff;
  --blue-050: #f4f9ff;
  --teal-600: #078f91;
  --gold: #ffd35d;
  --danger: #c62828;
  --text: #10254d;
  --muted: #62728d;
  --line: #cfe0ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 2%, rgba(33, 109, 255, 0.2), transparent 32%),
    radial-gradient(circle at 92% 4%, rgba(33, 109, 255, 0.15), transparent 32%),
    linear-gradient(135deg, #f7fbff 0%, #eaf4ff 100%);
}

.donate-page {
  min-height: 100vh;
  padding: clamp(14px, 4vw, 42px);
}

.donate-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(161, 199, 255, 0.72);
  border-radius: clamp(26px, 3vw, 38px);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 28px 72px rgba(30, 88, 160, 0.15);
  padding: clamp(22px, 5vw, 52px);
}

.donate-hero {
  display: grid;
  gap: clamp(20px, 4vw, 34px);
  padding-bottom: clamp(20px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  color: var(--blue-950);
  text-decoration: none;
}

.brand img {
  width: clamp(76px, 11vw, 108px);
  height: clamp(76px, 11vw, 108px);
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(6, 26, 68, 0.1));
}

.brand span { display: grid; gap: 5px; }
.brand b { font-size: clamp(24px, 4vw, 36px); letter-spacing: 0.04em; }
.brand small { color: var(--blue-600); font-weight: 900; letter-spacing: 0.13em; }

.hero-text {
  padding: clamp(24px, 5vw, 44px);
  border-radius: clamp(22px, 3vw, 30px);
  color: white;
  background:
    radial-gradient(circle at 88% 16%, rgba(98, 161, 255, 0.74), transparent 31%),
    linear-gradient(135deg, #216dff 0%, #073db8 56%, #003095 100%);
  box-shadow: 0 22px 48px rgba(0, 64, 170, 0.26);
}

.hero-text h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 7vw, 66px);
  line-height: 1.08;
  letter-spacing: 0.04em;
}

.hero-text p {
  margin: 0;
  color: rgba(255,255,255,0.94);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.8;
}

.error-box {
  margin: 20px 0 0;
  padding: 15px 18px;
  border-radius: 16px;
  background: #fff1f1;
  color: var(--danger);
  border: 1px solid #ffc9c9;
  font-weight: 900;
}

.donation-form {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
  margin-top: clamp(22px, 4vw, 36px);
}

.form-section {
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: clamp(20px, 3vw, 28px);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,251,255,0.94));
  box-shadow: 0 14px 34px rgba(31, 99, 255, 0.08);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  color: var(--blue-950);
  font-size: clamp(25px, 4vw, 34px);
  letter-spacing: 0.04em;
}

.required-badge {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #ff6d4f, #d82020);
  font-size: 15px;
  font-weight: 900;
}

.field-row {
  display: grid;
  gap: 16px;
}

.two-cols {
  grid-template-columns: 1fr 1fr;
}

.field {
  display: grid;
  gap: 9px;
  font-weight: 900;
  color: var(--blue-950);
}

.field span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.field em {
  padding: 3px 8px;
  border-radius: 999px;
  color: #0b8a66;
  background: #dbfff2;
  font-size: 13px;
  font-style: normal;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #afcaff;
  border-radius: 16px;
  background: white;
  color: var(--text);
  font: inherit;
  font-size: clamp(18px, 2.3vw, 22px);
  padding: 16px 18px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

textarea { resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(33, 109, 255, 0.13);
}

.custom-amount,
.receipt-fields,
.organization-only {
  display: none;
}

.custom-amount.show,
.receipt-fields.show,
.organization-only.show {
  display: grid;
}

.choice-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.choice-label {
  color: var(--blue-950);
  font-size: 18px;
  font-weight: 900;
  margin-right: 4px;
}

.choice-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.choice-item input[type="radio"] {
  width: 30px;
  height: 30px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--blue-600);
}

.choice-text {
  color: var(--blue-950);
  font-size: 20px;
  font-weight: 900;
}

.receipt-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
}

.receipt-choice {
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.receipt-choice:has(input:checked) {
  border-color: var(--blue-600);
  background: #f0f6ff;
  box-shadow: 0 10px 26px rgba(33, 109, 255, 0.11);
}

.receipt-choice .choice-text {
  display: grid;
  gap: 5px;
}

.receipt-choice small {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.receipt-fields {
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.submit-button {
  width: 100%;
  min-height: 74px;
  border: 0;
  border-radius: 22px;
  color: white;
  background:
    linear-gradient(135deg, #216dff 0%, #073db8 100%);
  box-shadow: 0 18px 40px rgba(0, 64, 170, 0.25);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.submit-button:hover,
.submit-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(0, 64, 170, 0.31);
}

@media (max-width: 720px) {
  .donate-page { padding: 12px; }
  .donate-shell { padding: 18px 14px; border-radius: 28px; }
  .brand { width: 100%; justify-content: center; text-align: center; flex-direction: column; gap: 10px; }
  .hero-text { padding: 26px 18px; text-align: left; }
  .two-cols { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; }
  .choice-group { align-items: stretch; }
  .inline-choice { min-width: 118px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: white; }
  .receipt-choice { padding: 15px 14px; }
  input, select, textarea { font-size: 18px; padding: 15px; }
}

@media (max-width: 420px) {
  .hero-text h1 { font-size: 42px; }
  .field span { font-size: 17px; }
  .choice-item input[type="radio"] { width: 28px; height: 28px; }
  .choice-text { font-size: 18px; }
  .submit-button { min-height: 66px; font-size: 23px; }
}


/* =========================================================
   v0.9.7.3 / Donate Title Layout Full Overwrite
   直接覆蓋版：配合 donate.html 的 title-options 外層，
   讓手機版「先生／女士」固定同一列兩欄。
   ========================================================= */

.title-choice-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 20px;
}

.title-choice-group .choice-label {
  display: block;
  width: 100%;
  margin: 0;
  color: var(--blue-950);
  font-size: 18px;
  font-weight: 900;
}

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

.title-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-sizing: border-box;
}

.title-choice:has(input:checked) {
  border-color: var(--blue-600);
  background: #f0f6ff;
  box-shadow: 0 10px 26px rgba(33, 109, 255, 0.11);
}

.title-choice input[type="radio"] {
  width: 34px;
  height: 34px;
  min-width: 34px;
  flex: 0 0 34px;
  margin: 0;
  accent-color: var(--blue-600);
}

.title-choice .choice-text {
  display: inline-block;
  color: var(--blue-950);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .title-choice-group {
    gap: 12px;
  }

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

  .title-choice {
    min-height: 74px;
    padding: 16px 8px;
    justify-content: center;
  }

  .title-choice input[type="radio"] {
    width: 34px;
    height: 34px;
    min-width: 34px;
    flex-basis: 34px;
  }

  .title-choice .choice-text {
    font-size: 22px;
  }
}

@media (max-width: 390px) {
  .title-options {
    gap: 10px;
  }

  .title-choice {
    gap: 8px;
    min-height: 68px;
    padding: 14px 6px;
  }

  .title-choice input[type="radio"] {
    width: 30px;
    height: 30px;
    min-width: 30px;
    flex-basis: 30px;
  }

  .title-choice .choice-text {
    font-size: 20px;
  }
}
