/* Focused layout refinements from the mobile screen review. */
.host-create-primary {
  min-height: 54px;
  margin: 0 0 20px;
  font-size: 16px;
}
.host-create-primary[hidden] { display: none; }

/* Event creation is its own linear flow, without controls for another event. */
body[data-view="createvent"] .topbar,
body:has(#createvent.on) .topbar,
#createvent > .vhead { display: none; }

/* Invitation entry uses the same editorial wordmark and comfortable controls. */
.invitation-page > p:first-child {
  font: 700 38px/1.15 'Playfair Display', Georgia, serif !important;
  letter-spacing: -1.2px !important;
  text-transform: capitalize;
  color: var(--ink);
  margin: 0 0 28px;
}
.invitation-page h1 {
  font: 700 36px/1.2 'Playfair Display', Georgia, serif;
  letter-spacing: -.6px;
}
.invitation-page input:not([type="checkbox"]):not([type="radio"]) {
  min-height: 54px;
  font-size: 17px;
  border-radius: 14px;
  background: #fff;
}
.invitation-page button {
  min-height: 54px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  background: var(--olive);
  border-color: var(--olive);
}
.invitation-page label { font-size: 15px; }

@media (max-width: 900px) {
  #hostevents > .host-create-primary { width: 100%; }
  #hostevents .host-filter { gap: 8px; flex-wrap: nowrap; }
  #hostevents .host-filter > .btn {
    flex: 1;
    min-width: 0;
    padding: 10px 8px;
    font-size: 14px;
    white-space: nowrap;
  }

  #createvent .card.panel {
    padding: 0;
    border: 0;
    background: transparent;
  }
  #createvent .panel-h {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 18px;
  }
  #createvent .panel-h .mini { align-self: flex-end; }
  #createvent .panel-h h2 { font-size: 34px; line-height: 1.2; }
  #createvent .hz-step { margin-bottom: 24px; }
  #createvent .card.panel > div:has(> [data-next]) { flex-direction: column; }
  #createvent [data-next], #createvent [data-back], #createvent [data-saveexit] { width: 100%; min-height: 52px; }

  #people .panel-h { flex-direction: column; align-items: flex-start; gap: 6px; }
  #people .panel-h .mini { margin-left: 0 !important; }

  #announce textarea + div {
    display: flex !important;
    flex-wrap: wrap;
    gap: 12px !important;
    align-items: center;
  }
  #announce textarea + div > .btn {
    flex-basis: 100%;
    width: 100%;
    min-height: 52px;
    margin-left: 0 !important;
  }
  #announce textarea + div > .pill,
  #announce textarea + div > .mini { flex: 1 1 auto; }
  #announce .tmpl {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 12px;
  }
  #announce .tmpl > .btn { grid-column: 2; justify-self: stretch; }
  #announce .tmpl .ts { margin-top: 6px; }

  #readiness [data-readiness-actions] { flex-direction: column; }
  #readiness [data-readiness-actions] > .btn { width: 100%; min-height: 52px; }

  #today .discovery-card:only-child { grid-column: 1 / -1; }
  #today .discovery-card:only-child > img { height: 180px; }
  #today .discovery-card:only-child h3 { font-size: 21px; margin: 14px 16px 6px; }
  #today .discovery-card:only-child p { font-size: 14px; margin: 3px 16px; }
  #today .discovery-card:only-child .btn { font-size: 15px; margin: 12px 16px 16px; }

  .invitation-page { margin: 24px auto; padding: 24px; }
}
/* Setup and sign-in remain readable and scrollable on short mobile screens. */
#overlay.overlay {
  padding: 16px;
  overflow-y: auto;
}
#overlay .modal {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 32px;
  border-radius: 24px;
}
#overlay .modal h3,
body #serenGate .gcard h3 {
  font-size: 32px;
  line-height: 1.18;
  letter-spacing: -.65px;
  margin-top: 22px;
}
#overlay .modal p.sub,
body #serenGate .gsub { font-size: 16px; line-height: 1.55; }
#overlay .modal .field label,
body #serenGate .gfield label { font-size: 15px; line-height: 1.4; }
#overlay .modal .field input,
body #serenGate .gfield input {
  min-height: 54px;
  font-size: 17px;
  border-radius: 14px;
}
#overlay .modal .close {
  width: 44px;
  height: 44px;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  font-size: 26px;
}
#overlay #authBtn,
body #serenGate .gbtn {
  min-height: 54px;
  border-radius: 999px;
  font-size: 16px;
}
#overlay #authAlt,
body #serenGate .galt { font-size: 15px; line-height: 1.5; }
body #serenGate { padding: 16px; overflow-y: auto; }
body #serenGate .gcard {
  width: 420px;
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 32px;
}

/* Onboarding owns the screen until a member finishes or skips it. */
body:has(#onboarding:not(.hidden)) .member-bottom-nav { display: none; }
#onboarding.ob { z-index: 90; }
#onboarding .ob-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 16px;
  width: 100%;
  max-width: 560px;
  padding: 22px 24px 0;
  flex-shrink: 0;
}
#onboarding .ob-logo {
  font-size: 38px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -1px;
  text-transform: capitalize;
  color: var(--ink);
}
#onboarding .ob-prog {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  margin: 0;
  gap: 8px;
}
#onboarding .ob-prog i { flex: 1; width: auto; height: 5px; }
#onboarding .ob-skip {
  grid-column: 2;
  grid-row: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 15px;
}
#onboarding .ob-card {
  max-height: none;
  overflow: visible;
  flex-shrink: 0;
  max-width: 560px;
  padding-top: 30px;
}
#onboarding .ob-card .ob-actions { flex-wrap: wrap; gap: 12px; }
#onboarding .ob-card .ob-actions > .btn { min-height: 54px; }

/* Profile review uses the same comfortable type and action sizes as setup. */
.p4-overlay .p4-dialog { font-size: 16px; line-height: 1.5; }
.p4-overlay .p4-dialog h2 {
  font-size: 32px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.5px;
}
.p4-overlay .p4-dialog input,
.p4-overlay .p4-dialog textarea,
.p4-overlay .p4-dialog select { font-size: 16px; min-width: 0; }
.p4-overlay .p4-dialog input[type="file"] {
  display: block;
  max-width: 100%;
  width: 100%;
  margin-top: 12px;
  font-size: 14px;
}
.p4-overlay .p4-dialog input[type="file"]::file-selector-button {
  padding: 10px 14px;
  border: 1px solid var(--line, #e4dfd4);
  border-radius: 999px;
  background: var(--paper, #fffdf8);
  color: var(--ink);
  font: inherit;
  margin: 0 10px 8px 0;
}
.p4-overlay .p4-dialog button { min-height: 48px; }
.p4-overlay .p4-dialog .p4-status { font-size: 14px; line-height: 1.5; }
.p4-overlay .p4-dialog summary { min-height: 48px; }

@media (max-width: 480px) {
  #overlay .modal, body #serenGate .gcard { padding: 28px 24px; }
  #onboarding .ob-card { padding-left: 24px; padding-right: 24px; }
  #onboarding .ob-card .ob-actions > .btn { flex: 1 1 auto; }
  .p4-overlay .p4-dialog { padding: 22px 18px; }
  .p4-overlay .p4-dialog .p4-actions > .btn { flex: 1 1 100%; }
  .p4-overlay .p4-dialog .p4-source .p4-actions > .btn { flex: 1 1 0; }
  .p4-overlay .p4-dialog .p4-drop { padding: 16px; }
}
#overlay .modal h3, body #serenGate .gcard h3 { font-weight: 700; }
#overlay #aEye, body #serenGate #gEye {
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}
#overlay [data-testid="auth-forgot-link"], body #serenGate #gForgot {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px !important;
}
.p4-overlay .p4-dialog progress { accent-color: var(--olive, #667a2e); }

/* Entry-page footers and setup detail rows share the readable product scale. */
#overlay .modal .auth-wordmark,
body #serenGate .auth-wordmark {
  font: 700 38px/1.15 'Playfair Display', Georgia, serif;
  letter-spacing: -1.2px;
  color: var(--ink);
}
#overlay .modal .legal-note { font-size: 14px; line-height: 1.6; }
#overlay .modal .legal-note a { color: var(--olive-deep); text-underline-offset: 3px; }
body #serenGate .gback {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--muted);
}
#onboarding .ob-li .s,
#onboarding .setrow .s,
#onboarding .ob-field .lbl { font-size: 15px; line-height: 1.55; }
#onboarding .opt .oc { width: 44px; height: 44px; border-radius: 14px; }
#onboarding .opt .oc svg { width: 24px; height: 24px; stroke-width: 1.7; }

/* Password-reset entry and completion use the same typography and rounded CTA. */
.auth-card { border-radius: 24px; }
.auth-card label { font-size: 15px; line-height: 1.4; }
.auth-card p.sub { font-size: 16px; line-height: 1.6; }
.auth-card input { border-radius: 14px; min-height: 54px; }
.auth-card button,
.auth-card a.cta {
  min-height: 54px;
  border-radius: 999px;
  font-size: 16px;
  line-height: 1.45;
}
.auth-card .foot { font-size: 14px; line-height: 1.6; color: var(--muted); }
@media (max-width: 480px) {
  .auth-card .body { padding: 22px 24px 28px; }
  .auth-card .foot { padding: 18px 24px 24px; }
}
