/* Store: the art is the collection; controls stay quiet until they are needed. */
.cosmetic-page {
  grid-template-columns: minmax(0, 1fr) minmax(370px, 32%);
  gap: 0 18px;
}
.cosmetic-page .cosmetic-browse {
  position: relative;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(155deg, var(--steel-flat), var(--bg-1) 54%);
}
/* The Items page's tall fade at the grid's foot, so a row that continues below reads as more to scroll rather than
   a row cut off (council round 14: the third row stopped at the frame with no cue). */
.cosmetic-page .cosmetic-browse:has(.cosmetic-grid)::after { content: ''; position: absolute; left: 0; right: 18px; bottom: 0; height: 88px; background: linear-gradient(transparent, var(--panel-soft) 50%, var(--bg-1)); pointer-events: none; }
.cosmetic-page .cosmetic-filters {
  flex: none;
  align-items: end;
  gap: 12px 18px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--steel-line);
}
.cosmetic-page .cosmetic-types { gap: 4px; }
.cosmetic-page .cosmetic-category {
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font: 700 var(--t-s)/1.1 var(--font-body);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background-color 120ms ease;
}
.cosmetic-page .cosmetic-category:is(:hover, .virtual-hover) { color: var(--text); background: var(--ally-soft); }
.cosmetic-page .cosmetic-category[aria-pressed="true"] { color: var(--you-light); border-bottom-color: var(--you); background: var(--you-soft); }
/* One heading line: the category with its line beside it. The Shop and Collection tabs already say which list this is,
   so the section label is kept for screen readers only (client council round 11: three stacked headings). */
.cosmetic-gallery-head {
  display: flex;
  flex: none;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px 8px;
}
.cosmetic-gallery-head > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; min-width: 0; }
.cosmetic-gallery-head h3 { margin: 0; font: 400 var(--t-l)/1.1 var(--font-head); color: var(--text); }
.cosmetic-gallery-head p { margin: 0; color: var(--text-dim); font-size: var(--t-s); }
.cosmetic-gallery-head .kit-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.cosmetic-gallery-count { flex: none; color: var(--text-dim); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.cosmetic-page .cosmetic-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  grid-auto-rows: max-content;
  gap: 14px;
  padding: 8px 20px 104px;
  scroll-padding-bottom: 104px;
  scrollbar-gutter: stable;
}
.cosmetic-page .cosmetic-tile {
  gap: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--steel-line);
  background: var(--panel-flat);
  box-shadow: 0 4px 12px var(--shadow);
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.cosmetic-page .cosmetic-tile:is(:hover, .virtual-hover) { transform: translateY(-2px); border-color: var(--trim); }
.cosmetic-page .cosmetic-tile[aria-pressed="true"] { border-color: var(--you); box-shadow: 0 0 0 1px var(--you), 0 5px 16px var(--shadow); }
.cosmetic-page .cosmetic-thumbnail {
  flex: 0 0 clamp(110px, calc(15 * var(--vh, 1vh)), 160px);
  width: 100%;
  height: clamp(110px, calc(15 * var(--vh, 1vh)), 160px);
  margin: 0;
  border-bottom: 1px solid var(--steel-line);
  background-color: var(--bg-0);
  background-repeat: no-repeat;
}
.cosmetic-page .cosmetic-thumbnail-avatar { background-size: contain; }
/* A banner fills its tile like the avatars, cropped to the banner's centre, rather than a thin letterboxed strip
   (council round 14). The preview beside the grid shows the whole banner. */
.cosmetic-page .cosmetic-thumbnail-banner { background-size: cover; background-position: center; image-rendering: auto; }
/* A frame's tile is a small sample profile card (client council round 16: outlines on flat navy were the grid's weakest
   art): the frame is the border of a card whose ground is the title's night sky, with the free crest in its gilded
   mount over a dark base band, as the profile and its preview draw them. No scene, never the gate. */
.cosmetic-page .cosmetic-thumbnail-frame {
  position: relative; display: block;
  background-color: var(--bg-3);
  background-image:
    linear-gradient(0deg, rgb(6 8 18 / 94%) 0 20%, var(--trim-dark) 20% calc(20% + 2px), transparent calc(20% + 2px)),
    linear-gradient(90deg, rgb(6 8 18 / 50%), rgb(6 8 18 / 0%) 60%),
    var(--cosmetic-ground);
  background-size: auto, auto, cover;
  background-position: center, center, 100% 0;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.cosmetic-page .cosmetic-thumbnail-frame::before {
  content: ''; position: absolute; left: 16%; bottom: 25%; width: 26%; max-width: 64px; aspect-ratio: 1; pointer-events: none;
  background: var(--cosmetic-avatar) center / 75% no-repeat, radial-gradient(circle at 50% 38%, var(--bg-3), var(--bg-1) 74%);
  border: 2px solid var(--trim); outline: 2px solid var(--bg-0);
  box-shadow: 0 0 0 4px rgb(201 162 74 / 22%), 0 6px 14px var(--shadow);
  image-rendering: pixelated;
}
/* The frame's corners keep their shape and its edges repeat, as on the profile card. */
.cosmetic-page .cosmetic-thumbnail-frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border: solid transparent; border-width: 14px 19px; border-image-source: var(--cosmetic-frame); border-image-slice: 15% 8%; border-image-repeat: round;
  image-rendering: pixelated;
}
/* The Collection's badges, ladder by ladder: each ladder's heading spans the grid's row. */
.cosmetic-page .cosmetic-ladders .cosmetic-ladder { grid-column: 1 / -1; margin: 10px 0 -6px; color: var(--text-dim); font: 700 var(--t-xs)/1.2 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; }
.cosmetic-page .cosmetic-ladders .cosmetic-ladder:first-child { margin-top: 0; }
/* Frames on their own: wide tiles at the banner's own shape, so each design is drawn larger and frames can be compared
   side by side (council round 14). */
.cosmetic-page .cosmetic-grid-frames { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cosmetic-page .cosmetic-grid-frames .cosmetic-thumbnail-frame { flex-basis: auto; height: auto; aspect-ratio: 38 / 17; }
.cosmetic-page .cosmetic-grid-frames .cosmetic-thumbnail-frame::before { left: 11%; width: 17%; }
.cosmetic-page .cosmetic-grid-frames .cosmetic-thumbnail-frame::after { border-width: 22px 30px; }
.cosmetic-page .cosmetic-tile-copy { display: grid; gap: 3px; padding: 10px 12px 12px; }
.cosmetic-page .cosmetic-tile b, .cosmetic-page .cosmetic-price { padding: 0; }
.cosmetic-tile-kind { color: var(--text-dim); font: 400 var(--t-xs)/1.2 var(--font-body); }
.cosmetic-page .cosmetic-tile b { font: 700 var(--t-m)/1.15 var(--font-body); overflow-wrap: anywhere; }
.cosmetic-page .cosmetic-price { color: var(--you-light); font-variant-numeric: tabular-nums; }
.cosmetic-page .cosmetic-side { gap: 14px; }
/* The preview panel ends where its content does, so its lower part is not an empty gold box (council round 14). */
.cosmetic-page .cosmetic-side > .cosmetic-detail { flex: 0 1 auto; min-height: 0; overflow: auto; }
.cosmetic-page .cosmetic-side > .cosmetic-empty-preview { flex: 1 1 0; min-height: 0; overflow: auto; }
.cosmetic-page .cosmetic-detail { gap: 14px; padding: 20px; background: linear-gradient(155deg, var(--steel-flat), var(--bg-1) 70%); }
.cosmetic-detail-head { display: grid; gap: 3px; width: 100%; }
.cosmetic-detail-head .kit-label { color: var(--text-dim); }
.cosmetic-page .cosmetic-name { font: 400 var(--t-xl-sm)/1.15 var(--font-head); color: var(--you-light); overflow-wrap: anywhere; }
.cosmetic-page .cosmetic-previews { width: 100%; }
.cosmetic-page .cosmetic-preview-pair { gap: 16px; }
.cosmetic-page .cosmetic-preview-pair > div { gap: 8px; }
/* The profile preview is the Profile's own identity card at the Store's scale (client council round 16): the banner is
   its ground and the frame its border, the avatar in its mount with the title and name low on the left, the featured
   champions above on the right and the level along the base. polish-profile.css draws the card; these set its scale. */
.profile-identity.compact { width: 100%; box-shadow: 0 8px 20px var(--shadow); }
.profile-identity.compact .profile-identity-details {
  grid-template-rows: minmax(0, 1fr) auto auto; grid-template-areas: '. showcase' 'who who' 'progress progress';
  gap: 0 12px; min-height: 236px; padding: 14px 24px 0;
}
.profile-identity.compact .card-frame-border { border-width: 20px 28px; }
.profile-identity.compact .profile-who-block { gap: 14px; padding: 0 0 12px; }
.profile-identity.compact .profile-avatar {
  width: 64px; height: 64px; padding: 4px; border-width: 2px; outline-width: 2px;
  box-shadow: 0 0 0 4px rgb(201 162 74 / 22%), 0 8px 16px var(--shadow), inset 0 0 0 1px var(--trim-dark);
}
/* Half the free crest's 96 pixels, so its pixels stay square. */
.profile-identity.compact .profile-avatar > img.default-avatar { width: 48px; height: 48px; }
.profile-identity.compact .profile-who-copy { flex: 1 1 auto; gap: 2px; }
.profile-identity.compact .profile-title { font-size: var(--t-xs); }
.profile-identity.compact .profile-who { display: block; max-width: 100%; font: 700 var(--t-l)/1.2 var(--font-body); }
.profile-identity.compact .profile-who .faint { margin-left: 6px; font-size: var(--t-s); font-weight: 400; }
.profile-identity.compact .profile-showcase { width: auto; padding: 0; zoom: .45; }
.profile-identity.compact .profile-identity-progress { height: auto; margin: 0 -24px; padding: 8px 24px 10px; }
/* With a frame on, the frame is the card's edge: the name, the avatar and the level band all sit inside its inner edge,
   8px clear of the 20px and 28px border, and the band is a plate inside the frame rather than a strip under it (client
   council round 18: the band's negative margin ran "0 / 100 XP" under the right border, where it read "XF"). */
.profile-identity.compact:has(> .card-frame-border) .profile-identity-details { padding: 28px 36px; }
.profile-identity.compact:has(> .card-frame-border) .profile-identity-progress { margin: 0; padding: 8px 12px 10px; }
.profile-identity.compact .card-parts { grid-template-rows: none; grid-auto-rows: auto; height: auto; gap: 6px 12px; padding: 0; }
.profile-identity.compact :is(.card-crest img, .card-achievement img, .card-mastery-portrait, .card-mastery-portrait > img) { width: 28px; height: 28px; }
.profile-identity.compact .card-mastery-portrait .socket { width: 28px !important; height: 28px !important; }
.profile-identity.compact .card-mastery-portrait .socket > img { width: 20px !important; height: 20px !important; }
.profile-identity.compact .card-badge { width: 28px; height: 28px; }
.profile-identity.compact .card-badge img { width: 28px; height: 28px; }
.profile-identity.compact .card-crest b { font-size: var(--t-m); }
.profile-identity.compact .card-crest .card-level { gap: 10px; }
.profile-identity.compact .profile-identity-xp { gap: 8px; font-size: var(--t-s); }
.profile-identity.compact :is(.card-mastery-label, .card-achievement figcaption, .card-badges-label) { font-size: var(--t-xs); }
/* The profile's own track: a bold bar with a lit steel rim, dark at zero. */
.profile-identity.compact progress { height: 10px; background: var(--bg-0); border: 1px solid var(--line-strong); box-shadow: 0 0 0 1px var(--bg-0), inset 0 2px 0 rgb(0 0 0 / 45%); }
.cosmetic-page .cosmetic-preview-pair p { margin: 0; font-size: var(--t-s); line-height: 1.45; }
.cosmetic-page .cosmetic-preview-pair p + p { margin-top: 4px; }
.cosmetic-acquire { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; padding-top: 12px; border-top: 1px solid var(--steel-line); }
.cosmetic-acquire :is(.cosmetic-cost, .cosmetic-ownership) { flex-basis: 100%; color: var(--you-light); font: 700 var(--t-l)/1.15 var(--font-body); font-variant-numeric: tabular-nums; }
.cosmetic-acquire > .dim { flex-basis: 100%; font-size: var(--t-s); }
.cosmetic-acquire .btn { min-height: 42px; }
/* A purchase the balance cannot cover wears the kit's one disabled look (kit.css: the steel button's body face in normal
   case on its disabled frame; client council round 17: this was a third look, body-face capitals on a flat plate), at
   the row's height, with its reason beside it in text no brighter than the button's words (council round 14). */
.cosmetic-page .cosmetic-acquire > .btn.primary:disabled { min-height: 42px; padding: 8px 18px; }
.cosmetic-page .cosmetic-acquire > .btn.primary:disabled + p.dim { flex: 1 1 160px; color: var(--text-faint); font-size: var(--t-s); }
.cosmetic-empty-preview { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 24px; color: var(--text-dim); }
.cosmetic-empty-preview p { margin: 0; }
.cosmetic-page .cosmetic-titles { min-height: 0; overflow: auto; padding: 8px 20px 22px; }
.cosmetic-page .cosmetic-titles h4 { margin: 8px 0 0; color: var(--you-light); font: 700 var(--t-m)/1.2 var(--font-body); }
.cosmetic-page .cosmetic-title { min-height: 84px; border-width: 1px; }
.cosmetic-page .cosmetic-title-list { list-style: none; margin: 0; padding: 0; }
@media (max-width: 1099.98px) {
  .cosmetic-page { grid-template-columns: minmax(0, 1fr) minmax(340px, 36%); }
  .cosmetic-page .cosmetic-name { font-size: var(--t-l); }
  .cosmetic-page .cosmetic-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 10px; }
  .cosmetic-page .cosmetic-grid-frames { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  .cosmetic-page .cosmetic-grid-frames .cosmetic-thumbnail-frame::after { border-width: 18px 24px; }
  .profile-identity.compact .profile-showcase { zoom: .4; }
}
@media (prefers-reduced-motion: reduce) {
  .cosmetic-page :is(.cosmetic-category, .cosmetic-tile) { transition: none; }
  .cosmetic-page .cosmetic-tile:is(:hover, .virtual-hover) { transform: none; }
}

/* "In matches" beside a banner or title: a board row as a match draws it, the banner as the ground behind the name
   and the title in gold under it (cosmetics_preview.rs `match_card`). */
.match-sample { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 60px; padding: 8px 14px;
  background: var(--panel-flat); box-shadow: inset 0 0 0 1px var(--steel-line); }
.match-sample-who { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-shadow: 0 1px 0 rgb(0 0 0 / 80%); }
.match-sample .match-identity-title { padding: 0; background: none; font-size: var(--t-s); }

/* A phone upright (Tyler, 2026-11-17: "a lot of the menus are kind of squished and they're not optimized for mobile";
   measured by tests/browser_phone_menus.cjs). The Store is one column that scrolls with the page: the sub-tabs, one
   band of filters, then the grid two tiles wide. Mobile council round 1 (Sol; the coordinator settled one pattern with
   Items): the chosen item's preview, price and actions open in the sheet (explore/sheet.rs) when a tile is pressed, so
   the page leads with the goods, and no tile wears the chosen ring while nothing is open. The browse panel lets its parts
   join the page's column (display: contents); the side keeps only the test orders, after the grid. The categories take
   one row under the sub-tabs, scrolling sideways, with the champion picker compact at its right, and the row holds at
   the top while the goods scroll under it (mobile council round 2, Opus: sub-tabs, categories and picker stacked to
   300px before the goods); it holds at -12px, the page's upright padding (client.css). The gallery's heading and count only repeated the chosen category and the grid, so they go
   (Titles keeps its line, which says how they are earned). */
@media (max-width: 600px) and (orientation: portrait) {
  html.touch .cosmetic-page, html.touch .purchases-page { display: flex; flex-direction: column; align-items: stretch; gap: 10px; height: auto; min-height: 0; }
  html.touch :is(.cosmetic-page, .purchases-page) > .pages-head { flex-wrap: wrap; align-items: center; gap: 0 12px; margin: 0; }
  html.touch :is(.cosmetic-page, .purchases-page) .pages-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  /* The three sub-tabs fill the row, each a full thumb's height. */
  html.touch .store-tabs { flex: 1 1 auto; justify-content: space-between; gap: 0; min-width: 0; border-bottom: 1px solid var(--steel-line); }
  html.touch .store-tabs .kit-tab { flex: 1 1 0; min-height: 44px; padding: 0 6px; white-space: nowrap; }
  html.touch .store-tabs .kit-tab:is(.on, [aria-current="page"])::after { left: 6px; right: 6px; }
  html.touch :is(.cosmetic-page, .purchases-page) .pages-head .pages-note { flex-basis: 100%; text-align: left; }
  html.touch :is(.cosmetic-page, .purchases-page) .pages-head .pages-note:empty { display: none; }

  html.touch .cosmetic-page .cosmetic-browse { display: contents; }
  html.touch .cosmetic-page .cosmetic-browse:has(.cosmetic-grid)::after { display: none; }
  html.touch .cosmetic-page .cosmetic-browse > * { order: 3; }
  html.touch .cosmetic-page .cosmetic-browse > .cosmetic-filters { order: 1; }
  html.touch .cosmetic-page .cosmetic-browse > .cosmetic-gallery-head { order: 2; }
  html.touch .cosmetic-page .cosmetic-side { order: 4; flex: none; gap: 10px; min-height: 0; overflow: visible; }
  html.touch .cosmetic-page .cosmetic-side > :is(.cosmetic-detail, .cosmetic-empty-preview) { display: none; }
  html.touch .cosmetic-page .cosmetic-side:not(:has(> *)) { display: none; }

  /* Every category in view (mobile council round 3, both judges: Frames and Titles lay under the row's fade while the
     grid opened on frames): the categories take the row's whole width and wrap, rather than scroll, when there are more
     than fit; they hold at the top while the goods scroll under them. The champion picker, which only All, Avatars and
     Champion looks have, goes to the line under them and scrolls away with the goods. */
  html.touch .cosmetic-page .cosmetic-filters { display: contents; }
  html.touch .cosmetic-page .cosmetic-filters > * { order: 1; }
  html.touch .cosmetic-page .cosmetic-filters > .cosmetic-types { position: sticky; top: -12px; z-index: 3; flex: none; flex-wrap: wrap; gap: 4px; margin: -10px 0 0; padding: 8px 0;
    overflow: visible; mask-image: none; background: var(--bg-1); box-shadow: 0 1px 0 var(--steel-line), 0 10px 14px -6px var(--shadow); }
  html.touch .cosmetic-page .cosmetic-category { flex: 1 0 auto; justify-content: center; min-height: 44px; padding-inline: 10px; }
  html.touch .cosmetic-page .cosmetic-filters > .forge-select { align-self: stretch; margin-top: -2px; }
  /* (Through .cosmetic-browse: the both-ways rules below set the picker's size for a row beside the categories.) */
  html.touch .cosmetic-page .cosmetic-browse .cosmetic-filters .forge-select-trigger { width: 100%; min-height: 44px; justify-content: space-between; gap: 8px; padding-inline: 14px; font-size: var(--t-s); }
  html.touch .cosmetic-page .cosmetic-browse .cosmetic-filters .forge-select-menu { left: 0; right: 0; width: auto; }

  html.touch .cosmetic-page .cosmetic-orders { height: auto; max-height: none; }
  html.touch .cosmetic-page .cosmetic-stage { height: clamp(200px, calc(28 * var(--vh, 1vh)), 280px); }

  html.touch .cosmetic-page .cosmetic-gallery-head { gap: 12px; padding: 0; }
  html.touch .cosmetic-page .cosmetic-gallery-head:not(:has(+ .cosmetic-titles)) { display: none; }
  html.touch .cosmetic-page .cosmetic-gallery-head h3 { font-size: var(--t-m); }
  /* Two tiles a row, the grid as long as the page; frames on their own one a row at the banner's shape. */
  html.touch .cosmetic-page .cosmetic-grid { flex: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; overflow: visible; padding: 0 0 8px; scrollbar-gutter: auto; }
  html.touch .cosmetic-page .cosmetic-grid-frames { grid-template-columns: minmax(0, 1fr); }
  html.touch .cosmetic-page .cosmetic-thumbnail { flex-basis: 120px; height: 120px; }
  /* A frame in the two-wide grid is drawn at its own size, a tight crop of the card it borders (mobile council round 2,
     Opus: a thin frame round a small crest left the tile mostly empty navy): its corners and edges at the real card's
     width, round the crest in its mount at the middle, on the sky alone. */
  html.touch .cosmetic-page .cosmetic-grid:not(.cosmetic-grid-frames) .cosmetic-thumbnail-frame { background-image: radial-gradient(closest-side, transparent 60%, rgb(6 8 18 / 55%)), var(--cosmetic-ground);
    background-size: auto, cover; background-position: center, 100% 0; }
  html.touch .cosmetic-page .cosmetic-grid:not(.cosmetic-grid-frames) .cosmetic-thumbnail-frame::after { border-width: 22px 30px; }
  html.touch .cosmetic-page .cosmetic-grid:not(.cosmetic-grid-frames) .cosmetic-thumbnail-frame::before { left: 50%; bottom: 50%; width: 60px; max-width: none; translate: -50% 50%; }
  html.touch .cosmetic-page .cosmetic-tile-copy { padding: 8px 10px 10px; }
  html.touch .cosmetic-page .cosmetic-titles { flex: none; overflow: visible; padding: 0 0 8px; }
  html.touch .cosmetic-page:not(:has(.phone-sheet[open])) .cosmetic-tile[aria-pressed="true"] { border-color: var(--steel-line); box-shadow: 0 4px 12px var(--shadow); }
  html.touch .cosmetic-page:not(:has(.phone-sheet[open])) .cosmetic-tile[aria-pressed="true"] b { color: inherit; }
  html.touch .cosmetic-page:not(:has(.phone-sheet[open])) .cosmetic-title[aria-pressed="true"] { border-color: var(--plate-edge); color: inherit; }

  /* In the sheet: the name, the preview, then the price and actions held at the sheet's foot while the rest scrolls,
     so Buy or Pin as goal is always in reach. */
  html.touch .cosmetic-page .phone-sheet .cosmetic-detail { gap: 12px; padding: 0 16px; }
  html.touch .cosmetic-page .phone-sheet .cosmetic-detail > .cosmetic-acquire { position: sticky; bottom: 0; z-index: 1; margin: 0 -16px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
  /* Short of Silver in the sheet (mobile council round 2, Sol: the shortfall wrapped beside the big action): the price
     and what is missing share the first line, and Pin as goal takes the whole width under them, at the thumb. */
  html.touch .cosmetic-page .phone-sheet .cosmetic-short { grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; }
  html.touch .cosmetic-page .phone-sheet .cosmetic-acquire.cosmetic-short > .btn.cosmetic-buy:disabled + p.dim { grid-column: 2; grid-row: 1; text-align: right; color: var(--text-dim); font-size: var(--t-xs); }
  html.touch .cosmetic-page .phone-sheet .cosmetic-acquire.cosmetic-short > .cosmetic-pin { grid-column: 1 / -1; grid-row: 2; width: 100%; min-height: 52px; }

  /* Purchases: the orders, then the membership, one under the other; each order's name over its amount, status and date. */
  html.touch .purchases-page > .ms { min-height: 0; max-height: none; overflow: visible; padding: 16px; }
  html.touch .purchases-orders li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  html.touch .purchases-orders li > b { grid-column: 1 / -1; }
  html.touch .purchases-orders li > .dim { text-align: left; }
  html.touch .purchases-page .cosmetic-actions .btn { min-height: 44px; }
}
/* Both ways round. The categories are a row that scrolls sideways and fades at its right edge; the champion picker's
   label is kept for screen readers (the picker's words say what it chooses). */
@media (max-width: 600px), (orientation: landscape) and (max-width: 1099.98px) {
  /* The sub-tabs in the main tabs' words and chosen look (mobile council round 2, Opus: 14px tracked pixel capitals were
     the faintest navigation in the app): the body face at 16px, bold, 1px apart, the chosen one gold on a soft gold
     ground over its gold line. Profile's section tabs match (pages.css). */
  html.touch .store-tabs .kit-tab { font: 700 var(--t-s)/1 var(--font-body); letter-spacing: 1px; }
  html.touch .store-tabs .kit-tab:is(.on, [aria-current="page"]) { background: var(--you-soft); }
  html.touch .cosmetic-page .cosmetic-filters { flex-direction: row; align-items: center; gap: 8px; }
  html.touch .cosmetic-page .cosmetic-types { flex: 1 1 auto; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow-x: auto; padding-right: 24px; scrollbar-width: none;
    mask-image: linear-gradient(90deg, black calc(100% - 24px), transparent); }
  html.touch .cosmetic-page .cosmetic-filters .forge-select { flex: none; min-width: 0; }
  html.touch .cosmetic-page .cosmetic-filters .forge-select > .kit-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  html.touch .cosmetic-page .cosmetic-filters .forge-select-trigger { gap: 10px; min-width: 0; padding-inline: 12px; white-space: nowrap; }
  html.touch .cosmetic-page .cosmetic-filters .forge-select-menu { width: 220px; }
  /* A category's line ("Make your profile your own.") is left to the desktop; Titles keeps its line, which says how
     they are earned. */
  html.touch .cosmetic-page .cosmetic-gallery-head:not(:has(+ .cosmetic-titles)) p { display: none; }
  /* The category over the name: "Profile frame" under it says the same. */
  html.touch .cosmetic-page .cosmetic-detail-head > .kit-label { display: none; }
  html.touch .cosmetic-page .cosmetic-detail { gap: 10px; padding: 12px 14px; }
  html.touch .cosmetic-page .cosmetic-name { font-size: var(--t-l); }
  html.touch .cosmetic-page .paid-detail > .cosmetic-acquire { position: static; margin: 0; padding: 10px 0 0; width: 100%; background: none; box-shadow: none; }
  /* The preview card at a phone's scale: a smaller mount, border and floor, so the price and Buy fit under it. */
  html.touch .cosmetic-page .profile-identity.compact .profile-identity-details { min-height: 0; padding: 10px 16px 0; }
  html.touch .cosmetic-page .profile-identity.compact:has(> .card-frame-border) .profile-identity-details { padding: 20px 26px; }
  html.touch .cosmetic-page .profile-identity.compact .card-frame-border { border-width: 14px 20px; }
  html.touch .cosmetic-page .profile-identity.compact .profile-who-block { gap: 10px; padding: 0 0 8px; }
  html.touch .cosmetic-page .profile-identity.compact .profile-avatar { width: 52px; height: 52px; padding: 2px; }
  html.touch .cosmetic-page .profile-identity.compact .profile-avatar > img.default-avatar { width: 48px; height: 48px; }
  html.touch .cosmetic-page .profile-identity.compact .profile-identity-progress { padding-block: 6px; }
  /* The name and its number stay together; the tag drops to the next line when there is no room beside them
     (mobile council round 0: "Tester / 3"). */
  html.touch .profile-identity.compact .profile-who { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; white-space: nowrap; }
  html.touch .profile-identity.compact .profile-who .faint { margin-left: 0; }
  /* Price and Buy on one line, why Buy is off right under them on the same bar. */
  html.touch .cosmetic-page .cosmetic-detail > .cosmetic-acquire { align-self: stretch; display: grid; grid-template-columns: minmax(0, 1fr) auto;
    align-items: center; gap: 4px 12px; margin: 0 -14px -12px; padding: 10px 14px 12px; width: auto;
    background: linear-gradient(var(--steel-flat), var(--bg-1)); border-top: 1px solid var(--steel-line); }
  html.touch .cosmetic-page .cosmetic-acquire > * { grid-column: 1 / -1; }
  html.touch .cosmetic-page .cosmetic-acquire > :is(.cosmetic-cost, .cosmetic-ownership) { grid-column: 1; font-size: var(--t-m); }
  html.touch .cosmetic-page .cosmetic-acquire > :is(.cosmetic-cost, .cosmetic-ownership) + :is(.btn, .sign-in-button) { grid-column: 2; grid-row: 1; }
  html.touch .cosmetic-page .cosmetic-acquire .btn { min-height: calc(44px / var(--client-scale, 1)); }
  html.touch .cosmetic-page .cosmetic-acquire > .btn.primary:disabled + p.dim { grid-column: 1; color: var(--text-dim); font-size: var(--t-s); }
  html.touch .cosmetic-page .cosmetic-acquire > p.dim + .cosmetic-pin { grid-column: 2; }
  /* An item the account cannot afford yet (mobile council round 1, Opus: the disabled Buy and the live Pin as goal
     looked the same weight): the shortfall stands where Buy was, under the price, and Pin as goal beside both is the
     one gold action. Once pinned, Unpin goal stays steel. */
  html.touch .cosmetic-page .cosmetic-short > .cosmetic-buy { display: none; }
  html.touch .cosmetic-page .cosmetic-acquire.cosmetic-short > .btn.cosmetic-buy:disabled + p.dim { grid-column: 1; grid-row: 2; color: var(--text); font-size: var(--t-s); line-height: 1.3; }
  html.touch .cosmetic-page .cosmetic-short > .cosmetic-pin { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  html.touch .cosmetic-page .cosmetic-short > .cosmetic-pin:not(:has(+ p), :disabled) { color: var(--ink); text-shadow: 0 2px 0 var(--gold-text-shade);
    font: 400 var(--t-m)/1.15 var(--font-head); letter-spacing: 1px; text-transform: uppercase; padding-inline: 16px;
    border-image-source: url('/c/a45acd7c1a0c134020cb7a0483ee926794a89be47cbfa370c0d22614286a7c77.png'); background: var(--face-gold) padding-box; }
  html.touch .cosmetic-page .cosmetic-short > .cosmetic-pin:not(:has(+ p), :disabled):active { border-image-source: url('/c/f971626c33be548ca5545379ee4dd02f5d7d6845aa67f4c90a6668912371da2d.png'); background: var(--face-gold-pressed) padding-box; }
}
/* On its side the two columns stay, but a fixed-height page left one row of the grid in view inside a page that
   scrolled as well (its 560px floor over about 300px of screen). Here the grid runs the page's length and scrolls with
   it, and the chosen item holds its place beside it (sticky), so a tapped tile's preview is always in view. Mobile
   council round 1 (both judges): the preview sat under the price and was cut at the screen's foot. Now the preview
   leads, at a size the column's height holds, with the name, price and actions under it; the card's own lines give way. */
@media (orientation: landscape) and (max-width: 1099.98px) {
  html.touch .cosmetic-page { grid-template-rows: auto auto; align-items: start; height: auto; min-height: 0; }
  html.touch :is(.cosmetic-page, .purchases-page) > .pages-head { margin-bottom: 8px; }
  /* The chosen item's column starts at the page's top, beside the title and tabs, for the height its preview needs. */
  html.touch .cosmetic-page > .pages-head { grid-column: 1; }
  html.touch .cosmetic-page > .cosmetic-side { grid-column: 2; grid-row: 1 / span 2; }
  html.touch :is(.cosmetic-page, .purchases-page) .store-tabs .kit-tab { min-height: calc(44px / var(--client-scale, 1)); }
  html.touch .cosmetic-page .cosmetic-browse { overflow: visible; }
  html.touch .cosmetic-page .cosmetic-browse:has(.cosmetic-grid)::after { display: none; }
  /* The categories and the champion picker on one row (mobile council round 2, Sol: two tall rows of filters left the
     first row of goods cut at the screen's foot). */
  html.touch .cosmetic-page .cosmetic-filters { flex-wrap: nowrap; padding: 6px 14px; }
  html.touch .cosmetic-page :is(.cosmetic-category, .forge-select-trigger) { min-height: calc(44px / var(--client-scale, 1)); }
  html.touch .cosmetic-page .cosmetic-category { padding-inline: 10px; }
  html.touch .cosmetic-page .cosmetic-gallery-head { padding: 10px 16px 6px; }
  html.touch .cosmetic-page .cosmetic-grid { flex: none; overflow: visible; padding: 8px 16px 20px; scrollbar-gutter: auto; }
  html.touch .cosmetic-page .cosmetic-titles { overflow: visible; }
  html.touch .cosmetic-page .cosmetic-side { position: sticky; top: 0; max-height: calc(100cqh * var(--cq-fix, 1)); }
  html.touch .cosmetic-page .cosmetic-detail { gap: 6px; padding: 10px 14px 12px; }
  html.touch .cosmetic-page .cosmetic-detail > :is(.cosmetic-previews, .cosmetic-stage, .paid-figures, .paid-item) { order: -3; }
  html.touch .cosmetic-page .cosmetic-detail > .cosmetic-detail-head { order: -2; }
  html.touch .cosmetic-page .cosmetic-detail > .cosmetic-detail-head > p.dim { display: none; }
  html.touch .cosmetic-page .cosmetic-detail > .cosmetic-acquire { order: -1; margin: 0 -14px -12px; padding-block: 8px 10px; }
  /* The card is plainly the player's own: its label and the line under it give their height to the card (upright and
     on a desktop they stay). */
  html.touch .cosmetic-page .cosmetic-preview-pair > div:first-child > .kit-label, html.touch .cosmetic-page .cosmetic-profile-only { display: none; }
  html.touch .cosmetic-page .cosmetic-acquire > .cosmetic-cost { white-space: nowrap; }
  /* Short of Silver: the price and Pin as goal on one row, the shortfall on one line under both. */
  html.touch .cosmetic-page .cosmetic-short > .cosmetic-pin { grid-row: 1; }
  html.touch .cosmetic-page .cosmetic-acquire.cosmetic-short > .btn.cosmetic-buy:disabled + p.dim { grid-column: 1 / -1; grid-row: 2; font-size: var(--t-xs); }
  /* As upright, the gallery's heading and count only repeated the chosen category and the grid. */
  html.touch .cosmetic-page .cosmetic-gallery-head:not(:has(+ .cosmetic-titles)) { display: none; }
  html.touch .cosmetic-page .cosmetic-acquire > .btn.primary:disabled + p.dim { font-size: var(--t-xs); line-height: 1.3; }
  html.touch .cosmetic-page .cosmetic-stage { height: 180px; }
  html.touch .cosmetic-page .cosmetic-side .cosmetic-name { font-size: var(--t-m); }
  html.touch .cosmetic-page .profile-identity.compact:has(> .card-frame-border) .profile-identity-details { padding: 16px 22px; }
  /* In the narrow column the card's base keeps the level and its count; the empty track ran "XP" under the frame. */
  html.touch .cosmetic-page .profile-identity.compact .profile-identity-xp progress { display: none; }
}
/* A small phone on its side (an iPhone SE, 568x320): the sub-tabs run across both columns and the title gives them its
   room (the top bar names the page), and the goods and the chosen item share the width evenly: the chosen item's fixed
   370px column had left the goods a strip and run over the sub-tabs. */
@media (orientation: landscape) and (max-width: 699.98px) {
  html.touch .cosmetic-page { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
  html.touch .cosmetic-page > .pages-head { grid-column: 1 / -1; }
  html.touch .cosmetic-page > .cosmetic-side { grid-row: 2; }
  html.touch :is(.cosmetic-page, .purchases-page) .pages-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  html.touch .cosmetic-page .cosmetic-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); padding-inline: 10px; }
  /* The champion picker under the categories, which then show four or five at once. */
  html.touch .cosmetic-page .cosmetic-filters { flex-wrap: wrap; }
  html.touch .cosmetic-page .cosmetic-types { flex-basis: 100%; }
}
/* The Profile's Collection on a phone on its side has more categories than the Store's row holds beside the champion
   picker, and the last ran under it: the categories take their own row, the picker the next. */
@media (orientation: landscape) and (max-width: 1099.98px) {
  html.touch .profile-collection .cosmetic-page .cosmetic-filters { flex-wrap: wrap; }
  html.touch .profile-collection .cosmetic-page .cosmetic-types { flex-basis: 100%; }
}
/* The Collection inside the Profile (cosmetics.rs, collection_only): the Store's grid and detail at a fixed height in
   the scrolling Profile, one column on a narrow screen. Locked rewards and badges are greyed until earned. */
.profile-collection .cosmetic-page { height: min(80cqh, 780px); min-height: 560px; }
.profile-collection .cosmetic-page > .pages-head { padding: 0 4px 8px; }
.cosmetic-page .cosmetic-locked :is(.cosmetic-thumbnail, img), .cosmetic-page .cosmetic-locked:is(.cosmetic-thumbnail, .cosmetic-avatar-preview) img { filter: grayscale(1) brightness(.55); }
.cosmetic-page .cosmetic-tile.cosmetic-locked .cosmetic-thumbnail { filter: grayscale(1) brightness(.55); }
@media (max-width: 760px) {
  .profile-collection .cosmetic-page { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(420px, 1fr) auto; height: auto; }
  .profile-collection .cosmetic-page .cosmetic-side { grid-column: 1; }
}
