/* Rate a Renter — clean, trustworthy rental-review UI */
:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --ink: #1a2b28;
  --ink-muted: #4a5f5a;
  --ink-faint: #6b7f79;
  --border: #d5e0dc;
  --border-strong: #b8cbc4;
  --brand: #0d7377;
  --brand-dark: #095456;
  --brand-soft: #e6f4f4;
  --accent: #2d9f6f;
  --accent-soft: #e8f6ef;
  --warn: #b45309;
  --warn-soft: #fff7ed;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --star: #e6a817;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(26, 43, 40, 0.06), 0 4px 16px rgba(26, 43, 40, 0.06);
  --shadow-lg: 0 8px 28px rgba(26, 43, 40, 0.1);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Source Serif 4", Georgia, serif;
  --max: 1100px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.125rem;
}
.logo:hover { color: var(--brand); }
.logo-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--brand), var(--accent));
  color: #fff;
  font-size: 0.95rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  text-decoration: none;
  color: var(--ink-muted);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}
.nav-link:hover,
.nav-link.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}
.nav-mod { font-size: 0.8125rem; color: var(--ink-faint); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.mobile-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
}
.mobile-nav[hidden] { display: none; }

@media (max-width: 720px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
}

.demo-banner {
  background: var(--warn-soft);
  color: #7c3d0a;
  font-size: 0.875rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f5d9b5;
}
.demo-banner strong { font-weight: 600; }

main.container {
  flex: 1;
  padding-block: 1.75rem 3rem;
}

/* Hero / search */
.hero {
  text-align: center;
  padding: 1.5rem 0 2rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.hero p.lead {
  margin: 0 auto 1.75rem;
  max-width: 36rem;
  color: var(--ink-muted);
  font-size: 1.0625rem;
}

.search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  text-align: left;
  max-width: 40rem;
  margin-inline: auto;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}
@media (max-width: 520px) {
  .search-row { grid-template-columns: 1fr; }
}

.field { margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: 0.8125rem; color: var(--ink-faint); margin-top: 0.35rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.filter-chip {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}
.filter-chip:hover { border-color: var(--brand); color: var(--brand); }
.filter-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.filter-chip:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Buttons */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.15rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--surface-2); }
.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #fecaca;
}
.btn-danger:hover { background: #fee2e2; }
.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  padding-inline: 0.75rem;
}
.btn-ghost:hover { color: var(--brand); background: var(--brand-soft); }
.btn-sm { font-size: 0.8125rem; padding: 0.4rem 0.75rem; }
.btn-block { width: 100%; }

/* Sections */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0 1rem;
}
.section-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}
.section-head .meta { color: var(--ink-faint); font-size: 0.875rem; }

/* Cards / results */
.card-grid {
  display: grid;
  gap: 0.85rem;
}
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.profile-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
  color: inherit;
}
.profile-card .name {
  font-weight: 700;
  font-size: 1.0625rem;
  margin: 0 0 0.2rem;
}
.profile-card .meta-line {
  color: var(--ink-muted);
  font-size: 0.875rem;
  margin: 0;
}
.profile-card .traits-preview {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}
.rating-block {
  text-align: right;
  align-self: start;
}
.rating-num {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1;
}
.rating-count {
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-top: 0.2rem;
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--ink-muted);
}
.empty-state p { margin: 0 0 1rem; }

/* Type badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  vertical-align: middle;
}
.badge-renter { background: #e0f2fe; color: #0369a1; }
.badge-roommate { background: #f3e8ff; color: #7e22ce; }
.badge-landlord { background: #fef3c7; color: #a16207; }
.badge-verified {
  background: var(--accent-soft);
  color: #166534;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
  font-weight: 600;
  gap: 0.25rem;
}
.badge-flagged {
  background: var(--danger-soft);
  color: var(--danger);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
}
.badge-hidden {
  background: #f1f5f9;
  color: #475569;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
}
.badge-sample {
  background: var(--surface-2);
  color: var(--ink-faint);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 0.75rem;
}

/* Stars */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--star);
  letter-spacing: 0;
  line-height: 1;
}
.stars .empty { color: #d1d9d6; }
.stars-lg { font-size: 1.25rem; }
.stars-sm { font-size: 0.9rem; }

.stars .star-half {
  position: relative;
  display: inline-block;
  color: #d1d9d6;
}
.stars .star-half::before {
  content: "★";
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: var(--star);
}


.star-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.star-picker button {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--ink-muted);
}
.star-picker button:hover,
.star-picker button.selected {
  border-color: var(--star);
  background: #fffbeb;
  color: #92400e;
  font-weight: 600;
}
.star-picker .rating-label {
  margin-left: 0.5rem;
  font-weight: 600;
  color: var(--ink);
}

/* Traits */
.trait {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.trait-pos {
  background: var(--accent-soft);
  color: #166534;
  border-color: #bbf7d0;
}
.trait-neg {
  background: var(--danger-soft);
  color: #991b1b;
  border-color: #fecaca;
}

.trait-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.trait-picker label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-muted);
  user-select: none;
}
.trait-picker label:has(input:checked).pos,
.trait-picker label.pos:has(input:checked) {
  background: var(--accent-soft);
  border-color: #86efac;
  color: #166534;
}
.trait-picker label:has(input:checked).neg,
.trait-picker label.neg:has(input:checked) {
  background: var(--danger-soft);
  border-color: #fca5a5;
  color: #991b1b;
}
.trait-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
/* Fallback for browsers without :has */
.trait-picker label.selected.pos {
  background: var(--accent-soft);
  border-color: #86efac;
  color: #166534;
}
.trait-picker label.selected.neg {
  background: var(--danger-soft);
  border-color: #fca5a5;
  color: #991b1b;
}

.trait-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-bottom: 0.65rem;
}
.trait-legend span::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.trait-legend .pos::before { background: var(--accent); }
.trait-legend .neg::before { background: var(--danger); }

/* Profile page */
.profile-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.profile-hero .top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
}
.profile-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0.35rem 0 0.4rem;
}
.profile-hero .loc {
  color: var(--ink-muted);
  margin: 0;
  font-size: 0.9375rem;
}
.big-rating {
  text-align: center;
  min-width: 7rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.big-rating .num {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
}
.big-rating .stars { margin: 0.35rem 0; display: flex; justify-content: center; }
.big-rating .count { font-size: 0.8125rem; color: var(--ink-faint); }

.popular-traits {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}
.popular-traits h3 {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.popular-traits .list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.trait-agg {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.trait-agg .count {
  font-size: 0.6875rem;
  font-weight: 700;
  opacity: 0.75;
}

/* Reviews */
.review-list {
  display: grid;
  gap: 0.85rem;
}
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
}
.review-card.hidden-review {
  opacity: 0.65;
  border-style: dashed;
}
.review-card.flagged-review {
  border-color: #fca5a5;
}
.review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.review-author {
  font-weight: 600;
  font-size: 0.9375rem;
}
.review-date {
  font-size: 0.8125rem;
  color: var(--ink-faint);
}
.review-body {
  margin: 0.65rem 0;
  color: var(--ink);
  white-space: pre-wrap;
}
.review-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

/* Forms */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  max-width: 40rem;
  margin-inline: auto;
}
.form-card h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin: 0 0 0.35rem;
}
.form-card .intro {
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 560px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 1rem 0;
  font-size: 0.9375rem;
}
.check-row input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--brand);
  flex-shrink: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.step-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  padding: 1.15rem;
  margin-top: 1rem;
}
.step-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
}
.step-panel p { margin: 0 0 0.85rem; font-size: 0.9375rem; color: var(--ink-muted); }
.demo-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  background: var(--surface);
  border: 1px dashed var(--brand);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--brand-dark);
}

.callout {
  background: var(--warn-soft);
  border: 1px solid #f5d9b5;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  color: #7c3d0a;
  margin: 1rem 0;
}
.callout strong { font-weight: 600; }

.guidelines-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  max-width: 40rem;
  margin-inline: auto;
}
.guidelines-card h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin: 0 0 0.75rem;
}
.guidelines-card h2 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.5rem;
}
.guidelines-card ul {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
  color: var(--ink-muted);
}
.guidelines-card li { margin-bottom: 0.4rem; }

/* Moderation */
.mod-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.mod-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.stat-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
}
.stat-pill strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--brand); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Toast */
.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-width: min(90vw, 28rem);
  text-align: center;
}
.toast[hidden] { display: none; }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: auto;
}
.footer-inner p {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}
.footer-meta { font-size: 0.8125rem !important; color: var(--ink-faint) !important; }

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.mt-0 { margin-top: 0; }
.text-muted { color: var(--ink-muted); }


/* Photos & ads */
.page-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .page-with-sidebar {
    grid-template-columns: 1fr;
  }
  .page-sidebar {
    order: 3;
  }
}

.page-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  display: grid;
  gap: 0.85rem;
}
@media (max-width: 860px) {
  .page-sidebar { position: static; }
}

.ad-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}
.ad-card.ad-inline {
  margin: 1rem 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
}
@media (max-width: 560px) {
  .ad-card.ad-inline {
    grid-template-columns: 1fr;
    text-align: left;
  }
}
.ad-label {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  margin-bottom: 0.45rem;
}
.ad-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.ad-icon.carpet { background: #e0f2fe; }
.ad-icon.house { background: #e8f6ef; }
.ad-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
}
.ad-card p {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.45;
}
.ad-card .btn { font-size: 0.8125rem; padding: 0.45rem 0.85rem; }
.ad-card.ad-sidebar .btn { width: 100%; }

.photo-field .photo-drop {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  background: var(--surface-2);
}
.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.photo-thumb-wrap {
  position: relative;
  width: 72px;
  height: 72px;
}
.photo-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}
.photo-thumb-wrap .photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.photo-thumb-wrap .photo-remove:hover { background: var(--danger); }

.review-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0 0.85rem;
}
.review-photos button {
  appearance: none;
  border: 1px solid var(--border);
  padding: 0;
  background: none;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  width: 88px;
  height: 66px;
}
.review-photos button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.review-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 20, 18, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(92vw, 960px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,0.28); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-caption {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  margin: 0;
}
