.field {
  margin-bottom: 1rem;
  min-width: 0;
}
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
}
input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid #bccdd5;
  border-radius: 9px;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  background: white;
  min-height: 46px;
}
textarea {
  resize: vertical;
}
input[type="checkbox"],
input[type="radio"] {
  width: 1.2rem;
  min-height: 1.2rem;
  height: 1.2rem;
  accent-color: var(--brand);
}
input[type="file"] {
  font-size: 0.875rem;
}
input[type="hidden"] {
  display: none;
}
.invalid input,
.invalid select,
.invalid textarea {
  border-color: var(--error);
}
.field .help {
  margin-top: 0.35rem;
}
.form-panel {
  max-width: 580px;
  margin: 2rem auto;
  background: white;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.form-panel h1 {
  font-size: 1.9rem;
}
.social-options {
  display: grid;
  gap: 0.65rem;
  margin-block: 1.5rem;
}
.social-options .button {
  width: 100%;
  justify-content: center;
}
.social-options .help {
  margin: 0;
  text-align: center;
}
.phone-registration {
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
}
.phone-registration > summary {
  color: var(--brand);
}
.phone-registration[open] > summary {
  margin-bottom: 0.5rem;
}
.form-switch {
  margin-top: 1.5rem;
}
.form-panel input[type="radio"] {
  margin-inline-end: 0.5rem;
}
.editor {
  max-width: 860px;
  background: white;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.editor section {
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}
.editor-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 1.5rem;
}
details summary {
  cursor: pointer;
  padding: 0.8rem 0;
  font-weight: 700;
}
.wizard-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-block: 1.5rem;
}
.wizard-nav button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  background: white;
  color: var(--muted);
}
.wizard-nav button[aria-current="step"] {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
@media (max-width: 560px) {
  .editor {
    padding: 1rem;
  }
  .editor-actions .button {
    flex: 1;
  }
  .wizard-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .form-panel {
    margin-top: 1rem;
  }
}
/* Unsaved local previews and the publication review step. */
.upload-previews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 1rem;
}
.upload-previews figure { margin: 0; min-width: 0; }
.upload-previews img { width: 100%; max-width: 320px; height: 180px; object-fit: contain; }
.upload-previews figcaption, .review-fields dd { overflow-wrap: anywhere; white-space: pre-wrap; }
.review-fields dt { font-weight: 700; margin-top: 1rem; }
.review-fields dd { margin-inline-start: 0; }

/* Focused sign-in and email entry. */
.auth-panel {
  max-width: 520px;
  padding: clamp(1.5rem, 5vw, 2.75rem);
  box-shadow: 0 16px 40px rgb(10 44 56 / 6%);
}
.auth-panel h1 { margin-bottom: 0.35rem; }
.auth-intro { color: var(--muted); margin: 0 0 1.5rem; }
.auth-panel .social-options { margin: 1.25rem 0; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1.5rem 0;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.auth-submit { width: 100%; justify-content: center; margin-top: 0.25rem; }
.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
}
@media (max-width: 560px) {
  .auth-panel { margin-top: 1rem; }
}

/* A compact frame keeps account tasks focused on small screens. */
.auth-page .site-header .header-inner {
  min-height: 68px;
}
.auth-page .site-header nav,
.auth-page .site-header .header-inner > .button,
.auth-page .footer > div {
  display: none;
}
.auth-page main {
  min-height: auto;
  padding-block: 1.5rem 2rem;
}
.auth-page .footer {
  border: 0;
  justify-content: center;
  padding-block: 0 2rem;
}
.auth-page .footer nav {
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.auth-success-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #e3f5ef;
  color: var(--brand);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.auth-hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}
.auth-panel > .auth-submit {
  display: flex;
  margin-top: 1.5rem;
}
@media (max-width: 850px) {
  .auth-page .header-inner {
    flex-wrap: nowrap;
    padding-block: 0.65rem;
  }
}

/* Live password guidance on verified email forms. */
.password-input-wrap {
  position: relative;
}
.password-input-wrap input {
  padding-left: 3.25rem;
}
.password-toggle {
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--muted);
}
.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--brand);
  background: var(--paper);
}
.password-toggle svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.password-status {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0.35rem 0 0;
}
.password-entry.is-valid input {
  border-color: #18805f;
  box-shadow: 0 0 0 2px rgb(24 128 95 / 12%);
}
.password-entry.is-valid .password-status {
  color: #126c50;
}
.password-entry.is-invalid input {
  border-color: var(--error);
}
.password-entry.is-invalid .password-status {
  color: var(--error);
}

/* Compact rental posting on small screens. */
.listing-editor-page { font-family: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif; }
.listing-start { max-width: 680px; }
.listing-start h1 { font-size: clamp(1.65rem, 4vw, 2rem); margin: 0 0 1.35rem; }
.listing-start .checkbox-row { display: flex; align-items: center; gap: 0.65rem; margin: 0; cursor: pointer; }
.listing-start .checkbox-row input { flex: none; margin: 0; }
.listing-submit { width: 100%; justify-content: center; margin-top: 0.5rem; }
.listing-edit-head { max-width: 720px; display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin: 1.25rem auto 1rem; }
.listing-edit-head h1 { font-size: clamp(1.65rem, 4vw, 2rem); margin: 0; }
.listing-edit-head .eyebrow { margin: 0 0 0.2rem; }
.listing-edit-head a { color: var(--brand); font-size: 0.9rem; white-space: nowrap; }
.listing-editor-page .editor { max-width: 720px; margin: auto; padding: clamp(1.2rem, 3vw, 2rem); }
.listing-editor-page .editor-extra { border-top: 1px solid var(--line); margin: 0.5rem 0; }
.listing-editor-page .editor-extra summary { color: var(--brand); }
.listing-editor-page .editor-extra[open] { padding-bottom: 0.75rem; }
.listing-editor-page .editor-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 1.25rem; }
.listing-editor-page .editor-confirm input { flex: none; margin: 0; }
.listing-editor-page .editor-confirm label { cursor: pointer; }
.listing-editor-page .editor-actions { justify-content: flex-start; }
.listing-editor-page .editor-actions .button { flex: 1; justify-content: center; }
.saved-photos { max-width: 720px; margin: 2rem auto; }
.saved-photos h2 { font-size: 1.2rem; }
.editor-photos .help { margin: 0.4rem 0; }
.editor-photos #image-preview-status:empty { display: none; }
@media (max-width: 560px) {
  .listing-start { margin: 1rem auto; }
  .listing-edit-head { align-items: baseline; }
  .listing-editor-page .editor { padding: 1.15rem; }
  .listing-editor-page .editor-actions { flex-direction: column; }
  .listing-editor-page .editor-actions .button { width: 100%; }
}

/* Small image controls stay beside the upload field. */
.editor-photos .saved-photo-grid,
.editor-photos .upload-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr));
  gap: 0.75rem;
  margin-block: 0.75rem 1rem;
}
.editor-photos .photo-tile,
.editor-photos .upload-previews figure {
  margin: 0;
  min-width: 0;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.editor-photos .photo-tile img,
.editor-photos .upload-previews img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
}
.editor-photos .photo-tile-actions,
.editor-photos .preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.editor-photos .photo-tile-actions .button,
.editor-photos .preview-actions .button {
  min-height: 2.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
}
.editor-photos .upload-previews figcaption {
  font-size: 0.75rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.editor-photos #clear-image-selection[hidden] { display: none; }
