:root {
  color: #1f2933;
  background: #f7f8fa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
.shell { width: min(620px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 56px; }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 4px 0 24px; border-bottom: 1px solid #e5e9ed; }
.kicker { color: #77818b; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
h1 { margin: 6px 0 0; color: #17212b; font-size: 28px; line-height: 1.1; letter-spacing: -.03em; }

.panel { margin-top: 12px; padding: 20px; border: 1px solid #e1e6ea; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(25, 39, 52, .035); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
h2 { margin: 0; color: #26323d; font-size: 16px; font-weight: 650; }
.section-note { color: #89939c; font-size: 12px; }

.grid { display: grid; grid-template-columns: 1fr 160px; gap: 12px; }
label span { display: block; margin-bottom: 6px; color: #66717c; font-size: 12px; }
input { width: 100%; padding: 10px 11px; border: 1px solid #d8dfe5; border-radius: 7px; outline: none; color: #25313b; background: #fff; font: inherit; font-size: 14px; }
input:focus { border-color: #4e79a7; box-shadow: 0 0 0 3px rgba(78, 121, 167, .12); }
input[readonly] { color: #64707b; background: #f5f7f8; }

.button { width: 100%; margin-top: 16px; padding: 10px 14px; border: 0; border-radius: 7px; color: #fff; background: #315f8f; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; transition: background .15s, opacity .15s; }
.button:hover:not(:disabled) { background: #264f7b; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button.primary { background: #315f8f; }
.button.primary:hover:not(:disabled) { background: #264f7b; }
.button.secondary { color: #315f8f; background: #edf2f6; }
.button.secondary:hover:not(:disabled) { background: #e1e9ef; }

.status { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; border-radius: 5px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.status.neutral { color: #66717c; background: #eef1f3; }
.status.success { color: #226b4f; background: #e6f4ec; }
.status.error { color: #a33f35; background: #fceae7; }

.payment-element { min-height: 80px; }
.hint { margin: 10px 0 0; color: #89939c; font-size: 12px; line-height: 1.5; }
code { padding: 1px 4px; border-radius: 4px; color: #42576b; background: #edf2f6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.details { margin: 0; }
.details div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #edf0f2; }
.details div:last-child { border-bottom: 0; }
dt { color: #7b8791; font-size: 12px; }
dd { max-width: 70%; margin: 0; overflow-wrap: anywhere; color: #2c3944; font-size: 12px; font-weight: 600; text-align: right; }
.result-card .status { max-width: 320px; white-space: normal; text-align: right; }
.message { min-height: 20px; margin: 14px 2px 0; color: #65717c; font-size: 13px; line-height: 1.5; }
.message.success { color: #226b4f; }
.message.error { color: #a33f35; }
footer { margin-top: 24px; color: #a1aab2; font-size: 11px; text-align: center; }
.hidden { display: none; }

@media (max-width: 560px) {
  .shell { padding-top: 22px; }
  .panel { padding: 16px; }
  .grid { grid-template-columns: 1fr; }
  .topbar { padding-bottom: 18px; }
  h1 { font-size: 24px; }
}
