/* Memberships: the panel that opens from a plan's Reserve button (join.js). Same look as the class booking panel. */
html:has(dialog.jn[open]) { overflow: hidden; }
.jn {
  margin: 0; inset: 0 0 0 auto; width: min(460px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  padding: 0; border: 0; background: var(--bg); color: var(--ink);
  display: none; flex-direction: column; box-shadow: -24px 0 60px -20px rgba(0,0,0,.35);
}
.jn[open] { display: flex; animation: jn-in .28s cubic-bezier(.2,.8,.2,1); }
.jn::backdrop { background: rgba(14,12,10,.5); backdrop-filter: blur(2px); }
@keyframes jn-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  .jn { inset: auto 0 0 0; width: 100vw; height: auto; max-height: 94dvh; border-radius: 22px 22px 0 0; }
  @keyframes jn-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { .jn[open] { animation: none; } }

.jn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 14px 22px; border-bottom: 1px solid var(--line); }
.jn-kicker { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.jn-x { appearance: none; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.jn-x svg { width: 18px; height: 18px; }
.jn-body { padding: 22px; overflow-y: auto; flex: 1; }
.jn-body h2 { font-size: 28px; letter-spacing: -.01em; margin-bottom: 12px; }
.jn-foot { border-top: 1px solid var(--line); padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; background: var(--surface); }
.jn-foot[hidden] { display: none; }
.jn-wide { flex: 1; }

.jn-how { color: var(--ink-2); font-size: 15px; margin-bottom: 14px; }
.jn-note { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }
.jn-alert { border-radius: 12px; padding: 12px 14px; font-size: 14.5px; font-weight: 600; margin-bottom: 16px; background: var(--clay-soft); color: var(--ink); }
.jn-field { display: grid; gap: 6px; margin-bottom: 14px; }
.jn-field label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.jn-field input {
  width: 100%; font: 500 16px var(--sans); color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 12px 14px;
}
.jn-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.jn-field input[aria-invalid="true"] { border-color: var(--clay); }
.jn-hint { font-size: 12.5px; color: var(--muted); }
.jn-err { font-size: 13px; font-weight: 700; color: var(--clay); }
.jn-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); margin: 4px 0 8px; cursor: pointer; }
.jn-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--forest); }
.jn-methods { font-size: 13.5px; color: var(--muted); margin-top: 14px; }
.jn-methods b { color: var(--ink-2); }
.jn-lines { list-style: none; margin: 8px 0 16px; padding: 0; border-top: 1px solid var(--line); }
.jn-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.jn-lines li b { color: var(--ink); text-align: right; }
.jn-ok { width: 56px; height: 56px; border-radius: 50%; background: var(--forest); color: var(--forest-ink); display: grid; place-items: center; margin-bottom: 16px; }
.jn-ok svg { width: 28px; height: 28px; }
.jn-spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--forest); animation: jn-spin .9s linear infinite; margin-top: 8px; }
@keyframes jn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .jn-spin { animation-duration: 3s; } }

/* "Manage my membership" lines on the Memberships page */
.manage-line { margin-top: 10px; }
.manage-line a, .rules-single a[data-manage] { color: var(--brand); font-weight: 700; }

/* The optional photo on the welcome screen */
.jn-photo { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.jn-photo-main { flex: 1; min-width: 0; }
.jn-photo-main b { display: block; color: var(--ink); font-size: 15px; }
.jn-photo-main p { font-size: 14px; color: var(--ink-2); margin: 4px 0 10px; }
.jn-photo-main .jn-check { font-size: 13.5px; margin-bottom: 12px; }
.jn-photo-img { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--surface); }
