/* Champions, a champion's page, Items and World (ui/front/explore/) in layout A (Tyler, 2026-10-28: "A is best"; the
   accepted mockups a-champions, a-champion, a-items and a-world). Built from the kit: .ms panels, .socket, .kit-chip,
   .kit-plate, .kit-label and .btn. Tokens only, except the map's own ground, camp and ice colours. */

/* Every page starts with its content: the tab names the page (Tyler, 29 October 2026: "get rid of these useless titles
   in every tab"). */
.explore-page { display: flex; flex-direction: column; gap: 16px; }
.explore-search { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: var(--text-faint); background: var(--field); border: 2px solid var(--steel-line); box-shadow: inset 0 2px 0 var(--steel-dark); }
.explore-search:focus-within { border-color: var(--you); }
.explore-search .pico { width: 16px; height: 16px; }
.explore-search input { flex: 1; min-width: 0; padding: 0; color: var(--text); background: none; border: 0; outline: none; font-size: var(--t-s); }
.explore-search input::placeholder { color: var(--text-faint); }
.difficulty-pips { display: inline-flex; gap: 3px; vertical-align: middle; }
.difficulty-pips i { width: 10px; height: 10px; background: var(--chip-face); box-shadow: inset 0 0 0 2px var(--steel-line); }
.difficulty-pips i.on { background: var(--you); box-shadow: inset 0 0 0 2px var(--you-deep); }
.item-cost { font: 700 var(--t-xs)/1.1 var(--font-body); color: var(--you-light); }
:is(.roster-class, .roster-tile, .champion-slot, .champion-item, .item-tile, .item-link, .recipe-node):focus-visible { outline: 3px solid var(--you-light); outline-offset: 2px; }

/* Champions: the filter column beside the portrait grid. The column stays in view while the grid scrolls. */
.roster-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.roster-filters { position: sticky; top: 0; display: flex; flex-direction: column; gap: 14px; min-height: min(700px, 100cqh); padding: 18px 16px; }
.roster-filters > .kit-label { margin-top: 6px; }
.roster-classes { display: flex; flex-direction: column; gap: 2px; }
.roster-class { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; color: var(--text-dim); background: none; border: 0; border-left: 3px solid transparent; font: 700 var(--t-s)/1.2 var(--font-body); text-align: left; cursor: pointer; }
.roster-class:is(:hover, .virtual-hover) { color: var(--text); }
.roster-class[aria-pressed="true"] { color: var(--you-light); border-left-color: var(--you); background: linear-gradient(90deg, var(--you-soft), transparent); }
.roster-difficulty { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.roster-difficulty .kit-chip { justify-content: center; padding: 7px 0; }
.roster-clear { align-self: flex-start; margin-top: auto; }
.roster-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fill, 164px); gap: 18px 8px; align-content: start; }
.roster-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; color: var(--text); font: inherit; cursor: pointer; }
.roster-tile > b { font-size: var(--t-name); }
.roster-meta { display: flex; align-items: center; gap: 8px; font-size: var(--t-xs); }
.roster-tile:is(:hover, .virtual-hover, :focus-visible) { border-color: var(--trim); background: var(--face-steel); box-shadow: 0 0 24px var(--you-soft); }
.roster-tile:is(:hover, .virtual-hover, :focus-visible) > .socket { border-image-source: url('/c/4054d4a674bdb554cd1c93aea296707690854c1e934830690e4178df43ab41eb.png'); box-shadow: 0 0 0 2px var(--you-soft), 0 0 18px var(--you-glow); }
.roster-tip { position: absolute; z-index: 3; width: 340px; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; font-size: var(--t-s); pointer-events: none; box-shadow: 0 12px 30px var(--shadow); }
.roster-tip-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.roster-tip-head b { font-size: var(--t-m); }
.roster-tip-open { color: var(--you-light); }
@container (max-width: 860px) {
  .roster-layout { grid-template-columns: minmax(0, 1fr); }
  .roster-filters { position: static; min-height: 0; }
  .roster-classes { flex-direction: row; flex-wrap: wrap; }
  .roster-grid { grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); }
}

/* A champion: the details on the left, the idle in the middle, recommended items and the look on the right. */
/* The page is the window's height and nothing sits below it: the chosen ability's text takes what the column leaves. */
.champion-page { gap: 12px; height: 100cqh; min-height: 560px; }
/* As tall as the page, so the idle's stage is too. */
.champion-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 600px) minmax(200px, 1fr) minmax(260px, 320px); gap: 24px; }
.champion-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
.champion-title { display: flex; align-items: center; gap: 18px; }
.champion-name { margin: 0; font: 400 var(--t-banner)/1 var(--font-head); letter-spacing: 4px; text-transform: uppercase; color: var(--you-light); }
.champion-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.champion-line b, .champion-summary { font-size: var(--t-m); }
.champion-stats { padding: 8px 4px 4px; }
.champion-stats > p { padding: 0 10px; font: 700 var(--t-xs) var(--font-body); }
.champion-stats dl { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; }
.champion-stats dl > div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; }
.champion-stats dl > div + div { border-left: 2px solid var(--column-edge); }
.champion-stats dt { font: 700 var(--t-xs) var(--font-body); color: var(--text-faint); }
.champion-stats abbr { text-decoration: none; cursor: help; }
.champion-stats dd { margin: 0; font: 700 var(--t-l)/1 var(--font-body); font-variant-numeric: tabular-nums; }
.champion-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.champion-actions .btn { height: 56px; padding-block: 0; }
.champion-actions .btn.primary.big { padding-inline: 28px; font-size: var(--t-l); }
.champion-kit { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.champion-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 96px; padding: 0; color: var(--text-dim); background: none; border: 0; font: inherit; cursor: pointer; }
.champion-slot .socket > img { width: 72px; height: 72px; }
.ability-key { margin-top: 6px; font: 400 var(--t-s)/1 var(--font-head); letter-spacing: 1px; text-transform: uppercase; color: var(--trim); }
.ability-name { font: 700 var(--t-s)/1.15 var(--font-body); text-align: center; overflow-wrap: anywhere; }
.champion-slot:is(:hover, .virtual-hover) .ability-name { color: var(--text); }
.champion-slot[aria-pressed="true"] :is(.ability-key, .ability-name) { color: var(--you-light); }
/* The chosen ability's panel fills the column's foot at one size whichever ability it shows (Tyler, 2026-10-29: nothing
   moves when something changes), tall enough for the longest text, Druid's R with its forms. */
.champion-ability { flex: 1 1 0; display: flex; flex-direction: column; gap: 10px; min-height: 120px; overflow: hidden auto; padding: 16px 20px; }
.champion-ability .kit-label { color: var(--you-light); }
.champion-ability .dim { font-size: var(--t-s); }
.champion-ability .champion-note { margin-top: auto; font-size: var(--t-xs); }
.champion-forms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.champion-forms p { flex-basis: 100%; font-size: var(--t-xs); }
/* The well is the room the layout leaves: the figure's scale is measured from it (explore/champion.rs). */
.champion-stage { position: relative; display: flex; align-items: flex-end; justify-content: center; min-width: 0; min-height: 0; padding-top: 4%; background: radial-gradient(48% 42% at 50% 55%, var(--ally-soft), transparent 75%); }
.champion-stage::before { content: ''; position: absolute; left: 10%; right: 10%; bottom: -28px; height: 64px; background: radial-gradient(closest-side, var(--you-glow), transparent); pointer-events: none; }
.champion-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.champion-items { display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 14px; }
.champion-items .kit-rule { margin: 8px 0 4px; }
.champion-items ul { list-style: none; margin: 0; padding: 0; }
.champion-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 0; color: var(--text); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.champion-item b { display: block; font-size: var(--t-s); }
.champion-item .item-cost { font-size: var(--t-s); }
.champion-item:is(:hover, .virtual-hover) b { color: var(--you-light); }
.champion-items > .btn.quiet { align-self: flex-start; margin-top: 8px; padding-inline: 0; color: var(--you-light); }
.champion-look { padding: 14px 18px; }
.champion-look:not(:has(.look-picker)) { display: none; }
.champion-look .look-picker { margin: 0; }
@container (max-width: 1100px) {
  .champion-layout { grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); }
  .champion-page { height: auto; }
  .champion-stage { grid-column: 1 / -1; grid-row: 2; height: 420px; }
}
/* A short window (1366x768): tighter rows and smaller slots, so the chosen ability's text shows under them (Ibara walk,
   28 October 2026: it sat below the screen). */
@container (max-height: 720px) {
  .champion-page, .champion-main { gap: 8px; }
  .champion-name { font-size: var(--t-xl); }
  .champion-stats dl > div { gap: 2px; padding: 4px 0; }
  .champion-actions { margin-top: 0; }
  .champion-actions .btn { height: 44px; }
  .champion-slot { width: 100px; }
  .champion-slot .socket > img { width: 60px; height: 60px; }
  .ability-key { margin-top: 2px; }
  .champion-ability { gap: 6px; padding: 10px 16px; }
}
@container (max-width: 700px) {
  .champion-layout { grid-template-columns: minmax(0, 1fr); }
  .champion-stage { grid-row: auto; height: 360px; }
  .champion-name { font-size: var(--t-xl); }
}

/* Items: the framed grid beside the open item, both as tall as the page, each scrolling on its own. */
.items-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 512px); grid-template-rows: minmax(0, 1fr); gap: 12px; height: 100cqh; min-height: 560px; }
.items-browse { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; min-height: 0; padding: 12px 6px; }
.items-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 8px 12px; }
.items-categories { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.items-filters .explore-search { width: 300px; max-width: 100%; }
.items-scroll { flex: 1; min-height: 0; overflow: auto; padding: 0 8px 8px; }
.items-scroll > .kit-label { margin: 10px 0; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, 108px); gap: 8px 10px; }
.item-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 5px 0 0; background: none; border: 0; cursor: pointer; }
.item-tile img, .item-heading > img, .item-link > img, .recipe-node img { display: block; image-rendering: pixelated; box-shadow: 0 0 0 2px var(--steel-dark); }
.item-tile img { width: 96px; height: 96px; }
.item-tile:not(.part, [aria-pressed="true"]):is(:hover, .virtual-hover) img { box-shadow: 0 0 0 2px var(--steel-dark), 0 0 0 4px var(--trim); }
.item-tile.part img { box-shadow: 0 0 0 2px var(--steel-dark), 0 0 0 4px var(--ally); }
.item-tile[aria-pressed="true"] img { box-shadow: 0 0 0 2px var(--steel-dark), 0 0 0 5px var(--you), 0 0 22px var(--you-glow); }
.item-detail { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; overflow: auto; overflow-wrap: anywhere; padding: 22px 24px; }
.item-heading { display: flex; align-items: center; gap: 18px; }
.item-heading > img { flex: none; width: 96px; height: 96px; }
.item-heading > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* Names are Atkinson: Silkscreen wrapped "Greatsword of Slaying" over three lines. */
.item-name { margin: 0; font: 700 var(--t-l)/1.2 var(--font-body); color: var(--text); }
.item-heading .item-cost { font-size: var(--t-m); }
.item-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.item-tags .kit-chip { padding: 4px 8px; font-size: var(--t-xs); }
.item-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--t-m); }
.item-stats b { color: var(--you-light); }
.item-passive { padding: 10px 12px; font-size: var(--t-s); }
.item-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.item-row > .dim { font-size: var(--t-s); }
.item-links { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 10px 16px; }
.item-link { display: inline-flex; align-items: center; gap: 8px; padding: 0; color: var(--text); background: none; border: 0; font: 700 var(--t-s) var(--font-body); cursor: pointer; }
.item-link > img { width: 32px; height: 32px; }
.item-link:is(:hover, .virtual-hover) { color: var(--you-light); }
.item-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 2px solid var(--column-edge); }
.item-plan label { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text-dim); }
.item-plan select { width: 170px; max-width: 100%; font-weight: 700; }
.item-detail p[role="status"]:empty { display: none; }
/* The recipe: each part hangs from the item it builds, a stem down, a bar across the parts and a drop to each. */
.recipe { display: flex; justify-content: space-around; gap: 16px; margin: 0; padding: 0; list-style: none; }
.recipe > li { display: flex; flex-direction: column; align-items: center; }
.recipe-node { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; color: var(--text); background: none; border: 0; font: 700 var(--t-xs)/1.1 var(--font-body); cursor: pointer; }
.recipe-node img { width: 48px; height: 48px; }
.recipe-node:is(:hover, .virtual-hover) { color: var(--you-light); }
.recipe .recipe { position: relative; justify-content: center; gap: 0; padding-top: 12px; }
.recipe .recipe::before { content: ''; position: absolute; top: 0; left: calc(50% - 1px); height: 12px; border-left: 2px solid var(--trim); }
.recipe .recipe > li { position: relative; padding: 12px 8px 0; }
.recipe .recipe > li::before, .recipe .recipe > li::after { content: ''; position: absolute; top: 0; width: 50%; height: 12px; border-top: 2px solid var(--trim); }
.recipe .recipe > li::before { right: 50%; }
.recipe .recipe > li::after { left: calc(50% - 1px); border-left: 2px solid var(--trim); }
.recipe .recipe > li:first-child::before, .recipe .recipe > li:last-child::after { border-top: 0; }
@container (max-width: 980px) {
  .items-page { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; height: auto; min-height: 0; }
  .items-browse, .item-detail { grid-column: 1; grid-row: auto; }
  .items-scroll, .item-detail { overflow: visible; }
}

/* World: the map beside its key, a card for each part of the field under both, all in the window (Tyler, 29 October
   2026: "make the world Tab actually fit the screen"): the map takes the height the cards leave and keeps its shape. */
.world-page { height: 100cqh; min-height: 560px; }
.world-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 276px; gap: 24px; }
.world-map-panel { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0; overflow: hidden; }
.world-map { display: block; width: 100%; height: 100%; }
.world-key { min-height: 0; overflow: hidden auto; }
.map-ground { fill: var(--bg-1); }
.map-floor { image-rendering: pixelated; filter: brightness(0.82) saturate(0.9); }
.map-bowl { fill: #1b3358; stroke: var(--trim); stroke-width: 12; }
.map-bowl-ice { fill: none; stroke: #9fd8ff; stroke-width: 6; opacity: 0.55; }
.map-lane { fill: none; stroke: var(--trim); stroke-width: 16; stroke-opacity: 0.75; }
:is(.map-tower, .map-core-ring, .map-camp, .map-objective, .map-raid) { stroke: var(--steel-dark); stroke-width: 12; }
.map-tower.blue, .map-core.blue .map-core-team { fill: var(--ally); }
.map-tower.red, .map-core.red .map-core-team { fill: var(--enemy); }
.map-core-ring { fill: var(--trim); } .map-core-well { fill: var(--steel-dark); }
.map-camp { fill: #8fb86a; stroke-width: 10; } .map-objective { fill: var(--you); } .map-raid { fill: #bfe8ff; }
.map-label { font: 700 54px var(--font-body); fill: var(--text); text-anchor: middle; paint-order: stroke; stroke: var(--steel-dark); stroke-width: 14px; stroke-linejoin: round; }
.map-label.tower { font-size: 44px; stroke-width: 12px; }
.world-key { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; }
.world-key .kit-rule { margin: 8px 0 6px; }
.map-key { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.map-key li { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.map-key svg { flex: none; width: 28px; height: 28px; }
.map-key svg * { stroke-width: 8; }
.map-key-lane { fill: var(--trim); }
.world-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 16px; }
.world-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.world-fact { display: flex; gap: 16px; padding: 18px 20px; }
.world-fact-art { flex: none; display: grid; place-items: center; width: 96px; height: 96px; overflow: hidden; background: var(--field); border: 2px solid var(--column-edge); }
.world-fact-art img { max-width: 76px; max-height: 91px; }
.world-fact-art svg { width: 56px; height: 56px; }
/* The tower's idle frame (x 560, 80 by 145 on the 1024px production sheet) at 0.62. */
.world-tower { --s: 0.62; width: calc(80px * var(--s)); height: calc(145px * var(--s)); background: calc(-560px * var(--s)) 0 / calc(1024px * var(--s)) auto no-repeat; }
/* The heading stays on one line (the Ibara re-check saw "Lanes and towers" wrap); in a narrower page the art stands
   over the text so the heading has the card's width. */
.world-fact h3 { white-space: nowrap; }
@container (max-width: 1500px) { .world-fact { flex-direction: column; } }
.world-rimecoil { width: 92px; height: 92px; background: -300px -95px / 712px 548px no-repeat; image-rendering: pixelated; }
.world-fact p { margin-top: 8px; font-size: var(--t-s); line-height: 1.4; color: var(--text-dim); }
@container (max-width: 900px) {
  .world-page { height: auto; }
  .world-layout { grid-template-columns: minmax(0, 1fr); }
  .world-map { height: auto; }
  .map-key { flex-direction: row; flex-wrap: wrap; gap: 0 18px; }
  .world-actions { flex-direction: row; flex-wrap: wrap; }
}
