:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --text: #111114;
  --muted: #6e6e73;
  --surface: #ffffff;
  --surface-2: #f0f0f3;
  --line: rgba(17, 17, 20, 0.1);
  --accent: #0a84ff;
  --danger: #ff3b30;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  --header: rgba(245, 245, 247, 0.78);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --text: #f5f5f7;
    --muted: #98989d;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --line: rgba(255, 255, 255, 0.11);
    --shadow: none;
    --header: rgba(0, 0, 0, 0.72);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

html {
  scroll-behavior: smooth;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: min(1180px, calc(100% - 24px));
  min-height: 64px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  background: linear-gradient(180deg, var(--header), transparent);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.brand {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.location-chip,
.link-action {
  min-height: 38px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-weight: 650;
}

.link-action {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  text-decoration: none;
}

.location-chip {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.location-dot,
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #30d158;
  box-shadow: 0 0 0 4px rgba(48, 209, 88, 0.12);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 56px;
}

.hero,
.section-title,
.session-line,
.actions,
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero {
  margin-bottom: 18px;
}

.marketplace-hero {
  min-height: clamp(500px, 70vh, 680px);
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  padding: clamp(44px, 9vw, 92px) 0 clamp(28px, 6vw, 54px);
}

.hero-content {
  align-self: center;
  display: grid;
  gap: 22px;
  max-width: 760px;
}

.hero-copy {
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.32;
  max-width: 640px;
}

.hero-surface {
  align-self: center;
  display: grid;
  gap: 12px;
  justify-items: end;
  min-width: 220px;
}

.surface-card {
  min-width: 160px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: var(--shadow);
}

.surface-card-large {
  min-width: 220px;
  min-height: 180px;
  display: grid;
  align-content: end;
}

.surface-card span,
.surface-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.surface-card strong {
  display: block;
  font-size: 42px;
  letter-spacing: -0.05em;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(46px, 9vw, 92px);
  letter-spacing: -0.055em;
  line-height: 0.94;
}

h2 {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.caption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 16px 0;
}

.search-bar {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-submit {
  min-width: 108px;
  min-height: 50px;
  padding: 0 22px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.search-field {
  gap: 4px;
  min-width: 0;
  padding-left: 12px;
}

.search-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.search-field input {
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-size: 17px;
}

.search-bar:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow);
}

.search-field input:focus {
  outline: none;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.inline-radius {
  width: 54px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hidden-location-fields {
  display: none;
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid {
  display: grid;
  gap: 12px;
}

.form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

label,
legend {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.inline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--text);
  font-size: 14px;
}

.inline input {
  width: auto;
  min-height: 0;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
}

input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  margin-right: 10px;
  padding: 7px 10px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 0;
  padding: 12px;
}

button {
  border: 0;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 18px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

a.button {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  min-height: 42px;
  padding: 0 18px;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
}

button.secondary {
  background: var(--surface-2);
  color: var(--accent);
}

a.button.secondary {
  background: var(--surface-2);
  color: var(--accent);
}

.compact-action {
  justify-self: start;
  margin-top: 4px;
}

button.ghost {
  background: transparent;
  color: var(--muted);
  padding: 0;
}

button.danger {
  background: transparent;
  color: var(--danger);
}

.auth-panel {
  margin-bottom: 22px;
}

.session-line {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

#categoryList.checks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 650;
}

.pill {
  background: var(--surface-2);
  color: var(--text);
}

.category-card {
  width: 100%;
  min-height: 112px;
  border-radius: 22px;
  background: var(--surface-2);
  color: var(--text);
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 10px;
  padding: 16px;
  text-align: left;
}

.category-card .category-icon {
  font-size: 24px;
  line-height: 1;
}

.category-card strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.category-card span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.check input {
  width: auto;
  min-height: 0;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.item strong {
  font-size: 16px;
}

.meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.tenant-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--surface-2);
}

.tenant-card {
  overflow: hidden;
}

.tenant-card .row {
  align-items: flex-end;
}

.salon-card-meta,
.next-slot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.next-slot {
  color: #30d158;
  font-size: 12px;
  font-weight: 800;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.portal-link {
  color: inherit;
  display: block;
  min-height: 190px;
  text-decoration: none;
}

.portal-link h2 {
  font-size: 34px;
  margin-bottom: 12px;
}

.status {
  color: var(--muted);
  min-height: 22px;
  padding: 6px 2px;
}

.hidden {
  display: none !important;
}

.minimal-header {
  background: var(--header);
  border-bottom: 1px solid var(--line);
}

.onboarding-shell {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(34px, 7vw, 72px) 0 56px;
}

.onboarding-intro {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.onboarding-intro h1 {
  max-width: 760px;
  font-size: clamp(42px, 8vw, 78px);
}

.partner-onboarding-page {
  display: grid;
  gap: 16px;
}

.step-progress {
  color: var(--muted);
  display: grid;
  gap: 10px;
  font-size: 13px;
  font-weight: 750;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.step-container {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
}

.onboarding-step {
  display: none;
  gap: 16px;
  opacity: 0;
  transform: translateY(8px);
}

.onboarding-step.active {
  display: grid;
  opacity: 1;
  transform: translateY(0);
  animation: stepIn 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.primary-action-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.primary-action-bar button {
  min-width: 132px;
}

.summary-list {
  display: grid;
  gap: 10px;
}

.summary-row {
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.summary-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.summary-row strong {
  text-align: right;
}

@media (max-width: 860px) {
  .site-header {
    width: min(100% - 20px, 1180px);
    grid-template-columns: auto 1fr;
  }

  .location-chip {
    justify-self: end;
    max-width: 160px;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-bottom: 4px;
  }

  .header-actions .button,
  .header-actions .link-action {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .columns,
  .form-grid,
  .compact-grid,
  .portal-grid,
  .two {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

  .hero,
  .section-title,
  .row {
    align-items: flex-start;
  }

  .marketplace-hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-surface {
    display: none;
  }

  .search-bar {
    grid-template-columns: 1fr;
    border-radius: 24px;
    padding: 10px;
  }

  .search-field {
    padding: 4px 6px 0;
  }

  .search-submit {
    width: 100%;
  }

  #categoryList.checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .primary-action-bar {
    position: sticky;
    bottom: 12px;
    z-index: 12;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow);
    padding: 8px;
  }

  .primary-action-bar button {
    min-width: 0;
    flex: 1;
  }

  .booking-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    max-height: 82vh;
    overflow: auto;
    margin: 0;
    padding: 22px 18px 28px;
    border-radius: 28px 28px 0 0;
    border-bottom: 0;
    box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.28);
  }

  .sheet-close {
    display: inline-grid;
    place-items: center;
    position: absolute;
    right: 16px;
    top: 12px;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 24px;
  }
}

@media (min-width: 861px) {
  .sheet-close {
    display: none;
  }
}
