:root { color-scheme: light; --ink: #203238; --muted: #65777d; --accent: #116958; --line: #dce5e4; }
* { box-sizing: border-box; }
#editor, #editor *, #content-dialog, #content-dialog *, .tour-marker, .tour-marker *, #placement-hint, #placement-hint * { box-sizing: border-box; }
#editor, #content-dialog { user-select: text; font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #111; font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; color: var(--ink); }
#panorama { width: 100%; height: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible { outline: 3px solid #54ac91; outline-offset: 3px; }
.tour-hotspot { width: 0; height: 0; background: none; z-index: 3; }
.tour-marker { --marker-scale: 1; --label-scale: 1; position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(var(--marker-scale)); display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1.5px solid #ffffffe0; border-radius: 50%; background: #183e3f66; color: #fff; box-shadow: 0 1px 7px #0005; line-height: 1; text-align: center; touch-action: manipulation; }
.tour-marker::before { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; border-radius: 50%; transform: translate(-50%, -50%) scale(var(--label-scale)); }
.tour-marker.zoom-hidden { visibility: hidden; }
.tour-marker.zoom-inactive { pointer-events: none; }
.tour-marker:hover, .tour-marker:focus-visible { background: #116958; }
.tour-marker.selected { background: #116958; outline: 2px solid #ffffffaa; outline-offset: 3px; }
.marker-icon { display: grid; place-items: center; width: 100%; height: 100%; font-size: 15px; font-weight: 500; }
.tour-marker.ignition-switch { width: 30px; height: 30px; border-color: #ced8deeb; background: radial-gradient(circle at 35% 28%, #b7c3cbd9, #4b5b65e6 75%); box-shadow: 0 2px 6px #0008, inset 0 1px 2px #fff6; }
.ignition-switch .marker-icon svg { width: 100%; height: 100%; overflow: visible; }
.ignition-switch .knob-ticks { fill: none; stroke: #f1f5f7; stroke-width: 1.1; stroke-linecap: round; }
.ignition-switch .knob-rim { fill: #bdc7cd; stroke: #edf3f7; stroke-width: .65; }
.ignition-switch .knob-face { fill: #24313a; stroke: #5a6b76; stroke-width: .8; }
.ignition-switch .knob-pointer { transform: rotate(-38deg); transform-origin: 16px 16px; transition: transform .28s ease; }
.ignition-switch .knob-pointer path { fill: none; stroke: #eff4f7; stroke-width: 2.4; stroke-linecap: round; }
.ignition-switch .knob-light { fill: #59656c; stroke: #edf3f7; stroke-width: .6; transition: fill .25s; }
.ignition-switch.is-lit .knob-pointer { transform: rotate(38deg); }
.ignition-switch.is-lit .knob-light { fill: #ffb94f; }
.tour-marker.ignition-switch.is-lit { border-color: #ffe6bd; box-shadow: 0 2px 6px #0008, 0 0 8px #ffb34c80, inset 0 1px 2px #fff6; }
.marker-label { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) scale(var(--label-scale)); transform-origin: 50% 0; padding: 7px 10px; max-width: 220px; width: max-content; border-radius: 6px; background: #142a2fe8; color: #fff; opacity: 0; pointer-events: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.4; }
.tour-marker:hover .marker-label, .tour-marker:focus-visible .marker-label, .tour-marker.selected .marker-label { opacity: 1; }
#content-dialog { width: min(1000px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 16px 80px #0008; overflow: auto; overscroll-behavior: contain; }
#content-dialog::backdrop { background: #0b1d29b8; backdrop-filter: blur(4px); }
.content-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 22px; border-bottom: 1px solid var(--line); }
.content-header h1 { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.icon-button { flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #edf2f1; color: var(--ink); font-size: 25px; line-height: 1; }
.icon-button:hover { background: #dce9e5; }
#content-body { position: relative; }
.info-content { padding: 24px; max-width: 820px; margin: auto; }
.info-content p { white-space: pre-wrap; line-height: 1.85; margin: 0; overflow-wrap: anywhere; }
.info-content img { display: block; max-width: 100%; max-height: 62dvh; object-fit: contain; margin: 0 auto 22px; border-radius: 10px; }
.embed-stage { position: relative; height: min(70dvh, 680px); min-height: 260px; background: #edf1f0; }
.embed-stage iframe, .embed-stage model-viewer { width: 100%; height: 100%; border: 0; display: block; }
.embed-stage model-viewer { background: radial-gradient(ellipse at 50% 35%, #fcfdfc, #dee6e3); --poster-color: transparent; }
.loading-note, .content-error { position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; padding: 24px; text-align: center; pointer-events: none; background: #edf1f0; }
.content-error { color: #934235; }
#content-footer { padding: 12px 22px; background: #f8faf9; border-top: 1px solid var(--line); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); }
#content-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
#content-dialog.floating-model { width: min(900px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
#content-dialog.floating-model::backdrop { background: transparent; backdrop-filter: none; }
.floating-model .content-header { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 0; border: 0; }
.floating-model .content-header h1 { display: none; }
.floating-model .icon-button { width: 40px; height: 40px; flex-basis: 40px; color: #fff; background: #163b42a8; border: 1px solid #ffffffb0; box-shadow: 0 1px 8px #0003; }
.floating-model .icon-button:hover { background: #116958; }
.floating-model .embed-stage { height: min(82dvh, 780px); background: transparent; }
.floating-model iframe, .floating-model model-viewer { background: transparent; }
.floating-model .loading-note, .floating-model .content-error { background: transparent; color: #fff; text-shadow: 0 1px 6px #000; }
.floating-model #content-footer { display: none; }
#content-dialog.video-panel { width: min(680px, calc(100vw - 24px)); color: #fff; background: #15232b; border-radius: 12px; }
#content-dialog.video-panel::backdrop { background: #0a172445; backdrop-filter: none; }
.video-panel .content-header { padding: 10px 14px; border-color: #ffffff20; }
.video-panel .content-header h1 { font-size: 16px; }
.video-panel .icon-button { color: #fff; background: #ffffff15; }
.video-panel .icon-button:hover { background: #ffffff30; }
.video-panel #content-footer { display: none; }
.video-stage { position: relative; min-height: 150px; background: #000; }
.tour-video { display: block; width: 100%; height: auto; max-height: 56dvh; object-fit: contain; background: #000; }
.video-stage .loading-note, .video-stage .content-error { color: #e9eeee; background: #101a20; }
.video-stage .content-error a { color: #a6dfce; pointer-events: auto; font-size: 13px; }
.video-play-button { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 62px; height: 62px; padding: 0 0 0 4px; border-radius: 50%; border: 1px solid #ffffffa0; color: #fff; background: #152c39bd; font-size: 23px; }
.video-play-button:hover { background: #116958; }
#editor { position: absolute; right: 14px; top: 14px; bottom: 14px; width: 330px; padding: 22px; border-radius: 16px; background: rgba(255,255,255,.97); box-shadow: 0 5px 28px #0004; overflow: auto; z-index: 10; overscroll-behavior: contain; }
.editor-header { display: flex; justify-content: space-between; align-items: center; }
.editor-header h1 { font-size: 24px; margin: 4px 0 0; }
.eyebrow { font-size: 11px; color: var(--accent); letter-spacing: 2px; }
.editor-intro { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 14px 0; }
.primary-button, .secondary-button { padding: 10px 14px; border-radius: 8px; border: 1px solid transparent; font-size: 13px; font-weight: 600; }
.primary-button { color: #fff; background: var(--accent); }
.primary-button:hover { background: #0b5144; }
.secondary-button { background: #f3f7f5; color: var(--ink); border-color: var(--line); }
.wide { width: 100%; }
.text-button { border: 0; background: none; color: var(--accent); padding: 8px 0; font-size: 12px; }
.danger-button { color: #a13e32; background: transparent; border: 0; padding: 12px 0 0; font-size: 12px; }
.status { font-size: 12px; line-height: 1.6; margin: 12px 0; padding: 10px; background: #edf6f2; border-radius: 8px; overflow-wrap: anywhere; }
.status.error { color: #963f32; background: #fff0eb; }
.editor-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.editor-section h2 { font-size: 13px; margin: 0 0 12px; }
#hotspot-count { color: var(--muted); margin-left: 6px; font-weight: 400; }
.empty-list { font-size: 12px; color: var(--muted); padding: 8px 0; line-height: 1.6; }
.hotspot-list-item { display: block; width: 100%; text-align: left; background: #f3f7f5; border: 1px solid transparent; border-radius: 8px; padding: 10px 12px; margin: 6px 0; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.hotspot-list-item.active { border-color: var(--accent); background: #e8f4ef; }
.hotspot-list-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
#hotspot-form label { display: block; font-size: 12px; margin: 13px 0 6px; }
#hotspot-form input, #hotspot-form select, #hotspot-form textarea { width: 100%; border: 1px solid #ccd9d6; border-radius: 7px; background: #fff; padding: 9px 10px; font-size: 13px; color: var(--ink); }
#hotspot-form input:focus, #hotspot-form select:focus, #hotspot-form textarea:focus { border-color: var(--accent); outline: 2px solid #11695822; }
#hotspot-form textarea { resize: vertical; min-height: 90px; }
.field-help, .export-section p { font-size: 11px; line-height: 1.7; color: var(--muted); margin: 8px 0; }
.position-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 10px; color: var(--muted); }
.button-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.editor-open { position: absolute; right: 16px; top: 16px; z-index: 10; padding: 10px 16px; border-radius: 24px; border: 0; color: #fff; background: var(--accent); box-shadow: 0 2px 12px #0003; }
.placement-hint { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 11; width: max-content; max-width: calc(100% - 28px); padding: 12px 16px; display: flex; gap: 16px; align-items: center; border-radius: 12px; background: #142a2fea; color: #fff; box-shadow: 0 4px 18px #0004; font-size: 13px; }
.placement-hint button { border: 1px solid #ffffff70; border-radius: 6px; background: transparent; color: #fff; padding: 5px 10px; white-space: nowrap; }
#panorama.placing .pnlm-dragfix { cursor: crosshair; }
@media (max-width: 600px) {
  #editor { top: 10px; right: 10px; bottom: 10px; width: min(310px, calc(100vw - 20px)); padding: 18px; }
  .editor-header h1 { font-size: 22px; }
  #content-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .content-header { padding: 10px 14px; }
  .content-header h1 { font-size: 17px; }
  .info-content { padding: 18px; }
  .embed-stage { height: 66dvh; min-height: 240px; }
  #content-footer { padding: 10px 14px; font-size: 12px; }
  .tour-marker { max-width: 170px; }
  .marker-label { font-size: 12px; }
  .placement-hint { bottom: 16px; font-size: 12px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media (prefers-reduced-motion: reduce) { .ignition-switch .knob-pointer, .ignition-switch .knob-light { transition: none; } }
