@font-face {
  font-family: "Wind Post Letter Type";
  src: url("assets/wind-post-letter-type.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:is(.wind-post-screen, .wind-post-page) {
  --post-back-size: 46px;
  --post-back-inset: 16px;
  --post-back-top: max(10px, env(safe-area-inset-top, 0px));
  --post-rank-width: clamp(7.35rem, 27vw, 9.6rem);
  --post-rank-height: max(44px, calc(var(--post-rank-width) / 3.75));
}
.game-shell[data-view^="wind-post-"] { background: #183832; }
.game-shell[data-view^="wind-post-"] .landscape { display: none; }
.game-shell[data-post-active] { width: min(100%, var(--post-page-width)); }
.wind-post-page {
  --post-page-ink: #334b3c;
  --post-page-cream: #fff3d6;
  --post-page-gold: #ffd18a;
  display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: var(--top) var(--edge) var(--bottom);
  background: linear-gradient(180deg, #213f350d, #102a2694),
    url("assets/wind-post-page-paper.webp") center / cover no-repeat, #183832;
  color: var(--post-page-cream);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
.post-page-header {
  display: grid; grid-template-columns: minmax(2.75rem, 1fr) minmax(0, 2fr) minmax(2.75rem, 1fr);
  align-items: center; gap: 4px; min-height: 44px; flex: none;
}
.post-page-back {
  position: absolute; z-index: 2; top: var(--post-back-top); left: var(--post-back-inset);
  width: var(--post-back-size); height: var(--post-back-size);
  min-width: var(--post-back-size); min-height: var(--post-back-size); padding: 0; border: 0; border-radius: 9px;
  background: transparent url("assets/wind-post-hub-entry-back.webp") center / contain no-repeat;
  box-shadow: none;
}
.post-page-back:focus-visible { outline: 2px solid #ffe3a8; outline-offset: 1px; }
.post-page-back:active { transform: scale(.93); }
.post-rank-control {
  position: absolute; z-index: 1;
  top: calc(var(--post-back-top) + (var(--post-back-size) - var(--post-rank-height)) / 2);
  right: var(--post-back-inset); width: var(--post-rank-width); height: var(--post-rank-height);
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px;
  background: transparent url("assets/wind-post-hub-entry-rank.webp") center / contain no-repeat;
  color: #fff2ce; transition: filter .16s, transform .16s;
}
.post-rank-control > span {
  width: 100%; padding: 0 6% 0 34%; text-align: center; white-space: nowrap;
  font: 800 clamp(.78rem, 3.6vw, 1.03rem)/1.12 "Wind Post Title", "Songti SC", "Noto Serif CJK SC", serif;
  letter-spacing: .08em; text-shadow: 0 1px 3px #0c252c;
}
.post-rank-control:active { transform: translateY(2px) scale(.955); }
@media (hover: hover) and (pointer: fine) {
  .post-rank-control:hover { filter: brightness(1.13); }
}
.post-page-header h2 {
  margin: 0; text-align: center; font-size: var(--text-subheading); line-height: 1.2; font-weight: 850;
  text-shadow: 0 2px 4px #102726;
}
.post-page-header > span { justify-self: end; color: var(--post-page-gold); font-weight: 750; font-size: var(--text-label); white-space: nowrap; }
.post-page-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.post-page-footer { flex: none; margin: 0; font-size: var(--text-label); font-weight: 750; }

.post-room {
  --post-room-type: "Wind Post Letter Type", "Songti SC", "Noto Serif SC", "Noto Serif CJK SC", serif;
  --post-room-muted: #b7cac4;
  --post-room-accent: #f3d49a;
  --post-room-content: 48rem;
  --post-room-gutter: clamp(10px, 3.6vw, 28px);
  gap: 0; padding: 0 0 var(--bottom);
  background: linear-gradient(147deg, #19393ac4, #081e24e3 78%),
    url("assets/wind-post-page-paper.webp") center / cover no-repeat, #193033;
}
.post-story-page, .post-letter-page { --post-room-art: url("assets/wind-post-room-story.webp"); }
.post-rewards-page { --post-room-art: url("assets/wind-post-room-rewards.webp"); }
.post-rank-page, .post-rank-reward-page { --post-room-art: url("assets/wind-post-room-ranking.webp"); }

.post-room-hero {
  position: relative; display: flex; align-items: end;
  min-height: calc(var(--post-back-top) + clamp(7.5rem, 34vw, 10.75rem));
  padding: calc(var(--post-back-top) + var(--post-back-size)) var(--post-room-gutter) clamp(10px, 3.2vw, 20px);
  background:
    linear-gradient(0deg, #193437 0%, #19343700 41%),
    linear-gradient(90deg, #0c222982 0%, #102b3540 49%, transparent 81%),
    var(--post-room-art) right 61% / cover no-repeat, #142e35;
}
.post-room-hero::after {
  content: ""; position: absolute; inset: auto var(--post-room-gutter) 0; height: 1px;
  background: linear-gradient(90deg, #f2cd8b 0 32px, #b7955f88 32px, #b7955f12 90%);
}
.post-room button:focus-visible { outline: 2px solid #ffe3a8; outline-offset: -2px; }
.post-room-title { position: relative; min-width: 0; }
.post-room-title h2 {
  color: #fff0ca; text-align: start; font: 700 clamp(1.62rem, 6.8vw, 2.5rem)/1.1 var(--post-room-type);
  letter-spacing: .05em; text-shadow: 0 2px 6px #0b2129;
}
.post-room-title p {
  width: fit-content; margin: 6px 0 0; color: #e7deca; font-size: var(--text-label); line-height: 1.3;
  text-shadow: 0 1px 4px #0b2129;
}
.post-room > :is(.post-page-scroll, .post-page-footer, .post-letter-navigation, .post-rewards-toolbar) {
  width: min(calc(100% - 2 * var(--post-room-gutter)), var(--post-room-content));
  margin-inline: auto;
}
.post-room > .post-page-scroll {
  position: relative; overflow-x: hidden; padding: 10px 0 8px;
}

#post-story-chapters {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px;
  padding: 0; margin: 0; list-style: none;
}
.post-letter-entry {
  position: relative; display: grid; grid-template-columns: clamp(4.25rem, 23vw, 7.25rem) minmax(0, 1fr) 24px;
  align-items: center; gap: clamp(7px, 2.6vw, 13px); width: 100%; min-height: 72px; padding: 6px 8px 6px 6px;
  color: #f8ead0; border: 1px solid #a9956c6b; border-radius: 4px 12px 4px 4px;
  background: linear-gradient(104deg, #314a43, #203a3b 64%, #203437);
  text-align: start; transition: border-color .18s ease, background-color .18s ease, filter .18s ease;
}
.post-letter-entry:disabled { border-color: #9db1a334; background: #1b3032; color: #c0cfc4; }
.post-letter-thumb {
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: 100%; aspect-ratio: 1.56; border: 1px solid #c7a56e8a; border-radius: 3px; background: #152a2b;
}
.post-letter-thumb::after { content: ""; position: absolute; inset: 2px; border: 1px solid #fde6b530; border-radius: 1px; }
.post-letter-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-letter-entry:disabled .post-letter-thumb { background: #293837; border-color: #87948159; }
.post-letter-entry:disabled .post-letter-thumb img { width: 76%; height: 76%; object-fit: contain; filter: saturate(.54) brightness(.79); }
.post-letter-label { display: grid; gap: 4px; align-content: center; min-width: 0; }
.post-letter-label strong {
  font: 700 clamp(.99rem, 4.8vw, 1.31rem)/1.14 var(--post-room-type);
  letter-spacing: .025em;
}
.post-letter-label small { color: var(--post-room-muted); font-size: var(--text-small); line-height: 1.15; }
.post-letter-label .post-letter-access { color: #d6b784; }
.post-letter-affordance { display: grid; place-items: center; color: #f0ce8e; }
.post-letter-affordance .icon { width: 17px; height: 17px; }
.post-letter-entry:disabled .post-letter-affordance { color: #a8b9b1; }
@media (hover: hover) {
  .post-letter-entry:enabled:hover { border-color: #e3bd79; filter: brightness(1.1); }
}
.post-letter-entry:enabled:active { filter: brightness(.91); }

.post-letter-page { --post-letter-unseal-time: 1.62s; --post-room-content: 43rem; }
.post-letter-page .post-room-title > p { margin: 0 0 5px; color: var(--post-room-accent); }
.post-letter-page .post-room-title > h2 { font-size: clamp(1.49rem, 6.5vw, 2.3rem); }
.post-room > .post-letter-reader { padding-bottom: 10px; }
.post-letter-paper {
  margin: 0; padding: clamp(16px, 4.3vw, 34px);
  border: 1px solid #c8a372; border-radius: 4px 14px 4px 4px; color: #473522;
  background: linear-gradient(135deg, #fff3d769, #f7e6c451 65%, #f0dbb652),
    url("assets/wind-post-letter-paper.webp") center top / 100% auto repeat-y, #f7e6c4;
  box-shadow: inset 0 0 0 4px #fff6df90, 0 3px 12px #0d22296b;
}
.post-letter-page[data-unseal="true"] .post-letter-paper {
  animation: post-paper-rise .34s calc(var(--post-letter-unseal-time) - .34s) cubic-bezier(.22,.65,.33,1) both;
}
.post-letter-paper p { margin: 0 0 1em; font-size: clamp(.91rem, 3.95vw, 1.08rem); line-height: 1.85; }
.post-letter-paper p:last-child { margin-bottom: 0; }
.post-letter-illustration {
  margin: 0 0 1.1em; padding: 3px; border: 1px solid #cba77a; border-radius: 3px 8px 3px 3px;
  background: #f9ecd0; box-shadow: 0 2px 4px #82613d37;
}
.post-letter-illustration img { width: 100%; height: auto; border-radius: 1px 6px 1px 1px; }
.post-letter-navigation {
  display: grid; flex: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px;
  padding-top: 7px; border-top: 1px solid #b8a17061;
}
.post-letter-navigation button {
  display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 44px; padding: 6px 9px;
  border: 1px solid #b8a17080; border-radius: 4px 9px 4px 4px;
  background: linear-gradient(125deg, #2d4c49, #213b3d); color: #ffedc9; text-align: start;
}
.post-letter-navigation button:last-child { flex-direction: row-reverse; text-align: end; }
.post-letter-navigation button:disabled { border-color: #9fb5ae41; background: #1e3435; color: var(--post-room-muted); }
.post-letter-navigation button:enabled:active { filter: brightness(.86); }
.post-letter-navigation span { display: grid; min-width: 0; }
.post-letter-navigation strong { font-size: var(--text-label); }
.post-letter-navigation small { overflow: hidden; color: #c5d2c7; font-size: var(--text-small); white-space: nowrap; text-overflow: ellipsis; }

.post-letter-unseal {
  position: absolute; inset: 0;
  z-index: 2; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(ellipse at 50% 51%, #29433ef7, #0e2830f8 73%);
  animation: post-letter-fade var(--post-letter-unseal-time) ease-out both;
}
.post-envelope-opening {
  --post-envelope-art: url("assets/wind-post-letter-unsealed.webp");
  --post-envelope-tip: 92%;
  --post-envelope-edge: 42%;
  --post-envelope-mouth: polygon(0 0, 100% 0, 100% var(--post-envelope-edge), 50% var(--post-envelope-tip), 0 var(--post-envelope-edge));
  position: relative; width: clamp(8.5rem, min(72vw, 60dvh), 20rem); aspect-ratio: 630/388;
  margin-top: min(13dvh, 86px); perspective: 680px;
  animation: post-envelope-settle var(--post-letter-unseal-time) linear both;
}
@media (max-height: 470px) {
  .post-envelope-opening {
    width: clamp(7.5rem, min(68vw, 50dvh), 18rem);
    margin-top: min(24dvh, 100px);
  }
}
.post-envelope-opening > span { position: absolute; display: block; }
.post-envelope-interior, .post-envelope-pocket, .post-envelope-closed {
  inset: 0; border-radius: 7% / 10%;
}
.post-envelope-interior {
  z-index: 1; background: linear-gradient(0deg, #b88e56 45%, #906439 96%);
  border: 2px solid #c9a16a; box-shadow: inset 0 5px 11px #4d2c21ae, 0 8px 19px #061e22a6;
  animation: post-envelope-drop var(--post-letter-unseal-time) linear both;
}
.post-envelope-pocket {
  z-index: 4;
  background: var(--post-envelope-art) center / 100% 100% no-repeat;
  clip-path: polygon(0 var(--post-envelope-edge), 50% var(--post-envelope-tip), 100% var(--post-envelope-edge), 100% 100%, 0 100%);
  animation: post-envelope-drop var(--post-letter-unseal-time) linear both;
}
.post-envelope-flap {
  inset: 0; z-index: 5; transform-origin: top center; transform-style: preserve-3d;
  animation: post-envelope-open var(--post-letter-unseal-time) linear both;
}
.post-envelope-flap > i {
  position: absolute; inset: 0; border-radius: 7% / 10%;
  clip-path: var(--post-envelope-mouth); backface-visibility: hidden;
}
.post-envelope-face { background: var(--post-envelope-art) center / 100% 100% no-repeat; }
.post-envelope-lining {
  transform: rotateY(180deg);
  border: 1px solid #d5b179;
  background: linear-gradient(180deg, #c2a16dda 1%, #e6c791aa 24%, #f4dfb668 64%, #e9c7929a 87%),
    url("assets/wind-post-letter-paper.webp") center / cover no-repeat, #eed6a9;
  animation: post-envelope-lining-out var(--post-letter-unseal-time) linear both;
}
.post-envelope-closed {
  z-index: 6; background: url("assets/wind-post-letter-envelope.webp") center / 100% 100% no-repeat;
  animation: post-seal-release var(--post-letter-unseal-time) linear both;
}
.post-letter-lift {
  inset: 16% 10% 10%; z-index: 3; border: 1px solid #d1ad77; border-radius: 3px 7px 3px 3px;
  background:
    linear-gradient(180deg, #fff5dd58 48%, #98714236 49%, #f3e2be55 51%),
    url("assets/wind-post-letter-paper.webp") center / cover no-repeat, #f3e2be;
  box-shadow: inset 0 0 0 3px #fff3da9c, 0 3px 12px #492d2366;
  transform-origin: 50% 50%;
  animation: post-letter-lift var(--post-letter-unseal-time) linear both;
}
.post-letter-lift::after {
  content: ""; position: absolute; inset: 17% 14% 54%; border-top: 1px solid #98714267;
  background: repeating-linear-gradient(0deg, transparent 0 13%, #a4783f35 13% 14%) bottom / 100% 92% no-repeat;
}
.post-letter-fold {
  position: absolute; z-index: 1; inset: 1px 1px 50%; transform-origin: bottom center;
  border-radius: 2px 6px 0 0;
  background: linear-gradient(0deg, #d5b883, #f4dfb7 44%, #f9e9c7);
  box-shadow: 0 1px 0 #ba955f8a;
  animation: post-letter-unfold var(--post-letter-unseal-time) linear both;
}
@keyframes post-envelope-settle {
  0% { transform: translateY(8px) scale(.94) rotate(-3deg); animation-timing-function: cubic-bezier(.18,.68,.35,1); }
  12% { transform: translateY(0) scale(1) rotate(0); }
  100% { transform: translateY(0) scale(1) rotate(0); }
}
@keyframes post-seal-release {
  0%, 9% { opacity: 1; }
  15%, 100% { opacity: 0; }
}
@keyframes post-envelope-open {
  0% { z-index: 5; transform: rotateX(0deg); }
  12% { transform: rotateX(0deg); animation-timing-function: cubic-bezier(.3,.03,.22,1); }
  29% { transform: rotateX(-152deg); }
  30%, 65% { z-index: 0; transform: rotateX(-156deg); }
  91%, 100% { z-index: 0; transform: translateY(40%) rotateX(-156deg); visibility: hidden; }
}
@keyframes post-envelope-lining-out {
  0%, 65% { opacity: 1; }
  91%, 100% { opacity: 0; }
}
@keyframes post-envelope-drop {
  0%, 65% { transform: translateY(0); opacity: 1; }
  91%, 100% { transform: translateY(40%); opacity: 0; }
}
@keyframes post-letter-lift {
  0%, 29% { transform: translateY(20%) scaleY(.61) rotate(-1deg); opacity: 0; }
  33% { transform: translateY(13%) scaleY(.61) rotate(-1deg); opacity: 1; animation-timing-function: cubic-bezier(.35,.07,.28,1); }
  66% { transform: translateY(-84%) scaleY(.61) rotate(-3deg); opacity: 1; animation-timing-function: cubic-bezier(.2,.6,.33,1); }
  84% { transform: translateY(-66%) scale(1.09,1) rotate(-.5deg); opacity: 1; }
  100% { transform: translateY(-62%) scale(1.14,1.05) rotate(0); opacity: 0; }
}
@keyframes post-letter-unfold {
  0%, 65% { transform: rotateX(0deg); opacity: 1; }
  82%, 100% { transform: rotateX(-150deg); opacity: 0; }
}
@keyframes post-letter-fade {
  0%, 76% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes post-paper-rise {
  from { opacity: 0; transform: translateY(8px); visibility: hidden; }
  to { opacity: 1; transform: translateY(0); visibility: visible; }
}

.post-rank-page, .post-rank-reward-page { --post-room-content: 40rem; }
:is(.post-rank-control[data-ready="true"], .post-rank-claim[data-ready="true"] button)::after {
  content: ""; position: absolute; inset: 3px 0 auto auto; width: 9px; height: 9px;
  background: #dc5c4d; border: 1px solid #fff1c6; border-radius: 50%;
}
.post-podium {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.17fr) minmax(0, 1fr);
  align-items: end; gap: clamp(5px, 1.6vw, 12px); padding-top: clamp(6px, 2vw, 15px);
}
.post-podium-place {
  --podium-plate: #335963; --podium-metal: #c7e2e4;
  position: relative; display: grid; justify-items: center; align-content: end; min-width: 0;
  gap: 5px; padding: 10px 5px 9px; border: 1px solid #b1c8ce7d; border-radius: 22px 22px 4px 4px;
  color: #fff3d7; background: linear-gradient(148deg, var(--podium-plate), #1e383c 72%);
  text-align: center; box-shadow: inset 0 -3px #12282a96;
}
.post-podium-place[data-place="1"] {
  --podium-plate: #70582f; --podium-metal: #ffdda0;
  padding: 14px 7px 13px; border-color: #e4bd75; border-radius: 28px 28px 4px 4px;
  background: radial-gradient(ellipse at 50% 10%, #d3a3545e, transparent 62%), linear-gradient(150deg, var(--podium-plate), #2a433c 75%);
}
.post-podium-place[data-place="3"] { --podium-plate: #62483c; --podium-metal: #e6b692; border-color: #cb957274; }
.post-podium-badge {
  display: flex; align-items: baseline; justify-content: center; gap: 5px; width: min(100%, 6rem);
  border-bottom: 1px solid #e2c89e40; color: var(--podium-metal); font-size: var(--text-small);
  font-weight: 700; line-height: 1.1; white-space: nowrap;
}
.post-podium-badge b { font: 700 clamp(1.4rem, 5.8vw, 2.1rem)/.93 Georgia, serif; }
.post-rank-avatar {
  position: relative; display: grid; place-items: center; flex: none; width: 2rem; aspect-ratio: 1;
}
.post-podium-place .post-rank-avatar { width: min(100%, clamp(2.7rem, 13.5vw, 4.7rem)); }
.post-podium-place[data-place="1"] .post-rank-avatar { width: min(100%, clamp(3.28rem, 16vw, 5.35rem)); }
.post-podium-place[data-occupied="false"] .post-rank-avatar {
  color: var(--podium-metal); border: 1px solid #d9d2b869; background: #122c32a8;
}
.post-podium-place > strong {
  width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-label);
}
.post-podium-score { color: var(--podium-metal); font-size: var(--text-label); font-variant-numeric: tabular-nums; font-weight: 850; white-space: nowrap; }
.post-rank-body { margin-top: 14px; }
.post-rank-list-heading {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
  padding: 4px 8px 7px; border-bottom: 1px solid #c7ac7c82; color: var(--post-room-accent);
}
.post-rank-list-heading h3 { margin: 0; font-size: var(--text-label); letter-spacing: .05em; }
.post-rank-list-heading span, #post-rank-list-empty { color: var(--post-room-muted); font-size: var(--text-small); }
#post-rank-list-empty { margin: 0; padding: 13px 8px; background: #243e3e65; }
.post-rank-page .wind-post-rank-list { gap: 0; }
.post-rank-page .wind-post-rank-list li {
  grid-template-columns: 1.5rem 2rem minmax(0, 1fr) auto;
  min-height: 48px; gap: 8px; padding: 5px 8px; border: 0; border-bottom: 1px solid #a7b4a52e;
  border-radius: 0; background: #243e3e65; color: var(--post-page-cream);
}
.post-rank-page .wind-post-rank-list li:nth-child(even) { background: #193236; }
.post-rank-page .wind-post-rank-list li[data-own="true"] { background: #30504a; box-shadow: inset 2px 0 #d6b376; }
.post-rank-page .wind-post-rank-list li > strong { color: #d9b87c; }
.post-rank-page .wind-post-rank-list li > span:not(.post-rank-avatar) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-rank-page .wind-post-rank-list b { font-variant-numeric: tabular-nums; white-space: nowrap; }
#wind-post-personal {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; min-height: 44px; padding: 7px 10px;
  border: 1px solid #ba9c6f9e; border-radius: 4px 9px 4px 4px;
  color: #efd6a9; background: linear-gradient(118deg, #2d4c47, #233b3d);
}
#wind-post-personal:empty { visibility: hidden; }
#wind-post-personal strong { margin-inline-start: auto; color: #fff3d5; white-space: nowrap; }
#wind-post-personal b { padding-inline-start: 8px; border-inline-start: 1px solid #ccaa7599; font-variant-numeric: tabular-nums; white-space: nowrap; }

.post-rank-prizes { display: grid; gap: 8px; list-style: none; padding: 0; margin: 0 0 8px; }
.post-rank-prizes li, .post-rank-claim {
  min-width: 0; padding: 7px; border: 1px solid #b9a27c88; border-radius: 4px 10px 4px 4px;
  background: #233e40; color: var(--post-page-cream); font-size: var(--text-label);
}
.post-rank-prizes li { display: grid; gap: 5px; }
.post-rank-prize-place { justify-self: start; padding: 2px 7px; border-radius: 4px; background: #e2b892; color: #66412a; }
.post-rank-prizes [data-place="1"] .post-rank-prize-place { background: #f3d694; color: #65451d; }
.post-rank-prizes [data-place="2"] .post-rank-prize-place { background: #c9dfe1; color: #314f65; }
.post-rank-prize-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.post-rank-prize-item {
  display: grid; grid-template-rows: auto 3rem auto; justify-items: center; align-items: center; gap: 3px;
  min-width: 0; padding: 5px; border: 1px solid #e3c69454; border-radius: 3px 6px 3px 3px;
  background: linear-gradient(124deg, #34514e, #1c363a); text-align: center;
}
.post-rank-prize-item small { color: var(--post-room-muted); font-size: var(--text-micro); }
.post-rank-prize-item > strong { font-size: var(--text-small); line-height: 1.2; }
.post-rank-prize-visual { display: grid; place-items: center; width: 100%; height: 100%; }
.post-rank-prize-visual > .achievement-plate { width: min(100%, 11.5rem); }
.post-rank-prize-visual > .portrait-composition { width: 44px; }
.post-rank-claim small { display: block; margin-top: 2px; color: var(--post-room-muted); }
.post-rank-claims { display: grid; gap: 6px; }
.post-rank-claim { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.post-rank-claim button { position: relative; flex: none; }
.post-rank-claim[data-ready="true"] button::after { inset: 1px 1px auto auto; }
.post-rank-rules { margin: 8px 1px; color: #e6dbb7; font-size: var(--text-small); line-height: 1.55; }
#post-rank-claim-status:empty { display: none; }

.post-rewards-page { --post-room-content: 45rem; }
.post-rewards-meter p { color: #e9dfc9; font-variant-numeric: tabular-nums; white-space: nowrap; }
.post-rewards-meter p strong { color: #ffe1a1; font-size: var(--text-action); }
.post-rewards-meter #wind-post-meter {
  appearance: none; width: 100%; height: 4px; margin: 4px 0 0; overflow: hidden;
  border: 0; border-radius: 4px; background: #a3b3ac42; accent-color: #edc07b;
}
#wind-post-meter::-webkit-progress-bar { background: #a3b3ac42; }
#wind-post-meter::-webkit-progress-value { border-radius: 4px; background: linear-gradient(90deg, #be925d, #ffe0a0); }
#wind-post-meter::-moz-progress-bar { border-radius: 4px; background: linear-gradient(90deg, #be925d, #ffe0a0); }
.post-rewards-toolbar { flex: none; padding-top: 7px; }
#post-rewards-groups {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px;
  padding-bottom: 1px; border-bottom: 1px solid #cdb18065;
}
#post-rewards-groups button {
  position: relative; min-height: 44px; padding: 2px 1px 3px; border: 0; border-radius: 4px 9px 0 0;
  color: #c8d6ce; background: #243f406e; font-size: var(--text-label); white-space: nowrap;
}
#post-rewards-groups button[aria-current="true"] {
  color: #ffedc4; background: linear-gradient(0deg, #665738a8, #293f40); font-weight: 800;
}
#post-rewards-groups button[aria-current="true"]::after { content: ""; position: absolute; inset: auto 3px -1px; height: 2px; background: #d9ad6a; }
.post-room > .post-rewards-scroll { padding-top: 9px; overflow-anchor: none; }
.post-reward-group + .post-reward-group { margin-top: 16px; }
.post-reward-group h3 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 7px;
  color: var(--post-room-accent); font-size: var(--text-label); letter-spacing: .075em;
}
.post-reward-group h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, #cbb1808f, #cbb18011); }
.post-reward-group .wind-post-rewards {
  --post-rail: 13px;
  position: relative; gap: 5px; padding-left: var(--post-rail);
}
.post-reward-group .wind-post-rewards::before {
  content: ""; position: absolute; inset: 6px auto 6px 3px; width: 1px; background: #b0bdab4a;
}
.post-reward-group .wind-post-rewards li {
  position: relative; grid-template-columns: clamp(3rem, 16vw, 5rem) minmax(0, 1fr) auto;
  min-height: 57px; gap: clamp(4px, 1.6vw, 9px); padding: 5px 6px 5px 0;
  border: 1px solid #a6b5a137; border-radius: 3px 8px 3px 3px;
  background: linear-gradient(103deg, #284542, #203b3c 67%, #203637); color: #f7eacc;
}
.post-reward-group .wind-post-rewards li::before {
  content: ""; position: absolute; top: 50%; left: calc(0px - var(--post-rail) - 1px); translate: 0 -50%;
  width: 7px; height: 7px; border: 1px solid #8aa397; border-radius: 50%; background: #223b3d;
}
.post-reward-group .wind-post-rewards li[data-state="claimed"] { background: #253d3b; }
.post-reward-group .wind-post-rewards li[data-state="claimed"]::before { background: #93b6a4; }
.post-reward-group .wind-post-rewards li[data-state="ready"] {
  background: linear-gradient(102deg, #695335, #384943 56%, #2f413c); border-color: #e4bc758f;
}
.post-reward-group .wind-post-rewards li[data-state="ready"]::before { background: #ffe0a0; border-color: #f5d499; box-shadow: 0 0 8px #ffca6ba2; }
.post-reward-group .wind-post-step {
  display: grid; align-content: center; gap: 1px; align-self: stretch; padding-inline: 1px; min-width: 0;
  border-inline-end: 1px solid #d8c49535; color: var(--post-room-accent);
}
.post-reward-group .wind-post-step b { font-size: clamp(.81rem, 3.9vw, 1.06rem); line-height: 1.1; }
.post-reward-group .wind-post-step small { color: #bdc9bc; font-size: var(--text-micro); line-height: 1.12; }
.post-reward-item { display: flex; align-items: center; gap: 6px; min-width: 0; }
.post-reward-item .wind-post-loot {
  flex: none; width: clamp(1.8rem, 8vw, 2.6rem); height: auto; aspect-ratio: 1;
  border: 1px solid #d7c09458; border-radius: 4px; background: #132a2d91;
}
.post-reward-item .wind-post-loot > img { padding: 2px; }
.post-reward-item .wind-post-loot-name { min-width: 0; line-height: 1.22; }
.post-reward-item .wind-post-loot-name b { color: #f1cd87; font-variant-numeric: tabular-nums; white-space: nowrap; }
.post-reward-item .wind-post-loot-name small { margin-top: 2px; color: #c0cfc6; font-size: var(--text-micro); }
.post-title-reward .achievement-plate { width: min(100%, 16.5rem); }
.post-reward-state {
  display: flex; align-items: center; gap: 2px; color: #c1cec2; white-space: nowrap; font-size: var(--text-micro);
}
.post-reward-state .icon { width: 12px; height: 12px; }
[data-state="claimed"] > .post-reward-state { color: #b5d7be; }
.wind-post-rewards button.post-reward-claim, .post-reward-claim {
  min-height: 44px; min-width: 44px; padding: 2px 8px; border: 1px solid #d7ab68; border-radius: 4px 8px 4px 4px;
  color: #402f22; background: linear-gradient(145deg, #f8dba4, #e5b577); font-size: var(--text-label); font-weight: 850;
  white-space: nowrap; box-shadow: inset 0 -2px #a7774547;
}
.post-reward-claim:enabled:active { filter: brightness(.9); }
.post-reward-claim:disabled { opacity: .65; }
@media (min-width: 40rem) and (min-aspect-ratio: 4/5) {
  #post-story-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-letter-entry { grid-template-columns: clamp(4.25rem, 12vw, 7.25rem) minmax(0, 1fr) 24px; }
  .post-room-hero { padding-inline: max(var(--post-room-gutter), calc((100% - var(--post-room-content)) / 2)); }
}
@media (max-height: 470px) {
  .post-room-hero {
    min-height: calc(var(--post-back-top) + 66px); align-items: center;
    padding: 6px calc(var(--post-room-gutter) + 118px) 6px calc(var(--post-back-inset) + var(--post-back-size) + 9px);
  }
  .post-room-title h2 { font-size: clamp(1.3rem, 4.9vw, 1.75rem); }
  .post-rank-page .post-room-hero { padding-right: calc(var(--post-back-inset) + var(--post-rank-width) + 8px); }
  .post-letter-page .post-room-title > h2 { font-size: clamp(1.22rem, 4.8vw, 1.7rem); }
  .post-room-title p { margin-top: 4px; }
}
@media (max-width: 27rem) and (max-height: 470px) {
  .post-room-hero { padding-right: var(--post-room-gutter); }
  .post-rank-page .post-room-hero {
    align-items: end;
    padding: calc(var(--post-back-top) + var(--post-back-size) + 4px) var(--post-room-gutter) 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .post-letter-unseal { display: none; }
  .post-letter-page[data-unseal="true"] .post-letter-paper { animation: none; }
  .post-letter-entry { transition: none; }
}
