/* The invite sheet (a <dialog>): a bottom sheet on phones, a small centred panel on desktop. */
.sheet {
  width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; padding: 0; border: 0;
  border-radius: 24px 24px 0 0; background: var(--sheet-bg); color: var(--sheet-fg);
  overflow: auto; overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(23, 29, 39, .55); }
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: up 320ms var(--ease-out); }
  @keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (min-width: 640px) { .sheet { width: min(460px, calc(100% - 48px)); margin: auto; border-radius: 24px; } }
.sheet-in { padding: 22px 22px calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .sheet-in { padding: 28px 30px 30px; } }
.sheet-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.sheet h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.15; }
.sheet .lead { margin-top: 8px; color: var(--sheet-muted); font-size: 16px; }
.x {
  flex: none; width: var(--tap); height: var(--tap); margin: -10px -12px 0 0; border: 0; border-radius: 50%;
  background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--sheet-muted);
}
.x:hover { color: var(--sheet-fg); background: var(--field-bg); }
.x svg { width: 18px; height: 18px; }

.form { margin-top: 20px; display: grid; gap: 14px; }
.row2 { display: grid; gap: 14px; }
@media (min-width: 400px) { .row2 { grid-template-columns: 1fr 1fr; } }
.fld { display: grid; gap: 6px; }
.fld label { font-size: 14px; font-weight: 550; letter-spacing: -0.01em; }
.fld input, .fld select {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: 12px; border: 0;
  background: var(--field-bg); color: var(--sheet-fg); box-shadow: inset 0 0 0 1px var(--field-ring);
  font: inherit; font-size: 17px; -webkit-appearance: none; appearance: none;
}
.fld select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%235d6880' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px; padding-right: 40px;
}
.fld input:focus, .fld select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--sheet-fg); }
.fld [aria-invalid="true"] { box-shadow: inset 0 0 0 2px #b3261e; }
.err { font-size: 14px; color: var(--err, #b3261e); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send {
  margin-top: 6px; min-height: 54px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--send-bg); color: var(--send-fg); font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
  transition: opacity .2s;
}
.send:hover { opacity: .9; }
.send:disabled { opacity: .6; cursor: progress; }
.form-msg { font-size: 15px; color: var(--sheet-muted); min-height: 1px; }
.form-msg.is-error { color: var(--err, #b3261e); }
.small { font-size: 14px; color: var(--sheet-muted); }
.done { margin-top: 18px; display: grid; gap: 14px; }
.done .b { max-width: 100%; }
