body { background: linear-gradient(180deg, #fff 0, #fff 150px, var(--bg) 150px); min-height: 100vh; }

.top { display: flex; justify-content: center; align-items: center; gap: 22px; padding: 22px 16px 18px; }
.logo { height: 74px; width: auto; max-width: 42vw; object-fit: contain; }
.event-logo { height: 84px; }
.logo-sep { width: 1px; align-self: stretch; margin: 6px 0; background: var(--line-strong); }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px 48px; }
.sheet {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden;
}
.cover { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.sheet-head {
  padding: 26px 28px 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  color: #fff;
}
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); margin-bottom: 10px;
}
.sheet-head h1 { font-size: 26px; font-weight: 800; }
.sub { margin: 6px 0 0; font-weight: 500; opacity: .9; }
.intro { margin: 12px 0 0; font-size: 14.5px; opacity: .88; white-space: pre-line; }
.intro:empty, .sub:empty { display: none; }

.sheet-body { padding: 26px 28px 28px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 0; color: var(--muted); }

.field { margin-bottom: 22px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .opt-grid, .field.invalid .checks { outline: 1px solid var(--danger); outline-offset: 4px; border-radius: 12px; }
.err { color: var(--danger); font-size: 13px; margin-top: 6px; }
.err:empty { display: none; }
input, select, textarea { font-size: 16px; } /* no iOS zoom on focus */
input[type="tel"] { direction: ltr; text-align: right; }

/* Area / choice cards */
.opt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.opt-grid.text-only { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.opt {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px;
  min-height: 112px; padding: 12px 8px 10px; text-align: center;
  border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.opt-grid.text-only .opt { min-height: 0; padding: 12px; justify-content: center; }
.opt:hover { border-color: var(--brand); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .sq {
  display: block; border: 2px solid var(--line-strong); border-radius: 3px; background: #f5f8fc;
  transition: border-color .15s, background .15s;
}
.opt .opt-label { font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(11, 90, 168, .12); }
.opt:has(input:checked) .sq { border-color: var(--brand); background: rgba(11, 90, 168, .18); }
.opt:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(11, 90, 168, .35); }

.checks { display: grid; gap: 8px; }
.check {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; font-weight: 500;
}
.check input { accent-color: var(--brand); width: 18px; height: 18px; }
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.other-input { margin-top: 8px; }

.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.submit { padding: 14px; font-size: 17px; margin-top: 4px; }
.fine { font-size: 12.5px; color: var(--muted); text-align: center; margin: 12px 0 0; }

/* Success / closed */
.state-icon {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  margin: 6px auto 14px; background: var(--ok-soft); color: var(--ok);
}
.state-icon svg { width: 32px; height: 32px; }
.state-icon.muted-icon { background: #eef1f5; color: var(--muted); }
.done-title { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.state-text { text-align: center; color: var(--muted); margin: 0 auto 16px; max-width: 46ch; white-space: pre-line; }
.ref {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 16px; border: 1px dashed var(--brand); border-radius: 12px; background: var(--brand-soft);
  margin-bottom: 14px;
}
.ref span { color: var(--brand-deep); font-weight: 500; }
.ref strong { font-size: 20px; color: var(--brand-deep); letter-spacing: .04em; }
.summary { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.summary div:first-child { border-top: 0; }
.summary dt { color: var(--muted); flex: none; }
.summary dd { margin: 0; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
#done .btn-ghost { display: flex; margin: 0 auto; color: var(--brand); }

/* Private edit link */
.edit-note { margin-bottom: 20px; line-height: 1.7; }
.edit-note a { color: var(--brand); font-weight: 700; }
.edit-link {
  padding: 14px 16px; margin-bottom: 14px; border-radius: 12px;
  background: var(--warn-soft); border: 1px solid #f1d9a8;
}
.edit-link strong { display: block; font-size: 15px; color: var(--ink); }
.edit-link p { margin: 2px 0 10px; font-size: 13.5px; color: var(--warn); }
.edit-link input { font-size: 14px; padding: 9px 11px; background: #fff; }
.edit-actions { display: flex; gap: 8px; margin-top: 8px; }
.edit-actions .btn { flex: 1; }
.btn-wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.btn-wa:hover { background: #178a45; border-color: #178a45; }

.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }

@media (max-width: 600px) {
  body { background: linear-gradient(180deg, #fff 0, #fff 110px, var(--bg) 110px); }
  .top { padding: 16px 16px 12px; }
  .top { gap: 14px; }
  .logo { height: 50px; }
  .event-logo { height: 58px; }
  .wrap { padding: 0 10px 32px; }
  .sheet-head { padding: 20px 18px 18px; }
  .sheet-head h1 { font-size: 22px; }
  .sheet-body { padding: 20px 16px 22px; }
  .opt-grid { grid-template-columns: repeat(2, 1fr); }
  .opt { min-height: 96px; }
}
