.game-shell[data-view="wind-post"] { background: #173536; }
.game-shell[data-view="wind-post"] .landscape { display: none; }
.wind-post-screen {
  --post-serif: "Wind Post Title", "Songti SC", "Noto Serif CJK SC", serif;
  --post-gutter: var(--post-back-inset);
  --post-scene-ratio: .5625;
  --post-scene-x: 56%;
  --post-scene-y: 47%;
  --post-bell-left: 77.5%;
  --post-bell-top: 24.2%;
  --post-bell-width: 11.5%;
  isolation: isolate; display: grid; grid-template-rows: auto auto minmax(95px,1fr) auto; min-height: 0;
  padding: var(--post-back-top) var(--post-gutter) calc(var(--bottom) + 3px);
  color: #fff2cc; background: #173536; overflow: hidden auto; overscroll-behavior: contain;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
.wind-post-scene {
  position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: linear-gradient(180deg,#10263386 0%, #1026331a 33%, transparent 63%,#0d232adc 100%),
    url("assets/wind-post-hub-portrait.webp") var(--post-scene-x) var(--post-scene-y) / cover no-repeat, #173536;
}
.wind-post-heading {
  z-index: 2; min-height: var(--post-back-size);
}
.wind-post-title {
  position: relative; z-index: 1; justify-self: start; pointer-events: none; padding-top: clamp(.48rem, 2.65dvh, 1.75rem);
}
.wind-post-title h2 { margin: 0; }
.wind-post-title h2 img {
  display: block; width: clamp(10rem, 49vw, 18rem); height: auto;
  filter: drop-shadow(0 2px 4px #192924d9);
}
.wind-post-title p {
  margin: .24rem 0 0; color: #ffe8b3; font: 800 clamp(1.06rem, 5.4vw, 1.54rem)/1.18 var(--post-serif);
  letter-spacing: .1em; text-shadow: 0 2px 5px #0b2631;
}
#wind-post-countdown {
  display: inline-block; margin-top: .48rem; padding: .2rem .5rem; border-inline-start: 2px solid #edbb72;
  background: linear-gradient(90deg,#11292fde,#11292f40); color: #ffe8b7; font-size: var(--text-small); font-weight: 750;
}
.wind-post-stage { position: relative; min-height: 0; }
.wind-post-greet {
  position: absolute; padding: 0; border: 0; background: transparent; touch-action: manipulation;
  transition: filter .16s ease;
  bottom: 2%; left: 53%; translate: -50%; width: min(67%, 19rem); height: 98%; min-height: 64px;
  border-radius: 42% 38% 24% 24%; transform-origin: center bottom;
}
.wind-post-greet img {
  position: relative; width: 100%; height: 100%; object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 10px 8px #17211e94); pointer-events: none;
}
/* Match the background's cover sizing so the bell stays on its timber post. */
.wind-post-scene-objects {
  position: absolute; z-index: 1; inset: 0; overflow: clip; pointer-events: none;
}
.wind-post-scene-plane {
  position: absolute; left: var(--post-scene-x); top: var(--post-scene-y);
  width: max(100%, calc(100dvh * var(--post-scene-ratio))); aspect-ratio: var(--post-scene-ratio);
  translate: calc(0% - var(--post-scene-x)) calc(0% - var(--post-scene-y));
}
.wind-post-chime {
  position: absolute; top: var(--post-bell-top); left: var(--post-bell-left); width: var(--post-bell-width);
  padding: 0; border: 0; border-radius: 6px; background: transparent; pointer-events: auto;
  filter: drop-shadow(1px 2px 2px #3827197a);
}
.wind-post-chime::after {
  position: absolute; inset: 50% auto auto 50%; content: ""; translate: -50% -50%;
  width: max(100%, 44px); height: max(100%, 44px);
}
.wind-post-chime img { width: 100%; height: auto; transform: scaleX(-1); pointer-events: none; }
.wind-post-chime[data-spine-ready] img { visibility: hidden; }
.wind-post-chime canvas {
  /* Transparent space around the 116 × 196 setup pose lets the tag swing past its resting bounds. */
  position: absolute;
  top: calc(-20 / 196 * 100%); left: -50%;
  width: 200%; height: calc(236 / 196 * 100%);
  pointer-events: none;
}
.wind-post-greeting {
  position: absolute; z-index: 2; top: 6%; left: 1%; max-width: 56%; margin: 0; padding: .35rem .55rem;
  border: 1px solid #c8a475; border-radius: 10px 4px 10px 4px;
  background: linear-gradient(130deg,#29464b,#142d37); color: #fff0ca; font-size: var(--text-small);
  font-weight: 780; box-shadow: 0 3px 6px #091e25a8; pointer-events: none;
}
.wind-post-entries {
  z-index: 2; display: grid; grid-template-columns: .91fr 1fr 1.2fr;
  grid-template-areas: "story rewards play"; align-items: end; gap: .18rem; margin-top: .1rem;
}
.wind-post-entries .wind-post-entry {
  position: relative; display: grid; justify-items: center; grid-template-rows: auto auto;
  min-width: 0; min-height: 44px; gap: .2rem; padding: .08rem 0; border: 0;
  border-radius: 13px 4px 13px 4px; background: transparent; color: #fff0c9;
  line-height: 1.16; text-align: center; transition: transform .16s ease, filter .16s ease;
}
.wind-post-entries .wind-post-entry > img {
  width: 100%; height: var(--post-entry-art); object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 7px 6px #071c23a6); pointer-events: none;
}
.wind-post-entry-label {
  position: relative; display: grid; justify-items: center; gap: .1rem; width: max-content; max-width: 100%;
  padding: .24rem .32rem .18rem; border-top: 1px solid #d0aa74a1;
  background: linear-gradient(90deg, transparent, #122c35e8 19% 81%, transparent);
  text-shadow: 0 2px 3px #0c242d, 0 0 4px #0a222c;
}
.wind-post-entry-label::before {
  content: ""; position: absolute; left: 0; right: 0; top: -.15rem; height: .24rem;
  border-inline: 1px solid #efd29c; transform: skewX(-20deg); pointer-events: none;
}
.wind-post-entry-label strong {
  font: 800 clamp(.88rem, 4vw, 1.23rem)/1.15 var(--post-serif); letter-spacing: .065em; white-space: nowrap;
}
.wind-post-entry-label small { color: #f6dca6; white-space: nowrap; font-size: clamp(.625rem, 2.7vw, .79rem); font-weight: 690; font-variant-numeric: tabular-nums; }
.wind-post-story-link {
  grid-area: story; --post-entry-art: clamp(3.4rem, min(18vw, 12dvh), 6.4rem); margin-bottom: .9rem;
}
.wind-post-reward-link {
  grid-area: rewards; --post-entry-art: clamp(4rem, min(21vw, 13dvh), 7rem); margin-bottom: .42rem;
}
.wind-post-count-badge {
  position: absolute; top: 1%; right: 12%; display: grid; place-items: center; min-width: 19px; height: 19px;
  padding-inline: 4px; border: 1px solid #ffefc6; border-radius: 99px; color: #fff8e0; background: #a84535;
  font-size: .72rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums;
}
.wind-post-challenge {
  grid-area: play; --post-entry-art: clamp(4.9rem, min(26vw, 15.5dvh), 8.55rem);
}
.wind-post-challenge .wind-post-entry-label {
  border-color: #e9bd76; background: linear-gradient(90deg,transparent,#543825e8 16% 84%,transparent);
}
.wind-post-challenge strong { font-size: clamp(1.06rem, 5.2vw, 1.5rem); }
.wind-post-challenge:disabled { filter: saturate(.4) brightness(.92); }
.wind-post-entry:not(:disabled):active { transform: translateY(2px) scale(.955); }
.wind-post-screen button:focus-visible { outline: 2px solid #ffdc8a; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .wind-post-entry:not(:disabled):hover { filter: brightness(1.13); }
  .wind-post-greet:hover, .wind-post-chime:hover { filter: brightness(1.06); }
}
.wind-post-embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.wind-post-embers i {
  position: absolute; left: var(--x, 21%); top: var(--y, 60%); width: 3px; aspect-ratio: 1;
  border-radius: 50%; background: #ffe7a0; box-shadow: 0 0 7px 1px #ffcb74a8; opacity: .42;
}
.wind-post-embers i:nth-child(2) { --x: 88%; --y: 55%; --delay: 1.4s; }
.wind-post-embers i:nth-child(3) { --x: 34%; --y: 77%; --delay: .5s; }
.wind-post-embers i:nth-child(4) { --x: 74%; --y: 30%; --delay: 2.1s; }
@media (prefers-reduced-motion: no-preference) {
  .wind-post-title, .wind-post-heading .post-rank-control, .wind-post-entries .wind-post-entry, .wind-post-greet { animation: post-hub-enter .32s cubic-bezier(.23,.69,.29,1) backwards; }
  .wind-post-title { animation-delay: .025s; }
  .wind-post-greet { animation-delay: .09s; }
  .wind-post-story-link { animation-delay: .12s; }
  .wind-post-reward-link { animation-delay: .17s; }
  .wind-post-challenge { animation-delay: .22s; }
  .wind-post-greet img { animation: post-hub-breathe 4.7s 1s ease-in-out infinite; transform-origin: 50% 95%; }
  .wind-post-embers i { animation: post-hub-drift 5s var(--delay,.4s) ease-in-out infinite; }
}
@keyframes post-hub-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes post-hub-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.012,.987); } }
@keyframes post-hub-drift { 0%,100% { opacity: .16; translate: 0 5px; } 52% { opacity: .72; translate: 7px -16px; } }

@media (min-aspect-ratio: 5/4) and (min-width: 34rem) {
  .wind-post-screen {
    --post-scene-ratio: calc(16 / 9);
    --post-scene-x: 50%;
    --post-scene-y: 50%;
    --post-bell-left: 81.7%;
    --post-bell-top: 26.4%;
    --post-bell-width: 4.75%;
    grid-template-columns: minmax(16rem, 41%) 1fr;
    grid-template-rows: auto minmax(0,1fr) auto;
    grid-template-areas: "heading heading" "title stage" "entries stage";
    gap: .36rem 1rem;
  }
  .wind-post-heading { grid-area: heading; }
  .wind-post-scene {
    background: linear-gradient(90deg,#10283290, transparent 62%), linear-gradient(0deg,#10283284,transparent 45%),
      url("assets/wind-post-hub-wide.webp") var(--post-scene-x) var(--post-scene-y) / cover no-repeat, #173536;
  }
  .wind-post-title { grid-area: title; align-self: center; padding-top: 0; }
  .wind-post-title h2 img { width: clamp(9.6rem, min(32vw, 58dvh), 20rem); }
  .wind-post-title p { font-size: clamp(.98rem, 3.8dvh, 1.58rem); }
  .wind-post-stage { grid-area: stage; }
  .wind-post-greet { left: 46%; bottom: 1%; width: min(79%,22rem); height: 95%; }
  .wind-post-entries { grid-area: entries; align-self: end; max-width: 33rem; margin: 0; }
}
@media (orientation: landscape) and (max-height: 350px) {
  .wind-post-title h2 img { width: clamp(8rem, 52dvh, 14rem); }
  .wind-post-title p { margin-top: .13rem; }
  #wind-post-countdown { margin-top: .22rem; }
  .wind-post-story-link, .wind-post-reward-link { --post-entry-art: clamp(3.05rem, 17dvh, 4rem); }
  .wind-post-challenge { --post-entry-art: clamp(3.6rem, 21dvh, 5rem); }
}

.wind-post-entrance {
  --post-entrance-background: url("assets/wind-post-hub-portrait.webp");
  --post-entrance-play-state: paused;
  position: absolute; inset: 0; z-index: 11; display: grid; place-items: center;
  overflow: hidden; isolation: isolate; touch-action: none;
  background: #343a28;
  animation: wind-post-entrance-reveal 1.12s ease-in-out both;
}
.wind-post-entrance::before {
  content: ""; position: absolute; z-index: -1; inset: -14px;
  background:
    radial-gradient(ellipse at 50% 52%, #4f452a13 32%, #182920b0 90%),
    var(--post-entrance-background) var(--post-entrance-position, 19% 58%) / var(--post-entrance-size, cover) no-repeat;
  filter: blur(7px);
  animation: wind-post-entrance-approach 1.12s ease-out both;
}
.wind-post-entrance-stage {
  position: relative; width: min(140%, 90dvh, 49rem); aspect-ratio: 1;
  container-type: inline-size;
  animation: wind-post-entrance-approach 1.12s cubic-bezier(.26,.55,.34,1) both;
}
.wind-post-entrance-stage::before {
  content: ""; position: absolute; inset: 84% -1% -3%;
  background: radial-gradient(ellipse, #26271ac7 5%, transparent 67%);
}
.wind-post-entrance-doorway,
.wind-post-entrance-leaf,
.wind-post-entrance-face,
.wind-post-entrance-projection,
.wind-post-entrance-opening {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.wind-post-entrance-opening {
  background: #534029;
}
.wind-post-entrance-room {
  position: absolute; top: 30%; left: 30%; width: 41%; height: 57%;
  object-fit: cover; object-position: 50% 67%;
  animation: wind-post-entrance-room-light .72s ease-out both;
}
.wind-post-entrance-projection {
  perspective: clamp(400px, 132vw, 1020px);
}
.wind-post-entrance-opening::after {
  content: ""; position: absolute; inset: 29.9% 29.55% 13.75%;
  background:
    linear-gradient(90deg, #231a11c9, #432b194f 3%, transparent 13% 87%, #432b194f 97%, #231a11c9),
    linear-gradient(180deg, #2b1a115c, transparent 14% 98%, #2b1a1175);
}
.wind-post-entrance-leaf {
  --post-door-depth: clamp(8px, 2.85cqw, 23px);
  transform-style: preserve-3d;
  animation: wind-post-entrance-open .68s .052s cubic-bezier(.18,.54,.27,1) both;
}
.wind-post-entrance-face {
  backface-visibility: hidden;
}
.wind-post-entrance-left {
  --post-door-angle: 79deg;
  transform-origin: 30.48% 58% calc(-1 * var(--post-door-depth));
}
.wind-post-entrance-right {
  --post-door-angle: -79deg;
  transform-origin: 69.92% 58% calc(-1 * var(--post-door-depth));
  animation-delay: .08s;
}
.wind-post-entrance-edge {
  position: absolute; height: var(--post-door-depth); transform-origin: left bottom;
  transform: rotateZ(var(--post-edge-angle)) rotateX(90deg);
  backface-visibility: hidden;
  background:
    linear-gradient(0deg, #cfb27b80, #8b724934 30%, #3a362fc2),
    repeating-linear-gradient(0deg, #70563f 0, #89694e 2px, #90714f 4px, #745940 6px);
}
.wind-post-entrance-leaf::after {
  content: ""; position: absolute; top: 86.20%; height: var(--post-door-depth);
  transform-origin: center top; transform: rotateX(-90deg); backface-visibility: hidden;
  background: linear-gradient(#98774f, #49372a);
}
.wind-post-entrance-left::after { left: 30.14%; right: 49.68%; }
.wind-post-entrance-right::after { left: 50.32%; right: 29.74%; }
.wind-post-entrance[data-playing] { --post-entrance-play-state: running; }
.wind-post-entrance,
.wind-post-entrance::before,
.wind-post-entrance-stage,
.wind-post-entrance-room,
.wind-post-entrance-leaf {
  animation-play-state: var(--post-entrance-play-state);
}
@keyframes wind-post-entrance-approach { from { transform: scale(.95); } to { transform: scale(1.13); } }
@keyframes wind-post-entrance-open { from { transform: rotateY(0); } to { transform: rotateY(var(--post-door-angle)); } }
@keyframes wind-post-entrance-room-light { from { filter: brightness(.77); } to { filter: brightness(1.08); } }
@keyframes wind-post-entrance-reveal { 0%, 71% { opacity: 1; } 100% { opacity: 0; } }
@media (min-aspect-ratio: 5/4) and (min-width: 34rem) {
  .wind-post-entrance {
    --post-entrance-background: url("assets/wind-post-hub-wide.webp");
    --post-entrance-position: 4% 63%;
    --post-entrance-size: 172% auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wind-post-entrance { display: none; }
}
