/* Layout: one reading column of numbered form sections; each catalogue item is a row with a three-way choice that unfolds its detail fields; sticky footer with progress and send. System fonts only: no third-party font requests. */
:root {
  --bg: #F2F2EF;
  --surface: #FFFFFF;
  --fg: #151515;
  --muted: #5D5E58;
  --line: #DADAD3;
  --accent: #FFCD00;
  --accent-ink: #151515;
  --accent-soft: #FFF4C4;
  --focus: #1F5FD1;
  --ok: #1E7F38;
  --no: #B83228;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121311; --surface: #1C1D1A; --fg: #ECECE6; --muted: #A2A39A; --line: #34352F;
    --accent: #FFCD00; --accent-ink: #151515; --accent-soft: #3A3314; --focus: #7DA6FF;
    --ok: #5CCB7A; --no: #FF7B70;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
[hidden] { display: none !important; }
.contents { display: contents; }
.wrap { max-width: 860px; margin: 0 auto; padding-block: 28px 120px; display: grid; gap: 28px; }
header.top { display: grid; gap: 14px; }
.wordmark { font-weight: 800; letter-spacing: 0.22em; font-size: 15px; }
h1 { font-weight: 800; font-size: clamp(30px, 6vw, 44px); line-height: 1.05; margin: 0; text-wrap: balance; }
h1 .yr { background: var(--accent); color: var(--accent-ink); padding: 0 8px; }
.lead { max-width: 62ch; margin: 0; }
.how { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.how li { display: flex; gap: 6px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.how b { font-weight: 600; }
.notice { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 16px; }
.notice.error { border-color: var(--no); }

form { display: grid; gap: 28px; }
section.block { display: grid; gap: 12px; }
.block-head { display: flex; gap: 12px; align-items: baseline; border-top: 2px solid var(--fg); padding-top: 12px; }
.block-num { font-weight: 800; font-size: 14px; min-width: 2ch; font-variant-numeric: tabular-nums; }
h2 { font-weight: 800; font-size: 22px; margin: 0; line-height: 1.2; }
.block-intro { margin: 0; color: var(--muted); max-width: 62ch; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding: 16px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field.wide { grid-column: 1 / -1; }
.lbl { font-size: 13px; font-weight: 600; }
.req { color: var(--no); }
.static { padding: 8px 0; font-weight: 500; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
input[type=text], input[type=url], input[type=email], input[type=number], select, textarea {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 10px; width: 100%; min-width: 0;
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input:invalid:not(:placeholder-shown) { border-color: var(--no); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.items { display: grid; }
.item { padding: 14px 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.item:first-child { border-top: 0; }
.item-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.item-label { min-width: 0; flex: 1 1 260px; font-weight: 500; }
.item-label .hint { display: block; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: 0 0 auto; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { font-size: 13px; padding: 6px 12px; cursor: pointer; border-left: 1px solid var(--line); white-space: nowrap; user-select: none; }
.seg label:first-of-type { border-left: 0; }
.seg input:checked + label { background: var(--fg); color: var(--bg); }
.seg input.want:checked + label { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: -2px; }
.ic { font-weight: 700; margin-right: 4px; }
.ic-ok { color: var(--ok); }
.ic-no { color: var(--no); }
.seg input:checked + label .ic { color: inherit; }
.ic-sup { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 1; vertical-align: -3px; }
.seg input.want:checked + label .ic-sup { background: var(--accent-ink); color: var(--accent); }
.item.is-want { background: var(--accent-soft); }
.item.is-no .item-label { color: var(--muted); }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; user-select: none; }
.chip input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip input:disabled + span { opacity: 0.4; cursor: not-allowed; }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.event { padding: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.event-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.event-title { font-weight: 600; font-size: 15px; }
button { font: inherit; cursor: pointer; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--fg); border-radius: 6px; padding: 6px 12px; font-size: 13px; }
.btn-add { justify-self: start; margin: 0 16px 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 10px 18px; font-weight: 600; }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.privacy { font-size: 12px; color: var(--muted); margin: 0; max-width: 70ch; }

footer.bar {
  position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line);
  padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.bar-in { max-width: 860px; margin: 0 auto; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.progress { display: grid; gap: 4px; font-size: 13px; flex: 1 1 200px; min-width: 0; }
.meter { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.status { font-size: 13px; }
.status.error { color: var(--no); }
@media (prefers-reduced-motion: reduce) { .meter i { transition: none; } }
@media (max-width: 520px) { .seg label { padding: 6px 9px; font-size: 12px; } }
