/* The Gold Below wiki's parts: item tiles in their sockets, the game's cards, tables, grids of links, the lines
   the game says. Colours by class come from wiki/colors.css (.r0-.r6 a rarity, .set-<id> a set, .c-<name> text). */

/* ---- a piece in its socket, as in the bag */
.sock { display: inline-block; flex: none; background: var(--slot) center top / 100% 100% no-repeat; image-rendering: pixelated; vertical-align: middle; line-height: 0; }
.sock img { display: block; filter: drop-shadow(1px 1px 0 var(--rar-lo, #000)); }
.sock.s1 { width: 20px; height: 21px; padding: 2px; }
.sock.s2 { width: 40px; height: 42px; padding: 4px; }
.sock.s2 img { filter: drop-shadow(2px 2px 0 var(--rar-lo, #000)); }
.sock.s3 { width: 60px; height: 63px; padding: 6px; }
.sock.s3 img { filter: drop-shadow(3px 3px 0 var(--rar-lo, #000)); }
.ic { vertical-align: -2px; margin: 0 1px; }
.rt, .rn { color: var(--rar, var(--hi)); }
.setname { color: var(--set, var(--hi)); }
a.setname, a.it, a.foe, a.hero { text-decoration: none; }
.it { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--rar); font: 600 17px/1.15 var(--cond); }
.it:hover .it-name, a.setname:hover, .foe:hover .foe-name { text-decoration: underline; }
.foe { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); font: 600 16px/1.15 var(--cond); text-align: center; }
.foe-art { display: flex; align-items: flex-end; justify-content: center; min-height: 84px; }
.hero { display: inline-flex; align-items: center; gap: 6px; color: var(--hi); }
.code { font: 20px/1 var(--pix); color: var(--set); background: var(--void); padding: 3px 5px 1px; }
.chip { display: inline-block; padding: 3px 8px 1px; font: 20px/1.1 var(--pix); color: var(--dim); background: var(--void); box-shadow: inset 0 0 0 2px var(--slot-line); }
.chip.role-boss { color: #ff6b84; box-shadow: inset 0 0 0 2px #a3183a; }
.chip.role-elite, .chip.role-warden { color: var(--gold-hi); box-shadow: inset 0 0 0 2px #a85f17; }
.intent { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 2px 5px; font: 20px/1.1 var(--pix); color: var(--hi); background: var(--void); box-shadow: inset 0 0 0 2px var(--slot-line); white-space: nowrap; }
.xset { font: 20px/1 var(--pix); color: var(--set, var(--gold)); }

/* ---- the game's cards: a bronze frame round a dark body, rows on dotted leaders */
.card-col { float: right; width: 320px; margin: 0 0 18px 26px; }
.card { border: 20px solid transparent; border-image: url(/wiki/img/ui/card.png) 10 11 11 10 fill / 20px 22px 22px 20px stretch; padding: 0 2px 2px; margin: -6px -8px 0 0; font: 20px/1.25 var(--pix); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 2px solid var(--rar-line, var(--set, var(--line))); box-shadow: 0 2px 0 var(--void); }
.card-head strong { display: block; color: var(--rar, var(--set, var(--gold-hi))); font: 20px/1.15 var(--disp); text-shadow: 0 2px 0 #000; }
.card-sub { display: block; margin-top: 4px; color: var(--dim); }
.foe-card.role-boss .rn { color: #ff6b84; }
.foe-card.role-elite .rn, .foe-card.role-warden .rn { color: var(--gold-hi); }
.card-note { margin: 8px 0 0; font: 14px/1.3 Barlow, sans-serif; color: var(--off); }
.stat-list { list-style: none; margin: 0 0 10px; padding: 0; }
.stat-list li { margin: 0 0 3px; max-width: none; }
.stat-list .fx { margin-top: 8px; padding-top: 8px; border-top: 2px dotted var(--slot-line); color: var(--hi); }
[data-r] { display: none; }
.ledger { margin: 0; }
.ledger div { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px; }
.ledger dt { color: var(--dim); flex: none; }
.ledger dt::after { content: ''; }
.ledger div::before { content: ''; order: 1; flex: 1 1 12px; min-width: 12px; border-bottom: 2px dotted var(--slot-line); transform: translateY(-4px); }
.ledger dd { order: 2; margin: 0; text-align: right; color: var(--hi); }
.ledger a { color: var(--gold-hi); }
.niche { display: flex; align-items: flex-end; justify-content: center; min-height: 120px; margin-bottom: 12px; padding: 12px 8px 0; background: linear-gradient(180deg, #050403, var(--slot) 55%, #2a2119 55%, #17120d); box-shadow: inset 0 0 0 2px var(--slot-line), inset 0 3px 0 2px #000; overflow: hidden; }
.niche img { margin-bottom: 10px; }
.niche.d1 { background: linear-gradient(180deg, rgba(10, 8, 6, .35), rgba(10, 8, 6, .1)), url(/img/bg-cellars.png) center 62% / 648px auto; }
.niche.d2 { background: linear-gradient(180deg, rgba(10, 8, 6, .35), rgba(10, 8, 6, .1)), url(/img/bg-reliquary.png) center 70% / 648px auto; }
.niche.d3 { background: linear-gradient(180deg, rgba(10, 8, 6, .35), rgba(10, 8, 6, .1)), url(/img/bg-hoard.png) center 74% / 648px auto; }
.card .niche { margin: -4px -4px 12px; min-height: 150px; }
.rar-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; border: 0; }
.rar-pick legend { padding: 0; margin-bottom: 6px; color: var(--dim); }
.rar-pick label { position: relative; cursor: pointer; }
.rar-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rar-pick span { display: block; padding: 6px 7px 3px; color: var(--rar); background: var(--slot); box-shadow: inset 0 0 0 2px var(--slot-line); font: 20px/1 var(--pix); }
.rar-pick input:checked + span { background: var(--rar-fill); color: var(--hi); box-shadow: inset 0 0 0 2px var(--rar-line); }
.rar-pick input:focus-visible + span { outline: 3px solid var(--gold-hi); outline-offset: 2px; }

/* ---- what the game says, in its own face */
.says { margin: 0 0 14px; padding: 10px 14px 8px; background: var(--slot); box-shadow: inset 4px 0 0 var(--gold), inset 0 0 0 2px var(--slot-line); font: 20px/1.3 var(--pix); color: var(--hi); max-width: 74ch; }
.says p { margin: 0; max-width: none; }
.says cite { display: block; color: var(--gold); font-style: normal; margin-bottom: 4px; }
.card .says { margin: 0; font-size: 20px; }

/* ---- tables: they scroll inside their own box, never the page */
.tbl { overflow-x: auto; margin: 0 0 16px; border: 2px solid var(--slot-line); background: var(--slot); scrollbar-width: thin; }
table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.35; }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid #2c2318; }
thead th { position: sticky; top: 0; background: var(--panel); color: var(--dim); font: 600 16px/1.2 var(--cond); white-space: nowrap; border-bottom: 2px solid var(--line); }
tbody th { font-weight: 400; color: var(--hi); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:nth-child(even) { background: rgba(42, 33, 25, .45); }
td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rar-cols td, .rar-cols thead th:not(:first-child), .floors td, .floors thead th { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.floorplan td:nth-child(-n+2), .floorplan thead th:nth-child(-n+2) { text-align: right; width: 1%; }
td small { display: block; margin-top: 4px; }
.pieces td:first-child, .foes-all td:first-child { white-space: nowrap; }
.foes-all .foe { flex-direction: row; gap: 8px; }
.foes-all .foe-art { min-height: 0; width: 70px; }
.cycle td:first-child { width: 1%; font: 20px/1.2 var(--pix); color: var(--gold); }
.by-floor { margin-bottom: 16px; }
.barks td:first-child { color: var(--dim); width: 34%; }
.line { font: 20px/1.3 var(--pix); color: var(--hi); }

/* ---- grids of links */
.grid { display: grid; gap: 10px; margin: 0 0 18px; }
.grid.tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; }
.grid.cells { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.cell { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-height: 84px; padding: 10px 6px 8px; text-align: center; text-decoration: none; color: var(--text);
  font: 600 16px/1.15 var(--cond); background: var(--panel); box-shadow: inset 0 0 0 2px var(--line), inset 0 4px 0 0 rgba(143, 115, 80, .25), 0 2px 0 #000; }
.cell:hover, .set-cell:hover, .hero-cell:hover, .foe-cell:hover, .room-cell:hover, .guide-cell:hover { background: var(--panel-hi); color: var(--hi); box-shadow: inset 0 0 0 2px var(--gold), 0 2px 0 #000; }
.cell small { color: var(--off); font: 20px/1 var(--pix); }
.cell.wide { flex-direction: row; justify-content: flex-start; text-align: left; min-height: 52px; padding: 8px 12px; gap: 10px; }
.grid.cells:has(.cell.wide) { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.grid.sets, .grid.guides { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.set-cell, .guide-cell { display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-decoration: none; color: var(--text); background: var(--panel); box-shadow: inset 0 0 0 2px var(--line), inset 4px 0 0 0 var(--set, var(--line)), 0 2px 0 #000; }
.set-cell strong, .guide-cell strong { display: block; font: 20px/1.2 var(--pix); text-shadow: none; }
.guide-cell strong { color: var(--gold-hi); }
.set-cell em, .guide-cell em { display: block; font-style: normal; font-size: 15px; line-height: 1.3; color: var(--dim); }
.set-cell small { display: block; color: var(--off); }
.grid.heroes, .grid.foes, .grid.rooms { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.hero-cell, .foe-cell, .room-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 0 10px; text-align: center; text-decoration: none; color: var(--text); background: var(--panel); box-shadow: inset 0 0 0 2px var(--line), 0 2px 0 #000; }
.hero-cell .niche, .foe-cell .niche, .room-cell .niche { align-self: stretch; margin: 2px 2px 6px; min-height: 132px; box-shadow: none; }
.hero-cell strong, .foe-cell strong, .room-cell strong { font: 20px/1.2 var(--pix); color: var(--gold-hi); padding: 0 6px; text-shadow: none; }
.hero-cell em { font-style: normal; color: var(--hi); }
.hero-cell span:last-child, .room-cell span:last-child { font-size: 14px; color: var(--dim); padding: 0 8px; line-height: 1.3; }
.foe-cell.role-boss strong { color: #ff6b84; }
.grid.foes-row { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); align-items: end; padding: 12px 8px; background: var(--slot); border: 2px solid var(--slot-line); }

/* ---- sets, skills, depths, lists */
.tiers { margin: 0 0 14px; padding: 12px 14px 6px; background: var(--slot); box-shadow: inset 0 0 0 2px var(--slot-line), inset 4px 0 0 0 var(--set); }
.tiers-name { margin: 0 0 8px; font: 20px/1.2 var(--pix); }
.tiers-name span { color: var(--dim); margin-left: 8px; }
.tiers ol { list-style: none; margin: 0; padding: 0; }
.tiers li { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; max-width: none; }
.pips { flex: none; min-width: 26px; padding: 3px 0 1px; text-align: center; font: 20px/1 var(--pix); color: var(--ink); background: var(--set, var(--gold)); }
.skill { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 12px; padding: 12px; background: var(--slot); box-shadow: inset 0 0 0 2px var(--slot-line); }
.skill-ic { flex: none; padding: 6px; background: #16305e; box-shadow: inset 0 0 0 2px #3478f0; line-height: 0; }
.skill strong { font: 20px/1.2 var(--disp); text-shadow: 0 2px 0 #000; }
.skill .cost { margin-left: 10px; font: 20px/1 var(--pix); color: #8fb8ff; }
.skill p { margin: 4px 0 0; font: 20px/1.3 var(--pix); color: var(--hi); max-width: none; }
.skill-row { margin-bottom: 22px; padding-bottom: 6px; border-bottom: 2px dotted var(--slot-line); }
.skill-row .from { color: var(--dim); }
.skill-row .it { min-height: 0; vertical-align: middle; }
.strip { height: 160px; background-position: center -150px; background-size: 1296px auto; box-shadow: inset 0 -60px 60px -30px var(--void), inset 0 2px 0 #000; }
.strip-cellars { background-image: url(/img/bg-cellars.png); }
.strip-reliquary { background-image: url(/img/bg-reliquary.png); background-position: center -130px; }
.strip-hoard { background-image: url(/img/bg-hoard.png); background-position: center -470px; }
.strip-endless { background-image: linear-gradient(180deg, #1d0f2e, #0a0806); }
.depths { display: grid; gap: 8px; margin-bottom: 20px; }
.depth-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 12px; min-height: 110px; padding: 12px 14px; text-decoration: none; color: var(--hi); background-size: 864px auto; background-position: center -84px;
  box-shadow: inset 0 0 0 2px var(--line), inset 0 -70px 50px -30px rgba(10, 8, 6, .92); }
.depth-row:hover { box-shadow: inset 0 0 0 2px var(--gold), inset 0 -70px 50px -30px rgba(10, 8, 6, .8); color: var(--hi); }
.depth-row .floors { grid-column: 1 / -1; align-self: start; font: 20px/1 var(--pix); color: var(--gold-hi); text-shadow: 0 2px 0 #000; }
.depth-row strong { font: 20px/1.2 var(--disp); color: var(--hi); text-shadow: 0 2px 0 #000; }
.depth-row em { font: 20px/1.2 var(--pix); font-style: normal; color: #ff8a96; text-shadow: 0 2px 0 #000; }
.ladder { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 18px; padding: 14px; background: var(--slot); border: 2px solid var(--slot-line); }
.rung { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rung b { font: 20px/1 var(--pix); font-weight: 400; }
.glossary { margin: 0; }
.glossary div { display: grid; grid-template-columns: 180px 1fr; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid #2c2318; }
.glossary dt a { font: 20px/1.2 var(--pix); text-decoration: none; }
.glossary dd { margin: 0; }
.all-list { list-style: none; padding: 0; columns: 220px; column-gap: 24px; }
.all-list li { margin: 0; break-inside: avoid; }
.all-list a { display: block; padding: 5px 0; text-decoration: none; }
.all-list a:hover { text-decoration: underline; }

@media (max-width: 899px) {
  .card-col { float: none; width: auto; margin: 0 0 16px; }
  .card { margin: 0; }
  .grid.tiles { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .grid.cells { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
  .grid.heroes, .grid.foes, .grid.rooms { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .grid.sets, .grid.guides, .grid.cells:has(.cell.wide) { grid-template-columns: 1fr; }
  .strip { height: 120px; background-size: 864px auto; background-position: center -96px; }
  .strip-reliquary { background-position: center -84px; }
  .strip-hoard { background-position: center -310px; }
  th, td { padding: 7px 8px; }
  .glossary div { grid-template-columns: 1fr; }
}
