#hero {
  --hero-cream: #f3ede1;
  --hero-orange: #ff9a52;
  --hero-gutter: clamp(22px, 5.4vw, 100px);
  position: fixed;
  inset: 0;
  z-index: 15;
  overflow: hidden;
  isolation: isolate;
  color: var(--hero-cream);
  background: #140f0c url("assets/hero/workshop.webp") center / cover no-repeat;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  text-align: left;
  touch-action: none;
}
#hero[hidden] { display: none !important; }
#hero.fade-away { opacity: 0; transition: opacity .48s ease-in; }
#hero .hj-bg, #hero .hj-shot, #hero .hj-shade, #hero .hj-enter-area, #hero .hj-media {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
}
#hero .hj-media { overflow: hidden; transform-origin: 50.6% 46%; }
#hero video { max-width: none; max-height: none; pointer-events: none; }
#hero .hj-bg, #hero .hj-shot { object-fit: cover; object-position: center; }
#hero .hj-shot { opacity: 0; transition: opacity .38s ease; }
#hero .hj-shot.show { opacity: 1; }
#hero[data-hero-phase="returning"] .hj-media { background: #381200 url("assets/hero/screen.webp") center / cover no-repeat; }
#hero[data-hero-phase="returning"] .hj-bg { visibility: hidden; }
#hero .hj-shade {
  pointer-events: none;
  background: linear-gradient(90deg,rgba(8,7,6,.67) 0%,rgba(10,7,5,.26) 27%,transparent 58%),
              linear-gradient(0deg,rgba(6,5,4,.92),rgba(8,6,4,.52) 15%,transparent 38%),
              linear-gradient(180deg,rgba(8,7,6,.38),transparent 20%);
  transition: opacity 1.55s ease;
}
#hero .hj-enter-area { z-index: 1; cursor: pointer; background: transparent; border: 0; border-radius: 0; }
#hero .hj-enter-area:focus-visible { outline: 2px solid var(--hero-orange); outline-offset: -8px; }
#hero .hj-caption {
  position: absolute;
  z-index: 2;
  left: var(--hero-gutter);
  top: clamp(90px, 20svh, 230px);
  pointer-events: none;
}
#hero .hj-role {
  display: inline-flex; gap: .8em; align-items: center; margin: 0 0 clamp(12px,2vh,23px);
  color: #ffd0a6; font: 550 clamp(12px,1vw,16px)/1.1 "PingFang SC", sans-serif;
  letter-spacing: .12em; text-shadow: 0 1px 8px #000;
}
#hero .hj-role::before { content:""; width: 27px; height: 2px; background: var(--hero-orange); }
#hero .hj-caption h1 {
  font: 700 clamp(63px,6.45vw,138px)/1.05 "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", serif;
  letter-spacing: -.045em; margin: 0; color: var(--hero-cream); text-shadow: 0 3px 30px #0005;
}
#hero .hj-caption h1 > span { display: block; will-change: transform; }
#hero .hj-caption h1 > span + span {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: .43em; font-weight: 450; letter-spacing: .105em; margin-top: .54em; color: #f0e7d8;
}
#hero .hj-boot {
  position: absolute; margin: 0; white-space: pre; pointer-events: none;
  color: #ffd09a; opacity: .94; text-shadow: 0 0 5px #ff8a3d,0 0 15px #d45313;
  font-family: ui-monospace, "PingFang SC", monospace; font-weight: 500; line-height: 1.55;
  transition: opacity .28s;
}
#hero .hj-boot::after { content:"_"; animation: hj-blink 1s steps(1,end) infinite; }
@keyframes hj-blink { 50% { opacity:0 } }
#hero .hj-bottom {
  --bottom-gap: clamp(20px, 4.2svh, 65px);
  position: absolute; z-index: 2; left: var(--hero-gutter); right: var(--hero-gutter);
  bottom: max(var(--bottom-gap),env(safe-area-inset-bottom)); border-top: 1px solid #f5d8b74a;
  padding-top: clamp(15px,2.7vh,30px); display: flex; align-items: center; justify-content: space-between;
  gap: 16px; pointer-events: none;
}
#hero .hj-actions { display: flex; align-items: center; gap: clamp(19px,2.4vw,40px); }
#hero .hj-actions button {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; background: transparent; color: #f3e6d2; border: 0; border-radius: 0;
  font: 500 clamp(13px,1vw,17px)/1.2 "PingFang SC",sans-serif; letter-spacing: .06em;
  text-decoration: none; cursor: pointer; pointer-events: auto; padding: 0;
}
#hero .hj-actions .hj-go {
  background: #ff9a52; color: #20150d; min-height: 48px; padding: 0 clamp(17px,1.9vw,31px);
  border-radius: 2px; box-shadow: 0 0 32px #f9771917; transition: background .25s;
}
#hero .hj-go::before {
  width: 0; height: 0; content:""; margin-right: 12px;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid currentColor;
}
#hero .hj-go:hover { background: #ffc696; }
#hero .hj-actions .hj-skip:hover { color: var(--hero-orange); }
#hero .hj-bottom p {
  margin: 0; text-align: right; color: #e8d9c7; font: 400 clamp(12px,1vw,16px)/1.6 "PingFang SC",sans-serif;
}
#hero .hj-loader {
  position: absolute; z-index: 4; inset: 0; display: grid; place-content: center; background: #11100f;
  transition: opacity .35s ease; pointer-events: none; color: #ffb879;
}
#hero .hj-loader[hidden] { display: none; }
#hero .hj-loader > div { width: min(245px,65vw); display: flex; justify-content: space-between; margin-bottom: 13px; font: 12px/1.4 ui-monospace,monospace; }
#hero .hj-loader progress { width: min(245px,65vw); height: 9px; appearance: none; border: 0; color: #fb934b; background: #362a20; }
#hero .hj-loader progress::-webkit-progress-bar { background: #362a20; }
#hero .hj-loader progress::-webkit-progress-value { background: #fb934b; }
#hero .hj-loader progress::-moz-progress-bar { background: #fb934b; }
#hero .hj-loader progress { mask-image: repeating-linear-gradient(100deg,#000 0 calc(4% - 2px),transparent calc(4% - 2px) 4%); }
#hero .hj-loading-out { opacity: 0; }
#hero.hj-transition .hj-caption h1 > span:first-child { transform: translateX(-125%); }
#hero.hj-transition .hj-caption h1 > span:last-child { transform: translateX(35vw); opacity: 0; }
#hero.hj-transition .hj-caption h1 > span { transition: transform 1.2s cubic-bezier(.58,.03,.85,.32),opacity .9s; }
#hero.hj-transition .hj-boot, #hero.hj-transition .hj-bottom, #hero.hj-transition .hj-role { opacity: 0; pointer-events: none; }
#hero.hj-transition .hj-actions button, #hero.hj-transition .hj-enter-area { pointer-events: none; }
#hero .hj-role, #hero .hj-bottom { transition: opacity .55s; }
#hero.hj-transition .hj-shade { opacity: 0; }
#hero.hj-fallback-dive .hj-media { transform: scale(5.8); transition: transform 1.7s cubic-bezier(.4,.03,.45,.9); }
#hero.hj-landing .hj-caption h1 > span { transition: transform 1.05s cubic-bezier(.16,.75,.2,1), opacity .8s; }
#hero.hj-landing .hj-shade { transition-duration: 1s; }
@media(max-width:780px) {
  #hero .hj-caption { top: clamp(92px,15svh,150px); }
  #hero .hj-caption h1 { font-size: clamp(54px,12.6vw,86px); }
  #hero .hj-role { margin-bottom: 10px; font-size: 12px; }
  #hero .hj-caption h1 > span + span { font-size: .41em; margin-top: .35em; }
  #hero .hj-bottom { align-items: start; flex-direction: column-reverse; padding-top: 13px; gap: 12px; }
  #hero .hj-bottom p { text-align: left; font-size: 12px; }
  #hero .hj-shade { background: linear-gradient(180deg,#08070482 0%,transparent 45%,transparent 66%,#080603e6 100%),linear-gradient(90deg,#110d0a33,transparent 70%); }
}
@media(max-height:520px) and (orientation:landscape) {
  #hero .hj-caption { top: 67px; }
  #hero .hj-caption h1 { font-size: 45px; }
  #hero .hj-role { margin-bottom: 6px; }
  #hero .hj-bottom { bottom: 14px; flex-direction: row; align-items: center; padding-top: 6px; }
}
@media(prefers-reduced-motion:reduce) {
  #hero *, #hero *::after { animation: none !important; transition: none !important; }
}
