/* Raven Network one-page store. Mobile first. No web fonts, no framework. */
:root {
  --bg: #110a24; --bg2: #1a0f3a; --panel: #21133f; --panel2: #2c1b58; --line: #43307f; --deep: #0a0518;
  --ink: #fff; --mute: #c6bbe8; --dim: #9d90c7;
  --gold: #ffd23f; --gold-hi: #ffe675; --gold-lo: #f7b90f; --gold-edge: #a86f00; --on-gold: #2a1500;
  --all: #b49bff; --gens: #3ccbff; --ffa: #ff6a4d; --vip: #55ff55;
  --font: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1240px; --gut: 16px; --tabs-h: 62px;
  --accent: var(--all);
}
body[data-mode="gens"] { --accent: var(--gens); }
body[data-mode="ffa"] { --accent: var(--ffa); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; font: 500 15px/1.4 var(--font); color: var(--ink); background: var(--bg);
  background-image: radial-gradient(900px 480px at 50% -120px, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%), linear-gradient(180deg, var(--bg2), var(--bg) 620px);
  background-repeat: no-repeat;
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }
img, svg { display: block; }
.sprite { position: absolute; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--gold); color: var(--on-gold); font-weight: 800; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 10px; }
.buy:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px #6a3cff, 0 4px 0 var(--gold-edge); }
.ico { width: 1em; height: 1em; flex: none; }

/* ---------- sale strip ---------- */
.sale { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 6px 12px; background: linear-gradient(90deg, #ffb41f, #ffd23f 40%, #ffe675 60%, #ffb41f); color: var(--on-gold); font-size: 13px; font-weight: 700; text-align: center; }
.sale strong { font-weight: 900; font-size: 15px; letter-spacing: .02em; }
.sale__code { display: inline-flex; align-items: center; gap: 5px; border: 2px dashed var(--on-gold); background: rgba(255, 255, 255, .45); border-radius: 9px; padding: 3px 8px; font-weight: 700; cursor: pointer; min-height: 30px; }
.sale__code b { font-weight: 900; letter-spacing: .06em; }
.sale__ends { font-weight: 700; opacity: .8; }
.sale[hidden] { display: none; }
@media (max-width: 479px) { .sale__what { display: none; } .sale { gap: 8px; } }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 40; background: #160c30; box-shadow: 0 2px 0 #2a1b57, 0 8px 20px rgba(5, 2, 14, .5); }
.top__in { display: flex; align-items: center; gap: 8px; max-width: var(--wrap); margin: 0 auto; padding: 7px 12px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
.brand img { width: 42px; height: 42px; }
.brand__name { display: none; font-weight: 900; font-size: 17px; letter-spacing: .04em; line-height: 1; }
.brand__name b { color: var(--gold); font-weight: 900; }
.ip { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 2px solid var(--line); background: var(--deep); border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--mute); cursor: pointer; min-width: 0; }
.ip__v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip .ico { font-size: 14px; color: var(--gold); }
.who { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px 0 6px; border: 2px solid var(--line); background: var(--panel2); border-radius: 999px; font-weight: 800; font-size: 13px; cursor: pointer; flex: none; max-width: 150px; }
.who__face { font-size: 26px; }
.who__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who.is-set { border-color: var(--gold); }

/* tabs: bottom bar on phones, inline in the top bar on desktop */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr); background: #160c30; box-shadow: 0 -2px 0 #2a1b57, 0 -10px 24px rgba(5, 2, 14, .55); padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px)); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: calc(var(--tabs-h) - 10px); border-radius: 14px; text-decoration: none; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--dim); }
.tab .ico { font-size: 26px; color: var(--all); transition: transform .15s; }
.tab.is-on { color: var(--ink); background: linear-gradient(180deg, #3a2477, #2a1957); box-shadow: inset 0 0 0 2px #5a41a8; }
.tab.is-on .ico { transform: translateY(-1px) scale(1.1); }

/* ---------- hero: mode switch + trust ---------- */
.hero { max-width: var(--wrap); margin: 0 auto; padding: 12px var(--gut) 2px; }
.modes { display: flex; align-items: center; gap: 6px; }
.modes__label { display: none; font-weight: 900; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-right: 4px; }
.mode { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 14px; background: var(--panel); box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--deep); font-weight: 900; font-size: 13.5px; white-space: nowrap; cursor: pointer; transition: transform .08s; }
.mode .ico { font-size: 19px; }
.mode--all { --m: var(--all); } .mode--gens { --m: var(--gens); } .mode--ffa { --m: var(--ffa); }
.mode--all .ico { color: var(--all); }
.mode[aria-pressed="true"] { background: var(--m); color: #14092e; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 color-mix(in srgb, var(--m) 55%, #000); }
.mode[aria-pressed="true"].mode--all .ico { color: #14092e; }
.mode:active { transform: translateY(2px); }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 9px; margin-top: 10px; font-size: 11px; font-weight: 700; color: var(--mute); }
.trust li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.trust .ico { font-size: 13px; color: var(--gold); }

/* ---------- shelves ---------- */
.shelf { max-width: var(--wrap); margin: 0 auto; padding-top: 18px; scroll-margin-top: 64px; }
.shelf__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 0 var(--gut); }
.shelf__ico { font-size: 26px; }
.shelf__ico .ico { color: var(--all); }
.shelf h2 { font-size: 21px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; line-height: 1.1; }
.shelf__line { flex: 1 0 100%; font-size: 13px; color: var(--mute); font-weight: 600; }
.petsline { display: inline-flex; align-items: center; gap: 5px; color: var(--vip); font-weight: 800; }
.petsline .ico { font-size: 14px; }
.sub { padding: 2px var(--gut) 0; font-size: 14px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.sub span { font-weight: 700; color: var(--dim); text-transform: none; letter-spacing: 0; margin-left: 6px; font-size: 12.5px; }
.divider { max-width: var(--wrap); margin: 26px auto 0; padding: 0 var(--gut); display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: #2f2060; border-radius: 2px; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; white-space: nowrap; background: color-mix(in srgb, var(--m) 20%, #150a30); color: var(--m); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--m) 60%, transparent); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--m); }
.chip--all { --m: var(--all); } .chip--gens { --m: var(--gens); } .chip--ffa { --m: var(--ffa); }
.salechip { padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 900; letter-spacing: .04em; background: var(--gold); color: var(--on-gold); white-space: nowrap; }
.salechip[hidden] { display: none; }

.rail { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gut); padding: 16px var(--gut) 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.rail > li { scroll-snap-align: start; flex: 0 0 150px; }
.rail--big > li { flex-basis: min(86vw, 336px); }
.rail--topkits > .tile--wide { flex-basis: 236px; }
.rail--gens { display: grid; grid-template-columns: repeat(3, 150px); row-gap: 14px; }
.tile--kit:not(.tile--sm) .tile__name small { display: block; margin-top: 2px; }
.rail--kits { display: grid; grid-template-rows: auto auto; grid-auto-flow: column; grid-auto-columns: 124px; row-gap: 18px; }

/* ---------- tiles ---------- */
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 7px 7px 11px; border-radius: 18px; background: linear-gradient(180deg, var(--panel2), var(--panel)); box-shadow: inset 0 0 0 2px var(--line), inset 0 3px 0 rgba(255, 255, 255, .06), 0 5px 0 var(--deep); }
.tile.is-hot { box-shadow: inset 0 0 0 2.5px var(--gold), 0 5px 0 var(--deep), 0 0 22px rgba(255, 210, 63, .22); }
.tile__art { position: relative; height: 98px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background-color: var(--c);
  background-image: radial-gradient(circle at 50% 58%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 58%), repeating-conic-gradient(from 8deg at 50% 60%, rgba(255, 255, 255, .13) 0 9deg, rgba(255, 255, 255, 0) 9deg 18deg), linear-gradient(180deg, color-mix(in srgb, var(--c) 78%, #fff), color-mix(in srgb, var(--c) 62%, #1b0a45));
  box-shadow: inset 0 0 0 2px rgba(15, 6, 40, .28), inset 0 -10px 18px rgba(15, 6, 40, .22); }
.art { width: auto; height: 92%; max-width: 96%; filter: drop-shadow(0 2px 0 rgba(15, 6, 40, .25)); }
.art--rank { height: 96%; }
.tile__name { font-size: 16px; font-weight: 900; line-height: 1.12; letter-spacing: .01em; padding: 0 3px; overflow-wrap: anywhere; }
.tile__name small { font-size: 11px; font-weight: 800; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.tile__sub, .tile__note, .tile__pitch { padding: 0 3px; font-size: 12px; line-height: 1.3; color: var(--mute); font-weight: 600; }
.tile__sub--gold { color: var(--gold); font-weight: 800; }
.tile__note { font-size: 11px; color: var(--dim); }
.tile .buy { margin-top: auto; }

.flag { position: absolute; z-index: 2; top: -10px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; background: linear-gradient(180deg, #fff0a0, #ffc928); color: var(--on-gold); font-size: 10.5px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 0 0 2px #150a30, 0 3px 0 rgba(0, 0, 0, .35); }
.flag--media { background: linear-gradient(180deg, #ff9be0, #ff4fc4); color: #2c0424; }
.burst { position: absolute; top: 6px; right: 6px; display: grid; justify-items: center; padding: 4px 7px 3px; border-radius: 11px; background: linear-gradient(180deg, #ff5d8f, #f0245f); color: #fff; transform: rotate(7deg); box-shadow: 0 0 0 2px #150a30, 0 3px 0 rgba(0, 0, 0, .3); line-height: 1; }
.burst b { font-size: 15px; font-weight: 900; }
.burst i { font-style: normal; font-size: 8.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.qty { position: absolute; right: 6px; bottom: 6px; padding: 1px 8px; border-radius: 9px; background: #150a30; color: #fff; font-size: 18px; font-weight: 900; line-height: 1.25; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.tile__art .chip { position: absolute; left: 6px; bottom: 6px; background: #150a30; }

/* the price button: the price is the button */
.buy { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 13px; background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); color: var(--on-gold); font-weight: 900; font-size: 19px; line-height: 1; letter-spacing: .01em; cursor: pointer; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(168, 111, 0, .35), 0 4px 0 var(--gold-edge), 0 7px 12px rgba(0, 0, 0, .35); transition: transform .07s, box-shadow .07s, filter .15s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.buy:active, .buy.is-down { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), 0 1px 0 var(--gold-edge), 0 2px 4px rgba(0, 0, 0, .35); }
.buy__l { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; }
.buy--xl { min-height: 54px; font-size: 22px; border-radius: 16px; }
.buy--xl .buy__l { font-size: 17px; }

.more { display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-height: 32px; padding: 0 8px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16); color: #e7defF; font-size: 12px; font-weight: 800; letter-spacing: .03em; cursor: pointer; white-space: nowrap; }
.more .ico { font-size: 12px; }

/* big tiles (top picks): banner layout on phones */
.tile--big { display: grid; grid-template-columns: 116px 1fr; gap: 10px; padding: 8px 10px 10px 8px; }
.tile--big .tile__art { height: 100%; min-height: 132px; }
.tile--big .tile__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding-top: 4px; }
.tile--big .tile__name { font-size: 20px; padding: 0; }
.tile--big .tile__pitch, .tile--big .tile__note { padding: 0; }
.tile--big .gots { padding: 0; }
.tile__row { display: flex; gap: 8px; margin-top: auto; align-items: stretch; }
.tile__row .more { min-height: 44px; flex: none; }
.tile--big .heads img { width: 44px; height: 44px; margin-left: -20px; }
.tile--big .heads img:first-child { margin-left: 0; }
.tile--big .headwrap img { width: 92px; height: 92px; }

/* ranks */
.rk { color: var(--rc); text-shadow: 0 2px 0 rgba(10, 4, 28, .6); letter-spacing: .03em; }
.rk--sheen { background: linear-gradient(90deg, #ffe98a, #ffd23f 45%, #ff6fd8); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.tile--rank:not(.tile--big) .tile__name { font-size: 19px; text-align: center; }
.pets { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 0 2px; padding: 3px 6px; border-radius: 9px; font-size: 11.5px; font-weight: 900; letter-spacing: .02em; color: var(--vip); background: rgba(85, 255, 85, .1); box-shadow: inset 0 0 0 1.5px rgba(85, 255, 85, .35); white-space: nowrap; }
.pets .ico { font-size: 13px; }
.tile--rank:first-child .pets { background: var(--vip); color: #062b06; box-shadow: none; }
.stats { padding: 0 4px; font-size: 12px; line-height: 1.5; color: var(--mute); font-weight: 600; }
.stats b { color: #fff; font-weight: 900; }
.stats--gens { display: none; }
body[data-mode="gens"] .stats--gens { display: block; }
body[data-mode="gens"] .stats--ffa { display: none; }
.tile--rank .more { margin-top: auto; }
.tile--rank .buy { margin-top: 2px; }

/* kits */
.headwrap img { width: 84px; height: 84px; filter: drop-shadow(0 4px 0 rgba(15, 6, 40, .3)); }
.heads { display: flex; align-items: center; justify-content: center; }
.heads img { width: 60px; height: 60px; margin-left: -24px; filter: drop-shadow(0 3px 0 rgba(15, 6, 40, .3)); }
.heads img:first-child { margin-left: 0; }
.heads img:nth-child(3) { transform: scale(1.22); z-index: 2; position: relative; }
.heads img:nth-child(2), .heads img:nth-child(4) { transform: scale(1.08); z-index: 1; position: relative; }
.gots { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 2px; }
.got { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px 2px 4px; border-radius: 8px; background: rgba(10, 4, 28, .55); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.got .ico { font-size: 14px; }
.got b { font-weight: 900; }
.got i { font-style: normal; color: var(--mute); }
.got--gem .ico { color: #a07eff; }
.tile__name.is-long { font-size: 13.5px; letter-spacing: 0; }
.tile--pet .art { height: 78%; align-self: end; margin-bottom: 3px; }
.tile--sm { padding: 6px 6px 9px; gap: 4px; border-radius: 15px; }
.tile--sm .tile__art { height: 68px; border-radius: 10px; }
.tile--sm .headwrap img { width: 58px; height: 58px; }
.tile--sm .tile__name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile--sm .got--kit { display: none; }
.tile--sm .got { font-size: 11px; padding: 1px 5px 1px 3px; }
.tile--sm .buy { min-height: 40px; font-size: 16.5px; border-radius: 11px; }
.tile--sm .flag { font-size: 9.5px; padding: 2px 8px; top: -9px; }

/* gens */
.vipneed { position: absolute; left: 6px; top: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 999px; background: var(--vip); color: #062b06; font-size: 10.5px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; box-shadow: 0 0 0 2px #150a30; }
.vipneed .ico { font-size: 12px; }
.each { padding: 0 3px; font-size: 12px; font-weight: 900; color: var(--gold); min-height: 17px; }
.petvip { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 8px 10px; margin: 12px var(--gut) 0; padding: 10px 12px; border-radius: 16px; background: linear-gradient(180deg, #17402b, #12301f); box-shadow: inset 0 0 0 2px var(--vip), 0 4px 0 var(--deep); }
.petvip__art { height: 54px; display: grid; place-items: center; }
.petvip__art .art { height: 100%; }
.petvip__txt { font-size: 13px; line-height: 1.35; color: #dfffe0; font-weight: 600; }
.petvip__txt strong { display: block; font-size: 16px; font-weight: 900; color: var(--vip); letter-spacing: .01em; }
.petvip .buy { grid-column: 1 / -1; }

/* ---------- footer ---------- */
.foot { max-width: var(--wrap); margin: 34px auto 0; padding: 20px var(--gut) 26px; display: grid; justify-items: center; gap: 14px; border-top: 2px solid #2a1b57; }
.trust--foot { margin-top: 0; }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.foot__links a { padding: 10px 12px; font-weight: 800; font-size: 14px; text-decoration: none; color: var(--mute); border-radius: 10px; }
.foot__links a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.ip--foot { margin: 0; }
.foot__fine { font-size: 12px; color: var(--dim); }
.noscript { max-width: var(--wrap); margin: 20px auto; padding: 0 var(--gut); color: var(--gold); font-weight: 700; }

/* ---------- sheets (bottom sheet on phones, dialog on desktop) ---------- */
.sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 520px; max-height: min(90dvh, 780px); padding: 0; border: 0; border-radius: 24px 24px 0 0; background: linear-gradient(180deg, #2c1b58, #1c1038); color: var(--ink); box-shadow: 0 0 0 2px #5a41a8, 0 -12px 50px rgba(0, 0, 0, .6); overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; animation: sheet-up .22s cubic-bezier(.2, .9, .3, 1.1); }
.sheet::backdrop { background: rgba(8, 3, 22, .74); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet__x { position: absolute; top: 10px; right: 10px; z-index: 3; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #43307f; box-shadow: 0 0 0 2px #2c1b58; cursor: pointer; font-size: 18px; }
.sheet__title { font-size: 22px; font-weight: 900; letter-spacing: .01em; }
.sheet__fine { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 18px 16px; font-size: 12px; font-weight: 700; color: var(--mute); }
.sheet__fine .ico { color: var(--gold); font-size: 13px; }
#buy { padding-bottom: env(safe-area-inset-bottom, 0px); }

.sum { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 16px 60px 14px 18px; border-bottom: 2px solid rgba(255, 255, 255, .08); }
.sum[hidden] { display: none; }
.sum__art { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: var(--c, #6a3cff); background-image: radial-gradient(circle at 50% 55%, rgba(255, 255, 255, .5), transparent 62%); box-shadow: inset 0 0 0 2px rgba(15, 6, 40, .3); }
.sum__art .art { height: 88%; }
.sum__art img { width: 52px; height: 52px; margin: 0; transform: none; }
.sum__art .heads img { width: 30px; height: 30px; margin-left: -14px; }
.sum__art .heads img:first-child { margin-left: 0; }
.sum__name { font-size: 18px; font-weight: 900; line-height: 1.15; }
.sum__mode { margin-top: 4px; }
.sum__price { font-size: 24px; font-weight: 900; color: var(--gold); }

.whof { display: grid; gap: 12px; padding: 16px 18px 12px; }
.whof[hidden], .petnote[hidden] { display: none; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 14px; background: var(--deep); }
.seg__opt { position: relative; cursor: pointer; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg__opt span { display: grid; place-items: center; min-height: 42px; border-radius: 11px; font-weight: 900; color: var(--mute); }
.seg__opt input:checked + span { background: var(--all); color: #14092e; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4); }
.seg__opt input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 13px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
.field__wrap { display: flex; align-items: center; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 3px #5a41a8; }
.field__wrap:focus-within { box-shadow: inset 0 0 0 3px var(--gold); }
.field__pre { padding-left: 14px; color: #6b5a99; font-weight: 900; font-size: 20px; }
.field__pre[hidden] { display: none; }
.field input { flex: 1; min-width: 0; height: 54px; padding: 0 14px; border: 0; background: transparent; color: #17092f; font: 800 20px/1 var(--font); outline: 0; border-radius: 14px; }
.field input::placeholder { color: #a99fc4; }
.field__hint { font-size: 12.5px; color: var(--mute); font-weight: 600; margin-top: -4px; }
.field__err { font-size: 13.5px; font-weight: 800; color: #ffb3a6; margin-top: -4px; }
.field__err[hidden] { display: none; }

.ghost { min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .18); font-weight: 800; font-size: 13px; cursor: pointer; white-space: nowrap; }
.petnote { display: grid; gap: 8px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(180deg, #17402b, #12301f); box-shadow: inset 0 0 0 2px var(--vip); }
.petnote p { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.35; color: #dfffe0; font-weight: 600; }
.petnote strong { color: var(--vip); font-weight: 900; }
.petnote .ico { font-size: 18px; color: var(--vip); margin-top: 1px; }
.petnote--form { margin: 0 18px 12px; }

/* rank sheet */
.sheet--rank { max-width: 560px; }
.rtabs { display: flex; gap: 6px; overflow-x: auto; padding: 14px 14px 10px; margin-right: 56px; scrollbar-width: none; flex: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
.rtabs::-webkit-scrollbar { display: none; }
.rtab { flex: none; display: grid; justify-items: center; gap: 1px; min-width: 62px; min-height: 46px; padding: 5px 9px; border: 0; border-radius: 12px; background: var(--deep); box-shadow: inset 0 0 0 2px #3a2870; color: var(--rc); font-weight: 900; font-size: 13px; letter-spacing: .03em; cursor: pointer; }
.rtab small { color: var(--mute); font-size: 11px; font-weight: 800; }
.rtab[aria-pressed="true"] { background: var(--rc); color: #14092e; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45); }
.rtab[aria-pressed="true"] small { color: #14092e; }
.sheet__scroll { overflow-y: auto; padding: 4px 16px 14px; flex: 1 1 auto; overscroll-behavior: contain; outline: 0; }
.rpanel[hidden] { display: none; }
.rpanel__head { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; }
.rpanel__art { height: 84px; border-radius: 16px; display: grid; place-items: center; background-color: var(--c); background-image: radial-gradient(circle at 50% 55%, rgba(255, 255, 255, .5), transparent 62%), linear-gradient(180deg, color-mix(in srgb, var(--c) 78%, #fff), color-mix(in srgb, var(--c) 62%, #1b0a45)); box-shadow: inset 0 0 0 2px rgba(15, 6, 40, .28); }
.rpanel__name { font-size: 26px; font-weight: 900; line-height: 1.1; }
.rpanel__price { color: var(--gold); margin-left: 6px; }
.rpanel__pitch { margin-top: 4px; font-size: 14px; color: #e4dcff; font-weight: 600; line-height: 1.35; }
.rpanel__inc { margin-top: 12px; font-size: 13px; color: var(--mute); font-weight: 700; }
.pg { margin: 14px 0 6px; }
.pgs { display: flex; flex-direction: column; }
body[data-mode="gens"] .pgw--gens { order: -1; }
.perks--pets { margin-top: 12px; }
.perks--pets .perk { background: linear-gradient(180deg, #17402b, #12301f); box-shadow: inset 0 0 0 2px var(--vip); }
.perks--pets .perk__txt { color: var(--vip); font-weight: 900; font-size: 15px; }
.perks--pets .perk small { color: #dfffe0; }
.perks { display: grid; gap: 4px; }
.perk { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: start; padding: 8px 10px; border-radius: 12px; background: rgba(10, 4, 28, .45); font-size: 14px; font-weight: 700; line-height: 1.3; }
.perk.is-new { background: rgba(255, 210, 63, .1); box-shadow: inset 0 0 0 1.5px rgba(255, 210, 63, .4); }
.perk__ok { font-size: 18px; color: var(--vip); margin-top: 1px; }
.perk small { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--mute); line-height: 1.35; }
.perk__val { font-weight: 900; color: var(--gold); white-space: nowrap; }
.new, .soon { display: inline-block; font-style: normal; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; vertical-align: 1px; }
.new { background: var(--gold); color: var(--on-gold); }
.soon { background: #3a2870; color: #d9ceff; }
.sheet__foot { flex: none; display: grid; gap: 8px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 2px solid rgba(255, 255, 255, .08); background: #1c1038; }
.sheet__up { font-size: 12.5px; color: var(--mute); font-weight: 700; text-align: center; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 14px; background: #fff; color: #17092f; font-weight: 800; font-size: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); text-align: center; animation: sheet-up .2s; }
.toast[hidden] { display: none; }

/* ---------- motion (small, never blocking) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .glint { animation: twinkle 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .glint:nth-of-type(2n) { animation-delay: 1.1s; }
  @keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.6); } }
  .tile--big .art { animation: bob 3.4s ease-in-out infinite; }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .sheet[open], .toast { animation: none; } }
@media (hover: hover) {
  .tile { transition: transform .12s; }
  .tile:hover { transform: translateY(-3px); }
  .buy:hover { filter: brightness(1.07) saturate(1.05); }
  .more:hover, .ghost:hover { background: rgba(255, 255, 255, .16); }
  .mode:hover { filter: brightness(1.12); }
}

/* ---------- small phones ---------- */
@media (max-width: 359px) { .ip__v { max-width: 96px; } .mode { font-size: 12px; padding: 0 6px; } }

/* ---------- from 480px ---------- */
@media (min-width: 480px) {
  .brand__name { display: block; }
  .modes__label { display: block; }
  .mode { flex: 0 1 auto; padding: 0 16px; }
  .ip { font-size: 12.5px; }
}

/* ---------- desktop: shelves become grids ---------- */
@media (min-width: 1000px) {
  :root { --gut: 32px; }
  html { scroll-padding-top: 86px; }
  body { padding-bottom: 0; font-size: 16px; }
  .top__in { padding: 10px 32px; gap: 14px; }
  .brand img { width: 50px; height: 50px; }
  .brand__name { font-size: 20px; }
  .tabs { position: static; display: flex; gap: 4px; margin: 0 auto; padding: 0; background: none; box-shadow: none; }
  .tab { flex-direction: row; gap: 7px; height: 44px; padding: 0 14px; font-size: 13.5px; }
  .tab .ico { font-size: 22px; }
  .ip { margin-left: 0; min-height: 40px; }
  .who { min-height: 44px; font-size: 14px; max-width: 200px; }
  .hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 20px; }
  .mode { min-height: 48px; font-size: 15px; padding: 0 20px; }
  .trust { margin-top: 0; font-size: 13.5px; gap: 6px 20px; }
  .trust .ico { font-size: 15px; }
  .shelf { padding-top: 30px; scroll-margin-top: 80px; }
  .shelf h2 { font-size: 26px; }
  .shelf__ico { font-size: 32px; }
  .shelf__line { flex: 0 1 auto; margin-left: 8px; font-size: 14.5px; }
  .rail { display: grid; overflow: visible; gap: 16px; padding: 22px var(--gut) 6px; }
  .rail--big { grid-template-columns: repeat(4, 1fr); }
  .rail--ranks { grid-template-columns: repeat(7, 1fr); gap: 12px; }
  .rail--topkits { grid-template-columns: repeat(5, 1fr); }
  .rail--topkits > .tile--wide { grid-column: span 2; }
  .rail--kits { grid-template-columns: repeat(6, 1fr); grid-template-rows: none; grid-auto-flow: row; grid-auto-columns: auto; row-gap: 22px; }
  .rail--gems { grid-template-columns: repeat(5, 1fr); }
  .rail--coins { grid-template-columns: repeat(4, 1fr); }
  .rail--gens { grid-template-columns: repeat(6, 1fr); row-gap: 16px; }
  .tile { padding: 9px 9px 13px; gap: 8px; border-radius: 20px; }
  .tile__art { height: 132px; border-radius: 14px; }
  .tile__name { font-size: 19px; }
  .tile__sub, .tile__pitch { font-size: 13.5px; }
  .buy { min-height: 48px; font-size: 21px; }
  .tile--big { display: flex; padding: 9px 9px 13px; }
  .tile--big .tile__art { height: 168px; min-height: 0; flex: none; }
  .tile--big .tile__body { flex: 1; padding: 2px 4px 0; gap: 8px; }
  .tile--big .tile__name { font-size: 24px; }
  .tile--big .heads img { width: 76px; height: 76px; margin-left: -30px; }
  .tile--big .headwrap img { width: 124px; height: 124px; }
  .tile--rank:not(.tile--big) .tile__art { height: 112px; }
  .tile--rank:not(.tile--big) .tile__name { font-size: 21px; }
  .stats { font-size: 13px; }
  .pets { font-size: 12px; }
  .headwrap img { width: 104px; height: 104px; }
  .heads img { width: 84px; height: 84px; margin-left: -30px; }
  .got { font-size: 13px; }
  .tile__name.is-long { font-size: 17px; }
  .tile--sm .tile__art { height: 96px; }
  .tile--sm .headwrap img { width: 80px; height: 80px; }
  .tile--sm .tile__name { font-size: 16px; }
  .tile--sm .got { font-size: 12.5px; }
  .tile--sm .buy { min-height: 44px; font-size: 19px; }
  .tile--coin .tile__art, .tile--gem .tile__art { height: 150px; }
  .petvip { grid-template-columns: 64px 1fr auto; margin-top: 18px; padding: 12px 16px; }
  .petvip__art { height: 64px; }
  .petvip__txt { font-size: 15px; }
  .petvip__txt strong { font-size: 19px; }
  .petvip .buy { grid-column: auto; width: auto; padding: 0 22px; }
  .sub { padding-top: 14px; font-size: 16px; }
  .foot { margin-top: 48px; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: start; }
  .foot .ip--foot { justify-self: end; }
  .foot__fine { grid-column: 1 / -1; justify-self: center; }
  .sheet { inset: 0; margin: auto; border-radius: 24px; height: fit-content; }
  .toast { bottom: 28px; }
}

/* ==========================================================================
   Live store additions: sale toggle, VIP pick, owned / upgrade prices, checkout steps, thanks
   ========================================================================== */
[hidden] { display: none !important; }
.no-js .js-only { display: none !important; }

/* sale strip: "Use SALE20" is a switch */
.sale__code .ico { font-size: 15px; }
.sale__code[aria-pressed="true"] { border-style: solid; background: var(--on-gold); color: var(--gold-hi); }
.salechip.is-on { background: var(--vip); color: #062b06; }
.buy__was { font-size: .68em; font-weight: 800; opacity: .62; text-decoration-thickness: 2px; }
.sum__price .buy__was { color: var(--mute); opacity: 1; }
.buy.is-owned { background: linear-gradient(180deg, #4a3a86, #3a2c6e); color: #d9ceff; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12), 0 4px 0 #1c1140; cursor: default; }
.buy.is-owned .buy__p { font-size: .8em; text-transform: uppercase; letter-spacing: .06em; }

/* top picks: the VIP pick */
.flag--vip { display: inline-flex; align-items: center; gap: 4px; background: linear-gradient(180deg, #8dff8d, #45e045); color: #062b06; }
.flag--vip .ico { font-size: 11px; }
.pick__pets { color: var(--vip); font-weight: 900; }
.tile--vippick.is-hot { box-shadow: inset 0 0 0 2.5px var(--vip), 0 5px 0 var(--deep), 0 0 22px rgba(85, 255, 85, .2); }

/* footer */
.foot__fine--legal { font-size: 10.5px; letter-spacing: .03em; text-align: center; max-width: 60ch; }
.trust a { text-underline-offset: 2px; }
.noscript { margin: 12px auto 0; padding: 12px var(--gut); font-size: 15px; }
.noscript a { color: #fff; }

/* checkout steps inside the buy sheet */
.step { padding: 18px 18px 14px; outline: 0; }
.step__busy, .step__err, .step__ask, .step__done { display: grid; gap: 10px; }
.step__busy { justify-items: center; text-align: center; padding: 10px 0 6px; }
.step__line { font-size: 20px; font-weight: 900; line-height: 1.25; }
.step__sub { font-size: 14px; color: var(--mute); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.step__sub b { color: #fff; font-weight: 900; }
.step__row { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.step__row .buy { flex: 1; text-decoration: none; }
.step__err .step__line { color: #ffb3a6; }
.ghost.is-main { background: var(--all); color: #14092e; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4); }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .16); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.step__done { justify-items: center; text-align: center; }
.step__done .buy { width: 100%; }
.done__mark { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--vip); color: #062b06; font-size: 34px; box-shadow: 0 0 0 4px rgba(85, 255, 85, .25); }
.ip--done { margin: 2px 0 4px; }
.petnote--form { margin: 0 18px 12px; }
.petnote .buy { min-height: 44px; }

/* <dialog> fallback for browsers without showModal */
.sheet.is-plain[open] { z-index: 80; box-shadow: 0 0 0 2px #5a41a8, 0 0 0 100vmax rgba(8, 3, 22, .74); }

@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
@media (hover: hover) { .buy.is-owned:hover { filter: none; } }
@media (min-width: 1000px) {
  .rail--big.rail--n5 { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .rail--n5 .tile--big .tile__name { font-size: 21px; }
  .rail--n5 .tile--big .tile__art { height: 150px; }
  .rail--n5 .tile--big .heads img { width: 62px; height: 62px; margin-left: -26px; }
  .rail--n5 .tile--big .headwrap img { width: 112px; height: 112px; }
  .rail--n5 .tile__row .more { padding: 0 6px; }
}

/* the buy sheet scrolls when the screen is shorter than its content (landscape phones, zoomed pages) */
#buy { overflow-y: auto; overscroll-behavior: contain; }
@media (max-height: 520px) {
  .sum { padding-block: 10px; grid-template-columns: 44px 1fr auto; }
  .sum__art { width: 44px; height: 44px; border-radius: 10px; }
  .sum__art img { width: 36px; height: 36px; }
  .whof { gap: 8px; padding-block: 10px 8px; }
  .sheet__title { font-size: 18px; }
  .field input { height: 46px; }
  .field__hint { display: none; }
  .buy--xl { min-height: 46px; }
  .step { padding-block: 12px 10px; }
  .sheet__fine { padding-bottom: 10px; }
}
/* very narrow phones: the top picks keep a full-size price button */
.tile__row .buy { min-width: 64px; }
@media (max-width: 359px) {
  .tile--big .tile__row { flex-direction: column; gap: 6px; }
  .tile__row .more { min-height: 34px; }
}
/* things scrolled into view stop above the bottom tab bar on phones */
html { scroll-padding-bottom: calc(var(--tabs-h) + 10px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 1000px) { html { scroll-padding-bottom: 0; } }
