/* ---------- ARCHIVE: infinite wall ---------- */
body.archive { overflow: hidden; height: 100vh; overscroll-behavior: none; }
#gl-wall { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#gl-wall.dragging { cursor: grabbing; }
@media (hover: hover) { #gl-wall, #gl-wall.dragging { cursor: none; } }

.a-top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 22px var(--m);
  background: linear-gradient(#050505 30%, transparent); pointer-events: none; }
.a-top > * { pointer-events: auto; }
.a-title { text-align: center; }
.a-title b { font-weight: 500; }
.a-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.a-filters button { font: inherit; font-size: 11px; color: var(--fg); background: none; border: 1px solid rgba(255,255,255,.18); padding: 4px 9px; border-radius: 99px; letter-spacing: .06em; transition: background .2s, color .2s, border-color .2s; }
.a-filters button:hover { border-color: var(--acid); }
.a-filters button.on { background: var(--acid); color: #000; border-color: var(--acid); }
.a-filters sup { font-size: 9px; opacity: .6; margin-left: 2px; }

.a-bot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-between; padding: 20px var(--m); color: #bdbdb6; font-size: 11px;
  background: linear-gradient(transparent, #050505 70%); pointer-events: none; font-variant-numeric: tabular-nums; }
.drag-ico { display: inline-block; width: 22px; height: 10px; vertical-align: middle; margin-right: 8px; border: 1px solid var(--acid); border-radius: 99px; position: relative; }
.drag-ico::after { content: ""; position: absolute; top: 2px; left: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--acid); animation: dragdot 1.6s ease-in-out infinite; }
@keyframes dragdot { 50% { left: 14px; } }

/* hover label */
.a-label { position: fixed; left: 0; top: 0; z-index: 15; pointer-events: none; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 11px; background: #050505; border: 1px solid var(--acid);
  opacity: 0; scale: .9; transform-origin: 0 0; transition: opacity .2s, scale .25s cubic-bezier(.2,.8,.2,1); max-width: 300px; }
.a-label.on { opacity: 1; scale: 1; }
.a-label b { font-weight: 900; font-stretch: 125%; font-size: 20px; letter-spacing: -.02em; line-height: 1; text-transform: uppercase; }
.l-tag { color: var(--acid); font-size: 10px; }
.l-meta { color: var(--dim); font-size: 10px; }

/* ---------- DETAIL ---------- */
.dt { position: fixed; inset: 0; z-index: 40; display: grid; grid-template-columns: 58% 42%; background: #050505; visibility: hidden; }
.dt.open { visibility: visible; }
#gl-detail { width: 100%; height: 100vh; display: block; }
.dt-panel { position: relative; display: flex; flex-direction: column; padding: 22px var(--m) 22px 34px; height: 100vh; overflow-y: auto; border-left: 1px solid rgba(255,255,255,.08); }
.dt-top, .dt-nav { display: flex; justify-content: space-between; align-items: center; }
.dt-top button, .dt-nav button { font: inherit; color: var(--fg); background: none; border: 0; letter-spacing: .06em; }
.dt-top button:hover, .dt-nav button:hover { color: var(--acid); }
.dt-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 4vh 0; }
.dt-tag { display: inline-block; background: var(--acid); color: #000; padding: 2px 8px; font-weight: 500; }
.dt-title { font-size: clamp(40px, 5.4vw, 96px); font-weight: 900; font-stretch: 125%; line-height: .88; letter-spacing: -.045em; text-transform: uppercase; overflow-wrap: anywhere; }
.dt-desc { font-size: 17px; line-height: 1.6; color: #cfcfc8; max-width: 34em; }
.dt-meta { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.1); }
.dt-meta div { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.dt-meta dt { color: var(--dim); font-size: 10px; }
.dt-meta dd { font-size: 13px; }
.dt-prompt { border: 1px solid rgba(255,255,255,.12); background: #0c0c0b; }
.dt-pk { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.08); color: var(--dim); font-size: 10px; }
.dt-pk button { font: inherit; color: var(--acid); background: none; border: 0; letter-spacing: .08em; }
.dt-prompt pre { font-family: var(--mono); font-size: 12.5px; line-height: 1.65; white-space: pre-wrap; padding: 12px; color: #e8e8e0; }
.dt-act { display: flex; gap: 10px; }
.btn-acid, .btn-line { padding: 14px 22px; font-weight: 500; }
.btn-acid { background: var(--acid); color: #000; }
.btn-acid:hover { box-shadow: 0 0 40px rgba(200,255,0,.5); }
.btn-line { border: 1px solid rgba(255,255,255,.25); }
.btn-line:hover { border-color: var(--pink); color: var(--pink); }

/* staggered reveal of detail text */
.rv { opacity: 0; translate: 0 40px; transition: opacity .5s, translate .8s cubic-bezier(.2,.8,.2,1); }
.dt.open .rv { opacity: 1; translate: 0 0; }
.dt.open .rv:nth-child(1) { transition-delay: .25s; } .dt.open .rv:nth-child(2) { transition-delay: .32s; }
.dt.open .rv:nth-child(3) { transition-delay: .39s; } .dt.open .rv:nth-child(4) { transition-delay: .46s; }
.dt.open .rv:nth-child(5) { transition-delay: .53s; } .dt.open .rv:nth-child(6) { transition-delay: .6s; }
.dt.swap .rv { opacity: 0; translate: 0 -20px; transition-duration: .25s; transition-delay: 0s !important; }
.dt-title span { display: block; }

@media (max-width: 820px) {
  .a-top { grid-template-columns: 1fr auto; }
  .a-title { display: none; }
  .a-filters { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .a-bot span:nth-child(2) { display: none; }
  .dt { grid-template-columns: 1fr; grid-template-rows: 46vh 1fr; }
  #gl-detail { height: 46vh; }
  .dt-panel { height: 54vh; padding: 16px; border-left: 0; }
  .dt-body { justify-content: flex-start; gap: 16px; padding: 2vh 0; }
  .dt-meta { grid-template-columns: repeat(2, 1fr); }
}
