:root {
  color-scheme: light;
  --bg: #f4efe7;
  --surface: rgba(255, 252, 247, 0.92);
  --surface-strong: #fffdf9;
  --line: rgba(72, 50, 34, 0.16);
  --ink: #21150d;
  --ink-soft: rgba(33, 21, 13, 0.68);
  --accent: #d65b2f;
  --shadow: 0 20px 48px rgba(59, 31, 10, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(244, 201, 142, 0.42), transparent 34%),
    linear-gradient(180deg, #f7f1e8 0%, var(--bg) 100%);
  color: var(--ink);
}

body {
  min-height: 100vh;
}

body.login-modal-open {
  overflow: hidden;
}

body.delete-modal-open {
  overflow: hidden;
}

.home-shell {
  width: min(1480px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.home-brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-auth-light {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d64545;
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.16);
}

.home-auth-light.is-logged-in {
  background: #34b25f;
  box-shadow: 0 0 0 3px rgba(52, 178, 95, 0.16);
}

.home-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.home-login:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(72, 50, 34, 0.22);
}

.home-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.home-tab[hidden] {
  display: none !important;
}

.home-tab:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(72, 50, 34, 0.22);
}

.home-tab[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.home-panel {
  min-height: 72vh;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-strong) 0%, var(--surface) 100%);
  box-shadow: var(--shadow);
}

.home-panel__inner {
  min-height: 72vh;
}

.dashboard-shell {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 24px;
}

.listing-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

.listing-row {
  width: 100%;
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 14px 34px rgba(59, 31, 10, 0.08);
}

.listing-row__image-link {
  display: block;
  width: 100%;
  text-decoration: none;
}

.listing-row__image {
  width: 100%;
  height: 154px;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(214, 201, 183, 0.46);
  border: 1px solid rgba(72, 50, 34, 0.08);
}

.listing-row__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.listing-row__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.listing-row__actions {
  margin-left: auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.listing-row__topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.listing-row__id,
.listing-row__date {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(72, 50, 34, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.listing-row__address {
  margin: 0;
  font-size: clamp(1.5rem, 2.1vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.listing-row__linkline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: -2px;
}

.listing-row__link {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.listing-row__link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.listing-row__edit-builder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(72, 50, 34, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.listing-row__edit-builder:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(72, 50, 34, 0.24);
}

.listing-row__delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(214, 91, 47, 0.26);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(214, 91, 47, 0.18), rgba(214, 91, 47, 0.08));
  color: #a34825;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.listing-row__delete:hover {
  background: linear-gradient(180deg, rgba(214, 91, 47, 0.24), rgba(214, 91, 47, 0.12));
  border-color: rgba(214, 91, 47, 0.34);
  color: #8f3e1e;
}

.listing-row__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(72, 50, 34, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.listing-row__copy:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(72, 50, 34, 0.24);
}

.listing-row__copy.is-copied {
  border-color: rgba(52, 178, 95, 0.22);
  background: rgba(52, 178, 95, 0.12);
  color: #1f7a42;
}

.listing-row__details {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.listing-row__detail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(72, 50, 34, 0.12);
  background: rgba(255, 255, 255, 0.84);
}

.listing-row__detail-label {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.listing-row__detail-value {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
}

.listing-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.listing-status--active {
  border: 1px solid rgba(52, 178, 95, 0.2);
  background: rgba(52, 178, 95, 0.12);
  color: #1f7a42;
}

.listing-status--building {
  border: 1px solid rgba(214, 91, 47, 0.24);
  background: rgba(214, 91, 47, 0.12);
  color: #a34825;
}

.listing-status--offline {
  border: 1px solid rgba(72, 50, 34, 0.18);
  background: rgba(72, 50, 34, 0.1);
  color: rgba(33, 21, 13, 0.76);
}

.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.dashboard-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.dashboard-tab:hover {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(72, 50, 34, 0.22);
}

.dashboard-tab[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.dashboard-tab--action {
  margin-left: auto;
  border-color: rgba(214, 91, 47, 0.24);
  background: linear-gradient(180deg, rgba(214, 91, 47, 0.18), rgba(214, 91, 47, 0.08));
  box-shadow: 0 10px 22px rgba(214, 91, 47, 0.1);
}

.dashboard-tab--action:hover {
  background: linear-gradient(180deg, rgba(214, 91, 47, 0.22), rgba(214, 91, 47, 0.1));
  border-color: rgba(214, 91, 47, 0.3);
}

.home-panel--photographer {
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-panel__inner--photographer {
  min-height: 0;
}

.login-modal[hidden] {
  display: none;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(33, 21, 13, 0.42);
  backdrop-filter: blur(8px);
}

.login-modal__dialog {
  position: relative;
  width: min(520px, 100%);
  height: min(680px, calc(100vh - 40px));
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, var(--surface-strong) 0%, var(--surface) 100%);
  box-shadow: 0 24px 60px rgba(59, 31, 10, 0.22);
  overflow: hidden;
}

.login-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  z-index: 2;
}

.login-modal__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(33, 21, 13, 0.42);
  backdrop-filter: blur(8px);
}

.confirm-modal__dialog {
  position: relative;
  width: min(540px, 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, var(--surface-strong) 0%, var(--surface) 100%);
  box-shadow: 0 24px 60px rgba(59, 31, 10, 0.22);
}

.confirm-modal__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 34px 30px 28px;
}

.confirm-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.confirm-modal__eyebrow {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.confirm-modal__title {
  margin: 0;
  max-width: 24ch;
  color: var(--ink);
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.confirm-modal__body {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.confirm-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.confirm-modal__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.confirm-modal__button--secondary {
  border: 1px solid rgba(72, 50, 34, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.confirm-modal__button--secondary:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(72, 50, 34, 0.24);
}

.confirm-modal__button--danger {
  border: 1px solid rgba(214, 91, 47, 0.28);
  background: linear-gradient(180deg, rgba(214, 91, 47, 0.2), rgba(214, 91, 47, 0.1));
  color: #a34825;
}

.confirm-modal__button--danger:hover {
  background: linear-gradient(180deg, rgba(214, 91, 47, 0.26), rgba(214, 91, 47, 0.14));
  border-color: rgba(214, 91, 47, 0.38);
}

.directory-map-body {
  color-scheme: light;
  --panel: rgba(255, 252, 247, 0.92);
  --panel-strong: #fffdf9;
  --panel-border: rgba(72, 50, 34, 0.16);
  --panel-border-strong: rgba(72, 50, 34, 0.22);
  --field: rgba(255, 255, 255, 0.76);
  --text: #21150d;
  --text-muted: rgba(33, 21, 13, 0.68);
  --text-accent: #d65b2f;
  --danger: #b94829;
  min-height: 0;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.directory-map-body .panel {
  border-radius: 28px;
  background: linear-gradient(180deg, var(--panel-strong) 0%, var(--panel) 100%);
  box-shadow: var(--shadow);
}

.directory-map-body .panel-title {
  margin-bottom: 6px;
  color: var(--text-accent);
  font-weight: 600;
}

.directory-map-body .btn {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.directory-map-body .btn:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--panel-border-strong);
}

.directory-map-body .text-input {
  min-width: 220px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  font-size: 0.9rem;
}

.directory-map-body .text-input::placeholder {
  color: rgba(33, 21, 13, 0.52);
}

.directory-map-body .text-input:focus {
  outline: none;
  border-color: rgba(214, 91, 47, 0.48);
  box-shadow: 0 0 0 3px rgba(214, 91, 47, 0.12);
}

.auth-label {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.directory-map-shell {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.directory-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: stretch;
}

.directory-map-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.directory-map-kicker {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.directory-map-title {
  margin: 6px 0 8px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.04;
}

.directory-map-panel {
  height: 720px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.directory-map-canvas {
  flex: 1;
  min-height: 0;
  border: 1px solid rgba(72, 50, 34, 0.14);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(244, 201, 142, 0.38), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #f1e8dc 100%);
}

.directory-map-status {
  min-height: 20px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.directory-map-status.is-error {
  color: var(--danger);
}

.directory-search-panel {
  height: 720px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.directory-search-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.directory-search-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.45;
}

.directory-search-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.directory-search-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.directory-map-body .directory-search-input-row .text-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.directory-map-body .directory-search-input-row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.directory-search-feedback {
  min-height: 20px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.directory-search-feedback.is-error {
  color: var(--danger);
}

.directory-search-results {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.directory-results-empty {
  padding: 16px 14px;
  border: 1px dashed var(--panel-border-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.directory-result-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.directory-result-card:hover {
  border-color: var(--panel-border-strong);
  background: rgba(255, 255, 255, 0.88);
  transform: translateY(-1px);
}

.directory-result-card[data-match="true"] {
  border-color: rgba(214, 91, 47, 0.42);
  background: rgba(255, 247, 241, 0.96);
  box-shadow: 0 14px 30px rgba(214, 91, 47, 0.12);
}

.directory-result-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.directory-result-meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.4;
}

.directory-result-badge {
  align-self: flex-start;
  margin-top: 2px;
  padding: 5px 10px;
  border: 1px solid rgba(214, 91, 47, 0.24);
  border-radius: 999px;
  background: rgba(214, 91, 47, 0.1);
  color: #9a3f21;
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .home-shell {
    width: min(100vw - 16px, 1480px);
    padding-top: 20px;
  }

  .home-header {
    flex-direction: column;
    align-items: stretch;
  }

  .home-brand-row {
    justify-content: space-between;
  }

  .home-tabs {
    width: 100%;
  }

  .home-tab {
    flex: 1 1 calc(50% - 10px);
  }

  .directory-map-layout {
    grid-template-columns: 1fr;
  }

  .listing-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .listing-row__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .listing-row__image {
    height: 220px;
  }

  .directory-map-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-map-panel {
    height: auto;
  }

  .directory-map-canvas {
    width: 100%;
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
    min-height: 0;
  }

  .directory-search-panel {
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .login-modal__dialog {
    width: calc(100vw - 16px);
    margin-top: 12px;
    border-radius: 22px;
  }

  .login-modal__frame {
    height: 620px;
  }

  .directory-search-input-row {
    flex-direction: column;
  }

  .dashboard-shell {
    padding: 18px 16px;
  }

  .dashboard-tab--action {
    margin-left: 0;
  }

  .listing-row {
    padding: 14px;
    border-radius: 20px;
  }

  .listing-row__image {
    height: 180px;
    border-radius: 16px;
  }

  .listing-row__address {
    font-size: 1.28rem;
  }

  .listing-row__linkline {
    align-items: flex-start;
    flex-direction: column;
  }

  .listing-row__details {
    flex-direction: column;
  }

  .listing-row__detail {
    width: 100%;
    justify-content: space-between;
  }
}
