/* =========================================================================
   LIOS | tour.css  (360 virtual tour page)
   ========================================================================= */
html, body.tourpage { height: 100%; overflow: hidden; background: var(--navy-deep); color: var(--on-dark); }
.tour { position: fixed; inset: 0; }
.tour__pano { position: absolute; inset: 0; background: var(--navy-deep); }
.tour__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(12, 26, 44, .55) 0%, rgba(12, 26, 44, 0) 18%, rgba(12, 26, 44, 0) 62%, rgba(12, 26, 44, .7) 100%); }
.pnlm-container { background: var(--navy-deep) !important; font-family: var(--f-body) !important; }
.pnlm-load-box, .pnlm-about-msg, .pnlm-orientation-button, .pnlm-panorama-info { display: none !important; }
.pnlm-ui { cursor: grab; }
.pnlm-grabbing .pnlm-ui { cursor: grabbing; }

/* top bar */
.tour__top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 1.2rem; padding: max(1rem, env(safe-area-inset-top)) var(--gutter) 1rem; }
.tour__logo svg { width: 92px; height: 31px; color: #fff; display: block; }
.tour__badge { display: inline-flex; align-items: center; gap: .5rem; padding-left: 1.2rem; border-left: 1px solid var(--line-dark); font-size: .64rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--on-dark-soft); }
.tour__badge .ico { width: 18px; height: 18px; }
.tour__actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.tour__actions .sound { color: #fff; }
.tour__enq { min-height: 40px; padding: .7rem 1.3rem; }
.tour__close { width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%; display: grid; place-items: center; color: #fff; transition: background .3s, color .3s; }
.tour__close:hover { background: #fff; color: var(--navy); }
.tour__close .ico { width: 16px; height: 16px; }

/* scene card */
.tour__card { position: absolute; left: var(--gutter); bottom: max(1.4rem, env(safe-area-inset-bottom)); z-index: 4; max-width: 25rem; }
.tour__card.is-in > * { animation: tin .8s var(--ease-out) both; }
.tour__card.is-in > *:nth-child(2) { animation-delay: .06s; }
.tour__card.is-in > *:nth-child(3) { animation-delay: .12s; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }
.tour__cat { font-size: .62rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--blue-soft); }
.tour__name { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.8rem); line-height: 1.1; margin: .35rem 0 .45rem; text-shadow: 0 2px 20px rgba(0, 0, 0, .35); }
.tour__info { font-size: .86rem; color: var(--on-dark-soft); max-width: 34ch; text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
.tour__nav { display: flex; align-items: center; gap: .6rem; margin-top: 1.1rem; }
.tour__btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .5); color: #fff; background: rgba(12, 26, 44, .35); backdrop-filter: blur(8px); transition: background .3s, color .3s; }
.tour__btn:hover { background: #fff; color: var(--navy); }
.tour__btn .ico { width: 16px; height: 16px; }
.ico--flip { transform: scaleX(-1); }
.tour__count { font-size: .72rem; letter-spacing: .14em; color: var(--on-dark-soft); min-width: 4.4rem; text-align: center; }
.tour__count b { color: #fff; font-weight: 500; }
.tour__all { height: 42px; padding: 0 1.1rem; margin-left: .4rem; border: 1px solid rgba(255, 255, 255, .5); background: rgba(12, 26, 44, .35); backdrop-filter: blur(8px); font-size: .62rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #fff; transition: background .3s, color .3s; }
.tour__all:hover, .tour__all[aria-expanded="true"] { background: #fff; color: var(--navy); }

/* tools */
.tour__tools { position: absolute; right: var(--gutter); top: 5.6rem; z-index: 4; display: flex; flex-direction: column; gap: .4rem; }
.tour__tool { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .35); background: rgba(12, 26, 44, .35); backdrop-filter: blur(8px); color: #fff; transition: background .3s, color .3s; }
.tour__tool:hover, .tour__tool[aria-pressed="true"] { background: #fff; color: var(--navy); }
.tour__tool .ico { width: 18px; height: 18px; }
.tour__tool[hidden] { display: none; }

/* master plan */
.tour__map { position: absolute; right: var(--gutter); bottom: max(1.4rem, env(safe-area-inset-bottom)); z-index: 4; width: clamp(220px, 22vw, 320px); background: rgba(12, 26, 44, .6); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(10px); }
.tour__maphead { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: .6rem .8rem; font-size: .6rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--on-dark-soft); }
.tour__maphead .ico { width: 14px; height: 14px; transition: transform .4s var(--ease); }
.tour__map.is-closed .tour__maphead .ico { transform: rotate(180deg); }
.tour__mapbody { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .5s var(--ease-out); }
.tour__map.is-closed .tour__mapbody { grid-template-rows: 0fr; }
.tour__mapimg { position: relative; overflow: hidden; }
.tour__mapimg img { display: block; width: 100%; height: auto; opacity: .92; }
.tour__pins { position: absolute; inset: 0; }
.pin { position: absolute; width: 22px; height: 22px; transform: translate(-50%, -50%); display: grid; place-items: center; }
.pin__dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); box-shadow: 0 0 0 2px rgba(12, 26, 44, .35); transition: transform .3s; }
.pin:hover .pin__dot { transform: scale(1.3); }
.pin.is-active .pin__dot { background: var(--blue); border-color: #fff; transform: scale(1.35); }
.pin__cone { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; transform-origin: 50% 100%; transform: translate(-50%, -100%); opacity: 0; pointer-events: none;
  background: conic-gradient(from -32deg at 50% 100%, rgba(255, 255, 255, .55) 0deg, rgba(255, 255, 255, .1) 64deg, transparent 64deg); clip-path: polygon(50% 100%, 0 0, 100% 0); }
.pin.is-active .pin__cone { opacity: 1; }
.pin__tip { position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: .25rem .5rem; background: var(--navy); font-size: .62rem; letter-spacing: .04em; opacity: 0; pointer-events: none; transition: opacity .2s; }
.pin:hover .pin__tip, .pin:focus-visible .pin__tip { opacity: 1; }

/* hotspots (walk arrows) */
.hs-wrap { width: 0; height: 0; }
.hs { position: relative; }
.hs__ring { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); border: 1.5px solid #fff; color: #fff; backdrop-filter: blur(4px); cursor: pointer; transition: background .3s, color .3s, transform .3s; animation: hsp 2.6s var(--ease) infinite; }
.hs__ring svg { width: 24px; height: 24px; }
.hs:hover .hs__ring { background: #fff; color: var(--navy); transform: scale(1.08); animation: none; }
@keyframes hsp { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); } 60% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); } }
.hs__label { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: .3rem .65rem; background: rgba(12, 26, 44, .78); color: #fff; font-size: .62rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; pointer-events: none; }

/* list drawer */
.tour__list { position: absolute; top: 0; right: 0; bottom: 0; z-index: 8; width: min(420px, 100%); background: rgba(12, 26, 44, .94); backdrop-filter: blur(14px); border-left: 1px solid var(--line-dark); display: flex; flex-direction: column; animation: lin .5s var(--ease-out); }
.tour__list[hidden] { display: none; }
@keyframes lin { from { transform: translateX(30px); opacity: 0; } }
.tour__listhead { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line-dark); }
.tour__listbody { overflow-y: auto; padding: .4rem 1.4rem 2rem; }
.tour__group { margin: 1.3rem 0 .7rem; font-size: .6rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--blue-soft); }
.tour__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.tview { text-align: left; color: var(--on-dark-soft); }
.tview img { display: block; width: 100%; aspect-ratio: 9 / 5; object-fit: cover; border: 1px solid transparent; transition: border-color .3s, opacity .3s; opacity: .85; }
.tview span { display: block; margin-top: .4rem; font-size: .74rem; line-height: 1.35; }
.tview:hover img { opacity: 1; }
.tview.is-active img { border-color: #fff; opacity: 1; }
.tview.is-active span { color: #fff; }

/* hint + loading */
.tour__hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; display: flex; align-items: center; gap: .7rem; padding: .9rem 1.3rem; background: rgba(12, 26, 44, .62); backdrop-filter: blur(8px); font-size: .78rem; letter-spacing: .04em; pointer-events: none; transition: opacity .8s var(--ease); }
.tour__hint .ico { width: 22px; height: 22px; }
.tour__hint.is-gone { opacity: 0; }
.tour__loading { position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 9; overflow: hidden; opacity: 0; transition: opacity .4s; }
.tour__loading.is-on { opacity: 1; }
.tour__loading span { position: absolute; top: 0; bottom: 0; width: 30%; background: var(--blue-soft); animation: lbar 1.2s var(--ease-io) infinite; }
@keyframes lbar { from { left: -30%; } to { left: 100%; } }
.tour__note { position: absolute; left: 50%; bottom: max(.6rem, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 3; font-size: .56rem; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark-mute); pointer-events: none; }
.tour__noscript { position: fixed; inset: auto 0 2rem; text-align: center; }

@media (max-width: 900px) {
  .tour__badge { display: none; }
  .tour__enq { display: none; }
}
@media (max-width: 700px) {
  .tour__top { gap: .6rem; }
  .tour__logo svg { width: 74px; height: 25px; }
  .tour__card { left: 1rem; right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); max-width: none; }
  .tour__info { display: none; }
  .tour__name { font-size: 1.6rem; }
  .tour__nav { margin-top: .7rem; }
  .tour__all { margin-left: auto; }
  .tour__tools { top: 5.2rem; right: 1rem; }
  .tour__tools [data-tour-zin], .tour__tools [data-tour-zout] { display: none; }
  .tour__map { top: 5.2rem; bottom: auto; right: auto; left: 1rem; width: 170px; }
  .tour__note { display: none; }
  .hs__label { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hs__ring { animation: none; } }

/* Local preview (opened from a folder): flat, slowly panning picture */
.tour__flatwrap { overflow: hidden; }
.tour__flat { position: absolute; top: 0; left: 0; height: 100%; width: auto; max-width: none; opacity: 0; transition: opacity .8s var(--ease); animation: flatpan 80s linear infinite alternate; }
.tour__flat.is-in { opacity: 1; }
@keyframes flatpan { from { transform: translateX(0); } to { transform: translateX(calc(-100% + 100vw)); } }
.tour__local { position: absolute; left: 50%; top: 5.4rem; transform: translateX(-50%); z-index: 6; width: min(34rem, calc(100% - 2rem)); padding: 1rem 1.2rem; background: rgba(12, 26, 44, .86); border: 1px solid var(--line-dark); backdrop-filter: blur(10px); }
.tour__local[hidden] { display: none; }
.tour__localt { font-size: .62rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--blue-soft); margin-bottom: .35rem; }
.tour__localp { font-size: .8rem; line-height: 1.6; color: var(--on-dark-soft); }
@media (max-width: 700px) { .tour__local { top: auto; bottom: 9.5rem; } }
.tour__tools[hidden], .tour__hint[hidden] { display: none; }
