#stage.craft-visiting > :not(canvas):not(.craft-visit) { display: none !important; pointer-events: none !important; }
#stage > .craft-visit { position: absolute; inset: 0; z-index: 30; outline: none; touch-action: none; }
.cv-panel { position: absolute; top: 44px; right: 10px; width: min(320px, 44%); padding: 7px 10px 8px; box-sizing: border-box; background: rgba(17,20,23,.94); border: 1px solid var(--line); border-left: 2px solid var(--accent); max-height: calc(100% - 54px); overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }
.cv-panel h3 { margin: 0 0 8px; color: var(--accent); }
.cv-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.cv-panel p { font-size: 12px; line-height: 1.4; margin: 8px 0 0; }
.cv-note, .cv-help { color: var(--dim); }
.cv-neighbours button { display: block; width: 100%; text-align: left; margin-top: 4px; }
.cv-neighbours:empty { display: none; }
@media (max-width: 600px) { .cv-panel { top: auto; bottom: 8px; left: 10px; width: auto; max-height: 40%; padding: 8px; } }
.cv-panel button, .ss-craft-card button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 4px 8px; font: inherit; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--text); background: #0b0e10; border: 1px solid var(--line); cursor: pointer; }
.cv-panel button:hover, .ss-craft-card button:hover { border-color: var(--accent); }
.cv-panel button.on { color: #111; background: var(--accent); border-color: var(--accent); }
.cv-panel a { color: var(--accent); text-decoration: underline; }
.cv-panel button:focus-visible, .ss-craft-card button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (pointer: coarse) { .cv-panel button, .ss-craft-card button { min-height: 40px; } }

body.craft-visiting #info > :not(.cv-facts) { display: none !important; }
body.craft-visiting #info > .cv-facts { display: block !important; }
.layer-card .acts { flex-wrap: wrap; }

.cv-details { margin-top: 8px; font-size: 12px; }
.cv-details summary { color: var(--accent); cursor: pointer; }
.cv-neighbour { border-top: 1px solid var(--line); padding: 5px 0; }
.cv-neighbour-details { margin: 4px 0; }
.cv-neighbour-details dl { display: grid; grid-template-columns: 100px 1fr; gap: 4px 8px; }
.cv-neighbour-details dt { color: var(--dim); }
.cv-neighbour-details dd { margin: 0; overflow-wrap: anywhere; }
.cv-orbit-note { color: var(--dim); }

.cv-hover { position: absolute; z-index: 2; max-width: min(300px, calc(100% - 32px)); padding: 7px 10px; background: rgba(17,20,23,.96); color: var(--accent); border: 1px solid var(--line); border-left: 2px solid var(--accent); font-size: 12px; pointer-events: none; }
.cv-hover[hidden] { display: none; }

.cv-controls { position: absolute; top: 4px; right: 6px; z-index: 3; width: 72px; min-height: 30px; padding: 3px 5px; background: rgba(11,12,14,.9); color: var(--dim); border: 1px solid var(--line); font: inherit; font-size: 11px; cursor: pointer; }
.cv-controls[aria-expanded=true] { color: var(--accent); border-color: var(--accent); }
.cv-controls:hover { color: var(--text); }
.cv-controls:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cv-panel[hidden] { display: none; }
@media (pointer: coarse) { .cv-controls { min-height: 40px; } }
.cv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cv-head h3 { margin-bottom: 3px; }
.cv-panel .cv-fold { flex-shrink: 0; padding: 0; min-height: 24px; background: none; border: 0; color: var(--dim); font-size: 10px; letter-spacing: .1em; }
.cv-panel .cv-fold:hover { color: var(--accent); }
.cv-panel.folded > :not(.cv-head):not(.cv-location) { display: none; }

.cv-neighbours { max-height: 230px; overflow-y: auto; margin-top: 8px; border-top: 1px solid var(--line); }
.cv-neighbours button { justify-content: flex-start; }
.cv-neighbour-details { margin: 2px 0; }

.cv-distance { margin: 6px 0; font-size: 12px; }
.cv-distance summary { color: var(--accent); cursor: pointer; }
.cv-distance label { display: block; margin: 6px 0; }
.cv-distance select { max-width: 100%; color: var(--text); background-color: var(--bg); font: inherit; border: 1px solid var(--line); }
.cv-distance svg { display: block; width: 100%; margin-top: 6px; background: #0b0e10; }
.cv-distance svg text { fill: var(--dim); font-size: 10px; }
.cv-distance-axis { fill: none; stroke: var(--dim); }
.cv-distance-line { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.cv-distance-min { fill: var(--text); stroke: var(--accent); }

.cv-neighbours:has(.cv-distance[open]) { max-height: none; }

.cv-labels { position: absolute; inset: 0; pointer-events: none; }
.cv-label { position: absolute; width: 205px; height: 58px; box-sizing: border-box; padding: 3px 5px; background: rgba(8,12,15,.84); border-left: 1px solid var(--accent); color: var(--text); font-size: 11px; line-height: 16px; font-variant-numeric: tabular-nums; }
.cv-label strong, .cv-label span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-label strong { color: var(--accent); }
.cv-label[hidden], .cv-labels[hidden] { display: none; }
.cv-label::before { content: ''; position: absolute; left: -11px; top: 19px; width: 10px; border-top: 1px solid var(--accent); }
