#open-visualizer { font: inherit; font-size: .9rem; cursor: pointer; color: var(--text-primary); border: 0; border-radius: 0; padding: .45rem .1rem; background: transparent; }
#open-visualizer:hover { color: #d9d4c8; }
.viz { position: fixed; inset: 0; z-index: 10000; color: #d8d7d2; background: #07090b; font-family: var(--font-sans); isolation: isolate; }
.viz::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; box-shadow: inset 0 0 150px #0009; }
.viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.viz-top { position: absolute; top: 20px; left: 24px; right: 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 4; pointer-events: none; }
.viz-brand { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .18em; color: #777a7f; }
.viz-brand strong { display: block; color: #b4b1a7; font: 400 .9rem var(--font-sans); letter-spacing: .04em; margin-bottom: 7px; }
.viz-actions { display: flex; align-items: center; gap: 18px; pointer-events: auto; }
.viz button { cursor: pointer; font: 400 .72rem var(--font-mono); border: 0; border-bottom: 1px solid transparent; border-radius: 0; padding: 9px 0; background: transparent; color: #a5a7aa; text-shadow: 0 1px 8px #000; }
.viz button:hover, .viz button[aria-pressed="true"] { color: #e0daca; border-bottom-color: #a59b82; }
.viz button:focus-visible, .viz a:focus-visible, .viz-card:focus-visible { outline: 1px solid #c0b798; outline-offset: 5px; }
.viz-viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; z-index: 3; }
.viz-viewport.dragging { cursor: grabbing; }
.viz-world { position: absolute; left: 50%; top: 50%; will-change: transform; }
.viz-card { position: absolute; width: 340px; display: flex; flex-direction: column; transform: translate(-50%, -50%); background: linear-gradient(90deg,#0c1015f5,#0c1015d9); border: 0; border-top: 1px solid #8e8e8238; border-radius: 0; padding: 22px 20px; box-sizing: border-box; box-shadow: none; }
.viz-card::before { content: ''; position: absolute; width: 2px; height: 32px; top: 20px; left: 0; background: #99938070; }
.viz-card h2 { font-size: 1.55rem; font-weight: 400; letter-spacing: -.025em; margin: 10px 0 20px; color: #dedad0; }
.viz-label { color: #88877f; font: .6rem var(--font-mono); letter-spacing: .13em; text-transform: uppercase; }
.viz-card-body { min-height: 0; max-height: 330px; overflow: auto; touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #72726955 transparent; }
.viz-card p { color: #9a9ea3; font-size: .88rem; line-height: 1.8; margin: 8px 0; }
.viz-item { border-top: 1px solid #d8d7d212; padding: 15px 0; }
.viz-item:first-child { border-top: 0; padding-top: 0; }
.viz-item h3 { font-size: .97rem; font-weight: 500; margin: 0; color: #c9c8c3; }
.viz-item img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 0; margin: 10px 0; filter: saturate(.45); }
.viz-item small { color: #9b9482; font: .65rem var(--font-mono); display: block; margin-top: 7px; line-height: 1.8; }
.viz-card a { display: inline-block; color: #beb49b; font-size: .8rem; padding: 7px 0; text-decoration-color: #beb49b44; text-underline-offset: 4px; }
.viz-core { width: 460px; text-align: left; padding: 28px 26px; background: linear-gradient(90deg,#0b1016ea,#0b101690); border-color: #b0a58c44; }
.viz-core h2 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.7rem,5vw,4.1rem); line-height: 1.04; font-weight: 400; letter-spacing: -.05em; margin: 20px 0; color: #e5e0d4; }
.viz-core .viz-card-body { max-height: 240px; }
.viz-core .viz-headline { color: #b5b0a4; font-size: .97rem; }
.viz-meta { flex-shrink: 0; font: .62rem var(--font-mono); letter-spacing: .08em; color: #777d85; margin-top: 18px; }
.viz-bottom { position: absolute; bottom: 14px; left: 24px; right: 24px; z-index: 4; pointer-events: none; }
.viz-nav { display: flex; justify-content: safe center; gap: 21px; overflow-x: auto; margin-bottom: 8px; scrollbar-width: thin; pointer-events: auto; }
.viz-nav button { flex-shrink: 0; padding: 9px 0; font-size: .65rem; }
.viz-hint { text-align: center; font: .6rem var(--font-mono); color: #7b8592; letter-spacing: .03em; text-shadow: 0 1px 8px #000; }
.viz-status { margin-left: 12px; color: #888779; }
@media(max-width:700px) {
  #site-nav ul { display: flex; } #site-nav li:not(.visualizer-entry) { display: none; }
  .header-container { gap: .5rem; } #open-visualizer { font-size: .75rem; padding: .4rem .1rem; }
  .viz-top { top: 12px; left: 14px; right: 14px; } .viz-brand strong { font-size: .8rem; } .viz-brand { font-size: .5rem; }
  .viz-actions { gap: 12px; } .viz-actions button { font-size: .6rem; }
  .viz-bottom { bottom: 10px; left: 14px; right: 14px; } .viz-nav { justify-content: flex-start; gap: 18px; } .viz-hint { font-size: .52rem; }
}
@media(max-width:420px) { .viz-brand { display: none; } .viz-top { justify-content: flex-end; } .viz-hint { display: none; } }
@media(max-height:480px) { .viz-top { top: 8px; } .viz-bottom { bottom: 8px; } .viz-hint { display: none; } .viz-nav { margin-bottom: 0; } }
@media(prefers-reduced-motion:reduce) { .viz-world { will-change: auto; } .viz-card { transition: none; } }
