:root {
  --bg: #faf8f6;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #666;
  --accent: #b8865a;
  --pink: #fce4ec;
  --border: #c8bfb6;
  --danger: #b42318;
  --ok: #067647;
  --busy: #9e9e9e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  font-size: 17px;
  overflow-x: hidden;
}

.app {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 0.75rem 2.5rem;
  min-width: 0;
}

.top {
  margin-bottom: 0.5rem;
}

.salon-hero {
  margin-bottom: 0.25rem;
}

.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.hero-title-block {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1 1 220px;
  min-width: 0;
}

.hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  background: #fff;
}

.hero-text {
  min-width: 0;
}

.hero-cta {
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
}

/* Login + Registrieren luôn hiện (kể cả khi theme ẩn #salonHero) */
.portal-auth-chips {
  position: fixed;
  top: max(0.55rem, env(safe-area-inset-top));
  right: max(0.65rem, env(safe-area-inset-right));
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}

.portal-login-chip,
.portal-register-chip {
  margin: 0;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.portal-login-chip {
  border: 2px solid #d4af68;
  background: #d4af68;
  color: #111;
}

.portal-register-chip {
  border: 2px solid #d4af68;
  background: #fff;
  color: #111;
}

.portal-login-chip:hover,
.portal-register-chip:hover {
  filter: brightness(1.06);
  color: #111;
}

/* Theme beauty-bar-pep / queen-nails-spa: login/register trên nav — ẩn chip trùng */
body.theme-beauty-bar-pep .portal-auth-chips,
body.theme-queen-nails-spa .portal-auth-chips {
  display: none;
}

.hero-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: dense;
  gap: 8px;
  margin: 0.85rem 0 0.35rem;
}

.hero-gallery.is-expanded {
  max-height: min(70vh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.gallery-more-btn {
  display: block;
  width: 100%;
  margin: 0.35rem 0 1rem;
  background: var(--surface, #fff);
  color: var(--primary, #7c3aed);
  border: 1px solid var(--border, #e2e8f0);
  font-weight: 600;
}

.gallery-more-btn:hover {
  background: #f8fafc;
}

.hero-gallery .gallery-cell {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eee;
  border-radius: 12px;
  cursor: zoom-in;
  border: 1px solid var(--border);
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  text-align: inherit;
}

.hero-gallery .gallery-cell-featured {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
  min-height: 0;
}

.hero-gallery .gallery-cell::after {
  content: '🔍';
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.hero-gallery .gallery-cell:hover::after {
  opacity: 0.85;
}

.hero-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-gallery .gallery-cell:hover img {
  transform: scale(1.03);
  transition: transform 0.2s ease;
}

@media (min-width: 540px) {
  .hero-gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .hero-gallery .gallery-cell-featured {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.hero-headline {
  margin: 0 0 0.35rem;
  font-size: clamp(1.15rem, 3.2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.25;
}

.hero-tagline {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.top h1 {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
}

.brand {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.meta,
.hint {
  color: var(--muted);
  font-size: 1rem;
}

.meta {
  margin: 0;
}

.step-title {
  margin: 0.65rem 0 0;
  font-weight: 700;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  color: var(--accent);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.1rem;
  margin-top: 0.85rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.card h2,
#scheduleHeading {
  margin: 0 0 0.85rem;
  font-size: clamp(1.25rem, 3.5vw, 1.55rem);
  font-weight: 800;
  line-height: 1.2;
}

.btn-back {
  border: none;
  background: none;
  color: var(--accent);
  padding: 0.25rem 0;
  margin-bottom: 0.65rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.type-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 540px) {
  .type-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 110px;
  padding: 1.1rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
}

.type-btn:hover {
  border-color: var(--accent);
  background: #fdf9f5;
}

.type-icon {
  font-size: 2rem;
  line-height: 1;
}

.input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
}

.btn.block {
  width: 100%;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.selection {
  background: #f5efe8;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font-size: 1rem;
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

.field {
  display: block;
  margin-bottom: 0.85rem;
}

.field span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.phone-with-dial {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) 1fr;
  gap: 0.65rem;
  align-items: start;
}

.phone-with-dial > .field {
  margin-bottom: 0;
}

.phone-with-dial .hint {
  display: block;
  margin-top: 0.35rem;
  font-weight: 400;
  font-size: 0.9rem;
}

.waitlist-panel .phone-with-dial {
  margin-top: 0.25rem;
}

@media (max-width: 420px) {
  .phone-with-dial {
    grid-template-columns: 1fr;
  }
}

.check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 1rem;
  margin: 0.85rem 0 1.1rem;
}

.error {
  color: var(--danger);
  font-size: 1rem;
}

.warn {
  color: #9a6700;
  font-size: 1rem;
  margin-bottom: 0.65rem;
  font-weight: 600;
}

.loading,
.fatal {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 1.1rem;
}

.fatal {
  color: var(--danger);
}

/* —— Schema: bảng lưới giống app —— */
.schedule-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: min(70vh, 620px);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.sched-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.sched-table th,
.sched-table td {
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.sched-table thead th {
  background: var(--pink);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.55rem 0.35rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

.sched-th-time {
  width: 72px;
  min-width: 72px;
}

.sched-th-staff {
  min-width: 100px;
  width: 100px;
}

.sched-table tbody td.sched-td-time {
  background: var(--pink);
  font-weight: 700;
  font-size: 0.9rem;
  width: 72px;
  min-width: 72px;
  padding: 0.35rem 0.25rem;
}

.sched-table tbody td.sched-td-cell {
  height: 44px;
  min-width: 100px;
  width: 100px;
  padding: 0;
  background: #fff;
}

.sched-table tbody td.sched-td-cell.past,
.sched-table tbody td.sched-td-cell.past.busy,
.sched-table tbody td.sched-td-cell.past.free {
  background: #cfcfcf !important;
  color: #666 !important;
  opacity: 0.72;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.sched-table tbody tr.sched-row-past td.sched-td-time {
  color: #888;
  opacity: 0.75;
}

.sched-table tbody td.sched-td-cell.past.busy {
  background: #bdbdbd !important;
  color: #555 !important;
  pointer-events: none;
}

.sched-table tbody td.sched-td-cell.busy {
  background: var(--busy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem;
  text-align: center;
}

.sched-table tbody td.sched-td-cell.busy.busy-waitlist {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sched-table tbody td.sched-td-cell.busy.busy-waitlist:hover,
.sched-table tbody td.sched-td-cell.busy.busy-waitlist:focus {
  filter: brightness(1.08);
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: -2px;
}

.sched-table tbody td.sched-td-cell.free {
  background: #fff;
}

.sched-table tbody td.sched-td-cell.free button {
  display: block;
  width: 100%;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.sched-table tbody td.sched-td-cell.free button:hover {
  background: #e8f5e9;
}

.sched-table tbody td.sched-td-cell.free.picked {
  background: #c8e6c9;
  box-shadow: inset 0 0 0 2px var(--ok);
}

.waitlist-panel {
  margin-top: 1.25rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #fafafa;
}

.waitlist-panel h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.waitlist-panel .field {
  margin-top: 0.65rem;
}

.waitlist-panel .btn {
  margin-top: 0.85rem;
}

.service-list label {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 1.05rem;
}

/* List / detail — giống app + portal (booking_ui) */
.service-list-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.75rem 0 1rem;
}

.svc-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.svc-row:active {
  background: #fff8f0;
}

.svc-row-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #f0ebe6;
}

.svc-row-thumb--ph {
  display: block;
}

.svc-row-body {
  flex: 1;
  min-width: 0;
}

.svc-row-title {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.3;
}

.svc-row-meta {
  margin-top: 0.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
}

.svc-row-chevron {
  color: #999;
  font-size: 1.4rem;
  line-height: 1;
}

.service-list-nav--cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.svc-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.svc-card-img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #f0ebe6;
}

.svc-card-img--ph {
  height: 140px;
}

.svc-card-body {
  padding: 0.75rem;
}

.svc-card-title {
  font-weight: 700;
  font-size: 1.02rem;
}

.svc-card-meta {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
}

.svc-detail {
  margin: 0;
}

.svc-detail-hero {
  display: block;
  width: calc(100% + 2.4rem);
  max-width: none;
  margin: -1.1rem -1.2rem 0;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #f0ebe6;
}

.svc-detail-hero--ph {
  min-height: 160px;
  width: calc(100% + 2.4rem);
  margin: -1.1rem -1.2rem 0;
  background: #f0ebe6;
}

.svc-detail-body {
  padding: 1.1rem 0 0.25rem;
}

.svc-detail-name {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}

.svc-detail-meta {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  font-weight: 700;
}

.svc-detail-label {
  font-weight: 600;
  color: #555;
}

.svc-detail-intro-label {
  margin: 1rem 0 0.35rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: #444;
}

.svc-detail-intro {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  color: #444;
}

#btnSelectService {
  margin-top: 1rem;
}

.service-list-packages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
}

.service-list-packages label.pkg-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 0.85rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.service-list-packages label.pkg-card.is-selected {
  border-color: var(--ok, #2e7d32);
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.15);
}

.service-list-packages .pkg-card input[type='checkbox'] {
  margin-top: 0.35rem;
  width: 1.1rem;
  height: 1.1rem;
}

.pkg-card-img {
  grid-column: 2;
  width: 100%;
  max-width: 140px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f3f3;
  justify-self: start;
}

.pkg-card-body {
  grid-column: 2;
  min-width: 0;
}

.pkg-card-title {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.3;
}

.pkg-card-meta {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  color: #555;
  font-weight: 600;
}

.pkg-card-desc {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #666;
}

@media (min-width: 520px) {
  .service-list-packages label.pkg-card {
    grid-template-columns: auto 100px 1fr;
  }
  .pkg-card-img {
    grid-column: 2;
    grid-row: 1 / span 2;
    max-width: 100px;
    height: 100px;
  }
  .pkg-card-body {
    grid-column: 3;
  }
  .service-list-packages .pkg-card input[type='checkbox'] {
    grid-row: 1 / span 2;
    align-self: center;
  }
}

.done-card {
  text-align: center;
}

.done-text {
  white-space: pre-line;
  margin: 0.75rem 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

/* —— Stor kalender (ersätter inbyggd date-picker) —— */
.date-picker {
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.35rem 0.25rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.date-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.date-picker-month {
  margin: 0;
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: clamp(1.1rem, 4.5vw, 1.65rem);
  font-weight: 800;
  text-transform: capitalize;
}

.date-picker-nav {
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--accent);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
  padding: 0;
}

.date-picker-nav:hover {
  border-color: var(--accent);
  background: #fdf9f5;
}

.date-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 4px;
  width: 100%;
}

.date-picker-weekdays span {
  text-align: center;
  font-size: clamp(0.7rem, 2.8vw, 1rem);
  font-weight: 800;
  color: var(--muted);
  padding: 0.2rem 0;
  min-width: 0;
  overflow: hidden;
}

.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.date-picker-day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  height: auto;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: clamp(0.9rem, 3.6vw, 1.75rem);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  color: var(--text);
  touch-action: manipulation;
}

.date-picker-day.empty {
  border: none;
  background: transparent;
  cursor: default;
  aspect-ratio: auto;
  min-height: 0;
}

.date-picker-day.today:not(.selected) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.date-picker-day.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(184, 134, 90, 0.4);
}

.date-picker-day.disabled {
  opacity: 0.32;
  cursor: not-allowed;
  background: #f3f3f3;
}

.date-picker-day:not(.disabled):not(.empty):hover {
  border-color: var(--accent);
  background: #fdf9f5;
}

.date-picker-day.selected:hover {
  background: var(--accent);
}

.date-selected {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: clamp(1rem, 3.8vw, 1.35rem);
  font-weight: 800;
  color: var(--accent);
}

#stepDate .btn.primary.block {
  min-height: 3rem;
  font-size: 1.05rem;
}

@media (min-width: 400px) {
  .date-picker {
    padding: 0.85rem 0.5rem 0.25rem;
  }

  .date-picker-weekdays,
  .date-picker-grid {
    gap: 6px;
  }

  .date-picker-nav {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.85rem;
  }
}

@media (min-width: 540px) {
  .date-picker {
    padding: 1rem 0.75rem 0.35rem;
  }

  .date-picker-weekdays,
  .date-picker-grid {
    gap: 8px;
  }

  .date-picker-day {
    border-radius: 14px;
    border-width: 2px;
    font-size: 1.5rem;
  }

  .date-picker-nav {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 2rem;
  }
}

@media (max-width: 539px) {
  .hero-top {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta {
    width: 100%;
  }
}

/* —— Vinana App Promo (web booking) —— */
.app-promo {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #fce4ec 0%, #fff 55%, #f3e5f5 100%);
  border: 1px solid #e1bee7;
}

.app-promo-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.app-promo-copy {
  flex: 1 1 220px;
  min-width: 0;
}

.app-promo-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7b1fa2;
}

.app-promo-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  line-height: 1.25;
}

.app-promo-text {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.app-promo-benefits {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--text);
}

.app-promo-benefits li {
  margin: 0.15rem 0;
}

.app-promo-actions {
  flex: 0 1 220px;
  width: 100%;
  max-width: 260px;
}

.app-promo-cta {
  text-align: center;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.app-promo-stores {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.store-badge {
  flex: 1 1 auto;
  text-align: center;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.done-promo {
  margin: 1rem 0;
}

.app-promo-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0.55rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e1bee7;
  box-shadow: 0 -4px 24px rgba(26, 26, 26, 0.08);
  backdrop-filter: blur(8px);
}

.app-promo-sticky-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-promo-sticky-text {
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.25;
  min-width: 0;
}

.btn.compact {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.app-promo-dismiss {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  cursor: pointer;
}

body.has-app-promo-sticky .app {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

body.has-pwa-install-bar .app {
  padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
}

/* —— Lightbox (ảnh phóng to) —— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(96vw, 1100px);
  max-height: min(78vh, 820px);
  flex: 1 1 auto;
  min-height: 0;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: min(78vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  padding: 0;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-prev {
  left: 0.5rem;
}

.lightbox-next {
  right: 0.5rem;
}

.lightbox-caption {
  margin: 0.75rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  text-align: center;
}

.ad-slot {
  min-height: 60px;
  margin: 0.75rem 0;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  border: 1px dashed #d0d0d0;
  border-radius: 10px;
  color: #888;
  font-size: 0.8rem;
  background: #fafafa;
}

.native-ad {
  min-height: 80px;
}

body.ad-interstitial-open {
  overflow: hidden;
}

.ad-interstitial-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.72);
}

.ad-interstitial-panel {
  width: min(100%, 480px);
  max-height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.ad-interstitial-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #e8e8e8;
  background: #fafafa;
}

.ad-interstitial-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ad-interstitial-close:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* PWA install bar (Setmore-style) — nổi trên UI Android (nav gesture / chip / theme) */
.pwa-install-bar {
  position: fixed;
  left: 0.5rem;
  right: 0.5rem;
  bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  z-index: 10050;
  padding: 0.7rem 0.75rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #eee;
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.pwa-install-bar[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.pwa-install-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  pointer-events: auto;
}

.pwa-install-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f3f3f3;
}

.pwa-install-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.82rem;
  line-height: 1.25;
  color: #444;
}

.pwa-install-copy strong {
  font-size: 0.92rem;
  color: #222;
}

.pwa-install-bar #pwaInstallBtn {
  min-height: 48px;
  min-width: 7.25rem;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  font-weight: 800;
  touch-action: manipulation;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.pwa-install-bar #pwaInstallDismiss {
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.lightbox[hidden] {
  display: none !important;
  pointer-events: none !important;
}

/* —— iOS Setmore-style install guide —— */
.pwa-ios-guide {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem 0.75rem calc(1rem + env(safe-area-inset-bottom));
}

/* Không để display:flex đè attribute hidden */
.pwa-ios-guide[hidden] {
  display: none !important;
}

.pwa-fake-chrome-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f2f2f2;
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  margin: 0.5rem 0 0.25rem;
}

.pwa-fake-chrome-bar .pwa-fake-url {
  flex: 1;
  font-size: 0.78rem;
  color: #444;
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pwa-chrome-menu {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  color: #111;
  padding: 0.15rem 0.35rem;
}

.pwa-android-viz {
  position: relative;
}

.pwa-ios-guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 24, 0.55);
}

.pwa-ios-guide-card {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  background: #fff;
  border-radius: 18px;
  padding: 1.15rem 1.1rem 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.pwa-ios-guide-close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  border: none;
  background: transparent;
  font-size: 1.45rem;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.pwa-ios-guide-title {
  margin: 0 1.5rem 0.9rem 0;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 800;
  color: #1a1a1a;
}

.pwa-ios-slide-text {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #222;
}

.pwa-ios-step-num {
  flex-shrink: 0;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pwa-ios-viz {
  position: relative;
  background: #f2f2f4;
  border-radius: 14px;
  padding: 0.85rem 0.75rem 1rem;
  min-height: 140px;
}

.pwa-fake-safari-bar {
  background: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.65rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.pwa-fake-url {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-fake-toolbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 0.55rem 0.35rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.pwa-tb-ico {
  color: #0a84ff;
  font-size: 1.05rem;
  opacity: 0.85;
}

.pwa-tb-share {
  color: #0a84ff;
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 999px;
}

.pwa-tb-highlight {
  outline: 3px solid rgba(10, 132, 255, 0.45);
  box-shadow: 0 0 0 8px rgba(10, 132, 255, 0.18);
  animation: pwaPulse 1.6s ease-in-out infinite;
}

.pwa-hand-pointer {
  position: absolute;
  right: 18%;
  bottom: 0.15rem;
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
  animation: pwaHand 1.4s ease-in-out infinite;
}

@keyframes pwaPulse {
  0%,
  100% {
    box-shadow: 0 0 0 6px rgba(10, 132, 255, 0.12);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(10, 132, 255, 0.22);
  }
}

@keyframes pwaHand {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

.pwa-fake-share-sheet {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pwa-sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  font-size: 0.92rem;
  border-bottom: 1px solid #eee;
  color: #222;
}

.pwa-sheet-row:last-child {
  border-bottom: none;
}

.pwa-sheet-row.muted {
  color: #999;
}

.pwa-sheet-highlight {
  background: #e8f1ff;
  outline: 2px solid #0a84ff;
  outline-offset: -2px;
  font-weight: 700;
}

.pwa-sheet-plus {
  width: 1.5rem;
  height: 1.5rem;
  border: 1.5px solid #333;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.pwa-ios-guide-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.95rem;
}

.pwa-ios-dots {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex: 1;
}

.pwa-ios-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d0d0d4;
}

.pwa-ios-dot.is-active {
  background: #111;
  width: 18px;
}

.pwa-ios-guide-help {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: #888;
}

.ad-interstitial-body {
  flex: 1;
  min-height: 280px;
  padding: 0.75rem;
  overflow: auto;
}

.ad-interstitial-body .ad-placeholder {
  min-height: 260px;
}

.salon-notice {
  max-width: 960px;
  margin: 0.65rem auto 0;
  padding: 0.75rem 1rem;
  background: #fff4ec;
  border: 1px solid #f0d2b8;
  border-radius: 12px;
  color: #6b3f1d;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.salon-notice-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.salon-notice-body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

[hidden] {
  display: none !important;
}
