@font-face {
  font-family: "DynaPuff Local";
  src: url("./assets/fonts/DynaPuff-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Lemi Xiaoyu Local";
  src: url("./assets/fonts/LemiXiaoYuTi-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "ColaKind Local";
  src: url("./assets/fonts/ColaKind-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
  --ink: #21454e;
  --paper: #fffaf0;
  --shadow: rgba(33, 69, 78, 0.16);
}
* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #9cc7ee;
}

button {
  font: inherit;
}

.site-shell,
.home-scene,
.works-scene,
.about-scene,
.contact-scene,
.loading-scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 34rem;
}

.home-scene {
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  background: #72baf1;
  transform: scale(1.025);
  transition: opacity 900ms ease, transform 1200ms ease;
}

.home-scene.is-visible {
  opacity: 1;
  transform: scale(1);
}

.about-scene {
  z-index: 1;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  outline: none;
  background: #efad66;
  pointer-events: none;
  transform: scale(1.018);
  transition:
    opacity 650ms ease,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 650ms step-end;
}

.about-scene.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  transition:
    opacity 650ms ease,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0ms step-start;
}

.contact-scene {
  z-index: 1;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  outline: none;
  background: #2464bd;
  pointer-events: none;
  transform: scale(1.018);
  transition:
    opacity 650ms ease,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 650ms step-end;
}

.contact-scene.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  transition:
    opacity 650ms ease,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0ms step-start;
}

.contact-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 177.777778vh);
  height: max(56.25vw, 100vh);
  overflow: hidden;
  transform: translate(-50%, -50%);
}

.contact-layer {
  position: absolute;
  z-index: var(--z);
  top: var(--y);
  left: var(--x);
  width: var(--w);
  height: var(--h);
  pointer-events: none;
}

.contact-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.contact-nav-cloud {
  z-index: 20;
}

.contact-copy {
  position: absolute;
  z-index: 5;
  inset: 0;
  margin: 0;
  color: #fff;
  font-family: "ColaKind Local", "Comic Sans MS", "Segoe Print", cursive;
  font-weight: 400;
  pointer-events: none;
}

.contact-text-line {
  position: absolute;
  top: 21.397704%;
  left: 31.713340%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 37.699531%;
  height: 10.865936%;
  font-size: max(4.875vw, 8.666667vh);
  line-height: 1.2;
  letter-spacing: 0.005em;
  white-space: nowrap;
  text-shadow:
    0 0.055em 0.08em rgba(44, 80, 160, 0.3),
    0 0.12em 0.28em rgba(30, 65, 132, 0.22);
  pointer-events: auto;
  user-select: none;
}

.contact-subtitle {
  position: absolute;
  z-index: 6;
  top: 32.843505%;
  left: 25%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50%;
  height: 4.5%;
  margin: 0;
  color: #fff9e8;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", sans-serif;
  font-size: max(1.8vw, 3.2vh);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 0.08em 0.24em rgba(30, 65, 132, 0.42);
  pointer-events: none;
  user-select: none;
}

.contact-invitation {
  position: absolute;
  z-index: 9;
  top: 76.7%;
  left: 32.66%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54%;
  height: 5.6%;
  margin: 0;
  color: #5d7182;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", sans-serif;
  font-size: max(1.25vw, 2.222222vh);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 0.04em 0.12em rgba(255, 255, 255, 0.75);
  pointer-events: none;
  user-select: none;
}

.contact-invitation span {
  display: block;
  width: 100%;
}

.contact-title-char {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  min-width: 0.12em;
  padding-inline: 0;
  cursor: default;
  opacity: 1;
  transform: translateX(var(--neighbor-shift, 0em));
  transform-origin: 50% 78%;
  transition:
    color 220ms ease,
    text-shadow 240ms ease,
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.contact-title-char.is-neighbor {
  transform: translateX(var(--neighbor-shift, 0em));
}

.contact-title-char.is-space {
  width: 0.33em;
  min-width: 0.33em;
}

.contact-title-char.is-active {
  z-index: 2;
  color: #fff6b5;
  text-shadow:
    0 0 0.08em rgba(255, 255, 255, 0.98),
    0 0 0.25em rgba(255, 229, 117, 0.98),
    0 0.16em 0.3em rgba(34, 70, 142, 0.3);
  transform: translateX(0) translateY(-0.16em) rotate(var(--title-tilt, -2deg)) scale(1.18);
}

.contact-scene.is-visible.is-title-intro .contact-title-char:not(.is-space) {
  animation: home-title-arrive 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(90ms + var(--char-index) * 24ms);
}

.contact-scene.is-visible.is-title-intro .contact-title-char.is-active {
  animation: none;
}

.contact-method-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 24%;
  outline: none;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 0.35rem 0.32rem rgba(38, 71, 124, 0.1));
  transition:
    filter 220ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-method-button img {
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.contact-method-button:hover,
.contact-method-button:focus-visible {
  filter:
    drop-shadow(0 0.55rem 0.45rem rgba(38, 71, 124, 0.2))
    drop-shadow(0 0 0.58rem rgba(255, 232, 131, 0.55));
  transform: translateY(-0.28rem) scale(1.07) rotate(-1deg);
}

.contact-method-button:focus-visible {
  box-shadow: inset 0 0 0 0.16em rgba(255, 232, 117, 0.88);
}

.contact-method-button:active {
  transform: translateY(0.06rem) scale(0.96);
  transition-duration: 80ms;
}

.contact-method-button.is-clicked {
  animation: home-nav-button-bounce 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-privacy-dialog {
  width: min(42rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow-y: auto;
  color: #315867;
  border: 1px solid rgba(63, 103, 87, 0.18);
  border-radius: 2rem 1.35rem 2.2rem 1.5rem;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.9), transparent 38%),
    #fff9e9;
  box-shadow: 0 2rem 5rem rgba(35, 68, 70, 0.32);
}

.contact-privacy-dialog::backdrop {
  background: rgba(37, 77, 91, 0.44);
  backdrop-filter: blur(0.45rem);
}

.contact-privacy-dialog[open] {
  animation: work-detail-enter 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.contact-privacy-close {
  position: sticky;
  z-index: 2;
  top: 0;
  float: right;
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  padding: 0;
  color: #315867;
  border: 1px solid rgba(58, 98, 91, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0.5rem 1rem rgba(48, 79, 75, 0.1);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.contact-privacy-close:hover,
.contact-privacy-close:focus-visible,
.contact-form-submit:focus-visible,
.contact-switch-email:focus-visible {
  outline: 0.18rem solid rgba(255, 204, 86, 0.82);
  outline-offset: 0.18rem;
}

.contact-privacy-panel[hidden] {
  display: none;
}

.contact-privacy-eyebrow {
  margin: 0 4rem 0.55rem 0;
  color: #7a987d;
  font-family: "DynaPuff Local", cursive;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
}

.contact-privacy-panel h2 {
  margin: 0;
  color: #315867;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", sans-serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.15;
}

.contact-privacy-copy {
  max-width: 36rem;
  margin: 1rem 0 1.5rem;
  color: #5d7474;
  font-size: 1rem;
  line-height: 1.8;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.48rem;
  color: #49676b;
  font-size: 0.92rem;
  font-weight: 700;
}

.contact-form-message,
.contact-form-privacy,
.contact-form-actions {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(73, 112, 100, 0.25);
  border-radius: 1rem 0.78rem 1.05rem 0.82rem;
  padding: 0.85rem 1rem;
  color: #315867;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0.12rem 0.25rem rgba(49, 88, 103, 0.05);
  font: inherit;
}

.contact-form textarea {
  min-height: 8.5rem;
  resize: vertical;
  line-height: 1.6;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  border-color: #d5a34e;
  outline: 0.18rem solid rgba(255, 215, 117, 0.45);
  outline-offset: 0.08rem;
}

.contact-form-privacy {
  margin: 0;
  padding: 0.8rem 1rem;
  color: #6d7f77;
  border-radius: 0.9rem;
  background: rgba(225, 240, 213, 0.55);
  font-size: 0.82rem;
  line-height: 1.65;
}

.contact-form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.contact-form-submit,
.contact-switch-email {
  flex: 0 0 auto;
  padding: 0.78rem 1.3rem;
  color: #315867;
  border: 1px solid rgba(190, 137, 37, 0.24);
  border-radius: 999px;
  background: #ffe59a;
  box-shadow: 0 0.45rem 0.8rem rgba(98, 79, 34, 0.12);
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.contact-form-submit:hover,
.contact-switch-email:hover {
  background: #ffdc75;
  transform: translateY(-0.08rem);
}

#contactFormStatus {
  color: #708176;
  font-size: 0.82rem;
  line-height: 1.55;
}

.contact-wechat-panel {
  min-height: 21rem;
}

.contact-wechat-note {
  display: flex;
  max-width: 25rem;
  align-items: center;
  justify-content: space-between;
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  color: #5e746d;
  border: 1px dashed rgba(86, 125, 105, 0.34);
  border-radius: 1rem;
  background: rgba(225, 240, 213, 0.52);
}

.contact-wechat-note strong {
  color: #b27745;
}

@media (max-width: 700px) {
  .contact-privacy-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    padding: 1.35rem;
    border-radius: 1.35rem;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .contact-form label,
  .contact-form-message,
  .contact-form-privacy,
  .contact-form-actions {
    grid-column: 1;
  }

  .contact-form-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

.about-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 177.777778vh);
  height: max(56.25vw, 100vh);
  overflow: hidden;
  transform: translate(-50%, -50%);
}

.about-background,
.about-tree,
.about-scene-dog {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
}

.about-background {
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-tree {
  z-index: 2;
  top: -1%;
  left: -1.75%;
  width: 48%;
  height: 53.333333%;
  object-fit: contain;
  object-position: left top;
  opacity: 0.78;
}

.about-scene-dog {
  z-index: 5;
  top: 25.474579%;
  left: 13.237754%;
  width: 19.274194%;
  height: 40.424798%;
  object-fit: contain;
}

.about-intro {
  position: absolute;
  z-index: 8;
  top: 20.5%;
  left: 6.75%;
  width: 31.5%;
  color: #3d5254;
}

.about-copy {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-weight: 700;
}

.about-text-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: auto;
  user-select: none;
}

.about-text-main {
  color: #fff;
  font-family: "ColaKind Local", "Comic Sans MS", "Segoe Print", cursive;
  font-size: max(5.45vw, 9.688889vh);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 0.95;
  text-shadow: none;
}

.about-text-subtitle {
  margin-top: 1.8%;
  color: #fff;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: max(1.85vw, 3.288889vh);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-shadow: none;
}

.about-gallery {
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
}

.about-photo {
  position: absolute;
  box-sizing: border-box;
  margin: 0;
  padding: max(0.8vw, 1.422222vh);
  border-radius: max(1.1vw, 1.955556vh);
  background: #fffaf0;
  box-shadow:
    max(0.55vw, 0.977778vh) max(0.72vw, 1.28vh) max(1.15vw, 2.044444vh) rgba(73, 61, 45, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  transform-origin: center;
}

.about-photo::before {
  position: absolute;
  z-index: 3;
  top: max(-1.5vw, -2.666667vh);
  left: 38%;
  width: 25%;
  height: max(1.75vw, 3.111111vh);
  content: "";
  background: rgba(246, 217, 141, 0.72);
  transform: rotate(-2deg);
}

.about-photo-main {
  z-index: 2;
  top: 18.666667%;
  left: 40.625%;
  width: 28.125%;
  height: 61.666667%;
  transform: rotate(-1.6deg);
}

.about-photo-nature {
  z-index: 3;
  top: 12.5%;
  left: 70.25%;
  width: 13.25%;
  height: 34%;
  transform: rotate(2deg);
}

.about-photo-food {
  z-index: 4;
  top: 15.5%;
  left: 84.5%;
  width: 13.25%;
  height: 28.5%;
  transform: rotate(-1deg);
}

.about-photo-daily {
  z-index: 5;
  top: 48%;
  left: 70%;
  width: 27%;
  height: 29%;
  transform: rotate(1.3deg);
}

.about-photo-media {
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: max(0.7vw, 1.244444vh);
}

.about-photo-main .about-photo-media {
  height: 82%;
}

.about-photo-nature .about-photo-media,
.about-photo-food .about-photo-media {
  height: 75%;
}

.about-photo-daily .about-photo-media {
  height: 76%;
}

.about-photo-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-photo-main .about-photo-media img {
  object-position: 50% 42%;
}

.about-photo-nature .about-photo-media img {
  object-position: 50% 40%;
}

.about-photo-food .about-photo-media img {
  object-position: 50% 38%;
}

.about-photo-daily .about-photo-media img {
  object-position: 50% 48%;
}

.about-photo figcaption {
  display: flex;
  flex-direction: column;
  gap: max(0.12vw, 0.213333vh);
  padding: max(0.5vw, 0.888889vh) max(0.24vw, 0.426667vh) 0;
  color: #475f65;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.05;
}

.about-photo figcaption strong {
  font-size: max(1.38vw, 2.453333vh);
  font-weight: 400;
}

.about-photo figcaption small {
  color: #7d7b70;
  font-size: max(0.9vw, 1.6vh);
}

.about-photo-nature figcaption strong,
.about-photo-food figcaption strong,
.about-photo-daily figcaption strong {
  font-size: max(0.92vw, 1.635556vh);
  line-height: 1.15;
}

.about-title-char {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  min-width: 0.12em;
  padding-inline: 0;
  cursor: default;
  opacity: 1;
  transform: translateX(var(--neighbor-shift, 0em));
  transform-origin: 50% 78%;
  transition:
    color 220ms ease,
    text-shadow 240ms ease,
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.about-title-char.is-neighbor {
  transform: translateX(var(--neighbor-shift, 0em));
}

.about-title-char.is-space {
  width: 0.33em;
  min-width: 0.33em;
}

.about-title-char.is-active {
  z-index: 2;
  color: #fff6b5;
  text-shadow: none;
  transform: translateX(0) translateY(-0.16em) rotate(var(--title-tilt, -2deg)) scale(1.18);
}

.about-scene.is-visible.is-title-intro .about-title-char:not(.is-space) {
  animation: home-title-arrive 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(90ms + var(--char-index) * 24ms);
}

.about-scene.is-visible.is-title-intro .about-title-char.is-active {
  animation: none;
}

.about-action {
  position: absolute;
  z-index: 9;
  top: 65.2%;
  display: grid;
  width: 10.2%;
  aspect-ratio: 236 / 76;
  place-items: center;
  padding: 0;
  color: #45616a;
  border: 0;
  outline: none;
  background: url("./assets/about-action-button.png") center / contain no-repeat;
  clip-path: inset(0 round 999px);
  cursor: pointer;
  filter: drop-shadow(0 0.45rem 0.4rem rgba(122, 72, 36, 0.12));
  transition:
    color 180ms ease,
    filter 220ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.about-action-works {
  left: 8%;
}

.about-action-contact {
  left: 22.75%;
}

.about-action span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: max(1.28vw, 2.275556vh);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.about-action:hover,
.about-action:focus-visible {
  color: #2f5968;
  filter:
    drop-shadow(0 0.65rem 0.55rem rgba(122, 72, 36, 0.18))
    drop-shadow(0 0 0.55rem rgba(255, 240, 168, 0.48));
  transform: translateY(-0.32rem) scale(1.06) rotate(-1deg);
}

.about-action:hover span,
.about-action:focus-visible span {
  transform: translateY(-0.06em) scale(1.04);
}

.about-action:focus-visible {
  box-shadow: inset 0 0 0 0.18em rgba(255, 255, 255, 0.84);
}

.about-action:active {
  transform: translateY(0.08rem) scale(0.97);
  transition-duration: 80ms;
}

.about-action.is-clicked {
  animation: home-nav-button-bounce 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.about-nav-cloud {
  z-index: 20;
}

.home-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 177.777778vh);
  height: max(56.25vw, 100vh);
  overflow: hidden;
  transform: translate(-50%, -50%);
}

.home-layer {
  position: absolute;
  z-index: var(--z);
  top: var(--y);
  left: var(--x);
  width: var(--w);
  height: var(--h);
  pointer-events: none;
}

.home-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.home-nav-cloud {
  position: absolute;
  z-index: 18;
  top: var(--y);
  left: var(--x);
  width: var(--w);
  height: var(--h);
  color: #405c65;
  pointer-events: auto;
}

.home-nav-cloud > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.home-nav-labels {
  position: absolute;
  inset: 0 11%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.08em;
  font-size: max(0.88vw, 1.565vh);
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.home-nav-button {
  position: relative;
  min-width: 3.6em;
  padding: 0.42em 0.48em 0.48em;
  color: inherit;
  border: 0;
  border-radius: 999px;
  outline: none;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition:
    color 180ms ease,
    background 180ms ease,
    box-shadow 220ms ease,
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-nav-button::after {
  position: absolute;
  right: 22%;
  bottom: 0.18em;
  left: 22%;
  height: 0.14em;
  content: "";
  border-radius: 999px;
  opacity: 0;
  background: #f1c95f;
  transform: scaleX(0.35);
  transition: opacity 180ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-nav-button:hover,
.home-nav-button:focus-visible {
  color: #2f5968;
  background: rgba(255, 246, 187, 0.58);
  box-shadow: 0 0.28rem 0.7rem rgba(68, 107, 112, 0.12);
  transform: translateY(-0.14em) rotate(-1deg);
}

.home-nav-button:hover::after,
.home-nav-button:focus-visible::after,
.home-nav-button[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.home-nav-button:focus-visible {
  box-shadow:
    0 0 0 0.16em rgba(255, 224, 105, 0.72),
    0 0.28rem 0.7rem rgba(68, 107, 112, 0.12);
}

.home-nav-button:active {
  transform: translateY(0.04em) scale(0.94);
  transition-duration: 80ms;
}

.home-nav-button.is-clicked {
  animation: home-nav-button-bounce 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes home-nav-button-bounce {
  35% { transform: translateY(-0.2em) scale(1.08) rotate(1deg); }
  70% { transform: translateY(0.02em) scale(0.98); }
}

.home-title {
  position: absolute;
  z-index: 15;
  inset: 0;
  margin: 0;
  color: #fff;
  font-family: "DynaPuff Local", "Comic Sans MS", "Segoe Print", cursive;
  font-weight: 400;
  pointer-events: none;
}

.home-title-line {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 12.222222%;
  font-size: max(3.25vw, 5.777778vh);
  line-height: 1.2;
  letter-spacing: 0.005em;
  white-space: nowrap;
  text-shadow:
    0 0.055em 0.08em rgba(44, 112, 160, 0.28),
    0 0.12em 0.28em rgba(50, 112, 159, 0.18);
  pointer-events: auto;
  user-select: none;
}

.home-title-line-name {
  top: 21.043081%;
  left: 31.987156%;
  width: 35%;
}

.home-title-line-welcome {
  top: 31.173420%;
  left: 24.144671%;
  width: 50.642092%;
  height: 10.219100%;
}

.home-title-char {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  min-width: 0.12em;
  padding-inline: 0;
  cursor: default;
  opacity: 1;
  transform: translateX(var(--neighbor-shift, 0em));
  transform-origin: 50% 78%;
  transition:
    color 220ms ease,
    text-shadow 240ms ease,
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.home-title-char.is-neighbor {
  transform: translateX(var(--neighbor-shift, 0em));
}

.home-title-char.is-space {
  width: 0.33em;
  min-width: 0.33em;
}

.home-title-char.is-active {
  z-index: 2;
  color: #fff6b5;
  text-shadow:
    0 0 0.08em rgba(255, 255, 255, 0.98),
    0 0 0.25em rgba(255, 229, 117, 0.98),
    0 0.16em 0.3em rgba(40, 106, 154, 0.25);
  transform: translateX(0) translateY(-0.16em) rotate(var(--title-tilt, -2deg)) scale(1.18);
}

.home-intro {
  position: absolute;
  z-index: 16;
  top: 39.4%;
  left: 21.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.52em;
  width: 57%;
  height: 13%;
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-family: "DynaPuff Local", "Comic Sans MS", "Segoe Print", cursive;
  font-size: max(1.12vw, 1.991vh);
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: 0.045em;
  text-align: center;
  text-shadow:
    0 0.055em 0.08em rgba(44, 112, 160, 0.28),
    0 0.12em 0.28em rgba(50, 112, 159, 0.18);
  pointer-events: none;
}

.home-intro span {
  display: block;
  white-space: nowrap;
}

.home-cloud-actions {
  position: absolute;
  z-index: 17;
  top: 50.8%;
  left: 27.75%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 44.5%;
  pointer-events: none;
}

.home-cloud-button {
  position: relative;
  display: grid;
  flex: 0 0 24.2%;
  aspect-ratio: 220 / 79;
  place-items: center;
  padding: 0;
  color: #45616a;
  border: 0;
  outline: none;
  background: url("./assets/home-cloud-button.png") center / 100% 100% no-repeat;
  clip-path: inset(17.72% 0 0 8.64% round 999px);
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 0.45rem 0.4rem rgba(49, 99, 123, 0.12));
  transform-origin: center;
  transition:
    color 180ms ease,
    filter 220ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-cloud-button span {
  position: absolute;
  z-index: 1;
  inset: 17.72% 0 0 8.64%;
  display: grid;
  place-items: center;
  padding-bottom: 0.08em;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: max(1.02vw, 1.813vh);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-cloud-button::after {
  position: absolute;
  top: 23%;
  right: 5%;
  bottom: 6%;
  left: 13%;
  content: "";
  border: 3px solid rgba(255, 230, 124, 0.88);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.82);
  pointer-events: none;
}

.home-cloud-button:hover,
.home-cloud-button:focus-visible {
  color: #2f5968;
  filter:
    drop-shadow(0 0.65rem 0.55rem rgba(49, 99, 123, 0.16))
    drop-shadow(0 0 0.55rem rgba(255, 231, 132, 0.38));
  transform: translateY(-0.32rem) scale(1.06) rotate(-1deg);
}

.home-cloud-button:hover span,
.home-cloud-button:focus-visible span {
  transform: translateY(-0.06em) scale(1.04);
}

.home-cloud-button:focus-visible::after {
  opacity: 1;
  transform: scale(1);
}

.home-cloud-button:active {
  transform: translateY(0.08rem) scale(0.97);
  transition-duration: 80ms;
}

.home-cloud-button.is-clicked::after {
  animation: home-cloud-button-ring 520ms ease-out both;
}

@keyframes home-cloud-button-ring {
  0% {
    opacity: 0.95;
    transform: scale(0.72);
  }
  100% {
    opacity: 0;
    transform: scale(1.25);
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.home-scene.is-visible.is-title-intro .home-title-char:not(.is-space) {
  animation: home-title-arrive 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(100ms + var(--char-index) * 24ms);
}

.home-scene.is-visible.is-title-intro .home-title-char.is-active {
  animation: none;
}

@keyframes home-title-arrive {
  0% {
    opacity: 0;
    transform: translateY(0.36em) scale(0.82);
  }
  70% {
    opacity: 1;
    transform: translateY(-0.045em) scale(1.025);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.home-dog-interaction {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 56.25%;
  border-radius: 45%;
  cursor: pointer;
  outline: none;
  pointer-events: auto;
  transform: translateY(-50%);
}

.home-dog-interaction .home-dog-sprite {
  position: absolute;
  inset: 0;
  transition: opacity 120ms ease;
}

.home-dog-happy {
  opacity: 0;
}

.home-dog-interaction:hover .home-dog-sitting,
.home-dog-interaction:focus .home-dog-sitting {
  opacity: 0;
}

.home-dog-interaction:hover .home-dog-happy,
.home-dog-interaction:focus .home-dog-happy {
  opacity: 1;
}

.home-dog-interaction:focus-visible {
  outline: 3px solid rgba(255, 244, 171, 0.9);
  outline-offset: -2.5rem;
}

.home-moving-cloud {
  animation-play-state: paused;
  will-change: transform;
}

.home-scene.is-visible .home-moving-cloud {
  animation-play-state: running;
}

.home-moving-cloud-a {
  animation: home-cloud-drift-a 9s ease-in-out infinite alternate;
}

.home-moving-cloud-b {
  animation: home-cloud-drift-b 7s ease-in-out infinite alternate;
}

@keyframes home-cloud-drift-a {
  from { transform: translate3d(-1.25vw, 0, 0); }
  to { transform: translate3d(2.5vw, 0.35rem, 0); }
}

@keyframes home-cloud-drift-b {
  from { transform: translate3d(-1.5vw, 0.25rem, 0); }
  to { transform: translate3d(3vw, -0.2rem, 0); }
}

.replay-button,
.depart-button {
  min-height: 2.9rem;
  padding: 0.75rem 1.4rem;
  color: #244b4e;
  border: 1px solid rgba(45, 92, 89, 0.22);
  border-radius: 999px;
  background: rgba(255, 252, 236, 0.82);
  box-shadow: 0 0.6rem 1.5rem rgba(43, 86, 84, 0.12);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.replay-button {
  position: absolute;
  z-index: 20;
  right: 1rem;
  bottom: 1rem;
  min-height: 2.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.78rem;
  opacity: 0.72;
}

.replay-button:hover,
.replay-button:focus-visible {
  background: #fffdf2;
  box-shadow: 0 0.75rem 1.75rem rgba(43, 86, 84, 0.18);
  outline: 3px solid rgba(255, 232, 135, 0.72);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.depart-button:hover,
.depart-button:active {
  background: #fffdf2;
  box-shadow: 0 0.75rem 1.75rem rgba(43, 86, 84, 0.18);
  outline: 3px solid rgba(255, 232, 135, 0.72);
  outline-offset: 3px;
  transform: translateY(-2px);
}

.depart-button:focus-visible {
  outline: 2px solid rgba(36, 75, 78, 0.72);
  outline-offset: 3px;
}

.loading-scene {
  z-index: 2;
  isolation: isolate;
  overflow: hidden;
  color: var(--ink);
  opacity: 1;
  background: url("./assets/loading-background.png") center / cover no-repeat;
  transform: scale(1);
  transform-origin: 50% 62%;
  transition:
    opacity 720ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 720ms step-end;
  will-change: opacity, transform;
}

.loading-scene.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loading-scene.is-entering {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.012);
}

.clouds,
.sunrise {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cloud {
  position: absolute;
  display: block;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0.65rem 0.7rem rgba(72, 105, 138, 0.05));
  will-change: transform, opacity;
}

.cloud-a {
  top: 3%;
  left: -8%;
  width: min(47vw, 52rem);
  animation: cloud-drift-a 4s ease-in-out infinite alternate;
}

.cloud-b {
  top: 10%;
  right: -4%;
  width: min(33vw, 36rem);
  animation: cloud-drift-b 5s ease-in-out infinite alternate;
}

.cloud-c {
  top: 37%;
  right: 8%;
  width: min(27vw, 29rem);
  opacity: 0.86;
  animation: cloud-drift-c 6s ease-in-out infinite alternate;
}

@keyframes cloud-drift-a {
  to { transform: translateX(2.8vw); }
}

@keyframes cloud-drift-b {
  to { transform: translateX(3.8vw); }
}

@keyframes cloud-drift-c {
  to { transform: translateX(2vw); }
}

.dog {
  position: absolute;
  z-index: 3;
  top: 82%;
  width: clamp(8.5rem, 14vw, 15.5rem);
  height: clamp(4.78125rem, 7.875vw, 8.71875rem);
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -72%);
  will-change: left, transform;
}

.dog img {
  display: block;
  width: 100%;
  height: 100%;
  animation: dog-bob 360ms ease-in-out infinite alternate;
  filter: drop-shadow(0 0.7rem 0.5rem rgba(38, 73, 59, 0.12));
  object-fit: contain;
  object-position: center bottom;
  transform-origin: 50% 85%;
}

@keyframes dog-bob {
  from { transform: translateY(0) rotate(-1deg); }
  to { transform: translateY(-0.42rem) rotate(1deg); }
}

.dog.is-looking img,
.dog.is-standing img {
  animation: none;
}

.dog.is-looking img {
  animation: tail-like-sway 1.5s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}

@keyframes tail-like-sway {
  from { transform: scale(1.2) rotate(-0.7deg); }
  to { transform: scale(1.2) rotate(0.8deg); }
}

.loading-copy {
  position: absolute;
  z-index: 5;
  top: 58%;
  left: 50%;
  display: grid;
  justify-items: center;
  width: min(90%, 34rem);
  transform: translate(-50%, -50%);
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.loading-message {
  margin: 0;
  font-family: Georgia, "STKaiti", serif;
  font-size: clamp(1.05rem, 2.15vw, 1.55rem);
  letter-spacing: 0.06em;
}

.loading-percent {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  opacity: 0.68;
}

.depart-button {
  margin-top: 0.9rem;
  font-family: Georgia, "STKaiti", serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  animation: depart-appear 420ms ease both;
}

@keyframes depart-appear {
  from { opacity: 0; transform: translateY(0.55rem); }
}

.sunrise {
  z-index: 4;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 78%, rgba(255, 248, 198, 0.8), transparent 35%),
    linear-gradient(rgba(255, 253, 226, 0.26), rgba(255, 238, 174, 0.12));
  mix-blend-mode: screen;
  transition: opacity 1050ms ease;
}

.loading-scene.is-entering .sunrise {
  opacity: 1;
}

.loading-scene.is-entering .cloud {
  opacity: 0.12;
  animation: none;
  transform: translateX(21vw);
  transition: transform 550ms ease-in, opacity 450ms ease;
}

.loading-scene.is-entering .loading-copy,
.loading-scene.is-entering .dog {
  opacity: 0;
  transform: translate(-50%, calc(-50% - 0.35rem));
  transition: opacity 360ms ease, transform 480ms ease;
}

.loading-scene.is-entering .dog {
  transform: translate(-50%, -76%);
}

@media (max-width: 700px) {
  .site-shell,
  .home-scene,
  .about-scene,
  .contact-scene,
  .loading-scene {
    min-height: 32rem;
  }

  .cloud-a {
    top: 7%;
    left: -22%;
    width: 78vw;
  }

  .cloud-b {
    top: 17%;
    right: -19%;
    width: 58vw;
  }

  .cloud-c {
    top: 35%;
    right: -4%;
    width: 42vw;
  }

  .dog {
    width: clamp(7.5rem, 30vw, 11.5rem);
    height: clamp(4.21875rem, 16.875vw, 6.46875rem);
  }

  .loading-copy {
    top: 56%;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 180ms !important;
  }

  .cloud-c {
    display: none;
  }

  .home-moving-cloud {
    animation: none;
  }

  .home-title-char,
  .works-title-char,
  .about-title-char,
  .contact-title-char,
  .home-scene.is-visible.is-title-intro .home-title-char:not(.is-space) {
    animation: none;
    transition: none;
  }

  .about-scene.is-visible.is-title-intro .about-title-char:not(.is-space) {
    animation: none;
    transition: none;
  }

  .works-scene.is-visible.is-title-intro .works-title-char:not(.is-space) {
    animation: none;
    transition: none;
  }

  .contact-scene.is-visible.is-title-intro .contact-title-char:not(.is-space) {
    animation: none;
    transition: none;
  }

  .home-title-char.is-active,
  .works-title-char.is-active,
  .about-title-char.is-active,
  .contact-title-char.is-active {
    transform: none;
  }

  .home-title-char.is-neighbor,
  .works-title-char.is-neighbor,
  .about-title-char.is-neighbor,
  .contact-title-char.is-neighbor,
  .home-nav-button:hover,
  .home-nav-button:focus-visible,
  .home-nav-button:active,
  .home-cloud-button:hover,
  .home-cloud-button:focus-visible,
  .home-cloud-button:active,
  .about-action:hover,
  .about-action:focus-visible,
  .about-action:active,
  .about-interest-button:hover,
  .about-interest-button:focus-visible,
  .about-interest-button:active,
  .contact-method-button:hover,
  .contact-method-button:focus-visible,
  .contact-method-button:active {
    transform: none;
  }

  .work-detail-dialog[open] {
    animation: none;
  }
}

/* Single-page scrolling prototype */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

html,
body {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body.is-loading {
  height: 100%;
  overflow: hidden;
}

.site-shell {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  min-height: 100%;
  overflow: visible;
}

.home-scene,
.works-scene,
.about-scene,
.contact-scene {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: 100svh;
  min-height: 40rem;
  overflow: hidden;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  scroll-margin-top: 0;
}

.home-scene,
.about-scene,
.contact-scene,
.home-scene.is-visible,
.about-scene.is-visible,
.contact-scene.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.home-stage,
.about-stage,
.contact-stage {
  position: absolute;
}

.home-stage > .home-nav-cloud,
.about-stage > .home-nav-cloud,
.contact-stage > .home-nav-cloud {
  display: none;
}

.chapter-nav {
  position: fixed;
  z-index: 80;
  top: max(0.7rem, env(safe-area-inset-top));
  left: 50%;
  width: clamp(24rem, 37vw, 39rem);
  height: clamp(4.2rem, 6vw, 6.3rem);
  color: #405c65;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0.7rem 1.1rem rgba(34, 79, 99, 0.12));
  transform: translate(-50%, -1rem);
  transition: opacity 420ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

body:not(.is-loading) .chapter-nav {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.chapter-nav > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.chapter-nav-links {
  position: absolute;
  inset: 0 12%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding-bottom: 0.1rem;
  font-size: clamp(0.82rem, 0.9vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.chapter-nav-link {
  position: relative;
  min-width: 3.8em;
  padding: 0.55em 0.38em;
  color: inherit;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, transform 240ms ease;
}

.chapter-nav-link::after {
  position: absolute;
  right: 22%;
  bottom: 0.2em;
  left: 22%;
  height: 0.15em;
  content: "";
  border-radius: 999px;
  opacity: 0;
  background: #eebd45;
  transform: scaleX(0.35);
  transition: opacity 180ms ease, transform 260ms ease;
}

.chapter-nav-link:hover,
.chapter-nav-link:focus-visible {
  color: #244f5e;
  outline: none;
  background: rgba(255, 246, 187, 0.6);
  transform: translateY(-0.12rem);
}

.chapter-nav-link:focus-visible {
  box-shadow: 0 0 0 0.18rem rgba(255, 224, 105, 0.72);
}

.chapter-nav-link[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.works-scene {
  z-index: 0;
  isolation: isolate;
  color: #315867;
  background: #8cccf0 url("./assets/works-noon-background.png") center / cover no-repeat;
}

.works-scene::before,
.works-scene::after {
  display: none;
}

.works-scene::after {
  display: none;
}

.works-cloud {
  position: absolute;
  z-index: 0;
  display: block;
  width: min(34rem, 34vw);
  height: auto;
  opacity: 0.82;
  pointer-events: none;
  user-select: none;
}

.works-cloud-right {
  top: 17%;
  right: -7%;
  width: min(25rem, 25vw);
}

.works-dog {
  position: absolute;
  z-index: 1;
  /* 作品集.json 的小狗素材含透明留白；这些坐标对应其实际可见像素。 */
  top: 49.42%;
  left: 1.995%;
  display: block;
  width: 16.6901%;
  height: auto;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

.works-content {
  position: relative;
  z-index: 2;
  width: min(76rem, calc(100% - 4rem));
  min-height: 100%;
  margin: 0 auto;
  padding-top: clamp(7rem, 13vh, 9rem);
  text-align: center;
}

.works-kicker {
  margin: 0 0 0.2rem;
  color: rgba(39, 88, 104, 0.76);
  font-family: "DynaPuff Local", cursive;
  font-size: clamp(0.85rem, 1vw, 1.05rem);
  letter-spacing: 0.22em;
}

.works-content h2 {
  margin: 0;
  color: #fffdf2;
  font-family: "ColaKind Local", "DynaPuff Local", cursive;
  font-size: clamp(3rem, 5.2vw, 5.6rem);
  font-weight: 400;
  line-height: 0.95;
  text-shadow: 0 0.12em 0 rgba(53, 104, 117, 0.12);
}

.works-title-char {
  position: relative;
  display: inline-block;
  min-width: 0.12em;
  cursor: default;
  opacity: 1;
  transform: translateX(var(--neighbor-shift, 0em));
  transform-origin: 50% 78%;
  transition:
    color 220ms ease,
    text-shadow 240ms ease,
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.works-title-char.is-neighbor {
  transform: translateX(var(--neighbor-shift, 0em));
}

.works-title-char.is-space {
  width: 0.33em;
  min-width: 0.33em;
}

.works-title-char.is-active {
  z-index: 2;
  color: #fff6b5;
  text-shadow:
    0 0 0.08em rgba(255, 255, 255, 0.98),
    0 0 0.25em rgba(255, 225, 94, 0.98),
    0 0.16em 0.3em rgba(41, 103, 131, 0.24);
  transform: translateX(0) translateY(-0.16em) rotate(var(--title-tilt, -2deg)) scale(1.18);
}

.works-scene.is-visible.is-title-intro .works-title-char:not(.is-space) {
  animation: home-title-arrive 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(90ms + var(--char-index) * 28ms);
}

.works-scene.is-visible.is-title-intro .works-title-char.is-active {
  animation: none;
}

.works-lead {
  max-width: 38rem;
  margin: 0.65rem auto 1.7rem;
  color: #2d5968;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", sans-serif;
  font-size: clamp(1rem, 1.25vw, 1.3rem);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.8rem);
  align-items: stretch;
}

.work-card {
  position: relative;
  min-height: clamp(15rem, 31vh, 20rem);
  padding: clamp(2.8rem, 4vw, 3.8rem) clamp(1.25rem, 2vw, 2rem) 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(72, 91, 75, 0.1);
  border-radius: 1.8rem 1.1rem 1.65rem 1.2rem;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.7), transparent 32%),
    #fff9e7;
  box-shadow: 0 1.25rem 2.5rem rgba(40, 78, 79, 0.15);
  text-align: left;
  transform: rotate(-1.1deg);
}

.work-card-open {
  display: block;
  width: 100%;
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.work-card-open:focus-visible {
  outline: 0.2rem solid rgba(255, 205, 85, 0.92);
  outline-offset: 0.35rem;
  border-radius: 1rem;
}

.work-card:hover,
.work-card:focus-within {
  border-color: rgba(79, 129, 103, 0.3);
  box-shadow: 0 1.5rem 3rem rgba(36, 75, 77, 0.22);
}

.work-card:nth-child(2) {
  transform: translateY(1.2rem) rotate(0.7deg);
}

.work-card:nth-child(3) {
  transform: rotate(1.2deg);
}

.work-card::before {
  position: absolute;
  top: -0.35rem;
  left: 50%;
  width: 5.4rem;
  height: 1.55rem;
  content: "";
  opacity: 0.72;
  background: rgba(239, 206, 112, 0.72);
  box-shadow: 0 0.15rem 0.3rem rgba(76, 68, 43, 0.1);
  transform: translateX(-50%) rotate(-2deg);
}

.work-card-index {
  position: absolute;
  top: 1.2rem;
  left: 1.35rem;
  color: #de8f66;
  font-family: "DynaPuff Local", cursive;
  font-size: 1.45rem;
}

.work-card-status {
  position: absolute;
  top: 1.25rem;
  right: 1.2rem;
  padding: 0.32rem 0.72rem;
  color: #6c7563;
  border-radius: 999px;
  background: #f4e9b8;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.work-card-type {
  display: block;
  margin: 0 0 0.7rem;
  color: #6f927e;
  font-family: "DynaPuff Local", cursive;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.work-card-title {
  display: block;
  margin: 0 0 0.8rem;
  color: #315867;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", sans-serif;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 700;
}

.work-card-title small {
  color: #6c8584;
  font-size: 0.72em;
  font-weight: 400;
}

.work-card-description {
  display: block;
  margin: 0;
  color: #62777a;
  font-size: clamp(0.9rem, 1vw, 1.02rem);
  line-height: 1.75;
}

.work-card-visual {
  position: relative;
  display: block;
  height: clamp(8rem, 13vh, 10.5rem);
  margin: -1rem 0 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(66, 103, 103, 0.12);
  border-radius: 1.1rem;
}

.work-card-visual-xiaohongshu {
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.72) 0 0.18rem, transparent 0.24rem),
    radial-gradient(circle at 11% 82%, rgba(250, 207, 112, 0.42) 0 0.22rem, transparent 0.29rem),
    linear-gradient(140deg, #f8dfe0, #f8eac6 56%, #dcebc9);
}

.work-card-visual-workbench {
  background:
    radial-gradient(circle at 78% 26%, rgba(255, 243, 163, 0.86) 0 0.2rem, transparent 0.26rem),
    radial-gradient(circle at 20% 78%, rgba(255, 220, 156, 0.68) 0 0.16rem, transparent 0.22rem),
    linear-gradient(140deg, #e5e1fb, #d8eef1 56%, #f9e9c5);
}

.work-visual-caption {
  position: absolute;
  top: 0.75rem;
  left: 0.85rem;
  color: rgba(48, 94, 86, 0.68);
  font-family: "DynaPuff Local", cursive;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

.social-note {
  position: absolute;
  top: 2rem;
  left: 9%;
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 0.55rem;
  width: 48%;
  height: 5.35rem;
  padding: 0.55rem;
  border: 1px solid rgba(117, 89, 85, 0.14);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0.7rem 1rem rgba(122, 84, 77, 0.13);
  transform: rotate(-3deg);
}

.social-note::before {
  position: absolute;
  top: -0.4rem;
  left: 36%;
  width: 2.2rem;
  height: 0.75rem;
  content: "";
  background: rgba(255, 232, 166, 0.72);
  transform: rotate(2deg);
}

.social-note-image {
  position: relative;
  overflow: hidden;
  border-radius: 0.55rem;
  background: linear-gradient(155deg, #f6d5c8, #fff0cc);
}

.cake-layer {
  position: absolute;
  right: 16%;
  left: 16%;
  height: 0.55rem;
  border-radius: 0.5rem 0.5rem 0.28rem 0.28rem;
  box-shadow: inset 0 -0.12rem 0 rgba(135, 76, 68, 0.08);
}

.cake-layer-top {
  top: 29%;
  background: #fff6d7;
}

.cake-layer-middle {
  top: 43%;
  background: #e9a092;
}

.cake-layer-bottom {
  top: 57%;
  background: #fff6d7;
}

.cake-berry {
  position: absolute;
  top: 19%;
  left: 44%;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: #d8686b;
  box-shadow: 0.3rem -0.08rem 0 -0.12rem #7fa663;
}

.social-note-copy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.8rem;
}

.social-note-copy i {
  display: block;
  height: 0.35rem;
  border-radius: 999px;
  background: #efd9ce;
}

.social-note-copy i:first-child {
  width: 84%;
  height: 0.52rem;
  background: #cc8581;
}

.social-note-copy i:nth-child(2) { width: 100%; }
.social-note-copy i:nth-child(3) { width: 68%; }

.social-metrics {
  position: absolute;
  top: 2.15rem;
  right: 5.5%;
  display: grid;
  gap: 0.38rem;
  width: 34%;
}

.social-metrics > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.3rem 0.5rem;
  border: 1px solid rgba(94, 124, 88, 0.14);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.72);
  color: #59745d;
  box-shadow: 0 0.25rem 0.55rem rgba(105, 110, 83, 0.08);
}

.social-metrics b {
  font-family: "DynaPuff Local", cursive;
  font-size: 0.75rem;
  font-weight: 400;
}

.social-metrics small {
  font-size: 0.6rem;
}

.workbench-window {
  position: absolute;
  top: 2.15rem;
  left: 10%;
  width: 46%;
  height: 5.2rem;
  padding: 0.45rem;
  border: 1px solid rgba(92, 82, 151, 0.2);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0.7rem 1.1rem rgba(81, 83, 126, 0.12);
  transform: rotate(-3deg);
}

.workbench-window-top {
  display: flex;
  gap: 0.22rem;
  padding-bottom: 0.35rem;
}

.workbench-window-top i {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: #d8b3b8;
}

.workbench-window-top i:nth-child(2) { background: #e6c57e; }
.workbench-window-top i:nth-child(3) { background: #9bcdb3; }

.workbench-window-body {
  display: grid;
  grid-template-columns: 20% 1fr;
  gap: 0.45rem;
  height: 3.75rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(83, 88, 128, 0.12);
}

.workbench-sidebar-line {
  width: 70%;
  height: 100%;
  border-radius: 0.25rem;
  background: repeating-linear-gradient(180deg, #d7d2f2 0 0.28rem, transparent 0.28rem 0.65rem);
}

.workbench-kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.27rem;
}

.workbench-kanban span {
  display: block;
  border-radius: 0.25rem;
  background: linear-gradient(180deg, #f0edff 0 0.38rem, #fff 0.38rem 100%);
}

.workbench-kanban span:nth-child(2) { background: linear-gradient(180deg, #fff0e2 0 0.38rem, #fff 0.38rem 100%); }
.workbench-kanban span:nth-child(3) { background: linear-gradient(180deg, #e4f7ee 0 0.38rem, #fff 0.38rem 100%); }

.workbench-progress {
  position: absolute;
  right: 0.65rem;
  bottom: 0.58rem;
  left: 2.55rem;
  height: 0.22rem;
  border-radius: 1rem;
  background: linear-gradient(90deg, #8a78e9 0 68%, #eceaf5 68% 100%);
}

.workbench-flow {
  position: absolute;
  right: 8%;
  bottom: 1.25rem;
  display: flex;
  gap: 0.32rem;
  align-items: center;
  color: #655ca3;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  transform: rotate(3deg);
}

.workbench-flow span {
  padding: 0.22rem 0.42rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.68);
}

.workbench-flow b {
  color: #d18a6b;
  font-family: "DynaPuff Local", cursive;
  font-size: 0.72rem;
}

.work-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 1.05rem;
}

.work-card-tags span {
  padding: 0.3rem 0.55rem;
  color: #6a7d7d;
  border: 1px solid rgba(74, 116, 111, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  font-family: "DynaPuff Local", cursive;
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

.work-card-foot {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1.4rem !important;
  color: #3d786e !important;
  font-family: "DynaPuff Local", cursive;
  font-size: 0.68rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.work-card-foot span {
  color: #df9a63;
  font-size: 1rem;
}

.work-card-status-green {
  background: #dff1d9;
}

.work-detail-dialog {
  width: min(72rem, calc(100vw - 4rem));
  max-height: calc(100vh - 4rem);
  padding: clamp(2rem, 4vw, 4rem);
  overflow-y: auto;
  color: #315867;
  border: 1px solid rgba(63, 103, 87, 0.18);
  border-radius: 2rem 1.35rem 2.2rem 1.5rem;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.78), transparent 35%),
    #fff9e9;
  box-shadow: 0 2rem 5rem rgba(35, 68, 70, 0.3);
}

.work-detail-dialog::backdrop {
  background: rgba(37, 77, 91, 0.42);
  backdrop-filter: blur(0.45rem);
}

.work-detail-dialog[open] {
  animation: work-detail-enter 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.work-detail-close {
  position: sticky;
  z-index: 4;
  top: 0;
  float: right;
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  padding: 0;
  color: #315867;
  border: 1px solid rgba(58, 98, 91, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0.5rem 1rem rgba(48, 79, 75, 0.1);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.work-detail-close:hover,
.work-detail-close:focus-visible {
  outline: 0.18rem solid rgba(255, 204, 86, 0.78);
  outline-offset: 0.18rem;
  background: #fffef8;
}

.work-detail-panel[hidden] {
  display: none;
}

.work-detail-eyebrow {
  margin: 0 4rem 0.5rem 0;
  color: #6b8e7b;
  font-family: "DynaPuff Local", cursive;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

.work-detail-panel h2 {
  margin: 0;
  color: #315867;
  font-family: "ColaKind Local", "DynaPuff Local", cursive;
  font-size: clamp(3.2rem, 6vw, 6rem);
  font-weight: 400;
  line-height: 0.95;
}

.work-detail-subtitle {
  margin: 0.45rem 0 1.2rem;
  color: #d88761;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", sans-serif;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
}

.work-detail-intro {
  max-width: 55rem;
  margin: 0 0 2rem;
  color: #556e72;
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  line-height: 1.9;
}

.work-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.work-detail-grid section {
  padding: 1.3rem 1.4rem 1.45rem;
  border: 1px solid rgba(65, 103, 91, 0.12);
  border-radius: 1.25rem 0.9rem 1.3rem 0.95rem;
  background: rgba(255, 255, 255, 0.54);
}

.work-detail-grid section > span {
  color: #7a9a87;
  font-family: "DynaPuff Local", cursive;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.work-detail-grid h3 {
  margin: 0.45rem 0 0.55rem;
  color: #315867;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", sans-serif;
  font-size: 1.25rem;
}

.work-detail-grid p {
  margin: 0;
  color: #61767a;
  line-height: 1.75;
}

.work-evidence {
  margin-top: clamp(2.2rem, 4vw, 3.4rem);
  padding-top: clamp(1.8rem, 3vw, 2.7rem);
  border-top: 1px dashed rgba(78, 119, 103, 0.24);
}

.work-evidence-heading {
  max-width: 48rem;
  margin-bottom: 1.35rem;
}

.work-evidence-heading p {
  margin: 0 0 0.45rem;
  color: #7a9a87;
  font-family: "DynaPuff Local", cursive;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.work-evidence-heading h3 {
  margin: 0 0 0.45rem;
  color: #315867;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", sans-serif;
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
}

.work-evidence-heading > span {
  color: #61767a;
  line-height: 1.7;
}

.work-evidence-pair,
.work-evidence-platform {
  display: grid;
  gap: 1rem;
}

.work-evidence-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-evidence-platform {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  margin-top: 1rem;
}

.work-evidence-note {
  grid-column: 1 / -1;
}

.work-evidence-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(78, 111, 101, 0.14);
  border-radius: 1.15rem 0.85rem 1.25rem 0.9rem;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 0.8rem 1.8rem rgba(61, 91, 82, 0.08);
}

.work-evidence-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #f1eadb;
}

.work-image-preview-trigger {
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: zoom-in;
}

.work-image-preview-trigger:focus-visible {
  outline: 0.2rem solid rgba(113, 86, 238, 0.58);
  outline-offset: -0.2rem;
}

.work-evidence-photo .work-evidence-media {
  aspect-ratio: 16 / 9;
}

.work-evidence-note .work-evidence-media {
  aspect-ratio: 29 / 8;
}

.work-evidence-metrics .work-evidence-media {
  aspect-ratio: 289 / 86;
}

.work-evidence-diagnosis .work-evidence-media {
  aspect-ratio: 1164 / 553;
}

.work-evidence-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-evidence-photo .work-evidence-media > span {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.3rem 0.55rem;
  color: #315867;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 249, 229, 0.86);
  box-shadow: 0 0.3rem 0.8rem rgba(38, 62, 60, 0.12);
  font-family: "DynaPuff Local", cursive;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  backdrop-filter: blur(0.3rem);
}

.work-evidence-card figcaption {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem 1rem;
}

.work-evidence-card figcaption b {
  color: #315867;
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", sans-serif;
  font-size: 1.05rem;
}

.work-evidence-card figcaption small {
  color: #667b7d;
  font-size: 0.86rem;
  line-height: 1.6;
}

.work-evidence-note-text {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  color: #6b7d79;
  border-left: 0.22rem solid rgba(216, 135, 97, 0.52);
  border-radius: 0 0.75rem 0.75rem 0;
  background: rgba(255, 244, 216, 0.58);
  font-size: 0.88rem;
  line-height: 1.7;
}

.workbench-evidence {
  border-top-color: rgba(113, 86, 238, 0.22);
}

.workbench-evidence-overview {
  margin-bottom: 1rem;
}

.workbench-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.workbench-evidence-card {
  background: rgba(252, 251, 255, 0.82);
}

.workbench-evidence-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: inherit;
  border: 0;
  background: #f5f4fa;
  text-decoration: none;
}

.workbench-evidence-overview .workbench-evidence-media {
  aspect-ratio: 2960 / 1658;
}

.workbench-evidence-jobs .workbench-evidence-media {
  aspect-ratio: 2400 / 1578;
}

.workbench-evidence-applications .workbench-evidence-media {
  aspect-ratio: 2340 / 1608;
}

.workbench-evidence-resumes .workbench-evidence-media {
  aspect-ratio: 2378 / 1064;
}

.workbench-evidence-calendar .workbench-evidence-media {
  aspect-ratio: 1914 / 1426;
}

.workbench-evidence-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 260ms ease;
}

.workbench-evidence-media > span {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  padding: 0.32rem 0.58rem;
  color: #4f438c;
  border: 1px solid rgba(113, 86, 238, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0.3rem 0.9rem rgba(66, 53, 123, 0.12);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  backdrop-filter: blur(0.3rem);
}

.workbench-evidence-media:hover img,
.workbench-evidence-media:focus-visible img {
  transform: scale(1.012);
}

.workbench-evidence-media:focus-visible {
  outline: 0.2rem solid rgba(113, 86, 238, 0.58);
  outline-offset: -0.2rem;
}

.work-image-lightbox {
  width: min(94vw, 96rem);
  max-width: none;
  height: min(92vh, 64rem);
  max-height: none;
  padding: 1rem;
  overflow: visible;
  border: 0;
  background: transparent;
}

.work-image-lightbox::backdrop {
  background: rgba(17, 28, 38, 0.82);
  backdrop-filter: blur(0.45rem);
}

.work-image-lightbox[open] {
  display: grid;
  place-items: center;
  animation: work-image-lightbox-enter 220ms ease both;
}

.work-image-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.8rem;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.42);
}

.work-image-lightbox-close {
  position: absolute;
  z-index: 2;
  top: 0.35rem;
  right: 0.35rem;
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  padding: 0;
  color: #314f58;
  border: 0.12rem solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 252, 237, 0.96);
  box-shadow: 0 0.6rem 1.5rem rgba(0, 0, 0, 0.24);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.work-image-lightbox-close:hover,
.work-image-lightbox-close:focus-visible {
  color: #9c573e;
  outline: 0.2rem solid rgba(255, 209, 91, 0.9);
  outline-offset: 0.15rem;
}

@keyframes work-image-lightbox-enter {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
}

.workbench-evidence-note {
  border-left-color: rgba(113, 86, 238, 0.48);
  background: rgba(239, 235, 255, 0.62);
}

@keyframes work-detail-enter {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.works-note {
  margin: clamp(1.3rem, 3vh, 2.25rem) 0 0;
  color: rgba(44, 89, 99, 0.82);
  font-family: "Lemi Xiaoyu Local", "Microsoft YaHei", sans-serif;
  font-size: clamp(0.9rem, 1.05vw, 1.05rem);
}

.works-note span {
  margin-right: 0.35rem;
  color: #efbd4a;
}

.works-next-link {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  margin-top: clamp(2rem, 4vh, 3rem);
  padding: 0.75rem 1.15rem;
  color: #fffcef;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(48, 100, 92, 0.28);
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(0.35rem);
}

.works-next-link:hover,
.works-next-link:focus-visible {
  outline: 0.18rem solid rgba(255, 232, 135, 0.72);
  outline-offset: 0.18rem;
  background: rgba(48, 100, 92, 0.42);
}

/* Desktop composition follows the approved 1600×900 works layout. The card
   contents remain the existing webpage UI; only their stage positions and
   bounding boxes come from 作品集.json. */
.works-grid {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.works-grid .work-card {
  position: absolute;
  min-height: 0;
  height: max-content;
  margin: 0;
  overflow: hidden;
  pointer-events: auto;
  transform-origin: top left;
}

.works-grid .work-card:nth-child(1) {
  /* 作品集_素材1 的不透明区域约为 802×689；按可见画面等比落位。 */
  top: 37.380%;
  left: 21.540%;
  width: 36.9123%;
  height: max-content;
  transform: scale(0.77) rotate(-1.1deg);
}

.works-grid .work-card:nth-child(2) {
  /* 作品集_素材2 的不透明区域约为 801×684；同样只取实际画面。 */
  top: 37.163%;
  left: 56.717%;
  width: 36.7118%;
  height: max-content;
  transform: scale(0.77) rotate(0.7deg);
}

.works-note {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 5.5%;
  left: 0;
  margin: 0;
}

.home-scene::after,
.works-scene > .works-content::after,
.about-scene::after {
  position: absolute;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(2.5rem, 8vh, 6rem);
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(119, 183, 222, 0.22));
}

.about-scene::after {
  background: linear-gradient(180deg, transparent, rgba(60, 91, 157, 0.24));
}

.loading-scene {
  position: fixed;
  z-index: 100;
}

.scene-bridge {
  position: relative;
  z-index: 4;
  width: 100%;
  height: clamp(9rem, 19vh, 14rem);
  min-height: 9rem;
  margin-block: clamp(-3.6rem, -5vh, -2.4rem);
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    #000 24%,
    #000 70%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    transparent 0%,
    #000 24%,
    #000 70%,
    transparent 100%
  );
}

.home-about-bridge {
  background:
    linear-gradient(
      180deg,
      #76a65d 0%,
      #98b567 26%,
      #d9bc73 57%,
      #efa968 100%
    );
}

.about-contact-bridge {
  background:
    radial-gradient(circle at 12% 68%, rgba(255, 232, 140, 0.9) 0 0.12rem, transparent 0.18rem),
    radial-gradient(circle at 31% 78%, rgba(255, 240, 171, 0.8) 0 0.1rem, transparent 0.16rem),
    radial-gradient(circle at 58% 62%, rgba(255, 234, 139, 0.9) 0 0.13rem, transparent 0.19rem),
    radial-gradient(circle at 81% 83%, rgba(255, 238, 158, 0.85) 0 0.11rem, transparent 0.17rem),
    linear-gradient(
      180deg,
      #91aa62 0%,
      #d49368 31%,
      #776da2 67%,
      #1b72df 100%
    );
}

.home-about-bridge::after,
.about-contact-bridge::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  opacity: 0.72;
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100% auto;
  -webkit-mask-image: linear-gradient(180deg, transparent 8%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 8%, #000 100%);
}

.home-about-bridge::after {
  background-image: url("./assets/about-sky.png");
}

.about-contact-bridge::after {
  background-image: url("./assets/contact-background.svg");
}

.bridge-cloud {
  position: absolute;
  z-index: 2;
  display: block;
  width: clamp(12rem, 24vw, 28rem);
  height: auto;
  opacity: 0.38;
  user-select: none;
}

.bridge-cloud-left {
  top: 1%;
  left: -6%;
  transform: translateY(-22%);
}

.bridge-cloud-right {
  right: -4%;
  bottom: -25%;
  width: clamp(10rem, 19vw, 22rem);
  opacity: 0.3;
}

.bridge-hill {
  position: absolute;
  display: block;
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
}

.bridge-hill-back {
  z-index: 1;
  right: -12%;
  bottom: -64%;
  left: -10%;
  height: 92%;
  opacity: 0.58;
  background: #6e9f5d;
  transform: rotate(-2deg);
}

.bridge-hill-front {
  z-index: 3;
  right: 36%;
  bottom: -80%;
  left: -18%;
  height: 108%;
  opacity: 0.72;
  background: #4f8d5b;
  transform: rotate(3deg);
}

.about-contact-bridge .bridge-hill-back {
  opacity: 0.36;
  background: #547c68;
}

.about-contact-bridge .bridge-hill-front {
  right: -12%;
  left: 30%;
  opacity: 0.3;
  background: #355e6f;
  transform: rotate(-3deg);
}

.bridge-stars {
  position: absolute;
  z-index: 4;
  inset: 45% 0 0;
  opacity: 0.72;
  background:
    radial-gradient(circle at 7% 74%, #ffe776 0 0.12rem, transparent 0.19rem),
    radial-gradient(circle at 23% 36%, #fff0a0 0 0.09rem, transparent 0.16rem),
    radial-gradient(circle at 48% 70%, #ffe875 0 0.11rem, transparent 0.18rem),
    radial-gradient(circle at 72% 32%, #ffec8b 0 0.13rem, transparent 0.2rem),
    radial-gradient(circle at 91% 66%, #fff2a7 0 0.09rem, transparent 0.16rem);
}

@media (max-width: 800px) {
  .chapter-nav {
    top: 0.35rem;
    width: min(96vw, 31rem);
    height: 4.8rem;
  }

  .chapter-nav-links {
    inset: 0 10%;
    gap: 0.1rem;
    font-size: clamp(0.68rem, 3vw, 0.82rem);
    letter-spacing: 0;
  }

  .chapter-nav-link {
    min-width: auto;
    padding-inline: 0.28rem;
  }

  .works-scene {
    height: auto;
    min-height: 100svh;
  }

  .works-content {
    width: min(100% - 2rem, 34rem);
    padding: 6.4rem 0 8rem;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .work-card,
  .work-card:nth-child(2),
  .work-card:nth-child(3) {
    min-height: 13rem;
    transform: none;
  }

  .works-cloud {
    width: 55vw;
    opacity: 0.58;
  }

  .scene-bridge {
    height: 8rem;
    min-height: 8rem;
    margin-block: -2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Progressive scene reveal: later scenes overlap and fade in through a top mask. */
.home-scene {
  z-index: 1;
}

.about-scene,
.contact-scene {
  margin-top: -14vh;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 100%);
}

.about-scene {
  z-index: 2;
}

.contact-scene {
  z-index: 3;
}

@media (max-width: 800px) {
  .about-scene,
  .contact-scene {
    margin-top: -10vh;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 100%);
  }
}

/* Jump-view mode: exactly one fixed scene is visible at a time. */
html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  scroll-behavior: auto;
}

.site-shell,
.home-scene,
.about-scene,
.contact-scene,
.loading-scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 34rem;
  margin: 0;
  -webkit-mask-image: none;
  mask-image: none;
}

.site-shell {
  overflow: hidden;
}

.home-scene {
  z-index: 0;
  visibility: visible;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.025);
  transition: opacity 900ms ease, transform 1200ms ease;
}

.home-scene.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.works-scene {
  z-index: 1;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.018);
  transition:
    opacity 650ms ease,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 650ms step-end;
}

.works-scene.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  transition:
    opacity 650ms ease,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0ms step-start;
}

.about-scene,
.contact-scene {
  z-index: 1;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.018);
  transition:
    opacity 650ms ease,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 650ms step-end;
}

.about-scene.is-visible,
.contact-scene.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  transition:
    opacity 650ms ease,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0ms step-start;
}

.works-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 800px) {
  .works-grid {
    position: relative;
    inset: auto;
    display: grid;
    width: auto;
    height: auto;
    pointer-events: auto;
  }

  .works-content {
    min-height: 0;
    width: min(100% - 2rem, 34rem);
    padding-top: 6.4rem;
    padding-bottom: 4rem;
  }

  .works-note {
    position: static;
    margin: clamp(1.3rem, 3vh, 2.25rem) 0 0;
  }

  .works-scene {
    overflow-y: auto;
  }

  .work-detail-dialog {
    width: calc(100vw - 1.5rem);
    max-height: calc(100vh - 1.5rem);
    padding: 1.4rem;
    border-radius: 1.35rem;
  }

  .work-detail-grid {
    grid-template-columns: 1fr;
  }

  .work-evidence-pair,
  .work-evidence-platform {
    grid-template-columns: 1fr;
  }

  .work-evidence-note {
    grid-column: auto;
  }

  .work-evidence-note .work-evidence-media,
  .work-evidence-metrics .work-evidence-media,
  .work-evidence-diagnosis .work-evidence-media {
    aspect-ratio: auto;
  }

  .work-evidence-note .work-evidence-media img,
  .work-evidence-metrics .work-evidence-media img,
  .work-evidence-diagnosis .work-evidence-media img {
    height: auto;
  }

  .workbench-evidence-grid {
    grid-template-columns: 1fr;
  }

  .workbench-evidence-card .workbench-evidence-media {
    aspect-ratio: auto;
  }

  .workbench-evidence-card .workbench-evidence-media img {
    height: auto;
  }

  .works-dog {
    top: 42%;
    left: -4%;
    width: 30vw;
    height: auto;
    max-width: 11rem;
  }

  .works-grid .work-card,
  .works-grid .work-card:nth-child(1),
  .works-grid .work-card:nth-child(2) {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    min-height: 13rem;
    margin: 0;
    transform: none;
  }
}

.loading-scene {
  z-index: 100;
}

@media (max-width: 700px) {
  .site-shell,
  .home-scene,
  .works-scene,
  .about-scene,
  .contact-scene,
  .loading-scene {
    min-height: 32rem;
  }
}

/* Global background-music control */
.music-disc-control {
  position: fixed;
  z-index: 120;
  top: max(0.9rem, env(safe-area-inset-top));
  right: clamp(0.9rem, 2vw, 2rem);
  display: grid;
  width: clamp(3.2rem, 4.5vw, 4rem);
  aspect-ratio: 1;
  padding: 0.34rem;
  border: 0.12rem solid rgba(255, 250, 221, 0.92);
  border-radius: 50%;
  color: #315d6c;
  background: rgba(255, 248, 217, 0.78);
  box-shadow:
    0 0.45rem 1.2rem rgba(42, 81, 105, 0.18),
    inset 0 0 0 0.12rem rgba(71, 115, 129, 0.12);
  cursor: pointer;
  -webkit-backdrop-filter: blur(0.35rem);
  backdrop-filter: blur(0.35rem);
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms ease,
    background 220ms ease;
}

.music-disc-control:hover,
.music-disc-control:focus-visible {
  background: rgba(255, 252, 232, 0.96);
  box-shadow:
    0 0.7rem 1.45rem rgba(42, 81, 105, 0.23),
    0 0 0 0.2rem rgba(255, 226, 112, 0.58);
  outline: none;
  transform: translateY(-0.12rem) scale(1.05);
}

.music-disc-control:active {
  transform: translateY(0.04rem) scale(0.96);
  transition-duration: 80ms;
}

.music-disc {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0.08rem solid rgba(37, 78, 92, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.78) 0 2%, transparent 3%),
    repeating-radial-gradient(circle at center, rgba(30, 78, 96, 0.1) 0 0.05rem, transparent 0.07rem 0.18rem),
    conic-gradient(from 18deg, #f5c96c, #8ec7c1 22%, #7da4ce 42%, #f0a889 63%, #f7d77a 81%, #f5c96c);
  box-shadow: inset 0 0 0 0.13rem rgba(255, 250, 224, 0.34);
}

.music-disc::before {
  position: absolute;
  inset: 19%;
  content: "";
  border: 0.07rem solid rgba(255, 249, 218, 0.7);
  border-radius: 50%;
  box-shadow:
    0 0 0 0.12rem rgba(35, 79, 93, 0.16),
    0 0 0 0.24rem rgba(255, 249, 218, 0.22);
}

.music-disc-hole {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 21%;
  aspect-ratio: 1;
  border: 0.08rem solid rgba(45, 79, 91, 0.45);
  border-radius: 50%;
  background: #fff6d5;
  box-shadow: 0 0 0 0.08rem rgba(255, 255, 255, 0.62);
  transform: translate(-50%, -50%);
}

.music-disc-control.is-playing .music-disc {
  animation: music-disc-spin 4.8s linear infinite;
}

@keyframes music-disc-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 800px) {
  .chapter-nav {
    width: min(80vw, 31rem);
  }

  .music-disc-control {
    top: max(0.65rem, env(safe-area-inset-top));
    right: max(0.65rem, env(safe-area-inset-right));
    width: 3.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-scene,
  .loading-scene.is-entering,
  .loading-scene.is-entering .loading-copy,
  .loading-scene.is-entering .dog {
    transition-duration: 80ms;
  }

  .music-disc-control.is-playing .music-disc {
    animation: none;
  }
}
