/* Visor 3D · palabra.cl (tema esmeralda + zinc; usa variables del sitio si existen) */
.v3d { position: relative; border-radius: 18px; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #f4f4f5 55%, #e4e4e7 100%); border: 1px solid var(--line, #e4e4e7); font-family: Inter, system-ui, sans-serif; color: #18181b; }
.dark .v3d, [data-theme="dark"] .v3d { background: radial-gradient(120% 90% at 50% 0%, #27272a 0%, #18181b 70%); color: #fafafa; }
.v3d[data-kind="solar"] { background: #05060a; color: #fafafa; }
.v3d.v3d-dark { background: radial-gradient(120% 90% at 50% 0%, #3f3f46 0%, #18181b 75%); }
.v3d.v3d-dark .v3d-legend { background: rgba(24,24,27,.85); border-color: #3f3f46; }
.v3d:fullscreen { border-radius: 0; }
.v3d-stage { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 340px; touch-action: none; }
.v3d:fullscreen .v3d-stage { aspect-ratio: auto; height: 100vh; }
.v3d-stage canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.v3d-stage canvas:active { cursor: grabbing; }
.v3d-labels { position: absolute; inset: 0; pointer-events: none; }
.v3d-status { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600; color: #52525b; z-index: 2; }
.v3d-tag { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 6px; border-radius: 999px; border: 1px solid rgba(24,24,27,.12); background: rgba(255,255,255,.92); color: #18181b; font: 600 12px/1.2 Inter, system-ui, sans-serif; box-shadow: 0 2px 8px rgba(0,0,0,.12); cursor: pointer; white-space: nowrap; transition: opacity .2s, transform .2s; }
.v3d-tag span, .v3d-legend span { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.v3d-tag:hover, .v3d-tag.active { background: #047857; color: #fff; transform: scale(1.06); }
.v3d-tag.dim { opacity: .35; }
.v3d-nolabels .v3d-labels { display: none; }
.v3d-bar { position: absolute; top: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; z-index: 4; max-width: calc(100% - 20px); }
.v3d-btn, .v3d-speed { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(24,24,27,.12); background: rgba(255,255,255,.9); color: #18181b; font: 600 12.5px/1 Inter, system-ui, sans-serif; cursor: pointer; backdrop-filter: blur(4px); }
.v3d-btn:hover { border-color: #10b981; }
.v3d-btn.on { background: #ecfdf5; border-color: #10b981; color: #047857; }
.v3d-speed input { width: 80px; accent-color: #10b981; }
.v3d-legend { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line, #e4e4e7); background: rgba(255,255,255,.7); }
.v3d-legend:empty { display: none; }
.v3d-legend button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid #e4e4e7; background: #fff; font: 600 12.5px/1 Inter, system-ui, sans-serif; color: #3f3f46; cursor: pointer; }
.v3d-legend button.on { border-color: #10b981; background: #ecfdf5; color: #047857; }
.v3d-info { position: absolute; left: 12px; bottom: 64px; max-width: min(360px, calc(100% - 24px)); padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.95); border: 1px solid #d1fae5; box-shadow: 0 8px 24px rgba(0,0,0,.12); font-size: 14px; line-height: 1.45; color: #18181b; opacity: 0; transform: translateY(6px); transition: .2s; pointer-events: none; z-index: 3; }
.v3d-info.show { opacity: 1; transform: none; }
.v3d-info p { margin: 4px 0 0; color: #3f3f46; }
.v3d-phase { position: absolute; left: 12px; top: 12px; max-width: min(380px, calc(100% - 24px)); padding: 10px 12px; border-radius: 12px; background: rgba(24,24,27,.82); color: #fafafa; font-size: 13.5px; line-height: 1.4; z-index: 3; display: grid; gap: 3px; }
.v3d-phase strong { font-size: 15px; }
.v3d[data-kind="solar"] .v3d-legend { background: rgba(5,6,10,.9); border-color: #27272a; }
.v3d[data-kind="solar"] .v3d-legend button { background: #18181b; border-color: #3f3f46; color: #e4e4e7; }
@media (max-width: 640px) { .v3d-stage { aspect-ratio: 4 / 5; } .v3d-bar { top: auto; bottom: 8px; right: 8px; } .v3d-info { bottom: auto; top: 10px; } .v3d-phase { top: auto; bottom: 56px; } }
@media (prefers-reduced-motion: reduce) { .v3d-tag { transition: none; } }
