/* ============================================================
   Emgrand Spa · 帝豪水汇 — Mobile layout (≤760px)
   A separate phone-first page: sticky header, info card under the hero,
   swipeable offers, one-floor-at-a-time facilities, fixed 4-button bar.
   Desktop (>760px) never shows any .m-* element.
   ============================================================ */

:root {
  --m-green: #13362b;
  --m-green-deep: #0e2920;
  --m-green-2: #1b4436;
  --m-gold: #caa75f;
  --m-gold-soft: #e7cd92;
  --m-gold-ink: #8a6a2c;
  --m-ivory: #f7f3ec;
  --m-paper: #fbf9f4;
  --m-ink: #23241f;
  --m-muted: #6f6a5e;
  --m-line: #e2dac9;
  --m-on-dark: #f3ede1;
  --m-on-dark-2: #b9b29f;
  --m-serif: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  --m-serif-zh: "Noto Serif SC", "Cormorant Garamond", "Songti SC", serif;
  --m-sans: "Jost", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --m-bar: 64px;
}

.m-site, .m-bar, .m-scrim, .m-sheet { display: none; }

@media (max-width: 760px) {
  /* Swap the desktop page out for the mobile one */
  .site-header, body > section, .site-footer, .mobile-call, .back-to-top { display: none !important; }
  html, body { height: 100%; overflow: hidden; }
  body { background: var(--m-paper); font-family: var(--m-sans); font-weight: 400; color: var(--m-ink); }
  /* The page scrolls inside .m-site, not the document. Phone browsers (iOS Chrome
     especially) collapse their toolbar on document scroll and can leave a fixed
     bottom bar stranded mid-air; with no document scroll the toolbar stays put. */
  .m-site {
    display: block; position: fixed; inset: 0; overflow-y: auto; overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
    padding-bottom: calc(var(--m-bar) + env(safe-area-inset-bottom, 0px)); font-size: 15px; line-height: 1.6;
  }
  .m-bar { display: grid; }
  .m-scrim, .m-sheet { display: block; }

  .m-site [hidden], .m-sheet [hidden] { display: none !important; }
  .m-site a, .m-bar a, .m-sheet a { color: inherit; text-decoration: none; }
  .m-site button, .m-bar button, .m-sheet button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
  .m-site :focus-visible, .m-bar :focus-visible, .m-sheet :focus-visible { outline: 2px solid var(--m-gold); outline-offset: 2px; }
  .m-i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .m-i--sm { width: 14px; height: 14px; }
  .m-site h1, .m-site h2, .m-site h3, .m-sheet h3 { margin: 0; font-weight: 500; line-height: 1.25; text-wrap: balance; }
  .m-site p { margin: 0; }

  .m-wrap { padding-inline: 20px; }
  .m-eyebrow { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--m-gold-ink); font-weight: 500; }
  .m-sec { padding-block: 44px 8px; scroll-margin-top: 48px; }
  .m-sec-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
  .m-sec-head h2 { font-family: var(--m-serif-zh); font-size: 24px; color: var(--m-green); }
  .m-sec-head .m-aside { margin-left: auto; font-size: 12px; color: var(--m-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .m-num { font-family: var(--m-serif); font-weight: 600; font-feature-settings: "lnum", "tnum"; }

  .m-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; font-size: 13px; font-weight: 500; padding: 7px 14px; border: 1px solid var(--m-line); color: var(--m-green); background: var(--m-paper); white-space: nowrap; }
  .m-site .m-btn--gold, .m-sheet .m-btn--gold { background: var(--m-gold); border-color: var(--m-gold); color: var(--m-green-deep); }
  .m-btn--block { display: flex; width: 100%; padding: 12px 16px; font-size: 14px; letter-spacing: .04em; }

  /* Header */
  .m-hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--m-green-deep); border-bottom: 1px solid rgba(202,167,95,.18); }
  .m-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .m-brand img { height: 26px; width: auto; }
  .m-brand b { font-family: var(--m-serif); font-weight: 600; font-size: 15px; letter-spacing: .2em; color: var(--m-gold-soft); }
  .m-lang { margin-left: auto; display: flex; border: 1px solid rgba(202,167,95,.45); border-radius: 999px; overflow: hidden; font-size: 12px; }
  .m-site .m-lang button { padding: 4px 9px; color: var(--m-on-dark-2); }
  .m-site .m-lang button[aria-pressed="true"] { background: var(--m-gold); color: var(--m-green-deep); font-weight: 500; }
  .m-site .m-menu-btn { color: var(--m-gold-soft); padding: 6px; margin-right: -6px; }

  /* Hero */
  .m-hero { position: relative; height: clamp(380px, 56vh, 460px); overflow: hidden; background: var(--m-green-deep); }
  .m-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 16% 62%; display: block; }
  .m-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,41,32,.15) 0%, rgba(14,41,32,0) 34%, rgba(14,41,32,.5) 66%, rgba(14,41,32,.95) 100%); }
  .m-hero__txt { position: absolute; left: 20px; right: 20px; bottom: 76px; z-index: 1; color: var(--m-on-dark); }
  .m-hero__txt .m-eyebrow { color: var(--m-gold-soft); }
  .m-hero__txt h1 { font-family: var(--m-serif-zh); font-size: 42px; line-height: 1.1; letter-spacing: .12em; margin: 8px 0 4px; color: #fff; }
  .m-hero__en { font-family: var(--m-serif); font-size: 17px; letter-spacing: .32em; color: var(--m-gold-soft); }
  .m-site .m-hero__txt p { margin-top: 10px; font-size: 13px; letter-spacing: .12em; color: var(--m-on-dark-2); }

  /* Info card */
  .m-info { position: relative; z-index: 2; margin: -56px 16px 0; background: var(--m-paper); border: 1px solid var(--m-line); border-top: 2px solid var(--m-gold); border-radius: 4px 4px 14px 14px; padding: 4px 16px; box-shadow: 0 18px 40px -22px rgba(14,41,32,.45); }
  .m-irow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--m-line); }
  .m-irow:last-child { border-bottom: 0; }
  .m-irow > .m-i { color: var(--m-gold-ink); }
  .m-irow .m-k { font-size: 11px; color: var(--m-muted); letter-spacing: .04em; }
  .m-irow .m-v { font-size: 15px; font-weight: 500; color: var(--m-green); line-height: 1.35; }
  .m-irow .m-btn { margin-left: auto; }
  .m-live { display: inline-flex; align-items: center; gap: 6px; }
  .m-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3f9a6b; box-shadow: 0 0 0 3px rgba(63,154,107,.18); }
  .m-chips { display: flex; gap: 8px; overflow-x: auto; padding: 16px 16px 0; scrollbar-width: none; }
  .m-chips::-webkit-scrollbar { display: none; }
  .m-chips a { flex: none; font-size: 13px; padding: 6px 14px; border-radius: 999px; background: var(--m-ivory); color: var(--m-green); border: 1px solid var(--m-line); }

  /* Offers rail */
  .m-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 20px 6px; scroll-padding-inline: 20px; scrollbar-width: none; }
  .m-rail::-webkit-scrollbar { display: none; }
  .m-card { flex: none; width: 82%; scroll-snap-align: start; border-radius: 14px; padding: 20px 18px; background: var(--m-ivory); border: 1px solid var(--m-line); display: flex; flex-direction: column; gap: 10px; }
  .m-card h3 { font-family: var(--m-serif-zh); font-size: 18px; color: var(--m-green); }
  .m-card .m-tag { font-size: 12px; color: var(--m-muted); }
  .m-card .m-price { font-family: var(--m-serif); font-weight: 600; font-feature-settings: "lnum", "tnum"; font-size: 44px; line-height: 1; color: var(--m-green); }
  .m-card .m-price small { font-family: var(--m-sans); font-size: 13px; font-weight: 400; color: var(--m-muted); margin-left: 4px; }
  .m-card .m-btn--block { margin-top: auto; }
  .m-badge { align-self: flex-start; font-size: 11px; letter-spacing: .12em; padding: 3px 10px; border-radius: 999px; background: var(--m-gold); color: var(--m-green-deep); font-weight: 500; }
  .m-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 14px; }
  .m-ticks li { display: flex; gap: 8px; align-items: flex-start; }
  .m-ticks li::before { content: ""; flex: none; width: 14px; height: 8px; margin-top: 6px; border-left: 1.6px solid var(--m-gold); border-bottom: 1.6px solid var(--m-gold); transform: rotate(-45deg) translate(1px, -1px); }
  .m-note { font-size: 12px; color: var(--m-muted); line-height: 1.5; }
  .m-rows { display: grid; }
  .m-rows > div { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--m-line); font-size: 14px; }
  .m-rows > div:last-child { border-bottom: 0; }
  .m-rows b { margin-left: auto; font-family: var(--m-serif); font-size: 20px; font-weight: 600; color: var(--m-green); font-feature-settings: "lnum", "tnum"; white-space: nowrap; }
  .m-rows s { font-size: 12px; color: var(--m-muted); }
  .m-rows .m-sub { display: block; font-size: 12px; color: var(--m-muted); }
  .m-dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0 0; }
  .m-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--m-line); transition: width .25s, background .25s; }
  .m-dots i.is-on { width: 18px; background: var(--m-gold); }
  .m-site .m-tax { text-align: center; font-size: 12px; color: var(--m-muted); margin-top: 8px; }

  /* Buffet band */
  .m-band { background: var(--m-green); color: var(--m-on-dark); margin-top: 44px; padding-block: 40px 32px; scroll-margin-top: 48px; }
  .m-band .m-eyebrow { color: var(--m-gold-soft); }
  .m-band h2 { font-family: var(--m-serif-zh); font-size: 24px; color: #fff; margin: 6px 0 4px; }
  .m-site .m-band p { margin-bottom: 18px; font-size: 13px; color: var(--m-on-dark-2); }
  .m-meals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .m-meal { border: 1px solid rgba(231,205,146,.22); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
  .m-meal .m-k { font-size: 12px; color: var(--m-on-dark-2); display: flex; justify-content: space-between; gap: 6px; }
  .m-meal .m-v { font-size: 18px; letter-spacing: .02em; color: var(--m-on-dark); font-variant-numeric: tabular-nums; }
  .m-meal.is-now { border-color: var(--m-gold); background: rgba(202,167,95,.12); }
  .m-meal em { font-style: normal; color: var(--m-gold-soft); }
  .m-site .m-band .m-btn { margin-top: 16px; background: transparent; color: var(--m-gold-soft); border-color: rgba(231,205,146,.45); }

  /* Floors */
  .m-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 20px 14px; scrollbar-width: none; }
  .m-tabs::-webkit-scrollbar { display: none; }
  .m-site .m-tabs button { flex: none; font-size: 13px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--m-line); color: var(--m-green); background: var(--m-paper); }
  .m-site .m-tabs button[aria-selected="true"] { background: var(--m-green); border-color: var(--m-green); color: var(--m-gold-soft); }
  .m-floor { margin-inline: 20px; border-radius: 14px; overflow: hidden; border: 1px solid var(--m-line); background: var(--m-paper); }
  .m-site .m-floor__pic { position: relative; display: block; width: 100%; height: 210px; background: var(--m-green); }
  .m-floor__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .m-floor__count { position: absolute; right: 10px; bottom: 10px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(14,41,32,.75); color: var(--m-on-dark); }
  .m-floor__body { padding: 14px 16px 16px; display: grid; gap: 6px; }
  .m-floor h3 { font-family: var(--m-serif-zh); font-size: 18px; color: var(--m-green); }
  .m-site .m-floor p { font-size: 14px; color: var(--m-muted); }
  .m-floor .m-btn { justify-self: start; margin-top: 4px; }

  /* Services */
  .m-svc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .m-site .m-svc button { border: 1px solid var(--m-line); border-radius: 12px; padding: 14px; display: grid; gap: 4px; background: var(--m-paper); text-align: left; align-content: start; }
  .m-svc b { font-weight: 500; color: var(--m-green); font-size: 14px; line-height: 1.35; }
  .m-svc span { font-size: 12px; color: var(--m-muted); }
  .m-svc .m-more { color: var(--m-gold-ink); display: inline-flex; align-items: center; gap: 2px; margin-top: 4px; }

  /* Gallery */
  .m-site .m-vid { position: relative; display: block; margin-inline: 20px; width: calc(100% - 40px); height: 210px; border-radius: 14px; overflow: hidden; background: var(--m-green); }
  .m-vid img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; display: block; }
  .m-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(14,41,32,.25); }
  .m-play span { width: 58px; height: 58px; border-radius: 50%; background: rgba(251,249,244,.92); display: flex; align-items: center; justify-content: center; color: var(--m-green); }
  .m-vid__cap { position: absolute; left: 14px; right: 14px; bottom: 12px; font-size: 12px; color: #fff; letter-spacing: .06em; text-align: left; }
  .m-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 12px 20px 0; scrollbar-width: none; }
  .m-thumbs::-webkit-scrollbar { display: none; }
  .m-site .m-thumbs button { flex: none; width: 128px; display: grid; gap: 6px; text-align: left; }
  .m-thumbs img { width: 128px; height: 84px; object-fit: cover; border-radius: 8px; display: block; }
  .m-thumbs span { font-size: 12px; color: var(--m-muted); line-height: 1.35; }

  /* About */
  .m-site .m-about p { margin-bottom: 16px; font-size: 14px; color: var(--m-muted); }
  .m-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--m-line); border-bottom: 1px solid var(--m-line); }
  .m-stats > div { padding: 14px 4px; text-align: center; }
  .m-stats > div + div { border-left: 1px solid var(--m-line); }
  .m-stats b { display: block; font-family: var(--m-serif); font-feature-settings: "lnum", "tnum"; font-size: 26px; font-weight: 600; color: var(--m-green); line-height: 1.1; }
  .m-stats span { font-size: 12px; color: var(--m-muted); }

  /* Contact */
  .m-clist { border: 1px solid var(--m-line); border-radius: 14px; background: var(--m-paper); padding: 0 16px; }
  .m-site .m-crow { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--m-line); width: 100%; text-align: left; }
  .m-crow:last-child { border-bottom: 0; }
  .m-crow > .m-i { color: var(--m-gold-ink); }
  .m-crow .m-k { display: block; font-size: 14px; font-weight: 500; color: var(--m-green); }
  .m-crow .m-s { display: block; font-size: 12px; color: var(--m-muted); }
  .m-crow .m-go { margin-left: auto; font-size: 12px; color: var(--m-gold-ink); display: flex; align-items: center; gap: 2px; white-space: nowrap; }
  .m-site .m-addr { margin-top: 12px; font-size: 13px; color: var(--m-muted); }

  /* Footer */
  .m-foot { margin-top: 40px; background: var(--m-green-deep); color: var(--m-on-dark-2); text-align: center; padding: 28px 20px 24px; font-size: 12px; }
  .m-foot img { height: 34px; margin: 0 auto 8px; display: block; }
  .m-foot__name { font-family: var(--m-serif); letter-spacing: .3em; color: var(--m-gold-soft); }
  .m-foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0; }
  .m-foot nav a { color: var(--m-gold-soft); }

  /* Bottom bar */
  .m-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; grid-template-columns: repeat(4, 1fr); background: var(--m-green-deep); border-top: 1px solid rgba(202,167,95,.3); padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px)); font-family: var(--m-sans); }
  .m-bar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; letter-spacing: .04em; color: var(--m-on-dark-2); padding: 2px 0; }
  .m-bar .m-i { width: 22px; height: 22px; color: var(--m-gold-soft); }
  .m-bar .m-hot { color: var(--m-gold-soft); }

  /* Bottom sheets */
  .m-scrim { position: fixed; inset: 0; z-index: 140; background: rgba(14,41,32,.55); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .m-scrim.is-open { opacity: 1; pointer-events: auto; }
  .m-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 141; max-height: 86vh; overflow: auto; background: var(--m-paper); color: var(--m-ink); font-family: var(--m-sans); border-radius: 18px 18px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateY(105%); visibility: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s; }
  .m-sheet.is-open { transform: translateY(0); visibility: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
  .m-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--m-line); margin: 0 auto 14px; }
  .m-sheet h3 { font-family: var(--m-serif-zh); font-size: 20px; color: var(--m-green); margin-bottom: 6px; }
  .m-sheet .m-x { position: absolute; right: 14px; top: 12px; color: var(--m-muted); padding: 6px; }
  .m-sheet .m-note { text-align: center; }
  .m-qr { width: 220px; height: 220px; margin: 14px auto 0; display: block; border-radius: 10px; border: 1px solid var(--m-line); }
  .m-mnav { display: grid; margin-top: 4px; }
  .m-mnav a { padding: 14px 0; border-bottom: 1px solid var(--m-line); font-size: 16px; color: var(--m-green); display: flex; justify-content: space-between; }

  /* Latin scripts read better in the Latin display face */
  html:lang(en) .m-sec-head h2, html:lang(en) .m-band h2 { font-family: var(--m-serif); font-size: 30px; }
  html:lang(en) .m-card h3, html:lang(en) .m-floor h3 { font-family: var(--m-serif); font-size: 22px; }
  html:lang(en) .m-sheet h3 { font-family: var(--m-serif); font-size: 24px; }
}

@media (max-width: 360px) {
  .m-brand b { display: none; }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .m-sheet, .m-scrim, .m-dots i { transition: none; }
  .m-site { scroll-behavior: auto; }
}
