:root {
  color-scheme: light;
  font: 400 16px/1.5 Pretendard, "Noto Sans KR", system-ui, sans-serif;
  color: #111d2c;
  background: #102a26;
  word-break: keep-all;
  --brand: #065b4b;
  --line: #d9e3e7;
  --muted: #475465;
  --soft: #e7f7f0;
  --surface: #fff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden, .choice input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body { margin: 0; min-height: 100svh; padding: clamp(12px, 4vw, 20px); display: grid; place-items: center; }
h1, p, fieldset { margin: 0; }
fieldset { min-width: 0; padding: 0; border: 0; }
button, input { font: inherit; }

.donation {
  position: relative;
  width: min(720px, 100%);
  padding: 36px 40px 40px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 30px 70px rgb(0 25 20 / .32);
}
.close {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-end: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--brand);
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
}
h1 { margin: 0 44px 10px; font-size: 34px; line-height: 1.25; text-align: center; }
.recipient { color: var(--muted); font-size: 17px; text-align: center; }
.notice { margin-block: 16px 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); color: var(--muted); }
.notice:empty { display: none; }
form { display: grid; gap: 24px; margin-block-start: 22px; }
.choices { display: grid; }
.frequency { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: #f6f8f9; }
.choice { position: relative; }
.choice span { display: grid; place-items: center; min-height: 54px; padding: 6px; font-weight: 700; text-align: center; cursor: pointer; }
.frequency span { border-radius: 12px; color: var(--muted); font-size: 18px; }
.frequency input:checked + span, .presets button[aria-pressed="true"] { background: var(--brand); color: var(--surface); }
.choice input:disabled + span { opacity: .5; cursor: default; }

.presets { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.presets button { min-height: 84px; padding: 6px 2px; border: 1px solid var(--brand); border-radius: 14px; background: var(--surface); color: inherit; font-size: 24px; font-weight: 700; cursor: pointer; }
.custom {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 96px;
  margin-block-start: 18px;
  padding: 10px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  background: var(--surface);
  text-align: start;
}
button.custom { cursor: pointer; }
button.custom > span:first-child { color: var(--brand); font-size: 24px; }
.custom strong, .custom small { display: block; }
.custom strong { font-size: 20px; }
.custom small { margin-block-start: 2px; color: var(--muted); font-size: 15px; }
.currency { border-color: var(--brand); }
.currency input { flex: 1; min-width: 0; border: 0; color: inherit; background: transparent; font-size: 26px; font-weight: 700; appearance: textfield; }
.currency input::-webkit-inner-spin-button { appearance: none; }
.currency > span { color: var(--muted); font-size: 20px; }
.amount-error { margin-block-start: 8px; color: #a62832; font-size: 13px; }
.amount-error:empty { display: none; }

.methods { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.methods span, .regular-method { min-height: 72px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 17px; }
.methods input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 2px rgb(6 91 75 / .18); color: var(--brand); }
.regular-method { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; }
.regular-method strong { color: var(--brand); }
.primary { display: grid; place-items: center; min-height: 84px; padding: 8px 10px; border: 0; border-radius: 16px; color: var(--surface); background: var(--brand); font-size: 26px; font-weight: 700; text-align: center; cursor: pointer; text-decoration: none; }
.hosted-pay { width: 100%; margin-block-start: 22px; }
.primary:disabled { opacity: .55; cursor: default; }
.login { margin-block-start: 22px; }
:is(a, button, input):focus-visible, .choice input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (max-width: 600px) {
  .donation { padding: 26px 18px 28px; border-radius: 22px; }
  .close { inset-block-start: 12px; inset-inline-end: 12px; }
  h1 { font-size: 30px; }
  .recipient { font-size: 15px; }
  form { gap: 20px; }
  .frequency span { min-height: 48px; font-size: 16px; }
  .presets, .methods { gap: 10px; }
  .presets button { min-height: 72px; font-size: clamp(15px, 4.6vw, 20px); letter-spacing: -.02em; }
  .custom { min-height: 88px; margin-block-start: 14px; padding-inline: 20px; }
  .custom strong { font-size: 18px; }
  .custom small { font-size: 14px; }
  .currency input { font-size: 22px; }
  .methods span, .regular-method { min-height: 62px; font-size: 14px; }
  .primary { min-height: 76px; font-size: clamp(17px, 5.2vw, 23px); }
}
