.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.opening-active {
  overflow: hidden;
}
.xiaoyi-opening {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  border: 0;
  background: #e8e7da;
  color: #243d32;
  overflow: hidden;
}
.xiaoyi-opening::backdrop {
  background: #e8e7da;
}
.opening-video,
.opening-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.opening-video {
  object-fit: cover;
  object-position: center;
}
.opening-shade {
  pointer-events: none;
  background: linear-gradient(90deg, #f8f7efed, #f8f7ef99 24%, transparent 52%);
}
.opening-copy {
  position: absolute;
  left: 7%;
  top: 50%;
  translate: 0 -50%;
  pointer-events: none;
}
.opening-copy h2 {
  font-size: clamp(44px, 5.5vw, 88px);
  font-weight: 400;
  line-height: 1.4;
}
.opening-copy p {
  margin-top: 23px;
  color: #586e5d;
  font-size: 18px;
  letter-spacing: 3px;
}
.opening-controls {
  position: absolute;
  top: max(24px, env(safe-area-inset-top));
  right: 26px;
  display: flex;
  gap: 10px;
}
.opening-controls button {
  padding: 9px 20px;
  border-radius: 30px;
  border: 1px solid #afc0af;
  background: #fffffff0;
  color: #344e3c;
  font-size: 13px;
}
.replay-opening {
  position: absolute;
  bottom: 20px;
  left: max(48px, calc((100% - 1200px) / 2));
  z-index: 2;
  border: 1px solid #ffffff80;
  background: #213d2e40;
  color: #f8faf4;
  border-radius: 30px;
  font-size: 12px;
  padding: 6px 15px;
}
@media (max-width: 560px) {
  .opening-controls {
    top: max(18px, env(safe-area-inset-top));
    right: 16px;
    gap: 8px;
  }
  .opening-controls button {
    padding: 8px 14px;
    font-size: 12px;
  }
  .opening-shade {
    background: linear-gradient(
      0deg,
      #faf8f2f2,
      #faf8f2a0 23%,
      transparent 55%
    );
  }
  .opening-copy {
    left: 25px;
    top: auto;
    bottom: max(50px, env(safe-area-inset-bottom));
    translate: none;
  }
  .opening-copy h2 {
    font-size: 41px;
  }
  .opening-copy p {
    font-size: 14px;
    margin-top: 15px;
  }
  .replay-opening {
    left: 20px;
    bottom: 20px;
  }
  .home-hero .hero-caption {
    bottom: 66px;
  }
}
.xiaoyi-intro {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: center;
  padding-block: 55px;
  border-bottom: 1px solid var(--line);
}
.xiaoyi-portrait {
  height: 330px;
  display: flex;
  justify-content: center;
  align-items: end;
  background: radial-gradient(ellipse at bottom, #dce8d2, transparent 70%);
  overflow: hidden;
}
.xiaoyi-portrait img {
  width: 310px;
  height: 330px;
  object-fit: contain;
  object-position: bottom;
}
.xiaoyi-intro h2 {
  font-size: 35px;
  margin-bottom: 20px;
}
.xiaoyi-intro p {
  margin-top: 12px;
  font-size: 14px;
}
.xiaoyi-video-section video {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  background: #edf0e7;
  border-radius: 8px;
}
.xiaoyi-video-section > a {
  display: inline-block;
  margin-top: 15px;
  font-size: 13px;
  color: var(--red);
}
.xiaoyi-launcher {
  position: fixed;
  bottom: 28px;
  right: 26px;
  z-index: 40;
  width: 84px;
  height: 103px;
  padding: 0;
  background: #f7f8f0;
  border: 1px solid #d6decf;
  border-radius: 18px;
  box-shadow: 0 8px 28px #223b2926;
  color: var(--ink);
  overflow: hidden;
}
.xiaoyi-launcher img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  object-position: top;
  margin-inline: auto;
}
.xiaoyi-launcher span {
  display: block;
  font-size: 12px;
}
.xiaoyi-panel {
  position: fixed;
  bottom: 145px;
  right: 26px;
  z-index: 41;
  display: flex;
  flex-direction: column;
  width: 390px;
  height: min(580px, calc(100dvh - 170px));
  background: #fafbf6;
  border: 1px solid #d7dfcf;
  box-shadow: 0 12px 55px #16342130;
  border-radius: 14px;
  overflow: hidden;
}
.xiaoyi-panel-head {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #e9efe2;
  padding: 14px 17px;
  flex-shrink: 0;
}
.xiaoyi-panel-head img {
  width: 47px;
  height: 52px;
  object-fit: cover;
  object-position: top;
  background: #f5f7ef;
  border-radius: 50%;
}
.xiaoyi-panel-head h2 {
  font-size: 19px;
}
.xiaoyi-panel-head span {
  color: #68755f;
  font-size: 11px;
}
.xiaoyi-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  margin-left: auto;
  padding: 0 7px;
  color: #42533b;
}
.xiaoyi-messages {
  flex: 1;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  overscroll-behavior: contain;
}
.xiaoyi-message {
  width: fit-content;
  max-width: 95%;
  padding: 12px 14px;
  border-radius: 0 12px 12px;
  background: #eaf0e4;
  margin-bottom: 13px;
  font-size: 13px;
}
.xiaoyi-message p {
  color: #42513a;
}
.xiaoyi-message p + p {
  margin-top: 10px;
}
.xiaoyi-message a {
  display: inline-block;
  color: var(--red);
  margin: 8px 13px 0 0;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.xiaoyi-message.from-user {
  margin-left: auto;
  background: #f1e5e4;
  border-radius: 12px 0 12px 12px;
}
.xiaoyi-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 13px;
}
.xiaoyi-suggestions button {
  background: white;
  border: 1px solid #dce2d5;
  color: #4a5c41;
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 15px;
}
.xiaoyi-form {
  display: flex;
  gap: 9px;
  padding: 12px 15px;
  border-top: 1px solid var(--line);
}
.xiaoyi-form input {
  flex: 1;
  width: 0;
  min-width: 0;
  background: white;
  border: 1px solid #d3ddca;
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
  border-radius: 5px;
}
.xiaoyi-form button {
  border: 0;
  background: var(--red);
  color: white;
  border-radius: 5px;
  padding: 7px 15px;
  font-size: 13px;
}
.xiaoyi-panel-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px;
  font-size: 10px;
  color: #75806d;
  padding: 0 15px 12px;
}
@media (max-width: 560px) {
  .xiaoyi-intro {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-block: 35px;
  }
  .xiaoyi-intro h2 {
    font-size: 29px;
  }
  .xiaoyi-portrait,
  .xiaoyi-portrait img {
    height: 260px;
  }
  .xiaoyi-launcher {
    bottom: 75px;
    right: 14px;
    width: 72px;
    height: 88px;
    border-radius: 14px;
  }
  .xiaoyi-launcher img {
    width: 65px;
    height: 64px;
  }
  .xiaoyi-launcher span {
    font-size: 11px;
  }
  .xiaoyi-panel {
    right: 12px;
    bottom: 72px;
    width: calc(100% - 24px);
    height: min(580px, calc(100dvh - 110px));
  }
}
