:root {
  --hutao-brush: var(--font-brush);
  --hutao-serif: var(--font-body);
  --hutao-body: var(--font-body);
  --hutao-ink: #1b1b1b;
  --hutao-muted: #5f5a50;
  --hutao-paper: rgba(250, 246, 235, 0.9);
  --hutao-paper-solid: #f7f0e3;
  --hutao-line: rgba(49, 42, 30, 0.16);
  --hutao-gold-line: rgba(172, 130, 57, 0.28);
  --hutao-shadow: 0 18px 52px rgba(31, 28, 21, 0.14);
  --hutao-shadow-hover: 0 28px 76px rgba(31, 28, 21, 0.2);
  --hutao-seal: #8e2c28;
  --hutao-jade: #1f302d;
  --hutao-bg-x: 0px;
  --hutao-bg-y: 0px;
  --hutao-fog-x: 0px;
  --hutao-fog-y: 0px;
  --glass-blur: 6px;
  --glass-opacity: 0.56;
  --section-progress: 0;
}

body {
  font-family: var(--hutao-body);
  color: var(--hutao-ink);
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

html body,
html.cursor-ready body {
  background-color: #f5edde;
  background-image:
    linear-gradient(180deg, rgba(252, 247, 236, 0.96), rgba(241, 232, 214, 0.94)),
    url("./assets/hutao-ink/PaperTexture.webp") !important;
  background-position: center, center;
  background-size: auto, 760px auto;
  background-repeat: no-repeat, repeat;
}

.site-header {
  background: rgba(248, 242, 229, 0.76) !important;
  border: 1px solid rgba(84, 66, 42, 0.1);
  box-shadow: 0 10px 36px rgba(37, 31, 23, 0.08);
  backdrop-filter: blur(6px) saturate(1.02) !important;
}

.site-header.scrolled,
body.is-scrolled .site-header {
  background:
    linear-gradient(90deg, rgba(250, 246, 236, 0.92), rgba(244, 235, 218, 0.86)),
    url("./assets/hutao-ink/PaperTexture.webp") center / 520px auto repeat !important;
  box-shadow: 0 16px 46px rgba(37, 31, 23, 0.12);
}

.brand-name,
.site-nav a,
.section-heading h2,
.achievement-copy h2,
.kurumi-portal h2,
.about-copy h2,
.message-inner h2,
.page-title h1,
.article-detail-title {
  font-family: var(--hutao-serif);
  letter-spacing: 0;
}

.site-nav a {
  color: rgba(33, 30, 25, 0.84) !important;
  text-shadow: none !important;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--hutao-seal) !important;
}

.site-nav a {
  min-height: 44px;
}

@media (min-width: 901px) {
  .site-header {
    min-height: 72px;
    padding: 10px clamp(28px, 4vw, 72px) !important;
  }

  .brand-icon {
    width: 44px;
    height: 44px;
  }

  .brand-name {
    font-size: 22px;
  }

  .site-nav {
    gap: clamp(18px, 2.2vw, 38px);
  }

  .site-nav a {
    padding: 8px 1px;
    font-size: 13px;
    letter-spacing: 0.14em;
    white-space: nowrap;
  }

  .site-search-trigger {
    backdrop-filter: blur(6px);
  }
}

@media (min-width: 901px) and (max-width: 1450px) {
  .site-header {
    padding-inline: 24px !important;
  }

  .site-nav {
    gap: 18px;
  }

  .site-nav a {
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  .brand-name {
    font-size: 20px;
  }
}

.site-search-trigger,
.pet-entry-skip,
.wind-toggle,
#tagFilters button,
.text-control,
.visit-control,
.mini-toggle,
.action-grid button,
.daily-gift,
.seal-button,
.ink-button,
.text-button {
  min-height: 44px;
}

.text-control {
  padding-inline: 10px;
}

.hero.phase2-gif-hero {
  background: #201a16;
  overflow: hidden;
}

.hero.phase1-ink-home::before,
.hero.phase1-ink-home::after {
  background-image: none !important;
}

.hero.phase2-gif-hero .phase2-depth__layer--far {
  filter: saturate(0.72) contrast(0.96) brightness(0.86);
  opacity: 0.92;
  transform: translate3d(var(--hutao-bg-x), var(--hutao-bg-y), 0) scale(1.04);
}

.hero.phase2-gif-hero .hero-art {
  opacity: 0.6 !important;
  filter: saturate(0.76) contrast(0.98) brightness(0.9) drop-shadow(0 30px 80px rgba(0, 0, 0, 0.24));
  transform: translate3d(var(--hutao-bg-x), var(--hutao-bg-y), 0) scale(1.035) !important;
  transition: transform 0.28s ease-out;
  mix-blend-mode: normal;
}

.hero.phase2-gif-hero .phase2-depth__layer--mid,
.hero.phase2-gif-hero .phase2-depth__layer--near,
.hero.phase2-gif-hero .phase2-depth__layer--mist {
  opacity: 0.2;
}

.hero.phase2-gif-hero::before {
  opacity: 0.34 !important;
  background:
    radial-gradient(circle at 32% 38%, rgba(255, 247, 229, 0.36), transparent 28%),
    linear-gradient(90deg, rgba(18, 14, 12, 0.56), rgba(18, 14, 12, 0.14) 52%, rgba(18, 14, 12, 0.42)) !important;
}

.hero.phase2-gif-hero::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  opacity: 0.34 !important;
  pointer-events: none !important;
  background:
    linear-gradient(180deg, rgba(250, 245, 233, 0.24), rgba(42, 33, 26, 0.1)),
    url("./assets/hutao-ink/PaperTexture.webp") center / 720px auto repeat !important;
  mix-blend-mode: soft-light;
}

.hero-wash {
  opacity: 0.2 !important;
  filter: blur(0) !important;
}

.hutao-fog-layer,
.hutao-bamboo-leaves {
  position: absolute;
  inset: -8%;
  z-index: 3;
  pointer-events: none;
}

.hutao-fog-layer {
  background:
    url("./assets/hutao-ink/InkFog_03.webp") center / cover no-repeat,
    url("./assets/hutao-ink/InkFog_01.webp") 20% 50% / 70% auto no-repeat;
  opacity: 0.16;
  mix-blend-mode: screen;
  transform: translate3d(var(--hutao-fog-x), var(--hutao-fog-y), 0) scale(1.05);
  animation: hutaoFogDrift 22s ease-in-out infinite alternate;
}

.hutao-bamboo-leaves {
  background: url("./assets/hutao-ink/BambooLeaf_01.webp") center / cover no-repeat;
  opacity: 0.09;
  mix-blend-mode: screen;
  animation: hutaoLeafFloat 28s ease-in-out infinite alternate;
}

.hero-copy {
  z-index: 5 !important;
  color: var(--hutao-ink) !important;
  background:
    linear-gradient(135deg, rgba(250, 246, 236, 0.86), rgba(243, 232, 211, 0.74)),
    url("./assets/hutao-ink/PaperTexture.webp") center / 520px auto repeat !important;
  border: 1px solid rgba(75, 60, 38, 0.14) !important;
  box-shadow: 0 24px 76px rgba(23, 18, 14, 0.22) !important;
  backdrop-filter: none !important;
  transform: translate3d(0, calc(-50% + var(--minimal-title-y, 0px)), 0);
}

.hero-copy > *,
.section-heading > *,
.about-copy > *,
.message-inner > *,
.portrait-panel > * {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: var(--hutao-brush) !important;
  color: var(--hutao-ink) !important;
  font-weight: 400;
  letter-spacing: 0 !important;
  text-shadow: 0 2px 18px rgba(255, 250, 240, 0.55);
}

.hero h1 .title-small {
  font-family: var(--hutao-serif) !important;
  font-weight: 500;
}

.eyebrow,
.hero-verse,
.section-heading p,
.article-card p,
.home-video-card p,
.home-video-card small,
.friend-card small,
.about-copy p,
.achievement-copy p {
  color: var(--hutao-muted) !important;
  opacity: 1 !important;
}

.section-heading {
  color: var(--hutao-ink);
}

.article-card,
.home-video-card,
.article-list-card,
.video-card,
.achievement-cards article,
.friend-card,
.guestbook-list article,
.portal-card,
.kurumi-art-card,
.kurumi-profile-card {
  position: relative;
  overflow: hidden;
  color: var(--hutao-ink) !important;
  background:
    linear-gradient(145deg, rgba(252, 248, 238, 0.94), rgba(239, 228, 207, 0.86)),
    url("./assets/hutao-ink/PaperTexture.webp") center / 560px auto repeat !important;
  border: 1px solid var(--hutao-line) !important;
  border-radius: 20px !important;
  box-shadow: var(--hutao-shadow) !important;
  backdrop-filter: none !important;
  transform-style: preserve-3d;
  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-card::before,
.home-video-card::before,
.article-list-card::before,
.video-card::before,
.achievement-cards article::before,
.friend-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08 !important;
  background:
    url("./assets/hutao-ink/InkFog_03.webp") center / cover no-repeat,
    radial-gradient(circle at 18% 18%, rgba(142, 44, 40, 0.16), transparent 20%);
  mix-blend-mode: multiply;
  transition: opacity 0.5s ease;
}

.article-card > *,
.home-video-card > *,
.article-list-card > *,
.video-card > *,
.achievement-cards article > *,
.friend-card > * {
  position: relative;
  z-index: 1;
}

.article-card:hover,
.home-video-card:hover,
.article-list-card:hover,
.video-card:hover,
.achievement-cards article:hover,
.friend-card:hover,
.portal-card:hover {
  border-color: var(--hutao-gold-line) !important;
  box-shadow: var(--hutao-shadow-hover) !important;
  transform: perspective(900px) rotateX(var(--hutao-tilt-x, 0deg)) rotateY(var(--hutao-tilt-y, 0deg)) translateY(-8px) !important;
}

.article-card:hover::before,
.home-video-card:hover::before,
.article-list-card:hover::before,
.video-card:hover::before,
.friend-card:hover::before {
  opacity: 0.13 !important;
}

.article-card h3,
.home-video-card h3,
.article-list-card h2,
.video-card h2,
.friend-card strong,
.achievement-cards strong {
  color: #211c16 !important;
  font-family: var(--hutao-serif);
  font-weight: 700;
  letter-spacing: 0;
}

.article-card p,
.home-video-card p,
.article-list-card p,
.video-card p {
  color: rgba(53, 47, 39, 0.78) !important;
}

.article-state,
.hutao-state {
  display: grid;
  gap: 8px;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 42px);
  color: rgba(47, 40, 32, 0.82) !important;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(252, 248, 238, 0.94), rgba(239, 228, 207, 0.86)),
    url("./assets/hutao-ink/PaperTexture.webp") center / 560px auto repeat;
  border: 1px solid rgba(49, 42, 30, 0.14);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(31, 28, 21, 0.12);
}

.hutao-state strong {
  color: var(--hutao-ink);
  font-family: var(--hutao-serif);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.hutao-state span {
  color: var(--hutao-muted);
  line-height: 1.75;
}

.home-video-grid {
  gap: clamp(18px, 3vw, 28px) !important;
}

.home-video-card {
  grid-template-columns: minmax(170px, 0.72fr) 1fr !important;
  min-height: 220px;
  background:
    linear-gradient(140deg, rgba(252, 249, 240, 0.95), rgba(240, 229, 209, 0.88)),
    url("./assets/hutao-ink/PaperTexture.webp") center / 520px auto repeat !important;
}

.home-video-visual {
  background:
    linear-gradient(145deg, rgba(34, 43, 39, 0.86), rgba(23, 29, 27, 0.9)),
    url("./assets/hutao-ink/InkFog_02.webp") center / cover no-repeat !important;
  border: 1px solid rgba(172, 130, 57, 0.2) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 246, 225, 0.08), 0 16px 38px rgba(31, 28, 21, 0.16);
}

.home-video-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.1), rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.home-video-visual img {
  filter: saturate(0.82) contrast(0.96) brightness(0.9);
}

.home-video-visual span {
  top: 50% !important;
  left: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 58px !important;
  height: 58px !important;
  border-radius: 999px !important;
  color: #f6ecdc !important;
  font-size: 0 !important;
  line-height: 1 !important;
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(145deg, #2b403b, #16231f) !important;
  border: 1px solid rgba(214, 172, 86, 0.72) !important;
  box-shadow: 0 12px 30px rgba(24, 30, 27, 0.32), inset 0 0 18px rgba(255, 245, 218, 0.06) !important;
  transform: translate(-50%, -50%) !important;
}

.video-play-mark {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #f6ecdc !important;
  font-size: 0 !important;
}

.video-play-mark::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid currentColor;
}

.home-video-visual span::before {
  content: "" !important;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid currentColor;
  background: transparent !important;
  transform: none !important;
}

.home-video-card:hover .home-video-visual span {
  transform: translate(-50%, -50%) scale(1.07) !important;
  box-shadow: 0 16px 38px rgba(24, 30, 27, 0.36), 0 0 0 8px rgba(139, 98, 50, 0.1) !important;
}

.home-video-card > div:last-child {
  background: rgba(255, 250, 240, 0.48) !important;
  border: 1px solid rgba(56, 48, 36, 0.08);
  border-radius: 16px;
}

.home-video-card small {
  color: rgba(57, 49, 39, 0.76) !important;
  font-size: 0.84rem;
}

.home-video-card h3 {
  color: #1d1a15 !important;
  font-size: clamp(1.18rem, 2.2vw, 1.62rem) !important;
}

.card-visual,
.article-cover,
.portrait-frame {
  filter: saturate(0.86) contrast(0.98);
}

.about-copy,
.message-inner,
.portrait-panel {
  background:
    linear-gradient(135deg, rgba(252, 248, 238, 0.9), rgba(240, 229, 209, 0.78)),
    url("./assets/hutao-ink/PaperTexture.webp") center / 560px auto repeat !important;
  border: 1px solid rgba(49, 42, 30, 0.14) !important;
  box-shadow: var(--hutao-shadow) !important;
  backdrop-filter: none !important;
}

blockquote {
  color: #2d261f !important;
  background: rgba(255, 250, 239, 0.72) !important;
  border-left: 4px solid var(--hutao-seal) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

@media (min-width: 901px) {
  .home-page .about-copy {
    background:
      linear-gradient(135deg, rgba(250, 247, 238, 0.88), rgba(244, 236, 220, 0.82)),
      url("./assets/hutao-ink/PaperTexture.webp") center / 520px auto repeat !important;
    border: 1px solid rgba(70, 55, 40, 0.14) !important;
    box-shadow:
      0 20px 55px rgba(65, 49, 37, 0.11),
      inset 0 1px 0 rgba(255, 255, 255, 0.52) !important;
    backdrop-filter: none !important;
  }

  .home-page .portrait-panel {
    background: rgba(250, 247, 238, 0.28) !important;
    border-color: rgba(70, 55, 40, 0.12) !important;
    box-shadow: 0 16px 38px rgba(65, 49, 37, 0.08) !important;
  }

  .home-page .about-copy blockquote {
    color: rgba(67, 40, 32, 0.78) !important;
    background: transparent !important;
    border-left: 3px solid rgba(159, 48, 41, 0.72) !important;
  }
}

.reveal {
  opacity: 1;
  filter: none !important;
  transform: none;
  transition:
    opacity 0.82s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.82s cubic-bezier(0.16, 1, 0.3, 1);
}

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.99);
}

.reveal.is-visible,
.reveal.visible {
  opacity: 1;
  filter: none !important;
  transform: translateY(0) scale(1);
}

.home-page .about-section .reveal,
.motion-ready .home-page .about-section .reveal {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

main > section:not(.hero):not(.kurumi-page-hero):not(.hutao-house) {
  position: relative;
  isolation: isolate;
}

main > section:not(.hero):not(.kurumi-page-hero):not(.hutao-house)::after {
  content: "";
  position: absolute;
  inset: clamp(22px, 4vw, 48px) -2%;
  z-index: 0;
  pointer-events: none;
  opacity: calc(0.34 - (var(--section-progress, 0) * 0.26));
  background:
    url("./assets/hutao-ink/InkFog_03.webp") center / cover no-repeat,
    radial-gradient(circle at 50% 22%, rgba(255, 251, 241, 0.34), transparent 36%);
  mix-blend-mode: multiply;
  transition: opacity 0.7s ease;
}

main > section:not(.hero):not(.kurumi-page-hero):not(.hutao-house).is-current::after {
  opacity: 0.07;
}

main > section:not(.hero):not(.kurumi-page-hero):not(.hutao-house) > * {
  position: relative;
  z-index: 1;
}

.cover-view-count,
.live-status,
.speech-bubble,
.status-card,
.control-card {
  backdrop-filter: blur(6px) !important;
}

.status-card > *,
.control-card > *,
.speech-bubble > *,
.live-status > * {
  position: relative;
  z-index: 2;
}

.status-card::before,
.control-card::before,
.speech-bubble::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: rgba(255, 246, 228, 0.04);
  pointer-events: none;
}

.article-image-gallery,
.kurumi-art-grid,
.gallery-grid {
  max-width: 100%;
}

.article-image-gallery img,
.kurumi-art-card img,
.gallery-image-button img {
  max-width: 100%;
  height: auto;
}

@media (min-width: 901px) {
  .home-page .message-section {
    min-height: auto;
    padding: clamp(100px, 10vw, 150px) 24px;
    overflow: hidden;
  }

  .home-page .message-inner {
    width: min(780px, calc(100% - 48px)) !important;
    margin: 0 auto;
    padding: clamp(38px, 5vw, 60px) !important;
    border: 1px solid rgba(74, 59, 43, 0.16) !important;
    background: rgba(249, 245, 235, 0.88) !important;
    box-shadow:
      0 26px 70px rgba(69, 53, 39, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: none !important;
  }

  .home-page .message-inner .eyebrow {
    letter-spacing: 0.36em;
  }

  .home-page .message-inner h2 {
    margin: 20px 0 22px;
    font-size: clamp(46px, 4.6vw, 66px);
    line-height: 1.12;
    letter-spacing: 0.02em;
    text-align: center;
    white-space: nowrap;
  }

  .home-page .message-inner > p:not(.eyebrow):not(.form-note) {
    max-width: 560px;
    margin: 0 auto 38px;
    color: rgba(53, 49, 43, 0.68);
    font-size: 15px;
    line-height: 1.9;
    text-align: center;
  }

  .home-page .message-form {
    display: grid;
    grid-template-columns: minmax(180px, 0.72fr) minmax(320px, 1.4fr) auto;
    align-items: start;
    gap: 18px;
    margin-top: 30px;
    text-align: left;
  }

  .home-page .message-form label {
    display: grid;
    gap: 9px;
    min-width: 0;
  }

  .home-page .message-form label > span {
    color: rgba(126, 54, 46, 0.78);
    font-size: 12px;
    letter-spacing: 0.14em;
  }

  .home-page .message-form input,
  .home-page .message-form textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 4px;
    border: 0;
    border-bottom: 1px solid rgba(55, 49, 42, 0.28);
    border-radius: 0;
    outline: none;
    color: var(--ink);
    background: transparent;
    line-height: 1.7;
  }

  .home-page .message-form textarea {
    min-height: 52px;
    max-height: 150px;
    resize: vertical;
  }

  .home-page .message-form input::placeholder,
  .home-page .message-form textarea::placeholder {
    color: rgba(47, 44, 39, 0.48);
  }

  .home-page .message-form input:focus,
  .home-page .message-form textarea:focus {
    border-bottom-color: var(--cinnabar);
    box-shadow: 0 2px 0 rgba(159, 48, 41, 0.12);
  }

  .home-page .seal-button {
    position: relative;
    align-self: end;
    width: 54px;
    height: 54px;
    min-height: 54px;
    padding: 0;
    border: 1px solid rgba(92, 24, 21, 0.4);
    color: #fff4e9;
    background: var(--cinnabar);
    font-size: 18px;
    box-shadow: 0 9px 20px rgba(114, 39, 34, 0.18);
    transform: rotate(1.5deg);
  }

  .home-page .seal-button:hover {
    transform: translateY(-2px) rotate(-1deg);
  }

  .home-page .form-note {
    min-height: 22px;
    margin: 18px 0 0;
    font-size: 18px;
    text-align: center;
  }

  .home-page .guestbook-list {
    display: grid;
    gap: 12px;
    margin-top: 34px;
  }

  .home-page .guestbook-list article {
    min-height: 0;
    padding: 18px 20px;
    border: 1px solid rgba(68, 57, 45, 0.14);
    border-radius: 14px;
    background: rgba(255, 252, 244, 0.58) !important;
    box-shadow: 0 10px 24px rgba(64, 50, 37, 0.06);
  }

  .home-page .guestbook-list article > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }

  .home-page .guestbook-meta {
    flex: 0 0 auto;
  }

  .home-page .guestbook-list strong {
    color: rgba(35, 33, 29, 0.9);
    font-size: 14px;
  }

  .home-page .guestbook-list time {
    color: rgba(68, 64, 57, 0.56);
    font-size: 11px;
  }

  .home-page .guestbook-list article > p {
    margin: 10px 0 0;
    color: rgba(47, 44, 39, 0.72);
    font-size: 14px;
    line-height: 1.8;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .kurumi-page .kurumi-profile-section {
    width: 100%;
    padding: clamp(90px, 9vw, 130px) 0;
  }

  .kurumi-page .kurumi-profile-card {
    display: grid;
    grid-template-columns: minmax(360px, 0.88fr) minmax(520px, 1.25fr);
    align-items: stretch;
    width: min(1120px, calc(100% - 80px));
    min-height: 560px;
    height: auto;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(61, 52, 42, 0.16);
    border-radius: 18px;
    color: var(--ink);
    background:
      linear-gradient(145deg, rgba(247, 243, 233, 0.92), rgba(241, 233, 215, 0.9)),
      url("./assets/hutao-ink/PaperTexture.webp") center / 560px auto repeat !important;
    box-shadow: 0 28px 75px rgba(50, 39, 31, 0.12) !important;
  }

  .kurumi-page .kurumi-profile-card.reveal {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .kurumi-page .kurumi-profile-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    padding: clamp(42px, 5vw, 70px);
  }

  .kurumi-page .kurumi-profile-copy h2 {
    max-width: 430px;
    margin: 18px 0 24px;
    color: rgba(25, 28, 25, 0.94);
    font-size: clamp(48px, 4.2vw, 64px);
    line-height: 1.16;
    letter-spacing: 0.02em;
    word-break: keep-all;
  }

  .kurumi-page .kurumi-profile-copy > p:not(.eyebrow) {
    margin: 0 0 30px;
    color: rgba(47, 47, 42, 0.72);
    font-size: 15px;
    line-height: 2;
  }

  .kurumi-page .kurumi-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 0 0 30px;
    border-top: 1px solid rgba(55, 49, 42, 0.14);
  }

  .kurumi-page .kurumi-facts > div {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    padding: 15px 0;
    border-top: 0;
    border-bottom: 1px solid rgba(55, 49, 42, 0.11);
  }

  .kurumi-page .kurumi-facts dt {
    color: rgba(159, 48, 41, 0.68);
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .kurumi-page .kurumi-facts dd {
    margin: 0;
    color: rgba(37, 36, 32, 0.78);
    font-size: 13px;
  }

  .kurumi-page .source-link {
    align-self: flex-start;
    margin-top: 4px;
    color: rgba(159, 48, 41, 0.75);
  }

  .kurumi-page .kurumi-profile-art {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 560px;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent !important;
    cursor: zoom-in;
  }

  .kurumi-page .kurumi-profile-art img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 560px;
    max-width: none;
    object-fit: cover;
    object-position: 50% 48%;
    transform: none;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .kurumi-page .kurumi-profile-art:hover img {
    transform: scale(1.025);
  }
}

@media (min-width: 701px) and (max-width: 980px) {
  .home-page .message-form {
    grid-template-columns: 1fr 1fr;
  }

  .home-page .message-form .seal-button {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@keyframes hutaoFogDrift {
  from { transform: translate3d(calc(var(--hutao-fog-x) - 12px), calc(var(--hutao-fog-y) + 4px), 0) scale(1.05); }
  to { transform: translate3d(calc(var(--hutao-fog-x) + 14px), calc(var(--hutao-fog-y) - 8px), 0) scale(1.08); }
}

@keyframes hutaoLeafFloat {
  from { transform: translate3d(-10px, 8px, 0) scale(1.03); }
  to { transform: translate3d(18px, -12px, 0) scale(1.06); }
}

@keyframes hutaoPageRise {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hutaoInkCover {
  0% { clip-path: circle(0 at var(--hutao-transition-x) var(--hutao-transition-y)); opacity: 0; }
  18% { opacity: 0.9; }
  100% { clip-path: circle(150vmax at var(--hutao-transition-x) var(--hutao-transition-y)); opacity: 1; }
}

@keyframes hutaoInkReveal {
  0%, 28% { clip-path: circle(150vmax at 50% 50%); opacity: 1; }
  100% { clip-path: circle(0 at 88% 12%); opacity: 0; }
}

@keyframes hutaoBrushCross {
  from { opacity: 0; transform: translate3d(-32%, 10%, 0) rotate(-6deg) scale(1.18); }
  to { opacity: 0.32; transform: translate3d(16%, -6%, 0) rotate(3deg) scale(1.08); }
}

@keyframes hutaoBrushSettle {
  from { opacity: 0.3; transform: translate3d(10%, -5%, 0) rotate(2deg) scale(1.12); }
  to { opacity: 0; transform: translate3d(28%, -12%, 0) rotate(5deg) scale(1.04); }
}

@keyframes hutaoSealLand {
  from { opacity: 0; transform: rotate(-18deg) scale(1.45); }
  to { opacity: 0.82; transform: rotate(-8deg) scale(1); }
}

/* Restore the compact Hu Tao House proportions from the preceding version. */
.pet-page .pet-shell {
  width: min(1280px, calc(100% - 40px)) !important;
}

.pet-page .text-control,
.pet-page .visit-control,
.pet-page .mini-toggle,
.pet-page .action-grid button,
.pet-page .daily-gift {
  min-height: 0;
}

.pet-page .text-control {
  padding-inline: 0;
}

.pet-page .action-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 840px) {
  html.mobile-nav-open,
  body.mobile-nav-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .site-header {
    z-index: 100;
    background:
      linear-gradient(180deg, rgba(250, 246, 236, 0.98), rgba(245, 237, 221, 0.97)),
      url("./assets/hutao-ink/PaperTexture.webp") center / 520px auto repeat !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .site-header .brand,
  .site-header .menu-toggle {
    position: relative;
    z-index: 10002;
  }

  .site-header .site-nav {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10001;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0 !important;
    padding: max(88px, calc(env(safe-area-inset-top) + 76px)) 24px max(28px, env(safe-area-inset-bottom)) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start !important;
    gap: 0 !important;
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
      linear-gradient(180deg, rgba(250, 246, 236, 0.99), rgba(241, 232, 214, 0.98)),
      url("./assets/hutao-ink/PaperTexture.webp") center / 560px auto repeat !important;
    clip-path: inset(0 0 100% 0);
    opacity: 1 !important;
    visibility: hidden;
    pointer-events: none;
    transform: none !important;
    transition:
      clip-path 0.38s cubic-bezier(0.16, 1, 0.3, 1),
      visibility 0s linear 0.38s;
  }

  .site-header .site-nav.open {
    clip-path: inset(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .site-header .site-nav a {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: min(100%, 360px);
    min-height: 52px;
    padding: 11px 8px;
    border-bottom: 1px solid rgba(49, 42, 30, 0.1);
    font-size: clamp(17px, 4.8vw, 20px);
    letter-spacing: 0.18em;
    opacity: 1;
    transform: translateY(0);
    transition: color 0.25s;
  }

  .hero-copy {
    transform: none;
  }
}

@media (max-width: 760px) {
  :root {
    --glass-blur: 4px;
  }

  .site-header {
    z-index: 100;
  }

  .site-nav::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.2;
    background: url("./assets/hutao-ink/InkFog_03.webp") center / cover no-repeat;
    pointer-events: none;
  }

  .hero-copy {
    background: rgba(250, 246, 236, 0.9) !important;
  }

  .hero.phase2-gif-hero .hero-art {
    opacity: 0.44 !important;
    transform: scale(1.02) !important;
  }

  .hutao-fog-layer {
    opacity: 0.1;
  }

  .hutao-bamboo-leaves {
    display: none;
  }

  .home-video-card {
    grid-template-columns: 1fr !important;
    min-height: 0;
  }

  .home-video-visual span {
    width: 52px !important;
    height: 52px !important;
  }

  .article-card:hover,
  .home-video-card:hover,
  .achievement-cards article:hover,
  .friend-card:hover,
  .portal-card:hover {
    transform: translateY(-5px) !important;
  }

  .reveal {
    filter: none !important;
    transform: translateY(18px) scale(0.99);
  }

  .section,
  .kurumi-profile-section,
  .kurumi-gallery-section,
  .pet-shell {
    width: min(100% - 28px, 1180px) !important;
  }

  .article-card,
  .article-card.featured,
  .home-video-card,
  .article-list-card,
  .video-card,
  .friend-card {
    width: 100%;
    grid-template-columns: 1fr !important;
  }

  .article-grid,
  .home-video-grid,
  .friend-grid,
  .gallery-grid,
  .kurumi-art-grid {
    grid-template-columns: 1fr !important;
  }

  .kurumi-art-card,
  .kurumi-art-card.wide {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .action-grid {
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)) !important;
  }

  .action-grid button,
  .visit-control,
  .ink-button,
  .seal-button,
  .text-button,
  button,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .status-card,
  .control-card {
    backdrop-filter: blur(4px) !important;
  }

  .speech-bubble {
    max-width: calc(100vw - 36px);
  }

  .pet-page .pet-shell {
    width: min(100% - 20px, 620px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hutao-fog-layer,
  .hutao-bamboo-leaves {
    animation: none !important;
  }

  .article-card,
  .home-video-card,
  .achievement-cards article,
  .friend-card,
  .portal-card {
    transition: none !important;
  }
}

body.home-page :where(.article-card, .home-video-card, .achievement-section, .links-section) :where(h2, h3, strong) {
  font-weight: 500 !important;
}

/* ===== V4_LAYOUT_FONT_PERFORMANCE: mobile rendering ===== */
body {
  font-synthesis: weight style;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

@media (max-width: 840px) {
  .paper-noise,
  .ink-atmosphere {
    display: none !important;
  }

  html body,
  html.cursor-ready body {
    background-image: linear-gradient(180deg, #faf6ec, #f0e6d4) !important;
  }

  .article-card,
  .home-video-card,
  .article-list-card,
  .video-card,
  .achievement-cards article,
  .friend-card,
  .guestbook-list article,
  .portal-card,
  .kurumi-art-card,
  .kurumi-profile-card,
  .about-copy,
  .message-inner,
  .portrait-panel {
    background-image: linear-gradient(
      145deg,
      rgba(252, 248, 238, 0.97),
      rgba(239, 228, 207, 0.92)
    ) !important;
  }

  .article-card::before,
  .home-video-card::before,
  .article-list-card::before,
  .video-card::before,
  .achievement-cards article::before,
  .friend-card::before {
    display: none !important;
  }

  .card-visual,
  .article-cover,
  .portrait-frame,
  .home-video-visual img {
    filter: none !important;
  }

  .section-heading h2,
  .page-title h1,
  .article-detail-title,
  .about-copy h2,
  .message-inner h2 {
    font-family: var(--hutao-serif) !important;
    font-synthesis: weight style;
  }
}

/* Night paper shares the same palette as the rest of the site. */
html[data-theme="dark"] {
  --hutao-ink: var(--ink);
  --hutao-muted: var(--ink-soft);
  --hutao-paper: rgba(29, 37, 33, 0.94);
  --hutao-paper-solid: #202824;
  --hutao-line: var(--line);
  --hutao-seal: #e89182;
  --hutao-jade: #b0c9bb;
  --hutao-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] body {
  color: var(--ink);
  background: linear-gradient(160deg, #19221e, #111714) !important;
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] body.home-page .site-header,
html[data-theme="dark"] body.is-scrolled .site-header,
html[data-theme="dark"] .site-header.scrolled {
  background: rgba(22, 30, 26, 0.96) !important;
  border-color: var(--line);
}

html[data-theme="dark"] .site-nav a {
  color: var(--ink) !important;
}

html[data-theme="dark"] .site-nav a.active,
html[data-theme="dark"] .site-nav a:hover {
  color: var(--hutao-seal) !important;
}

html[data-theme="dark"] body.home-page :is(.hero-copy, .article-card, .home-video-card,
  .achievement-cards article, .friend-card, .guestbook-list article, .about-copy,
  .message-inner, .portrait-panel, .friend-group, .achievement-section, .links-section,
  .hutao-state, .article-state) {
  background: linear-gradient(135deg, #28332d, #1c2520) !important;
  border-color: var(--line) !important;
  box-shadow: var(--hutao-shadow) !important;
}

html[data-theme="dark"] .hero h1 {
  text-shadow: none;
}

html[data-theme="dark"] .home-page .about-section {
  background: linear-gradient(160deg, #25312a, #18211c);
}

html[data-theme="dark"] body.home-page :is(.article-card h3, .home-video-card h3,
  .friend-card strong, .friend-group h3, .guestbook-list article strong,
  .achievement-cards strong, .achievement-cards span,
  .about-copy h2, .message-inner h2, .achievement-copy h2) {
  color: var(--ink) !important;
}

html[data-theme="dark"] body.home-page :is(.home-video-card small, .article-card time,
  .guestbook-list time, .guestbook-list article p, .message-inner > p,
  .message-form label > span, .friend-group p, .friend-card small, .hutao-state, .article-state) {
  color: var(--ink-soft) !important;
}

html[data-theme="dark"] body.home-page :is(.about-copy blockquote, blockquote) {
  color: var(--ink) !important;
  background: var(--surface) !important;
  border-color: var(--hutao-seal) !important;
}

html[data-theme="dark"] .message-form :is(input, textarea)::placeholder {
  color: var(--ink-soft);
}

html[data-theme="dark"] :is(.theme-toggle, .wind-toggle, .back-to-top) {
  color: var(--ink);
  background: #26332c;
  border-color: var(--line);
}

html[data-theme="dark"] .home-page .ink-button {
  color: #f2eadb !important;
  background: #354d40 !important;
  border-color: #829d8d;
}

@media (max-width: 1080px) {
  html[data-theme="dark"] .site-header .site-nav {
    background: linear-gradient(160deg, #202b24, #141c17) !important;
  }
}
