.legend-tooltip { margin-top: 11px; padding: 15px 16px 16px; border: 1px solid #bac9d9ad; border-radius: 12px; background: linear-gradient(145deg, #233043ed, #101923f5 46%, #111a28f5); box-shadow: inset 0 1px 0 #fff6, inset 0 0 0 1px #657b953d, 0 15px 32px #0009, 0 0 18px #b7cce520; backdrop-filter: blur(16px); }
.legend-tooltip[hidden] { display: none; }
.legend-tooltip h2 { margin: 0 0 8px; color: #edf5ff; font-size: 13px; line-height: 1.25; letter-spacing: .02em; }
.legend-tooltip p { margin: 0; color: #d7e1ee; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.legend-tooltip strong { color: #f7fbff; }
.sam-portrait { display: inline-flex; vertical-align: -10px; position: relative; width: 32px; height: 32px; margin-left: 4px; border: 1px solid #e5eef9; border-radius: 6px; overflow: hidden; background: #0b111b; box-shadow: 0 0 0 1px #7389a0, 0 0 6px #d7eaff55; animation: sam-live 5s ease-in-out infinite; }
.sam-portrait img { display: block; width: 100%; height: calc(100% + 2px); object-fit: cover; object-position: center 30%; animation: sam-presence 5s ease-in-out infinite; }
@keyframes sam-live { 0%, 100% { box-shadow: 0 0 0 1px #7389a0, 0 0 6px #d7eaff55; } 50% { box-shadow: 0 0 0 1px #d3e4f5, 0 0 11px #d7eaff9c; } }
@keyframes sam-presence { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }
@media (prefers-reduced-motion: reduce) { .sam-portrait, .sam-portrait img { animation: none; } }
.legend-tooltip { position:fixed; z-index:99999; margin:0; width:min(320px,calc(100vw - 16px)); box-sizing:border-box; max-height:calc(100vh - 16px); overflow:auto; text-align:left; }
.legend-info { position:absolute; top:8px; right:8px; z-index:4; width:24px; height:24px; padding:0; border:1px solid #a7b7c9; border-radius:50%; background:#111925; color:#eff6ff; cursor:pointer; font:700 14px/1 Georgia,serif; }
.legend-info:focus-visible { outline:2px solid #e5efff; outline-offset:2px; }
