:root {
  --bg: #030303;
  --panel: #0c0c0c;
  --panel-2: #141414;
  --line: rgba(255, 255, 255, .16);
  --muted: #9b9b9b;
  --text: #f7f7f7;
  --red: #ed1717;
  --red-2: #b30d0d;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .55);
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -8%, rgba(237, 23, 23, .16), transparent 32%),
    linear-gradient(180deg, #2a2a2a 0, #090909 24%, #020202 100%);
  overflow: hidden;
}
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }

.app-shell {
  width: min(390px, 100vw);
  height: 100dvh;
  margin: 0 auto;
  position: relative;
  background:
    linear-gradient(160deg, rgba(80,0,0,.16), transparent 36%),
    #030303;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, transparent 0 72%, rgba(237, 23, 23, .20) 72% 74.5%, transparent 74.5%),
    radial-gradient(circle at 100% 15%, rgba(237, 23, 23, .08), transparent 30%);
  opacity: .85;
}
.app-shell::after {
  content: "";
  position: absolute;
  left: 22px; right: 22px; bottom: 14px;
  height: 78px;
  border-radius: 24px;
  pointer-events: none;
  background: rgba(0,0,0,.35);
  filter: blur(18px);
}

.topbar {
  height: 62px;
  padding: max(16px, env(safe-area-inset-top)) 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 6;
}
.top-title {
  position: absolute;
  left: 72px; right: 72px;
  text-align: center;
  pointer-events: none;
}
.eyebrow { display: none; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
  letter-spacing: .02em;
  font-weight: 800;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.pole-btn {
  font-size: 25px;
  filter: drop-shadow(0 0 10px rgba(237,23,23,.25));
}
body.route-home .top-title { display: none; }
body.route-home .menu-btn { font-size: 27px; }
body:not(.route-home) .menu-btn { font-size: 30px; }

.screen {
  position: relative;
  z-index: 2;
  height: calc(100dvh - 150px);
  overflow-y: auto;
  padding: 2px 26px 24px;
  scroll-behavior: smooth;
}
.screen::-webkit-scrollbar { width: 0; }

.bottom-nav {
  position: absolute;
  z-index: 8;
  left: 16px;
  right: 16px;
  bottom: max(10px, env(safe-area-inset-bottom));
  height: 68px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 23px;
  background: rgba(5, 5, 5, .88);
  backdrop-filter: blur(16px);
}
.nav-item {
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #7f7f7f;
  display: grid;
  gap: 4px;
  place-items: center;
}
.nav-item span { font-size: 21px; line-height: 1; }
.nav-item small { font-size: 10px; }
.nav-item.active { color: var(--red); background: rgba(237, 23, 23, .12); }

.hero {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2px 0 14px;
}
.logo {
  width: 168px;
  height: 168px;
  object-fit: contain;
  filter: drop-shadow(0 15px 42px rgba(237, 23, 23, .20));
}
.brand-title {
  font-size: 43px;
  line-height: .92;
  margin: 11px 0 7px;
  font-weight: 950;
  letter-spacing: .015em;
  text-transform: none;
  color: #fff;
  text-shadow: 0 2px 0 #3a3a3a, 0 8px 26px rgba(0,0,0,.75);
  font-stretch: condensed;
}
.subtitle { color: var(--red); margin: 0 0 18px; font-size: 14px; }
.actions { display: grid; gap: 13px; width: 100%; }
.btn {
  width: 100%;
  border: 0;
  min-height: 55px;
  border-radius: 10px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
}
.btn-primary { background: linear-gradient(180deg, #f32626, #c90f0f); box-shadow: 0 15px 30px rgba(237, 23, 23, .23); }
.btn-secondary { background: rgba(255, 255, 255, .015); border: 1px solid var(--line); }
.btn-small { min-height: 40px; border-radius: 12px; font-size: 14px; }
.btn-danger { background: rgba(237, 23, 23, .12); border: 1px solid rgba(237, 23, 23, .42); color: #ff7676; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #858585;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin: 20px 0 12px;
}
.section-title::before, .section-title::after { content: ""; height: 1px; background: rgba(237, 23, 23, .78); flex: 1; }
.card, .slot, .service-card, .field, .summary-card, .calendar-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
  border-radius: var(--radius);
}
.slot {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr auto 18px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 10px;
  color: var(--text);
  text-align: left;
}
.slot b { color: var(--red); font-size: 18px; }
.slot small { color: var(--muted); }
.slot-date {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.slot-date > span {
  font-weight: 700;
}
.slot-date small {
  font-size: 13px;
  white-space: nowrap;
}

.services { display: grid; gap: 14px; }
.service-card {
  width: 100%;
  text-align: left;
  color: var(--text);
  overflow: hidden;
  min-height: 143px;
  display: grid;
  grid-template-columns: 42% 1fr;
  position: relative;
}
.service-card::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 150px; height: 90px; background: radial-gradient(circle, rgba(237,23,23,.27), transparent 65%); }
.service-photo {
  background: linear-gradient(135deg, #262626, #050505);
  position: relative;
  overflow: hidden;
}
.service-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 58%, rgba(0,0,0,.50)),
              radial-gradient(circle at 10% 10%, rgba(237,23,23,.18), transparent 32%);
  pointer-events: none;
}
.service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: grayscale(1) contrast(1.12) brightness(.86);
  transform: scale(1.02);
}
.service-info { padding: 18px 16px; position: relative; z-index: 1; }
.service-info h3 { margin: 0 0 12px; font-size: 22px; line-height: 1.05; text-transform: uppercase; letter-spacing: .02em; }
.meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.price { color: var(--red); font-size: 26px; font-weight: 900; margin-top: 10px; }

.calendar-card { padding: 16px; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; text-align: center; }
.calendar-grid small { color: var(--muted); padding-bottom: 6px; }
.day { height: 36px; border: 0; border-radius: 12px; color: var(--text); background: transparent; }
.day.muted { color: #555; }
.day.weekend { color: #ff3838; }
.day.selected { background: var(--red); color: white; font-weight: 900; }
.times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 14px; }
.time { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 12px; min-height: 47px; }
.time.selected { background: var(--red); border-color: var(--red); font-weight: 900; }
.info-box { padding: 14px; display: flex; gap: 12px; align-items: center; color: var(--muted); }
.info-box strong { color: var(--text); display: block; }
.form { display: grid; gap: 14px; }
.field { padding: 12px 14px; }
.field label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.field input, .field textarea { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 17px; }
.field textarea { resize: vertical; min-height: 72px; }

.input-with-icon {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
}

.input-with-icon .ui-icon {
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,.82);
  opacity: .95;
}

.input-with-icon input {
  min-width: 0;
}
.login-logo { width: 140px; height: 140px; object-fit: contain; display: block; margin: 4px auto 10px; opacity: .96; }
.profile-card { padding: 18px; text-align: center; }
.profile-card h2 { margin-bottom: 4px; }
.profile-card p { color: var(--muted); }
.summary-card { padding: 16px; display: grid; gap: 12px; }
.summary-top { display: grid; grid-template-columns: 86px 1fr; gap: 14px; align-items: center; }
.summary-img { width: 86px; height: 86px; border-radius: 18px; background: #1d1d1d; overflow: hidden; }
.summary-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.12) brightness(.9); }
.summary-row { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); }
.summary-row b { color: var(--red); text-align: right; }
.empty { padding: 32px 10px; text-align: center; color: var(--muted); }
.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 36px));
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(24, 24, 24, .97);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
  pointer-events: none;
}

@media (min-width: 760px) {
  body { display: grid; place-items: center; padding: 12px; }
  .app-shell { height: min(860px, calc(100dvh - 24px)); border: 1px solid rgba(255,255,255,.15); border-radius: 34px; }
}
@media (max-height: 760px) {
  .logo { width: 140px; height: 140px; }
  .brand-title { font-size: 37px; }
  .screen { padding-left: 24px; padding-right: 24px; }
}

/* Icon system: SVG-outline icons instead of text glyphs/emoji, closer to the mockup */
.ui-icon,
.nav-ico svg {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: -0.22em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn .ui-icon { width: 19px; height: 19px; vertical-align: -0.18em; }
.icon-btn .ui-icon { width: 27px; height: 27px; }
.nav-ico { display: grid; place-items: center; height: 24px; }
.nav-item span.nav-ico { font-size: 0; line-height: 0; }
.nav-item svg { color: currentColor; opacity: .96; }
.slot-icon { color: #fff; display: grid; place-items: center; }
.slot-icon .ui-icon { width: 18px; height: 18px; }
.meta .ui-icon { width: 14px; height: 14px; color: #bdbdbd; }
.info-icon { display: grid; place-items: center; color: #ff3838; flex: 0 0 26px; }
.info-icon .ui-icon { width: 23px; height: 23px; }
.booking-chair {
  color: #fff;
  opacity: .96;
}
.booking-chair .ui-icon {
  width: 30px;
  height: 30px;
  stroke-width: 1.75;
}
.summary-row span { display: inline-flex; align-items: center; gap: 9px; }
.summary-row .ui-icon { width: 16px; height: 16px; color: #d8d8d8; }
.barber-pole-icon {
  width: 12px;
  height: 28px;
  border: 1.5px solid #e8e8e8;
  border-radius: 4px;
  background: repeating-linear-gradient(135deg, #fff 0 5px, #ed1717 5px 10px);
  box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 0 12px rgba(237,23,23,.4);
  position: relative;
}
.barber-pole-icon::before,
.barber-pole-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 16px;
  height: 3px;
  border-radius: 3px;
  background: #f2f2f2;
  transform: translateX(-50%);
}
.barber-pole-icon::before { top: -4px; }
.barber-pole-icon::after { bottom: -4px; }
.pole-btn { font-size: 0; }

/* Responsive mobile fix v7
   The previous version was built too much like a fixed phone mockup.
   These rules make it behave as a real PWA on different mobile widths/heights. */
html, body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
}
body {
  overflow-y: auto;
}
.app-shell {
  width: 100%;
  max-width: 430px;
  min-width: 0;
  height: 100svh;
  min-height: 100svh;
  margin-inline: auto;
  border-radius: 0;
}
.topbar {
  height: clamp(52px, 12svh, 66px);
  padding: max(10px, env(safe-area-inset-top)) clamp(16px, 5vw, 24px) 0;
}
.screen {
  height: calc(100svh - clamp(52px, 12svh, 66px) - 86px - env(safe-area-inset-bottom));
  padding: 0 clamp(18px, 5vw, 26px) calc(22px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}
.bottom-nav {
  left: clamp(10px, 4vw, 16px);
  right: clamp(10px, 4vw, 16px);
  bottom: max(8px, env(safe-area-inset-bottom));
  height: clamp(62px, 9svh, 70px);
}
.logo {
  width: clamp(118px, 38vw, 168px);
  height: clamp(118px, 38vw, 168px);
}
.brand-title {
  font-size: clamp(34px, 10.5vw, 43px);
  line-height: .94;
}
.btn {
  min-height: clamp(50px, 7.8svh, 56px);
}
.section-title {
  margin-top: clamp(16px, 3.2svh, 22px);
}
.service-card {
  min-height: clamp(128px, 18svh, 148px);
  grid-template-columns: minmax(126px, 42%) 1fr;
}
.service-info {
  padding: clamp(14px, 4vw, 18px) clamp(12px, 4vw, 16px);
}
.service-info h3 {
  font-size: clamp(19px, 5.6vw, 23px);
}
.price {
  font-size: clamp(22px, 6.4vw, 27px);
}
.calendar-card {
  padding: clamp(12px, 4vw, 16px);
}
.calendar-grid {
  gap: clamp(4px, 1.6vw, 7px);
}
.day {
  height: clamp(30px, 8vw, 36px);
  border-radius: 10px;
}
.times {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 2vw, 8px);
}
.time {
  min-height: clamp(42px, 7svh, 47px);
}
.summary-top {
  grid-template-columns: clamp(72px, 23vw, 86px) 1fr;
}
.summary-img {
  width: clamp(72px, 23vw, 86px);
  height: clamp(72px, 23vw, 86px);
}
.toast {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
}

@media (max-width: 360px) {
  .screen { padding-inline: 14px; }
  .service-card { grid-template-columns: 38% 1fr; }
  .service-info h3 { font-size: 18px; }
  .price { font-size: 21px; }
  .nav-item small { font-size: 9px; }
  .ui-icon, .nav-ico svg { width: 20px; height: 20px; }
  .slot { grid-template-columns: 28px 1fr auto 14px; padding-inline: 12px; }
}

@media (max-height: 700px) {
  .hero { padding-top: 0; }
  .logo { width: clamp(100px, 31vw, 128px); height: clamp(100px, 31vw, 128px); }
  .brand-title { font-size: clamp(30px, 9vw, 37px); margin-top: 6px; }
  .subtitle { margin-bottom: 12px; }
  .actions { gap: 10px; }
  .section-title { margin: 14px 0 9px; }
  .slot { padding-block: 10px; margin-bottom: 8px; }
  .service-card { min-height: 122px; }
  .login-logo { width: 112px; height: 112px; }
}

@media (min-width: 760px) {
  body { display: grid; place-items: center; padding: 12px; overflow: hidden; }
  .app-shell {
    width: min(430px, calc(100vw - 24px));
    height: min(860px, calc(100svh - 24px));
    min-height: 0;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 34px;
  }
  .screen {
    height: calc(min(860px, calc(100svh - 24px)) - 152px);
  }
}


/* Service page visual match with the generated mockup */
body.route-services .top-title h1,
body.route-booking .top-title h1,
body.route-confirm .top-title h1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-weight: 900;
  letter-spacing: .01em;
}
body.route-services .top-title h1::before,
body.route-services .top-title h1::after,
body.route-booking .top-title h1::before,
body.route-booking .top-title h1::after,
body.route-confirm .top-title h1::before,
body.route-confirm .top-title h1::after {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--red);
  box-shadow: 10px 0 0 -8px var(--red);
  opacity: .95;
}
body.route-services .top-title h1::before,
body.route-booking .top-title h1::before,
body.route-confirm .top-title h1::before { transform: translateY(1px); }
body.route-services .top-title h1::after,
body.route-booking .top-title h1::after,
body.route-confirm .top-title h1::after { transform: translateY(1px); }

body.route-services .screen {
  padding-top: 8px;
}
body.route-services .services {
  gap: 14px;
}
body.route-services .service-card {
  min-height: 150px;
  border-radius: 15px;
  grid-template-columns: 47% 1fr;
  background:
    radial-gradient(circle at 100% 86%, rgba(237,23,23,.32), transparent 31%),
    linear-gradient(90deg, #101010 0 47%, rgba(18,18,18,.98) 47% 100%);
  border-color: rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
body.route-services .service-card::after {
  right: -34px;
  bottom: -34px;
  width: 170px;
  height: 96px;
  background: radial-gradient(circle, rgba(237,23,23,.32), transparent 66%);
}
body.route-services .service-photo {
  background: #0b0b0b;
}
body.route-services .service-photo img {
  object-position: center;
  filter: grayscale(1) contrast(1.18) brightness(.78);
  transform: scale(1.03);
}
body.route-services .service-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 17px;
}
body.route-services .service-info h3 {
  font-size: 22px;
  line-height: 1.02;
  margin-bottom: 14px;
  font-weight: 950;
}
body.route-services .price {
  margin-top: 14px;
  font-size: 26px;
  line-height: 1;
}
body.route-services .pole-btn {
  opacity: 1;
}
@media (max-width: 360px) {
  body.route-services .service-card { grid-template-columns: 44% 1fr; min-height: 136px; }
  body.route-services .service-info { padding: 13px 13px; }
  body.route-services .service-info h3 { font-size: 19px; }
  body.route-services .price { font-size: 23px; }
}
@media (max-height: 700px) {
  body.route-services .service-card { min-height: 124px; }
}

/* v12: exact services screen match */
body.route-services .topbar {
  height: 74px;
  padding: max(22px, env(safe-area-inset-top)) 22px 0;
}
body.route-services .screen {
  height: calc(100svh - 74px - 86px - env(safe-area-inset-bottom));
  padding: 0 20px 18px;
}
body.route-services .top-title {
  left: 78px;
  right: 78px;
  top: max(28px, calc(env(safe-area-inset-top) + 12px));
}
body.route-services .top-title h1 {
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
  gap: 11px;
  text-shadow: 0 1px 0 rgba(0,0,0,.9);
}
body.route-services .top-title h1::before,
body.route-services .top-title h1::after {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red));
  box-shadow: 0 0 7px rgba(237,23,23,.7);
}
body.route-services .top-title h1::after {
  background: linear-gradient(90deg, var(--red), transparent);
}
body.route-services .icon-btn {
  width: 34px;
  height: 34px;
}
body.route-services .icon-btn .ui-icon {
  width: 25px;
  height: 25px;
  stroke-width: 2.05;
}
body.route-services .pole-btn {
  align-self: flex-start;
  margin-top: 0;
  transform: translateY(-1px);
}
body.route-services .barber-pole-icon {
  width: 14px;
  height: 33px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.78);
  background: repeating-linear-gradient(135deg, #f7f7f7 0 5px, #f7f7f7 5px 7px, #e21616 7px 12px, #e21616 12px 15px);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.46), 0 0 12px rgba(237,23,23,.28);
}
body.route-services .barber-pole-icon::before,
body.route-services .barber-pole-icon::after {
  width: 16px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #fff, #bdbdbd);
  box-shadow: 0 0 0 1px rgba(0,0,0,.45);
}
body.route-services .services {
  display: grid;
  gap: 12px;
  padding-top: 0;
}
body.route-services .service-card {
  min-height: 136px;
  height: clamp(132px, 17.2svh, 148px);
  border-radius: 13px;
  grid-template-columns: 46.5% 53.5%;
  border-color: rgba(255,255,255,.19);
  background:
    radial-gradient(circle at 98% 84%, rgba(237,23,23,.30), transparent 29%),
    radial-gradient(circle at 9% 8%, rgba(237,23,23,.13), transparent 21%),
    linear-gradient(90deg, #0d0d0d 0 46.5%, rgba(18,18,18,.96) 46.5% 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.55);
}
body.route-services .service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 6% 8%, rgba(255,0,0,.24) 0 1px, transparent 2px),
    radial-gradient(circle at 12% 14%, rgba(255,0,0,.16) 0 1px, transparent 2px),
    radial-gradient(circle at 94% 18%, rgba(255,0,0,.12) 0 1px, transparent 2px),
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%);
  opacity: .95;
  z-index: 2;
}
body.route-services .service-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 142px;
  height: 82px;
  background: radial-gradient(circle, rgba(237,23,23,.34), transparent 64%);
  z-index: 1;
}
body.route-services .service-photo {
  background: #050505;
  overflow: hidden;
}
body.route-services .service-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 56%, rgba(0,0,0,.65) 100%),
    radial-gradient(circle at 12% 15%, rgba(237,23,23,.16), transparent 32%);
  pointer-events: none;
}
body.route-services .service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: grayscale(1) contrast(1.18) brightness(.67);
  transform: scale(1.055);
}
body.route-services .service-info {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 18px 16px 14px;
}
body.route-services .service-info h3 {
  margin: 0 0 12px;
  font-size: clamp(20px, 5.6vw, 23px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 2px 0 #050505, 0 0 12px rgba(0,0,0,.8);
}
body.route-services .meta {
  gap: 7px;
  font-size: 12px;
  color: #c7c7c7;
}
body.route-services .meta .ui-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}
body.route-services .price {
  margin-top: 14px;
  color: #ff2020;
  font-size: clamp(24px, 6.5vw, 28px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: .02em;
  text-shadow: 0 0 16px rgba(237,23,23,.20);
}
@media (max-width: 360px) {
  body.route-services .screen { padding-inline: 15px; }
  body.route-services .service-card { grid-template-columns: 45% 55%; height: 126px; min-height: 126px; }
  body.route-services .service-info { padding: 14px 13px; }
  body.route-services .service-info h3 { font-size: 18px; margin-bottom: 9px; }
  body.route-services .price { font-size: 22px; margin-top: 10px; }
}
@media (max-height: 700px) {
  body.route-services .topbar { height: 66px; }
  body.route-services .screen { height: calc(100svh - 66px - 78px - env(safe-area-inset-bottom)); }
  body.route-services .service-card { height: 121px; min-height: 121px; }
  body.route-services .services { gap: 10px; }
  body.route-services .service-info { padding: 13px 14px; }
  body.route-services .service-info h3 { font-size: 18px; margin-bottom: 8px; }
  body.route-services .price { font-size: 22px; margin-top: 10px; }
}


/* v13: clean header — removed unused hamburger button and right barber-pole element.
   Navigation is handled by the bottom tab bar, so top UI stays minimal. */
.clean-topbar {
  height: 62px;
  padding: max(16px, env(safe-area-inset-top)) 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.clean-title {
  position: static;
  left: auto;
  right: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.clean-title .title-line {
  width: 28px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  box-shadow: 0 0 7px rgba(237, 23, 23, .65);
  flex: 0 0 auto;
}
.clean-title h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0,0,0,.9);
}
body.route-home .clean-topbar {
  display: none;
}
body.route-home .screen {
  height: calc(100svh - 86px - env(safe-area-inset-bottom));
  padding-top: clamp(12px, 3svh, 26px);
}
body.route-services .clean-topbar {
  height: 62px;
  padding: max(18px, env(safe-area-inset-top)) 22px 0;
}
body.route-services .clean-title {
  top: auto;
  left: auto;
  right: auto;
}
body.route-services .screen {
  height: calc(100svh - 62px - 86px - env(safe-area-inset-bottom));
  padding-top: 0;
}
body.route-booking .screen,
body.route-confirm .screen,
body.route-profile .screen {
  height: calc(100svh - 62px - 86px - env(safe-area-inset-bottom));
}
@media (max-height: 700px) {
  body.route-services .clean-topbar { height: 56px; }
  body.route-services .screen { height: calc(100svh - 56px - 78px - env(safe-area-inset-bottom)); }
}
.clean-title h1::before,
.clean-title h1::after {
  content: none !important;
  display: none !important;
}
.clean-title h1 {
  display: block !important;
}


/* v14: updated brand typography to match the mockup more closely.
   No font files are bundled; Oswald is loaded from Google Fonts with safe fallbacks. */
:root {
  --display-font: "Oswald", "Arial Narrow", "Roboto Condensed", Impact, system-ui, sans-serif;
}
.brand-title {
  display: inline-block;
  font-family: var(--display-font);
  font-size: clamp(48px, 13.8vw, 58px);
  line-height: .88;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: none;
  color: #f5f5f5;
  transform: scaleX(.88) scaleY(1.04);
  transform-origin: center;
  text-shadow:
    2px 2px 0 #050505,
    0 1px 0 rgba(255,255,255,.18),
    0 12px 26px rgba(0,0,0,.82);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
.clean-title h1,
.service-info h3,
.price,
.btn,
.slot b,
.time,
.summary-top h3 {
  font-family: var(--display-font);
}
.subtitle {
  margin-top: 2px;
  font-size: 14px;
  letter-spacing: .01em;
}
@media (max-height: 700px) {
  .brand-title {
    font-size: clamp(41px, 12.6vw, 50px);
  }
}
@media (max-width: 360px) {
  .brand-title {
    font-size: clamp(43px, 13.2vw, 49px);
    letter-spacing: .03em;
  }
}

/* v15: vertical scrolling fix for real mobile PWA screens.
   The app shell stays full-screen, and only the current page scrolls.
   Extra bottom padding prevents the fixed bottom navigation from covering content. */
html,
body {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}
body {
  position: fixed;
  inset: 0;
  width: 100%;
  min-width: 320px;
}
.app-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  min-height: 100svh;
  max-height: 100dvh;
  overflow: hidden;
}
.topbar,
.clean-topbar {
  flex: 0 0 auto;
}
.screen {
  flex: 1 1 auto;
  min-height: 0;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  padding-bottom: calc(112px + env(safe-area-inset-bottom)) !important;
}
.screen::-webkit-scrollbar {
  display: none;
}
body.route-home .screen,
body.route-services .screen,
body.route-booking .screen,
body.route-confirm .screen,
body.route-profile .screen {
  height: auto !important;
}
body.route-home .screen {
  padding-top: clamp(12px, 3svh, 26px);
}
.bottom-nav {
  flex: 0 0 auto;
}
@media (min-width: 760px) {
  body {
    position: static;
    overflow: hidden;
  }
  .app-shell {
    height: min(860px, calc(100dvh - 24px));
    min-height: 0;
    max-height: calc(100dvh - 24px);
  }
  .screen {
    height: auto !important;
  }
}

/* v16: desktop narrow-screen adaptation.
   On a desktop browser with a narrow window (<760px), the previous mobile rules
   stretched the app to the full browser height. This created too much empty
   vertical space. Fine-pointer devices now use a centered phone-like frame even
   when the window is narrow, while real mobile devices keep the full-screen PWA. */
@media (hover: hover) and (pointer: fine) {
  html,
  body {
    position: static !important;
    inset: auto !important;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: auto !important;
  }

  body {
    display: grid;
    place-items: center;
    padding: 12px;
    background:
      radial-gradient(circle at 50% -8%, rgba(237, 23, 23, .16), transparent 32%),
      linear-gradient(180deg, #2a2a2a 0, #090909 24%, #020202 100%);
  }

  .app-shell {
    width: min(430px, calc(100vw - 24px));
    height: min(860px, calc(100dvh - 24px));
    min-height: 0 !important;
    max-height: calc(100dvh - 24px);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 34px;
    overflow: hidden;
  }

  .screen {
    height: auto !important;
    min-height: 0;
    padding-bottom: 104px !important;
    overscroll-behavior-y: auto;
  }

  body.route-home .screen {
    padding-top: clamp(10px, 2.2vh, 20px);
  }

  .bottom-nav {
    bottom: 10px;
  }
}

/* Extra-safe rule for very narrow desktop browser windows. */
@media (hover: hover) and (pointer: fine) and (max-width: 520px) {
  body {
    padding: 8px;
    place-items: start center;
  }

  .app-shell {
    width: min(430px, calc(100vw - 16px));
    height: min(860px, calc(100dvh - 16px));
    max-height: calc(100dvh - 16px);
    border-radius: 22px;
  }

  .bottom-nav {
    left: 14px;
    right: 14px;
    bottom: 8px;
  }
}

/* v18: confirmation screen cleanup.
   Matches the mockup better, fixes the payment icon row, and moves client data + optional PIN creation into the confirmation flow. */
body.route-confirm .screen {
  padding-top: 8px !important;
}
body.route-confirm .confirm-summary {
  margin-top: 0;
  padding: 14px 16px;
  border-radius: 16px;
}
body.route-confirm .summary-top {
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 92px;
}
body.route-confirm .summary-img {
  width: 92px;
  height: 92px;
  border-radius: 14px;
}
body.route-confirm .summary-top h2 {
  margin: 0 0 10px;
  font-family: var(--display-font);
  font-size: 22px;
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}
body.route-confirm .summary-top .price {
  margin-top: 10px;
  font-size: 27px;
  line-height: 1;
}
body.route-confirm .summary-row {
  min-height: 44px;
  align-items: center;
  padding-top: 0;
}
body.route-confirm .summary-row span {
  color: #c9c9c9;
}
body.route-confirm .summary-row b {
  font-weight: 900;
}
body.route-confirm .summary-row .ui-icon {
  color: #f1f1f1;
  stroke-width: 1.85;
}
body.route-confirm .confirm-reminder {
  margin-top: 14px;
  margin-bottom: 14px;
  border-radius: 14px;
}
.booking-details {
  margin-top: 0;
}
.form-title {
  padding: 0 2px 2px;
}
.form-title h2 {
  margin: 0 0 4px;
  font-family: var(--display-font);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
}
.form-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.pin-offer {
  padding: 14px;
  display: grid;
  gap: 12px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 30%, rgba(237, 23, 23, .18), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
}
.pin-offer-head {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}
.pin-offer-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #ff3838;
}
.pin-offer-icon .ui-icon {
  width: 22px;
  height: 22px;
}
.pin-offer strong {
  display: block;
  margin-bottom: 3px;
  color: #fff;
  font-family: var(--display-font);
  font-size: 17px;
  line-height: 1.05;
}
.pin-offer span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}
.pin-field {
  border-radius: 14px;
  background: rgba(0,0,0,.22);
}
@media (max-width: 360px) {
  body.route-confirm .summary-top {
    grid-template-columns: 78px 1fr;
    min-height: 78px;
  }
  body.route-confirm .summary-img {
    width: 78px;
    height: 78px;
  }
  body.route-confirm .summary-top h2 {
    font-size: 19px;
  }
  body.route-confirm .summary-top .price {
    font-size: 24px;
  }
}

/* v19: confirmation flow via modal.
   The confirmation page shows only the booking summary and the main confirm button.
   Name, phone, and optional PIN creation appear after tapping the button. */
body.route-confirm .confirm-main-btn {
  margin-top: 16px;
}
body.modal-open {
  overflow: hidden;
}

body.modal-open .screen {
  z-index: 100;
  overflow: hidden !important;
}

.booking-modal[hidden] {
  display: none !important;
}

.booking-modal {
  position: fixed;
  z-index: 120;
  left: 50%;
  top: 50%;
  width: 100vw;
  height: 100dvh;
  transform: translate(-50%, -50%);
  display: grid;
  align-items: center;
  justify-items: center;
  padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: min(390px, calc(100% - 28px));
  max-height: calc(100% - 36px);
  overflow-y: auto;
  padding: 20px 18px 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 22%, rgba(237, 23, 23, .24), transparent 32%),
    linear-gradient(180deg, rgba(24,24,24,.98), rgba(5,5,5,.98));
  box-shadow: 0 28px 90px rgba(0,0,0,.72);
}
.modal-card::-webkit-scrollbar { width: 0; }
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: rgba(0,0,0,.22);
  color: #fff;
  font-size: 25px;
  line-height: 1;
}
.modal-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding-right: 38px;
  margin-bottom: 16px;
}
.modal-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(180deg, #f32626, #c90f0f);
  box-shadow: 0 14px 30px rgba(237,23,23,.28);
}
.modal-icon .ui-icon {
  width: 22px;
  height: 22px;
}
.modal-head h2 {
  margin: 1px 0 6px;
  font-family: var(--display-font);
  font-size: 23px;
  line-height: 1;
  font-weight: 800;
}
.modal-head p,
.modal-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
}
.modal-note {
  margin: -4px 2px 2px;
}
body.route-confirm .booking-details {
  display: grid;
  gap: 13px;
}
body.route-confirm .booking-details .field {
  background: rgba(0,0,0,.22);
  border-radius: 16px;
}



@media (min-width: 760px) {
  .booking-modal {
    width: min(430px, calc(100vw - 24px));
    height: min(860px, calc(100dvh - 24px));
  }
}

@media (max-width: 360px) {
  .modal-card {
    padding: 18px 14px 16px;
    border-radius: 22px;
  }
  .modal-head {
    grid-template-columns: 38px 1fr;
    gap: 10px;
  }
  .modal-icon {
    width: 38px;
    height: 38px;
  }
  .modal-head h2 {
    font-size: 21px;
  }
}

/* v27 stability: prevent double submits while PIN hash is being created */
button:disabled,
.btn:disabled {
  opacity: .62;
  cursor: wait;
  pointer-events: none;
}


/* v29: compact centered toast fix for desktop and narrow PC windows.
   Prevents the old bottom-position rule from stretching the notification. */
.toast {
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: min(360px, calc(100vw - 36px)) !important;
  z-index: 220 !important;
}


/* v32: generated barber-chair PNG in booking info card */
.booking-info-box {
  align-items: center;
}

.booking-chair {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.08), transparent 62%);
}

.booking-chair img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px rgba(255,255,255,.14));
}


/* v34: services page redesign with clean transparent icons */
body.route-services .services {
  gap: 14px;
  padding-top: 2px;
}
body.route-services .service-card {
  min-height: 138px;
  height: auto;
  grid-template-columns: 34% 1fr;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.15);
  background:
    radial-gradient(circle at 88% 78%, rgba(237,23,23,.22), transparent 22%),
    linear-gradient(145deg, rgba(10,10,10,.98), rgba(18,18,18,.96));
  box-shadow: 0 18px 34px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.02);
}
body.route-services .service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 45%);
  z-index: 1;
}
body.route-services .service-card::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -28px;
  width: 120px;
  height: 74px;
  background: radial-gradient(circle, rgba(237,23,23,.24), transparent 68%);
  z-index: 0;
}
body.route-services .service-photo,
body.route-services .service-art {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 10px 14px 18px;
  overflow: visible;
  position: relative;
}
body.route-services .service-photo::after,
body.route-services .service-art::after {
  content: "";
  position: absolute;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237,23,23,.14), transparent 68%);
  filter: blur(2px);
}
body.route-services .service-art-svg {
  width: min(112px, 100%);
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.45));
}
body.route-services .service-info {
  z-index: 2;
  justify-content: center;
  padding: 18px 18px 18px 8px;
}
body.route-services .service-info h3 {
  margin: 0 0 10px;
  font-size: clamp(19px, 5.8vw, 24px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: .015em;
}
body.route-services .meta {
  font-size: 13px;
  color: #d0d0d0;
}
body.route-services .price {
  margin-top: 12px;
  font-size: clamp(22px, 6vw, 28px);
}
body.route-services .service-card-haircut .service-art-svg { width: min(118px, 100%); }
body.route-services .service-card-beard .service-art-svg { width: min(104px, 100%); }
body.route-services .service-card-combo .service-art-svg { width: min(110px, 100%); }

@media (max-width: 380px) {
  body.route-services .service-card { grid-template-columns: 35% 1fr; min-height: 130px; }
  body.route-services .service-photo,
  body.route-services .service-art { padding-left: 14px; }
  body.route-services .service-info { padding: 16px 16px 16px 4px; }
  body.route-services .service-info h3 { font-size: 18px; }
  body.route-services .price { font-size: 22px; }
}
