/* Era City – Site Tour overlay (on top of the 3D app) */
body.tour .header-card, body.tour .top-actions, body.tour .view-bar, body.tour #controls, body.tour .nav-pad,
body.tour #lot-card, body.tour #lot-list, body.tour #status-legend, body.tour #hint, body.tour #compare,
body.tour #sun-panel, body.tour #install-help { display: none !important; }
body.tour .label-layer { pointer-events: none; }
body.tour.tt-inside .label-layer { display: none; }
body.tour #contact-fab { bottom: auto !important; top: calc(14px + var(--st, 0px)); right: 14px; z-index: 26; }
body.tour #contact-panel { bottom: auto !important; top: calc(76px + var(--st, 0px)); z-index: 27; }

#tour-ui { font-family: "Be Vietnam Pro", system-ui, sans-serif; color: #f4ede2; }
#tt-pano { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 21; opacity: 0; pointer-events: none; transition: opacity .5s; background: #1b1d22; }
#tt-pano.show { opacity: 1; }
#tt-touch { position: fixed; inset: 0; z-index: 5; touch-action: none; cursor: grab; }
#tt-touch:active { cursor: grabbing; }
body.tt-pano-on #tt-touch { z-index: 22; }
#tt-fade { position: fixed; inset: 0; z-index: 23; background: #121317; opacity: 0; pointer-events: none; transition: opacity .38s ease; }
#tt-fade.on { opacity: 1; }
#tt-fade::after { content: ""; position: absolute; left: 50%; top: 42%; width: 30px; height: 30px; margin: -15px; border-radius: 50%;
  border: 2px solid rgba(229,184,135,.2); border-top-color: var(--gold); animation: spin .9s linear infinite; opacity: 0; transition: opacity .3s .6s; }
#tt-fade.on::after { opacity: 1; }

.tt-brand { position: fixed; z-index: 24; top: calc(14px + var(--st, 0px)); left: 14px; display: flex; align-items: center; gap: 10px;
  background: rgba(20,21,25,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(229,190,140,.28);
  border-radius: 14px; padding: 8px 12px 8px 8px; pointer-events: none; }
.tt-brand img { height: 30px; }
.tt-brand small { display: block; font-size: 9.5px; letter-spacing: .14em; color: var(--gold); font-weight: 600; }
.tt-brand b { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.tt-chip { margin-left: 4px; font-size: 10px; padding: 3px 8px; border-radius: 20px; border: 1px solid rgba(229,190,140,.45); color: #ead7bd; white-space: nowrap; }

#tt-card { position: fixed; z-index: 24; left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom)); width: min(640px, calc(100vw - 20px));
  background: linear-gradient(180deg, rgba(26,27,32,.86), rgba(16,17,20,.92)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(229,190,140,.3); border-radius: 18px; padding: 10px 12px 10px; box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.tt-steps { display: flex; gap: 10px; margin: 0 4px 8px; overflow-x: auto; scrollbar-width: none; }
.tt-steps::-webkit-scrollbar { display: none; }
.tt-chap { flex: 1 0 auto; }
.tt-chap span { display: block; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(244,237,226,.45); margin-bottom: 4px; white-space: nowrap; }
.tt-chap.on span { color: var(--gold); }
.tt-chap div { display: flex; gap: 4px; }
.tt-chap button { flex: 1; min-width: 14px; height: 6px; border: 0; padding: 0; border-radius: 3px; background: rgba(255,255,255,.16); cursor: pointer; transition: background .2s; }
.tt-chap button.past { background: rgba(229,184,135,.45); }
.tt-chap button.on { background: var(--gold); box-shadow: 0 0 0 2px rgba(229,184,135,.25); }
.tt-row { display: flex; align-items: center; gap: 10px; }
.tt-txt { flex: 1; min-width: 0; text-align: center; }
.tt-txt small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.tt-txt h2 { font-family: var(--serif); font-size: 27px; line-height: 1.1; font-weight: 700; margin: 2px 0 3px; }
.tt-txt p { font-size: 13px; line-height: 1.45; color: rgba(244,237,226,.82); min-height: 2.9em; }
.tt-nav { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(229,190,140,.45); background: rgba(255,255,255,.04);
  color: var(--gold); font-size: 26px; line-height: 1; cursor: pointer; transition: background .15s; }
.tt-nav:hover:not(:disabled) { background: rgba(229,184,135,.16); }
.tt-nav:disabled { opacity: .3; cursor: default; }
.tt-bar { height: 2px; margin: 9px 4px 8px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.tt-bar i { display: block; height: 100%; width: 0; background: var(--gold); }
.tt-tools { display: flex; gap: 8px; align-items: center; }
.tt-tools button { border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #f4ede2; border-radius: 20px; padding: 6px 13px; font: 600 12px "Be Vietnam Pro", sans-serif; cursor: pointer; }
.tt-tools button.on, #tt-play.on { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #181b20; border-color: transparent; }
#tt-hint { margin-left: auto; font-size: 11px; color: rgba(244,237,226,.5); }

#tt-map { position: fixed; z-index: 24; right: 14px; top: calc(84px + var(--st, 0px)); width: 300px; background: rgba(20,21,25,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(229,190,140,.3); border-radius: 14px; padding: 8px; }
.tt-map-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 3px 6px; }
.tt-map-head b { font-family: var(--serif); font-size: 17px; }
.tt-map-head span { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.tt-map-img { position: relative; border-radius: 8px; overflow: hidden; background: #fff; }
.tt-map-img img { display: block; width: 100%; }
.tt-map-img svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#tt-map-svg .cone { fill: rgba(200,150,102,.35); stroke: rgba(160,110,60,.6); stroke-width: 2; }
#tt-map-svg .me { fill: #c8873f; stroke: #fff; stroke-width: 5; }
#tt-map-svg .mk { fill: rgba(255,255,255,.9); stroke: #b88550; stroke-width: 5; cursor: pointer; }
#tt-map-svg .mk:hover { fill: var(--gold); }

#tt-marks { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.tt-mark { position: absolute; left: 0; top: 0; pointer-events: auto; border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tt-mark i { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,255,255,.95); background: radial-gradient(circle, rgba(229,184,135,.55) 0 30%, rgba(255,255,255,.12) 32%);
  box-shadow: 0 4px 14px rgba(0,0,0,.35); transform: perspective(200px) rotateX(55deg); transition: transform .2s; }
.tt-mark:hover i { transform: perspective(200px) rotateX(40deg) scale(1.12); }
.tt-mark span { font-size: 11.5px; font-weight: 600; color: #fff; background: rgba(20,21,25,.75); padding: 3px 9px; border-radius: 12px; white-space: nowrap; opacity: 0; transition: opacity .2s; }
.tt-mark:hover span { opacity: 1; }

#tt-start { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(ellipse at center, rgba(14,15,18,.35), rgba(14,15,18,.75)); transition: opacity .6s; }
#tt-start.hide { opacity: 0; pointer-events: none; }
.tt-start-card { max-width: 520px; text-align: center; background: rgba(18,19,23,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(229,190,140,.35); border-radius: 22px; padding: 28px 26px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.tt-start-card small { font-size: 10.5px; letter-spacing: .2em; color: var(--gold); font-weight: 600; }
.tt-start-card h1 { font-family: var(--serif); font-size: 38px; line-height: 1.08; margin: 8px 0 10px; font-weight: 700; }
.tt-start-card p { font-size: 14px; line-height: 1.55; color: rgba(244,237,226,.85); }
.tt-start-btns { display: flex; gap: 10px; justify-content: center; margin: 18px 0 12px; flex-wrap: wrap; }
.tt-start-btns button { border-radius: 26px; padding: 12px 22px; font: 700 14px "Be Vietnam Pro", sans-serif; cursor: pointer; border: 1px solid rgba(229,190,140,.5); background: rgba(255,255,255,.05); color: #f4ede2; }
.tt-start-btns .gold { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #181b20; border-color: transparent; }
#tt-load { display: block; font-size: 11.5px; color: rgba(244,237,226,.55); font-style: normal; }
#tt-load.ok { color: var(--gold); }
.tt-disc { display: block; margin-top: 12px; font-size: 10.5px; line-height: 1.45; color: rgba(244,237,226,.45); }

body.tour .note { z-index: 24; }

@media (max-width: 700px) {
  .tt-brand { top: calc(8px + var(--st, 0px)); left: 8px; padding: 6px 10px 6px 6px; }
  .tt-brand img { height: 24px; } .tt-brand b { font-size: 16px; } .tt-chip { display: none; }
  body.tour #contact-fab { top: calc(8px + var(--st, 0px)); right: 8px; }
  #tt-map { top: auto; right: 8px; left: auto; bottom: calc(232px + env(safe-area-inset-bottom)); width: 190px; padding: 5px; }
  .tt-map-head { padding-bottom: 3px; } .tt-map-head b { font-size: 14px; }
  #tt-card { bottom: calc(16px + env(safe-area-inset-bottom)); padding: 8px 8px 8px; border-radius: 16px; }
  .tt-txt h2 { font-size: 22px; } .tt-txt p { font-size: 12px; }
  .tt-nav { width: 38px; height: 38px; font-size: 22px; }
  .tt-chap span { font-size: 8.5px; }
  #tt-hint { display: none; }
  .tt-start-card h1 { font-size: 30px; }
}
body.tour .hotspot { display: none !important; }
.tt-nav:active:not(:disabled) { transform: scale(.9); background: rgba(229,184,135,.28); }
.tt-nav { touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background .15s, transform .1s; }
