:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1b1d28;
  --muted: #6b7280;
  --line: #eceef3;
  --accent: #3182f6; /* 토스 블루 */
  --accent-press: #1b64da;
  --ok: #16a34a;
  --fail: #dc2626;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 10px 40px rgba(23, 30, 60, 0.08);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 20px;
}
.brand-mark {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
}
.brand-mark .accent { color: var(--accent); }
.brand-sub {
  font-size: 13px;
  color: var(--muted);
}

.title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}
.desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.summary {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.summary li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.summary li:last-child { border-bottom: none; }
.summary .k { color: var(--muted); }
.summary .v { font-weight: 600; text-align: right; word-break: break-all; }
.summary .v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.summary li.total {
  background: #f8faff;
}
.summary li.total .k { color: var(--text); font-weight: 700; }
.summary li.total .v { color: var(--accent); font-size: 18px; font-weight: 800; }

.field { margin-bottom: 24px; }
.field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.amount-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 16px;
  transition: border-color 0.15s ease;
}
.amount-input:focus-within { border-color: var(--accent); }
.amount-input input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  padding: 12px 0;
  text-align: right;
  width: 100%;
  min-width: 0;
}
.amount-input .won {
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  margin-left: 8px;
}
.presets {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.preset {
  flex: 1;
  padding: 9px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset:hover { border-color: var(--accent); color: var(--accent); }

.pay-btn {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease;
}
.pay-btn:hover { background: var(--accent-press); }
.pay-btn:disabled { opacity: 0.6; cursor: default; }

.note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0 0;
}
.note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f1f3f8;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
}
.note.secure { margin-top: 8px; }

.status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 20px;
}
.status-icon.ok { background: var(--ok); }
.status-icon.fail { background: var(--fail); }
.card .status-icon + .title { text-align: center; }
.card .status-icon ~ .desc { text-align: center; }
