:root {
  --red: #B2001A;
  --red-dark: #8E0015;
  --cream: #F7F1E6;
  --card: #FFFDF8;
  --ink: #1E1A17;
  --muted: #6B625A;
  --line: #E4DACB;
  --line-strong: #CDBFAA;
  --ok: #2F6B3A;
  color-scheme: only light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { color-scheme: only light; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 17px/1.5 Inter, system-ui, -apple-system, sans-serif;
}
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.9rem; color: var(--red); }
h2 { font-size: 1.3rem; }
a { color: var(--red); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 14px 16px 6px; max-width: 760px; margin: 0 auto; }
.top .lang { justify-self: end; }
.logo { width: 150px; color: var(--red); justify-self: center; }
@media (max-width: 420px) { .logo { width: 128px; } .lang select { font-size: .85rem; padding: 6px 6px; } }
.logo svg { display: block; width: 100%; height: auto; }
.lang select { font: inherit; font-size: .95rem; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); color: var(--ink); }

.steps { display: flex; gap: 6px; max-width: 760px; margin: 8px auto 0; padding: 0 16px; }
.steps span { flex: 1; font-size: .78rem; color: var(--muted); border-top: 4px solid var(--line); padding-top: 6px; }
.steps span.on { color: var(--red); border-color: var(--red); font-weight: 600; }
.steps span.done { border-color: var(--red-dark); }
@media (max-width: 480px) { .steps span:not(.on) { font-size: 0; } }

main { max-width: 760px; margin: 0 auto; padding: 16px 16px 32px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; margin-bottom: 16px; }
.intro { font-size: 1.05rem; }
.note { border-left: 4px solid var(--red); background: #FBEFEA; padding: 12px 14px; border-radius: 0 12px 12px 0; margin: 0 0 12px; }
.note strong { color: var(--red-dark); }
.hint { font-size: .88rem; color: var(--muted); margin: 4px 0 0; }

.field { margin-bottom: 14px; }
.field > span { display: block; font-weight: 500; margin-bottom: 4px; }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); font-size: .88rem; }
input[type=text], input[type=email], input[type=tel], input[type=time], input[type=number], input[type=search], textarea {
  width: 100%; font: inherit; padding: 12px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink);
}
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(178, 0, 26, .25); border-color: var(--red); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); cursor: pointer; min-height: 44px; }
.chip[aria-pressed=true] { background: var(--red); border-color: var(--red); color: #fff; }

.cat { margin-bottom: 14px; }
.cat h3 { font-size: 1.05rem; margin-bottom: 8px; }
.count { font-weight: 600; color: var(--red); }

.btns { display: flex; gap: 12px; justify-content: space-between; margin-top: 8px; }
.btn { font: inherit; font-weight: 600; padding: 14px 22px; border-radius: 12px; border: 0; background: var(--red); color: #fff; cursor: pointer; min-height: 52px; }
.btn:hover { background: var(--red-dark); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn.small { padding: 8px 14px; min-height: 40px; font-weight: 500; }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; color: var(--red); text-decoration: underline; cursor: pointer; }

table.fees { width: 100%; border-collapse: collapse; }
table.fees th, table.fees td { padding: 10px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
table.fees tr:first-child th, table.fees tr:first-child td { border-top: 0; }
table.fees td { text-align: right; font-variant-numeric: tabular-nums; }
table.fees tr.free { background: var(--red); color: #fff; font-weight: 600; }
ul { padding-left: 1.2em; margin: 0; }
li { margin: 4px 0; }

.terms { max-height: 340px; overflow: auto; white-space: pre-wrap; font-size: .9rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.sig-wrap { position: relative; border: 2px dashed var(--line-strong); border-radius: 12px; background: #fff; touch-action: none; }
.sig-wrap canvas { display: block; width: 100%; height: 180px; touch-action: none; }
.sig-line { position: absolute; left: 16px; right: 16px; bottom: 40px; border-bottom: 1px solid var(--line); pointer-events: none; }
.missing { background: #FBEFEA; border: 1px solid var(--red); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.err { color: var(--red-dark); font-weight: 600; }
.done { text-align: center; padding: 36px 16px; }
.done .tick { font-size: 3rem; color: var(--ok); }
.loading { text-align: center; color: var(--muted); }
.ts { margin: 12px 0; min-height: 65px; }

.foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 0 16px 28px; }
dialog { max-width: min(680px, 92vw); border: 0; border-radius: 16px; padding: 18px; background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(30, 26, 23, .5); }
.dlg-body { white-space: pre-wrap; max-height: 70vh; overflow: auto; margin-bottom: 12px; font-size: .92rem; }

/* Keep the brand colours on browsers that force a dark mode (owner, 2026-10-24).
   "only light" stops Chrome's auto dark; Samsung Internet and some others still
   recolour plain background colours but leave background images alone, so every
   coloured surface is also painted as a one-colour gradient. */
body { background-image: linear-gradient(var(--cream), var(--cream)); }
.card, dialog, .lang select { background-image: linear-gradient(var(--card), var(--card)); }
input[type=text], input[type=email], input[type=tel], input[type=time], input[type=number], input[type=search], textarea,
.chip, .terms { background-image: linear-gradient(#fff, #fff); }
.chip[aria-pressed=true], .btn, table.fees tr.free { background-image: linear-gradient(var(--red), var(--red)); }
.btn:hover { background-image: linear-gradient(var(--red-dark), var(--red-dark)); }
.btn.ghost { background-image: none; }
.note, .missing { background-image: linear-gradient(#FBEFEA, #FBEFEA); }
/* The signature pad is always white with black ink. */
.sig-wrap { background-image: linear-gradient(#fff, #fff); }
.sig-wrap canvas { background: #fff; }

/* Brand red page with a cream logo; cards and fields stay light (owner, 2026-10-24). */
body { background: var(--red); background-image: linear-gradient(var(--red), var(--red)); }
.logo { color: var(--cream); }
main > h1, main > .intro, main > p:not(.note), .loading, .foot, .foot a { color: var(--cream); }
.steps span { color: rgba(247, 241, 230, .75); border-color: rgba(247, 241, 230, .3); }
.steps span.on { color: var(--cream); border-color: var(--cream); }
.steps span.done { border-color: rgba(247, 241, 230, .7); }
main > p.note { border-left-color: var(--cream); }
main > .btns .btn { background: var(--cream); background-image: linear-gradient(var(--cream), var(--cream)); color: var(--red); }
main > .btns .btn:hover { background-image: linear-gradient(#fff, #fff); }
main > .btns .btn.ghost { background: transparent; background-image: none; color: var(--cream); border-color: var(--cream); }
.done h1 { color: var(--red); }

/* Selectable options get a clear cyan border (owner, 2026-10-24). */
.chip { border: 2px solid #00A3C4; }
.chip[aria-pressed=true] { border-color: var(--red); }

/* Step 3: three cards; AGB as a line that opens the pop-up. */
.card h2.sub { margin-top: 18px; }
.terms-line { margin: 0 0 14px; font-weight: 500; }
.linkbtn { text-align: left; }
