/* Phone-site rules for the static phone site (phone-build/build.js). This file is only ever
   loaded by the phone site, never by a kiosk, so the rules apply at every width: phones get the
   layout below, and tablets and desktops get the same layout as one centred column (the kiosk
   pages are drawn for a 1080 px portrait screen and look broken when simply stretched). */

/* ---- Shared frame ---------------------------------------------------------------------- */
*,
*::before,
*::after {
  cursor: auto !important;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  overflow-x: hidden;
  /* A tap is a tap: no 300 ms double-tap wait and no grey flash. */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* The kiosk slides every page in over 0.55 s; on a phone a tap should land at once. */
.stage {
  animation-duration: 0.18s !important;
}
/* Pressed state: the only feedback a finger gets. */
.card:active,
.mtile:active,
.fcard:active,
.tile:active,
.chip:active,
.pill:active,
.dock a:active {
  transform: scale(0.97);
  transition: transform 0.06s;
}
.stage {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  height: 100dvh;
  min-height: 100svh;
}
img,
video {
  max-width: 100%;
}
.dock {
  padding: 8px;
  gap: 6px;
  border-radius: 22px;
  margin-top: 12px;
  margin-bottom: env(safe-area-inset-bottom);
}
.dock a {
  padding: 8px 0;
  gap: 4px;
  border-radius: 14px;
  min-height: 48px;
}
.dock a .lbl {
  font-size: 12px;
}
.dock a svg {
  width: 20px;
  height: 20px;
}
.pill {
  padding: 10px 18px;
  font-size: 15px;
  gap: 7px;
}
/* Kiosk QR corners make no sense on the phone itself. */
.qr,
.qrs,
.qrbox,
#appQrBadge {
  display: none !important;
}
/* Idle screen = the kiosk's language gate; on a phone start on the home page instead. */
html.phone-site body.idle {
  display: none;
}

/* ---- Pages that scroll on a phone (everything except the map) ------------------------- */
.stage:not(:has(.vp-wrap)) {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}
.stage:not(:has(.vp-wrap)) .scroll,
.stage:not(:has(.vp-wrap)) .detail-scroll {
  overflow: visible;
  flex: none;
}

/* ---- Shared page header (brand + language) -------------------------------------------- */
.topbar {
  gap: 8px;
}
.brandmark {
  gap: 10px;
  min-width: 0;
}
.brandmark .dot {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 4px rgba(201, 154, 60, 0.18);
}
.brandmark .wm {
  font-size: 22px;
  white-space: nowrap;
}
.brandmark .wm small {
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 2px;
  white-space: nowrap;
}
.langtoggle {
  padding: 4px;
  gap: 2px;
  flex-shrink: 0;
}
.langtoggle button {
  min-width: 52px;
  min-height: 40px;
  padding: 0 12px;
  font-size: 14px;
}
.langtoggle button[lang='ar'] {
  font-size: 15px;
}
.greet-chip {
  min-height: 40px;
  padding: 0 12px;
  font-size: 14px;
  gap: 6px;
}
.greet-chip svg {
  width: 16px;
  height: 16px;
}

/* ---- Photo hero used by the list pages (shops, offers, events, services) --------------- */
.hero {
  border-radius: 22px;
}
.hero .inner {
  padding: 20px;
  min-height: 132px;
  gap: 12px;
  flex-wrap: wrap;
}
.hero h1 {
  font-size: 36px;
  line-height: 1;
}
.hero .sub {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.35;
}
.hero .count {
  font-size: 13px;
  padding: 7px 12px;
}

/* ---- Filters (levels + categories) ---------------------------------------------------- */
.filters {
  gap: 8px;
}
.levels {
  margin-inline-start: 0;
  gap: 6px;
  width: 100%;
}
.lv,
.cat {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  white-space: nowrap;
}
.levels .lv {
  flex: 1;
  justify-content: center;
}
/* Categories scroll sideways in one row instead of filling half the screen. */
.cats {
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 2px 16px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cats::-webkit-scrollbar {
  display: none;
}
.cats .cat {
  flex-shrink: 0;
}

/* ---- Shop list cards ------------------------------------------------------------------ */
.grid {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 2px 0 16px;
}
@media (min-width: 480px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}
.card {
  min-height: 0;
  padding: 10px;
  gap: 12px;
  border-radius: 16px;
}
/* Cards far below the screen are not drawn until scrolled near, so their photos are not
   downloaded up front either (43 shops on one page). */
.grid .card {
  content-visibility: auto;
  contain-intrinsic-size: auto 78px;
}
.thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  font-size: 24px;
}
.info .nm,
.card .info .nm {
  font-size: 16px;
}
.info .nm-ar {
  font-size: 13px;
}
.info .mt {
  font-size: 13px;
}
.unit {
  font-size: 12px;
  padding: 3px 8px;
}
.empty {
  padding: 40px 16px;
  gap: 10px;
}
.empty .ico {
  font-size: 44px;
}
.empty p {
  font-size: 16px;
}
.err,
.loading {
  font-size: 16px;
  padding: 16px 4px;
}

/* ---- Offers, events, services cards ----------------------------------------------------- */
.card .badge {
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 10px;
}
.card .nm {
  font-size: 20px;
  line-height: 1.2;
}
.card .nm-ar {
  font-size: 15px;
}
.card .desc,
.info .desc {
  font-size: 14px;
  line-height: 1.45;
}
.card .valid {
  font-size: 13px;
}
.datebox {
  width: 64px;
  min-width: 64px;
  height: auto;
  min-height: 64px;
  padding: 8px 0;
  border-radius: 14px;
  flex-shrink: 0;
}
.datebox .day {
  font-size: 26px;
}
.datebox .mon {
  font-size: 11px;
}
.mapbtn {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  gap: 6px;
  margin-top: 6px;
}

/* ---- Shop detail (shop-detail.html) --------------------------------------------------- */
.page-head {
  gap: 10px;
}
.page-head h2 {
  font-size: 20px;
}
.back-pill {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.hero:has(.cap) {
  height: 220px;
  border-radius: 22px;
}
.hero .cap {
  padding: 56px 18px 18px;
  gap: 4px;
}
.hero .cap h1 {
  font-size: 28px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.hero .ar-nm {
  font-size: 17px;
}
.hero .placeholder {
  font-size: 72px;
}
.logo-chip {
  right: 14px;
  bottom: -26px;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  padding: 6px;
  border-width: 2px;
}
.has-logo + .badges {
  margin-top: 34px;
}
.badges {
  gap: 8px;
}
.b {
  font-size: 14px;
  min-height: 36px;
  padding: 0 14px;
}
.sec-t {
  font-size: 12px;
  margin: 18px 0 8px;
  gap: 8px;
}
.gal {
  border-radius: 16px;
}
.gal .slides > * {
  height: 220px;
  width: 100%;
}
video.shopvid {
  max-height: 240px;
  border-radius: 16px;
}
.desc {
  font-size: 16px;
  line-height: 1.55;
  padding: 2px 0 14px;
}
.cta {
  gap: 10px;
}
.cta a {
  height: 52px;
  font-size: 16px;
  gap: 8px;
}
.cta a svg {
  width: 20px;
  height: 20px;
}
.cta .back-btn {
  font-size: 15px;
}

/* ---- Home (index.html) ---------------------------------------------------------------- */
/* One background photo instead of two cross-fading ones: the second (~300 KB) is never
   downloaded on the phone site. */
.bg .layer.b {
  display: none;
}
.bg .layer.a {
  animation: none;
  opacity: 1;
}
.logo-wrap {
  height: 110px;
}
.logo-wrap .halo {
  width: 300px;
  height: 120px;
}
.logo-wrap img {
  width: 220px;
}
.mapcard {
  border-radius: 22px;
  padding: 18px !important;
}
.mapcard .eyebrow {
  font-size: 13px;
}
.mapcard .preview {
  height: 110px;
  margin-top: 12px;
}
.mapcard .row {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.mapcard .ttl {
  font-size: 30px;
}
.mapcard .sub {
  font-size: 15px;
}
.mapcard .cta {
  min-height: 48px;
  height: auto;
  padding: 0 18px;
  font-size: 17px;
  border-radius: 16px;
  white-space: nowrap;
}
.mapcard .cta svg {
  width: 20px;
  height: 20px;
}
.menu {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mtile {
  padding: 12px 4px !important;
  min-height: 0 !important;
  border-radius: 16px;
  gap: 6px;
}
.mtile .badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.mtile .badge svg {
  width: 20px;
  height: 20px;
}
.mtile .lbl {
  font-size: 13px;
  white-space: nowrap;
}
.featured {
  margin-top: 8px;
  gap: 10px;
}
.featured .flabel {
  font-size: 13px;
  color: #7a5814;
  background: rgba(255, 251, 240, 0.9);
  border-radius: 999px;
  padding: 4px 10px;
}
.featured .viewall {
  font-size: 14px;
  background: rgba(255, 251, 240, 0.9);
  border-radius: 999px;
  padding: 4px 10px;
}
.fpage {
  gap: 8px;
}
.fcard {
  border-radius: 14px;
  min-width: 0;
}
.fcard .photo {
  height: 88px;
  font-size: 34px;
}
.fcard .body {
  padding: 8px 10px 10px;
  gap: 2px;
}
.fcard .fname {
  font-size: 13px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.fcard .fmeta {
  font-size: 11px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.frank {
  top: 6px;
  left: 6px;
  min-width: 22px;
  height: 22px;
  font-size: 12px;
}

/* ---- Map page (map.html) ---------------------------------------------------------------
   The kiosk sizes its map controls for a 55" screen (84 px zoom buttons, 64 px service
   buttons, a four-row legend). On a phone they covered the map: shrink them, drop the
   legend (the pin colours stay), keep the controls in the corners. */
.map-head {
  padding: 4px 4px 8px;
  gap: 8px;
}
.map-head h1 {
  font-size: 24px;
  white-space: nowrap;
}
.floor-tabs {
  padding: 3px;
}
.ftab {
  padding: 8px 14px;
  font-size: 14px;
  white-space: nowrap;
}
.viewport,
#vp2,
.cf-bridge,
.dir-panel.cf-mode {
  margin-left: 0;
  margin-right: 0;
}
.viewport {
  border-radius: 18px;
}
.legend {
  display: none;
}
.zoom-ctrl {
  bottom: 10px;
  right: 10px;
  gap: 6px;
}
.zoom-ctrl button {
  width: 40px;
  height: 40px;
  font-size: 22px;
}
#zreset {
  font-size: 16px !important;
}
.svc-quick {
  bottom: 10px;
  left: 10px;
  flex-direction: row;
  gap: 6px;
}
.svc-quick button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}
.pdot {
  width: 16px;
  height: 16px;
  border-width: 2px;
}
.yah-ring {
  width: 44px;
  height: 44px;
  margin: -22px;
}
.yah-core {
  width: 14px;
  height: 14px;
  margin: -7px;
}
.yah-tag {
  top: 14px;
  font-size: 12px;
  padding: 4px 10px;
  white-space: nowrap;
}
/* Directions: phone-size type; the split view (route across floors) gets the height. */
.dir-top {
  padding: 12px 14px 8px;
  gap: 10px;
}
.dir-icon {
  font-size: 24px;
}
.dir-name {
  font-size: 18px;
  line-height: 1.15;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dir-meta {
  font-size: 13px;
}
.dir-cancel {
  padding: 8px 12px;
  font-size: 13px;
}
.dir-div {
  margin: 0 14px;
}
.dir-steps {
  padding: 2px 14px 12px;
}
.step {
  gap: 10px;
  padding: 8px 0;
}
.step-n {
  width: 24px;
  height: 24px;
  font-size: 12px;
}
.step-txt {
  font-size: 14px;
}
.cf-bridge {
  font-size: 13px;
  padding: 5px 12px;
}
/* The floor plan is the build's pre-tinted WebP (phone-build/images.js): no CSS filter on a
   1600 px layer for the phone to re-rasterise at every pinch. */
#floorImg,
#floorImg2 {
  filter: none;
}
/* A 16 px dot is hard to hit: the pin takes a 40 px touch box around it. */
.pin {
  padding: 12px;
}
/* The vector floor sits over the plan picture, same size (phone-map.js inlines the SVG). */
#floorVec {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#floorVec svg {
  display: block;
  width: 100%;
  height: 100%;
}
html.vector-map #floorImg {
  visibility: hidden;
}
/* Route on the vector floor: white casing, teal line, flowing dashes; direction discs. */
html.vector-map .route-bg {
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 16;
}
html.vector-map .route-main {
  stroke: #2f8f9c;
  stroke-width: 7;
}
html.vector-map .route-flow {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2.5;
  stroke-dasharray: 5 16;
}
/* Controls as a dark stack (zoom in, zoom out, recentre). */
.zoom-ctrl button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #3e3528 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
  font-weight: 400;
  box-shadow: 0 6px 18px -8px rgba(62, 53, 40, 0.7) !important;
}
.zoom-ctrl {
  gap: 8px;
}
/* On the vector floor the names are on the units: no coloured dots, just the touch boxes and
   a small marker on the chosen shop (its unit is lit by phone-map.js). */
html.vector-map .pdot {
  width: 10px;
  height: 10px;
  border-width: 0;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
}
html.vector-map .pin.on .pdot {
  width: 16px;
  height: 16px;
  background: #b07f28 !important;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(120, 85, 25, 0.5) !important;
}
html.vector-map .viewport {
  background: #ffffff !important;
}
/* The name is already written on the unit: no label pill over the map. */
html.vector-map .plabel {
  display: none;
}
html.vector-map .yah-tag {
  background: #41351f;
  color: #fff8e6;
}
/* The directions sheet (phone-map.js): keeps most of the map, scrolls its steps, switches the
   leg of a route across levels, links to the shop page. The kiosk's split view never shows. */
.dir-panel.open {
  display: flex;
  flex-direction: column;
  max-height: 40dvh;
}
.dir-top,
.dir-div,
.dir-legs,
.dir-actions {
  flex: none;
}
.dir-steps {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.dir-legs {
  display: flex;
  gap: 6px;
  padding: 0 14px 8px;
}
.dir-legs:empty,
.dir-actions:empty {
  display: none;
}
.dir-legs .leg {
  flex: 1;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(176, 127, 40, 0.35);
  background: transparent;
  font: 600 13px var(--font-sans);
  color: #7e6c49;
}
.dir-legs .leg.on {
  background: linear-gradient(135deg, #efd083, #b07f28);
  border-color: transparent;
  color: #41320f;
}
.dir-actions {
  display: flex;
  gap: 8px;
  padding: 8px 14px calc(12px + env(safe-area-inset-bottom));
}
.dir-actions .dir-link,
.dir-actions .dir-next {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font: 700 14px var(--font-sans);
  text-decoration: none;
}
.dir-actions .dir-link {
  border: 1px solid rgba(176, 127, 40, 0.4);
  background: rgba(255, 252, 246, 0.9);
  color: #41351f;
}
.dir-actions .dir-next {
  border: none;
  background: linear-gradient(135deg, #efd083, #b07f28);
  color: #41320f;
}
#vp2,
.cf-bridge {
  display: none !important;
}
/* While the sheet is open (or folded to one line) the zoom buttons sit above it; the quick
   buttons are under it. phone-map.js sets --sheet to the sheet's height. */
.zoom-ctrl {
  bottom: calc(var(--sheet, 0px) + 10px);
  transition: bottom 0.3s;
}
#vp:has(.dir-panel.open) .svc-quick {
  display: none;
}
/* Folded sheet: one line (name + distance) with the route still on the map. */
.dir-panel.open.min {
  max-height: 64px;
}
.dir-panel.min .dir-top {
  padding: 8px 14px;
}
.dir-panel.min .dir-icon {
  font-size: 20px;
}
.dir-panel.min .dir-name {
  font-size: 15px;
  -webkit-line-clamp: 1;
}
.dir-fold {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(176, 127, 40, 0.35);
  background: rgba(255, 252, 246, 0.9);
  color: #7e6c49;
  font: 700 18px/1 var(--font-sans);
}
.dir-cancel {
  margin-inline-start: 4px;
}
/* The way between levels: fastest / escalator / lift (step-free). */
.dir-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 8px;
}
.dir-modes:empty {
  display: none;
}
.dir-modes .mode {
  flex: 1;
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(176, 127, 40, 0.35);
  background: transparent;
  font: 600 12px var(--font-sans);
  color: #7e6c49;
  white-space: nowrap;
}
.dir-modes .mode.on {
  background: #41351f;
  border-color: #41351f;
  color: #fff8e6;
}
.dir-note {
  flex-basis: 100%;
  margin: 0;
  font-size: 12px;
  color: #8a7330;
}
.svc-quick button {
  white-space: nowrap;
}

/* ---- From / To bar (phone-nav.js) ----------------------------------------------------- */
.nav-bar {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin: 0 0 8px;
}
.nav-field {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 14px;
  border: 1px solid rgba(176, 127, 40, 0.3);
  background: rgba(255, 252, 246, 0.92);
  text-align: start;
  font-family: var(--font-sans);
}
.nav-field .k {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94835f;
}
.nav-field .v {
  font-size: 14px;
  font-weight: 700;
  color: #41351f;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-bar:not(.set) [data-field='to'] .v {
  color: #8a7330;
  font-weight: 600;
}
.nav-swap {
  flex: none;
  width: 40px;
  border-radius: 14px;
  border: 1px solid rgba(176, 127, 40, 0.3);
  background: rgba(255, 252, 246, 0.92);
  color: #7e6c49;
  font-size: 18px;
}
.nav-pick {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: #fffcf6;
}
.nav-pick[hidden] {
  display: none;
}
.nav-pick-top {
  display: flex;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  border-bottom: 1px solid rgba(176, 127, 40, 0.25);
}
.nav-pick-top input {
  flex: 1;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(176, 127, 40, 0.4);
  background: #fff;
  font: 500 16px var(--font-sans);
  color: #41351f;
}
.nav-pick-close {
  width: 44px;
  border-radius: 12px;
  border: 1px solid rgba(176, 127, 40, 0.3);
  background: rgba(255, 252, 246, 0.92);
  color: #7e6c49;
  font-size: 16px;
}
.nav-pick-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px calc(16px + env(safe-area-inset-bottom));
}
.nav-pick-list h3 {
  margin: 14px 2px 6px;
  font: 700 11px var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94835f;
}
.nav-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: none;
  border-bottom: 1px solid rgba(176, 127, 40, 0.14);
  background: transparent;
  text-align: start;
  font: 600 15px var(--font-sans);
  color: #41351f;
}
.nav-item.on {
  background: rgba(239, 208, 131, 0.35);
  border-radius: 10px;
}
.nav-item .i {
  width: 28px;
  text-align: center;
  font-size: 18px;
}
.nav-item .n {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-item .f {
  font-size: 12px;
  font-weight: 600;
  color: #94835f;
}
.nav-empty {
  padding: 24px;
  text-align: center;
  color: #94835f;
}
body.nav-picking {
  overflow: hidden;
}
/* Map without a route: the kiosk opens zoomed in and then shows every shop label, which on a
   phone buries the map. Show only the selected shop's label; tap a pin to see its name. */
.show-labels .plabel {
  opacity: 0;
  animation: none;
}
.show-labels .pin.on .plabel {
  opacity: 1;
}
/* Map markers grow with the zoom on the kiosk; on a phone damp them with the kiosk's own
   --inv (1/sqrt(zoom)) so the first, zoomed-in view is not covered by them. */
.yah {
  transform: translate(-50%, -50%) scale(var(--inv, 1));
}
.pin {
  transform: translate(-50%, -50%) scale(var(--inv, 1));
}

/* Respect "reduce motion": the shimmer and cross-fade loops are decoration only. */
@media (prefers-reduced-motion: reduce) {
  .shine,
  .bg .layer {
    animation: none !important;
  }
}
