/* =========================================================================
   UI chrome — dark cosmic, bilingual
   ========================================================================= */

/* ----------------------------------------------------------------- Header */
.AppHeader {
  position: fixed; top: 1rem; left: 1rem; right: 1rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 3.5rem; pointer-events: none; color: var(--plaster);
}
@media (min-width: 1050px) { .AppHeader { top: 2rem; left: 2.5rem; right: 2.5rem; height: 4rem; } }
.AppHeader a, .AppHeader button { pointer-events: auto; }

.AppHeader__Logo { display: inline-flex; align-items: baseline; gap: 0.6rem; }
.AppHeader__Brand-cn {
  font-family: var(--font-cn-brush); font-size: 1.5rem; letter-spacing: 0.12em;
  color: var(--gold-light);
  text-shadow: 0 0 18px rgba(232,179,73,0.35);
}
.AppHeader__Brand-en {
  font-family: var(--font-latin-display); font-size: 0.8rem; letter-spacing: 0.18em;
  text-transform: uppercase; opacity: 0.6;
}
@media (min-width: 1050px) { .AppHeader__Brand-cn { font-size: 1.9rem; } .AppHeader__Brand-en { font-size: 0.9rem; } }

.AppHeader__Navbar { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; }
.UIBtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  height: 2.4rem; padding: 0 0.9rem; border-radius: var(--radius-pill);
  font-size: 0.82rem; letter-spacing: 0.04em;
  color: var(--plaster);
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out);
}
.UIBtn:hover, .UIBtn:focus-visible { background-color: rgba(246,210,122,0.12); color: var(--gold-light); }
.UIBtn__Icon { width: 1.1rem; height: 1.1rem; display: block; }
.UIBtn__sep { width: 1px; height: 1.4rem; background: rgba(244,237,224,0.18); margin: 0 0.3rem; }
.UIBtn.is-active { color: var(--gold-light); }

/* language toggle */
.LangToggle { font-family: var(--font-latin-ui); font-weight: 500; }
.LangToggle .on { color: var(--gold-light); }
.LangToggle .off { opacity: 0.5; }

.UIBtnRound {
  display: inline-flex; align-items: center; gap: 0.5rem; height: 2.6rem; padding: 0 1.1rem;
  border-radius: var(--radius-pill); border: 1px solid rgba(244,237,224,0.25); color: var(--plaster);
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.UIBtnRound:hover { background-color: rgba(246,210,122,0.1); border-color: rgba(246,210,122,0.5); }
.UIBtnRound .Label { font-size: 0.8rem; }

/* ------------------------------------------------------------ Audio button */
.UIAudioBtn {
  position: fixed; bottom: 1.4rem; right: 1.4rem;
  display: flex; align-items: flex-end; justify-content: space-between;
  width: 1.25rem; height: 1em; font-size: 1rem; pointer-events: auto; color: var(--gold-light);
}
.UIAudioBtn::before { content: ""; position: absolute; inset: -1rem; }
@media (min-width: 1050px) { .UIAudioBtn { bottom: 2.4rem; right: 3rem; } }
.Bar {
  display: block; width: 2px; height: 0.1875em; border-radius: 3px; background-color: currentColor;
  animation: equalizer 2s ease-out infinite alternate;
}
.Bar:nth-child(1) { animation-delay: 0.2s; animation-duration: 1.9s; }
.Bar:nth-child(2) { animation-delay: 0.3s; animation-duration: 2.2s; }
.Bar:nth-child(3) { animation-delay: 0s;   animation-duration: 2.1s; }
.Bar:nth-child(4) { animation-delay: 0.1s; animation-duration: 2s; }
.UIAudioBtn.is-muted .Bar { animation: none; height: 0.1875em; opacity: 0.5; }
@keyframes equalizer { 0% { height: 0.1875em; } 50% { height: 0.9em; } 100% { height: 0.375em; } }

/* -------------------------------------------------------- Work label (HUD) */
/* a tappable card — opens the framed work full-screen (the easy path on phones) */
.WorkLabel {
  position: fixed; left: 2.5rem; bottom: 2.2rem; max-width: 26rem;
  z-index: var(--z-ui); pointer-events: none; cursor: pointer; text-align: left;
  color: var(--plaster); font: inherit;
  background: linear-gradient(140deg, rgba(18,14,24,0.66), rgba(9,8,13,0.5));
  border: 1px solid rgba(246,210,122,0.2); border-radius: 14px;
  padding: 0.9rem 1.1rem;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), border-color 0.25s, background 0.25s;
}
.WorkLabel.is-shown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.WorkLabel:hover, .WorkLabel:active, .WorkLabel:focus-visible { border-color: rgba(246,210,122,0.6); background: linear-gradient(140deg, rgba(26,20,32,0.74), rgba(12,10,16,0.56)); }
.WorkLabel__Kicker { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); opacity: 0.85; margin-bottom: 0.5rem; }
.WorkLabel__Title { font-family: var(--font-cn); font-size: 1.7rem; line-height: 1.1; margin: 0; color: var(--plaster); }
.WorkLabel__TitleEn { font-family: var(--font-latin-display); font-style: italic; font-size: 1.05rem; opacity: 0.7; margin-top: 0.1rem; }
.WorkLabel__Artist { font-size: 0.82rem; letter-spacing: 0.05em; margin-top: 0.5rem; opacity: 0.78; }
.WorkLabel__Motif { font-size: 0.86rem; line-height: 1.5; margin-top: 0.6rem; opacity: 0.62; max-width: 22rem; }
.WorkLabel__Cta { margin-top: 0.7rem; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; color: var(--gold-light); }
@media (max-width: 1049px) { .WorkLabel { left: 1.2rem; right: 1.2rem; bottom: 5rem; } }

/* -------------------------------------------------------------- Scroll hint */
.ScrollHint {
  position: absolute; bottom: 12px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 1rem; padding-bottom: 2rem; opacity: 0;
  transition: opacity 0.6s var(--ease-out); pointer-events: none; color: var(--plaster);
}
.ScrollHint.ScrollHint--showed { opacity: 1; }
.ScrollHint__Indicator { position: relative; display: block; width: 1px; height: 2.4rem; margin-bottom: 0.8rem; }
.ScrollHint__Bar-1 {
  display: block; width: 1px; height: 0.625rem; background-color: var(--gold-light);
  position: absolute; top: 50%; left: 50%; transform-origin: bottom; transform: translate(-50%,-50%) scaleY(5); opacity: 0.4;
}
.ScrollHint__Bar-2 {
  display: block; width: 1px; height: 1rem; position: absolute; bottom: 0.625rem; left: 50%;
  transform-origin: bottom; transform: translateX(-50%); overflow: hidden;
}
.ScrollHint__Bar-2::before {
  content: ""; display: block; position: absolute; left: 0; top: 0; width: 100%; height: 200%;
  background: linear-gradient(180deg, rgba(246,210,122,0), var(--gold-light) 50%, rgba(246,210,122,0));
}
.ScrollHint--showed .ScrollHint__Bar-2::before { animation: scrollhint-loop 2s linear 0.2s infinite forwards; }
.ScrollHint__Label { display: block; font-size: 0.78rem; letter-spacing: 0.14em; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6)); }
.ScrollHint--showed .ScrollHint__Label { animation: scrollhint-step 1.1s var(--ease-step) 1.1s infinite; }
@keyframes scrollhint-loop { 0% { transform: translateY(-100%); } 100% { transform: translateY(0); } }
@keyframes scrollhint-step { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }

/* ------------------------------------------------------------ Custom cursor */
.CustomCursor { position: fixed; top: 0; left: 0; width: 0; height: 0; pointer-events: none; z-index: var(--z-cursor); }
.CustomCursor .Cursor {
  position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1px solid rgba(246,210,122,0.6); border-radius: 50%;
  transition: width 0.45s var(--ease-out), height 0.45s var(--ease-out), margin 0.45s var(--ease-out), opacity 0.3s linear;
}
.CustomCursor .Cursor__Dot { position: absolute; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--gold-light); }
.CustomCursor.is-hover .Cursor,
.CustomCursor.is-work .Cursor { width: 120px; height: 120px; margin: -60px 0 0 -60px; border-color: rgba(246,210,122,0.9); }
.CustomCursor.is-work .Cursor { background: rgba(246,210,122,0.06); }
.CustomCursor.is-down .Cursor { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
@media (pointer: coarse) { .CustomCursor { display: none; } }

/* ----------------------------------------------------------------- Icons */
[data-icon] {
  display: inline-block; width: 1.1rem; height: 1.1rem; background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
[data-icon="gallery"] { --icon: url("../assets/icons/gallery.svg"); }
[data-icon="info"] { --icon: url("../assets/icons/info.svg"); }
[data-icon="close"] { --icon: url("../assets/icons/close.svg"); }
[data-icon="brightness"] { --icon: url("../assets/icons/brightness.svg"); }
[data-icon="contrast"] { --icon: url("../assets/icons/contrast.svg"); }
[data-icon="saturation"] { --icon: url("../assets/icons/saturation.svg"); }
[data-icon="temperature"] { --icon: url("../assets/icons/temperature.svg"); }
[data-icon="camera"] { --icon: url("../assets/icons/camera.svg"); }

/* ----------------------------------------------------------- Adjust toolbar */
.AdjustBar {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px);
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  opacity: 0; transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); pointer-events: auto; z-index: var(--z-ui);
}
.AdjustBar.is-shown { opacity: 1; transform: translateX(-50%) translateY(0); }
.AdjustBar__Track {
  display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.7rem;
  background: rgba(17,15,22,0.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(246,210,122,0.18); border-radius: var(--radius-pill);
}
.AdjustChip {
  display: inline-flex; align-items: center; justify-content: center; width: 2.3rem; height: 2.3rem;
  color: var(--plaster); border-radius: 50%; opacity: 0.7; transition: opacity 0.25s, background-color 0.25s;
}
.AdjustChip:hover { opacity: 1; background: rgba(246,210,122,0.1); }
.AdjustChip.is-active { opacity: 1; background: var(--solar-gradient-2); color: var(--void); }
.AdjustBar__Sep { width: 1px; height: 1.5rem; background: rgba(244,237,224,0.18); margin: 0 0.2rem; }
.AdjustBar__Slider { width: 220px; }
.AdjustBar__Slider input { width: 100%; accent-color: var(--gold); }

/* --------------------------------------------------------- Information panel */
.InformationPanel { position: fixed; inset: 0; z-index: var(--z-panel); }
.InformationPanel .Backdrop { position: absolute; inset: 0; background: rgba(7,6,10,0.6); backdrop-filter: blur(3px); opacity: 0; }
.Panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 92vw); transform: translateX(100%); transition: transform 0.55s var(--ease-out); display: flex; flex-direction: column; }
.InformationPanel.is-open .Panel { transform: translateX(0); }
.Panel__Background {
  position: absolute; inset: 0; background: linear-gradient(160deg, #16121b 0%, #0d0b12 100%);
  border-left: 1px solid rgba(246,210,122,0.15);
}
.Panel__Inner { position: relative; padding: clamp(2rem,5vw,3.5rem); padding-top: 5.5rem; overflow-y: auto; flex: 1; color: var(--plaster); }
.Panel__Footer { position: absolute; top: 1.4rem; right: 1.4rem; }
.Panel__Inner h2 { font-family: var(--font-cn); font-weight: 600; font-size: clamp(1.9rem,5vw,2.8rem); line-height: 1.05; margin: 0 0 1rem; color: var(--gold-light); }
.Panel__Inner .lead { font-family: var(--font-cn); font-size: 1.1rem; opacity: 0.9; margin: 0 0 1.4rem; }
.Panel__Inner h3 { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); opacity: 0.8; margin: 2rem 0 0.6rem; }
.Panel__Inner p { font-size: 0.96rem; line-height: 1.7; opacity: 0.82; margin: 0 0 1rem; }
.Panel__Inner p.muted { opacity: 0.72; font-size: 0.85rem; }
.Panel__Inner a.link { color: var(--gold-light); border-bottom: 1px solid currentColor; }

/* ------------------------------------------------------------- Legal page */
.LegalPage { position: fixed; inset: 0; z-index: var(--z-legal); }
.LegalPage__Container { position: absolute; inset: 0; overflow-y: auto; }
.LegalPage__Background { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, #1a1330 0%, #0b0b0f 70%); }
.LegalPage__Inner { position: relative; max-width: 760px; margin: 0 auto; padding: clamp(4rem,12vh,9rem) clamp(1.5rem,6vw,3rem) 6rem; color: var(--plaster); }
.LegalPage__Inner h1 { font-family: var(--font-cn); font-weight: 600; font-size: clamp(2.2rem,7vw,4rem); margin: 0 0 2rem; color: var(--gold-light); }
.LegalPage__Inner h3 { letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.78rem; color: var(--gold); opacity: 0.85; margin: 2rem 0 0.5rem; }
.LegalPage__Inner p { line-height: 1.75; opacity: 0.9; margin: 0 0 1rem; }
.LegalPage__Inner p.muted { opacity: 0.72; }
.LegalPage__Close { position: fixed; top: 1.4rem; right: 1.4rem; }
@media (min-width: 1050px) { .LegalPage__Close { top: 2.5rem; right: 2.5rem; } }

/* ------------------------------------------------------------------ Loader */
.Loader {
  position: fixed; inset: 0; z-index: var(--z-loader);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  background: radial-gradient(120% 100% at 50% 60%, #15102a 0%, #0b0b0f 70%);
  transition: opacity 0.9s var(--ease-out);
}
body:not(.is-loading) .Loader { opacity: 0; pointer-events: none; }
.Loader__Gate { position: relative; width: min(70vw, 340px); height: 200px; margin-bottom: 1.5rem; }
/* the two 汉阙 (que) towers framing a rising sun */
.Loader__Que { position: absolute; bottom: 0; width: 30px; height: 150px; background: linear-gradient(180deg, #2a2118, #15110c); }
.Loader__Que::before { content: ""; position: absolute; top: -14px; left: -8px; right: -8px; height: 16px; background: #2a2118; clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.Loader__Que--l { left: 24%; }
.Loader__Que--r { right: 24%; }
.Loader__Sun {
  position: absolute; left: 50%; bottom: 30px; width: 90px; height: 90px; margin-left: -45px;
  border-radius: 50%; background: radial-gradient(circle, #ffe9a8 0%, #e8b349 45%, #c8372d 100%);
  box-shadow: 0 0 60px 12px rgba(232,179,73,0.5); transform: scale(0.6); opacity: 0.85;
}
.Loader__Title { text-align: center; }
.Loader__Brand { font-family: var(--font-cn-brush); font-size: clamp(2.2rem,8vw,3.4rem); letter-spacing: 0.14em; color: var(--gold-light); }
.Loader__BrandEn { font-family: var(--font-latin-display); letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.8rem; opacity: 0.55; margin-top: 0.3rem; }
.Loader__BarTrack { height: 1px; width: min(60vw, 280px); margin: 1.4rem auto 0; background: rgba(244,237,224,0.18); overflow: hidden; }
.Loader__Bar { display: block; height: 100%; width: 0%; background: var(--solar-gradient-2); }
.Loader__Pct { margin-top: 0.8rem; font-size: 0.72rem; letter-spacing: 0.2em; opacity: 0.62; }

/* ------------------------------------------------------------- Lightbox 走进画中 */
.Lightbox { position: fixed; inset: 0; z-index: 50; display: flex; opacity: 0; }
.Lightbox.is-open { opacity: 1; }
.Lightbox__Backdrop { position: absolute; inset: 0; background: radial-gradient(120% 100% at 50% 40%, #14101f 0%, #07060a 75%); }
.Lightbox__Stage {
  position: relative; margin: auto; display: flex; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; justify-content: center; width: 100%; max-width: 1320px;
  padding: clamp(1.2rem, 5vh, 4rem) clamp(1.2rem, 5vw, 4rem);
}
.Lightbox__Figure {
  position: relative; flex: 0 1 auto; display: flex; align-items: center; justify-content: center;
  max-height: 78vh;
}
.Lightbox__Img {
  display: block; max-height: 78vh; max-width: 100%; width: auto; height: auto;
  border: 1px solid rgba(246,210,122,0.4);
  box-shadow: 0 30px 90px rgba(0,0,0,0.6), 0 0 60px rgba(232,179,73,0.12);
  background: #0c0b10; transition: filter 0.15s linear;
}
.Lightbox__Tag {
  position: absolute; top: -1.5rem; left: 1rem; font-size: 0.66rem; letter-spacing: 0.18em;
  text-transform: uppercase; padding: 0.25rem 0.7rem; border-radius: var(--radius-pill);
  background: var(--solar-gradient-2); color: var(--void); font-weight: 600; z-index: 3;
}
.Lightbox__Caption { flex: 0 0 clamp(260px, 28vw, 360px); color: var(--plaster); }
.Lightbox__Kicker { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); opacity: 0.85; margin-bottom: 0.7rem; }
.Lightbox__Title { font-family: var(--font-cn); font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.08; margin: 0; color: var(--plaster); }
.Lightbox__TitleEn { font-family: var(--font-latin-display); font-style: italic; font-size: 1.15rem; opacity: 0.7; margin-top: 0.2rem; }
.Lightbox__Artist { font-size: 0.9rem; letter-spacing: 0.04em; margin-top: 0.9rem; color: var(--gold-light); }
.Lightbox__Motif { font-size: 0.95rem; line-height: 1.7; margin-top: 1rem; opacity: 0.78; }
.Lightbox__Close { position: fixed; top: 1.4rem; right: 1.4rem; z-index: 4; }
@media (min-width: 1050px) { .Lightbox__Close { top: 2.2rem; right: 2.5rem; } }
.Lightbox__NavBtn {
  position: fixed; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; z-index: 4;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 1px solid rgba(246,210,122,0.3); color: var(--plaster); font-size: 1.3rem;
  background: rgba(12,10,16,0.5);
  transition: background-color 0.25s, border-color 0.25s;
}
.Lightbox__NavBtn:hover { background: rgba(246,210,122,0.12); border-color: rgba(246,210,122,0.7); }
.Lightbox__NavBtn--prev { left: 1rem; } .Lightbox__NavBtn--next { right: 1rem; }
@media (min-width: 1050px) { .Lightbox__NavBtn--prev { left: 2rem; } .Lightbox__NavBtn--next { right: 2rem; } }

/* in-lightbox adjust toolbar (走进画中 · 调色) */
.Lightbox__Adjust { margin-top: 1.6rem; }
.Lightbox__Adjust .AdjustTrack { display: flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.55rem; background: rgba(17,15,22,0.6); border: 1px solid rgba(246,210,122,0.18); border-radius: var(--radius-pill); width: max-content; }
.Lightbox__Adjust .AdjustChip { width: 2.1rem; height: 2.1rem; }
.Lightbox__Adjust .AdjustSlider { margin-top: 0.7rem; width: 100%; }
.Lightbox__Adjust .AdjustSlider input { width: 100%; accent-color: var(--gold); }
.Lightbox__Hint { margin-top: 0.8rem; font-size: 0.74rem; opacity: 0.62; }
@media (max-width: 1049px) {
  .Lightbox__Stage { flex-direction: column; gap: 1.2rem; padding-top: 4rem; }
  .Lightbox__Img { max-height: 52vh; }
  .Lightbox__Caption { flex: none; max-width: 92vw; }
}

/* --------------------------------------------------------------- Enter gate */
.EnterGate {
  position: fixed; inset: 0; z-index: var(--z-loader);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
  /* dim the busy scene behind so the CTA reads clearly (pre-experience only) */
  background: radial-gradient(120% 120% at 50% 45%, rgba(8,7,12,0.58) 0%, rgba(8,7,12,0.9) 100%);
  transition: opacity 0.9s var(--ease-out);
}
.EnterGate.is-hiding { opacity: 0; pointer-events: none; }
.EnterGate__Btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex-direction: column; gap: 0.4rem;
  width: 13.5rem; height: 13.5rem; border-radius: 50%; pointer-events: auto;
  /* near-opaque dark backing so the background never bleeds through the button */
  background: radial-gradient(circle at 50% 42%, rgba(46,34,20,0.92) 0%, rgba(12,10,16,0.97) 72%);
  box-shadow: 0 14px 60px rgba(0,0,0,0.6), inset 0 0 46px rgba(232,179,73,0.16);
  transition: transform 0.5s var(--ease-out);
}
.EnterGate__Btn:hover, .EnterGate__Btn:focus-visible { transform: scale(1.04); }
.EnterGate__Ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(246,210,122,0.7);
  animation: enter-pulse 2.8s var(--ease-inout) infinite;
}
/* an expanding halo ripple to draw the eye to the CTA */
.EnterGate__Btn::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid rgba(246,210,122,0.4); pointer-events: none;
  animation: enter-halo 2.8s var(--ease-out) infinite;
}
.EnterGate__Btn:hover .EnterGate__Ring, .EnterGate__Btn:focus-visible .EnterGate__Ring {
  border-color: rgba(246,210,122,1); box-shadow: 0 0 46px rgba(232,179,73,0.5);
}
.EnterGate__Label { font-family: var(--font-cn); font-size: 1.32rem; font-weight: 600; letter-spacing: 0.16em; color: #ffe9b0; text-shadow: 0 1px 12px rgba(0,0,0,0.7); }
.EnterGate__LabelEn { font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-light); opacity: 0.78; }
.EnterGate__Hint { font-size: 0.76rem; letter-spacing: 0.1em; opacity: 0.62; text-align: center; text-shadow: 0 1px 8px rgba(0,0,0,0.6); }

@keyframes enter-pulse {
  0%, 100% { box-shadow: 0 0 22px rgba(232,179,73,0.22); border-color: rgba(246,210,122,0.55); }
  50%      { box-shadow: 0 0 40px rgba(232,179,73,0.5); border-color: rgba(246,210,122,0.95); }
}
@keyframes enter-halo {
  0%   { transform: scale(1); opacity: 0.55; }
  70%  { opacity: 0; }
  100% { transform: scale(1.28); opacity: 0; }
}

/* ----------------------------------------------------- accessibility utils */
.VisuallyHidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.SkipLink {
  position: fixed; top: 0; left: 50%; transform: translate(-50%, -120%);
  z-index: 70; padding: 0.7rem 1.2rem; background: var(--gold-light); color: var(--void);
  font-size: 0.85rem; border-radius: 0 0 10px 10px; transition: transform 0.2s var(--ease-out);
}
.SkipLink:focus { transform: translate(-50%, 0); outline: none; }

/* ----------------------------------------------------- Halls overlay 展厅总览 */
.HallsOverlay { position: fixed; inset: 0; z-index: 50; opacity: 0; }
.HallsOverlay.is-open { opacity: 1; }
.HallsOverlay__Bg { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, #16122a 0%, #08080c 70%); }
.HallsOverlay__Inner { position: relative; max-width: 1160px; margin: 0 auto; height: 100%; overflow-y: auto; padding: clamp(1.4rem, 5vw, 3rem); }
.HallsOverlay__Head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; position: sticky; top: 0; }
.HallsOverlay__Title { font-family: var(--font-cn); font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--gold-light); margin: 0; }
.HallsOverlay__Sub { font-size: 0.9rem; opacity: 0.7; margin: 0.4rem 0 0; }
.HallStation { margin-bottom: 2.2rem; }
.HallStation__Theme { font-family: var(--font-cn); font-size: 1.2rem; color: var(--plaster); margin: 0 0 0.9rem; display: flex; align-items: baseline; gap: 0.6rem; border-bottom: 1px solid rgba(246,210,122,0.18); padding-bottom: 0.5rem; }
.HallStation__Theme span { font-family: var(--font-latin-display); font-style: italic; font-size: 0.9rem; opacity: 0.55; }
.HallStation__Cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.9rem; }
.HallCard {
  position: relative; display: flex; flex-direction: column; text-align: left;
  padding: 0; border-radius: 12px; overflow: hidden; background: #14101c;
  border: 1px solid rgba(246,210,122,0.14); transition: transform 0.25s var(--ease-out), border-color 0.25s;
}
.HallCard:hover, .HallCard:focus-visible { transform: translateY(-3px); border-color: rgba(246,210,122,0.6); }
.HallCard__Thumb { display: block; width: 100%; aspect-ratio: 4 / 5; background-size: cover; background-position: center; background-color: #0c0b10; }
.HallCard__Tag { position: absolute; top: 0.5rem; left: 0.5rem; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.18rem 0.5rem; border-radius: 999px; color: var(--void); }
.HallCard__Tag.is-han { background: var(--stone-2); }
.HallCard__Tag.is-work { background: var(--solar-gradient-2); }
.HallCard__Title { font-family: var(--font-cn); font-size: 0.95rem; color: var(--plaster); padding: 0.6rem 0.7rem 0.1rem; }
.HallCard__Artist { font-size: 0.74rem; opacity: 0.65; padding: 0 0.7rem 0.7rem; }

/* ===================================================== mobile & touch a11y */
/* tap targets ≥ 44px (WCAG 2.5.5 Target Size) on touch devices */
@media (pointer: coarse) {
  .UIBtn { min-height: 44px; min-width: 44px; }
  .UIBtnRound { min-height: 44px; }
  .AdjustChip { width: 44px; height: 44px; }
  .AdjustChip [data-icon] { width: 1.25rem; height: 1.25rem; }
  .Lightbox__NavBtn { width: 3.25rem; height: 3.25rem; font-size: 1.5rem; }
  .UIAudioBtn { width: 1.5rem; height: 1.1em; }
  .UIAudioBtn::before { inset: -1.25rem; }            /* large invisible hit area */
  .HallStation__Cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* narrow phones: keep the header on one tidy line, HUD compact */
@media (max-width: 560px) {
  .AppHeader { top: 0.8rem; left: 0.9rem; right: 0.9rem; height: 3rem; }
  .AppHeader__Brand-cn { font-size: 1.25rem; }
  .AppHeader__Brand-en { display: none; }
  .AppHeader__Navbar { gap: 0.1rem; margin-left: auto; }
  /* show icons only for Halls/About; the lang toggle keeps its text */
  .AppHeader__Navbar .UIBtn:not(.LangToggle) .i18n-zh,
  .AppHeader__Navbar .UIBtn:not(.LangToggle) .i18n-en { display: none; }
  .UIBtn { padding: 0 0.55rem; gap: 0; }
  .LangToggle { padding: 0 0.5rem; }
  .WorkLabel { left: 1rem; right: 1rem; bottom: 4.5rem; }
  .WorkLabel__Title { font-size: 1.45rem; }
  .WorkLabel__Motif { display: none; }                /* keep the card compact; the CTA leads */
  .UIAudioBtn { bottom: 1rem; right: 1.1rem; }
  .HallsOverlay__Head { position: static; }
  .HallsOverlay__Inner { padding: 1rem 0.9rem 2rem; }
  /* the art is the protagonist — big two-up cards, big preview */
  .HallStation__Cards { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .HallCard__Title { font-size: 1rem; }
  /* lightbox: maximise the painting, shrink the chrome */
  .Lightbox__Stage { padding: 3.2rem 0.8rem 1rem; gap: 0.8rem; }
  .Lightbox__Img { max-height: 62vh; }
  .Lightbox__Caption { max-width: 100%; }
  .Lightbox__Title { font-size: 1.5rem; }
  .Lightbox__Motif { font-size: 0.88rem; margin-top: 0.6rem; }
  .Lightbox__Adjust { margin-top: 0.9rem; }
}

/* ----------------------------------------------- mobile docked-tour controls */
.TourNav {
  display: none; position: fixed; right: 0.8rem; top: 50%; transform: translateY(-50%);
  z-index: var(--z-ui); flex-direction: column; gap: 0.7rem; pointer-events: none;
}
body.is-tour .TourNav { display: flex; }
.TourNav__Btn {
  width: 3rem; height: 3rem; border-radius: 50%; pointer-events: auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(12,10,16,0.6); border: 1px solid rgba(246,210,122,0.45);
  color: var(--gold-light); font-size: 1.4rem; line-height: 1;
  transition: background 0.2s var(--ease-out), opacity 0.2s, transform 0.15s;
}
.TourNav__Btn:active { background: rgba(246,210,122,0.2); transform: scale(0.94); }
.TourNav__Btn:disabled { opacity: 0.28; pointer-events: none; }
/* once the docked tour is driving, the swipe hint has done its job */
body.is-tour .ScrollHint { opacity: 0 !important; }
/* the tour prev/next belong to the docked Guided mode only */
body.mode-roam .TourNav { display: none; }

/* browse-mode switch — every device, a small pill below the header (after entering) */
.ModeSwitch { display: none; }
body.is-entered .ModeSwitch {
  display: inline-flex; position: fixed; top: 4.1rem; left: 50%; transform: translateX(-50%);
  z-index: var(--z-ui); gap: 2px; padding: 3px; border-radius: var(--radius-pill);
  background: rgba(12,10,16,0.62); border: 1px solid rgba(246,210,122,0.28);
  box-shadow: 0 6px 22px rgba(0,0,0,0.4);
}
.ModeSwitch__Opt {
  pointer-events: auto; min-height: 34px; padding: 0.32rem 0.95rem; border-radius: var(--radius-pill);
  font-size: 0.78rem; letter-spacing: 0.08em; color: var(--muted); white-space: nowrap;
  transition: background 0.22s var(--ease-out), color 0.22s var(--ease-out);
}
.ModeSwitch__Opt.is-on { background: rgba(246,210,122,0.18); color: var(--gold-light); }

/* landscape phones are short — keep the work label out of the way */
@media (max-height: 480px) and (pointer: coarse) {
  .WorkLabel { bottom: 3.5rem; }
  .WorkLabel__Motif, .WorkLabel__TitleEn { display: none; }
  .Lightbox__Img { max-height: 70vh; }
}
