/* E·SYNX · Week 6 entry (w6_entry.js). All classes start with w6e- (nothing here touches existing classes). */
html.w6e-open, html.w6e-open body { overflow: hidden; }
.w6e { position: fixed; inset: 0; z-index: 9000; background: #8f8a84; color: #2b2520; overflow: hidden; font-family: "Newsreader", Georgia, serif;
  animation: w6e-in .6s ease both; -webkit-user-select: none; user-select: none; }
.w6e.bye { opacity: 0; transition: opacity .5s; }
@keyframes w6e-in { from { opacity: 0; } }
.w6e-view, .w6e-stage { position: absolute; inset: 0; }
.w6e-stage { opacity: 0; transition: opacity 1s ease, transform 1.3s cubic-bezier(.6,0,.4,1); }
.w6e-stage.in { opacity: 1; }
.w6e-stage.out { opacity: 0; transition-duration: .7s; }

/* ---------- 2000: one line at a time, and its signal interference ---------- */
.w6e-say { position: absolute; left: 50%; bottom: 7vh; transform: translate(-50%, 8px); max-width: min(680px, 88vw); text-align: center; opacity: 0;
  transition: opacity .7s, transform .7s; pointer-events: none; z-index: 5; text-shadow: 0 0 18px rgba(240,236,228,.9); }
.w6e-say.on { opacity: 1; transform: translate(-50%, 0); }
.w6e-say .w6e-en { display: block; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: clamp(16px, 2vw, 22px); letter-spacing: .02em; color: #1f1b17; }
.w6e-say .w6e-zh { display: block; margin-top: 6px; font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 13px; color: #4a423a; }
.w6e-scan { position: absolute; inset: 0; pointer-events: none; z-index: 4; opacity: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 1px, transparent 1px 3px), radial-gradient(circle at 50% 60%, transparent 40%, rgba(40,35,30,.25)); }
.w6e.w6e-glitch .w6e-scan { animation: w6e-glitch .65s steps(6) both; }
.w6e.w6e-glitch .w6e-view { animation: w6e-shift .65s steps(5) both; }
@keyframes w6e-glitch { 0% { opacity: .9; transform: translateY(-4px); } 50% { opacity: .5; transform: translateY(3px); } 100% { opacity: 0; transform: none; } }
@keyframes w6e-shift { 0% { filter: blur(1.2px); transform: translateX(3px); } 40% { transform: translateX(-2px); } 100% { filter: none; transform: none; } }

/* on photographs 2000's line is light on a soft shadow */
.w6e.w6e-photo .w6e-say { text-shadow: 0 1px 14px rgba(20,16,12,.95), 0 0 4px rgba(20,16,12,.8); }
.w6e.w6e-photo .w6e-say .w6e-en { color: #f6f1e8; } .w6e.w6e-photo .w6e-say .w6e-zh { color: #e2d8c8; }

/* ---------- buttons, cards ---------- */
.w6e-btn { font: 500 14px/1 "IBM Plex Sans", system-ui, sans-serif; letter-spacing: .02em; color: #f3eee6; background: #3a322b; border: 0; border-radius: 999px;
  padding: 12px 20px; cursor: pointer; transition: background .2s, transform .2s, opacity .6s; }
.w6e-btn span { display: inline-block; margin-left: 6px; transition: transform .2s; }
.w6e-btn:hover { background: #1f1a16; } .w6e-btn:hover span { transform: translateX(3px); }
.w6e-btn.w6e-ghost { background: rgba(243,238,230,.85); color: #3a322b; } .w6e-btn.w6e-ghost:hover { background: #fff; }
.w6e-btn:focus-visible, .w6e-spot:focus-visible, .w6e-opts button:focus-visible { outline: 2px solid #f4b24f; outline-offset: 3px; }
.w6e-close { position: absolute; top: 14px; right: 16px; z-index: 6; font: 500 13px "IBM Plex Sans", system-ui, sans-serif; color: #2b2520; background: rgba(243,238,230,.7);
  border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.w6e-close:hover { background: #f3eee6; }
.w6e-enter { position: absolute; left: 50%; bottom: 17vh; transform: translateX(-50%); opacity: 0; z-index: 3; }
.w6e-enter.on { opacity: 1; }
.w6e-card { position: absolute; right: 3%; top: 50%; width: min(380px, 86vw); transform: translate(12px, -50%); opacity: 0; pointer-events: none; z-index: 3;
  background: #efe7d8; color: #2b2520; border-radius: 4px; padding: 22px 24px 20px; box-shadow: 0 18px 50px rgba(30,24,18,.35);
  background-image: repeating-linear-gradient(0deg, rgba(90,70,50,.035) 0 1px, transparent 1px 4px); transition: opacity .45s, transform .45s; }
.w6e-card.on { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.w6e-card h3 { margin: 0 0 10px; font: 400 22px/1.2 "Newsreader", Georgia, serif; }
.w6e-card .w6e-en { margin: 0 0 8px; font-size: 17px; line-height: 1.5; }
.w6e-card .w6e-zh { margin: 0 0 16px; font: 13px/1.6 "IBM Plex Sans", system-ui, sans-serif; color: #6b5f52; }
.w6e-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- the map (one time layer, room for more above) ---------- */
.w6e-map { background: radial-gradient(ellipse at 50% 45%, #b3ada5, #8f8a84 70%); }
.w6e-map.fly { transform: scale(5); opacity: 0; transition: transform 1.3s cubic-bezier(.6,0,.4,1), opacity 1.1s ease .2s; }
.w6e-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.w6e-plate { fill: rgba(236,232,224,.16); stroke: rgba(255,255,255,.55); stroke-width: 1.2; }
.w6e-ghosts .w6e-plate { fill: rgba(236,232,224,.05); stroke: rgba(255,255,255,.22); stroke-dasharray: 3 6; }
.w6e-ext path { fill: #6f604e; }
.w6e-coast { fill: none; stroke: #4a3c2e; stroke-width: 1.1; opacity: .7; }
.w6e-rail-bed { fill: none; stroke: #3b3026; stroke-width: 5; stroke-dasharray: 1 5; opacity: .6; }
.w6e-rail { fill: none; stroke: #3b3026; stroke-width: 1.4; opacity: .8; }
.w6e-dot { fill: #3b3026; stroke: #f3eee6; stroke-width: 1.5; }
.w6e-city .w6e-glow { opacity: 0; transition: opacity 2s; }
.w6e-city.on .w6e-glow { opacity: 1; }
.w6e-man { cursor: pointer; }
.w6e-fog { fill: #a39d95; opacity: .8; animation: w6e-breathe 9s ease-in-out infinite; }
@keyframes w6e-breathe { 50% { opacity: .72; } }
.w6e-lamp { mix-blend-mode: screen; }
.w6e-label { font: italic 15px "Newsreader", Georgia, serif; fill: #2b2520; paint-order: stroke; stroke: rgba(243,238,230,.8); stroke-width: 3px; }
.w6e-label-man { opacity: 0; transition: opacity 1.6s 1s; } .w6e-label-man.on { opacity: 1; }

/* ---------- the door (the frame every place is entered through) ---------- */
.w6e-door { background: transparent; z-index: 2; pointer-events: none; }
.w6e-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 55%; transition: transform 1.1s cubic-bezier(.6,0,.3,1), opacity 1s ease; }
.w6e-door.open .w6e-frame { transform: scale(1.9); opacity: 0; }

/* ---------- the street: today's photo, the 1840s inside the lens ---------- */
.w6e-street, .w6e-cellar { background: #2b2520; }
.w6e-box { position: absolute; overflow: hidden; cursor: none; touch-action: none; }
.w6e-cellar .w6e-box { cursor: default; }
.w6e-layers { position: absolute; inset: 0; }
.w6e-l { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; pointer-events: none; }
.w6e-then { clip-path: circle(0 at 50% 50%); }
.w6e-ring { position: absolute; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 1.5px rgba(243,238,230,.85), 0 0 0 7px rgba(43,37,32,.25), 0 10px 40px rgba(0,0,0,.35), inset 0 0 30px rgba(43,37,32,.35); }
.w6e-ring span { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); font: 500 11px "IBM Plex Mono", monospace; letter-spacing: .12em; color: #f3eee6; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.w6e-spot { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .4s; z-index: 2; }
.w6e-spot.on { opacity: 1; pointer-events: auto; }
.w6e-spot i { display: block; width: 26px; height: 26px; margin: 0 auto; border-radius: 50%; border: 1.5px solid #2b2520; background: rgba(239,231,216,.55); animation: w6e-pulse 2.2s ease-out infinite; }
.w6e-spot.seen i { animation: none; background: rgba(239,231,216,.9); }
.w6e-spot span { display: block; margin-top: 6px; white-space: nowrap; font: italic 15px "Newsreader", Georgia, serif; color: #2b2520; background: rgba(239,231,216,.85); padding: 2px 8px; border-radius: 2px; }
@keyframes w6e-pulse { 0% { box-shadow: 0 0 0 0 rgba(43,37,32,.45); } 100% { box-shadow: 0 0 0 16px rgba(43,37,32,0); } }

/* ---------- the cellar: today's empty room, then the 1840s develops ---------- */
.w6e-full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.w6e-dev { --r: 0%; --k: 0; opacity: 0;
  -webkit-mask-image: radial-gradient(circle at 51% 40%, #000 calc(var(--r) - 18%), transparent var(--r)); mask-image: radial-gradient(circle at 51% 40%, #000 calc(var(--r) - 18%), transparent var(--r));
  filter: sepia(1) contrast(calc(.35 + var(--k) * .65)) brightness(calc(2.2 - var(--k) * 1.2)) blur(calc((1 - var(--k)) * 6px)); }
.w6e-dev.go { opacity: 1; }
.w6e-woman { opacity: 0; transition: opacity 2.4s ease; } .w6e-woman.on { opacity: 1; }
.w6e-q { left: 50%; right: auto; top: auto; bottom: 6%; transform: translate(-50%, 12px); width: min(560px, 90vw); }
.w6e-q.on { transform: translate(-50%, 0); }
.w6e-opts { display: grid; gap: 8px; }
.w6e-opts button { text-align: left; font: 16px/1.3 "Newsreader", Georgia, serif; color: #2b2520; background: #f8f3ea; border: 1px solid #cdbfa8; border-radius: 4px; padding: 10px 14px; cursor: pointer; }
.w6e-opts button:hover { border-color: #3a322b; }
.w6e-opts button.no { opacity: .45; text-decoration: line-through; }
.w6e-opts button.yes { background: #3a322b; color: #f3eee6; border-color: #3a322b; }
.w6e-hint { margin: 10px 0 0; font: 13px "IBM Plex Sans", system-ui, sans-serif; color: #8c3b2a; min-height: 1em; }
.w6e-end { position: absolute; left: 50%; bottom: 20%; transform: translateX(-50%); opacity: 0; transition: opacity .8s; z-index: 3; }
.w6e-end.on { opacity: 1; }

@media (max-width: 700px) { .w6e-card { right: 50%; transform: translate(50%, 12px); top: auto; bottom: 4%; } .w6e-card.on { transform: translate(50%, 0); }
  .w6e-q { left: 50%; right: auto; transform: translate(-50%, 12px); } .w6e-q.on { transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .w6e *, .w6e { animation: none !important; transition-duration: .01s !important; } }
