:root {
  --gold: #c9912f;
  --gold-strong: #9f711f;
  --gold-soft: #fff3dc;
  --ink: #151412;
  --text: #302d29;
  --muted: #777069;
  --line: #ebe4d8;
  --paper: #ffffff;
  --surface: #f8f6f1;
  --surface-2: #f0ece4;
  --success: #3fa96d;
  --button-text: #ffffff;
  --danger-soft: #fff5e7;
  --radius: 24px;
  --radius-sm: 17px;
  --shadow: 0 22px 55px rgba(34, 28, 18, 0.16);
  --shadow-soft: 0 12px 30px rgba(35, 29, 19, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% -6%, rgba(201, 145, 47, 0.16), transparent 24rem),
    linear-gradient(180deg, #fffdf9 0%, var(--surface) 40%, #fff 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 14px 30px;
}

.screen {
  display: none;
  animation: screenIn 180ms ease-out;
}

.screen.is-active {
  display: block;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 10px;
  padding: 6px 0;
  backdrop-filter: blur(14px);
}

.mini-brand,
.topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.mini-logo {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: var(--ink);
  color: white;
  font-size: 0.72rem;
}

.topbar-pill {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.hero {
  position: relative;
  min-height: 365px;
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 30px;
  background: #201a13;
  box-shadow: var(--shadow);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 10, 8, 0.10), rgba(12, 10, 8, 0.82)),
    linear-gradient(135deg, #211915, #6a4b1d);
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 365px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  color: white;
}

.brand-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 12px;
}

.logo {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  font-weight: 950;
  backdrop-filter: blur(10px);
}

.logo img,
.mini-logo img,
.avatar img,
.profile-photo img,
.gallery img,
.summary-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 740px;
  margin-bottom: 10px;
  color: white;
  font-size: clamp(2.05rem, 10vw, 4.7rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 1.44rem;
  line-height: 1.1;
}

h3 {
  color: var(--ink);
  font-size: 1.03rem;
}

.hero-copy {
  max-width: 640px;
  margin-bottom: 19px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 950;
}

.primary-button {
  width: 100%;
  background: linear-gradient(180deg, #d8a645, var(--gold));
  color: var(--button-text);
  box-shadow: 0 16px 30px rgba(201, 145, 47, 0.30);
}

.secondary-button {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.ghost-button {
  min-height: 42px;
  background: transparent;
  color: var(--ink);
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.barber-card:active,
.service-card:active,
.date-button:active,
.slot-button:active,
.choice-card:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.back-button {
  width: auto;
  margin: 4px 0 10px;
  padding: 0 4px;
  color: var(--muted);
}

.section {
  padding: 9px 0 18px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.section-title h2 {
  margin-bottom: 0;
}

.section-title span {
  color: var(--muted);
  font-size: 0.9rem;
}

.compact {
  display: block;
  padding-top: 4px;
}

.business-panel {
  display: grid;
  gap: 11px;
  margin-bottom: 12px;
}

.info-card,
.booking-choice,
.barber-card,
.service-card,
.summary-card,
.form-card,
.profile-card,
.success-card,
.empty-state,
.slot-panel {
  border: 1px solid rgba(235, 228, 216, 0.94);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.info-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.location-card {
  grid-template-columns: auto 1fr auto;
}

.info-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 15px;
  background: var(--gold-soft);
  font-size: 1.05rem;
}

.info-card strong {
  display: block;
  color: var(--ink);
  line-height: 1.25;
}

.info-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.small-action {
  min-width: max-content;
  border-radius: 999px;
  background: #f4efe7;
  color: var(--gold-strong);
  padding: 9px 11px;
  font-size: 0.78rem;
  font-weight: 950;
}

.small-action[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.highlight-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.highlight-pill,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 0 13px;
  font-size: 0.84rem;
  font-weight: 900;
}

.highlight-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.booking-choice {
  padding: 16px;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-card {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffdfa;
  padding: 15px 15px 15px 44px;
  cursor: pointer;
}

.choice-card input {
  position: absolute;
  left: 15px;
  top: 18px;
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.choice-card span {
  color: var(--ink);
  font-weight: 950;
}

.choice-card small {
  color: var(--muted);
  line-height: 1.35;
}

.choice-card.is-selected {
  border-color: var(--gold);
  background: #fff8ea;
  box-shadow: 0 0 0 3px rgba(201, 145, 47, 0.13);
}

.choice-card.is-disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 4px 0 18px;
}

.stepper span {
  height: 5px;
  border-radius: 999px;
  background: #e4ded3;
}

.stepper .is-active,
.stepper .is-done {
  background: var(--gold);
}

.barber-grid,
.list-stack {
  display: grid;
  gap: 13px;
}

.barber-card,
.service-card {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 104px 1fr;
  gap: 15px;
  padding: 14px;
  text-align: left;
}

.barber-card-body {
  min-width: 0;
}

.avatar {
  display: grid;
  width: 104px;
  height: 118px;
  place-items: center;
  overflow: hidden;
  border-radius: 21px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(135deg, #25211e, #c9932f);
  color: white;
  font-weight: 950;
}

.card-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-weight: 950;
}

.card-specialty {
  margin: 0 0 6px;
  color: var(--gold-strong);
  font-size: 0.8rem;
  font-weight: 950;
}

.card-copy,
.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.38;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.rating-pill,
.next-pill,
.service-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--gold-soft);
  color: #7d5518;
  font-size: 0.76rem;
  font-weight: 950;
}

.next-pill {
  background: #f2f0eb;
  color: var(--muted);
}

.card-cta {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-top: 13px;
  color: var(--gold-strong);
  font-size: 0.82rem;
  font-weight: 950;
}

.barber-card.is-selected,
.service-card.is-selected,
.date-button.is-selected,
.slot-button.is-selected {
  border-color: var(--gold);
  background: #fffaf0;
  box-shadow: 0 0 0 3px rgba(201, 145, 47, 0.14), var(--shadow-soft);
}

.service-card {
  grid-template-columns: 1fr;
  min-height: 138px;
  padding: 17px;
}

.service-card .meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.price {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 950;
}

.profile-card,
.success-card,
.empty-state {
  padding: 14px;
}

.profile-photo {
  display: grid;
  aspect-ratio: 4 / 3.35;
  place-items: center;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.18), transparent 38%),
    linear-gradient(135deg, #25211e, #c9932f);
  color: white;
  font-size: 2.8rem;
  font-weight: 950;
}

.profile-body {
  padding-top: 16px;
}

.profile-body p:not(.eyebrow):not(.notice) {
  color: var(--muted);
  line-height: 1.58;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.stats-grid span {
  display: grid;
  gap: 3px;
  min-height: 72px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdfa;
}

.stats-grid strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.stats-grid small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.notice {
  border-radius: 17px;
  background: var(--danger-soft);
  color: #77551c;
  padding: 12px 13px;
  line-height: 1.42;
}

.form-error {
  border-radius: 17px;
  background: #fdecec;
  color: #b3261e;
  padding: 12px 13px;
  line-height: 1.42;
  font-weight: 700;
  margin: 0 0 4px;
}

.work-summary {
  display: grid;
  gap: 3px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fffdfa;
  padding: 13px;
}

.work-summary span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.work-summary strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.gallery-wrap {
  margin: 16px 0;
}

.gallery {
  display: grid;
  grid-auto-columns: 134px;
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 20px;
  background: #ddd4c5;
}

.sticky-action {
  position: sticky;
  bottom: max(12px, env(safe-area-inset-bottom));
  margin-top: 16px;
}

.date-strip {
  display: grid;
  grid-auto-columns: 82px;
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  padding: 5px 0 14px;
  scrollbar-width: none;
}

.date-strip::-webkit-scrollbar,
.gallery::-webkit-scrollbar {
  display: none;
}

.date-button,
.slot-button {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-weight: 950;
}

.date-button {
  color: var(--muted);
  text-transform: capitalize;
}

.date-button strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.25rem;
}

.date-button.is-selected strong,
.date-button.is-selected span,
.slot-button.is-selected {
  color: var(--gold-strong);
}

.slot-panel {
  padding: 16px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.slot-button {
  min-height: 58px;
}

.summary-card,
.form-card {
  margin-bottom: 13px;
  padding: 15px;
}

.summary-person {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.summary-person strong,
.summary-person small {
  display: block;
}

.summary-person strong {
  color: var(--ink);
  font-weight: 950;
}

.summary-person small {
  margin-top: 3px;
  color: var(--muted);
}

.summary-avatar {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #25211e, #c9932f);
  color: white;
  font-weight: 950;
}

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

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row span:first-child {
  color: var(--muted);
}

.summary-row span:last-child {
  text-align: right;
  color: var(--ink);
  font-weight: 950;
}

.preview-client span:last-child {
  color: var(--muted);
  font-weight: 850;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fffdfa;
  color: var(--ink);
  padding: 15px 13px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 145, 47, 0.13);
}

.success-card {
  margin-top: 16px;
  text-align: center;
}

.success-icon {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  margin: 12px auto 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, #54c484, var(--success));
  color: white;
  font-size: 2.5rem;
  font-weight: 950;
  box-shadow: 0 18px 34px rgba(60, 166, 107, 0.28);
}

.empty-state {
  margin-top: 20px;
  text-align: center;
}

@media (min-width: 680px) {
  .app-shell {
    padding-inline: 24px;
  }

  .hero,
  .hero-content {
    min-height: 430px;
  }

  .hero-content {
    padding: 34px;
  }

  .primary-button,
  .secondary-button {
    width: auto;
    min-width: 218px;
    padding-inline: 24px;
  }

  .business-panel {
    grid-template-columns: 1.4fr 0.9fr;
  }

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

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

  .profile-card {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 22px;
    padding: 18px;
  }

  .profile-body {
    padding-top: 0;
  }

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

@media (min-width: 980px) {
  .app-shell {
    padding-top: 18px;
  }

  .hero,
  .hero-content {
    min-height: 455px;
  }

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

  .screen:not(#screen-home) {
    width: min(100%, 790px);
    margin: 0 auto;
  }
}
