@font-face {
  font-family: "Manrope Offline";
  src: url("fonts/Manrope-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC Offline";
  src: url("fonts/NotoSansTC-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif JP Light";
  src: url("fonts/NotoSerifJP-Light.otf") format("opentype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

:root {
  --ivory: #f2efe7;
  --charcoal: #171817;
  --ink: #0d0e0d;
  --gold: #c6aa68;
  --nav-height: 84px;
  --edge: clamp(32px, 3.4vw, 66px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ivory);
  background: var(--ink);
  font-family: "Noto Sans TC Offline", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

body.home-active,
body.home-transitioning,
body.chapter-entering,
body.chapter-leaving,
body.showroom-active,
body[data-page-state="transitioning-to-showroom"],
body[data-page-state="transitioning-from-showroom"] {
  overflow: hidden;
}

/* 居所體驗：獨立 viewport 圖層；原網站留在下方，兩層同步橫向交接。 */
.showroom {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  grid-template-columns: 74fr 26fr;
  min-width: 0;
  min-height: 100svh;
  color: #373a38;
  background: #f3f0e8;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(100%, 0, 0);
  opacity: 1;
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.showroom::before {
  position: absolute;
  z-index: 8;
  inset: 0 auto 0 0;
  width: 1px;
  background: #c6aa68;
  content: "";
  opacity: 0.82;
  transition: opacity 0.38s ease;
}

.showroom.is-mounted {
  visibility: visible;
}

.showroom.is-open {
  transform: translate3d(0, 0, 0);
}

.showroom.is-settled {
  pointer-events: auto;
}

.showroom.is-settled::before {
  opacity: 0.24;
}

.showroom.is-moving {
  will-change: transform;
}

.showroom[hidden] {
  display: none;
}

body[data-page-state="showroom"] > :not(.showroom):not(.main-site):not(script),
body[data-page-state="transitioning-to-showroom"] > :not(.showroom):not(.main-site):not(script),
body[data-page-state="transitioning-from-showroom"] > :not(.showroom):not(.main-site):not(script),
body[data-page-state="showroom"] > .main-site > *,
body[data-page-state="transitioning-to-showroom"] > .main-site > *,
body[data-page-state="transitioning-from-showroom"] > .main-site > * {
  pointer-events: none !important;
}

body:is([data-page-state="showroom"], [data-page-state="transitioning-to-showroom"], [data-page-state="transitioning-from-showroom"])
  > :not(.showroom):not(.main-site):not(script),
body:is([data-page-state="showroom"], [data-page-state="transitioning-to-showroom"], [data-page-state="transitioning-from-showroom"])
  > .main-site > * {
  transform-origin: center center;
  transition-property: translate, scale, opacity;
  transition-duration: 0.8s;
  transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.showroom-background-receded
  > :not(.showroom):not(.main-site):not(script),
body.showroom-background-receded > .main-site > * {
  translate: -3vw 0;
  scale: 0.985;
  opacity: 0.45;
}

body.showroom-motion-active
  > :not(.showroom):not(.main-site):not(script),
body.showroom-motion-active > .main-site > * {
  will-change: translate, scale, opacity;
}

.showroom__preview {
  position: relative;
  min-width: 0;
  height: 100svh;
  overflow: hidden;
  background: #343531;
}

.showroom__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.46s ease;
}

.showroom__image.is-visible {
  opacity: 1;
  visibility: visible;
}

.showroom__image.is-entering {
  z-index: 2;
  will-change: opacity;
}

.showroom__loading {
  position: absolute;
  z-index: 4;
  right: 30px;
  bottom: 26px;
  margin: 0;
  color: rgba(242, 239, 231, 0.72);
  font-family: "Manrope Offline", sans-serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.showroom.is-ready .showroom__loading {
  opacity: 0;
}

.showroom__panel {
  display: flex;
  height: 100svh;
  min-width: 0;
  padding: clamp(27px, 4vh, 44px) clamp(28px, 2.8vw, 54px) clamp(26px, 4vh, 42px);
  flex-direction: column;
  overflow-y: auto;
  border-left: 1px solid rgba(151, 127, 78, 0.32);
  background: #f3f0e8;
}

.showroom__back,
.showroom__reset {
  width: max-content;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid transparent;
  color: rgba(55, 58, 56, 0.62);
  background: transparent;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.showroom__back:hover,
.showroom__back:focus-visible,
.showroom__reset:hover,
.showroom__reset:focus-visible {
  color: #373a38;
  border-color: #a8894f;
}

.showroom__back:focus-visible,
.showroom__reset:focus-visible,
.showroom-option:focus-visible {
  outline: 1px solid #a8894f;
  outline-offset: 4px;
}

.showroom__header {
  margin-top: clamp(32px, 5vh, 58px);
}

.showroom__eyebrow {
  margin: 0 0 10px;
  color: #9b814e;
  font-family: "Manrope Offline", sans-serif;
  font-size: 10px;
  font-weight: 450;
  letter-spacing: 0.28em;
}

.showroom__header h2 {
  margin: 0;
  color: #343735;
  font-family: "Noto Serif JP Light", "Noto Sans TC Offline", sans-serif;
  font-size: clamp(26px, 2vw, 36px);
  font-weight: 300;
  letter-spacing: 0.15em;
}

.showroom__intro {
  margin: clamp(17px, 2.4vh, 25px) 0 0;
  color: rgba(55, 58, 56, 0.64);
  font-size: clamp(12px, 0.78vw, 14px);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.1em;
}

.showroom__controls {
  display: grid;
  gap: clamp(26px, 3.7vh, 39px);
  margin-top: clamp(30px, 4.8vh, 52px);
}

.showroom__group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.showroom__group legend {
  display: grid;
  grid-template-columns: 25px 1fr;
  width: 100%;
  margin: 0 0 15px;
  padding: 0;
  align-items: baseline;
}

.showroom__number,
.showroom__label-en {
  color: #9b814e;
  font-family: "Manrope Offline", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.showroom__label-zh {
  grid-column: 2;
  margin-top: 4px;
  color: #383b39;
  font-size: 12px;
  letter-spacing: 0.16em;
}

.showroom__floor-options,
.showroom__furniture-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.showroom-option {
  position: relative;
  min-width: 0;
  border: 1px solid transparent;
  color: #373a38;
  background: transparent;
  opacity: 0.56;
  cursor: pointer;
  transition: border-color 0.25s ease, filter 0.25s ease, opacity 0.25s ease;
}

.showroom-option:hover:not(:disabled) {
  border-color: rgba(168, 137, 79, 0.48);
  filter: brightness(1.04);
  opacity: 0.82;
}

.showroom-option.is-selected {
  border-color: #aa8b52;
  opacity: 1;
}

.showroom-option:disabled,
.showroom__reset:disabled {
  cursor: wait;
}

.showroom-option--floor {
  display: flex;
  min-height: 43px;
  padding: 10px 12px;
  align-items: center;
  gap: 9px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.showroom-option__dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border: 1px solid #a8894f;
  border-radius: 50%;
  background: transparent;
}

.showroom-option.is-selected .showroom-option__dot {
  background: #a8894f;
}

.showroom-option--furniture {
  display: flex;
  min-height: 43px;
  padding: 10px 12px;
  align-items: center;
  text-align: left;
}

.showroom-option__caption {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.08em;
}

.showroom__current {
  display: flex;
  margin-top: auto;
  padding-top: clamp(25px, 3.5vh, 38px);
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.showroom__current p {
  margin: 0 0 6px;
  color: rgba(55, 58, 56, 0.5);
  font-size: 10px;
  letter-spacing: 0.15em;
}

.showroom__current output {
  color: #343735;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.07em;
}

/* 外層定位完成後才依群組淡入；返回時主圖維持顯示。 */
.showroom__preview,
.showroom__back,
.showroom__header,
.showroom__group,
.showroom__current {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition-property: transform, opacity;
  transition-duration: 0.42s;
  transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.showroom.is-content-visible .showroom__preview,
.showroom.is-content-visible .showroom__back,
.showroom.is-content-visible .showroom__header,
.showroom.is-content-visible .showroom__group,
.showroom.is-content-visible .showroom__current {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.showroom.is-content-visible .showroom__preview { transition-delay: 0s; }
.showroom.is-content-visible .showroom__back,
.showroom.is-content-visible .showroom__header { transition-delay: 0.07s; }
.showroom.is-content-visible .showroom__group:nth-child(1) { transition-delay: 0.14s; }
.showroom.is-content-visible .showroom__group:nth-child(2) { transition-delay: 0.21s; }
.showroom.is-content-visible .showroom__current { transition-delay: 0.28s; }

.showroom.is-content-leaving .showroom__preview {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.showroom.is-content-leaving .showroom__back,
.showroom.is-content-leaving .showroom__header,
.showroom.is-content-leaving .showroom__group,
.showroom.is-content-leaving .showroom__current {
  transition-delay: 0s;
  transition-duration: 0.18s;
}

@media (max-width: 1180px) {
  .showroom {
    grid-template-columns: 70fr 30fr;
  }

  .showroom__panel {
    padding-inline: 28px;
  }
}

@media (max-height: 760px) {
  .showroom__panel {
    padding-block: 22px;
  }

  .showroom__header {
    margin-top: 22px;
  }

  .showroom__controls {
    gap: 21px;
    margin-top: 24px;
  }
}

.home-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.home-screen__background {
  position: absolute;
  inset: 0;
  background: url("media/EXT_1.png") center / cover no-repeat;
  opacity: 0;
  transform: scale(1.06);
  transform-origin: center;
  transition:
    opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.home-screen__content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 1;
  transform: none;
  transition: none;
}

/* 首頁與主網站之間只移動此共同 viewport；正常瀏覽時不建立 containing block。 */
.main-site {
  position: relative;
}

body.home-active:not(.home-leaving) .main-site {
  visibility: hidden;
  pointer-events: none;
}

.main-site.is-home-transitioning {
  position: fixed;
  z-index: 110;
  inset: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  visibility: visible;
  pointer-events: none;
  transform: translate3d(0, 100%, 0);
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.main-site.is-home-transitioning.is-at-viewport {
  transform: translate3d(0, 0, 0);
}

.main-site.is-home-transitioning .chapter-switcher {
  transition: none;
}

body.chapter-nav-revealing .chapter-switcher {
  pointer-events: none;
}

body.chapter-nav-revealing .chapter-switcher button {
  pointer-events: none;
}

body.chapter-nav-revealing .chapter-switcher__group {
  animation: chapter-nav-drop-in 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  will-change: transform, opacity;
}

@keyframes chapter-nav-drop-in {
  from {
    opacity: 0;
    transform: translate3d(0, -20px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.main-site.is-home-transitioning > #majorChapters,
.main-site.is-home-transitioning > .end {
  translate: 0 calc(-1 * var(--main-site-scroll-offset, 0px));
}

body.home-active .home-screen {
  visibility: visible;
  pointer-events: auto;
}

body.home-active .home-screen__background {
  opacity: 1;
  transform: scale(1);
}

body.home-return-immediate .home-screen__background,
body.home-return-immediate .home-screen__heading {
  transition: none;
  animation: none;
}

body.home-leaving .home-screen {
  pointer-events: none;
}

body.home-leaving .home-screen__background,
body.home-returning .home-screen__background {
  opacity: 0.76;
  transform: translate3d(0, -3vh, 0) scale(1);
}

body.home-returning .home-screen {
  visibility: visible;
  pointer-events: none;
}

body.home-returning.home-return-revealed .home-screen__background {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.nav {
  position: fixed;
  z-index: 120;
  inset: 0 0 auto;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 var(--edge);
  border-bottom: 0;
  color: var(--ivory);
  background: transparent;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.nav-right {
  display: flex;
  margin: 0;
  align-items: center;
  pointer-events: auto;
}

.status {
  display: none;
}

/* Logo 保持原檔、原比例與既有尺寸。 */
.linking-cloud-logo {
  display: block;
  width: 126px;
  height: 42px;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.linking-cloud-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.linking-cloud-logo:hover img,
.linking-cloud-logo:focus-visible img {
  filter: brightness(1.08);
  opacity: 0.84;
}

.linking-cloud-logo:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

.sequence {
  position: relative;
  height: 300vh;
  pointer-events: none;
}

.sequence.is-empty {
  height: 100vh;
}

.sequence[data-placeholder="true"] {
  height: 200vh;
  min-height: 100vh;
  background: #050505;
}

.location-experience {
  --location-space: clamp(120px, 18vh, 240px);
  --location-edge: clamp(40px, 6vw, 120px);
  position: relative;
  z-index: 2;
  overflow: clip;
  color: #454a48;
  background: linear-gradient(135deg, #e8edef 0%, #f2efe7 58%, #ebe8df 100%);
}

.location-intro {
  display: flex;
  min-height: clamp(520px, 76svh, 820px);
  align-items: center;
  justify-content: center;
  padding: clamp(112px, 15svh, 180px) var(--edge) clamp(64px, 9svh, 104px);
}

.location-intro__copy {
  width: min(680px, 60vw);
  margin-inline: auto;
  text-align: center;
}

.location-intro__eyebrow {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 0 0 clamp(18px, 3vh, 30px);
  color: #9b814e;
  font-family: "Manrope Offline", sans-serif;
  font-size: 10px;
  font-weight: 450;
  letter-spacing: 0.25em;
}

.location-intro h2 {
  margin: 0;
  color: #464b49;
  font-size: clamp(28px, 3vw, 52px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.16em;
}

.location-intro__description {
  max-width: 680px;
  margin: clamp(28px, 4.5vh, 48px) auto 0;
  color: #565b59;
  font-size: clamp(17px, 1.45vw, 25px);
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.1em;
  white-space: pre-line;
}

.location-content {
  padding: 0 var(--location-edge) clamp(180px, 26vh, 340px);
}

.location-section {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
}

.location-section + .location-section {
  margin-top: var(--location-space);
}

.location-section__copy {
  color: #454a48;
}

.location-section__heading h3 {
  margin: 0;
  color: #414644;
  font-size: clamp(25px, 2.4vw, 42px);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: 0.14em;
}

.location-section__heading p {
  margin: 14px 0 0;
  color: #4d5350;
  font-size: clamp(15px, 1.2vw, 20px);
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.08em;
}

.location-section__description {
  margin: clamp(22px, 3.5vh, 38px) 0 0;
  color: #656a67;
  font-size: clamp(12px, 0.95vw, 15px);
  font-weight: 300;
  line-height: 2;
  letter-spacing: 0.08em;
  white-space: pre-line;
}

.location-section__media {
  margin: 0;
}

.location-section__media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.location-section--hero {
  width: min(90vw, 1680px);
}

.location-section--hero .location-section__copy {
  width: min(560px, 42vw);
  margin: 0 0 clamp(42px, 7vh, 76px) clamp(12px, 4vw, 68px);
}

.location-section--text-image,
.location-section--image-text {
  display: grid;
  align-items: center;
  justify-content: space-between;
}

.location-section--text-image {
  grid-template-columns: 26% 62%;
}

.location-section--image-text {
  grid-template-columns: 68% 24%;
}

.location-reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: none;
  will-change: opacity, transform;
}

.location-intro.location-reveal,
.location-section__copy.location-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.location-reveal__title,
.location-reveal__meta,
.location-reveal__description {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: none;
}

body.location-active .stage {
  opacity: 0;
  pointer-events: none;
}

.team-experience {
  --team-edge: clamp(40px, 6vw, 120px);
  --portrait-height: clamp(380px, 56vh, 650px);
  --portrait-width: clamp(304px, 44.8vh, 520px);
  --panel-width: clamp(280px, 41.216vh, 478px);
  --portrait-gap: clamp(28px, 4vw, 80px);
  position: relative;
  z-index: 2;
  overflow: clip;
  color: #454a48;
  background: linear-gradient(135deg, #e8edef 0%, #f2efe7 58%, #ebe8df 100%);
}

.team-intro {
  display: flex;
  min-height: clamp(520px, 76svh, 820px);
  align-items: center;
  justify-content: center;
  padding: clamp(112px, 15svh, 180px) var(--edge) clamp(64px, 9svh, 104px);
}

.team-intro__copy {
  width: min(680px, 60vw);
  margin-inline: auto;
  text-align: center;
}

.team-intro__eyebrow {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 0 0 clamp(18px, 3vh, 30px);
  color: #9b814e;
  font-family: "Manrope Offline", sans-serif;
  font-size: 10px;
  font-weight: 450;
  letter-spacing: 0.25em;
}

.team-intro h2 {
  margin: 0;
  color: #464b49;
  font-size: clamp(28px, 3vw, 52px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.16em;
}

.team-intro__description {
  max-width: 680px;
  margin: clamp(28px, 4.5vh, 48px) auto 0;
  color: #565b59;
  font-size: clamp(17px, 1.45vw, 25px);
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.1em;
  white-space: pre-line;
}

/* 外觀篇章的導言要自成一個滿版淺色畫面，避免透明背景露出黑色影片舞台。 */
.exterior-intro {
  position: relative;
  z-index: 2;
  height: clamp(520px, 76svh, 820px);
  overflow: hidden;
  background: var(--ivory);
}

.exterior-intro__viewport,
.exterior-intro__layout {
  width: 100%;
  min-height: 100%;
}

.team-portraits {
  min-height: calc(var(--portrait-height) + clamp(250px, 34vh, 420px));
  padding: clamp(70px, 10vh, 120px) var(--team-edge) clamp(180px, 26vh, 320px);
}

.team-portraits__stage {
  display: flex;
  width: 100%;
  max-width: 1560px;
  margin-inline: auto;
  align-items: flex-start;
  justify-content: center;
  gap: var(--portrait-gap);
}

.person-card {
  display: flex;
  width: var(--portrait-width);
  min-width: 0;
  flex: 0 0 auto;
  overflow: clip;
  padding: 0;
  color: #454a48;
  outline: 0 solid transparent;
  transform: translateX(0);
  transition:
    width 0.64s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.64s cubic-bezier(0.22, 0.61, 0.36, 1),
    outline-color 0.25s ease;
}

.person-card.is-active {
  width: calc(var(--portrait-width) + var(--panel-width));
}

.person-card:focus-visible {
  outline: 1px solid rgba(155, 129, 78, 0.76);
  outline-offset: 8px;
}

.team-portraits[data-active-person="architect-lu"] .person-card.is-active {
  transform: translateX(-12px);
}

.team-portraits[data-active-person="architect-lu"] .person-card:not(.is-active) {
  transform: translateX(24px);
}

.team-portraits[data-active-person="engineer-chang"] .person-card.is-active {
  transform: translateX(-12px);
}

.team-portraits[data-active-person="engineer-chang"] .person-card:not(.is-active) {
  transform: translateX(-24px);
}

.person-card__portrait {
  position: relative;
  z-index: 1;
  width: var(--portrait-width);
  flex: 0 0 var(--portrait-width);
  min-width: 0;
}

.person-card__portrait img {
  display: block;
  width: auto;
  height: var(--portrait-height);
  max-width: none;
  object-fit: contain;
}

.person-card__identity {
  padding-top: clamp(18px, 2.4vh, 28px);
  text-align: left;
}

.person-card__identity p {
  margin: 0;
}

.person-card__identity p:first-child {
  color: #9b814e;
  font-size: 10px;
  letter-spacing: 0.18em;
}

.person-card__identity p:last-child {
  margin-top: 8px;
  color: #474c49;
  font-size: clamp(14px, 1vw, 17px);
  font-weight: 300;
  letter-spacing: 0.1em;
}

.person-card__panel {
  width: var(--panel-width);
  min-width: 0;
  flex: 0 0 var(--panel-width);
  height: var(--portrait-height);
  overflow: clip;
  background: #deddd7;
}

.person-card__panel-inner {
  display: flex;
  width: var(--panel-width);
  height: 100%;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(28px, 3vw, 56px);
  text-align: left;
  opacity: 0;
  transform: translateX(-18px);
  transition:
    opacity 0.38s ease 0s,
    transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) 0s;
}

.person-card.is-active .person-card__panel-inner {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.18s;
}

.person-card__panel p,
.person-card__panel h3 {
  margin-right: 0;
  margin-left: 0;
}

.person-card__english-role {
  margin-top: 0;
  margin-bottom: 7px;
  color: #9b814e;
  font-family: "Manrope Offline", sans-serif;
  font-size: clamp(8px, 0.65vw, 10px);
  font-weight: 500;
  letter-spacing: 0.2em;
}

.person-card__role {
  margin-top: 0;
  margin-bottom: clamp(16px, 2.4vh, 26px);
  color: #626663;
  font-size: clamp(10px, 0.78vw, 13px);
  letter-spacing: 0.14em;
}

.person-card__panel h3 {
  margin-top: 0;
  margin-bottom: 4px;
  color: #3d423f;
  font-size: clamp(24px, 2.1vw, 38px);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0.13em;
}

.person-card__title {
  margin-top: 0;
  margin-bottom: clamp(18px, 3vh, 30px);
  color: #4f5451;
  font-size: clamp(12px, 0.9vw, 15px);
  letter-spacing: 0.12em;
}

.person-card__detail {
  margin-top: 0;
  margin-bottom: clamp(14px, 2vh, 22px);
  color: #555a57;
  font-size: clamp(10px, 0.75vw, 13px);
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.06em;
  white-space: pre-line;
}

.person-card__statement {
  margin-top: auto;
  margin-bottom: 0;
  color: #555a57;
  font-size: clamp(10px, 0.78vw, 13px);
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.06em;
  white-space: pre-line;
}

body.team-active .stage {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .team-experience {
    --portrait-height: clamp(300px, min(52vh, 40vw), 430px);
    --portrait-width: clamp(240px, min(41.6vh, 32vw), 344px);
    --panel-width: clamp(221px, min(38.272vh, 29.44vw), 316px);
  }

  .person-card__panel-inner {
    padding: clamp(20px, 2.5vw, 34px);
  }

  .person-card__role,
  .person-card__title,
  .person-card__detail {
    margin-bottom: clamp(9px, 1.5vh, 16px);
  }
}

@media (max-width: 900px) {
  .location-intro {
    min-height: clamp(500px, 72svh, 680px);
    padding-right: var(--location-edge);
    padding-left: var(--location-edge);
  }

  .location-intro__copy {
    width: min(620px, 78vw);
  }

  .location-section--hero,
  .location-section--hero .location-section__copy {
    width: 100%;
  }

  .location-section--hero .location-section__copy {
    margin-left: 0;
  }

  .location-section--text-image,
  .location-section--image-text {
    grid-template-columns: 1fr;
    gap: clamp(36px, 7vh, 64px);
  }

  .location-section--text-image .location-section__copy,
  .location-section--image-text .location-section__copy {
    width: min(560px, 88%);
  }

  .location-section--image-text .location-section__copy {
    justify-self: end;
    text-align: right;
  }
}

.construction-experience {
  position: relative;
  z-index: 2;
  overflow: clip;
  color: #454a48;
  background: linear-gradient(135deg, #e8edef 0%, #f2efe7 58%, #ebe8df 100%);
}

.construction-intro,
.construction-gallery {
  position: relative;
}

.construction-intro {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: clamp(540px, 72svh, 760px);
  padding: clamp(150px, 21svh, 230px) var(--edge) clamp(92px, 13svh, 150px);
}

.construction-intro__copy {
  width: min(620px, 68vw);
  margin-inline: auto;
  text-align: center;
}

.construction-intro__eyebrow {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 0 0 clamp(20px, 3.2vh, 34px);
  color: #9b814e;
  font-family: "Manrope Offline", sans-serif;
  font-size: 10px;
  font-weight: 450;
  letter-spacing: 0.25em;
  opacity: var(--construction-meta-opacity, 0);
  transform: translate3d(0, var(--construction-meta-shift, 16px), 0);
}

.construction-intro__title {
  margin: 0;
}

.construction-intro h2 {
  margin: 0;
  color: #464b49;
  font-size: clamp(28px, 3vw, 52px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.16em;
  opacity: var(--construction-title-opacity, 0);
  transform: translate3d(0, var(--construction-title-shift, 20px), 0);
}

.construction-intro__description {
  max-width: 620px;
  margin: clamp(30px, 5vh, 54px) auto 0;
  color: #565b59;
  font-size: clamp(17px, 1.45vw, 25px);
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.1em;
  white-space: pre-line;
  opacity: var(--construction-copy-opacity, 0);
  transform: translate3d(0, var(--construction-copy-shift, 24px), 0);
}

.construction-gallery {
  padding: 0 clamp(28px, 5vw, 96px) clamp(220px, 30svh, 360px);
}

.construction-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 36px);
  width: 100%;
  margin-inline: auto;
  max-width: 1720px;
  align-items: start;
}

.construction-gallery__video {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  object-fit: contain;
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  will-change: transform, opacity;
}

body.construction-active .construction-gallery__video {
  visibility: visible;
}

.construction-gallery__item {
  width: 100%;
}

.construction-scroll {
  position: relative;
  height: 300vh;
  height: 300dvh;
  margin: 0;
  background: #000;
}

.construction-scroll__viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #000;
}

.construction-scroll__viewport::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 20px;
  border: 1px solid rgba(242, 239, 231, 0.12);
  pointer-events: none;
}

.construction-scroll__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.construction-scroll__shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 8, 0.18) 0%, transparent 45%),
    linear-gradient(0deg, rgba(8, 9, 8, 0.24) 0%, transparent 38%);
  pointer-events: none;
}

.trigger {
  display: none;
}

.stage {
  position: fixed;
  z-index: 1;
  top: -2px;
  right: 0;
  bottom: auto;
  left: 0;
  height: calc(100vh + 4px);
  height: calc(100dvh + 4px);
  overflow: hidden;
  background: #000;
  opacity: 1;
  transform: translateY(var(--stage-entry-translate, 0%));
  will-change: transform;
  transition: opacity 0.6s ease;
}

body.team-active.stage-entering .stage {
  opacity: 1;
}

/* 泳池最後一格隨舞台向上離開，讓下方工法從正常頁面流進入。 */
body.stage-releasing .stage {
  position: absolute;
  top: calc(var(--stage-release-top, 0px) - 1px);
  height: calc(100vh + 2px);
  height: calc(100dvh + 2px);
}

body.home-active .stage {
  opacity: 0;
}

body.home-active.home-leaving .stage,
body.home-active.home-entering .stage {
  opacity: 1;
}

body.home-active.home-leaving.location-active .stage {
  opacity: 0;
  transition: none;
}

.stage::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 20px;
  border: 1px solid rgba(242, 239, 231, 0.12);
  pointer-events: none;
}

.stage video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease;
}

.stage video.active {
  opacity: 1;
  visibility: visible;
}

.shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 8, 0.58) 0%, rgba(8, 9, 8, 0.16) 34%, transparent 60%),
    linear-gradient(0deg, rgba(8, 9, 8, 0.52) 0%, transparent 42%);
  pointer-events: none;
}

.copy {
  position: absolute;
  z-index: 4;
  bottom: clamp(40px, 6vh, 68px);
  left: var(--edge);
  width: min(450px, 43vw);
  padding-left: 18px;
  border-left: 1px solid rgba(242, 239, 231, 0.34);
  text-align: left;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.copy__gold-line {
  display: none;
}

body.chapter-placeholder .stage {
  background: #050505;
}

body.chapter-placeholder .stage::after,
body.chapter-placeholder .stage video,
body.chapter-placeholder .shade,
body.chapter-placeholder .empty-state {
  opacity: 0;
  pointer-events: none;
}

body.chapter-microcopy .clip {
  opacity: 0;
  pointer-events: none;
}

body.chapter-microcopy .copy {
  bottom: clamp(48px, 10vh, 120px);
  left: clamp(32px, 6vw, 120px);
  width: min(620px, calc(100vw - clamp(64px, 12vw, 240px)));
  padding: 0;
  border: 0;
  opacity: 1;
  transform: none;
  transition: none;
}

body.chapter-microcopy .copy__gold-line {
  display: block;
  width: 52px;
  height: 1px;
  margin-bottom: 15px;
  background: var(--gold);
  opacity: var(--placeholder-line-opacity, 0);
  transform: scaleX(var(--placeholder-line-scale, 0));
  transform-origin: left center;
}

body.chapter-microcopy .copy > p:first-of-type {
  margin: 0 0 10px;
  color: rgba(198, 170, 104, 0.82);
  font-size: 10px;
  letter-spacing: 0.18em;
  opacity: var(--placeholder-number-opacity, 0);
}

body.chapter-microcopy .copy h2 {
  color: #f5f5f3;
  font-size: clamp(25px, 2.2vw, 38px);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: 0.12em;
  opacity: var(--placeholder-title-opacity, 0);
  transform: translateY(var(--placeholder-title-shift, 20px));
}

body.chapter-microcopy .copy__description {
  max-width: 560px;
  margin: 18px 0 0;
  color: rgba(238, 238, 235, 0.68);
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.9;
  letter-spacing: 0.08em;
  white-space: pre-line;
  opacity: var(--placeholder-description-opacity, 0);
  transform: translateY(var(--placeholder-description-shift, 12px));
}

body.chapter-copyless .copy {
  display: none;
}

.on-opening .copy {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.copy.is-changing {
  opacity: 0;
  transform: translateY(8px);
}

.copy > p:first-of-type {
  margin: 0 0 8px;
  color: var(--gold);
  font-family: "Manrope Offline", sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.24em;
}

.copy h2 {
  margin: 0;
  color: var(--ivory);
  font-size: clamp(18px, 1.55vw, 26px);
  font-weight: 400;
  letter-spacing: 0.1em;
}

.copy__description {
  max-width: 410px;
  margin: 11px 0 17px;
  color: rgba(242, 239, 231, 0.72);
  font-size: 11px;
  line-height: 1.75;
  letter-spacing: 0.07em;
}

.clip {
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(242, 239, 231, 0.62);
  font-family: "Manrope Offline", sans-serif;
  font-size: 8px;
  letter-spacing: 0.16em;
}

.clip b {
  color: var(--ivory);
  font-weight: 500;
}

.clip i {
  display: block;
  width: 92px;
  height: 1px;
  background: rgba(242, 239, 231, 0.2);
}

.clip i b {
  display: block;
  width: 0;
  height: 1px;
  background: var(--gold);
}

.loading {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ivory);
  background: var(--charcoal);
  font-family: "Manrope Offline", sans-serif;
  font-size: 9px;
  letter-spacing: 0.28em;
  transition: opacity 0.5s ease;
}

.loading.hide {
  opacity: 0;
  pointer-events: none;
}

.empty-state {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(242, 239, 231, 0.76);
  font-family: "Noto Sans TC Offline", sans-serif;
  font-size: 13px;
  letter-spacing: 0.24em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

body.chapter-empty .empty-state {
  opacity: 1;
}

body.chapter-empty .copy,
body.at-end .copy {
  opacity: 0;
  pointer-events: none;
}

.end {
  position: relative;
  z-index: auto;
  margin: -1px 0 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16vh 11vw;
  color: var(--charcoal);
  background: var(--ivory);
  opacity: 1;
}

.end::after {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(23, 24, 23, 0.18);
  pointer-events: none;
}

.end p {
  margin: 0 auto;
  color: #8f743f;
  font-family: "Manrope Offline", sans-serif;
  font-size: 10px;
  letter-spacing: 0.24em;
}

.end h2 {
  max-width: 850px;
  margin: 22px auto 48px;
  font-size: clamp(32px, 4vw, 70px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.end h2 span {
  display: block;
}

.end button {
  width: 160px;
  padding: 0 0 11px;
  border: 0;
  border-bottom: 1px solid rgba(23, 24, 23, 0.4);
  color: var(--charcoal);
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: center;
  cursor: pointer;
}

.end .end__showroom {
  margin-top: 20px;
}

@media (max-height: 760px) and (min-width: 900px) {
  :root {
    --nav-height: 72px;
  }

  .copy {
    bottom: 34px;
  }
}

@media (max-width: 1100px) {
  :root {
    --edge: 30px;
  }
}

body.home-active:not(.home-entering):not(.home-leaving) .home-screen__heading {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

body.home-leaving .home-screen__heading,
body.home-returning .home-screen__heading {
  opacity: 0;
  transform: translate3d(0, -20px, 0);
}

body.home-returning.home-return-revealed .home-screen__heading {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* 頂部篇章導覽：以 viewport 為中心，與左側 LOGO 各自定位。 */
.chapter-switcher {
  --chapter-entry-font-size: clamp(12px, 0.84vw, 15px);
  --chapter-entry-line-height: 1.4;
  --chapter-entry-letter-spacing: 0.2em;
  --chapter-entry-hit-height: 44px;
  --chapter-entry-text-offset-y: 0px;
  --home-nav-safe: clamp(22px, 4vh, 44px);
  --home-gradient-height: clamp(130px, 24vh, 280px);
  position: fixed;
  z-index: 130;
  top: 0;
  right: auto;
  bottom: auto;
  left: 0;
  display: flex;
  width: 100%;
  height: var(--nav-height);
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 3.2vw, 56px);
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  transition:
    transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
    height 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  white-space: nowrap;
  pointer-events: none;
}

body.home-active:not(.home-leaving) .chapter-switcher {
  transition: none;
}

body.home-active .chapter-switcher {
  --chapter-entry-text-offset-y: clamp(80px, 5vh, 100px);
  visibility: hidden;
  pointer-events: none;
}

.chapter-switcher::after {
  content: none;
}

.chapter-switcher button {
  position: relative;
  display: flex;
  justify-self: center;
  width: auto;
  min-height: var(--chapter-entry-hit-height);
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #3d413f;
  background: transparent;
  text-align: center;
  opacity: 0.56;
  transform: none;
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.35s ease, opacity 0.35s ease;
}

.chapter-switcher__name {
  position: relative;
  display: inline-block;
  font-family: "Noto Sans TC Offline", sans-serif;
  font-size: var(--chapter-entry-font-size);
  font-weight: 400;
  line-height: var(--chapter-entry-line-height);
  letter-spacing: var(--chapter-entry-letter-spacing);
  white-space: nowrap;
  transform: translateY(var(--chapter-entry-text-offset-y));
}

.chapter-switcher__name::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: var(--gold);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.chapter-switcher button.active,
.chapter-switcher button:hover,
.chapter-switcher button:focus-visible {
  color: #242725;
  opacity: 1;
}

.chapter-nav-button:hover .chapter-switcher__name::after,
.chapter-nav-button:focus-visible .chapter-switcher__name::after,
.chapter-nav-button.active .chapter-switcher__name::after {
  opacity: 1;
  transform: scaleX(1);
}

.chapter-switcher button:focus-visible {
  outline: none;
}

body.at-end .chapter-switcher {
  pointer-events: none;
}

.nav::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0 0 auto;
  height: clamp(108px, 14vh, 150px);
  background: linear-gradient(
    to bottom,
    rgba(244, 242, 236, 0.96) 0%,
    rgba(244, 242, 236, 0.7) 45%,
    rgba(244, 242, 236, 0) 100%
  );
  transition: opacity 0.35s ease;
  pointer-events: none;
}

/* 僅獨立篇章文案共用中心線；圖文段落與影片小文案不套用。 */
.standalone-copy {
  margin-inline: auto;
  text-align: center;
}

.chapter-switcher__group {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: clamp(380px, 40vw, 620px);
  height: 100%;
  margin-inline: auto;
  align-items: center;
  transition: width 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.chapter-switcher__divider {
  position: absolute;
  bottom: calc(-1 * var(--home-nav-safe));
  left: var(--divider-position);
  width: 1px;
  height: clamp(70px, 12vh, 150px);
  background: linear-gradient(
    to top,
    rgba(140, 120, 78, 0.45) 0%,
    rgba(140, 120, 78, 0) 100%
  );
  opacity: 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.55s ease;
  pointer-events: none;
}

body.home-active:not(.home-entering):not(.home-leaving) .chapter-switcher {
  right: 0;
  left: 0;
  width: 100%;
  height: var(--home-gradient-height);
  transform: translate3d(
    0,
    calc(100vh - var(--home-gradient-height)),
    0
  );
}

body.home-leaving .chapter-switcher {
  right: 0;
  left: 0;
  width: 100%;
  height: var(--home-gradient-height);
  transform: translate3d(
    0,
    calc(100vh - var(--home-gradient-height)),
    0
  );
}

body.home-entering .chapter-switcher {
  right: 0;
  left: 0;
  width: 100%;
  height: var(--home-gradient-height);
  transform: translate3d(
    0,
    calc(100vh - var(--home-gradient-height)),
    0
  );
  transition: none;
  pointer-events: none;
}

body.home-active:not(.home-entering):not(.home-leaving) .chapter-switcher__group {
  width: 100%;
}

body.home-leaving .chapter-switcher__group {
  width: 100%;
  animation: home-chapter-nav-exit 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

body.home-entering .chapter-switcher__group {
  width: 100%;
  animation: home-chapter-nav-enter 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

body.home-active:not(.home-entering):not(.home-leaving) .chapter-switcher__divider {
  bottom: 0;
  opacity: 0.68;
  transform: scaleY(1);
}

body.home-leaving .chapter-switcher__divider {
  bottom: 0;
  opacity: 0.68;
  transform: scaleY(1);
}

body.home-entering .chapter-switcher__divider {
  bottom: 0;
  opacity: 0.68;
  transform: scaleY(1);
}

body.chapter-entering .chapter-switcher {
  transition: none;
  pointer-events: none;
}

body.chapter-entering .chapter-switcher__group {
  animation: inner-chapter-nav-enter 0.65s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

body.chapter-entering .linking-cloud-logo {
  animation: inner-logo-enter 0.65s 0.08s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  pointer-events: none;
}

body.chapter-leaving .chapter-switcher {
  pointer-events: none;
}

body.chapter-leaving .chapter-switcher__group {
  animation: inner-chapter-nav-exit 0.65s cubic-bezier(0.55, 0.06, 0.68, 0.19) both;
}

body.chapter-leaving .linking-cloud-logo {
  animation: inner-logo-exit 0.57s cubic-bezier(0.55, 0.06, 0.68, 0.19) both;
  pointer-events: none;
}

@keyframes home-chapter-nav-exit {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  to {
    opacity: 0;
    transform: translate3d(0, clamp(48px, 8vh, 88px), 0);
  }
}

@keyframes home-chapter-nav-enter {
  from {
    opacity: 0;
    transform: translate3d(0, clamp(48px, 8vh, 88px), 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes inner-chapter-nav-enter {
  from {
    opacity: 0;
    transform: translate3d(0, -28px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes inner-logo-enter {
  from {
    opacity: 0;
    transform: translate3d(0, -22px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes inner-chapter-nav-exit {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  to {
    opacity: 0;
    transform: translate3d(0, -28px, 0);
  }
}

@keyframes inner-logo-exit {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  to {
    opacity: 0;
    transform: translate3d(0, -22px, 0);
  }
}

@keyframes home-background-enter {
  from {
    opacity: 0;
    transform: scale(1.06);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

body.home-active .chapter-switcher button {
  display: flex;
  color: #3d413f;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  opacity: 0.72;
  cursor: pointer;
}

body.home-active .chapter-switcher button:hover,
body.home-active .chapter-switcher button:focus-visible {
  color: #242725;
  opacity: 1;
}

body.home-active:not(.home-entering):not(.home-leaving)
  .chapter-switcher__group:has(.chapter-nav-button:nth-child(1):is(:hover, :focus-visible))
  .chapter-switcher__divider:nth-of-type(1),
body.home-active:not(.home-entering):not(.home-leaving)
  .chapter-switcher__group:has(.chapter-nav-button:nth-child(2):is(:hover, :focus-visible))
  .chapter-switcher__divider:nth-of-type(1),
body.home-active:not(.home-entering):not(.home-leaving)
  .chapter-switcher__group:has(.chapter-nav-button:nth-child(2):is(:hover, :focus-visible))
  .chapter-switcher__divider:nth-of-type(2),
body.home-active:not(.home-entering):not(.home-leaving)
  .chapter-switcher__group:has(.chapter-nav-button:nth-child(3):is(:hover, :focus-visible))
  .chapter-switcher__divider:nth-of-type(2),
body.home-active:not(.home-entering):not(.home-leaving)
  .chapter-switcher__group:has(.chapter-nav-button:nth-child(3):is(:hover, :focus-visible))
  .chapter-switcher__divider:nth-of-type(3),
body.home-active:not(.home-entering):not(.home-leaving)
  .chapter-switcher__group:has(.chapter-nav-button:nth-child(4):is(:hover, :focus-visible))
  .chapter-switcher__divider:nth-of-type(3),
body.home-active:not(.home-entering):not(.home-leaving)
  .chapter-switcher__group:has(.chapter-nav-button:nth-child(4):is(:hover, :focus-visible))
  .chapter-switcher__divider:nth-of-type(4),
body.home-active:not(.home-entering):not(.home-leaving)
  .chapter-switcher__group:has(.chapter-nav-button:nth-child(5):is(:hover, :focus-visible))
  .chapter-switcher__divider:nth-of-type(4) {
  opacity: 1;
}

body.home-leaving .chapter-nav-button .chapter-switcher__name::after {
  opacity: 0;
  transform: scaleX(0);
}

/* 首頁底部的柔和保護層位於背景與入口之間。 */
.home-screen::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--home-gradient-height, clamp(130px, 24vh, 280px));
  background: linear-gradient(
    to bottom,
    rgba(244, 242, 236, 0) 0%,
    rgba(244, 242, 236, 0.65) 55%,
    rgba(244, 242, 236, 0.96) 100%
  );
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transform-origin: bottom;
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.55s ease;
  pointer-events: none;
}

body.home-leaving .home-screen::after,
body.home-entering .home-screen::after {
  opacity: 0.4;
  transform: translate3d(0, 0, 0);
}

body.home-entering .home-screen::after {
  animation: none;
}

body.home-returning .home-screen::after {
  opacity: 0.4;
  transform: translate3d(0, 0, 0);
}

body.home-returning.home-return-revealed .home-screen::after {
  opacity: 1;
}

@keyframes home-gradient-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* 首頁不顯示、也不保留可互動的 LOGO；內頁維持原本返回首頁功能。 */
body.home-active .linking-cloud-logo {
  display: none;
  pointer-events: none;
}

body.home-active .nav::before {
  opacity: 0;
}

/* 首頁右上品牌主標：位置主要由 top 與 right 控制。 */
.home-screen__heading {
  position: absolute;
  top: clamp(82px, 20vh, 300px);
  right: clamp(44px, 10vw, 200px);
  width: clamp(220px, 21vw, 330px);
  color: #343937;
  text-align: right;
  opacity: 0;
  transform: translateX(20px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.home-screen__eyebrow,
.home-screen__heading p.home-screen__eyebrow {
  display: block;
  margin: 0 0 clamp(13px, 1.7vh, 20px);
  color: #343937;
  font-family: "Manrope Offline", sans-serif;
  font-size: clamp(9px, 0.62vw, 12px);
  font-weight: 550;
  line-height: 1;
  letter-spacing: 0.42em;
  padding-left: 2em;
  text-align: left;
  white-space: nowrap;
}

.home-screen__heading h1 {
  margin: 0;
  color: #343937;
  font-family: "Noto Serif JP Light", serif;
  font-size: clamp(46px, 5vw, 100px);
  font-weight: 300;
  font-synthesis: none;
  line-height: 1.32;
  letter-spacing: 0.11em;
}

.home-screen__heading h1 span {
  display: block;
  white-space: nowrap;
}

.home-screen__explore {
  position: relative;
  display: flex;
  width: max-content;
  margin: clamp(18px, 2.4vh, 28px) 0 0 auto;
  padding: 0 0 7px;
  align-items: center;
  gap: 0.72em;
  border: 0;
  color: rgba(52, 57, 55, 0.58);
  background: transparent;
  font-family: "Noto Sans TC Offline", sans-serif;
  font-size: clamp(24px, 1.52vw, 30px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.32em;
  cursor: pointer;
  transition: color 0.28s ease;
}

.home-screen__explore-arrow {
  display: inline-block;
  font-family: "Manrope Offline", sans-serif;
  font-size: 1.15em;
  font-weight: 300;
  letter-spacing: 0;
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.home-screen__explore::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.home-screen__explore:hover,
.home-screen__explore:focus-visible {
  color: #343937;
}

.home-screen__explore:hover::after,
.home-screen__explore:focus-visible::after {
  transform: scaleX(1);
}

.home-screen__explore:hover .home-screen__explore-arrow,
.home-screen__explore:focus-visible .home-screen__explore-arrow {
  transform: translateX(3px);
}

.home-screen__explore:focus-visible {
  outline: 1px solid rgba(52, 57, 55, 0.7);
  outline-offset: 5px;
}

.home-screen__showroom {
  position: relative;
  display: flex;
  width: max-content;
  margin: 16px 0 0 auto;
  padding: 0 0 7px;
  align-items: center;
  gap: 0.72em;
  border: 0;
  color: rgba(52, 57, 55, 0.58);
  background: transparent;
  font-family: "Noto Sans TC Offline", sans-serif;
  font-size: clamp(24px, 1.52vw, 30px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.32em;
  cursor: pointer;
  transition: color 0.28s ease;
}

.home-screen__showroom::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.home-screen__showroom:hover,
.home-screen__showroom:focus-visible {
  color: #343937;
}

.home-screen__showroom:hover::after,
.home-screen__showroom:focus-visible::after {
  transform: scaleX(1);
}

.home-screen__showroom:focus-visible {
  outline: none;
}

@media (max-width: 900px) {
  .home-screen__heading {
    top: clamp(70px, 10vh, 96px);
    right: clamp(24px, 4vw, 40px);
    width: clamp(190px, 23vw, 220px);
  }

  .home-screen__heading h1 {
    font-size: clamp(38px, 5vw, 46px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }
}

/* iPad PWA：直向時提示旋轉，橫向維持完整的捲動敘事。 */
.orientation-notice {
  display: none;
}

.pwa-offline {
  position: fixed;
  z-index: 450;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: min(390px, calc(100vw - 36px));
  padding: 14px 16px;
  align-items: center;
  gap: 10px 16px;
  border: 1px solid rgba(198, 170, 104, 0.46);
  color: var(--ivory);
  background: rgba(23, 24, 23, 0.94);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0s linear 0s;
  pointer-events: auto;
}

.pwa-offline[hidden] {
  display: none;
}

.pwa-offline__copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.pwa-offline__copy strong {
  color: var(--gold);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.pwa-offline__copy span {
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: 0.05em;
}

.pwa-offline progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 3px;
  border: 0;
  accent-color: var(--gold);
}

.pwa-offline button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(198, 170, 104, 0.7);
  color: var(--ivory);
  background: transparent;
  font-size: 11px;
  letter-spacing: 0.08em;
  touch-action: manipulation;
}

.pwa-offline.is-dismissed {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
  pointer-events: none;
}

@media (orientation: portrait) and (any-pointer: coarse) {
  .orientation-notice {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    padding:
      max(32px, env(safe-area-inset-top))
      max(32px, env(safe-area-inset-right))
      max(32px, env(safe-area-inset-bottom))
      max(32px, env(safe-area-inset-left));
    place-items: center;
    color: var(--ivory);
    background: var(--ink);
    text-align: center;
  }

  .orientation-notice div {
    display: grid;
    gap: 14px;
  }

  .orientation-notice p,
  .orientation-notice strong,
  .orientation-notice span {
    margin: 0;
  }

  .orientation-notice p {
    color: var(--gold);
    font-family: "Manrope Offline", sans-serif;
    font-size: 10px;
    letter-spacing: 0.24em;
  }

  .orientation-notice strong {
    font-size: clamp(24px, 5vw, 38px);
    font-weight: 400;
    letter-spacing: 0.1em;
  }

  .orientation-notice span {
    color: rgba(242, 239, 231, 0.68);
    font-size: 13px;
    letter-spacing: 0.06em;
  }
}

@media (orientation: landscape) and (min-width: 801px) and (max-width: 1400px) and (any-pointer: coarse) {
  :root {
    --nav-height: 72px;
    --edge: max(24px, env(safe-area-inset-left));
  }

  button,
  .person-card {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .chapter-switcher {
    padding-right: max(20px, env(safe-area-inset-right));
    padding-left: max(20px, env(safe-area-inset-left));
  }

  .chapter-switcher__group {
    width: min(760px, calc(100vw - 180px));
  }

  .chapter-switcher__name {
    font-size: 12px;
    letter-spacing: 0.13em;
  }

  .chapter-switcher button,
  .linking-cloud-logo,
  .home-screen__explore,
  .home-screen__showroom,
  .end button {
    min-height: 44px;
  }

  .home-screen__heading {
    top: clamp(66px, 12svh, 110px);
    right: max(34px, calc(env(safe-area-inset-right) + 20px));
    width: min(280px, 28vw);
  }

  .home-screen__heading h1 {
    font-size: clamp(42px, 6.2svh, 66px);
  }

  .home-screen__explore,
  .home-screen__showroom {
    font-size: clamp(18px, 2.6svh, 24px);
  }

  .showroom {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 34vw);
  }

  .showroom__panel {
    padding:
      max(22px, env(safe-area-inset-top))
      max(24px, env(safe-area-inset-right))
      max(22px, env(safe-area-inset-bottom))
      24px;
  }

  .showroom__header {
    margin-top: 18px;
  }

  .showroom__controls {
    gap: 18px;
    margin-top: 22px;
  }

  .showroom-option,
  .showroom__back,
  .showroom__reset {
    min-height: 44px;
  }

  .team-experience {
    --portrait-height: min(58svh, 440px);
    --portrait-width: min(38vw, 420px);
    --panel-width: var(--portrait-width);
    --portrait-gap: clamp(24px, 5vw, 64px);
  }

  .team-portraits {
    padding-right: max(30px, env(safe-area-inset-right));
    padding-left: max(30px, env(safe-area-inset-left));
  }

  .person-card,
  .person-card.is-active {
    position: relative;
    width: var(--portrait-width);
    transform: none !important;
  }

  .person-card__portrait img {
    width: 100%;
    height: var(--portrait-height);
    object-fit: contain;
  }

  .person-card__panel {
    position: absolute;
    z-index: 3;
    inset: 0;
    width: 100%;
    background: rgba(222, 221, 215, 0.97);
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, 12px, 0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
    pointer-events: none;
  }

  .person-card.is-active .person-card__panel {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
    transition-delay: 0s;
  }

  .person-card__panel-inner {
    width: 100%;
    padding: clamp(22px, 3vw, 38px);
    overflow-y: auto;
  }

  .copy {
    bottom: max(30px, calc(env(safe-area-inset-bottom) + 18px));
  }

  .stage::after,
  .construction-scroll__viewport::after,
  .end::after {
    inset:
      max(14px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
  }
}
