/**
 * Shared shell layout — concierge + pre-arrival mini apps.
 * Import after lotus-theme.css, before app-specific CSS.
 */

/* —— Global resets —— */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

.km,
[data-lang="km"],
.lang-km {
  font-family: 'Kantumruy Pro', var(--lotus-font-body, var(--ac-font-body));
}

/* —— Telegram chrome (fullscreen hides native close button) —— */
:root {
  --tg-safe-top: 0px;
  --tg-safe-right: 0px;
  --tg-safe-bottom: 0px;
  --tg-safe-left: 0px;
  --tg-content-top: 0px;
  --tg-content-right: 0px;
  --tg-content-bottom: 0px;
  --tg-content-left: 0px;
  /* Hub layout contract — tune per surface, never crush the service grid */
  --hub-card-min-h: 88px;
  --hub-grid-row-min: 88px;
  --hub-grid-gap: 8px;
  --hub-hero-h-branded: clamp(128px, 24dvh, 172px);
  --app-viewport-height: 100dvh;
  --bottom-nav-offset: 64px;
  --embed-header-offset: 0px;
  --compose-keyboard-offset: 0px;
  --shell-tab-pad-bottom: calc(var(--bottom-nav-offset, 64px) + env(safe-area-inset-bottom, 0px));
}

body.tg-app .hub-header {
  padding-top: calc(14px + var(--tg-content-top, var(--tg-safe-top)));
  padding-left: calc(16px + var(--tg-safe-left));
  padding-right: calc(16px + var(--tg-safe-right));
}

body.tg-app.tg-fullscreen .hub-header {
  padding-top: calc(12px + var(--tg-content-top, var(--tg-safe-top)));
  padding-right: max(calc(16px + var(--tg-safe-right)), 52px);
  border-bottom-color: rgba(184, 146, 74, 0.32);
}

body.tg-app .messages-header.tab-screen-header,
body.tg-app .catalog-topbar,
body.tg-app .activity-header {
  padding-top: calc(10px + var(--tg-content-top, var(--tg-safe-top)));
  padding-right: calc(16px + var(--tg-content-right, var(--tg-safe-right)));
}

body.tg-app.tg-compact-chrome .messages-header.tab-screen-header,
body.tg-app.tg-compact-chrome .catalog-topbar {
  padding-right: max(calc(16px + var(--tg-content-right, var(--tg-safe-right))), 52px);
}

body.tg-app #app-bottom-nav {
  padding-bottom: calc(8px + var(--tg-safe-bottom));
}

/* —— Screen titles —— */
.screen-title,
.messages-title {
  font-family: var(--lotus-font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--lotus-text);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

/* —— Primary / secondary actions (consistent across apps) —— */
.btn-primary {
  background: var(--lotus-primary);
  color: #0d0d0d;
  border: 1px solid var(--lotus-primary);
  border-radius: var(--lotus-radius-pill);
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--lotus-font-body);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--lotus-transition), transform var(--lotus-transition), box-shadow var(--lotus-transition);
}

.btn-primary:hover:not(:disabled) {
  background: var(--lotus-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--lotus-primary-glow);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn-ghost {
  width: 100%;
  border: 1px solid var(--lotus-border-gold);
  background: var(--lotus-primary-light);
  color: var(--lotus-primary);
  border-radius: var(--lotus-radius-pill);
  padding: 11px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: var(--lotus-font-body);
  cursor: pointer;
  transition: background var(--lotus-transition), border-color var(--lotus-transition);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(184, 146, 74, 0.2);
  border-color: var(--lotus-primary);
}

.btn-ghost:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-ghost[hidden] {
  display: none !important;
}

/* —— Messages screen —— */
.shell-screen.messages-screen.active {
  display: flex;
  flex-direction: column;
  min-height: var(--app-viewport-height, 100dvh);
  max-height: var(--app-viewport-height, 100dvh);
  background: var(--lotus-bg);
}

#screen-hub.has-bottom-nav,
#screen-activity.has-bottom-nav {
  padding-bottom: var(--shell-tab-pad-bottom);
}

/* Chat: compose bar sits above tab bar — no screen padding (avoids dead gap in iframe). */
#screen-messages.has-bottom-nav {
  padding-bottom: 0;
}

#screen-messages.has-bottom-nav .messages-footer {
  margin-bottom: var(--bottom-nav-offset, 64px);
}

/* —— Shared back control (tab screens + catalog) —— */
.cv-back-btn {
  background: transparent;
  border: none;
  color: var(--lotus-primary);
  font-size: 1.6rem;
  padding: 4px 8px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  transition: opacity var(--lotus-transition);
}

.cv-back-btn:hover {
  opacity: 0.8;
}

/* Telegram header already shows Back — hide in-app duplicate (keep for web guests). */
body.tg-app:not(.platform-web) .cv-back-btn {
  display: none;
}



/* —— Tab screen headers (Activity, Messages) —— */
.tab-screen-header,
.activity-header,
.messages-header {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  padding: 12px 16px 14px;
  border-bottom: none;
}

.tab-screen-header--hero {
  background-image: linear-gradient(rgba(13, 13, 13, 0.65), rgba(13, 13, 13, 0.85)), url('../assets/hotel_hero.png') !important;
  background-size: cover !important;
  background-position: center !important;
}

.tab-screen-header-main,
.activity-header-main,
.messages-header-main {
  min-width: 0;
  padding-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.activity-header .screen-title,
.messages-header .messages-title {
  margin: 0;
  font-size: 1.15rem;
}

.messages-mode-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 600;
  font-family: var(--lotus-font-body);
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: var(--lotus-radius-pill);
  background: var(--lotus-primary-light);
  color: var(--lotus-primary);
  border: 1px solid var(--lotus-border-gold);
  white-space: nowrap;
}

#screen-messages.messages-mode-live .messages-header {
  background: linear-gradient(135deg, rgba(16, 36, 32, 0.98) 0%, rgba(8, 18, 16, 0.95) 100%);
  border-bottom-color: rgba(72, 168, 148, 0.22);
}

#screen-messages.messages-mode-live .messages-footer {
  border-top-color: rgba(72, 168, 148, 0.22);
}

#screen-messages.messages-mode-live .msg-bubble.msg-guest {
  background: rgba(72, 168, 148, 0.12);
  border-color: rgba(72, 168, 148, 0.32);
}

#screen-messages.messages-mode-live .msg-dept,
#screen-messages.messages-mode-live .msg-dept-name {
  color: #6fd4c0;
}


.messages-sub,
.activity-sub,
.screen-sub {
  margin: 0;
  font-size: 0.8rem;
  font-family: var(--lotus-font-body);
  color: var(--lotus-text-muted);
  line-height: 1.45;
  max-width: 32em;
}

.subpage-header.tab-screen-header {
  position: sticky;
  top: 0;
  z-index: 10;
}

.messages-body {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.messages-thread {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(184, 146, 74, 0.5) rgba(255, 255, 255, 0.08);
}

.messages-thread::-webkit-scrollbar {
  width: 8px;
}

.messages-thread::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.messages-thread::-webkit-scrollbar-thumb {
  background: rgba(184, 146, 74, 0.45);
  border-radius: 999px;
}

.messages-thread::-webkit-scrollbar-thumb:hover {
  background: rgba(184, 146, 74, 0.65);
}

.messages-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
  text-align: center;
  font-size: 0.84rem;
  font-family: var(--lotus-font-body);
  color: var(--lotus-text-faint);
  line-height: 1.5;
  pointer-events: none;
}

.messages-empty[hidden] {
  display: none !important;
}

.messages-footer {
  flex-shrink: 0;
  border-top: none;
  background: rgba(13, 13, 13, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.messages-live-bar {
  padding: 12px 16px 0;
}

.messages-compose {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 14px;
}

.messages-screen.active .messages-compose {
  display: flex;
}

.messages-compose input {
  flex: 1;
  min-width: 0;
  background: var(--lotus-bg-card);
  border: 1px solid var(--lotus-border);
  color: var(--lotus-text);
  border-radius: var(--lotus-radius-pill);
  padding: 11px 16px;
  font-size: 0.875rem;
  font-family: var(--lotus-font-body);
  transition: border-color 0.2s;
}

.messages-compose input::placeholder {
  color: var(--lotus-text-faint);
}

.messages-compose input:focus {
  outline: none;
  border-color: var(--lotus-primary);
}

.messages-compose .btn-primary {
  flex: 0 0 auto;
  width: auto;
  min-width: 72px;
  padding: 11px 18px;
  white-space: nowrap;
}

/* —— Keyboard-aware compose bar —— */
.messages-footer.compose-pinned {
  position: sticky;
  bottom: var(--bottom-nav-offset, 64px);
  z-index: 35;
  transform: translateY(calc(-1 * var(--compose-keyboard-offset, 0px)));
  transition: transform 0.15s ease-out;
}

body.compose-focused .shell-screen.messages-screen.active {
  max-height: var(--app-viewport-height, 100dvh);
}

body.compose-focused .messages-thread {
  scroll-padding-bottom: calc(var(--compose-footer-height, 72px) + 12px);
}

/* —— Shared compact hub (pre-arrival + in-room) ——
 * Surfaces: html[data-surface] is set by hub-layout.js (telegram | web | iframe | browser).
 * Do not add flex:1 / min-height:0 on .service-grid in surface blocks — use --hub-* vars.
 */
#screen-hub.active.has-bottom-nav {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#screen-hub .hub-main {
  flex: 0 1 auto;
  min-height: auto;
}

#screen-hub.active.has-bottom-nav .hub-header {
  flex-shrink: 0;
  padding-top: calc(8px + var(--embed-header-offset, 0px) + var(--tg-content-top, 0px));
  padding-bottom: 8px;
  padding-left: calc(16px + var(--tg-safe-left, 0px));
  padding-right: calc(16px + var(--tg-safe-right, 0px));
}

body.tg-app.tg-fullscreen #screen-hub.active.has-bottom-nav .hub-header {
  padding-right: max(calc(16px + var(--tg-safe-right, 0px)), 52px);
}

#screen-hub.active.has-bottom-nav .hub-hero {
  margin: 0;
  height: clamp(72px, 14dvh, 88px);
  flex-shrink: 0;
  border-radius: 0;
  width: 100%;
}

#screen-hub.active.has-bottom-nav .hub-hero--branded {
  height: var(--hub-hero-h-branded);
}

#screen-hub.active.has-bottom-nav .hub-hero-caption h2,
#screen-hub.active.has-bottom-nav .hub-hero-overlay h2,
#screen-hub.active.has-bottom-nav .hub-hero--branded #hub-greeting {
  font-size: 1.28rem;
}

#screen-hub.active.has-bottom-nav .hub-hero-caption p,
#screen-hub.active.has-bottom-nav .hub-hero-overlay p,
#screen-hub.active.has-bottom-nav .hub-hero--branded #hub-greeting-sub {
  font-size: 0.88rem;
}

#screen-hub.active.has-bottom-nav .hub-hero-brand {
  font-size: 0.92rem;
}

#screen-hub.active.has-bottom-nav .hub-section-title {
  display: none !important;
}

#screen-hub.active.has-bottom-nav .service-grid {
  flex: none;
  min-height: auto;
  padding: 0 16px 12px;
  gap: var(--hub-grid-gap);
  grid-auto-rows: minmax(var(--hub-grid-row-min), auto);
  align-content: start;
}

#screen-hub.hub-rows-4.active.has-bottom-nav .service-grid {
  grid-auto-rows: minmax(88px, auto);
}

#screen-hub.hub-cards-detailed.active.has-bottom-nav .service-grid {
  grid-auto-rows: minmax(88px, auto);
}

#screen-hub.hub-cards-detailed.active.has-bottom-nav .service-card {
  min-height: var(--hub-card-min-h);
  padding: 11px 12px;
}

#screen-hub.hub-cards-detailed.active.has-bottom-nav .service-card .title {
  font-size: 0.88rem;
}

#screen-hub.hub-cards-detailed.active.has-bottom-nav .service-card .sub {
  font-size: 0.74rem;
}

#screen-hub.hub-cols-2.active.has-bottom-nav .service-grid {
  grid-template-columns: repeat(2, 1fr);
}

#screen-hub.hub-cols-3.active.has-bottom-nav .service-grid {
  grid-template-columns: repeat(3, 1fr);
}

body.embed-tight #screen-hub.active.has-bottom-nav .service-grid {
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(104px, auto);
}

#screen-hub.active.has-bottom-nav .service-card {
  min-height: var(--hub-card-min-h);
  height: auto;
  border-radius: 12px;
  overflow: visible;
}

#screen-hub.hub-cards-detailed .service-card {
  padding: 12px;
  gap: 8px;
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
  min-height: 112px;
}

#screen-hub.hub-cards-detailed .service-card .service-card-text {
  margin-top: 0;
  width: 100%;
  flex: 1;
  min-width: 0;
}

#screen-hub.hub-cards-detailed .service-card .title {
  font-size: 0.78rem;
  line-height: 1.25;
  word-break: break-word;
}

#screen-hub.hub-cards-detailed .service-card .sub {
  display: block;
  font-size: 0.66rem;
  line-height: 1.35;
  color: var(--lotus-text-muted);
  word-break: break-word;
}

#screen-hub.hub-cards-compact .service-card {
  padding: 12px 6px;
  gap: 6px;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  min-height: 84px;
}

#screen-hub.hub-cards-compact .service-card .title {
  font-size: 0.76rem;
  line-height: 1.25;
  word-break: break-word;
}

#screen-hub.hub-cols-3.hub-cards-detailed .service-card {
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  padding: 10px 6px;
  min-height: 96px;
}

#screen-hub.hub-cols-3.hub-cards-detailed .service-card .service-card-text {
  width: 100%;
}

#screen-hub.hub-cols-3.hub-cards-detailed .service-card .title {
  font-size: 0.74rem;
}

#screen-hub.hub-cols-3.hub-cards-detailed .service-card .sub {
  font-size: 0.62rem;
  line-height: 1.3;
  margin-top: 2px;
}

#screen-hub.hub-cards-compact .service-card .sub {
  display: none !important;
}

body.embed-compact #screen-hub.hub-cards-detailed .service-card .sub {
  font-size: 0.62rem;
}

body.embed-tight #screen-hub.active.has-bottom-nav .hub-hero {
  height: clamp(52px, 10dvh, 64px);
}

body.embed-tight {
  --hub-card-min-h: 104px;
  --hub-grid-row-min: 104px;
  --hub-hero-h-branded: clamp(52px, calc(var(--app-viewport-height, 100dvh) * 0.10), 64px);
}

body.embed-tight #screen-hub.hub-cards-detailed .service-card {
  min-height: var(--hub-card-min-h);
  padding: 10px;
}

body.in-iframe #screen-hub.active.has-bottom-nav {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: calc(var(--bottom-nav-offset, 64px) + 12px);
}

body.in-iframe #screen-hub.has-bottom-nav {
  padding-bottom: 0;
}

body.in-iframe #screen-hub .hub-header {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  grid-template-rows: 48px auto;
  flex-shrink: 0;
  align-items: center;
  justify-content: stretch;
  column-gap: 0;
  padding: 0 4px !important;
}

body.in-iframe #screen-hub .hub-brand,
body.in-iframe #screen-hub .hub-brand.lotus-wordmark {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  width: max-content;
  max-width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.525rem;
  letter-spacing: 0.06em;
  text-align: center;
  white-space: nowrap;
  padding-bottom: 0;
}

body.in-iframe #screen-hub .hub-cart-btn {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  z-index: 2;
}

body.in-iframe #screen-hub .hub-header-start {
  grid-column: 1;
  grid-row: 1;
}

body.in-iframe #screen-hub .hub-room-badge {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  z-index: 1;
}

body.in-iframe #screen-hub .hub-header-end {
  display: none !important;
}

body.in-iframe #screen-hub .hub-accent-rule {
  display: none !important;
}

body.in-iframe #screen-hub .hub-hero-brand,
body.in-iframe #screen-hub #hub-hero-brand {
  display: none !important;
}

body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero,
body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero--branded {
  margin: 0;
  height: clamp(80px, 13dvh, 96px);
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0;
  width: 100%;
}

body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero--branded .hub-hero-overlay {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8px 12px;
}

body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero--branded .hub-hero-overlay h2,
body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero--branded #hub-greeting {
  font-size: 1.24rem;
  line-height: 1.12;
}

body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero--branded .hub-hero-overlay p,
body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero--branded #hub-greeting-sub {
  font-size: 0.86rem;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.9);
}

body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero--text {
  margin: 0;
  height: clamp(80px, 13dvh, 96px);
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0;
  width: 100%;
}

body.in-iframe #screen-hub .hub-hero--text .hub-hero-photo,
body.in-iframe #screen-hub .hub-hero--text img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body.in-iframe #screen-hub .hub-hero--text .hub-hero-caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 18, 18, 0.75) 0%, transparent 70%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 14px;
}

body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero-brand {
  font-size: 0.95rem;
}

body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero-caption h2,
body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero-overlay h2 {
  font-size: 0.92rem;
  line-height: 1.15;
}

body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero-caption,
body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero-overlay {
  padding: 10px 12px;
}

body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero-caption p,
body.in-iframe #screen-hub.active.has-bottom-nav .hub-hero-overlay p {
  font-size: 0.72rem;
  margin-top: 2px;
}

body.in-iframe #screen-hub.active.has-bottom-nav .promo-banner,
body.in-iframe #screen-hub.active.has-bottom-nav #promo-banner {
  margin: 0 12px 8px;
  padding: 8px 12px;
  font-size: 0.72rem;
  line-height: 1.35;
}

body.in-iframe #screen-hub.active.has-bottom-nav .service-grid {
  flex: none;
  min-height: auto;
  align-content: start;
  grid-auto-rows: minmax(var(--hub-grid-row-min), auto);
  gap: 6px;
  padding: 0 12px 10px;
}

body.in-iframe #screen-hub.hub-cols-3.hub-cards-detailed .service-card {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  min-height: 76px;
  padding: 8px 4px;
}

body.in-iframe #screen-hub.hub-cols-3.hub-cards-detailed .service-card .icon {
  margin-top: 0;
}

body.in-iframe #screen-hub.hub-cols-3.hub-cards-detailed .service-card .title {
  font-size: 0.72rem;
}

body.in-iframe #screen-hub.hub-cols-3.hub-cards-detailed .service-card .sub {
  font-size: 0.6rem;
  line-height: 1.28;
}

body.in-iframe #screen-hub.hub-cards-detailed .service-card {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  min-height: var(--hub-card-min-h);
  padding: 10px;
}

body.in-iframe #screen-hub.hub-cards-detailed .service-card .icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 1px;
}

body.in-iframe #screen-hub.hub-cards-detailed .service-card .title {
  font-size: 0.84rem;
}

body.in-iframe #screen-hub.hub-cards-detailed .service-card .sub {
  font-size: 0.72rem;
  line-height: 1.28;
}

/* —— Catalog views (Tours, Spa, Room Service — shared) —— */
.shell-screen.catalog-screen.active {
  background: var(--lotus-bg);
  min-height: var(--app-viewport-height, 100dvh);
  max-height: var(--app-viewport-height, 100dvh);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.in-iframe .shell-screen.catalog-screen.active {
  min-height: 0;
  height: auto;
  max-height: var(--app-viewport-height, 100%);
}

.catalog-screen {
  padding-bottom: 88px;
}

.catalog-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--lotus-border-gold);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.catalog-topbar-text h2 {
  font-family: var(--lotus-font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--lotus-text);
  margin: 0;
  line-height: 1.2;
}

.catalog-topbar-text p {
  font-size: 0.78rem;
  color: var(--lotus-text-muted);
}

.catalog-screen .categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  scrollbar-width: none;
}

.catalog-screen .cv-categories-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}

.catalog-screen .cv-categories-wrap[hidden] {
  display: none !important;
}

html.platform-web .catalog-screen .cv-cat-arrow,
html[data-surface="web"] .catalog-screen .cv-cat-arrow {
  display: none !important;
}

.catalog-screen .cv-categories-wrap .categories,
.catalog-screen .cv-categories-wrap .cv-categories {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 12px;
  padding-right: 12px;
}

.catalog-screen .cv-categories-wrap.has-overflow .categories,
.catalog-screen .cv-categories-wrap.has-overflow .cv-categories {
  padding-left: 36px;
  padding-right: 36px;
}

.catalog-screen .cv-cat-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--lotus-border-gold);
  background: rgba(13, 13, 13, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--lotus-primary);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.catalog-screen .cv-cat-arrow:hover {
  background: var(--lotus-primary);
  color: #0d0d0d;
  border-color: var(--lotus-primary);
}

.catalog-screen .cv-cat-arrow-prev { left: 6px; }
.catalog-screen .cv-cat-arrow-next { right: 6px; }
.catalog-screen .cv-cat-arrow[hidden] { display: none; }

.catalog-screen .categories::-webkit-scrollbar {
  display: none;
}

.catalog-screen .cat-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--lotus-text-muted);
  border-radius: 0;
  padding: 4px 10px 4px 2px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--lotus-transition);
}

.catalog-screen .cat-btn-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(184, 146, 74, 0.42);
  color: var(--lotus-primary);
}

.catalog-screen .cat-btn:hover {
  color: var(--lotus-text);
}

.catalog-screen .cat-btn:hover .cat-btn-icon {
  border-color: var(--lotus-primary);
}

.catalog-screen .cat-btn.active {
  background: transparent;
  color: #fff;
  border: none;
  font-weight: 600;
}

.catalog-screen .cat-btn.active .cat-btn-icon {
  border-color: var(--lotus-primary);
}

.catalog-screen .cat-btn.active .app-icon {
  color: var(--lotus-primary);
  background: rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  padding: 3px;
  box-sizing: content-box;
}

.catalog-screen .items-hint,
.catalog-screen .cv-items-hint {
  padding: 8px 16px 0;
  font-size: 0.82rem;
  color: var(--lotus-text-muted);
}

.catalog-screen .items,
.catalog-screen .cv-items {
  padding: 8px 12px 12px;
  display: grid;
  gap: 12px;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.catalog-screen .item-card {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--lotus-bg-card);
  border: 1px solid var(--lotus-border);
  border-radius: var(--lotus-radius);
  padding: 10px;
}

.catalog-screen .item-card--openable {
  cursor: pointer;
}

.catalog-screen .item-card--openable:focus-visible {
  outline: 2px solid var(--lotus-primary, #b8924a);
  outline-offset: 2px;
}

.catalog-screen .item-open-hint {
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--lotus-primary, #b8924a);
}

.catalog-screen.cv-item-detail .cv-categories-wrap,
.catalog-screen.cv-item-detail #categories,
.catalog-screen.cv-item-detail .cv-categories {
  display: none !important;
}

.catalog-screen .item-detail-view {
  margin: 0;
}

.catalog-screen .item-detail-hero-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #050505;
  cursor: zoom-in;
}

.catalog-screen .item-detail-hero-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 320px;
  object-fit: cover;
}

.catalog-screen .item-detail-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 8px 0 16px;
}

.catalog-screen .item-detail-qty .qty-num {
  min-width: 2rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
}

.catalog-screen .item-detail-view .room-detail-btn {
  margin-top: 4px;
}

.catalog-screen .item-image-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 78px;
  padding: 0;
  border: none;
  background: var(--lotus-bg-elevated);
  cursor: pointer;
  border-radius: var(--lotus-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.catalog-screen .item-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.catalog-screen .item-info {
  min-width: 0;
}

.catalog-screen .item-info h3 {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
}

.catalog-screen .item-info .meta {
  font-size: 0.78rem;
  color: var(--lotus-text-muted);
  margin-top: 3px;
  line-height: 1.35;
  word-break: break-word;
}

.catalog-screen .item-info .price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--lotus-primary);
  margin-top: 4px;
}

.catalog-screen .item-info .price s {
  color: var(--lotus-text-muted);
  font-weight: 500;
  margin-right: 0.35em;
}

.catalog-screen .item-info .price strong {
  color: var(--lotus-primary);
  font-weight: 700;
}

.catalog-screen .item-info .price.complimentary {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lotus-text-muted);
  letter-spacing: 0.04em;
}

.catalog-screen .qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.catalog-screen .qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--lotus-primary);
  color: #0D0D0D;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.25s var(--lotus-ease), transform 0.2s var(--lotus-ease);
  flex-shrink: 0;
}

.catalog-screen .qty-btn:hover:not(:disabled) {
  background: var(--lotus-primary-dark);
  transform: scale(1.08);
}

.catalog-screen .qty-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.catalog-screen .qty-num {
  font-family: var(--lotus-font-body);
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 16px;
  text-align: center;
}

.catalog-screen .laundry-select-btn {
  appearance: none;
  border: 1.5px solid var(--lotus-primary, #B8924A);
  background: transparent;
  color: var(--lotus-primary, #B8924A);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
}

.catalog-screen .laundry-select-btn.is-selected {
  background: var(--lotus-primary, #B8924A);
  color: #0D0D0D;
}

#screen-laundry .cv-cart-bar,
#screen-laundry .cart-bar {
  display: none !important;
}

.catalog-screen .cart-bar,
.catalog-screen .cv-cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: none;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 50;
  box-shadow: none;
  min-height: 64px;
}

.catalog-screen .cart-summary {
  flex: 1;
  min-width: 0;
}

.catalog-screen .cart-summary .count,
.catalog-screen .cart-summary .cv-cart-count {
  font-size: 0.82rem;
  font-weight: 600;
}

.catalog-screen .cart-summary .total,
.catalog-screen .cart-summary .cv-cart-total {
  font-size: 0.78rem;
  color: var(--lotus-text-muted);
  margin-top: 2px;
}

.catalog-screen .order-btn,
.catalog-screen .cv-order-btn {
  background: var(--lotus-primary);
  color: #0D0D0D;
  border: none;
  border-radius: var(--lotus-radius-pill);
  padding: 12px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--lotus-font-body);
  transition: background var(--lotus-transition), transform var(--lotus-transition), box-shadow var(--lotus-transition);
}

.catalog-screen .order-btn:hover:not(:disabled),
.catalog-screen .cv-order-btn:hover:not(:disabled) {
  background: var(--lotus-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--lotus-primary-glow);
}

.catalog-screen .order-btn:disabled,
.catalog-screen .cv-order-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.catalog-screen .appointment-panel,
.catalog-screen .cv-appointment-panel {
  margin: 0 16px 12px;
  padding: 14px;
  background: var(--lotus-bg-card);
  border: 1px solid var(--lotus-border);
  border-radius: var(--lotus-radius);
}

.catalog-screen .appointment-title,
.catalog-screen .cv-appointment-title {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.catalog-screen .appointment-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.catalog-screen .appointment-fields--date-only,
.catalog-screen .appointment-panel--date-only .appointment-fields {
  grid-template-columns: 1fr;
}

.catalog-screen .item-info .item-schedule {
  display: block;
  margin-top: 4px;
  font-weight: 600;
  color: var(--lotus-primary);
}

.catalog-screen .appointment-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--lotus-text-muted);
}

.catalog-screen .appointment-field input,
.catalog-screen .appointment-field select {
  width: 100%;
  min-height: 42px;
  background: var(--lotus-bg);
  border: 1px solid var(--lotus-border);
  color: var(--lotus-text);
  border-radius: var(--lotus-radius-sm);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: var(--lotus-font-body);
  color-scheme: dark;
}

.catalog-screen .appointment-field input[type="date"],
.catalog-screen .appointment-field input[type="time"],
.catalog-screen .tour-date-input {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  min-height: 48px;
  color: #fff;
}

.catalog-screen .appointment-field select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23B8924A' d='M1.4 0.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 7px;
  padding-right: 28px;
}

.catalog-screen .appointment-field select option {
  color: #F5EFE6;
  background: #0D0D0D;
}

.catalog-screen .appointment-field input[type="date"]::-webkit-calendar-picker-indicator,
.catalog-screen .appointment-field input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0.9;
  cursor: pointer;
  filter: none;
}

.catalog-screen .appointment-field input:focus,
.catalog-screen .appointment-field select:focus {
  outline: 2px solid rgba(197, 168, 128, 0.45);
  outline-offset: 1px;
}

/* Spa — date/time step after treatments are chosen */
.catalog-screen.cv-schedule-step .cv-categories-wrap,
.catalog-screen.cv-schedule-step .cv-categories,
.catalog-screen.cv-schedule-step .categories,
.catalog-screen.cv-schedule-step .cv-items,
.catalog-screen.cv-schedule-step .items {
  display: none !important;
}

.catalog-screen.cv-schedule-step .cv-items-hint,
.catalog-screen.cv-schedule-step .items-hint {
  flex-shrink: 0;
  padding: 12px 16px 0;
  margin: 0;
  color: var(--lotus-text-muted);
  font-size: 0.82rem;
}

.catalog-screen.cv-schedule-step .cv-appointment-panel,
.catalog-screen.cv-schedule-step .appointment-panel {
  flex: 1 1 auto;
  min-height: 0;
  margin: 8px 16px 12px;
}

.catalog-screen.cv-schedule-step .appointment-fields {
  grid-template-columns: 1fr;
  gap: 14px;
}

body.in-iframe .catalog-screen .item-card {
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px;
  max-width: 100%;
  min-width: 0;
}

body.shell-app.platform-web .catalog-screen .item-card,
body.shell-app:not(.in-iframe) .catalog-screen .item-card {
  max-width: 100%;
  min-width: 0;
}

html[data-surface="web"] body.shell-app .catalog-screen .item-card,
html[data-surface="browser"] body.shell-app .catalog-screen .item-card {
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px;
}

body.in-iframe .catalog-screen .item-image-btn {
  width: 80px;
  height: 60px;
}

body.in-iframe .catalog-screen .item-info h3 {
  font-size: 0.84rem;
}

body.in-iframe .catalog-screen .item-info .meta {
  font-size: 0.7rem;
}

body.in-iframe .catalog-screen .appointment-fields {
  grid-template-columns: 1fr;
}

/* Marketing demo launcher — fill frame, tab bar flush to bottom */
html.in-iframe {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

body.in-iframe.shell-app {
  display: flex;
  flex-direction: column;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow: hidden;
  width: 100% !important;
  max-width: 100% !important;
  --hub-card-min-h: 76px;
  --hub-grid-row-min: 76px;
}

body.in-iframe.shell-app #screen-hub.hub-cols-3 {
  --hub-card-min-h: 68px;
  --hub-grid-row-min: 68px;
}

body.in-iframe.shell-app #screen-hub.active.has-bottom-nav {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 0;
}

body.in-iframe.shell-app #screen-hub .hub-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

body.in-iframe.shell-app #screen-hub.active.has-bottom-nav .service-grid {
  flex: 1 1 auto;
  min-height: 0;
  align-content: stretch;
  grid-auto-rows: minmax(var(--hub-grid-row-min), 1fr);
  overflow: visible;
  scroll-padding-bottom: 8px;
}

body.in-iframe.shell-app #screen-hub.hub-cards-detailed .service-card {
  min-height: var(--hub-card-min-h);
  height: 100%;
}

body.in-iframe.shell-app #screen-hub.hub-cards-detailed .service-card .title {
  font-size: 0.9rem;
}

body.in-iframe.shell-app #screen-hub.hub-cards-detailed .service-card .sub {
  font-size: 0.78rem;
}

body.in-iframe.shell-app #screen-hub.active.has-bottom-nav .hub-hero--branded {
  height: clamp(72px, 12dvh, 88px);
  margin: 0;
  overflow: hidden;
  border-radius: 0;
  width: 100%;
}

body.in-iframe.shell-app #screen-hub.hub-cols-2.active.has-bottom-nav .promo-banner {
  margin: 0 12px 4px;
  padding: 6px 10px;
  font-size: 0.68rem;
  line-height: 1.3;
}

body.in-iframe.shell-app #screen-hub.hub-cols-3.hub-cards-detailed .service-card {
  min-height: 72px;
  padding: 8px 4px;
}

body.in-iframe.shell-app #screen-hub.hub-cols-3.hub-cards-detailed .service-card .title {
  font-size: 0.74rem;
}

body.in-iframe.shell-app #screen-hub.hub-cols-3.hub-cards-detailed .service-card .sub {
  font-size: 0.62rem;
}

body.in-iframe.shell-app #screen-hub.active.has-bottom-nav .hub-hero--text {
  margin: 0;
  height: clamp(72px, 12dvh, 88px);
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
  width: 100%;
}

body.in-iframe.shell-app #screen-hub .hub-hero--text .hub-hero-photo,
body.in-iframe.shell-app #screen-hub .hub-hero--text img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body.in-iframe.shell-app #screen-hub .hub-hero--text .hub-hero-caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 18, 18, 0.75) 0%, transparent 70%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 14px;
}

body.in-iframe.shell-app #screen-hub .hub-hero--text .hub-hero-caption h2 {
  font-size: 1.05rem;
  margin: 0;
}

body.in-iframe.shell-app #screen-hub .hub-hero--text .hub-hero-caption p {
  margin-top: 2px;
  font-size: 0.72rem;
}

body.in-iframe.shell-app #screen-hub.active.has-bottom-nav .hub-hero {
  flex-shrink: 0;
}

body.in-iframe.shell-app #screen-hub.active.has-bottom-nav .hub-footer {
  display: none;
}

body.in-iframe.shell-app #screen-messages.active.has-bottom-nav {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.in-iframe.shell-app #screen-messages.has-bottom-nav .messages-footer {
  margin-bottom: 0;
}

body.in-iframe.shell-app #screen-messages.has-bottom-nav .messages-footer.compose-pinned {
  bottom: 0;
}

body.in-iframe.shell-app #app-bottom-nav:not([hidden]) {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-top: 0;
  min-height: 54px;
  max-height: none;
  padding: 4px 8px 6px;
  overflow: visible;
}

body.in-iframe.shell-app .bottom-nav-btn {
  min-height: 44px;
  gap: 3px;
  justify-content: center;
}

body.in-iframe.shell-app .bottom-nav-btn > span:not(.nav-icon):not(.nav-badge):not(.app-icon) {
  display: block !important;
  font-size: 0.62rem;
  line-height: 1.15;
}

body.in-iframe.shell-app .bottom-nav-btn .nav-icon,
body.in-iframe.shell-app .bottom-nav-btn .app-icon {
  width: 1.1rem;
  height: 1.1rem;
}

/* —— Message bubbles —— */
.msg-bubble {
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--lotus-border);
  background: var(--lotus-bg-card);
  font-family: var(--lotus-font-body);
}

.msg-bubble.msg-guest {
  align-self: flex-end;
  background: rgba(184, 146, 74, 0.1);
  border-color: rgba(184, 146, 74, 0.28);
}

.msg-bubble.msg-staff {
  align-self: flex-start;
}

.msg-bubble.msg-concierge {
  align-self: flex-start;
  background: var(--lotus-bg-elevated);
  border-color: var(--lotus-border-gold);
}

.messages-mode-live .msg-bubble.msg-concierge {
  background: var(--lotus-bg-card);
  border-color: var(--lotus-border);
}

.msg-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-family: var(--lotus-font-body);
  color: var(--lotus-text-muted);
  margin-bottom: 6px;
}

.msg-meta-prominent {
  margin-bottom: 8px;
}

.msg-dept {
  font-weight: 600;
  color: var(--lotus-primary);
}

.msg-dept-lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}

.msg-dept-icon {
  font-size: 1rem;
  line-height: 0;
}

.msg-dept-icon:has(svg) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  font-size: 0;
  color: var(--lotus-primary, var(--apsara-primary, #B8924A));
}

.msg-dept-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.msg-dept-icon:has(.msg-lotus-mark) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  overflow: visible !important;
  flex-shrink: 0;
  line-height: 0;
  font-size: 0;
}

.msg-lotus-mark {
  display: block;
  width: 22px;
  height: 22px;
  max-width: none;
  padding: 0;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: screen;
  filter: none;
}

.msg-text {
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--lotus-text);
}

.msg-bubble.msg-thinking {
  min-width: 108px;
  padding-bottom: 12px;
}

.msg-thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 14px;
  padding: 2px 0 0;
}

.msg-thinking-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lotus-primary);
  animation: msg-thinking-bounce 1.4s infinite ease-in-out;
  opacity: 0.35;
}

.msg-thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.msg-thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes msg-thinking-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.msg-meta time {
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* —— Chat quick-action pills (shared booking + concierge) —— */
.msg-chat-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

.msg-chat-btn-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.msg-chat-btn-row:has(.msg-chat-btn:only-child) {
  grid-template-columns: 1fr;
}

.msg-chat-btn-row .msg-chat-btn:nth-child(3):last-child {
  grid-column: 1 / -1;
}

.msg-chat-btn-row-qty {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.msg-chat-btn {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--lotus-radius-pill);
  font-family: var(--lotus-font-body);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background var(--lotus-transition), border-color var(--lotus-transition), color var(--lotus-transition), opacity var(--lotus-transition);
}

.msg-chat-btn-primary,
.msg-markdown-link.msg-chat-btn {
  border: 1px solid var(--lotus-primary);
  background: rgba(184, 146, 74, 0.18);
  color: var(--lotus-primary);
}

.msg-chat-btn-secondary,
.msg-chat-btn-default {
  border: 1px solid rgba(184, 146, 74, 0.35);
  background: rgba(184, 146, 74, 0.06);
  color: var(--lotus-primary);
}

.msg-chat-btn-qty {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(184, 146, 74, 0.35);
  background: rgba(184, 146, 74, 0.08);
  color: var(--lotus-primary);
  font-size: 1.05rem;
  line-height: 1;
}

.msg-chat-btn-qty-readonly {
  flex: 1;
  max-width: 3.5rem;
  min-height: 2.5rem;
  border: 1px solid rgba(184, 146, 74, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--lotus-text);
  font-size: 0.9rem;
  cursor: default;
}

.msg-chat-btn:hover:not(:disabled):not(.msg-chat-btn-qty-readonly) {
  background: rgba(184, 146, 74, 0.24);
  border-color: var(--lotus-primary);
}

.msg-chat-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.in-iframe .msg-chat-btn {
  font-size: 0.72rem;
  min-height: 38px;
  padding: 7px 8px;
}

html.shell-app,
body.shell-app,
html.tg-app,
body.tg-app,
html.in-iframe,
body.in-iframe {
  height: var(--app-viewport-height, 100%);
  min-height: 0;
  overflow: hidden;
}

body.platform-web:not(.in-iframe) {
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-shadow: none;
}

/* ——
 * Standalone browser / web guest — fluid responsive layout.
 * On wide screens the shell stays phone-width and is centred.
 * On real phones it fills the whole viewport.
 * NEVER apply a fixed pixel height — use dvh so virtual keyboard and safe areas work.
 */
@media (min-width: 520px) {
  html[data-surface="browser"]:not(.tg-app):not(.in-iframe),
  html[data-surface="web"]:not(.tg-app):not(.in-iframe) {
    background: #000;
    min-height: 100%;
  }

  html[data-surface="browser"]:not(.tg-app):not(.in-iframe) body.shell-app:not(.in-iframe):not(.tg-app),
  html[data-surface="web"]:not(.tg-app):not(.in-iframe) body.shell-app:not(.in-iframe):not(.tg-app) {
    width: 100%;
    max-width: 480px;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    margin: 0 auto;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  }
}

/* Phones (< 520px): fill the whole screen edge-to-edge */
@media (max-width: 519px) {
  html[data-surface="browser"]:not(.tg-app):not(.in-iframe) body.shell-app:not(.in-iframe):not(.tg-app),
  html[data-surface="web"]:not(.tg-app):not(.in-iframe) body.shell-app:not(.in-iframe):not(.tg-app) {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
  }
}

body.shell-app.in-iframe,
body.shell-app.platform-web.in-iframe {
  height: 100% !important;
  max-height: 100% !important;
}

body.in-iframe .subpage-header.tab-screen-header,
body.in-iframe .messages-header.tab-screen-header,
body.in-iframe .activity-header.tab-screen-header {
  padding-right: 16px !important;
}

/* —— Unified viewport shell (Telegram + web iframe + demo launcher) —— */
body.shell-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: var(--app-viewport-height, 100dvh);
  min-height: 0;
  max-height: var(--app-viewport-height, 100dvh);
  overflow: hidden;
  overflow-x: hidden;
}

body.shell-app .shell-screen {
  display: none !important;
  min-height: 0 !important;
  padding-bottom: 0 !important;
}

body.shell-app .shell-screen.active {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  overflow-x: hidden;
}

/* Lang / room / waiting may still need scroll on short viewports */
body.shell-app #screen-lang.active,
body.shell-app #screen-room.active,
body.shell-app #screen-waiting.active {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Stay form is compacted to fit one screen — no scroll */
body.shell-app #screen-stay.active {
  overflow: hidden;
}

body.shell-app .shell-screen.messages-screen.active {
  min-height: 0;
}

body.shell-app #app-bottom-nav:not([hidden]) {
  position: relative;
  flex: 0 0 auto;
  flex-shrink: 0;
  bottom: auto;
  left: auto;
  right: auto;
  width: 100%;
  margin-top: 0;
  z-index: 40;
  min-height: calc(56px + var(--tg-safe-bottom, env(safe-area-inset-bottom, 0px)));
  max-height: none;
}

body.shell-app #screen-hub.has-bottom-nav,
body.shell-app #screen-activity.has-bottom-nav,
body.shell-app #screen-messages.has-bottom-nav {
  padding-bottom: 0;
}

body.shell-app #screen-hub.active.has-bottom-nav {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0 !important;
  overflow: hidden;
  height: auto !important;
  max-height: none !important;
}

body.shell-app #screen-hub .hub-main {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.shell-app #screen-hub.active.has-bottom-nav .hub-main {
  max-height: none;
}

body.shell-app #screen-hub.active.has-bottom-nav .hub-hero,
body.shell-app #screen-hub.active.has-bottom-nav .hub-hero--text {
  flex-shrink: 0;
  height: clamp(72px, calc(var(--app-viewport-height, 100dvh) * 0.14), 132px);
  margin: 0;
  border-radius: 0;
  width: 100%;
}

body.shell-app #screen-hub.active.has-bottom-nav .hub-hero--branded {
  flex-shrink: 0;
  height: var(--hub-hero-h-branded);
  margin: 0;
  border-radius: 0;
  width: 100%;
}

body.in-iframe.shell-app #screen-hub.active.has-bottom-nav .hub-hero--branded {
  height: clamp(80px, 13dvh, 96px);
  margin: 0;
  border-radius: 0;
  width: 100%;
}

body.shell-app #screen-hub.active.has-bottom-nav .promo-banner {
  flex-shrink: 0;
  margin: 0 12px 6px;
}

body.shell-app #screen-hub.active.has-bottom-nav .service-grid {
  flex: 1 1 0;
  min-height: 0;
  align-content: stretch;
  grid-auto-rows: minmax(var(--hub-grid-row-min, 84px), 1fr);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-padding-bottom: 8px;
  padding: 0 12px 8px;
  gap: clamp(6px, calc(var(--app-viewport-height, 100dvh) * 0.01), 10px);
}

body.shell-app #screen-hub.active.has-bottom-nav .service-card {
  height: 100%;
  min-height: var(--hub-card-min-h, 84px);
}

body.shell-app #screen-hub.hub-cards-detailed.active.has-bottom-nav .service-card {
  min-height: var(--hub-card-min-h, 88px);
  height: 100%;
  justify-content: flex-start;
}

body.shell-app #screen-hub.hub-cols-3.hub-cards-detailed.active.has-bottom-nav .service-card {
  padding: 8px 4px;
}

body.shell-app #screen-messages.has-bottom-nav .messages-footer {
  margin-bottom: 0;
}

body.shell-app #screen-messages.has-bottom-nav .messages-footer.compose-pinned {
  bottom: 0;
}

body.shell-app #screen-activity.active.has-bottom-nav {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.shell-app .shell-screen.catalog-screen.active {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

/* Wizard & gallery subpages — scroll content under sticky header */
body.shell-app .shell-screen.active > .subpage-header,
body.shell-app .shell-screen.active > .flow-hero {
  flex-shrink: 0;
}

body.shell-app .shell-screen.active > .wizard-body,
body.shell-app .shell-screen.active > .gallery-list,
body.shell-app .shell-screen.active > .info-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  align-content: start;
  grid-auto-rows: auto;
}

body.shell-app #screen-rooms.active > .promo-banner {
  flex-shrink: 0;
}

body.shell-app .shell-screen.catalog-screen.active > .catalog-topbar,
body.shell-app .shell-screen.catalog-screen.active > .flow-hero,
body.shell-app .shell-screen.catalog-screen.active > .subpage-header,
body.shell-app .shell-screen.catalog-screen.active > .cv-appointment-panel,
body.shell-app .shell-screen.catalog-screen.active > .appointment-panel,
body.shell-app .shell-screen.catalog-screen.active > .categories,
body.shell-app .shell-screen.catalog-screen.active > .cv-categories,
body.shell-app .shell-screen.catalog-screen.active > .cv-categories-wrap,
body.shell-app .shell-screen.catalog-screen.active > .items-hint,
body.shell-app .shell-screen.catalog-screen.active > .cv-items-hint {
  flex-shrink: 0;
}

body.shell-app .shell-screen.catalog-screen.active > .cv-items,
body.shell-app .shell-screen.catalog-screen.active > .items {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

/* Iframe launcher — keep menu list height-bounded so it always scrolls */
body.in-iframe.shell-app .shell-screen.catalog-screen.active > .cv-items,
body.in-iframe.shell-app .shell-screen.catalog-screen.active > .items {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  max-height: none;
  overflow-y: auto !important;
  touch-action: pan-y;
}

body.shell-app .shell-screen.catalog-screen.active > .cv-cart-bar,
body.shell-app .shell-screen.catalog-screen.active > .cart-bar {
  flex-shrink: 0;
}

/* When-step: chips must scroll; cart bar stays fully visible. */
body.shell-app .shell-screen.catalog-screen.active.cv-schedule-step > .cv-appointment-panel,
body.shell-app .shell-screen.catalog-screen.active.cv-schedule-step > .appointment-panel {
  flex: 1 1 0 !important;
  flex-shrink: 1 !important;
  min-height: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.embed-compact {
  --hub-card-min-h: 88px;
  --hub-hero-h-branded: clamp(56px, 10dvh, 68px);
}

body.embed-compact #screen-hub.active.has-bottom-nav .hub-hero,
body.embed-compact #screen-hub.active.has-bottom-nav .hub-hero--branded {
  height: var(--hub-hero-h-branded);
}

body.embed-tight #screen-hub.active.has-bottom-nav .hub-hero,
body.embed-tight #screen-hub.active.has-bottom-nav .hub-hero--branded {
  height: var(--hub-hero-h-branded);
}

/* —— Hub layout guard (must stay last) —— */
/* Telegram + standalone: grid stretches to fill space above bottom nav */
body.shell-app:not(.in-iframe) #screen-hub.active.has-bottom-nav .service-grid,
body.shell-app.tg-app #screen-hub.active.has-bottom-nav .service-grid {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  align-content: stretch !important;
  grid-auto-rows: minmax(var(--hub-grid-row-min), 1fr) !important;
}

/* Demo launcher iframe — scroll inside hub-main if content overflows */
body.in-iframe.shell-app #screen-hub.active.has-bottom-nav .service-grid {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  align-content: stretch !important;
  grid-auto-rows: minmax(var(--hub-grid-row-min), 1fr) !important;
}

#screen-hub.hub-cards-detailed.active.has-bottom-nav .service-card,
body.in-iframe:not(.platform-web) #screen-hub.hub-cards-detailed .service-card,
body.shell-app:not(.platform-web) #screen-hub.hub-cards-detailed.active.has-bottom-nav .service-card {
  min-height: var(--hub-card-min-h) !important;
  overflow: visible !important;
}

body.in-iframe.shell-app #screen-hub.hub-cards-detailed .service-card {
  min-height: var(--hub-card-min-h) !important;
  height: 100% !important;
  overflow: visible !important;
}

/* —— Shell + external bottom nav: tab screens share viewport with nav —— */
body.shell-app #screen-hub.active.has-bottom-nav {
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  flex: 1 1 0 !important;
  overflow: hidden !important;
}

body.shell-app #screen-activity.active.has-bottom-nav,
body.shell-app #screen-messages.active.has-bottom-nav,
body.shell-app #screen-offers.active.has-bottom-nav,
body.shell-app #screen-cart.active.has-bottom-nav,
body.shell-app #screen-info.active.has-bottom-nav {
  min-height: 0 !important;
  max-height: calc(var(--app-viewport-height, 100dvh) - var(--bottom-nav-offset, 56px)) !important;
  height: auto !important;
  flex: 1 1 0 !important;
  overflow: hidden !important;
}

body.tg-app.shell-app {
  --hub-hero-h-branded: clamp(96px, 17dvh, 124px);
  --hub-card-min-h: 84px;
  --hub-grid-row-min: 84px;
}

body.tg-app.shell-app #screen-hub.hub-cards-detailed .service-card .sub,
body.shell-app #screen-hub.hub-cards-detailed .service-card .sub {
  display: block !important;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--lotus-text-muted);
}

/* —— Catalog scroll fix (iframe + shell-app): cart in flex flow, list scrolls above it —— */
body.shell-app .catalog-screen {
  padding-bottom: 0;
}

body.shell-app .shell-screen.catalog-screen.active .cart-bar,
body.shell-app .shell-screen.catalog-screen.active .cv-cart-bar {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  flex: 0 0 auto;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

body.in-iframe.shell-app .shell-screen.catalog-screen.active {
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}

body.shell-app .shell-screen.catalog-screen.active > .cv-items,
body.shell-app .shell-screen.catalog-screen.active > .items {
  scroll-padding-bottom: 12px;
}

/* Powered by Lotus Systems — guest pre-arrival & in-room (all plans) */
.built-by-lotus {
  flex-shrink: 0;
  margin: 4px 0 6px;
  padding: 0 12px;
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--lotus-text-faint, #555555);
}
.built-by-lotus a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}
.built-by-lotus-mark {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}
#screen-lang .built-by-lotus {
  margin-top: 18px;
  padding-bottom: 4px;
}
body.in-iframe.shell-app #screen-hub.active.has-bottom-nav .built-by-lotus {
  display: block;
}

/* Full-bleed top photo banners — square, edge-to-edge (web + Telegram) */
.hub-hero,
.hub-hero--branded,
.hub-hero--text,
#screen-hub.active.has-bottom-nav .hub-hero,
#screen-hub.active.has-bottom-nav .hub-hero--branded,
#screen-hub.active.has-bottom-nav .hub-hero--text {
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-radius: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

/* Catalog product image lightbox (appended to body; not in mini-app.css for concierge/booking) */
body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

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

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.image-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.image-lightbox-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: min(70dvh, calc(100dvh - 120px));
  object-fit: contain;
  border-radius: 12px;
  background: #111;
}

.image-lightbox-caption {
  color: var(--lotus-text, #fff);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  padding: 0 8px;
  margin: 0;
}

.image-lightbox-close {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  z-index: 2;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

