/* Components (ArchPlan F0.7). Markup comes from src/web/render/components/*. */

/* Label: Section · date · figure. Display face, no box: size and air do the dividing. */
.label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s3); margin: var(--s7) 0 var(--s4); }
.label__title { font: 400 30px/1.05 var(--font-display); letter-spacing: .01em; margin: 0; }
h3.label__title { font-size: 24px; }
.label__meta { color: var(--text-3); font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Kicker: small muted line above a title (no tracking, no colour) */
.eyebrow { margin: 0 0 var(--s2); color: var(--text-3); font: 600 var(--fs-sm)/1.3 var(--font-ui); }

/* Buttons: flat, square-ish, no fills of colour. Primary = solid ink, secondary = hairline, ghost = text. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 40px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: transparent; color: var(--text);
  font: 600 14px/1 var(--font-ui); white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
.btn:hover { border-color: var(--text-2); color: var(--text); text-decoration: none; }
.btn--primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn--primary:hover { background: var(--text-2); border-color: var(--text-2); color: var(--bg); }
.btn--ghost { border-color: transparent; padding-inline: 10px; color: var(--text-2); }
.btn--ghost:hover { border-color: transparent; color: var(--text); }
.btn--sm { min-height: 32px; padding: 0 12px; font-size: var(--fs-sm); }
.btn--lg { min-height: 46px; padding: 0 22px; font-size: var(--fs-base); }
.btn .icon { width: 18px; height: 18px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }

/* Fields: one input style. Hairline border, ink focus. */
.field { display: grid; gap: var(--s2); }
.field > span, .field > label { color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; }
.input, .field input, .field textarea, .field select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: transparent; color: var(--text); font: inherit; transition: border-color var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--text); }

/* Arrow link: "See all →" */
.arrow-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.arrow-link::after { content: "→"; transition: transform 160ms ease-out; }
.arrow-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.arrow-link:hover::after { transform: translateX(2px); }
[dir="rtl"] .arrow-link::after { content: "←"; }

/* Prose lists keep their markers (the global ul reset removes them elsewhere). */
.prose-list { display: grid; gap: var(--s2); margin: 0; padding-inline-start: 1.25em; list-style: disc; }
ol.prose-list { list-style: decimal; }
.prose-list li::marker { color: var(--text-3); }

/* Tile grid: tiles span their game tileSize (Size_W_x_H). */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile-unit), 1fr)); grid-auto-flow: dense; gap: var(--s3); }

.tile { display: flex; flex-direction: column; min-width: 0; grid-column: span var(--cols, 1); grid-row: span var(--rows, 1); color: #fff; }
a.tile:hover { text-decoration: none; }

/* Game-style tile: the rarity background the game uses, art on top, name and price on the art. */
.tile__media {
  position: relative; flex: 1; min-height: calc(var(--tile-unit) * 1.2 * var(--rows, 1)); overflow: hidden; border-radius: var(--radius-md);
  background:
    radial-gradient(92% 92% at 50% 42%, color-mix(in oklch, var(--rarity, var(--surface-2)) 88%, #fff) 0%, var(--rarity, var(--surface-2)) 54%, color-mix(in oklch, var(--rarity, var(--surface-2)) 38%, #000) 100%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08);
}

/* Rich Fortnite-style rarity & series backgrounds (catalog tiles + detail previews). */
.tile:not(.tile--themed)[data-rarity="common"] .tile__media,
.cos-item__media[data-rarity="common"] {
  background: radial-gradient(90% 90% at 50% 42%, #9ca4b0 0%, #5c6470 55%, #272c33 100%);
}
.tile:not(.tile--themed)[data-rarity="uncommon"] .tile__media,
.cos-item__media[data-rarity="uncommon"] {
  background: radial-gradient(90% 90% at 50% 42%, #7ae83a 0%, #2f8c1d 56%, #123b0c 100%);
}
.tile:not(.tile--themed)[data-rarity="rare"] .tile__media,
.cos-item__media[data-rarity="rare"] {
  background: radial-gradient(90% 90% at 50% 42%, #47c0ff 0%, #176fd6 55%, #082963 100%);
}
.tile:not(.tile--themed)[data-rarity="epic"] .tile__media,
.cos-item__media[data-rarity="epic"] {
  background: radial-gradient(92% 92% at 50% 42%, #cb54ff 0%, #7d29c9 56%, #340e5c 100%);
}
.tile:not(.tile--themed)[data-rarity="legendary"] .tile__media,
.cos-item__media[data-rarity="legendary"] {
  background: radial-gradient(92% 92% at 50% 42%, #ffb338 0%, #d45d12 56%, #591f05 100%);
}
.tile:not(.tile--themed)[data-rarity="mythic"] .tile__media,
.cos-item__media[data-rarity="mythic"] {
  background: radial-gradient(92% 92% at 50% 42%, #ffea66 0%, #cc9614 56%, #543704 100%);
}
.tile:not(.tile--themed)[data-rarity="exotic"] .tile__media,
.cos-item__media[data-rarity="exotic"] {
  background: radial-gradient(92% 92% at 50% 42%, #68f5ff 0%, #1694b0 56%, #07384a 100%);
}
.tile:not(.tile--themed)[data-rarity="golden"] .tile__media,
.cos-item__media[data-rarity="golden"] {
  background:
    linear-gradient(128deg, transparent 22%, rgb(255 245 186 / .24) 36%, transparent 48%, rgb(255 232 130 / .16) 66%, transparent 80%),
    radial-gradient(92% 92% at 50% 40%, #ffe373 0%, #c98f1c 54%, #573606 100%);
}
.tile:not(.tile--themed)[data-rarity="icon"] .tile__media,
.cos-item__media[data-rarity="icon"] {
  background:
    linear-gradient(135deg, transparent 28%, rgb(130 255 248 / .18) 44%, transparent 56%, rgb(90 240 235 / .12) 72%, transparent 84%),
    radial-gradient(92% 92% at 50% 42%, #44f2e8 0%, #148f99 56%, #06313b 100%);
}
.tile:not(.tile--themed)[data-rarity="gaming"] .tile__media,
.cos-item__media[data-rarity="gaming"] {
  background:
    repeating-linear-gradient(45deg, transparent 0 11px, rgb(190 120 255 / .12) 11px 12px),
    repeating-linear-gradient(-45deg, transparent 0 15px, rgb(115 170 255 / .1) 15px 16px),
    radial-gradient(92% 92% at 50% 42%, #7654ff 0%, #34218a 56%, #130a3b 100%);
}
.tile:not(.tile--themed)[data-rarity="marvel"] .tile__media,
.cos-item__media[data-rarity="marvel"] {
  background:
    repeating-linear-gradient(-30deg, transparent 0 14px, rgb(255 180 180 / .07) 14px 16px),
    radial-gradient(92% 92% at 50% 42%, #eb2830 0%, #8f1118 56%, #360407 100%);
}
.tile:not(.tile--themed)[data-rarity="dc"] .tile__media,
.cos-item__media[data-rarity="dc"] {
  background:
    linear-gradient(140deg, transparent 25%, rgb(120 185 255 / .14) 45%, transparent 65%),
    radial-gradient(92% 92% at 50% 42%, #3f84e5 0%, #193e82 56%, #081736 100%);
}
.tile:not(.tile--themed)[data-rarity="starwars"] .tile__media,
.cos-item__media[data-rarity="starwars"] {
  background:
    radial-gradient(1px 1px at 20% 24%, rgb(255 255 255 / .55) 99%, transparent),
    radial-gradient(1px 1px at 78% 18%, rgb(255 255 255 / .45) 99%, transparent),
    radial-gradient(1px 1px at 66% 38%, rgb(255 255 255 / .35) 99%, transparent),
    radial-gradient(1px 1px at 32% 62%, rgb(255 255 255 / .35) 99%, transparent),
    radial-gradient(92% 92% at 50% 42%, #244b8f 0%, #0e2047 56%, #040917 100%);
}
.tile:not(.tile--themed)[data-rarity="dark"] .tile__media,
.cos-item__media[data-rarity="dark"] {
  background:
    linear-gradient(135deg, transparent 30%, rgb(255 110 235 / .18) 50%, transparent 70%),
    radial-gradient(92% 92% at 50% 42%, #e638d1 0%, #6d148a 56%, #220433 100%);
}
.tile:not(.tile--themed)[data-rarity="frozen"] .tile__media,
.cos-item__media[data-rarity="frozen"] {
  background:
    linear-gradient(125deg, transparent 24%, rgb(255 255 255 / .24) 40%, transparent 56%),
    radial-gradient(92% 92% at 50% 42%, #c2f2ff 0%, #4ea8d6 56%, #174469 100%);
}
.tile:not(.tile--themed)[data-rarity="lava"] .tile__media,
.cos-item__media[data-rarity="lava"] {
  background:
    linear-gradient(150deg, transparent 25%, rgb(255 200 90 / .18) 50%, transparent 75%),
    radial-gradient(92% 92% at 50% 42%, #ff8224 0%, #b8260c 56%, #3d0902 100%);
}
.tile:not(.tile--themed)[data-rarity="shadow"] .tile__media,
.cos-item__media[data-rarity="shadow"] {
  background:
    linear-gradient(135deg, transparent 30%, rgb(255 255 255 / .1) 48%, transparent 64%),
    radial-gradient(92% 92% at 50% 42%, #636378 0%, #2a2a36 56%, #0d0d12 100%);
}
.tile:not(.tile--themed)[data-rarity="slurp"] .tile__media,
.cos-item__media[data-rarity="slurp"] {
  background: radial-gradient(92% 92% at 50% 42%, #54ffec 0%, #0ea8cc 56%, #063c54 100%);
}
.tile:not(.tile--themed)[data-rarity="crew"] .tile__media,
.cos-item__media[data-rarity="crew"] {
  background:
    linear-gradient(135deg, rgb(255 92 214 / .28) 0%, transparent 50%, rgb(72 224 255 / .22) 100%),
    radial-gradient(92% 92% at 50% 42%, #b04cff 0%, #3a4fd4 56%, #13184a 100%);
}
.tile--themed .tile__media {
  background: linear-gradient(180deg, var(--card-top) 0%, var(--card-mid) 52%, var(--card-bottom) 100%);
}
.tile--holographic .tile__media::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgb(0 0 0 / .11) 2px, rgb(0 0 0 / .11) 3px);
}
.tile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform 220ms ease-out; }
/* Game renders are square or portrait even for wide tiles: show them whole instead of a cropped band */
.tile--wide .tile__img { object-fit: contain; object-position: 50% 100%; }
a.tile:hover .tile__img { transform: scale(1.04); }
a.tile:focus-visible { outline: none; }
a.tile:focus-visible .tile__media { outline: 2px solid var(--link); outline-offset: 2px; }

.tile__body {
  position: absolute; inset-inline: 0; inset-block-end: 0; display: flex; flex-direction: column; gap: 2px;
  padding: var(--s6) var(--s2) var(--s2);
  background: linear-gradient(to top, rgb(0 0 0 / .82), rgb(0 0 0 / .5) 60%, transparent);
}
.tile--themed .tile__body {
  background: linear-gradient(to top, var(--card-footer) 0%, color-mix(in srgb, var(--card-footer) 72%, transparent) 55%, transparent);
}
.tile__title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  font: 400 18px/1.08 var(--font-display); letter-spacing: .01em; overflow-wrap: anywhere;
}
.tile--wide .tile__title { font-size: 22px; }
.tile__meta { display: flex; flex-wrap: wrap; gap: 0 var(--s2); align-items: center; font-size: 12px; color: rgb(255 255 255 / .8); font-variant-numeric: tabular-nums; }
.tile__price { display: inline-flex; gap: var(--s1); align-items: center; color: #fff; font-size: 13px; font-weight: 600; }
.tile__price .icon { width: 15px; height: 15px; }
.tile__vbucks { width: 22px; height: 22px; object-fit: contain; flex: none; }
.tile__price s { color: rgb(255 255 255 / .6); font-weight: 400; }
.tile__tag {
  position: absolute; inset-block-start: var(--s2); inset-inline-start: var(--s2); padding: 1px 6px 0; border-radius: 3px;
  background: var(--new); color: var(--new-ink); font: 400 13px/1.35 var(--font-display); letter-spacing: .02em;
}
.tile__meta .badge--muted { color: rgb(255 255 255 / .75); }
.tile__meta .badge--signal { color: #ffb3ab; }
.tile__meta .badge--rarity { color: rgb(255 255 255 / .8); font-weight: 400; }
@media (max-width: 639px) { .tile { grid-column: span min(var(--cols, 1), 2); } .tiles { grid-template-columns: repeat(2, 1fr); } }

/* Badge: coloured text, no box */
.badge { font-size: 12px; font-weight: 600; color: var(--text-2); }
.badge--rarity { color: var(--rarity, var(--text-2)); }
.badge--new { color: var(--accent); }
.badge--signal { color: var(--signal); }
.badge--muted { font-weight: 400; color: var(--text-3); }

/* Dense data table: row rules only */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { height: var(--row); padding: 0 var(--s4) 0 0; text-align: start; border-block-end: 1px solid var(--line); white-space: nowrap; }
.table th:last-child, .table td:last-child { padding-inline-end: 0; }
.table th { color: var(--text-2); font-weight: 600; font-size: 12px; border-block-end-color: var(--line-strong); }
.table td.is-num, .table th.is-num { text-align: end; font-variant-numeric: tabular-nums; }
.table tbody tr:hover td { background: var(--surface); }

/* 365-day appearance strip: 2x10 px marks */
.strip { display: flex; gap: 1px; height: 10px; overflow: hidden; }
.strip__mark { flex: 0 0 2px; height: 10px; background: var(--line); }
.strip__mark.is-on { background: var(--accent); }

/* Pagination: plain links */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s1); margin-block: var(--s6); font-variant-numeric: tabular-nums; }
.pagination a, .pagination [aria-current="page"] { min-width: 32px; padding: 5px 10px; border-radius: var(--radius); text-align: center; }
.pagination a { color: var(--text); }
.pagination a:hover { background: var(--surface-2); text-decoration: none; }
.pagination [aria-current="page"] { box-shadow: inset 0 0 0 1px var(--text-2); color: var(--text); font-weight: 600; }
.pagination .is-gap { color: var(--text-3); }

/* Ad slot: height always reserved (4.2) */
.ad { position: relative; width: 100%; margin-block: var(--s7); }
.ad__label { position: absolute; inset-block-start: calc(-1 * var(--s4)); inset-inline-start: 0; font-size: 11px; color: var(--text-3); }
/* Never leave an empty hole: no AdSense markup, unfilled, or blocked (ads.js marks it). */
.ad:not(:has(ins)), .ad:has(ins[data-ad-status="unfilled"]), .ad.is-empty { display: none; }
.ad--rect { max-width: 300px; }
@media (min-width: 960px) { .ad--leader, .ad--infeed { min-height: 90px !important; } }

/* Icons (sprite) */
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
[dir="rtl"] .icon--flip { transform: scaleX(-1); }

/* Styleguide only */
.sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s2); }
.sg-swatch { border: 1px solid var(--line); border-radius: var(--radius-2); overflow: hidden; font-size: 12px; }
.sg-swatch > span { display: block; height: 40px; }
.sg-swatch > code { display: block; padding: var(--s1) var(--s2); color: var(--text-2); }
.sg-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

/* Page heading: title, then plain meta line */
.page-head { margin-block-end: var(--s7); }
.page-head > p:not(.page-head__meta), .page-head__lead { max-width: 62ch; margin: var(--s3) 0 0; color: var(--text-2); font-size: var(--fs-md); line-height: 1.55; }
/* Shop / home header: title and date on the left, the reset clock on the right */
.shop-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s5); }
.reset-clock { display: flex; align-items: center; gap: var(--s4); }
.reset-clock__face { width: 56px; height: 56px; flex: none; fill: none; stroke-linecap: round; }
.reset-clock__rim { stroke: var(--line-strong); stroke-width: 1.5; }
.reset-clock__ticks { stroke: var(--text-2); stroke-width: 1.5; }
.reset-clock__h, .reset-clock__m, .reset-clock__s { transform-box: view-box; transform-origin: 24px 24px; }
.reset-clock__h { stroke: var(--text); stroke-width: 3; transform: rotate(var(--h, 300deg)); }
.reset-clock__m { stroke: var(--text); stroke-width: 2; transform: rotate(var(--m, 60deg)); }
.reset-clock__s { stroke: var(--new); stroke-width: 1; transform: rotate(var(--s, 0deg)); }
.reset-clock__pin { fill: var(--new); }
.reset-clock__text { display: grid; margin: 0; line-height: 1.2; }
.reset-clock__label, .reset-clock__local { color: var(--text-2); font-size: 13px; }
.reset-clock__time { font: 400 32px/1.05 var(--font-display); letter-spacing: .01em; color: var(--text); font-variant-numeric: tabular-nums; }
.page-head__title { font: 400 var(--fs-3xl)/1.02 var(--font-display); letter-spacing: .005em; margin: 0 0 var(--s3); }
.page-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s4); margin: 0; color: var(--text-2); font-variant-numeric: tabular-nums; }


/* Shop sections and hub strips */
.shop-section + .shop-section, .hub-strip + .hub-strip { margin-block-start: var(--s6); }
.hub-strip > .label { margin-block-start: 0; }
.more-link { margin-block: var(--s5) 0; color: var(--text-2); }
.more-link a { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.more-link a::after { content: "→"; }
.more-link a:hover { text-underline-offset: 3px; }

/* Shop page: section index on the left (desktop), toolbar and grid on the right */
.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
.shop-index { display: none; }
/* Legacy shop proportions, scaled down: never add extra slots on a wide screen. */
.shop-section { container-type: inline-size; }
.page-backdrop { position: absolute; inset: 0 0 auto; height: min(760px, 92vh); z-index: -1; pointer-events: none; background: var(--bg); overflow: hidden; }
.shop-backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--bg); }
.page-backdrop__layer, .shop-backdrop__layer { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .6s ease; }
.page-backdrop__layer.is-active, .shop-backdrop__layer.is-active { opacity: 1; }
.page-backdrop::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--bg) 55%, transparent) 0%, color-mix(in srgb, var(--bg) 72%, transparent) 45%, var(--bg) 100%),
    linear-gradient(to right, color-mix(in srgb, var(--bg) 70%, transparent), transparent 60%);
}
.shop-backdrop::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / .5); }
.shop-backdrop.is-light::after { background: rgb(0 0 0 / .62); }
:root[data-theme="light"] .page-backdrop { display: none; }
@media (prefers-reduced-motion: reduce) { .page-backdrop__layer, .shop-backdrop__layer { transition: none; } }
.shop-section > .tiles { --shop-columns: 2; width: 100%; max-width: 1060px; grid-template-columns: repeat(var(--shop-columns), minmax(0, 1fr)); column-gap: var(--s4); row-gap: var(--s7); padding-block-start: var(--s6); }
.shop-section > .tiles > .tile { --shop-span: min(var(--cols, 1), var(--shop-columns)); grid-column: span var(--shop-span); }
.shop-section > .tiles .tile__media { min-height: 0; border-radius: var(--radius-2); aspect-ratio: calc((var(--shop-span) + (var(--shop-span) - 1) * 0.067) * 3) / 4; }
.shop-section .tile__body { padding: var(--s6) var(--s3) var(--s3); border-end-start-radius: var(--radius-2); border-end-end-radius: var(--radius-2); }
.shop-section .tile__art { position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius-2); }
.shop-section .tile__art .tile__img { inset: auto; left: 50%; top: 0; width: 100%; height: 100%; max-width: none; translate: -50% 0; object-fit: cover; object-position: center top; }
.shop-section .tile--art-character .tile__img { top: auto; bottom: 0; height: 102%; object-position: center bottom; transform-origin: center bottom; }
.shop-section .tile--art-character.tile--wide .tile__img { height: 100%; object-fit: contain; }
.shop-section .tile--frame-break:is(.tile--art-character, .tile--art-bundle) .tile__media { overflow: visible; }
.shop-section .tile--frame-break .tile__art { clip-path: inset(-100% -100% 0 -100%); }
.shop-section .tile--frame-break .tile__img { transform-origin: center bottom; }
.shop-section .tile--frame-break.tile--art-character .tile__art { top: -9%; overflow: visible; }
.shop-section .tile--frame-break.tile--art-character .tile__img { height: 109%; }
.shop-section .tile--frame-break.tile--art-character.tile--wide .tile__art { top: -5%; }
.shop-section .tile--frame-break.tile--art-character.tile--wide .tile__img { height: 106%; object-fit: contain; }
.shop-section a.tile--art-character:hover .tile__img { transform: scale(1.04); }
.shop-section .tile--frame-break.tile--art-bundle .tile__art { top: -5%; overflow: visible; }
.shop-section .tile--frame-break.tile--art-bundle .tile__img,
.shop-section .tile--art-bundle:not(.tile--wide) .tile__img { width: 104%; height: 104%; object-fit: contain; }
.shop-section .tile--bundle .tile__media { overflow: visible; }
.shop-section .tile--bundle .tile__art { overflow: visible; clip-path: inset(-100% -100% 0 -100%); }
.shop-section .tile--bundle .tile__art .tile__img { top: -6%; height: 106%; object-fit: cover; object-position: center top; }
.shop-section .tile--bundle:not(.tile--wide) .tile__art { top: 0; clip-path: inset(-5% 0 0); }
.shop-section .tile--bundle:not(.tile--wide) .tile__art .tile__img { top: -4%; width: 100%; height: 106%; object-fit: cover; }
.shop-section .tile--bundle.tile--art-vehicle .tile__art { clip-path: inset(0 -100% 0 -100%); }
.shop-section .tile--bundle.tile--art-vehicle:not(.tile--wide) .tile__art { clip-path: inset(0); }
.shop-section .tile--art-vehicle .tile__art .tile__img { top: 50%; height: auto; translate: -50% -50%; object-position: center; }
.shop-section .tile--art-half-step .tile__art .tile__img { top: auto; bottom: 10%; width: 90%; height: 86%; object-fit: contain; object-position: center 42%; }
.shop-section .tile--art-standard .tile__art .tile__img { top: auto; bottom: 14%; width: 88%; height: 80%; object-fit: contain; object-position: center 42%; }
.shop-section .tile--art-square .tile__media,
.shop-section .tile--art-square .tile__art { overflow: visible; }
.shop-section .tile--art-square .tile__art .tile__img { top: -4%; bottom: auto; width: 90%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-md); box-shadow: 0 8px 20px rgb(0 0 0 / .35); }
.shop-section .tile--art-sidekick .tile__art .tile__img { top: 44%; width: 76%; height: 76%; translate: -50% -50%; object-fit: contain; object-position: center; }
@container (min-width: 600px) {
  .shop-section > .tiles { --shop-columns: 3; }
}
@container (min-width: 840px) {
  .shop-section > .tiles { --shop-columns: 4; }
}
@media (min-width: 1100px) {
  .shop-layout { grid-template-columns: 184px minmax(0, 1fr); }
  .shop-index { display: block; position: sticky; inset-block-start: 88px; align-self: start; max-height: calc(100vh - var(--s6)); overflow-y: auto; }
}
.shop-index ul { display: grid; gap: 1px; }
.shop-index li[hidden] { display: none; }
.shop-index a { display: block; padding: 5px var(--s2); border-radius: var(--radius); color: var(--text-2); font-size: 13px; line-height: 1.3; }
.shop-index a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.shop-index a[aria-current] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.shop-section { scroll-margin-block-start: 88px; }
.shop-section > .label { margin-block-start: var(--s7); }
.shop-section:first-child > .label { margin-block-start: 0; }

.shop-tabs { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s5); }
.shop-tab { display: inline-flex; gap: 6px; align-items: baseline; color: var(--text-3); cursor: pointer; transition: color var(--ease); }
.shop-tab > span:first-of-type { font: 400 26px/1.1 var(--font-display); letter-spacing: .01em; }
.shop-tab input { position: absolute; opacity: 0; pointer-events: none; }
.shop-tab:hover, .shop-tab:has(input:checked) { color: var(--text); }
.shop-tab:has(input:checked) .shop-tab__n { color: var(--new); }
.shop-tab:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 4px; border-radius: var(--radius-sm); }
.shop-tab__n { color: var(--text-3); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.shop-filter > summary { color: var(--text-2); }
.shop-filter[open] > summary { background: var(--surface-2); color: var(--text); }
.shop-filter__body {
  position: absolute; inset-block-start: calc(100% + var(--s2)); inset-inline-end: 0; z-index: 5; display: grid; gap: var(--s3); min-width: 240px;
  padding: var(--s4); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  box-shadow: 0 12px 32px var(--panel-shadow);
}
.shop-filter__body label { display: grid; gap: var(--s1); }
.shop-filter__body select { margin: 0; }

/* Shop filters and view switch (static/js/shop.js) */
/* Toolbar: tabs on the left, count + filter + view on the right, then air before the grid */
.shop-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); margin-block: 0 var(--s6); padding-block-end: var(--s4); border-block-end: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.shop-tools__end { display: flex; align-items: center; gap: var(--s1); }
.shop-tools[hidden], .shop-empty[hidden], [data-shop-table][hidden], [data-shop-grid][hidden] { display: none; }
.shop-tools select, .cos-filters select { min-height: 36px; margin-inline-start: var(--s1); padding-inline: 10px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font: inherit; }
.shop-tools__view { display: inline-flex; gap: var(--s1); }
.shop-tools__view button, .table th button { background: none; border: 0; color: var(--text-2); font: inherit; cursor: pointer; }
.table th button { padding: 0; font-weight: 600; }
.shop-tools__view button[aria-pressed="true"] { color: var(--text); background: var(--surface-2); }
.shop-tools__count { margin-inline-end: var(--s3); color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.table th button:hover, .shop-tools__view button:hover { color: var(--text); }
.table th[aria-sort] button { color: var(--text); }
.table th[aria-sort="ascending"] button::after { content: " ↑"; }
.table th[aria-sort="descending"] button::after { content: " ↓"; }
.tile[hidden], .shop-section[hidden] { display: none; }

/* Favorites star (static/js/wishlist.js): visible on hover/focus, always when on or on touch screens */
.wish { position: absolute; inset-block-start: var(--s1); inset-inline-end: var(--s1); padding: var(--s1); background: none; border: 0; color: rgb(255 255 255 / .85); cursor: pointer; opacity: 0; transition: opacity var(--ease), color var(--ease); }
.wish .icon { width: 20px; height: 20px; }
.tile:hover .wish, .wish:focus-visible, .wish[aria-pressed="true"] { opacity: 1; }
.wish:hover { color: #fff; }
.wish[aria-pressed="true"] { color: var(--accent); }
.wish[aria-pressed="true"] .icon { fill: currentColor; }
.wish-notice { margin-block: calc(-1 * var(--s3)) var(--s5); color: var(--accent); font-weight: 600; }
.wish-notice[hidden] { display: none; }
@media (hover: none) { .wish { opacity: 1; } }

.shop-stale { display: flex; gap: var(--s2); align-items: baseline; max-width: 80ch; margin-block: calc(-1 * var(--s2)) var(--s6); color: var(--text-2); }
.shop-stale::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }

/* Shop history calendar: plain grid, row rules only */
.cal { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cal th { padding-block: var(--s2); font-size: 12px; font-weight: 600; color: var(--text-2); text-align: start; border-block-end: 1px solid var(--line-strong); }
.cal td { height: 64px; padding: var(--s2) var(--s2) var(--s2) 0; vertical-align: top; border-block-end: 1px solid var(--line); }
.cal td a { font-weight: 600; }
.cal td.is-off { color: var(--text-2); }
.cal__count { display: block; font-size: 12px; color: var(--text-2); }
.page-head__meta a { color: var(--link); }

/* Cosmetics hub, list filters and item detail */
/* Big search field; #site-search instant results come from static/js/search.js */
.cos-search { position: relative; max-width: 640px; margin-block: 0 var(--s6); }
.cos-search__field {
  display: flex; align-items: center; gap: var(--s3); height: 52px; padding-inline: var(--s4);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); transition: border-color var(--ease);
}
.cos-search__field:focus-within { border-color: var(--text-2); }
.cos-search__field .icon { width: 20px; height: 20px; color: var(--text-2); }
.cos-search input { flex: 1; min-width: 0; height: 100%; padding: 0; background: none; border: 0; color: var(--text); font: inherit; font-size: 16px; }
.cos-search input:focus { outline: none; }
.cos-search input::placeholder { color: var(--text-3); }
.cos-search .site-search__list {
  top: calc(100% + var(--s2)); padding: 6px; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  box-shadow: 0 12px 32px var(--panel-shadow);
}
.cos-search .site-search__list li a { padding: 8px 10px; border-radius: var(--radius-md); }
.cos-search .site-search__list li[aria-selected="true"] a, .cos-search .site-search__list li a:hover { background: var(--surface-2); color: var(--text); }
.cos-filters button { height: 36px; padding: 0 var(--s4); background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font: 600 14px/1 var(--font-ui); cursor: pointer; transition: background-color var(--ease), color var(--ease); }
.cos-filters button:hover { background: var(--surface-2); color: var(--text); }

/* Type rail: one card per cosmetic type, scrolls sideways */
.type-rail { margin-block: 0 var(--s6); overflow-x: auto; scrollbar-width: thin; }
.type-rail ul { display: flex; gap: var(--s2); width: max-content; min-width: 100%; box-sizing: border-box; padding: 6px 4px var(--s2); }
.type-rail { cursor: grab; }
.type-rail .type-card { cursor: inherit; user-select: none; }
.type-rail.is-dragging { cursor: grabbing; }
.type-card { display: grid; justify-items: center; gap: 6px; width: 92px; color: var(--text-2); font-size: 13px; font-weight: 600; text-align: center; }
.type-card:hover { color: var(--text); text-decoration: none; }
.type-card__art {
  position: relative; display: grid; place-items: center; width: 92px; height: 92px; overflow: hidden; border-radius: var(--radius-2);
  background: linear-gradient(to bottom, var(--rarity), color-mix(in oklch, var(--rarity) 45%, #000));
  opacity: .72; transition: opacity var(--ease), transform 200ms ease-out;
}
.type-card__art img { width: 64px; height: 64px; object-fit: contain; }
.type-card:hover .type-card__art { opacity: 1; transform: translateY(-2px); }
.type-card[aria-current] { color: var(--text); }
.type-card[aria-current] { color: var(--text); }
.type-card[aria-current] .type-card__art { opacity: 1; outline: 2px solid var(--text); outline-offset: 2px; }
.type-card__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-card--cosmetic { width: 62px; gap: 4px; font-size: 12px; line-height: 1.15; }
.type-card--cosmetic .type-card__art { width: 100%; height: auto; aspect-ratio: 1; background: none; }
.type-card--cosmetic .type-card__art img { width: 48px; height: 48px; filter: drop-shadow(0 1px 2px rgb(0 0 0 / .55)); }
.type-card--cosmetic .type-card__name {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  white-space: normal; overflow-wrap: anywhere; text-wrap: balance;
}

.cos-catalog-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, clamp(118px, 14vw, 148px)), 1fr)); gap: 10px; }
.cos-catalog-grid .tile__media { min-height: 0; aspect-ratio: 1 / 1; border-radius: var(--radius-md); }
.cos-catalog-grid .tile__img { inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transform-origin: 50% 100%; }
.cos-catalog-grid .tile__body {
  padding: var(--s4) var(--s2) 6px;
  background: linear-gradient(to top, rgb(0 0 0 / .72) 0%, rgb(0 0 0 / .32) 55%, transparent);
}
.cos-catalog-grid .tile__title {
  font-size: 14px; line-height: 1.12;
  text-shadow: 0 1px 3px rgb(0 0 0 / .85);
}
@media (max-width: 639px) {
  .cos-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}

/* Page controls stay in view only while browsing the results, without covering tiles. */
.cos-paged-results { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 12px; }
.cos-paged-results:not(:has(.cos-page-sides)) { display: block; }
.cos-page-sides { display: contents; }
.cos-paged-results__grid { grid-column: 2; grid-row: 1; min-width: 0; }
.cos-page-arrow { grid-row: 1; align-self: stretch; display: block; padding: clamp(48px, 12dvh, 96px) 7px; border: 1px solid var(--line-strong); border-radius: var(--radius-2); background: var(--surface); color: var(--text-2); }
.cos-page-arrow--prev { grid-column: 1; }
.cos-page-arrow--next { grid-column: 3; }
.cos-page-arrow:hover, .cos-page-arrow:focus-visible { color: var(--text); border-color: var(--text-2); background: var(--surface-2); text-decoration: none; }
.cos-page-arrow svg { position: sticky; top: calc(50dvh - 14px); display: block; width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; }
[dir="rtl"] .cos-page-arrow svg { transform: scaleX(-1); }
@media (max-width: 959px) {
  .cos-paged-results { gap: 8px; }
}

.cos-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s1) var(--s5); }
.cos-types a { display: flex; gap: var(--s2); align-items: baseline; padding-block: var(--s1); color: var(--text); }
.cos-types a:hover { text-decoration: none; }
.cos-types a:hover .cos-types__name { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.cos-types__name { font-weight: 600; }
.cos-types__count { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }

.cos-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-block: 0 var(--s5); font-size: 14px; color: var(--text-2); }
.cos-filters label { display: inline-flex; align-items: center; max-width: 100%; }
.cos-filters select { min-width: 0; }

.cos-crumb { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); margin-block-end: var(--s5); font-size: 14px; color: var(--text-3); }
.cos-crumb a { color: var(--text-2); }
.cos-crumb a:hover { color: var(--text); }

.cos-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-items: start; }
.cos-item__media { position: relative; aspect-ratio: 1 / 1; background: color-mix(in oklch, var(--rarity, var(--surface-2)) 36%, var(--surface)); border-radius: var(--radius-md); overflow: hidden; }
.cos-item__media img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.cos-item__badges { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); margin-block-end: var(--s3); }
.cos-item__desc { color: var(--text-2); margin-block: 0 var(--s5); max-width: 62ch; font-size: var(--fs-md); }
.cos-item__facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 var(--s5); margin: 0; }
.cos-item__facts { border-block-start: 1px solid var(--line); }
.cos-item__facts dt, .cos-item__facts dd { margin: 0; padding-block: 10px; font-size: var(--fs-base); border-block-end: 1px solid var(--line); }
.cos-item__facts dt { color: var(--text-2); }
.cos-item__facts dd { color: var(--text); word-break: break-word; }
.cos-item__details { margin-block-start: var(--s4); border: 1px solid color-mix(in oklch, var(--text) 12%, transparent); border-radius: var(--radius-2); background: var(--surface); }
.cos-item__details-summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--s3); font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; list-style: none; user-select: none; }
.cos-styles { margin-block-start: var(--s5); }
.cos-styles h2 { font-size: 20px; margin-block-end: var(--s3); }
.cos-styles fieldset { min-width: 0; border: 0; padding: 0; margin: var(--s4) 0; }
.cos-styles legend { margin-block-end: var(--s2); color: var(--text-2); font-size: 13px; }
.cos-styles__options { display: flex; flex-wrap: wrap; gap: var(--s2); }
.cos-styles button { color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); padding: 8px 12px; border-radius: var(--radius); }
.cos-styles__options button { display: grid; justify-items: center; align-content: start; gap: 6px; width: 104px; font-size: 12px; overflow-wrap: anywhere; }
.cos-styles button[aria-pressed="true"] { border-color: var(--text); background: var(--surface-2); }
.cos-styles button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.cos-styles button:disabled { opacity: .5; cursor: default; }
.cos-styles img { object-fit: contain; }
[data-style-caption] { min-height: 1.5em; text-align: center; color: var(--text-2); font-size: 13px; }
.cos-release-note { color:var(--text-2); font-size:13px; margin-block-end:var(--s4); max-width:70ch; }
@media (min-width:640px) { .cos-item__media:has([data-cosmetic-preview]) { position:sticky; top:90px; align-self:start; } }
.cos-item__details-summary::-webkit-details-marker { display: none; }
.cos-item__details-summary:hover { color: var(--text); }
.cos-item__details-summary:focus-visible { outline: 2px solid var(--accent, var(--text)); outline-offset: -2px; border-radius: var(--radius-2); }
.cos-item__details-chevron { inline-size: 7px; block-size: 7px; border-inline-end: 1.5px solid currentColor; border-block-end: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 140ms ease; margin-inline-end: 2px; }
.cos-item__details[open] .cos-item__details-chevron { transform: rotate(-135deg); }
.cos-item__details-body { padding: var(--s2) var(--s3) var(--s3); border-top: 1px solid color-mix(in oklch, var(--text) 10%, transparent); display: grid; gap: var(--s3); }
.cos-item__facts--tech dt, .cos-item__facts--tech dd { font-size: 13px; padding-block: 4px; }
.cos-item__facts--tech code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; color: var(--text); }
.cos-item__tags-block { display: grid; gap: var(--s2); }
.cos-item__tags-label { margin: 0; font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: 0.02em; }
.cos-item__tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.cos-item__tags code { display: inline-block; padding: 2px 7px; border-radius: var(--radius-2); background: var(--surface-2); border: 1px solid color-mix(in oklch, var(--text) 10%, transparent); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 11px; color: var(--text-2); word-break: break-word; }

.cos-history__stats { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s6); margin-block: 0 var(--s4); font-variant-numeric: tabular-nums; }
.cos-history__stat dt { margin: 0; font-size: 12px; color: var(--text-2); }
.cos-history__stat dd { margin: 0; font-size: 20px; font-weight: 600; }
.cos-history__empty { color: var(--text-2); }

@media (min-width: 640px) { .cos-item { grid-template-columns: minmax(240px, 440px) minmax(0, 1fr); gap: var(--s7); } }
@media (min-width: 960px) and (max-width: 1279px) { .cos-item:has(.cos-item__ad) { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) 300px; } }
@media (min-width: 1280px) { .cos-item__ad { display: none; } }
@media (max-width: 639px) {
  .shop-tabs { gap: var(--s1) var(--s4); }
  .shop-tab > span:first-of-type { font-size: 21px; }
  .reset-clock__time { font-size: 28px; }
}
/* Whole-row groups cross server page boundaries. Empty groups keep their exact
   measured height; ads stay outside this virtualized grid. */
.scroll-grid { position: relative; grid-auto-flow: row; align-content: start; }
.scroll-grid > .scroll-page { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(var(--scroll-columns), minmax(0, 1fr)); gap: inherit; }
.scroll-spacer { grid-column: 1 / -1; }
.has-infinite { overflow-anchor: none; }
.pagination[hidden], .cos-page-sides[hidden] { display: none; }
.cos-paged-results--infinite { display: block; }
.scroll-previous { display: inline-block; margin-block-end: var(--s3); }
.scroll-sentinel { block-size: 1px; }
.scroll-sentinel.is-loading { block-size: 56px; display: grid; place-items: center; }
.scroll-sentinel.is-loading::after { content: ""; inline-size: 22px; block-size: 22px; border: 2px solid var(--text-2); border-block-start-color: transparent; border-radius: 50%; animation: scroll-spin 800ms linear infinite; }
@keyframes scroll-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .scroll-sentinel.is-loading::after { animation: none; } }

/* Item detail: rarity as plain coloured text */
.cos-item__badges .badge--rarity { font-size: var(--fs-sm); font-weight: 600; }

/* ===== Layout language: centred heads, ruled cells ===== */

/* Page heads are centred: title, lead and meta on the axis of the page. */
.page-head { text-align: center; }
.page-head > p:not(.page-head__meta), .page-head__lead { margin-inline: auto; }
.page-head__meta { justify-content: center; }
.shop-head { flex-direction: column; align-items: center; justify-content: center; gap: var(--s4); }
.shop-head .reset-clock { padding: var(--s2) var(--s4); border: 1px solid var(--line); }
/* Section labels sit centred over their content. */
.label { justify-content: center; text-align: center; }
.shop-layout .shop-section > .label { justify-content: flex-start; text-align: start; }
.more-link { text-align: center; }
.cos-search { margin-inline: auto; }
.cos-crumb { justify-content: flex-start; }
.type-rail ul { justify-content: safe center; }

/* Cells: a grid of boxes that share their borders (ledger / almanac).
   One level only: never put .cells inside a cell. */
.cells {
  --cell-min: 220px; --cell-pad: var(--s5);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--cell-min), 100%), 1fr));
  border-block-start: 1px solid var(--line-strong); border-inline-start: 1px solid var(--line-strong);
}
.cells > * { min-width: 0; padding: var(--cell-pad); border-inline-end: 1px solid var(--line-strong); border-block-end: 1px solid var(--line-strong); }
.cells--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cells--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
a.cell, .cells > a { display: block; color: var(--text); transition: background-color var(--ease); }
a.cell:hover, .cells > a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.cell__k { display: block; margin: 0 0 var(--s2); color: var(--text-3); font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.cell__t { margin: 0 0 var(--s2); font: 400 24px/1.1 var(--font-display); letter-spacing: .01em; color: var(--text); }
.cell__d { margin: 0; color: var(--text-2); }
@media (max-width: 759px) { .cells--2, .cells--3 { grid-template-columns: 1fr; } }
/* Home strips: centre the row under its centred title (empty tracks collapse) */
.hub-strip .tiles { grid-template-columns: repeat(auto-fit, minmax(var(--tile-unit), 200px)); justify-content: center; }
@media (max-width: 639px) { .hub-strip .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
