:root {
  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-button: "Montserrat", Inter, Arial, sans-serif;
}

.listing-media {
  position: relative;
  min-height: 420px;
  margin-bottom: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--navy-850);
}
.listing-media img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.listing-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(180deg, rgba(7,19,28,0), rgba(7,19,28,.7));
  pointer-events: none;
}

.listing-share-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(150px, .75fr));
  gap: 1px;
  margin-top: 26px;
  border: 1px solid rgba(214,174,110,.34);
  background: rgba(214,174,110,.34);
}
.listing-share-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border: 0;
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--font-button);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
}
.listing-share-button:hover, .listing-share-button:focus-visible { background: var(--navy-800); }
.listing-share-button.primary { background: var(--gold-400); color: var(--navy-950); }
.listing-share-button.primary:hover, .listing-share-button.primary:focus-visible { background: #e4bf80; }
.listing-share-icon { width: 19px; height: 19px; display: inline-grid; place-items: center; font-size: 18px; }

.share-dialog {
  width: min(1180px, calc(100% - 36px));
  max-width: none;
  max-height: min(900px, calc(100svh - 34px));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(214,174,110,.5);
  border-radius: 8px;
  background: var(--navy-950);
  color: var(--white);
  box-shadow: 0 38px 120px rgba(0,0,0,.48);
}
.share-dialog::backdrop { background: rgba(2,8,12,.78); backdrop-filter: blur(8px); }
.share-dialog[open] { animation: share-dialog-in .22s ease-out; }
@keyframes share-dialog-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.share-open { overflow: hidden; }
.share-sheet-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px 18px 28px;
  border-bottom: 1px solid var(--line-light);
}
.share-sheet-head span { display: block; color: var(--gold-400); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.share-sheet-head h2 { margin: 5px 0 0; font: 600 28px/1.1 var(--font-heading); }
.share-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  font-size: 25px;
  cursor: pointer;
}
.share-close:hover, .share-close:focus-visible { border-color: var(--gold-400); color: var(--gold-400); }
.share-format-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-bottom: 1px solid var(--line-light);
  background: var(--line-light);
}
.share-format-tabs button {
  min-height: 58px;
  padding: 10px 12px;
  border: 0;
  background: var(--navy-900);
  color: rgba(255,255,255,.68);
  font: 700 11px/1.25 var(--font-button);
  cursor: pointer;
}
.share-format-tabs button.active { background: var(--navy-800); color: var(--gold-400); box-shadow: inset 0 -2px var(--gold-400); }
.share-dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, .72fr);
  max-height: calc(100svh - 210px);
  overflow: auto;
}
.share-preview-area {
  min-height: 590px;
  display: grid;
  place-items: center;
  padding: 28px;
  border-right: 1px solid var(--line-light);
  background: #040b10;
}
.share-preview-shell {
  height: min(58svh, 590px);
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(214,174,110,.45);
  background: var(--navy-900);
  box-shadow: 0 22px 70px rgba(0,0,0,.38);
}
.share-preview-shell[data-format="portrait"] { aspect-ratio: 4 / 5; }
.share-preview-shell[data-format="square"] { aspect-ratio: 1; }
.share-preview-shell[data-format="og"] { width: min(100%, 690px); height: auto; aspect-ratio: 40 / 21; }
.share-preview-shell canvas { width: 100%; height: 100%; object-fit: contain; }
.share-tools { padding: 28px; }
.share-status {
  min-height: 42px;
  display: flex;
  align-items: center;
  margin: 0 0 22px;
  padding: 10px 12px;
  border-left: 2px solid var(--gold-400);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.72);
  font-size: 12px;
}
.share-status[data-state="ready"] { color: #b6e8c9; border-color: #69d69a; }
.share-status[data-state="error"] { color: #ffd0cc; border-color: #e9776b; }
.share-tools h3 { margin: 24px 0 12px; font: 600 19px/1.2 var(--font-heading); }
.share-command-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-command,
.social-target {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line-light);
  border-radius: 4px;
  background: transparent;
  color: var(--white);
  font: 700 11px/1.2 var(--font-button);
  cursor: pointer;
}
.share-command.primary { grid-column: 1 / -1; background: var(--gold-400); color: var(--navy-950); border-color: var(--gold-400); }
.share-command:hover, .social-target:hover { border-color: var(--gold-400); color: var(--gold-400); }
.share-command.primary:hover { background: #e4bf80; color: var(--navy-950); }
.social-targets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-note { margin: 22px 0 0; color: rgba(255,255,255,.52); font-size: 11px; line-height: 1.6; }

.admin-subsection {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.admin-subsection h4 { margin: 0 0 14px; font: 600 20px/1.2 var(--font-heading); }
.admin-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.admin-checks label {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--sand-50);
  font-size: 12px;
  font-weight: 700;
}
.admin-checks input { width: 18px; height: 18px; margin: 0; accent-color: var(--gold-500); }
.admin-preview-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.admin-help { color: var(--muted); font-size: 12px; }

@media (max-width: 980px) {
  .listing-share-bar { grid-template-columns: 1fr 1fr; }
  .share-dialog-body { grid-template-columns: 1fr; }
  .share-preview-area { min-height: 520px; border-right: 0; border-bottom: 1px solid var(--line-light); }
  .share-preview-shell { height: min(54svh, 520px); }
}

@media (max-width: 680px) {
  .listing-media, .listing-media img { min-height: 280px; }
  .listing-share-bar { grid-template-columns: 1fr; }
  .listing-share-button { min-height: 56px; justify-content: flex-start; padding-inline: 18px; }
  .share-dialog {
    width: 100%;
    max-height: 94svh;
    margin: auto 0 0;
    border-width: 1px 0 0;
    border-radius: 12px 12px 0 0;
  }
  .share-sheet-head { min-height: 68px; padding: 14px 16px 14px 20px; }
  .share-sheet-head h2 { font-size: 24px; }
  .share-format-tabs { grid-template-columns: 1fr 1fr; }
  .share-format-tabs button { min-height: 50px; }
  .share-dialog-body { max-height: calc(94svh - 170px); }
  .share-preview-area { min-height: 420px; padding: 18px; }
  .share-preview-shell { height: min(49svh, 440px); }
  .share-tools { padding: 20px; }
  .admin-checks { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .share-dialog[open] { animation: none; }
}

.admin-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.admin-editor-head h3 { margin: 0; }
.admin-media-thumb {
  width: min(100%, 440px);
  aspect-ratio: 16 / 9;
  display: block;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  object-fit: cover;
  object-position: center;
}
.admin-media-thumb.portrait { width: 180px; aspect-ratio: 4 / 5; }
.admin-form input[type="number"] { appearance: textfield; }

@media (max-width: 680px) {
  .admin-editor-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .admin-media-thumb { width: 100%; }
}