@font-face {
  font-family: Prompt;
  src: url("/assets/fonts/Prompt-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Prompt;
  src: url("/assets/fonts/Prompt-Medium.ttf") format("truetype");
  font-weight: 500 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0e0f16;
  --surface: #181a25;
  --line: #383b50;
  --text: #f3f3fb;
  --muted: #b1b3c9;
  --accent: #c5bbfc;
  --gold: #f3d4a6;
  --edge: clamp(13px, 2.7vw, 44px);
  --gap: clamp(14px, 2vw, 28px);
  --max-width: 1440px;
  font-family: Prompt, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; color: var(--text); background: var(--bg); }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .42; cursor: default; }
:focus-visible { outline: 2px solid #dbd3ff; outline-offset: 3px; }
h1, h2, h3, p, ul, ol { margin: 0; }
img { display: block; max-width: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.page-width { width: min(calc(100% - 2 * var(--edge)), var(--max-width)); margin-inline: auto; }

.battle-pass-navigation { background: #151620; border-bottom: 1px solid #35374b; }
.battle-pass-nav-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.patch-back { display: flex; align-items: center; gap: .45em; min-height: 42px; font-size: .86rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.patch-back span:first-child { color: var(--accent); font-size: 1.18em; }
.patch-back:hover { color: var(--text); }
.page-tabs { display: flex; gap: clamp(5px, 1.2vw, 18px); }
.page-tabs button { position: relative; min-height: 52px; padding: 0 .85em; border: 0; background: transparent; color: var(--muted); font-size: 1.02rem; white-space: nowrap; }
.page-tabs button:hover { color: var(--text); background: #d0c0ff0b; }
.page-tabs button[aria-selected="true"] { color: #eee9ff; font-weight: 600; }
.page-tabs button[aria-selected="true"]::after { content: ""; position: absolute; inset: auto 12% 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); box-shadow: 0 -2px 14px #a58fff92; }

.hero { position: relative; isolation: isolate; overflow: hidden; background: #121321; border-bottom: 1px solid #35374b; }
.hero::before, .hero::after { position: absolute; inset: 0; z-index: -1; content: ""; pointer-events: none; }
.hero::before { background: url("ss2/art/ss2-feather-masthead.webp") 66% 55% / cover no-repeat; }
.hero::after { background: linear-gradient(0deg, #0e0f16f2, transparent 64%), linear-gradient(90deg, #121421a8, #11132130 53%, #0e0f1638); }
.hero-inner { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: var(--gap); min-height: clamp(190px, 18vw, 280px); padding-block: 22px 32px; }
.featherfall { --fall-distance: 332px; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.featherfall i {
  --alpha: .36;
  --drift: 25px;
  position: absolute;
  top: -40px;
  left: var(--left);
  width: var(--size);
  aspect-ratio: 1;
  opacity: 0;
  background: url("ss2/art/ss2-feather-frames.png") 0 0 / 400% 400% no-repeat;
  animation: feather-descent var(--duration) linear var(--delay) infinite, ornament-frames 4s steps(1, end) var(--delay) infinite;
}
.featherfall i:nth-child(1) { --left: 7%; --size: 24px; --duration: 28s; --delay: -9s; }
.featherfall i:nth-child(2) { --left: 21%; --size: 18px; --duration: 30s; --delay: -20s; --alpha: .23; }
.featherfall i:nth-child(3) { --left: 38%; --size: 29px; --duration: 26s; --delay: -16s; --drift: -28px; }
.featherfall i:nth-child(4) { --left: 51%; --size: 15px; --duration: 32s; --delay: -10s; --alpha: .25; }
.featherfall i:nth-child(5) { --left: 62%; --size: 36px; --duration: 29s; --delay: -22s; --alpha: .47; }
.featherfall i:nth-child(6) { --left: 73%; --size: 19px; --duration: 31s; --delay: -6s; --drift: -18px; }
.featherfall i:nth-child(7) { --left: 84%; --size: 28px; --duration: 27s; --delay: -15s; }
.featherfall i:nth-child(8) { --left: 94%; --size: 14px; --duration: 33s; --delay: -24s; --alpha: .28; --drift: -21px; }
@keyframes feather-descent {
  0% { transform: translate(0, 0) rotate(-21deg) scaleX(.86); opacity: 0; }
  17% { opacity: var(--alpha); }
  34% { transform: translate(var(--drift), calc(var(--fall-distance) * .34)) rotate(13deg) scaleX(.78); }
  68% { transform: translate(calc(var(--drift) * -.4), calc(var(--fall-distance) * .68)) rotate(-14deg) scaleX(1); }
  83% { opacity: var(--alpha); }
  100% { transform: translate(calc(var(--drift) * .6), var(--fall-distance)) rotate(22deg) scaleX(.8); opacity: 0; }
}
.hero-inner h1 { width: min(60%, 580px); }
.hero-wordmark {
  width: 100%; height: auto; mix-blend-mode: lighten;
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 96%, transparent), linear-gradient(transparent, #000 8%, #000 93%, transparent);
  mask-composite: intersect;
}
.hero-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 13px; width: min(40%, 322px); padding: 14px 15px; border: 1px solid #cac4e34a; border-radius: 12px; background: #131521df; }
.hero-readout { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; grid-column: 1 / -1; font-size: .92rem; color: #dedaf0; white-space: nowrap; }
.hero-readout strong { font-size: 1.63rem; line-height: 1; color: #f3edff; }
.hero-readout small { font-size: .63em; font-weight: 400; color: var(--muted); }
progress { display: block; appearance: none; width: 100%; height: 10px; padding: 0; border: 0; border-radius: 99px; background: #39374c; color: var(--accent); overflow: hidden; }
progress::-webkit-progress-bar { background: #39374c; }
progress::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, #9b85ed, #e4d9ff); }
progress::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, #9b85ed, #e4d9ff); }
.quick-buy { min-height: 36px; padding: .14em .67em; border: 1px solid #9991be; border-radius: 7px; background: #29253e; color: #f1e9ff; font-size: .83rem; white-space: nowrap; }
.quick-buy span { color: var(--accent); font-size: 1.12em; }
.quick-buy:hover { background: #3a3255; }

.season-content { padding-block: clamp(15px, 2.3vw, 33px) 42px; }
.pane { min-width: 0; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.reward-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(260px, 23vw, 328px); gap: var(--gap); align-items: start; }
.reward-board { min-width: 0; }
.reward-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reward-toolbar h2, .section-title { font-size: clamp(1.22rem, 1.95vw, 1.8rem); font-weight: 600; line-height: 1.3; }
.reward-controls { display: flex; align-items: center; gap: 7px; }
.level-jump { display: flex; align-items: center; gap: .45em; color: var(--muted); white-space: nowrap; font-size: .85rem; }
.level-jump input { width: 3.15em; height: 37px; padding: .1em .3em; color: var(--text); text-align: center; background: #171924; border: 1px solid #504e67; border-radius: 8px; }
.level-jump input::-webkit-inner-spin-button, .level-jump input::-webkit-outer-spin-button { appearance: none; }
.arrow { display: grid; flex-shrink: 0; place-items: center; width: 39px; height: 39px; padding: 0; border: 1px solid #504e69; border-radius: 8px; background: #212131; color: #e4dcff; }
.arrow::before { content: ""; width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateX(-18%) rotate(45deg); }
.arrow.previous::before { transform: translateX(18%) rotate(-135deg); }
.arrow:hover:not(:disabled) { background: #363048; }
.reward-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0 11px; }
#reward-range { font-size: .84rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.summary-open { display: inline-flex; align-items: center; margin-left: auto; min-height: 37px; padding: .25em .7em; border: 1px solid #6e6388; border-radius: 8px; color: #eee8ff; background: #29253b; font-size: .82rem; white-space: nowrap; text-decoration: none; }
.summary-open:hover { background: #3a3351; }
.premium-entry { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .25em .75em; min-height: 37px; padding: .25em .67em; border: 1px solid #8c7356; border-radius: 8px; color: var(--gold); background: #332b24; font-size: .82rem; white-space: nowrap; }
.premium-entry strong { padding-left: .64em; border-left: 1px solid #af8d65; color: #fff0d6; }
.premium-entry:hover { background: #483927; }

.reward-viewport, .operator-viewport { overflow-x: auto; scrollbar-color: #68617d #1a1b26; cursor: grab; }
.is-dragging, .is-dragging * { cursor: grabbing !important; user-select: none; }
.reward-viewport img, .operator-viewport img { -webkit-user-drag: none; }
.reward-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(113px, 1fr); min-width: 0; gap: 9px; margin: 0; padding: 3px 3px 8px; list-style: none; }
.reward-card { min-width: 0; overflow: hidden; background: #191a27; border: 1px solid #35364c; border-radius: 11px; }
.reward-card[data-selected="true"] { border-color: #b4a4f1; background: #262039; box-shadow: inset 0 0 0 1px #b4a4f13b; }
.level-head { display: block; width: 100%; min-height: 50px; padding: 0; background: #27273a; border: 0; border-bottom: 1px solid #3d3c56; font-size: clamp(1.23rem, 2.05vw, 1.8rem); font-variant-numeric: tabular-nums; font-weight: 600; line-height: 1; }
.level-head[aria-pressed="true"] { color: #f3edff; border-color: #8f7bb5; background: #423657; }
.reward-cell { display: grid; align-content: center; gap: .3em; width: 100%; min-height: 92px; padding: 6px 5px; border: 0; border-bottom: 1px solid #393a4e; background: transparent; text-align: center; }
.reward-option[data-track="premium"] .reward-cell { border-bottom: 0; background: #a27a3b10; }
.reward-cell[aria-pressed="true"] { background: #ccb9ff23; box-shadow: inset 3px 0 #c7b4ff; }
.reward-option[data-track="premium"] .reward-cell[aria-pressed="true"] { background: #dcb87724; box-shadow: inset 3px 0 #dcb877; }
.reward-cell:hover { filter: brightness(1.26); background-color: #e7dfff13; }
.reward-cell:focus-visible, .level-head:focus-visible { outline-offset: -4px; }
.reward-track { color: #c3c4dc; font-size: .8rem; }
.reward-option[data-track="premium"] .reward-track { color: var(--gold); }
.reward-items { display: flex; justify-content: center; align-items: center; gap: 2px; min-width: 0; }
.reward-items img { width: 42%; max-width: 47px; height: 48px; object-fit: contain; filter: drop-shadow(0 2px 3px #000a); }
.reward-cell[data-item-count="3"] img { width: 30%; max-width: 43px; height: 43px; }
.reward-cell[data-item-count="4"] img { width: 23%; }
.reward-cell img[data-item="synthesis_core_s"] { scale: 1.14; }

.detail-card { display: grid; gap: 12px; padding: clamp(13px, 1.7vw, 21px); border-top-color: #8c79bd; background: linear-gradient(154deg, #232036, #191b29 57%); }
.detail-heading { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 4px; }
.detail-label { grid-column: 1 / -1; color: var(--muted); font-size: .79rem; }
.detail-heading h2 { font-size: clamp(1.28rem, 1.8vw, 1.75rem); line-height: 1.12; }
.track-title { justify-self: end; padding: .22em .56em; border: 1px solid #696086; border-radius: 6px; background: #2c2843; color: #e1d7ff; font-size: .77rem; }
.track-title[data-track="premium"] { color: var(--gold); border-color: #8c7356; background: #372e26; }
.detail-items { display: grid; gap: 1px; list-style: none; padding: 0; }
.detail-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 48px; padding-block: 5px; border-bottom: 1px solid #38374b; font-size: .91rem; }
.detail-item img { width: 100%; height: 34px; object-fit: contain; }
.detail-item[data-item="synthesis_core_s"] img { scale: 1.1; }
.detail-item strong { font-size: .85rem; white-space: nowrap; }
.detail-item-label { min-width: 0; overflow-wrap: anywhere; }
.choose-operator { display: block; width: fit-content; min-height: 28px; margin-top: .2em; padding: .12em .6em; border: 1px solid #9a88c6; border-radius: 7px; background: #29233d; color: #efe7ff; font-size: .77rem; }
.choose-operator:hover { background: #453458; }
.operator-required { color: var(--gold); font-size: .78rem; }
.detail-track > .action { width: 100%; }
.action { min-height: 44px; padding: .36em .8em; border: 1px solid transparent; border-radius: 8px; color: #1d1632; background: #d6c8ff; font-weight: 600; font-size: .95rem; text-align: center; white-space: nowrap; }
.action:hover:not(:disabled) { filter: brightness(1.1); }
.action:active:not(:disabled) { translate: 0 1px; }
.action-gold { background: #efcf9e; color: #241909; }
.action-secondary { background: #302c44; color: #f0eaff; border-color: #615777; }

.mission-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(250px, 27vw, 360px); align-items: start; gap: var(--gap); }
.mission-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; margin-bottom: 13px; }
.daily-reset { color: var(--muted); font-size: .84rem; }
.daily-reset time { color: var(--accent); }
.daily-quests { display: grid; padding: 0; gap: 6px; list-style: none; }
.mission-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: clamp(8px, 2vw, 24px); align-items: center; min-height: 59px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; background: #1b1b29; }
.mission-row h3 { font-size: .94rem; font-weight: 500; }
.mission-goal { font-size: .83rem; color: var(--muted); white-space: nowrap; }
.mission-row strong { color: var(--accent); font-size: .84rem; white-space: nowrap; }
.mission-progress { padding: 18px; border-top-color: #8c79bd; }
.progress-readout { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-block: .55em; color: var(--muted); font-size: .84rem; }
.progress-readout b { color: var(--text); font-size: 1.36em; }
.rules { display: grid; gap: 7px; padding: 0; margin-top: 14px; list-style: none; }
.rules li { border-top: 1px solid #37374a; padding-top: 7px; font-size: .88rem; }
.rules strong { color: var(--accent); }
.rules p { margin-top: .35em; font-size: .79rem; color: var(--muted); }

.plan-layout { display: grid; gap: 12px; }
.plan { min-width: 0; padding: clamp(14px, 2.4vw, 31px); }
.plan h2 { font-size: clamp(1.24rem, 1.9vw, 1.7rem); }
.plan-premium { display: flex; gap: 12px 22px; align-items: center; justify-content: space-between; border-color: #967958; background: radial-gradient(ellipse at right, #7051334d, transparent 59%), linear-gradient(120deg, #322921, #1c1c2a 72%); }
.plan-premium h2 { color: var(--gold); font-size: clamp(1.51rem, 2.6vw, 2.25rem); }
.plan-premium ul { margin-top: 4px; padding-inline-start: 1.2em; font-size: .92rem; color: #efe3d8; }
.plan-premium li + li { margin-top: .22em; }
.plan-premium li strong { color: var(--gold); }
.plan-buy { display: grid; justify-items: stretch; gap: 8px; text-align: right; }
.price { white-space: nowrap; color: var(--muted); }
.price strong { color: var(--text); font-size: 1.35em; }
.plan-buy .price strong { color: #ffe1b8; font-size: 2em; line-height: 1; }
.plan-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-free > p:not(.price) { color: var(--muted); font-size: .9rem; }
.plan-level { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; }

.extra-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
.extra-layout h2 { font-size: clamp(1.18rem, 1.85vw, 1.62rem); }
.cosmetic-panel { position: relative; isolation: isolate; display: flex; flex-direction: column; overflow: hidden; padding: clamp(12px, 1.8vw, 23px); background: radial-gradient(ellipse at center, #46406b70, #191924 74%); }
.cosmetic-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; }
.cosmetic-modes { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 9px; background: #131320; border: 1px solid #555172; }
.cosmetic-modes button { border: 0; min-height: 36px; padding: 0 .7em; background: transparent; border-radius: 6px; color: #e6e0f4; font-size: .82rem; }
.cosmetic-modes button[aria-pressed="true"] { background: #c9b9f9; color: #1d1336; }
.cosmetic-art { --frame-size: clamp(150px, 18vw, 194px); position: relative; display: grid; place-items: center; flex: 1; min-height: max(215px, var(--frame-size)); isolation: isolate; }
.cosmetic-visual { position: relative; display: grid; place-items: center; width: 100%; }
.cosmetic-visual > img { grid-area: 1 / 1; width: min(84%, 338px); height: auto; filter: drop-shadow(0 0 14px #bbcfff52); }
.cosmetic-art[data-kind="profile"] .cosmetic-visual > img { width: var(--frame-size); }
.cosmetic-leaderboard {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(6px, 1.6vw, 18px);
  width: 100%;
  min-height: clamp(64px, 8vw, 94px);
  padding-inline: clamp(9px, 1.8vw, 22px);
  overflow: hidden;
  border: 1px solid #8aabc98c;
  border-radius: 8px;
  background: #102136;
}
.leaderboard-background { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 74%; }
.cosmetic-leaderboard::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0c192868, transparent 62%, #0c192850); }
.cosmetic-leaderboard .leaderboard-feathers { --fall-distance: 121px; display: none; z-index: -1; }
.cosmetic-leaderboard .leaderboard-feathers i:nth-child(2) { --left: 52%; }
.cosmetic-leaderboard .leaderboard-feathers i:nth-child(3) { --left: 81%; }
.cosmetic-art[data-motion="playing"] .leaderboard-feathers { display: block; }
.leaderboard-place { color: #f5ddad; font-weight: 700; }
.leaderboard-avatar { width: clamp(27px, 4.2vw, 39px); height: auto; aspect-ratio: 1; object-fit: cover; object-position: center top; border-radius: 50%; }
.leaderboard-pilot { color: #f3f6ff; font-size: clamp(.78rem, 1.5vw, 1rem); overflow-wrap: anywhere; text-shadow: 0 1px 3px #102136; }
.leaderboard-score { padding: 3px 7px; border-radius: 4px; background: #081329cf; color: #ebf4ff; font-size: clamp(.68rem, 1.35vw, .94rem); font-variant-numeric: tabular-nums; }
.cosmetic-avatar { grid-area: 1 / 1; width: calc(var(--frame-size) * .545); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #343054; transform: translateY(calc(var(--frame-size) * -.045)); }
.cosmetic-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
#cosmetic-caption { position: absolute; max-width: 76%; color: #272238; font-size: clamp(.85rem, 1.4vw, 1.1rem); font-weight: 600; }
.cosmetic-art[data-motion="playing"]:is([data-kind="name"], [data-kind="chat"]) .cosmetic-visual > img { animation: frame-glow 2.8s ease-in-out infinite alternate; }
@keyframes frame-glow { from { filter: drop-shadow(0 0 4px #ccd9ff47); } to { filter: brightness(1.24) drop-shadow(0 0 17px #c3d8ffb3); } }
.cosmetic-footer { display: flex; align-items: center; gap: 8px; justify-content: space-between; color: var(--muted); font-size: .8rem; }
#motion-toggle { min-width: 39px; min-height: 38px; padding: .2em; border: 1px solid #9384b6; border-radius: 8px; background: #29243d; color: #eee7ff; }
.operator-panel { display: grid; align-content: start; gap: 9px; padding: clamp(12px, 1.8vw, 23px); }
.operator-rules { font-size: .83rem; color: var(--muted); }
#operator-samples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
#open-operator-preview { justify-self: end; min-width: min(100%, 144px); }

dialog { width: min(91vw, 485px); padding: 1.25rem; border: 1px solid #766b96; border-radius: 14px; background: #1e1d2e; color: var(--text); text-align: center; }
dialog::backdrop { background: #080812c7; }
dialog h2 { color: #eee7ff; font-size: 1.4rem; }
dialog p { margin: .8rem 0 1.15rem; }
dialog .action { width: 100%; }
#confirm-ss2-purchase, #ss2-theme-profile { margin-bottom: 8px; }
#ss2-purchase-status { color: var(--muted); font-size: .92rem; }
.level-buy-picker { margin: .75rem 0 1rem; padding: .85rem 1rem; border: 1px solid #796b49; border-radius: 10px; background: #292438; text-align: left; }
.level-buy-picker label { display: flex; justify-content: space-between; gap: 1rem; font-weight: 700; }
.level-buy-picker output, .level-buy-picker strong { color: #f5cf8d; }
.level-buy-picker input { width: 100%; margin: .9rem 0 .25rem; accent-color: #edc36e; cursor: pointer; }
.level-buy-picker p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.reward-summary { grid-column: 1 / -1; }
.reward-summary, #reward-by-level { scroll-margin-block-start: 6rem; }
.summary-heading { margin-bottom: 1em; }
.summary-heading h2 { margin: 0; font-size: clamp(1.18rem, 2vw, 1.5rem); }
.summary-heading p { margin: .35em 0 0; color: var(--muted); font-size: .9rem; }
.summary-cosmetics { margin-bottom: var(--gap); padding: clamp(.75rem, 1.7vw, 1.25rem); }
.summary-cosmetics h3 { margin: 0; font-size: 1.05rem; }
.summary-cosmetics .bundle-note { margin: .2rem 0 .75rem; color: var(--gold); font-size: .87rem; }
.summary-cosmetic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.5rem, 1.3vw, 1rem); }
.summary-cosmetic-grid figure { margin: 0; min-width: 0; text-align: center; }
.summary-cosmetic-art { display: grid; place-items: center; height: clamp(74px, 10vw, 112px); margin-bottom: .5rem; padding: .45rem; border: 1px solid var(--line); border-radius: 8px; background: radial-gradient(ellipse, #29364d, #121725 78%); }
.summary-cosmetic-art img { display: block; width: 100%; height: 100%; max-height: 96px; min-height: 0; object-fit: contain; }
.summary-cosmetic-profile img { max-width: 84px; }
.summary-cosmetic-grid figcaption { font-size: .9rem; overflow-wrap: anywhere; }
.summary-tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--gap); }
.summary-track { overflow: hidden; }
.summary-track > h3 { margin: 0; padding: .7rem 1rem; border-bottom: 1px solid var(--line); color: #d6f5ff; background: #273449; font-size: 1rem; }
.summary-track[data-track="premium"] > h3 { color: var(--gold); background: #382e30; }
.summary-items { list-style: none; margin: 0; padding: 0 .85rem; }
.summary-items > li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: .65rem; min-height: 52px; padding: .4rem 0; }
.summary-items > li + li { border-top: 1px solid var(--line); }
.summary-items img { width: 36px; height: 36px; object-fit: contain; }
.summary-items li > span { overflow-wrap: anywhere; }
.summary-items small { display: block; margin-top: .12rem; color: var(--muted); font-size: .83rem; }
.summary-items strong { color: #e8f6ff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-track[data-track="premium"] .summary-items strong { color: var(--gold); }
.summary-purchase { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin: 0; padding: .8rem .85rem; border-top: 1px solid var(--line); }
.summary-purchase strong { color: var(--gold); }
#operator-dialog { width: min(94vw, 600px); padding: clamp(.65rem, 1.2vw, 1.2rem); }
#operator-dialog > p { margin: .35em 0 .65em; color: var(--muted); font-size: clamp(.75rem, 1.26vw, 1rem); }
.operator-carousel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.operator-carousel .arrow { width: 34px; height: 44px; }
.operator-viewport { padding: .45rem .2rem .65rem; }
#operator-options { display: flex; gap: 8px; }
#operator-options .operator-option { flex: 0 0 calc((100% - 16px) / 3); }
.operator-option { display: block; min-width: 0; padding: 0; position: relative; overflow: hidden; border-radius: 8px; border: 1px solid #625a7c; background: #26243a; aspect-ratio: .88; }
.operator-option[aria-pressed="true"] { border-color: #d2b9ff; box-shadow: 0 0 9px #b38fff80; }
.operator-option img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.operator-option span { position: absolute; inset: auto 0 0; display: grid; place-items: center; min-height: 2.8em; padding: .25em .28em; background: #141224ec; overflow-wrap: anywhere; line-height: 1.15; font-size: clamp(.65rem, 1.05vw, .85rem); }
.operator-option[aria-pressed="true"] span { background: #50386d; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1.45fr; gap: .6rem; margin-top: .75rem; }

@media (min-width: 901px) {
  .reward-cell { min-height: 99px; }
  .reward-items img { max-width: 51px; height: 50px; }
  .reward-cell[data-item-count="3"] img { max-width: 46px; height: 46px; }
  .detail-item, .mission-row h3 { font-size: 1rem; }
  #reward-range, .mission-row strong { font-size: .9rem; }
}

@media (max-width: 900px) {
  .featherfall { --fall-distance: 211px; }
  .hero-inner { min-height: 160px; padding-bottom: 23px; }
  .reward-layout { grid-template-columns: minmax(0, 1fr); }
  .reward-cards { grid-auto-columns: minmax(108px, 1fr); }
  .detail-card { width: 100%; }
  .extra-layout { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 661px) and (max-width: 900px) {
  .detail-items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 660px) {
  :root { --edge: 12px; }
  .battle-pass-nav-inner { gap: 5px; }
  .patch-back { justify-content: center; width: 38px; }
  .patch-back span:last-child { display: none; }
  .page-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .page-tabs button { min-height: 44px; padding: 0; text-align: center; font-size: clamp(.77rem, 3.35vw, .89rem); }
  .hero-inner { min-height: 0; flex-direction: column; align-items: stretch; gap: 10px; padding-block: 10px 8px; }
  .hero-inner h1 { width: min(92%, 324px); }
  .hero-progress { width: 100%; padding: 7px 10px; grid-template-columns: auto minmax(18px, 1fr) auto; gap: 7px; }
  .hero-readout { grid-column: auto; font-size: .75rem; gap: 6px; }
  .hero-readout strong { font-size: 1.05rem; }
  .quick-buy { min-height: 32px; font-size: .74rem; }
  .hero::before { background-position: 72% center; }
  .hero::after { background: linear-gradient(0deg, #0e0f16c9, #0e0f1620), linear-gradient(90deg, #0e0f16c0, #0e0f1640 73%); }
  .featherfall { --fall-distance: 194px; }
  .featherfall i:nth-child(2), .featherfall i:nth-child(4), .featherfall i:nth-child(8) { display: none; }
  .season-content { padding-top: 11px; }
  .detail-card { gap: 10px; }
  .reward-toolbar h2 { font-size: clamp(.93rem, 4vw, 1.25rem); }
  .reward-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .reward-controls { min-width: 0; margin-left: 0; justify-content: flex-end; gap: 5px; }
  .level-jump { font-size: .72rem; }
  .arrow { width: 34px; height: 36px; }
  .reward-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 7px 0; }
  .reward-tools > * { min-width: 0; }
  .reward-viewport { min-width: 0; width: 100%; }
  .reward-tools .summary-open { margin-left: 0; justify-content: center; }
  #claim-all { padding: .5em; font-size: .82rem; }
  .summary-cosmetic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-tracks { grid-template-columns: minmax(0, 1fr); }
  .reward-cards { grid-auto-columns: clamp(101px, 29vw, 158px); gap: 7px; }
  .level-head { min-height: 42px; }
  .reward-cell { min-height: 73px; gap: .15em; }
  .reward-track { font-size: .77rem; }
  .reward-items img { height: 36px; }
  .reward-cell[data-item-count="3"] img { height: 35px; }
  .mission-layout, .extra-layout, .plan-options { grid-template-columns: 1fr; }
  .mission-row { min-height: 48px; padding-inline: 8px; }
  .mission-row h3 { font-size: .8rem; }
  .plan-premium { align-items: stretch; flex-direction: column; }
  .plan-buy { grid-template-columns: auto 1fr; align-items: center; text-align: left; }
  #operator-options .operator-option { flex-basis: calc((100% - 8px) / 2); }
}
@media (max-width: 350px) {
  .hero-inner { padding-block: 8px; }
  .level-jump { gap: 3px; }
  .level-jump input { width: 2.8em; }
  .reward-toolbar { gap: 4px; }
  .reward-toolbar h2 { font-size: .87rem; }
  .reward-tools { gap: 5px; }
  .summary-open, .premium-entry { font-size: .75rem; }
  .hero-readout small { font-size: .65em; }
  .detail-card { gap: 8px; }
  .detail-item { min-height: 40px; padding-block: 3px; }
  .detail-item img { height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .featherfall { display: none; }
  *, *::before, *::after { animation-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Each position selects one of the sixteen generated animation cells. */
.feather-sprite, .sparkle-sprite, .wing-sprite { display: inline-block; flex: none; width: 38px; height: 38px; background: url("ss2/art/ss2-feather-frames.png") 0 0 / 400% 400% no-repeat; animation: ornament-frames 4s steps(1, end) infinite; pointer-events: none; }
.sparkle-sprite { background-image: url("ss2/art/ss2-sparkle-frames.png"); width: 27px; height: 27px; animation-duration: 5s; }
.wing-sprite { background-image: url("ss2/art/ss2-wing-frames.png"); width: 64px; height: 64px; animation-duration: 5.5s; }
.hero-ornament { position: absolute; right: 35%; top: 5%; width: 170px; height: 170px; opacity: .55; pointer-events: none; filter: drop-shadow(0 0 15px #bde6ff44); }
.hero-ornament .feather-sprite { width: 100%; height: 100%; }
.reward-toolbar h2, .summary-heading h2, .summary-cosmetics h3 { display: flex; align-items: center; gap: .45rem; }
.summary-heading .wing-sprite { margin-block: -12px; }
.cosmetic-preview { grid-column: 1 / -1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cosmetic-preview > summary { cursor: pointer; padding: 15px 18px; color: #dae6fb; }
.cosmetic-preview > .extra-layout { padding: 0 14px 14px; }
@media(max-width:660px) { .hero-ornament { width: 95px; height: 95px; right: 4%; top: 0; opacity: .3; } .summary-heading .wing-sprite { width: 48px; height: 48px; } }
@media(prefers-reduced-motion:reduce) { .feather-sprite, .sparkle-sprite, .wing-sprite { animation: none; } }
@keyframes ornament-frames {
  0% { background-position: 0.000000% 0.000000%; }
  6.25% { background-position: 33.333333% 0.000000%; }
  12.5% { background-position: 66.666667% 0.000000%; }
  18.75% { background-position: 100.000000% 0.000000%; }
  25% { background-position: 0.000000% 33.333333%; }
  31.25% { background-position: 33.333333% 33.333333%; }
  37.5% { background-position: 66.666667% 33.333333%; }
  43.75% { background-position: 100.000000% 33.333333%; }
  50% { background-position: 0.000000% 66.666667%; }
  56.25% { background-position: 33.333333% 66.666667%; }
  62.5% { background-position: 66.666667% 66.666667%; }
  68.75% { background-position: 100.000000% 66.666667%; }
  75% { background-position: 0.000000% 100.000000%; }
  81.25% { background-position: 33.333333% 100.000000%; }
  87.5% { background-position: 66.666667% 100.000000%; }
  93.75% { background-position: 100.000000% 100.000000%; }
  100% { background-position: 0% 0%; }
}

.detail-tracks { display: grid; gap: 18px; }
.detail-track { display: grid; gap: 9px; min-width: 0; }
.detail-track + .detail-track { border-top: 1px solid #6d607e; padding-top: 17px; }
.detail-track .track-title { justify-self: start; font-weight: 500; }
@media(min-width:661px) and (max-width:900px) {
 .detail-tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
 .detail-track + .detail-track { border-top: 0; padding-top: 0; border-left: 1px solid #6d607e; padding-left: 18px; }
 .detail-items { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 901px) {
  .reward-board { align-self: stretch; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr); grid-template-areas: "status" "toolbar" "tools" "cards"; }
  .reward-board > .bp-action-status { grid-area: status; }
  .reward-board > .reward-toolbar { grid-area: toolbar; }
  .reward-board > .reward-tools { grid-area: tools; }
  .reward-board > .reward-viewport { grid-area: cards; }
  .reward-viewport { min-height: 0; }
  .reward-cards { height: 100%; padding-bottom: 0; }
  .reward-card { display: grid; grid-template-rows: 50px repeat(2, minmax(99px, 1fr)); }
  .reward-cell { height: 100%; }
}

/* Keep the reward board steady when the selected level changes. */
.reward-viewport { cursor: grab; }
.reward-viewport.is-dragging { cursor: grabbing; }
@media (min-width: 901px) {
  .reward-board, .detail-card { height: 610px; }
  .detail-card { align-content: start; overflow-y: auto; }
}

#ss2-theme-profile:not([hidden]) { display: flex; align-items: center; justify-content: center; width: 100%; }

[hidden]{display:none!important}.bp-action-status:empty{display:none}.bp-action-status{grid-column:1/-1;margin:0;max-width:100%;font-size:.95rem;color:#cde7f3}
.reward-cell[data-locked="true"]{position:relative}.premium-lock{position:absolute;right:10px;top:10px;font-size:20px;line-height:1;filter:drop-shadow(0 1px 3px #000)}
.reward-cell[data-received="true"]::after{content:'✓';position:absolute;right:10px;bottom:10px;color:#8ce9be;font-weight:700}
.reward-cell{position:relative}.action:disabled{cursor:default;opacity:.6}dialog [hidden]{display:none!important}

/* Show the same cropped strip as an actual Leaderboard row. The shared
   Leaderboard and card-theme styles own its image, position and row height. */
.summary-cosmetic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.summary-cosmetic-leaderboard { grid-column: 1 / -1; }
#leaderboard.summary-leaderboard-preview { width: 100%; min-width: 0; background: none; }
#leaderboard.summary-leaderboard-preview .leaderboard-panel { border-radius: 8px; box-shadow: none; }
