:root { color-scheme: dark; font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #171714; }
button { font: inherit; }
.tour-shell, .panorama { position: relative; width: 100%; height: 100%; }
.panorama { background: #171714; }
.panorama::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.38), transparent 25%, transparent 68%, rgba(0,0,0,.42)); }
.pnlm-container { background: #171714; }
.pnlm-load-box { background: rgba(20,20,18,.76); }
.pnlm-title-box { display: none; }
.pnlm-controls-container { top: auto; right: max(24px, env(safe-area-inset-right)); bottom: 116px; left: auto; z-index: 4; }
.pnlm-control { border: 0; border-radius: 0; background-color: rgba(20,20,18,.52); box-shadow: none; backdrop-filter: blur(12px); }
.room-hotspot { width: 27px !important; height: 27px !important; margin: -13.5px 0 0 -13.5px !important; border: 1px solid rgba(255,255,255,.78); border-radius: 50%; background: rgba(19,19,17,.52) !important; box-shadow: 0 3px 11px rgba(0,0,0,.28), 0 0 0 4px rgba(255,255,255,.1); backdrop-filter: blur(4px); cursor: pointer; opacity: .5; animation: hotspotPulse 2.1s ease-in-out infinite; transition: opacity .2s ease; }
.room-hotspot:hover { opacity: .85; }
.room-hotspot::before { content: ""; position: absolute; top: 8px; left: 8px; width: 9px; height: 9px; border-right: 1px solid #fff; border-bottom: 1px solid #fff; transform: rotate(45deg); }
.room-hotspot::after { content: ""; position: absolute; top: 5px; left: 12.5px; width: 1px; height: 11px; background: #fff; }
.room-hotspot span { top: auto !important; bottom: 38px !important; left: 50% !important; width: max-content !important; max-width: 150px; padding: 7px 10px !important; border-radius: 0 !important; color: #fff !important; background: rgba(20,20,18,.82) !important; font-size: 11px !important; letter-spacing: .06em; transform: translateX(-50%); }
@keyframes hotspotPulse { 0%,100% { box-shadow: 0 3px 11px rgba(0,0,0,.28), 0 0 0 3px rgba(255,255,255,.08); } 50% { box-shadow: 0 3px 11px rgba(0,0,0,.28), 0 0 0 6px rgba(255,255,255,.16); } }
.tour-header { position: absolute; top: 0; right: 0; left: 0; z-index: 5; display: flex; align-items: flex-start; justify-content: space-between; padding: max(28px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-right)) 24px max(32px, env(safe-area-inset-left)); pointer-events: none; }
.brand, .tour-header button { pointer-events: auto; }
.brand-kicker { color: rgba(255,255,255,.68); font-size: 10px; letter-spacing: .22em; }
.brand h1 { margin: 7px 0 0; color: #fff; font-family: "Songti SC", "SimSun", serif; font-size: clamp(27px, 3vw, 43px); font-weight: 400; letter-spacing: .06em; }
.glass-button { border: 1px solid rgba(255,255,255,.28); color: #fff; background: rgba(20,20,18,.4); backdrop-filter: blur(14px); cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.glass-button:hover { border-color: rgba(255,255,255,.56); background: rgba(20,20,18,.58); }
.menu-button { display: flex; align-items: center; gap: 14px; min-width: 166px; padding: 13px 15px; }
.menu-button strong { margin-left: auto; font-size: 11px; font-weight: 500; }
.menu-icon { display: grid; gap: 5px; }
.menu-icon i { display: block; width: 16px; height: 1px; background: currentColor; }
.tour-footer { position: absolute; right: 0; bottom: 0; left: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; padding: 24px max(32px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(32px, env(safe-area-inset-left)); pointer-events: none; }
.tour-footer > * { pointer-events: auto; }
.drag-hint { margin: 0; color: rgba(255,255,255,.72); font-size: 11px; letter-spacing: .1em; }
.drag-hint span { margin-right: 8px; font-size: 16px; }
.scene-controls { display: flex; align-items: stretch; gap: 8px; }
.arrow-button { width: 48px; font-size: 17px; }
.scene-name { display: grid; min-width: 160px; padding: 10px 16px; color: #fff; background: rgba(20,20,18,.52); backdrop-filter: blur(14px); }
.scene-name small { color: rgba(255,255,255,.56); font-size: 8px; letter-spacing: .18em; }
.scene-name span { margin-top: 4px; font-size: 12px; letter-spacing: .08em; }
.footer-actions { justify-self: end; display: flex; gap: 8px; }
.info-button { padding: 13px 18px; font-size: 12px; letter-spacing: .08em; }
.music-button { display: inline-flex; align-items: center; gap: 7px; min-width: 72px; justify-content: center; }
.music-button > span:first-child { font-size: 16px; line-height: 1; }
.music-button.is-playing > span:first-child { animation: musicPulse 1.8s ease-in-out infinite; }
@keyframes musicPulse { 0%,100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.12); } }
.scene-drawer { position: absolute; top: 0; bottom: 0; left: 0; z-index: 10; width: min(420px, 90vw); padding: 32px; overflow-y: auto; color: #f3f1eb; background: rgba(22,22,20,.94); backdrop-filter: blur(24px); transform: translateX(-102%); transition: transform .35s cubic-bezier(.2,.75,.2,1); }
.scene-drawer.is-open { transform: translateX(0); }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; }
.drawer-header small, .info-panel > small { color: #aaa499; font-size: 9px; letter-spacing: .2em; }
.drawer-header h2, .info-panel h2 { margin: 7px 0 0; font-family: "Songti SC", "SimSun", serif; font-size: 30px; font-weight: 400; }
.drawer-header button, .info-panel > button { border: 0; color: #fff; background: transparent; font-size: 30px; font-weight: 200; cursor: pointer; }
.scene-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scene-card { position: relative; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: 1px solid transparent; background: #292925; cursor: pointer; }
.scene-card.is-active { border-color: #fff; }
.scene-card img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.72); transition: transform .35s ease, opacity .2s ease; }
.scene-card:hover img { transform: scale(1.82); }
.scene-card span { position: absolute; right: 8px; bottom: 7px; min-width: 28px; padding: 5px; color: #fff; background: rgba(0,0,0,.66); font-size: 10px; }
.drawer-backdrop { position: absolute; inset: 0; z-index: 9; visibility: hidden; background: rgba(0,0,0,.32); opacity: 0; transition: opacity .3s ease, visibility .3s; }
.drawer-backdrop.is-open { visibility: visible; opacity: 1; }
.hotspot-editor { position: absolute; right: 28px; bottom: 100px; z-index: 12; width: min(360px, calc(100vw - 32px)); padding: 22px; color: #24231f; background: rgba(241,238,231,.97); box-shadow: 0 18px 56px rgba(0,0,0,.3); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .22s ease, transform .22s ease, visibility .22s; }
.hotspot-editor.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.editor-head { display: flex; align-items: flex-start; justify-content: space-between; }
.editor-head small { color: #8b857b; font-size: 8px; letter-spacing: .18em; }
.editor-head h2 { margin: 5px 0 0; font-family: "Songti SC", "SimSun", serif; font-size: 26px; font-weight: 400; }
.editor-head button { border: 0; color: #24231f; background: transparent; font-size: 28px; cursor: pointer; }
.hotspot-editor > p { color: #69645c; font-size: 12px; line-height: 1.7; }
.hotspot-target-list { display: grid; gap: 7px; margin: 16px 0; }
.hotspot-target-list button { display: flex; justify-content: space-between; padding: 10px 12px; border: 1px solid #c9c3b8; color: #34312c; background: transparent; text-align: left; cursor: pointer; }
.hotspot-target-list button.is-selected { border-color: #24231f; background: #24231f; color: #fff; }
.hotspot-target-list small { opacity: .62; }
.editor-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.editor-actions button { padding: 11px 8px; border: 1px solid #24231f; color: #fff; background: #24231f; cursor: pointer; }
.editor-actions button:disabled { opacity: .35; cursor: not-allowed; }
.editor-actions button + button { color: #24231f; background: transparent; }
.hotspot-editor .editor-note { margin-bottom: 0; color: #918a7f; font-size: 10px; }
.tour-shell.is-placing-hotspot .panorama { cursor: crosshair; }
.tour-shell.is-placing-hotspot .panorama::before { content: "点击画面放置箭头 · ESC 取消"; position: absolute; top: 50%; left: 50%; z-index: 8; padding: 10px 14px; color: #fff; background: rgba(18,18,16,.76); font-size: 12px; letter-spacing: .08em; transform: translate(-50%,-50%); pointer-events: none; }
.floor-plan-panel { position: absolute; inset: 4vh 4vw; z-index: 11; display: flex; flex-direction: column; padding: 28px; color: #24231f; background: rgba(241,238,231,.98); box-shadow: 0 24px 80px rgba(0,0,0,.3); opacity: 0; visibility: hidden; transform: translateY(18px) scale(.985); transition: opacity .28s ease, transform .28s ease, visibility .28s; }
.floor-plan-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.floor-plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.floor-plan-head small { color: #8b857b; font-size: 9px; letter-spacing: .2em; }
.floor-plan-head h2 { margin: 4px 0 0; font-family: "Songti SC", "SimSun", serif; font-size: 30px; font-weight: 400; }
.floor-plan-head p { margin: 5px 0 0; color: #777269; font-size: 11px; }
.floor-plan-head > button { border: 0; color: #24231f; background: transparent; font-size: 30px; font-weight: 200; cursor: pointer; }
.floor-plan-map { display: grid; place-items: center; flex: 1; min-height: 0; overflow: auto; background: #fff; }
.floor-plan-canvas { position: relative; width: min(100%, calc((100vh - 190px) * 1.415)); aspect-ratio: 3309 / 2339; flex: none; }
.floor-plan-canvas > img { display: block; width: 100%; height: 100%; }
.plan-point { position: absolute; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 2px solid #fff; border-radius: 50%; color: #fff; background: #1c1c19; box-shadow: 0 3px 12px rgba(0,0,0,.34); font-size: 10px; font-weight: 700; transform: translate(-50%,-50%); cursor: pointer; transition: transform .18s ease, background .18s ease; }
.plan-point:hover { transform: translate(-50%,-50%) scale(1.16); }
.plan-point.is-active { color: #1c1c19; background: #e2c486; box-shadow: 0 0 0 6px rgba(226,196,134,.25), 0 3px 12px rgba(0,0,0,.3); }
.plan-point::after { content: attr(data-title); position: absolute; bottom: calc(100% + 7px); left: 50%; width: max-content; max-width: 120px; padding: 5px 7px; color: #fff; background: rgba(20,20,18,.88); font-size: 10px; font-weight: 400; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(3px); transition: opacity .15s ease, transform .15s ease; }
.plan-point:hover::after, .plan-point:focus-visible::after, .plan-point.is-active::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.info-panel { position: absolute; top: 0; right: 0; bottom: 0; z-index: 11; width: min(480px, 100vw); padding: 42px; overflow-y: auto; color: #24231f; background: #eeeae1; transform: translateX(102%); transition: transform .35s cubic-bezier(.2,.75,.2,1); }
.info-panel.is-open { transform: translateX(0); }
.info-panel > button { position: absolute; top: 26px; right: 28px; color: #24231f; }
.info-panel h2 { margin-top: 10px; font-size: 42px; }
.info-panel p { margin: 28px 0; color: #605d55; font-size: 14px; line-height: 2; }
.project-meta { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 20px 0; border-top: 1px solid #cac4b9; border-bottom: 1px solid #cac4b9; font-size: 12px; }
.project-meta span { color: #8b857b; }
.project-meta strong { font-weight: 500; }
.photo-viewer { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 42px; visibility: hidden; opacity: 0; background: rgba(12,12,11,.9); backdrop-filter: blur(10px); transition: opacity .25s ease, visibility .25s; }
.photo-viewer.is-open { visibility: visible; opacity: 1; }
.photo-viewer > button { position: absolute; top: 22px; right: 28px; border: 0; color: #fff; background: transparent; font-size: 36px; cursor: pointer; }
.photo-viewer figure { display: grid; gap: 12px; max-width: min(82vw, 900px); max-height: 88vh; margin: 0; }
.photo-viewer img { display: block; max-width: 100%; max-height: 80vh; margin: auto; object-fit: contain; }
.photo-viewer figcaption { color: rgba(255,255,255,.78); font-size: 12px; text-align: center; letter-spacing: .12em; }
@media (max-width: 720px) {
  .tour-header { padding: max(18px, env(safe-area-inset-top)) 16px 18px; }
  .brand-kicker { font-size: 8px; }
  .brand h1 { font-size: 26px; }
  .menu-button { min-width: 132px; gap: 9px; padding: 11px 12px; font-size: 12px; }
  .tour-footer { grid-template-columns: 1fr auto; gap: 12px; padding: 18px 16px max(18px, env(safe-area-inset-bottom)); }
  .drag-hint { display: none; }
  .scene-controls { grid-column: 1; }
  .scene-name { min-width: 118px; padding-inline: 12px; }
  .arrow-button { width: 42px; }
  .info-button { grid-column: 2; padding-inline: 13px; }
  .footer-actions { grid-column: 2; gap: 5px; }
  .footer-actions .info-button { padding: 11px 9px; font-size: 10px; }
  .editor-only-button { display: none; }
  .hotspot-editor { right: 10px; bottom: 86px; }
  .pnlm-controls-container { right: 16px; bottom: 102px; }
  .scene-drawer { padding: 24px 18px; }
  .info-panel { padding: 34px 24px; }
  .floor-plan-panel { inset: 2vh 10px; padding: 18px 12px; }
  .floor-plan-head { margin-bottom: 12px; }
  .floor-plan-map { overflow: auto; align-items: start; }
  .floor-plan-canvas { width: max(100%, 680px); }
  .plan-point { width: 25px; height: 25px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
