/* Lebensweg – styles */
:root {
  --bg: #07080d; --panel: rgba(14, 16, 26, .78); --line: rgba(255, 255, 255, .12);
  --ink: #f2efe8; --dim: #a3a7b6;
  --music: #f7c46b; --tech: #61d6ff; --life: #ff94a8; --protected: #ffb347; --private: #b88fff;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); overflow: hidden; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
body:not(.ready) #gl { opacity: 0; } #gl { transition: opacity 1.2s; }
body.nogl #gl, body.nogl #timeline, body.nogl #year, body.nogl #hint { display: none; }

.btn { font: 600 14px var(--sans); color: var(--ink); background: rgba(255, 255, 255, .07); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .2s, border-color .2s; }
.btn:hover { background: rgba(255, 255, 255, .16); } .btn:disabled { opacity: .35; cursor: default; }
.btn.icon { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; }
#b-auto.on { background: var(--ink); color: var(--bg); }

#top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px; pointer-events: none; z-index: 5; }
#top > * { pointer-events: auto; } nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
#name { font: 600 22px/1.1 var(--serif); letter-spacing: .01em; }
#tagline { color: var(--dim); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }

#year { position: fixed; left: 20px; bottom: 64px; font: 700 clamp(56px, 11vw, 132px)/1 var(--serif); color: rgba(255, 255, 255, .09); pointer-events: none; letter-spacing: -.02em; }
#hint { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); color: var(--dim); font-size: 14px; background: var(--panel); padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); transition: opacity .8s; text-align: center; max-width: calc(100% - 32px); }
#hint.gone { opacity: 0; pointer-events: none; }

#peek { position: fixed; right: 20px; top: 50%; width: min(380px, calc(100% - 40px)); transform: translate(30px, -50%); opacity: 0; pointer-events: none;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--c, var(--ink)); border-radius: 14px; padding: 20px 22px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: opacity .45s, transform .45s; z-index: 4; }
#peek.on { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
#peek.left { right: auto; left: 20px; transform: translate(-30px, -50%); } #peek.left.on { transform: translate(0, -50%); }
#peek h2, #detail h2 { font: 600 24px/1.2 var(--serif); margin: 4px 0 10px; }
#peek p { margin: 0 0 10px; color: #d9d6cf; } #peek .btn { margin-top: 6px; }
.meta { font-size: 13px; color: var(--dim); } .meta span { color: var(--c, var(--ink)); font-weight: 700; }
.music { --c: var(--music); } .tech { --c: var(--tech); } .life { --c: var(--life); }

.badge { display: inline-block; font: 700 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; color: #111; vertical-align: middle; }
.badge.protected { background: var(--protected); } .badge.private { background: var(--private); }
.extra { border-left: 2px solid var(--protected); padding: 4px 0 4px 14px; margin: 14px 0; } .extra.private { border-color: var(--private); }
.extra p { margin: 8px 0 0; }

#timeline { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 20px 18px; z-index: 5; }
#tl-track { position: relative; height: 22px; margin: 0 8px; }
#tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: linear-gradient(90deg, var(--life), var(--music), var(--tech)); opacity: .35; border-radius: 2px; }
.dot { position: absolute; top: 5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--c); background: var(--bg); padding: 0; cursor: pointer; transition: transform .2s; }
.dot:hover { transform: scale(1.5); } .dot.protected { border-style: dashed; border-color: var(--protected); } .dot.private { border-style: dashed; border-color: var(--private); }
#tl-now { position: absolute; top: 1px; width: 4px; height: 20px; margin-left: -2px; background: var(--ink); border-radius: 2px; box-shadow: 0 0 12px var(--ink); pointer-events: none; }
#ver { position: absolute; right: 20px; bottom: 2px; font-size: 10px; color: rgba(255, 255, 255, .25); }

.modal { position: fixed; inset: 0; display: none; z-index: 10; background: rgba(4, 5, 9, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 16px; overflow: auto; }
.modal.on { display: grid; place-items: center; animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.panel { position: relative; width: min(760px, 100%); background: #0e1019; border: 1px solid var(--line); border-top: 3px solid var(--c, var(--ink)); border-radius: 16px; padding: 28px clamp(18px, 4vw, 40px); }
.panel.small { width: min(380px, 100%); } .panel .x { position: absolute; right: 14px; top: 14px; }
#detail h2 { font-size: 30px; padding-right: 40px; } #detail p { color: #dcd9d2; }
.nav { display: flex; justify-content: space-between; margin-top: 22px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 18px; }
.thumb { position: relative; aspect-ratio: 4/3; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 0; background: #161926; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; } .thumb:hover img { transform: scale(1.05); }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; color: #fff; text-shadow: 0 0 12px #000; }
.thumb .badge { position: absolute; left: 6px; top: 6px; }

#lightbox.on { grid-template-columns: auto 1fr auto; gap: 10px; }
#lightbox figure { margin: 0; text-align: center; } #lightbox .x { position: fixed; right: 16px; top: 16px; }
#lb-media img, #lb-media video { max-width: 100%; max-height: 80vh; border-radius: 8px; display: block; margin: 0 auto; }
#lb-cap { color: var(--dim); margin-top: 10px; }

#login input { width: 100%; font: 16px var(--sans); padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: #070810; color: var(--ink); margin: 6px 0 12px; }
#login h2 { font: 600 24px var(--serif); margin: 0; } #login p { color: var(--dim); } #login .msg { color: #ff8a8a; margin-top: 10px; min-height: 1em; }

#list .doc { width: min(820px, 100%); background: #f6f3ec; color: #1d1d22; border-radius: 16px; padding: 24px clamp(18px, 5vw, 56px) 48px; align-self: start; }
.doc-bar { display: flex; gap: 8px; justify-content: flex-end; position: sticky; top: 0; }
.doc-bar .btn { color: #1d1d22; background: rgba(0, 0, 0, .06); border-color: rgba(0, 0, 0, .12); }
#l-body h1 { font: 600 36px/1.1 var(--serif); margin: 8px 0 0; } #l-body .sub { color: #666; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; }
#l-body article { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid #ddd6c8; }
#l-body .yr { font: 700 16px var(--serif); color: color-mix(in srgb, var(--c) 60%, #000); }
#l-body h3 { font: 600 19px var(--serif); margin: 0; } #l-body .pl { color: #777; font-size: 14px; } #l-body p { margin: 6px 0; }
#l-body a, #detail a, #peek a { color: inherit; }
.warn { background: #ffe3b3; padding: 10px 14px; border-radius: 8px; }

@media (max-width: 640px) {
  #top { padding: 12px 16px; flex-direction: column; } nav { justify-content: flex-start; }
  #peek { top: auto; bottom: 64px; right: 16px; left: 16px; width: auto; transform: translateY(20px); max-height: 42vh; overflow: auto; }
  #peek.on, #peek.left.on { transform: none; } #peek.left { right: 16px; left: 16px; }
  #year { bottom: auto; top: 110px; left: 16px; }
  #hint { bottom: 60px; font-size: 13px; }
  #l-body article { grid-template-columns: 1fr; gap: 2px; }
  #lightbox.on { grid-template-columns: 1fr; } .lb-nav { display: none; }
}
@media print {
  html, body { overflow: visible; height: auto; background: #fff; }
  body > *:not(#list) { display: none !important; }
  #list { position: static; display: block !important; background: none; padding: 0; backdrop-filter: none; }
  #list .doc { width: auto; padding: 0; } .doc-bar { display: none; }
  #l-body article { break-inside: avoid; }
}
