.story-home {
  --story-ink: #3f3247;
  --story-muted: #695470;
  --story-rule: #cbb8d0;
  --story-serif: 'Songti SC', 'STZhongsong', 'Noto Serif CJK SC', 'SimSun', serif;
  color: var(--story-ink);
  background: #f9f4ee;
}
.story-home .home-main, .story-home .home-footer { width: min(1520px, calc(100% - clamp(24px, 4.5vw, 84px))); }
.story-feature {
  --story-ink: #fff1dc;
  --story-muted: #e4d1e1;
  --story-rule: #f4d8e066;
  --story-sky: url('/assets/showcase/shrine-evening-1440.webp');
  position: relative; isolation: isolate; display: grid;
  container-type: inline-size;
  grid-template: 'events art' auto 'welcome art' 1fr / minmax(0, 38%) minmax(0, 1fr);
  min-height: clamp(600px, 51vw, 700px); margin-top: 16px; overflow: clip;
  padding: clamp(24px, 4.5vw, 76px) clamp(24px, 5.2vw, 80px) clamp(44px, 6vw, 95px);
  color: var(--story-ink);
  background:
    linear-gradient(90deg, #211629cc, #211629a6 30%, #21162900 75%),
    var(--story-sky) center / cover no-repeat #271a31;
  border-radius: 8px 41px 0 0;
}
.story-events, .story-welcome { position: relative; z-index: 2; min-width: 0; }
.story-events { grid-area: events; align-self: start; width: min(100%, 380px); }
.story-event-heading {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  min-height: 38px; border-bottom: 1px solid var(--story-rule); padding-bottom: .55rem;
}
.story-event-heading h2 { margin: 0; display: flex; align-items: center; gap: .45rem; font-size: .96rem; font-weight: 700; }
.story-event-heading h2::before { content: '✧'; color: #e7be91; font-size: 1.15rem; }
.story-event-heading a { font-size: .84rem; color: var(--story-muted); white-space: nowrap; }
.story-event-heading a:hover { color: var(--story-ink); text-decoration: underline; text-underline-offset: 4px; }
.story-poster-stage { aspect-ratio: 16/9; overflow: hidden; border-radius: 8px; touch-action: pan-y; position: relative; margin-top: .7rem; }
.story-poster-stage:has(.story-poster-empty) { display: none; }
.story-poster { display: block; height: 100%; color: white; text-decoration: none; position: relative; }
.story-poster img { display: block; height: 100%; width: 100%; object-fit: contain; }
.story-poster-copy {
  position: absolute; inset: auto 0 0; padding: 1.5rem .85rem .65rem;
  background: linear-gradient(transparent, #2d1e35e3 98%); display: grid; gap: .15rem;
  color: white; text-shadow: 0 1px 2px #25172a;
}
.story-poster-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-poster-copy time { font-size: .76rem; }
.story-welcome { grid-area: welcome; align-self: center; margin-top: 1.25rem; }
.story-welcome h1 {
  margin: 0 0 1.05rem; color: var(--story-ink);
  font: 700 clamp(2.85rem, 8cqw, 6.65rem)/1.04 var(--story-serif); letter-spacing: .04em;
  white-space: nowrap;
}
.story-welcome h1::after { content: ''; display: block; width: 38px; height: 2px; margin-top: 1.05rem; background: #e7be91; }
.story-welcome-line {
  font-size: clamp(1rem, 1.4vw, 1.26rem); color: #fae8df; line-height: 1.85;
  margin: .7rem 0; max-width: min(21em, 100%); text-wrap: balance;
}
.story-welcome-line span { display: block; }
.story-intro { color: var(--story-muted); font-size: .92rem; line-height: 1.7; margin: 0 0 1.25rem; max-width: 25em; }
.story-welcome .home-actions { margin-top: 0; gap: 10px; justify-content: flex-start; }
.story-welcome .home-actions a { min-height: 42px; padding: .48rem .85rem; font-size: .85rem; border-radius: 6px; }
.story-welcome .home-actions .primary-button { background: #f7e0c9; color: #362740; }
.story-welcome .home-actions .primary-button:hover { background: #ffeddb; }
.story-welcome .home-actions .soft-button { background: #302137b3; border-color: #dec3d3a6; color: var(--story-ink); }
.story-welcome .home-actions .soft-button:hover { background: #46314e; }
.story-portrait { position: absolute; z-index: 1; inset: auto -4.5% 35px auto; width: min(64%, 1040px); }
.story-portrait-stage { position: relative; aspect-ratio: 70/51; touch-action: pan-y; }
.story-character {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  mask-image: linear-gradient(#000 0 92%, transparent);
}
.story-portrait-caption {
  position: absolute; bottom: 9px; left: 33.2%; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: max-content; max-width: 100%;
  padding: .25rem .42rem .25rem .68rem; border: 1px solid #ecceeb50;
  border-radius: 9px; background: #2b2035eb; white-space: nowrap;
}
.story-portrait-caption strong { font-size: .82rem; }
.story-portrait-caption .story-carousel-controls { flex-wrap: nowrap; }
.story-carousel-controls { display: flex; gap: .16rem; align-items: center; flex-wrap: wrap; }
.story-events > .story-carousel-controls { margin-top: .26rem; }
.story-carousel-controls[hidden] { display: none; }
.story-carousel-controls button {
  appearance: none; border: 1px solid #ecceeb59; color: var(--story-ink); background: #35263f;
  min-width: 34px; min-height: 34px; border-radius: 5px; cursor: pointer; font: inherit;
}
.story-carousel-controls button:hover { background: #5a4064; }
.story-carousel-controls .story-dot { border: 0; background: transparent; min-width: 24px; }
.story-dot::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #c7a7ca; }
.story-dot[aria-current="true"]::before { background: #f0c897; width: 13px; border-radius: 7px; }
.story-feature :focus-visible { outline: 2px solid #efcf9c; outline-offset: 3px; }
.story-carousel-status.is-error { flex-basis: 100%; font-size: .83rem; color: #ffd2e8; margin: 0; }
.story-carousel-status:not(.is-error) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
.story-home .home-section { padding: 1.65rem 0; margin: 0; border-top: 1px solid var(--story-rule); }
.story-home .home-section > h2 { font-family: var(--story-serif); font-size: 1.6rem; color: var(--story-ink); }
.story-home .home-directory { gap: 0 1rem; }
.story-home .home-directory > a {
  border: 0; border-radius: 0; border-bottom: 1px solid #e4d8df;
  min-height: 75px; box-shadow: none; background: transparent; padding: .85rem .18rem;
}
.story-home .home-directory > a:hover { background: #eee2ef77; }
.story-home .home-card-icon { background: transparent; border: 0; color: #8d653d; }
.story-home .home-dynamic > article { padding: .65rem .4rem; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
@keyframes story-reveal { from { opacity: .75; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .story-character, .story-poster { animation: story-reveal 210ms ease-out; }
  .story-carousel-controls button { transition: background-color 170ms ease; }
}
@media (max-width: 1040px) and (min-width: 701px) {
  .story-feature { min-height: 570px; padding-inline: 27px; }
}
@media (max-width: 768px) { .story-feature { --story-sky: url('/assets/showcase/shrine-evening-768.webp'); } }
@media (max-width: 700px) {
  .story-home .home-main, .story-home .home-footer { width: calc(100% - 24px); }
  .story-feature {
    grid-template: 'events' auto 'welcome' auto 'art' auto / minmax(0, 1fr);
    min-height: 0; gap: .85rem; padding: 18px 16px 0; border-radius: 7px 24px 0 0;
    background:
      linear-gradient(#23182c 17%, #23182ce6 35%, #23182c55 62%, #23182c00 83%),
      var(--story-sky) 69% bottom / auto 80% no-repeat #23182c;
  }
  .story-events { width: min(100%, 420px); }
  .story-welcome { margin: 1rem 0 0; }
  .story-welcome h1 { font-size: clamp(3rem, 10vw, 4rem); margin-bottom: .7rem; }
  .story-welcome h1::after { margin-top: .55rem; }
  .story-welcome-line { margin: .45rem 0; }
  .story-intro { margin-bottom: .8rem; }
  .story-portrait { position: relative; inset: auto; grid-area: art; width: 100%; }
  .story-portrait-stage { width: 102%; margin-inline-start: 6%; }
  .story-portrait-caption { left: 40%; bottom: 6px; }
  .story-home .home-directory > a { min-height: 68px; }
}
