:root {
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af;
  --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2a37; --gray-900: #111928;
  --pink-50: #fde8e8; --pink-500: #ff1b60; --pink-600: #e61857;
  --blue-600: #1c64f2;
  --green-50: #f3faf7; --green-100: #def7ec; --green-200: #bcf0da; --green-500: #0e9f6e; --green-600: #057a55;
  --yellow-50: #fefce8; --yellow-200: #fef08a; --yellow-800: #854d0e;
  --red-50: #fdf2f2; --red-500: #f05252; --red-600: #e02424;
  --white: #ffffff;
  --shadow-jb: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);
  --radius: 4px; --radius-lg: 8px; --radius-full: 9999px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--gray-50); color: var(--gray-900); font-family: var(--font); font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font); margin: 0; text-wrap: balance; color: var(--gray-900); }
a { color: var(--blue-600); text-decoration: underline; }
a:hover { text-decoration: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

 
.topbar { background: var(--white); border-bottom: 1px solid var(--gray-200); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.mark { display: flex; align-items: center; gap: 12px; }
.mark svg { height: 40px; width: auto; display: block; }
.brand-tag { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--gray-500); border-left: 1px solid var(--gray-200); padding-left: 12px; }

 
.hero { padding-block: 16px 24px; max-width: 760px; }
.hero h1 { font-size: 24px; line-height: 32px; font-weight: 700; margin-bottom: 8px; }
.hero p { color: var(--gray-500); font-size: 16px; line-height: 24px; margin: 0; }
.hero p strong { color: var(--gray-900); font-weight: 600; }

 
.content { padding-block: 24px 64px; }
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 24px); display: flex; flex-direction: column; gap: 2px; }
.rail a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-lg); text-decoration: none; color: var(--gray-500); font-weight: 500; font-size: 14px; line-height: 20px; }
.rail a:hover { background: var(--white); color: var(--gray-900); }
.rail a:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--gray-900); }
.rail .dot { width: 18px; height: 18px; border-radius: var(--radius-full); border: 2px solid var(--gray-300); flex: none; display: grid; place-items: center; background: var(--white); }
.rail a.done { color: var(--gray-900); }
.rail a.done .dot { background: var(--gray-900); border-color: var(--gray-900); }
.rail a.done .dot::after { content: ""; width: 7px; height: 4px; border: 2px solid var(--white); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.rail .draft-note { font-size: 12px; line-height: 16px; color: var(--gray-500); padding: 12px 12px 0; }

 
form { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.section { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-jb); padding: 32px; scroll-margin-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.section-head h2 { font-size: 20px; line-height: 28px; font-weight: 600; }
.section-head p { margin: 4px 0 0; color: var(--gray-500); font-size: 14px; line-height: 20px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.grid .full { grid-column: 1 / -1; }

 
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .field > .label { font-weight: 500; font-size: 16px; line-height: 24px; color: var(--gray-900); }
.req { color: var(--gray-500); margin-left: 2px; }
.opt { color: var(--gray-500); font-weight: 400; margin-left: 8px; font-size: 14px; }
.hint { font-size: 14px; line-height: 20px; color: var(--gray-500); }
.err { font-size: 12px; line-height: 16px; color: var(--red-500); }
.invalid > label, .invalid > .label { color: var(--red-500); }
input[type="text"], input[type="url"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; font: 400 16px/24px var(--font); color: var(--gray-900); background: var(--gray-50); border: 1px solid var(--gray-300); border-radius: var(--radius-lg); padding: 9px 16px; height: 44px;
}
input::placeholder, textarea::placeholder { color: var(--gray-400); }
textarea { height: auto; min-height: 104px; resize: vertical; }
textarea.tall { min-height: 200px; }
input:hover, select:hover, textarea:hover { border-color: var(--gray-400); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 1px var(--blue-600); }
.invalid input, .invalid textarea { border-color: var(--red-500); background: var(--red-50); }
.invalid .chips { border-color: var(--red-500); }

 
.affix { display: flex; align-items: stretch; }
.affix input { font-variant-numeric: tabular-nums; min-width: 0; }
.affix .pre, .affix .post { display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; background: var(--gray-200); border: 1px solid var(--gray-300); color: var(--gray-500); font-size: 16px; flex: none; }
.affix .pre { border-radius: var(--radius-lg) 0 0 var(--radius-lg); border-right: 0; }
.affix .post { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; border-left: 0; }
.affix.has-pre input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.affix.has-post input { border-top-right-radius: 0; border-bottom-right-radius: 0; }

 
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px; border: 1px solid transparent; border-radius: var(--radius-lg); }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: var(--radius-full); background: var(--white); box-shadow: 0 0 0 1px var(--gray-200); cursor: pointer; font-weight: 400; font-size: 16px; line-height: 24px; color: var(--gray-900); user-select: none; }
.chip span:hover { box-shadow: 0 0 0 1px var(--gray-400); }
.chip input:checked + span { box-shadow: 0 0 0 2px var(--pink-500); }
.chip input:focus-visible + span { outline: 2px solid var(--gray-900); outline-offset: 3px; }

 
.tagbox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--gray-50); border: 1px solid var(--gray-300); border-radius: var(--radius-lg); padding: 6px 8px; min-height: 44px; }
.tagbox:hover { border-color: var(--gray-400); }
.tagbox:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 1px var(--blue-600); }
.tagbox input { border: 0; background: transparent; padding: 2px 8px; height: 30px; flex: 1 1 120px; min-width: 0; }
.tagbox input:focus { box-shadow: none; }
.tag { display: inline-flex; align-items: center; gap: 2px; background: var(--gray-200); color: var(--gray-800); font-size: 14px; line-height: 20px; font-weight: 600; padding: 4px 4px 4px 8px; border-radius: var(--radius); }
.tag button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; border-radius: var(--radius); }
.tag button:hover { background: var(--gray-300); }
.tag button:focus-visible { outline: 2px solid var(--gray-900); }

 
.notice { font-size: 14px; line-height: 20px; border-radius: var(--radius-lg); padding: 12px 16px; border: 1px solid; }
.notice.warn { background: var(--yellow-50); border-color: var(--yellow-200); color: var(--yellow-800); }
.notice.good { background: var(--green-50); border-color: var(--green-200); color: #166534; }

 
.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; font: 500 14px/20px var(--font); border-radius: var(--radius-lg); padding: 10px 20px; cursor: pointer; border: 0; background: var(--white); color: var(--gray-900); box-shadow: inset 0 0 0 1px var(--gray-300); }
.btn:hover { background: var(--gray-100); }
.btn.primary { background: var(--gray-900); color: var(--white); box-shadow: none; }
.btn.primary:hover { background: var(--gray-800); }
.btn.lg { font-size: 16px; line-height: 24px; padding: 10px 24px; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--gray-900); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 8px 12px; }
.form-error { color: var(--red-500); font-size: 14px; }

 
.done-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-jb); padding: 32px; display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 0 auto; }
.eyebrow { align-self: flex-start; display: inline-flex; font-size: 14px; line-height: 20px; font-weight: 600; padding: 4px 8px; border-radius: var(--radius); background: var(--gray-900); color: var(--white); }
.done-card h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
.done-card p { margin: 0; color: var(--gray-500); font-size: 16px; line-height: 24px; }
.done-card p strong { color: var(--gray-900); }
.ref { font-weight: 600; background: var(--gray-200); color: var(--gray-800); padding: 2px 8px; border-radius: var(--radius); font-variant-numeric: tabular-nums; }
pre.summary { white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; line-height: 18px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px; max-height: 420px; overflow: auto; margin: 0; color: var(--gray-900); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

 
.doc-link { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--gray-300); border-radius: var(--radius-lg); background: var(--white); text-decoration: none; color: var(--gray-900); }
.doc-link:hover { background: var(--gray-50); text-decoration: none; }
.doc-link:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--gray-900); }
.doc-icon { width: 40px; height: 40px; border-radius: var(--radius-lg); background: var(--gray-100); color: var(--gray-900); display: grid; place-items: center; flex: none; }
.doc-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.doc-text strong { font-weight: 600; font-size: 16px; line-height: 24px; }
.doc-text span { color: var(--gray-500); font-size: 14px; }
.doc-open { font-weight: 500; font-size: 14px; color: var(--blue-600); text-decoration: underline; white-space: nowrap; }
@media (max-width: 560px) { .doc-open { display: none; } }
.sign-block { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.sign-block h3 { font-size: 16px; line-height: 24px; font-weight: 600; }
.sig-tabs { display: inline-flex; gap: 8px; align-self: flex-start; }
.sig-tabs button { font: 400 14px/20px var(--font); border: 0; background: var(--white); color: var(--gray-900); padding: 6px 16px; border-radius: var(--radius-full); box-shadow: 0 0 0 1px var(--gray-200); cursor: pointer; }
.sig-tabs button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--gray-900); }
.sig-tabs button:focus-visible { outline: 2px solid var(--gray-900); outline-offset: 3px; }
.sig-paper { position: relative; background: var(--white); border: 1px dashed var(--gray-300); border-radius: var(--radius-lg); height: 150px; overflow: hidden; }
.sig-paper canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sig-paper .sig-line { position: absolute; left: 20px; right: 20px; bottom: 34px; border-bottom: 1px solid var(--gray-300); pointer-events: none; }
.sig-paper .sig-x { position: absolute; left: 20px; bottom: 38px; color: var(--gray-400); font-weight: 600; pointer-events: none; }
.sig-paper .sig-hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gray-400); font-size: 14px; pointer-events: none; }
.sig-typed { position: absolute; left: 44px; right: 20px; bottom: 36px; font-family: "Dancing Script", "Brush Script MT", "Segoe Script", cursive; font-size: 40px; line-height: 1; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.sig-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

 
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 16px; line-height: 24px; font-weight: 400; color: var(--gray-900); cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 3px 0 0; padding: 0; background: var(--white) center / 100% 100% no-repeat; border: 2px solid var(--gray-300); border-radius: 5px; cursor: pointer; }
.check input:hover { border-color: var(--gray-600); }
.check input:checked { background-color: var(--gray-900); border-color: transparent; background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); }
.check input:checked:hover { background-color: var(--gray-600); }
.check input:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--gray-900); }
.invalid .check input { border-color: var(--red-500); background-color: var(--red-50); }
.countersign { font-size: 14px; color: var(--gray-500); border-top: 1px solid var(--gray-200); padding-top: 16px; margin: 0; }

 
.fee-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.fee-amount { font-size: 24px; line-height: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fee-amount + span { color: var(--gray-500); font-size: 14px; }
.wire { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.wire-head { background: var(--gray-50); color: var(--gray-900); padding: 12px 16px; font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--gray-200); }
.wire-head span { color: var(--gray-500); font-weight: 400; }
.wire-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--gray-200); }
.wire-head + .wire-row { border-top: 0; }
.wire-row .k { color: var(--gray-500); font-size: 14px; }
.wire-row .v { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; word-break: break-word; }
.wire-row .v.num { letter-spacing: 0.02em; }
.copy-btn { font: 500 12px/16px var(--font); color: var(--gray-900); background: var(--white); border: 0; box-shadow: inset 0 0 0 1px var(--gray-300); border-radius: var(--radius-lg); padding: 6px 12px; cursor: pointer; }
.copy-btn:hover { background: var(--gray-100); }
.copy-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--gray-900); }
.wire-foot { padding: 12px 16px; border-top: 1px solid var(--gray-200); background: var(--gray-50); font-size: 14px; color: var(--gray-500); }
@media (max-width: 560px) {
  .wire-row { grid-template-columns: minmax(0, 1fr) auto; }
  .wire-row .k { grid-column: 1 / -1; }
}

 
.modal-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(17, 25, 40, 0.3); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal { width: min(480px, 100%); background: var(--white); color: var(--gray-900); border-radius: 16px; padding: 32px 24px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: var(--shadow-xl); }
.modal-check { width: 48px; height: 48px; border-radius: var(--radius-full); display: grid; place-items: center; color: var(--green-600); background: var(--green-100); margin-bottom: 8px; }
.modal h2 { font-size: 20px; line-height: 28px; font-weight: 700; }
.modal p { margin: 0; color: var(--gray-500); font-size: 14px; line-height: 20px; }
.modal .modal-ref { font-size: 14px; }
.modal .btn { margin-top: 16px; min-width: 160px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--gray-900); color: var(--white); padding: 10px 16px; border-radius: var(--radius-lg); font-weight: 500; font-size: 14px; z-index: 20; box-shadow: var(--shadow-jb); }

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .section, .done-card { padding: 16px; border-radius: 0; box-shadow: none; border-block: 1px solid var(--gray-200); margin-inline: -16px; }
  .hero { padding-top: 24px; }
  .brand-tag { display: none; }
  .sign-block { padding: 16px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
 
.hero { padding: 0; max-width: none; margin-bottom: 32px; }
.hero-card { position: relative; overflow: hidden; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-jb); display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: 300px; }
.hero-copy { padding: 40px; display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }
.badge-pink { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: var(--pink-500); color: var(--white); font-size: 14px; line-height: 20px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-full); }
.hero h1 { font-size: 36px; line-height: 44px; font-weight: 700; letter-spacing: -0.02em; margin: 0; max-width: 540px; }
.hero p { max-width: 560px; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; padding: 0; list-style: none; }
.how li { display: flex; gap: 10px; align-items: flex-start; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 12px; }
.how .n { flex: none; width: 24px; height: 24px; border-radius: var(--radius-full); background: var(--gray-900); color: var(--white); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.how strong { display: block; font-size: 14px; line-height: 20px; font-weight: 600; }
.how span { display: block; font-size: 12px; line-height: 16px; color: var(--gray-500); }
.hero-art { position: relative; }
.hero-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.rail-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-jb); padding: 16px 8px 8px; }
.progress { padding: 0 12px 12px; margin-bottom: 8px; border-bottom: 1px solid var(--gray-200); }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.progress-top span { color: var(--gray-500); font-weight: 400; font-size: 12px; }
.progress-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.progress-bars i { height: 4px; border-radius: var(--radius-full); background: var(--gray-200); }
.progress-bars i.on { background: var(--pink-500); }
.rail .dot { font-size: 11px; font-weight: 600; color: var(--gray-500); width: 22px; height: 22px; border-width: 1.5px; }
.rail a.done .dot { font-size: 0; }

.section-head { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 20px; border-bottom: 1px solid var(--gray-200); }
.step-n { flex: none; width: 40px; height: 40px; border-radius: var(--radius-lg); background: var(--gray-900); color: var(--white); font-size: 16px; font-weight: 700; display: grid; place-items: center; }
.section-head .kicker { display: block; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 2px; }
.section.complete .step-n { background: var(--green-500); }

.fee-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--gray-900); color: var(--white); border-radius: var(--radius-lg); padding: 20px 24px; }
.fee-hero .fee-amount { font-size: 36px; line-height: 40px; color: var(--white); }
.fee-hero .fee-sub { color: var(--gray-300); font-size: 14px; }
.fee-hero .btn { background: var(--white); color: var(--gray-900); box-shadow: none; }
.fee-hero .btn:hover { background: var(--gray-100); }

.actions { position: sticky; bottom: 16px; z-index: 5; background: var(--white); border-radius: var(--radius-lg); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1), 0 2px 4px 0 rgba(0, 0, 0, 0.06), 0 0 0 1px var(--gray-200); padding: 12px 12px 12px 20px; }
.actions-note { font-size: 14px; color: var(--gray-500); }
.actions-note strong { color: var(--gray-900); font-weight: 600; }

@media (max-width: 960px) { .hero-card { grid-template-columns: minmax(0, 1fr); } .hero-art { display: none; } }
@media (max-width: 640px) {
  .hero { margin-inline: -16px; margin-bottom: 16px; }
  .hero-card { border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--gray-200); }
  .hero-copy { padding: 24px 16px; }
  .hero h1 { font-size: 28px; line-height: 36px; }
  .how { grid-template-columns: minmax(0, 1fr); }
  .actions { bottom: 0; margin-inline: -16px; border-radius: 0; padding: 12px 16px; }
  .actions-note { display: none; }
  .fee-hero { padding: 16px; }
}
