/* PVM viewer on phones: building -> floor -> apartment, slid like a phone's settings.
   Shown only on phone widths (body.vm-on); the desktop viewer is untouched. */
#vm-app {
  --ink: #121417;
  --ink-2: #5d636b;
  --ink-3: #8b9097;
  --line: #eceef0;
  --ground: #f5f6f7;
  --card: #ffffff;
  --av: #1d9a55;   --av-tint: #e2f5ea;  --av-text: #0e5a31;
  --re: #d98a00;   --re-tint: #fff1d4;  --re-text: #7a4b00;
  --so-tint: #eef0f2;  --so-text: #4d5359;
  --radius: 16px;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  overflow: hidden;
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.45 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'tnum' 1;
  text-align: left;
  letter-spacing: normal;
  -webkit-text-size-adjust: 100%;
}
body.vm-on #vm-app { display: block; }
body.vm-on.loading #vm-app { display: none; }
body.vm-on { overflow: hidden; }
#vm-app * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
#vm-app button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-transform: none; letter-spacing: normal; box-shadow: none; }
#vm-app a { color: inherit; text-decoration: none; }
#vm-app ul { list-style: none; margin: 0; padding: 0; }
#vm-app h1, #vm-app h2, #vm-app h3, #vm-app p { margin: 0; font-family: inherit; text-shadow: none; letter-spacing: normal; color: inherit; }

#vm-app .vm-screen { position: absolute; inset: 0; background: var(--ground); overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; transition: transform .38s cubic-bezier(.3,.7,.2,1); will-change: transform; }
#vm-app .vm-screen.off-right { transform: translateX(100%); }
#vm-app .vm-screen.off-left { transform: translateX(-28%); }

#vm-app .vm-top { position: sticky; top: 0; z-index: 5; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 4px; background: rgba(245,246,247,.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
#vm-app .vm-top h2 { font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vm-app .vm-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; }
#vm-app .vm-icon:active { background: rgba(0,0,0,.05); }
#vm-app .vm-icon[disabled] { opacity: .3; pointer-events: none; }
#vm-app .vm-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#vm-app .vm-stepper { display: flex; }
#vm-app .vm-spacer { width: 44px; }

/* the building */
#vm-app .vm-hero { position: relative; background: #0d0f12; }
#vm-app .vm-hero img { display: block; width: 100%; height: auto; }
#vm-app .vm-hero svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#vm-app .vm-floor { fill: rgba(255,255,255,0); stroke: rgba(255,255,255,.55); stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill .2s; cursor: pointer; }
#vm-app .vm-floor.free { fill: rgba(29,154,85,.22); stroke: rgba(160,240,190,.95); }
#vm-app .vm-floor.sel { fill: rgba(255,255,255,.38); stroke: #fff; }
#vm-app .vm-tag { position: absolute; transform: translate(-50%, -50%); padding: 6px 12px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.25); pointer-events: none; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
#vm-app .vm-hero-bar { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; }
#vm-app .vm-glass { height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border-radius: 999px; background: rgba(18,20,23,.55); color: #fff; font-size: 13px; font-weight: 600; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#vm-app .vm-glass svg { display: block; flex: none; position: static; margin: 0; width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#vm-app a.vm-glass { display: inline-flex; width: 40px; padding: 0; }
#vm-app .vm-glass.lang { margin-left: auto; }
#vm-app .vm-hint { font-weight: 500; }

#vm-app .vm-sheet { position: relative; margin-top: -20px; background: var(--card); border-radius: 20px 20px 0 0; padding: 22px 16px calc(32px + env(safe-area-inset-bottom)); min-height: 50%; }
#vm-app .vm-title { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
#vm-app .vm-sub { color: var(--ink-2); margin-top: 2px; font-size: 14px; }
#vm-app .vm-bar { display: flex; height: 8px; border-radius: 8px; overflow: hidden; background: var(--so-tint); gap: 2px; margin-top: 18px; }
#vm-app .vm-bar i, #vm-app .vm-mini i { display: block; }
#vm-app .vm-bar .a, #vm-app .vm-mini .a { background: var(--av); }
#vm-app .vm-bar .r, #vm-app .vm-mini .r { background: var(--re); }
#vm-app .vm-bar .s, #vm-app .vm-mini .s { background: #d4d7db; }
#vm-app .vm-legend { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
#vm-app .vm-legend b { color: var(--ink); font-weight: 600; }
#vm-app .vm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
#vm-app .vm-primary { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; margin-top: 18px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; font-size: 16px; }
#vm-app .vm-primary:active { transform: scale(.99); }
#vm-app .vm-primary[disabled] { opacity: .35; }
#vm-app .vm-section { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 0 6px; }
#vm-app .vm-section h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); }
#vm-app .vm-section span { font-size: 13px; color: var(--ink-3); }

#vm-app .vm-row { display: grid; grid-template-columns: 1fr auto 20px; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
#vm-app .vm-row:last-child { border-bottom: 0; }
#vm-app .vm-row:active { background: var(--ground); }
#vm-app .vm-name { font-weight: 600; font-size: 16px; }
#vm-app .vm-meta { color: var(--ink-2); font-size: 13px; }
#vm-app .vm-right { text-align: right; }
#vm-app .vm-num { font-weight: 600; }
#vm-app .vm-num span { color: var(--ink-3); font-weight: 500; }
#vm-app .vm-chev { width: 20px; height: 20px; stroke: var(--ink-3); fill: none; stroke-width: 2; }
#vm-app .vm-mini { display: flex; width: 64px; height: 6px; border-radius: 6px; overflow: hidden; gap: 1px; margin: 6px 0 0 auto; background: var(--so-tint); }

#vm-app .vm-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; background: var(--so-tint); color: var(--so-text); }
#vm-app .vm-pill.available { background: var(--av-tint); color: var(--av-text); }
#vm-app .vm-pill.reserved { background: var(--re-tint); color: var(--re-text); }

/* a floor */
#vm-app .vm-card { margin: 12px 16px 0; background: #fff; border-radius: var(--radius); padding: 10px; border: 1px solid var(--line); }
#vm-app .vm-plan { position: relative; }
#vm-app .vm-plan img { display: block; width: 100%; height: auto; border-radius: 8px; }
#vm-app .vm-plan svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#vm-app .vm-apt { stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; fill: #6b7178; fill-opacity: .22; stroke: #9aa0a6; transition: fill-opacity .2s, stroke-opacity .2s; }
#vm-app .vm-apt.available { fill: var(--av); fill-opacity: .28; stroke: var(--av); }
#vm-app .vm-apt.reserved { fill: var(--re); fill-opacity: .28; stroke: var(--re); }
#vm-app .vm-apt.dim { fill-opacity: .06; stroke-opacity: .25; }
#vm-app .vm-apt-label { font-size: 3.2px; font-weight: 700; fill: #121417; text-anchor: middle; dominant-baseline: middle; pointer-events: none; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: .8px; }
#vm-app .vm-tip { margin: 8px 4px 2px; color: var(--ink-3); font-size: 12px; }
#vm-app .vm-chips { display: flex; gap: 8px; padding: 14px 16px 4px; overflow-x: auto; scrollbar-width: none; }
#vm-app .vm-chips::-webkit-scrollbar { display: none; }
#vm-app .vm-chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 500; white-space: nowrap; flex: none; }
#vm-app .vm-chip b { font-weight: 600; margin-left: 4px; color: var(--ink-2); }
#vm-app .vm-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
#vm-app .vm-chip.on b { color: rgba(255,255,255,.7); }
#vm-app .vm-list-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 16px 0; font-size: 13px; color: var(--ink-2); }
#vm-app .vm-list-head button { color: var(--ink); font-weight: 600; height: 36px; }
#vm-app .vm-list { margin: 8px 16px calc(24px + env(safe-area-inset-bottom)); background: #fff; border-radius: var(--radius); padding: 0 16px; border: 1px solid var(--line); }
#vm-app .vm-empty { padding: 28px 0; text-align: center; color: var(--ink-2); font-size: 14px; }

/* an apartment */
#vm-app .vm-shot img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: contain; border-radius: 8px; cursor: zoom-in; }
#vm-app .vm-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
#vm-app .vm-thumbs::-webkit-scrollbar { display: none; }
#vm-app .vm-thumbs button { flex: none; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; }
#vm-app .vm-thumbs button.on { border-color: var(--ink); }
#vm-app .vm-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
#vm-app .vm-body { padding: 18px 16px calc(40px + env(safe-area-inset-bottom)); }
#vm-app .vm-body.with-actions { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
#vm-app .vm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#vm-app .vm-price { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
#vm-app .vm-price.ask { font-size: 18px; color: var(--ink-2); font-weight: 600; }
#vm-app .vm-facts { display: grid; grid-template-columns: 1fr 1fr; margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
#vm-app .vm-fact { padding: 12px 14px; border-bottom: 1px solid var(--line); }
#vm-app .vm-fact:nth-child(odd) { border-right: 1px solid var(--line); }
#vm-app .vm-fact:nth-last-child(-n+2):nth-child(odd), #vm-app .vm-fact:last-child { border-bottom: 0; }
#vm-app .vm-fact:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
#vm-app .vm-fact span { display: block; font-size: 12px; color: var(--ink-2); }
#vm-app .vm-fact b { font-size: 17px; font-weight: 600; }
#vm-app .vm-desc { margin-top: 16px; color: var(--ink-2); font-size: 14px; white-space: pre-line; }
#vm-app .vm-actions { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; gap: 10px; z-index: 6; }
#vm-app .vm-actions .vm-primary { margin: 0; flex: 1; }
#vm-app .vm-actions .vm-call { flex: none; width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line); display: grid; place-items: center; }
#vm-app .vm-actions .vm-call svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 2; }

#vm-app .vm-zoom { position: absolute; inset: 0; z-index: 20; background: #0d0f12; display: none; overflow: auto; }
#vm-app .vm-zoom.on { display: block; }
#vm-app .vm-zoom img { width: 220%; max-width: none; height: auto; display: block; }
#vm-app .vm-zoom .vm-icon { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; background: rgba(255,255,255,.15); color: #fff; }

@media (prefers-reduced-motion: reduce) { #vm-app .vm-screen { transition: none; } }
