/* The public database (/database, Tools/sitedb/build.mjs) in the Banner look (the owner's pick A, 2026-11-12): each
   page opens on a land's painting with its art, name, tier badge and chips in one frame; lists are icon tiles in tier
   bands. The Website layout rule (CLAUDE.md): one 1120 column; cards in thirds, halves or whole rows of a six-part
   grid, a short last row widening (build.mjs rows()); the kit's frame, slot, ring, tabs and buttons, the game's tier
   badges and maps, no new hairline boxes; gaps of 8, 16, 24, 32; phones at 360 px with nothing scrolling sideways.
   Class names stay db-*: site.css owns bare .st, .sub and .note. */
.db-wrap { width: min(1120px, 100%); margin: 0 auto; display: grid; gap: 24px; }
.db-wrap > * { min-width: 0; }
.db-wrap .panel { --fw: 18px; padding: 8px 16px; }
.db-wrap .panel h2 { margin: 0 0 8px; font-size: 18px; }
.db-wrap .panel h2::after { width: min(100%, 240px); margin-top: 4px; }
.db-wrap .panel h1::after { display: none; }

/* the trail back up: Database › Weapons › Long Sword */
.db-crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14.5px; color: var(--muted); }
.db-crumbs li + li::before { content: '›'; margin-right: 8px; color: var(--bronze); }
.db-crumbs a { color: var(--text-2); text-decoration: none; }
.db-crumbs a:hover { color: var(--gold); }
.db-crumbs [aria-current] { color: var(--cream); }

/* the head: a land's painting behind the art, the name, its badge and the chips */
.db-head { position: relative; overflow: hidden; }
.db-scene { position: absolute; inset: 0; display: block; pointer-events: none; }
.db-scene img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.42; }
.db-head-in { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; min-height: 168px; padding: 8px 0; }
.db-head-in:not(:has(> .db-ic, > .db-port, > .db-tier)) { grid-template-columns: minmax(0, 1fr); }
.db-head-text { display: grid; gap: 8px; min-width: 0; }
.db-head :is(.db-kicker, h1, .db-lead) { text-shadow: 0 2px 6px #000, 0 0 2px #000; }
.db-kicker { margin: 0; font: 600 12.5px/1.3 var(--heading); letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal-hi); }
.db-wrap .db-head h1 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font: 400 clamp(30px, 5vw, 44px)/1.05 'IM Fell English', var(--lore); color: var(--cream); }
.db-wrap .db-head h1 > span:first-child { overflow-wrap: break-word; min-width: 0; }
.db-tag {
  display: inline-block; padding: 2px 8px; font: 600 11.5px/1.4 var(--heading); letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff3df; text-shadow: none; border: 5px solid transparent; border-image: var(--kit-tab-on) 14 fill / 5px stretch;
}
.db-lead { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text); max-width: 80ch; }
.db-lore { font: italic 17px/1.45 var(--lore); color: #d9c8a3; }
.db-note { margin: 0; font-size: 13.5px; color: var(--muted); }

/* chips: a lit tab for the word, a dark plate for the number, as the game's create window's STR rows */
.db-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.db-chip { display: inline-flex; align-items: stretch; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; text-shadow: none; }
.db-chip b { display: inline-flex; align-items: center; padding: 0 8px; min-height: 32px; font: 600 11.5px/1 var(--heading); letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff3df; border: 5px solid transparent; border-image: var(--kit-tab-on) 14 fill / 5px stretch; }
.db-chip i { display: inline-flex; align-items: center; padding: 0 8px; min-height: 32px; font: 500 15px/1 var(--ui); font-style: normal; color: var(--cream);
  border: 5px solid transparent; border-image: var(--kit-dark) 12 fill / 5px stretch; }
.db-chip.need b, .db-chip.teal b, .db-chip.dim b { border-image-source: var(--kit-tab); color: var(--gold); }
.db-chip.teal b { color: var(--teal-hi); }
.db-chip.dim b { color: var(--muted); }
.db-chip.dim i { color: var(--text-2); }

/* the six-part rows: s2 a third, s3 a half, s6 the whole row */
.db-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
.db-card { grid-column: span 6; min-width: 0; display: grid; gap: 8px; align-content: start; }
.db-card.s2 { grid-column: span 2; }
.db-card.s3 { grid-column: span 3; }
.db-card.s6 { grid-column: span 6; }
.db-card h3 { margin: 8px 0 0; font: 600 14.5px/1.3 var(--heading); font-variant: small-caps; letter-spacing: 0.1em; color: var(--bronze-hi); }
.db-card h3:first-of-type { margin-top: 0; }
.db-card p { margin: 0; color: var(--text-2); line-height: 1.5; }
.db-wrap .panel h2.db-withart { display: flex; align-items: center; gap: 8px; }
.db-wrap .panel h2.db-withart::after { display: none; }
a.db-card { color: inherit; text-decoration: none; }
a.db-card:hover { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.65)) brightness(1.12); }
a.db-card:hover h2 { color: #fff3df; }

/* pictures: an item's icon in the kit's slot, a monster's portrait in the kit's ring, the game's tier badges */
.db-ic { flex: none; display: inline-grid; place-items: center; box-sizing: border-box; background: var(--kit-slot) center / 100% 100% no-repeat; }
.db-ic img { display: block; width: 100%; height: 100%; }
.db-ic.s { width: 48px; height: 48px; padding: 5px; }
.db-ic.m { width: 56px; height: 56px; padding: 6px; }
.db-ic.xl { width: 148px; height: 148px; padding: 12px; }
.db-port { flex: none; position: relative; display: inline-block; }
.db-port img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #0b0f0e; }
.db-port::after { content: ''; position: absolute; inset: -7px; background: var(--kit-ring) center / contain no-repeat; pointer-events: none; }
.db-port.m { width: 42px; height: 42px; margin: 7px; }
.db-port.xl { width: 132px; height: 132px; margin: 16px; }
.db-port.xl::after { inset: -16px; }
.db-tier { flex: none; display: inline-block; }
.db-tier.s { width: 26px; height: 26px; }
.db-tier.m { width: 44px; height: 44px; }
.db-tier.xl { width: 132px; height: 132px; }
.db-cls { flex: none; width: 40px; height: 40px; }
.db-map { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; padding: 6px; background: var(--kit-slot) center / 100% 100% no-repeat; }
.db-map.dot { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: none; }

/* tiles: the picture, the name, a value and a line under it, on the kit's dark plate; a lit one is the page's own */
.db-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 216px), 1fr)); gap: 8px; }
.db-tile { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; align-content: center;
  min-height: 64px; padding: 4px 8px; color: var(--cream); text-decoration: none; border: 6px solid transparent; border-image: var(--kit-dark) 12 fill / 6px stretch; }
a.db-tile:hover { filter: brightness(1.2); }
.db-tile.on { border-image-source: var(--kit-tab-on); }
.db-tile > :is(.db-ic, .db-port) { grid-row: 1 / span 3; }
.db-nm { font: 600 13.5px/1.2 var(--heading); letter-spacing: 0.01em; padding-right: 22px; overflow-wrap: break-word; min-width: 0; }
.db-val { font-size: 13.5px; color: var(--text-2); }
.db-val.big { font: 600 15px/1.2 var(--ui); color: var(--gold); }
.db-sub { font-size: 12.5px; color: var(--muted); }
.db-tile > .db-tier { position: absolute; top: 2px; right: 2px; }
.db-tile.spell { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 8px 12px; }
.db-tile.spell .db-val { display: flex; flex-wrap: wrap; gap: 8px; }
.db-band { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 8px 0 0 !important; font: 600 13px/1 var(--heading); letter-spacing: 0.12em; text-transform: uppercase; color: var(--bronze-hi) !important; }
.db-band:first-child { margin-top: 0 !important; }

/* where it lives: the painted land maps with their names and zones */
.db-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 112px), 1fr)); gap: 16px 8px; }
.db-land { display: grid; gap: 4px; justify-items: center; text-align: center; }
.db-land b { font: 600 13.5px/1.2 var(--heading); color: var(--cream); }
.db-land small { font-size: 12.5px; color: var(--muted); }

/* sellers and recipes */
.db-people { display: grid; gap: 8px; }
.db-person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; color: var(--text-2); font-size: 14.5px; }
.db-person b { color: var(--cream); font-weight: 500; }
.db-person small { display: block; font-size: 12.5px; color: var(--muted); }
.db-mats { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.db-mat { display: inline-flex; align-items: center; gap: 8px; color: var(--cream); text-decoration: none; font-size: 14.5px; }
a.db-mat:hover span { color: var(--gold); }
.db-plain { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--text-2); line-height: 1.45; }
.db-plain b { color: var(--cream); font-weight: 500; }

/* the index's tiles: a cluster of real icons or portraits over the name */
.db-cat { justify-items: center; text-align: center; padding: 16px; }
.db-cluster { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; min-height: 56px; }
.db-count { font: 600 14px/1.2 var(--heading); letter-spacing: 0.08em; color: var(--gold) !important; }

/* the experience table: site.css's ranking table (.rk) */
.db-tw { min-width: 0; }
.db-xp td { padding: 6px 10px; }
.db-xp th, .db-xp td { width: 33%; }

/* jumps to a list's groups: the kit's small buttons */
.db-toc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* the way into the game, at the foot of every page */
.db-cta { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.db-cta p { flex: 1 1 420px; margin: 0; color: var(--text); font-size: 16px; line-height: 1.5; }

@media (max-width: 760px) {
  .db-wrap, .db-row { gap: 16px; }
  .db-card.s2, .db-card.s3 { grid-column: span 6; }
  .db-head-in { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 8px; }
  .db-ic.xl { width: 104px; height: 104px; padding: 9px; }
  .db-port.xl { width: 92px; height: 92px; margin: 12px; }
  .db-port.xl::after { inset: -12px; }
  .db-tier.xl { width: 92px; height: 92px; }
  .db-lore { font-size: 16px; }
  .db-cta { justify-content: center; text-align: center; }
  .db-cta p { flex-basis: 100%; }
}
@media (max-width: 420px) {
  .db-person { grid-template-columns: auto minmax(0, 1fr); }
  .db-person .db-chip { grid-column: 2; justify-self: start; }
  .db-maps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
