/* House of Embers: the items, mining and economy pages. Extends site.css and components.css; the tokens (BRAND.md), the entity header, stat tiles, data tables,
   galleries and charts are core's. This file holds only what these pages add: a game card beside its neighbours, the catalog's icon grid, the 3D readout, a pick's
   block, the monument's stage picture and the frames' banded glass. */

/* a game card (or two) on its own line, in the Full data of a page */
.pair { display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-5); align-items: flex-start; margin: var(--sp-2) 0 var(--sp-5); }
.pair > .gc { margin: 0; }

/* a details block for a repeated card */
.it-fold { margin: var(--sp-3) 0 0; border-top: 1px solid var(--border); }
.it-fold > summary { display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; cursor: pointer; list-style: none; font-weight: 600; color: var(--text); }
.it-fold > summary::-webkit-details-marker { display: none; }
.it-fold > summary::before { content: ""; flex: none; width: 7px; height: 7px; border: solid var(--text-3); border-width: 0 1.75px 1.75px 0; transform: rotate(-45deg);
  transition: transform var(--t-mid) var(--ease); }
.it-fold[open] > summary::before { transform: rotate(45deg); }
.it-fold .pair { margin-top: 0; }

/* the catalog: a card per group's items, each an icon and a name; its game card shows on hover, focus or tap */
.it-nav { margin: 0 0 var(--sp-5); }
.it-count { color: var(--text-3); font-weight: 500; margin-left: 6px; }
.main ul.items { list-style: none; margin: var(--sp-3) 0 var(--sp-5); padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(188px, 100%), 1fr)); gap: var(--sp-2); }
.it { position: relative; min-width: 0; max-width: none; margin: 0; }
.it-a { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); min-height: 64px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none;
  transition: border-color var(--t-mid) var(--ease), transform var(--t-mid) var(--ease); }
.it-a:hover, .it-a:focus-visible { border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
.it-n { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.it-a .ic { image-rendering: pixelated; }
.it-card { display: none; position: absolute; z-index: 20; left: 0; top: calc(100% - 2px); max-width: min(92vw, 460px); filter: drop-shadow(0 10px 22px rgba(0,0,0,.55)); }
.it-card .gc { margin: 0; }
.it.flip .it-card { left: auto; right: 0; }
.it:hover > .it-card, .it:focus-within > .it-card, .it.open > .it-card { display: block; }
@media (max-width: 480px) {
  .it-card { position: fixed; left: 8px; right: 8px; top: auto; bottom: 8px; max-width: none; }
  .it.flip .it-card { left: 8px; right: 8px; }
}

/* a banded frame cycles its colours (art on): n icons stacked, each shown for its share of the cycle */
.cyc { position: relative; display: inline-block; width: var(--s, 48px); height: var(--s, 48px); flex: none; }
.cyc > .cy { position: absolute; inset: 0; opacity: 0; }
.cyc > .cy:first-child { opacity: 1; }
@keyframes cyc6 { 0% { opacity: 1; } 16.66% { opacity: 0; } 100% { opacity: 0; } }
@keyframes cyc7 { 0% { opacity: 1; } 14.28% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .cyc[data-n="6"] > .cy { animation: cyc6 7.2s steps(1, end) infinite; animation-delay: calc(var(--k) * 1.2s - 7.2s); }
  .cyc[data-n="7"] > .cy { animation: cyc7 8.4s steps(1, end) infinite; animation-delay: calc(var(--k) * 1.2s - 8.4s); }
}

/* the mining hub's tiles (cards.tiles) */
.main .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); justify-content: start; gap: var(--sp-3); }
.main .tiles li { max-width: none; }

/* a pick's block on the pickaxes page: what it takes and where it sits on the ladder, the chart beside the facts */
.pk-head { display: flex; align-items: center; gap: var(--sp-3); margin: 0 0 var(--sp-2); }
.pk-head .ic { image-rendering: pixelated; }
.pk-grid { margin-bottom: var(--sp-6); }
.pk-chart { min-width: 0; max-width: 420px; margin: var(--sp-3) 0 0; }

/* the monument: a picture of each stage in the stage table, and the finished statue when there is no 3D */
.mon-st { display: inline-flex; align-items: center; gap: var(--sp-3); max-width: 100%; }
.mon-st > span { min-width: 0; overflow-wrap: anywhere; }
.mon-thumb { flex: none; }
.mon-thumb { width: 36px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); }
.mon-hero { margin: 0; max-width: 100%; }
.mon-hero img { display: block; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.mon-hero figcaption { color: var(--text-3); font-size: 13px; margin-top: var(--sp-1); }

/* the 3D model of a statue or a pit, with its slider and readout beside it (static/3d/voxel.js, static/items/model3d.js) */
.vx-wrap { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: var(--sp-5) var(--sp-6); align-items: start; margin: var(--sp-3) 0 var(--sp-6); }
.vx-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-4) var(--sp-4) var(--sp-5); max-width: 520px; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.vx-kicker { margin: 0 0 var(--sp-1); color: var(--text-3); font: 600 12px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.vx-panel .vx-title { margin: 0 0 var(--sp-1); font: 600 24px/1.2 var(--display); letter-spacing: .015em; color: var(--text); }
.vx-story { margin: 0 0 var(--sp-4); color: var(--text-2); min-height: 1.5em; }
.vx-facts { margin: 0 0 var(--sp-5); }
.vx-facts > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--sp-4); padding: 6px 0; border-top: 1px solid var(--border); font-size: 15px; }
.vx-facts dt { color: var(--text-3); white-space: nowrap; }
.vx-facts dd { margin: 0 0 0 auto; white-space: nowrap; color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.vx-slider { display: flex; align-items: center; gap: var(--sp-3); }
.vx-range { flex: 1 1 auto; min-width: 0; height: 44px; accent-color: var(--ember); cursor: pointer; }
.vx-step { flex: none; width: 44px; height: 44px; font: 600 22px/1 var(--sans); color: var(--text); background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 50%; cursor: pointer; padding: 0 0 3px; transition: border-color var(--t-fast) var(--ease); }
.vx-step:hover:not(:disabled) { border-color: var(--ember); }
.vx-step:disabled { opacity: .45; cursor: default; }
.vx-step:focus-visible, .vx-range:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.vx-ticks { display: flex; justify-content: space-between; margin: 0 56px; color: var(--text-3); font: 500 12px/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.vx-ticks span { cursor: pointer; padding: var(--sp-1) 2px; }
.vx-ticks span.on { color: var(--ember-soft); font-weight: 600; }
.vx-mix { list-style: none; margin: var(--sp-5) 0 0; padding: var(--sp-3) 0 0; border-top: 1px solid var(--border); display: grid; gap: var(--sp-1); }
.vx-mix li { display: flex; align-items: center; gap: var(--sp-3); font-size: 14px; max-width: none; margin: 0; }
.vx-mix .ic { flex: none; image-rendering: pixelated; }
.vx-mixn { flex: 1 1 auto; color: var(--text); }
.vx-mixp { color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .vx-wrap { grid-template-columns: minmax(0, 1fr); }
  .vx-panel { max-width: none; }
}

/* a jewel or frame's gallery card: its line of what it does, then who sells it. The seller's link sits above the card's whole-card link, and the
   card's line runs as far as it needs (the two lines are not clamped to two) */
.it-sold { display: block; margin-top: 2px; color: var(--text-3); }
.it-sold a { position: relative; z-index: 1; }
.c-gcard-s:has(.it-sold) { display: block; overflow: visible; -webkit-line-clamp: unset; }

/* the Pit Drill: its two upgrade slots, each a well with its icon (the second empty and dashed until a second upgrade is sold) */
.dr-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--sp-3); margin: var(--sp-3) 0 var(--sp-5); }
.dr-slot { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--sp-3) var(--sp-4); align-items: start; min-width: 0; padding: var(--sp-3) var(--sp-4) var(--sp-4) var(--sp-3);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.dr-well { width: 64px; height: 64px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.dr-well .ic { image-rendering: pixelated; }
.dr-body { min-width: 0; }
.dr-body > p { margin: 0 0 var(--sp-1); }
.dr-k { color: var(--text-3); font: 600 12px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.dr-t { font: 600 18px/1.25 var(--display); color: var(--text); }

/* 28 Nov 2026, the bold pass: an item is its icon and its name on the ground, not a boxed chip. 113 boxes in a grid read as a wall; the
   icons carry the page. Hover lights the row and still shows the item's card. */
.it-total { margin: 0 0 var(--sp-3); max-width: none; font-size: 15px; color: var(--text-2); }
.main ul.items { gap: 0 var(--sp-4); border-top: 1px solid var(--border); }
.it { border-bottom: 1px solid var(--border); }
.it-a, .it-a:hover, .it-a:focus-visible { min-height: 56px; padding: 4px 0; background: none; border: 0; border-radius: 0; transform: none; }
.it-a:hover .it-n, .it-a:focus-visible .it-n { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.it-n { font-size: 15px; }

/* ---- the bold pass (28 Nov 2026): the Pit Drill's three upgrades are rows on the ground, the icon left, the words at reading width. Before, three
   boxes side by side broke each sentence into lines of three words. ---- */
.dr-slots { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.dr-slot { grid-template-columns: 56px minmax(0, 1fr); gap: var(--sp-4); padding: var(--sp-4) 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.dr-slot + .dr-slot { border-top: 1px solid var(--border); }
.dr-well { width: 56px; height: 56px; background: radial-gradient(120% 120% at 50% 0%, var(--surface-2), var(--surface)); border: 1px solid var(--border); border-radius: 12px; }
.dr-body { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--sp-4); }
.dr-body > p { max-width: 68ch; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.dr-body > .dr-k { order: 2; margin: 0 0 var(--sp-2); font: 500 13px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-3); }
.dr-body > .dr-t { order: 1; margin: 0; font-size: 18px; color: var(--text); }
.dr-body > p:not(.dr-k, .dr-t) { order: 3; }
.dr-body > p:last-child { margin: var(--sp-1) 0 0; color: var(--text); }
