:root {
  color-scheme: light;
  --ink: #241a34; --muted: #594f67; --purple: #492774; --dark: #321c53;
  --paper: #f7f3fb; --line: #dbd1e6; --white: #fff;
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); }
.wrap { width: min(100% - 2rem, 1060px); margin-inline: auto; }
.site-header { background: var(--dark); color: white; }
.bar { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.brand img { display: block; object-fit: cover; object-position: center 48%; filter: brightness(0) invert(1); }
.section-name { font-weight: 650; }
.page-title { padding-block: 2.35rem 1.25rem; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.042em; line-height: 1.08; margin: 0; }
h2 { font-size: 1.24rem; margin: 0 0 1.1rem; }
p { line-height: 1.55; margin: .58rem 0; }
.kicker { margin-top: 0; color: var(--purple); text-transform: uppercase; font-weight: 700; letter-spacing: .09em; font-size: .88rem; }
.demo { max-width: max-content; border: 1px solid #ddc292; background: #fff4df; color: #604419; border-radius: .45rem; padding: .55rem .75rem; font-size: .9rem; }
.layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 1.1rem; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem,3vw,1.65rem); background: var(--white); box-shadow: 0 8px 32px #321c530a; }
label { display: block; font-weight: 660; font-size: .94rem; margin: .9rem 0 .4rem; }
label span { color: var(--muted); font-weight: 400; }
input,select,button { font: inherit; }
input,select { width: 100%; padding: .7rem .8rem; border: 1px solid #a89ab7; border-radius: .48rem; min-height: 45px; background: white; color: var(--ink); }
input::placeholder { color: #6b6174; }
input:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible { outline: 3px solid #8759bd; outline-offset: 2px; }
.fields,.actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.amount-wrap { position: relative; }
.amount-wrap span { position: absolute; right: .75rem; top: .76rem; color: var(--muted); font-size: .87rem; pointer-events: none; }
.amount-wrap input { padding-right: 4rem; }
.sequence-label { margin: .7rem 0 .3rem; font-weight: 660; font-size: .94rem; }
.sequence { display: block; padding: .6rem .7rem; border-radius: .45rem; background: var(--paper); overflow-wrap: anywhere; }
.bank-details { margin-top: .45rem; color: var(--muted); font-size: .88rem; }
.bank-details summary { cursor: pointer; padding-block: .4rem; }
.bank-details output { overflow-wrap: anywhere; }
.hint,.privacy { font-size: .875rem; color: var(--muted); }
.privacy { margin-bottom: 0; }
.error { color: #9f2732; font-weight: 630; }
button { padding: .72rem .85rem; border-radius: .48rem; cursor: pointer; font-weight: 650; min-height: 44px; }
.primary { background: var(--purple); color: white; border: 1px solid var(--purple); }
.primary:hover { background: var(--dark); }
.secondary { color: var(--purple); background: white; border: 1px solid var(--purple); }
.secondary:hover { background: var(--paper); }
.create { width: 100%; margin-top: .8rem; }
.output-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.output-heading span { color: var(--muted); font-size: .85rem; }
.empty { min-height: 270px; display: grid; align-content: center; justify-items: center; text-align: center; padding: 1rem; border: 1px dashed #ac99c0; border-radius: .6rem; color: var(--muted); background: #fcfaff; }
.empty svg { width: 52px; color: var(--purple); }
canvas { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: .65rem; }
.actions { margin-top: .85rem; }
.copy { margin-top: .45rem; color: var(--purple); background: transparent; border: 0; text-decoration: underline; }
.edit { display: none; background: white; color: var(--purple); border: 1px solid var(--line); }
footer { margin-top: 2rem; padding-block: 1.15rem; border-top: 1px solid var(--line); display: flex; gap: .5rem 1.35rem; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
footer a { color: var(--purple); }
@media (max-width: 790px) {
  .layout { grid-template-columns: 1fr; }
  .wrap { width: min(100% - 1.25rem, 540px); }
  .bar { height: 58px; }
  .bar img { width: 80px; height: 39px; }
  .page-title { padding-block: .95rem .65rem; }
  .page-title .kicker { display: none; }
  .page-title h1 { font-size: clamp(1.65rem, 6.5vw, 2.5rem); }
  .page-title > p:not(.demo) { margin-block: .35rem; }
  .demo { padding: .4rem .55rem; margin-bottom: 0; }
  .panel { padding: .9rem; }
  .panel h2 { margin-bottom: .65rem; }
  label { margin-top: .65rem; }
  footer { margin-top: .95rem; }
  body[data-step="form"] .output, body[data-step="result"] .form-panel { display: none; }
  body[data-step="result"] .page-title { padding-block: .7rem; }
  body[data-step="result"] .page-title > p:not(.demo) { display: none; }
  body[data-step="result"] .output-heading { align-items: center; margin-bottom: .55rem; }
  body[data-step="result"] .output-heading h2 { margin: 0; }
  body[data-step="result"] .png-label { display: none; }
  body[data-step="result"] .edit { display: inline-block; font-size: .88rem; padding: .5rem .65rem; }
  body[data-step="result"] canvas {
    width: auto;
    max-width: 100%;
    max-height: clamp(220px, calc(100svh - 305px), 500px);
    margin-inline: auto;
  }
  body[data-step="result"] footer { display: none; }
}
@media (max-width: 345px) { .fields { grid-template-columns: 1fr; gap: 0; } }
