:root {
  --blue: #2aa4e8;
  --blue-d: #1b86c4;
  --yellow: #fff705;
  --ink: #1f2328;
  --ink-2: #5d6670;
  --line: rgba(31, 35, 40, .1);
  --panel: rgba(255, 255, 255, .92);
  --panel-solid: #ffffff;
  --soft: #f1faff;
  --shadow: 0 10px 30px rgba(15, 40, 70, .16);
  --r: 14px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
#priceNotice{position:absolute;top:72px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);z-index:6;padding:10px 14px;border-radius:10px;background:#fff7e6;color:#79551a;font-size:12px;line-height:1.45;box-shadow:0 4px 18px #28384815;pointer-events:none}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #dfe6ec; color: var(--ink); font-family: var(--font); }
body { overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }

#app { position: fixed; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; }
#stage { position: absolute; inset: 0; touch-action: none; }
#stage canvas { display: block; outline: none; }
#stage.can-click { cursor: pointer; }
#stage.dragging { cursor: grabbing; }
.tour-step { width: 38px; height: 38px; padding: 0; border: 2px solid white; border-radius: 50%; color: white; background: #2aa4e8; font-size: 23px; cursor: pointer; pointer-events: auto; }
.tour-step.hidden { visibility: hidden; pointer-events: none; }

/* ——— верхняя панель ——— */
.topbar {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 5;
  display: flex; align-items: center; gap: 10px; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 10px;
  background: var(--panel); border-radius: 12px; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); backdrop-filter: blur(8px);
}
.brand-mark {
  width: 24px; height: 24px; border-radius: 7px; background: var(--blue); position: relative;
}
.brand-mark::after {
  content: ''; position: absolute; left: 5px; right: 5px; top: 8px; height: 4px; border-radius: 2px;
  background: #fff; box-shadow: 0 6px 0 -1px rgba(255,255,255,.65);
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.brand-name b { color: var(--blue); }
.brand-sub { font-size: 12px; font-weight: 600; color: var(--ink-2); padding-left: 8px; border-left: 1px solid var(--line); }

.room-chip {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
  background: var(--panel); border-radius: 12px; box-shadow: var(--shadow); backdrop-filter: blur(8px);
  font-weight: 700; font-size: 14px; white-space: nowrap;
}
.room-chip .area { background: var(--blue); color: #fff; border-radius: 8px; padding: 3px 8px; font-size: 13px; }
.room-chip .btu { color: var(--ink-2); font-weight: 600; font-size: 13px; }
.top-actions { margin-left: auto; display: flex; gap: 8px; }

.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--panel); box-shadow: var(--shadow);
  display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(8px); transition: background .15s, transform .15s;
}
.icon-btn:hover { background: #fff; }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.small { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; background: rgba(31,35,40,.06); }
.icon-btn.small svg { width: 18px; height: 18px; }
.icon-btn.active { background: var(--blue); }
.icon-btn.active svg { stroke: #fff; }

/* ——— вкладки комнат ——— */
.room-tabs {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5;
  display: flex; gap: 6px; padding: 6px; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.room-tab {
  border: 0; background: transparent; border-radius: 11px; padding: 8px 14px; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 1px; min-width: 92px; transition: background .15s;
}
.room-tab:hover { background: rgba(42,164,232,.08); }
.room-tab .t-area { font-weight: 800; font-size: 16px; }
.room-tab .t-name { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.room-tab.active { background: var(--blue); color: #fff; }
.room-tab.active .t-name { color: rgba(255,255,255,.85); }

/* ——— зум ——— */
.zoom-ctl { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 5; display: flex; flex-direction: column; gap: 8px; }

/* ——— мини-карта ——— */
.minimap {
  position: absolute; left: 12px; bottom: 16px; z-index: 5; padding: 8px; border-radius: 14px;
  background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.minimap canvas { display: block; width: 240px; height: 120px; cursor: pointer; }

/* ——— список моделей ——— */
.list-panel {
  position: absolute; top: 68px; left: 12px; bottom: 170px; width: 300px; z-index: 6;
  background: var(--panel-solid); border-radius: var(--r); box-shadow: var(--shadow);
  display: flex; flex-direction: column; transform: translateX(-120%); transition: transform .3s ease;
}
.list-panel.open { transform: none; }
.list-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 14px 8px; }
.list-title { font-weight: 800; font-size: 16px; }
.list-sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.chips { display: flex; gap: 6px; padding: 0 14px 10px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.list-items { overflow-y: auto; padding: 0 8px 10px; flex: 1; }
.list-item {
  display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; width: 100%;
  padding: 8px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; text-align: left;
}
.list-item:hover, .list-item.active { background: var(--soft); }
.list-item img { width: 56px; height: 40px; object-fit: contain; background: #fff; border-radius: 6px; }
.list-item .li-title { font-size: 13px; font-weight: 700; line-height: 1.25; }
.list-item .li-meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; display: flex; gap: 8px; }
.list-item .li-price { color: var(--ink); font-weight: 800; }

/* ——— карточка товара ——— */
.card {
  position: absolute; top: 68px; right: 12px; bottom: 16px; width: 380px; z-index: 7;
  background: var(--panel-solid); border-radius: var(--r); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(calc(100% + 24px)); transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.card.open { transform: none; }
.card-close { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(255,255,255,.9) !important; }
.card-scroll { overflow-y: auto; flex: 1; }
.gallery { background: #fff; padding: 14px 14px 6px; border-bottom: 1px solid var(--line); }
.gallery-main { height: 190px; display: grid; place-items: center; }
.gallery-main img { max-width: 100%; max-height: 190px; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 6px; padding-top: 8px; overflow-x: auto; }
.gallery-thumbs button {
  flex: 0 0 52px; height: 40px; border: 2px solid transparent; border-radius: 8px; background: #fff; padding: 2px; cursor: pointer;
}
.gallery-thumbs button.active { border-color: var(--blue); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 14px 16px 18px; }
.card-series { font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; }
.card-title { margin: 4px 0 10px; font-size: 19px; line-height: 1.25; font-weight: 800; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: var(--soft); color: var(--blue-d); }
.badge.dark { background: var(--ink); color: #fff; }
.badge.gray { background: #eef0f2; color: var(--ink-2); }
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.price { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.price-old { font-size: 15px; color: var(--ink-2); text-decoration: line-through; }
.discount { font-size: 13px; font-weight: 800; background: var(--yellow); padding: 3px 8px; border-radius: 7px; }
.card-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 16px; border-radius: 11px;
  border: 0; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; transition: background .15s, transform .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--blue); color: #fff; flex: 1; }
.btn.primary:hover { background: var(--blue-d); }
.btn.ghost { background: #eef2f5; color: var(--ink); }
.btn.ghost:hover { background: #e3e9ee; }
.btn.ghost.on { background: var(--ink); color: #fff; }
.btn.big { height: 52px; font-size: 16px; padding: 0 28px; }
.specs { margin: 0 0 14px; display: grid; grid-template-columns: 1fr auto; gap: 0; font-size: 13px; }
.specs dt, .specs dd { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--ink-2); }
.specs dd { font-weight: 700; text-align: right; padding-left: 10px; }
.features { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.feature { font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; }
.card-links { display: flex; gap: 14px; font-size: 13px; font-weight: 700; }
.card-links a { color: var(--blue-d); text-decoration: none; }
.card-links a:hover { text-decoration: underline; }
.card-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); font-weight: 600; }
.card-nav .btn { height: 36px; font-size: 13px; padding: 0 12px; }

/* ——— подсказка ——— */
.tooltip {
  position: absolute; z-index: 8; pointer-events: none; padding: 7px 10px; border-radius: 9px;
  background: rgba(20, 24, 28, .88); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap;
  transform: translate(14px, 14px); opacity: 0; transition: opacity .12s;
}
.tooltip.show { opacity: 1; }
.tooltip b { font-weight: 800; color: var(--yellow); margin-left: 6px; }

/* ——— метки в 3D (CSS2D) ——— */
.room-marker {
  display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: auto; cursor: pointer;
  transform: translateY(-10px); transition: opacity .25s;
}
.room-marker .rm-pill {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: 999px;
  background: rgba(255,255,255,.95); box-shadow: 0 6px 18px rgba(0,0,0,.18); white-space: nowrap;
}
.room-marker .rm-area {
  background: var(--blue); color: #fff; font-weight: 800; font-size: 15px; border-radius: 999px; padding: 5px 10px;
}
.room-marker .rm-name { font-weight: 800; font-size: 14px; color: var(--ink); }
.room-marker .rm-hint { font-size: 11px; color: var(--ink-2); font-weight: 600; }
.room-marker .rm-pin { width: 2px; height: 26px; background: linear-gradient(rgba(255,255,255,.95), rgba(255,255,255,0)); }
.room-marker.hidden { opacity: 0; pointer-events: none; }

.door-marker {
  width: 46px; height: 46px; border-radius: 50%; pointer-events: auto; cursor: pointer;
  background: rgba(42,164,232,.9); border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.25);
  display: grid; place-items: center; transition: transform .15s, opacity .25s;
}
.door-marker:hover { transform: scale(1.1); }
.door-marker svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.door-marker.hidden { opacity: 0; pointer-events: none; }

/* ——— переключатель режимов ——— */
.mode-btn {
  display: inline-flex; align-items: center; height: 44px; padding: 0 14px; border-radius: 12px;
  background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(8px);
  color: var(--ink); font-weight: 700; font-size: 13px; text-decoration: none;
}
.mode-btn:hover { background: #fff; }

/* ——— метки фото-тура ——— */
.hotspots { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.hs { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; will-change: transform; }
.hs-unit {
  width: 30px; height: 30px; border: 0; padding: 0; border-radius: 50%;
  background: rgba(255,255,255,.92); box-shadow: 0 3px 12px rgba(0,0,0,.28); display: grid; place-items: center;
}
.hs-unit::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); transition: background .2s; }
.hs-unit::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85);
  animation: hs-pulse 2.2s ease-out infinite;
}
.hs-unit:hover::before, .hs-unit.active::before { background: #ffcc00; }
@keyframes hs-pulse { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.hs-nav {
  width: 84px; height: 84px; border: 0; padding: 0; background: none; display: grid; place-items: center;
}
.hs-nav-ring {
  width: 64px; height: 26px; border-radius: 50%; border: 3px solid rgba(255,255,255,.95);
  background: rgba(42,164,232,.35); box-shadow: 0 4px 14px rgba(0,0,0,.25); transition: background .2s, transform .2s;
}
.hs-nav:hover .hs-nav-ring { background: rgba(42,164,232,.7); transform: scale(1.08); }
.hs-label {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  background: rgba(20,24,28,.78); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px;
  opacity: 0; transition: opacity .15s;
}
.hs-nav:hover .hs-label { opacity: 1; }
.tour #cardPower { display: none; }
.tour #stage { cursor: grab; }
.tour #stage.dragging { cursor: grabbing; }
.tour .hs-unit::after { animation: none; opacity: .45; }
.tour-error {
  position: absolute; top: 74px; left: 50%; transform: translateX(-50%); z-index: 12;
  max-width: min(520px, calc(100% - 32px)); padding: 12px 18px; border-radius: 12px;
  background: #fff; color: #6b321f; box-shadow: var(--shadow); font-size: 13px;
}

/* ——— интро и загрузка ——— */
.intro, .loader {
  position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px;
  background: rgba(225, 233, 240, .55); backdrop-filter: blur(6px); transition: opacity .4s;
}
.intro.hide, .loader.hide { opacity: 0; pointer-events: none; }
.intro-box {
  max-width: 520px; background: #fff; border-radius: 20px; padding: 28px; box-shadow: var(--shadow);
}
.intro-kicker { font-size: 12px; font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: .08em; }
.intro h1 { font-size: 26px; line-height: 1.2; margin: 8px 0 10px; letter-spacing: -.02em; }
.intro p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.5; }
.howto { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.howto li { background: var(--soft); border-radius: 10px; padding: 9px 12px; font-size: 14px; color: var(--ink-2); }
.howto b { color: var(--ink); }
.loader { background: #e4ebf1; }
.loader-box { width: 260px; text-align: center; }
.loader-title { font-weight: 800; margin-bottom: 12px; }
.loader-bar { height: 6px; border-radius: 3px; background: rgba(31,35,40,.1); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--blue); transition: width .2s; }

/* ——— мобильная вёрстка ——— */
@media (max-width: 760px) {
  .topbar { top: 8px; left: 8px; right: 8px; gap: 6px; }
  .brand { height: 40px; padding: 0 10px 0 8px; }
  .brand-sub { display: none; }
  .room-chip { display: none; }
  .mode-btn { height: 40px; padding: 0 10px; font-size: 12px; }
  .icon-btn { width: 40px; height: 40px; }
  .zoom-ctl { display: none; }
  .minimap { left: 8px; bottom: 84px; padding: 6px; }
  .minimap canvas { width: 150px; height: 75px; }
  .room-tabs { bottom: 8px; left: 8px; right: 8px; transform: none; justify-content: space-between; }
  .room-tab { min-width: 0; flex: 1; padding: 7px 8px; }
  .room-tab .t-area { font-size: 14px; }
  .room-tab .t-name { font-size: 11px; }
  .list-panel { top: 56px; left: 8px; right: 8px; width: auto; bottom: 84px; }
  .card { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 72%; border-radius: 18px 18px 0 0; transform: translateY(105%); }
  .card.open { transform: none; }
  .gallery-main { height: 150px; }
  .gallery-main img { max-height: 150px; }
  .intro h1 { font-size: 21px; }
  .intro-box { padding: 20px; }
}

.world-category{box-sizing:border-box;width:1480px;height:340px;background:#fcfdff;border:3px solid #dfe7ed;border-radius:36px;color:#087dad;position:relative;font-family:Manrope,sans-serif;backface-visibility:hidden;pointer-events:none;overflow:hidden;box-shadow:0 10px 30px #19344914}
.world-category.onoff{color:#98621f}
.world-category .category-copy{position:absolute;left:64px;top:35px;display:flex;flex-direction:column;gap:9px;white-space:nowrap}
.world-category small{font-size:30px;line-height:1.5;font-weight:800}
.world-category strong{font-size:82px;line-height:1.28;font-weight:800;letter-spacing:-1.5px;color:#163449}
.world-category span{font-size:40px;line-height:1.5;font-weight:500;color:#526b7c;margin-top:12px}
.world-category .category-icon{position:absolute;right:61px;top:57px;width:220px;height:220px;border-radius:50px;background:#e4f5ff;display:grid;place-items:center}
.world-category .category-icon svg{width:160px;height:160px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transform:rotate(180deg)}
.world-category.onoff .category-icon{left:61px;right:auto;background:#fff1da}
.world-category.onoff .category-icon svg{transform:none}
.world-category.onoff .category-copy{left:327px}
.world-category.onoff strong{font-size:102px;line-height:1.03}
