/* Presentation look (as smeta-dom «Navigo» v2): the 3D scene is the page; frosted-glass controls sit on its edges. */
:root {
  --g-bg: rgba(70, 84, 98, .48);
  --g-bd: rgba(255, 255, 255, .22);
  --g-tx: #f3f6f8;
  --g-mute: rgba(243, 246, 248, .66);
  --acc: #7cc4ff;
  --sheet: #fbfbfa;
  --ink: #1d2329;
  --radius: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #c9d3dc;
  font-family: Montserrat, -apple-system, system-ui, sans-serif; color: var(--g-tx); -webkit-font-smoothing: antialiased; }
/* touch screens: a long press while turning the view selected the whole panel text */
@media (pointer: coarse) { body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }
#stage { position: fixed; inset: 0; }
#stage canvas { display: block; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.g { background: var(--g-bg); border: 1px solid var(--g-bd); border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 8px 30px rgba(20, 30, 40, .18); }
body.noui .ui { opacity: 0; pointer-events: none; }
.ui { transition: opacity .25s; }

/* intro */
.intro { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 30%, #dfe7ee, #aebccb); transition: opacity .6s; }
.intro.done { opacity: 0; pointer-events: none; }
.intro .w { width: min(340px, 80vw); text-align: center; color: #33414e; }
.logo { font-weight: 300; letter-spacing: .32em; font-size: 22px; }
.logo b { font-weight: 700; margin-left: .4em; }
.intro .bar { height: 3px; background: rgba(40, 60, 80, .15); border-radius: 3px; margin: 18px 0 10px; overflow: hidden; }
.intro .bar i { display: block; height: 100%; width: 0; background: #33414e; transition: width .2s; }
.intro .cap { font-size: 12px; letter-spacing: .08em; color: #5a6a78; }

.brand { position: fixed; left: 18px; top: 16px; color: #fff; pointer-events: none; padding: 9px 14px; border-radius: 14px;
  background: rgba(40, 52, 64, .42); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.brand .logo { font-size: 17px; }
.brand .by { font-size: 11px; letter-spacing: .06em; opacity: .85; margin-top: 4px; }

.topright { position: fixed; right: 18px; top: 16px; display: flex; gap: 10px; align-items: center; }
.round { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; padding: 0; }
.round svg { width: 40px; height: 40px; }
#ring { transform-origin: 27px 27px; }
.sun { display: flex; align-items: center; gap: 8px; padding: 6px 12px; height: 46px; font-size: 12px; }
.sun input { width: 110px; accent-color: #ffd27a; }
.sun select { background: transparent; color: inherit; border: 0; font: inherit; }
.sun select option { color: #222; }
#sunTxt { min-width: 76px; }

/* bottom pill */
.pill { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; padding: 5px; gap: 2px; border-radius: 40px; }
.pill button { border: 0; background: none; padding: 10px 18px; border-radius: 30px; font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--g-mute); }
.pill button.on { background: rgba(255, 255, 255, .92); color: var(--ink); }

/* info card */
.card { position: fixed; left: 18px; top: 84px; width: 320px; max-height: calc(100vh - 190px); overflow: auto; padding: 16px 18px; font-size: 13px; line-height: 1.45; }
.card h3 { margin: 0 0 2px; font-size: 18px; font-weight: 600; }
.card .sub { color: var(--g-mute); font-size: 12px; margin-bottom: 10px; }
.card table { width: 100%; border-collapse: collapse; }
.card td { padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); vertical-align: top; }
.card td:last-child { text-align: right; font-weight: 500; }
.card .note { margin-top: 10px; font-size: 11px; color: var(--g-mute); }
.card .btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn { border: 1px solid var(--g-bd); background: rgba(255, 255, 255, .14); padding: 8px 12px; border-radius: 10px; font-size: 12px; }
.btn.pri { background: rgba(255, 255, 255, .92); color: var(--ink); border-color: transparent; font-weight: 600; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; color: #1d2329; }

/* floor lift */
.lift { position: fixed; right: 18px; top: 84px; bottom: 96px; width: 132px; display: flex; flex-direction: column; padding: 8px 6px; }
.lift-h { font-size: 12px; font-weight: 600; text-align: center; padding: 4px 0 6px; letter-spacing: .05em; }
.lift-arrow { border: 0; background: rgba(255, 255, 255, .12); border-radius: 10px; padding: 6px; font-size: 11px; }
.lift-list { flex: 1; overflow-y: auto; margin: 6px 0; scrollbar-width: thin; }
.lift-list button { display: grid; grid-template-columns: 12px 1fr auto; gap: 6px; width: 100%; align-items: center; text-align: left;
  border: 0; background: none; padding: 5px 8px; border-radius: 8px; font-size: 12px; color: var(--g-mute); }
.lift-list button:hover { background: rgba(255, 255, 255, .12); color: var(--g-tx); }
.lift-list button.on { background: rgba(255, 255, 255, .92); color: var(--ink); font-weight: 600; }
.lift-list .dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }
.lift-list .dot.own { background: currentColor; }
.lift-list .n { font-size: 10px; opacity: .7; }

/* floor modes */
.modes { position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 30px; font-size: 12px; white-space: nowrap; }
.modes button { border: 0; background: none; padding: 7px 12px; border-radius: 20px; color: var(--g-mute); }
.modes button.on { background: rgba(255, 255, 255, .92); color: var(--ink); font-weight: 600; }
.modes label { display: flex; gap: 5px; align-items: center; padding: 0 6px; color: var(--g-mute); cursor: pointer; }
.modes .sep { width: 1px; height: 20px; background: var(--g-bd); margin: 0 4px; }
/* under the top bar: at 18 px it ran over the compass and the sun control on narrower windows */
.walkhint { position: fixed; left: 50%; top: 96px; transform: translateX(-50%); white-space: nowrap; padding: 8px 16px; font-size: 12px; border-radius: 20px; }
/* walking on a touch screen: drag the knob to move (the view turns with a finger anywhere else) */
.joy { position: fixed; right: 28px; bottom: 20px; width: 124px; height: 124px; border-radius: 50%; touch-action: none; z-index: 30; }
.joy span { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: rgba(255, 255, 255, .85); box-shadow: 0 2px 10px rgba(0, 0, 0, .18); pointer-events: none; }

/* white sheet (lists) */
.sheet { position: fixed; z-index: 8; left: 50%; bottom: 86px; transform: translateX(-50%); width: min(760px, calc(100vw - 32px)); max-height: min(62vh, 640px);
  display: flex; flex-direction: column; background: rgba(251, 251, 250, .96); color: var(--ink); border-color: rgba(0, 0, 0, .06); }
.sheet-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 8px; font-size: 15px; }
.sheet-h button { border: 0; background: none; font-size: 15px; color: #667; }
.sheet-b { overflow: auto; padding: 0 18px 16px; font-size: 13px; }
.sheet .filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sheet .filters button { border: 1px solid #d9dde1; background: #fff; border-radius: 16px; padding: 5px 11px; font-size: 12px; color: #445; }
.sheet .filters button.on { background: #1d2329; color: #fff; border-color: #1d2329; }
.sheet table { width: 100%; border-collapse: collapse; }
.sheet th { text-align: left; font-weight: 600; font-size: 11px; color: #778; letter-spacing: .04em; padding: 6px 4px; position: sticky; top: 0; background: #fbfbfa; }
.sheet td { padding: 7px 4px; border-top: 1px solid #eceef0; }
.sheet tr.row { cursor: pointer; }
.sheet tr.row:hover td { background: #f0f5fa; }
.sheet .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.sheet .tile { border: 1px solid #e3e6e9; border-radius: 12px; padding: 12px; cursor: pointer; background: #fff; }
.sheet .tile:hover { border-color: #9fc3e6; }
.sheet .tile b { display: block; font-size: 14px; margin-bottom: 3px; }
.sheet .tile span { font-size: 12px; color: #667; }
.sheet .muted { color: #778; font-size: 12px; }

#qualityBtn[data-q="high"] svg path { fill: rgba(255, 210, 122, .85); stroke: #ffd27a; }
#qualityBtn[data-q="balanced"] svg path { fill: rgba(255, 255, 255, .35); }
.toast { position: fixed; left: 50%; top: 76px; transform: translateX(-50%); z-index: 40; padding: 9px 16px; font-size: 12px; border-radius: 20px; }
.tip { position: fixed; z-index: 30; pointer-events: none; background: rgba(20, 28, 36, .86); color: #fff; padding: 6px 9px; border-radius: 8px; font-size: 12px; white-space: nowrap; }
.labels { position: fixed; inset: 0; pointer-events: none; }
.labels .lb { position: absolute; transform: translate(-50%, -100%); font-size: 11px; font-weight: 600; letter-spacing: .06em; color: #fff;
  background: rgba(30, 42, 54, .55); padding: 3px 8px; border-radius: 10px; white-space: nowrap; backdrop-filter: blur(6px); pointer-events: auto; cursor: pointer; }
body.floor .labels, body.walk .labels { display: none; }
/* apartments of the open floor (read from the client's sheets) */
.apt-labels { position: fixed; inset: 0; pointer-events: none; display: none; }
body.floor .apt-labels { display: block; }
body.walk .apt-labels, body.show .apt-labels { display: none; }
.apt-labels .alb { position: absolute; transform: translate(-50%, -50%); padding: 2px 7px 3px; border-radius: 7px; white-space: nowrap; text-align: center;
  background: rgba(255, 255, 255, .78); color: #26303a; font-size: 10.5px; line-height: 1.15; pointer-events: auto; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12); border-left: 3px solid var(--c, #999); }
.apt-labels .alb b { display: block; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.apt-labels .alb span { color: #5c6670; font-size: 10px; }
.apt-labels .alb u, .apt-labels .alb s { text-decoration: none; }
.apt-labels .alb.num { padding: 1px 6px; border-radius: 9px; }
.apt-labels .alb.num s, .apt-labels .alb.num span { display: none; }
.apt-labels .alb.on { background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); z-index: 1; }
.card .apts { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; font-size: 12px; }
.card .apts button { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 3px 4px; border-radius: 6px; text-align: left; color: inherit; cursor: pointer; }
.card .apts button:hover, .card .apts button.on { background: rgba(255, 255, 255, .14); }
.card .apts i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.card .apts em { margin-left: auto; font-style: normal; color: var(--g-mute); font-size: 11px; }
.card .apts-h { margin-top: 12px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--g-mute); }

/* showroom: penthouses and furnished units */
body.show .labels, body.show #lift, body.show #modes { display: none !important; }
.show-modes { position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 30px; font-size: 12px; white-space: nowrap; z-index: 6; }
.show-modes button { border: 0; background: none; padding: 7px 12px; border-radius: 20px; color: var(--g-mute); }
.show-modes button.on { background: rgba(255, 255, 255, .92); color: var(--ink); font-weight: 600; }
.show-modes .sep { width: 1px; height: 20px; background: var(--g-bd); margin: 0 4px; }
.card .lbl { margin: 12px 0 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--g-mute); }
.card .rooms { display: grid; gap: 2px; }
.card .rooms button { display: flex; justify-content: space-between; border: 0; background: rgba(255, 255, 255, .06); padding: 6px 9px; border-radius: 8px; font-size: 12px; text-align: left; }
.card .rooms button:hover { background: rgba(255, 255, 255, .2); }
.card .rooms button span:last-child { opacity: .75; }
.btn.dark { background: #1d2329; color: #fff; }
.sheet .tile.ph { padding: 8px 8px 10px; }
.sheet .tile.ph .thumb { height: 150px; border-radius: 8px; background: #f6f4f0; margin-bottom: 8px; overflow: hidden; display: grid; place-items: center; }
.sheet .tile.ph .thumb svg { width: 100%; height: 100%; }
/* plan sheet: a white drawing board over the scene */
.plansheet { position: fixed; inset: 70px 18px 140px 356px; z-index: 5; background: #fdfcfa; color: var(--ink); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(20, 30, 40, .28); display: flex; flex-direction: column; overflow: hidden; }
.ps-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #ecebe7; font-size: 14px; }
.ps-h b { flex: 1; }
.ps-hint { font-size: 11px; color: #8a9098; }
.ps-h .btn { color: var(--ink); background: #fff; border-color: #dcdfe2; }
.ps-x { border: 0; background: none; font-size: 16px; color: #667; }
.ps-b { flex: 1; overflow: hidden; display: grid; place-items: center; cursor: grab; touch-action: none; }
.ps-b svg { width: 96%; height: 96%; transform-origin: center; }
.plan-svg text { font-family: Montserrat, sans-serif; }
.plan-svg .pl-room { font-weight: 600; fill: #1d2329; letter-spacing: .02em; }
.plan-svg .pl-area { fill: #5d6670; }
.plan-svg .pl-dim { fill: #55606b; }
.plan-svg .pl-core { fill: #4a525a; font-weight: 600; letter-spacing: .08em; }
.plan-svg .pl-title { fill: #1d2329; font-weight: 600; }

@media (max-width: 760px) {
  .plansheet { inset: 64px 8px 150px 8px; }
  .show-modes { bottom: 64px; max-width: calc(100vw - 20px); overflow-x: auto; }
  body.show .card { bottom: 118px; max-height: 30vh; }
  .brand, .sun input, #sunTxt { display: none; }
  .lift-list button { white-space: nowrap; padding: 5px 4px; }
  .sun { padding: 4px 8px; }
  .pill { bottom: 12px; width: calc(100vw - 20px); justify-content: space-between; }
  .pill button { padding: 9px 9px; font-size: 12px; }
  .card { left: 10px; right: 10px; top: auto; bottom: 70px; width: auto; max-height: 40vh; }
  .lift { right: 8px; top: 72px; bottom: auto; height: 46vh; width: 96px; }
  .modes { bottom: 64px; max-width: calc(100vw - 20px); overflow-x: auto; }
  body.floor .card { bottom: 118px; max-height: 28vh; }
  .sheet { bottom: 64px; max-height: 66vh; }
  /* walking on a phone: the card would cover half the view and the knob; rooms stay reachable by walking */
  body.walk .card { display: none; }
  .joy { right: auto; left: 18px; bottom: 120px; }
}
