/* Summons list + summon banner pages (summons.js, summon.js, summon-sim.js). Layout on design system v3 tokens
   (docs/design-system.md); game art (banners, icons, cards, stars, element orbs, the Ninja Pearl) is shown as is, never
   recoloured. */

/* rarity colours of the rate bar, legend and practice results (CSS only, never on art) */
.rc1 { --rc: #9aa0a6; } .rc2 { --rc: var(--skill); } .rc3 { --rc: var(--body); } .rc4 { --rc: var(--wisdom); }
.rc5 { --rc: var(--gold); } .rc6 { --rc: var(--orange); } .rc7 { --rc: #ff5f8f; }
.sbx-pearl { width: 20px; height: 20px; flex: none; }

/* ================= summons list (summons.js): one tile style for every banner ================= */
/* the chapter bar row is reserved from the first paint: always the height of a full bar */
.page-hero #chap { min-height: 85px; }
@media (max-width: 600px) { .page-hero #chap { min-height: 165px; } }
.sbl-sec { padding: var(--sp-6) 0 var(--sp-2); scroll-margin-top: 150px; }
/* the banner tiles (.sbl-grid / .sbl-card / .sbl-art / .sbl-more / .sbl-txt / .sbl-meta / .sbl-sk) are a shared component in site.css */

/* ================= banner page (summon.js): one panel, hero on top, then the sections ================= */
.sbn-wrap { max-width: calc(1120px + 2 * var(--gutter)); padding-top: var(--sp-4); }
.sbn { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-card); overflow: hidden; margin-bottom: var(--sp-5); }

/* hero: the banner art left, kind / title / state / price and facts right (stacked on phones) */
.sbn-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-6); padding: var(--sp-4); align-items: start;
  background: radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 60%), var(--surface-2); box-shadow: inset 0 -1px 0 var(--line); }
.sbn-art { aspect-ratio: 750 / 400; border-radius: var(--r-md); overflow: hidden; background: var(--well); box-shadow: var(--ring); }
.sbn-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sbn-art .sb-cards-lg { border-radius: 0; }
.sbn-sk-art { width: 100%; height: 100%; border-radius: 0; }
.sbn-head { min-width: 0; padding: var(--sp-3) var(--sp-2) 0 0; }
.sbn-head .eyebrow { margin: 0; }
.sbn-head h1 { margin: var(--sp-2) 0 var(--sp-3); font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.08; overflow-wrap: anywhere; }
.sbn-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); min-height: 26px; font-size: var(--fs-sm); color: var(--muted); }
.sbn-state .badge { margin: 0; }
.sbn-state .ev-live { font-weight: 700; }
.sbn-sk-line { height: 22px; width: min(100%, 260px); border-radius: var(--r-pill); }
.sbn-buy { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); min-height: 58px; }
.sbn-buy[hidden] { display: none; }
.sbn-nofacts { margin: 0; font-size: var(--fs-sm); color: var(--faint); }
.sbn-sk-buy { height: 56px; width: min(100%, 360px); border-radius: var(--r-md); }
/* the price as a summon button (our own look: a gold pill) */
.sbn-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.sbn-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 128px; padding: 6px 18px 7px; border-radius: var(--r-pill);
  background: linear-gradient(180deg, #ffe9a6 0%, #ffc94a 48%, #e89a1a 100%); color: #3a1c00;
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px rgba(0, 0, 0, 0.55), 0 8px 18px -8px rgba(255, 170, 40, 0.45); }
.sbn-btn small { font: 700 var(--fs-label)/1 var(--sans); letter-spacing: var(--tracking-label); text-transform: uppercase; color: #8a1d00; }
.sbn-btn b { display: inline-flex; align-items: center; gap: 3px; margin-top: 2px; font: 700 var(--fs-lg)/1.1 var(--head); }
.sbn-btn b i, .sbn-price i, .sbn-total b i, .sbn-gcost i { font-style: normal; font-size: 0.7em; opacity: 0.75; }
.sbn-btn .sbx-pearl { width: 18px; height: 18px; }
.sbn-tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.sbn-tag { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 5px 12px 5px 6px; border-radius: var(--r-sm); background: var(--well); box-shadow: var(--ring); line-height: 1.15; }
.sbn-tag-i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--gold); flex: none; }
.sbn-tag b { display: block; font-size: var(--fs-sm); font-weight: 700; }
.sbn-tag small { display: block; font-size: var(--fs-xs); color: var(--faint); }

/* body: sections with the system's section heading (title + accent bar), a muted line and an aside */
.sbn-body { padding: var(--sp-1) var(--sp-6) var(--sp-2); min-height: calc(100vh - 400px); }
.sbn-body:has(> .sbn-sk) { min-height: 900px; }
.sbn-sk { display: grid; gap: 14px; padding: var(--sp-4) 0; }
.sbn-sk-h { height: 20px; width: 200px; } .sbn-sk-bar { height: 10px; } .sbn-sk-track { height: 120px; }
.sbn-sk-tiles { display: flex; gap: var(--sp-2); } .sbn-sk-tiles .sk { width: 104px; height: 150px; border-radius: var(--r-md); }
.sbn-lead { margin: var(--sp-4) 0 2px; padding: 10px var(--sp-3); border-radius: var(--r-sm); background: var(--surface-2); box-shadow: var(--ring); font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); }
.sbn-lead a { color: var(--accent); }
.sbn-when { color: var(--faint); font-size: var(--fs-xs); }
.sbn-ver { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) 14px; padding: var(--sp-3) 0 2px; }
.sbn-ver .sb-vers { margin: 0; }
.sbn-ver .sb-vnote { margin: 0; font-size: var(--fs-xs); color: var(--faint); flex: 1 1 260px; }
.sbn-ver + .sb-notes { margin: var(--sp-2) 0 0; }
.sbn-sec { padding: var(--sp-5) 0 var(--sp-2); scroll-margin-top: calc(var(--hdr) + 12px); }
.section-head.sbn-h { justify-content: flex-start; align-items: center; gap: var(--sp-1) var(--sp-3); margin-bottom: var(--sp-3); }
.sbn-h > p { margin: 0; font-size: var(--fs-xs); color: var(--faint); }
.sbl-sec .sbn-h > p { font-size: var(--fs-sm); color: var(--muted); }
.sbl-live { margin-left: auto; }

/* rate bar */
.sbx-meter { display: flex; gap: var(--sp-1); height: 6px; margin: 0 0 10px; }
.sbx-meter span { min-width: 6px; border-radius: var(--r-pill); background: var(--rc); }
.sbx-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; }
.sbx-legend li { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sbx-legend .stars img { width: 12px; height: 12px; }
.sbx-legend b { font: 700 var(--fs-md)/1 var(--head); letter-spacing: var(--tracking-tight); }
.sbx-legend small { color: var(--faint); font-size: var(--fs-xs); }
.sbx-legend .sb-diff { font-style: normal; font-size: var(--fs-xs); color: var(--wip); }
.sbn-pick { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin-left: auto; }
.sbn-pick .chips-label { margin-right: var(--sp-1); }
.sbn-pick .chip { min-width: 32px; min-height: 32px; padding: 0; justify-content: center; }

/* unit tiles: icon (element orb top left, stars bottom left), name, title, chance */
.sbn-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--sp-2); }
.sbn-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--sp-2) 6px; border-radius: var(--r-md);
  background: var(--surface-2); box-shadow: var(--ring); color: var(--text); text-align: center; min-width: 0; }
.sbn-tile:hover { box-shadow: 0 0 0 1px var(--line-3); color: var(--text); }
.sbn-tile.is-feat { background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface-2); box-shadow: 0 0 0 1px var(--accent-ring); }
.sbn-tile.is-off .sbn-ic img:first-child { opacity: 0.5; }
.sbn-ic { position: relative; display: block; width: 100%; max-width: 92px; aspect-ratio: 1; margin-bottom: var(--sp-1); }
.sbn-ic > img:first-child, .sbn-ic .noicon { display: grid; place-items: center; width: 100%; height: 100%; border-radius: var(--r-sm); background: var(--well); box-shadow: 0 0 0 2px rgba(255, 201, 74, 0.55); }
.sbn-el { position: absolute; top: -5px; left: -5px; width: 22px; height: 22px; }
.sbn-st { position: absolute; left: 3px; bottom: 3px; right: 3px; display: flex; }
.sbn-st .stars { display: flex; flex-wrap: wrap; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9)); }
.sbn-st .stars img { width: 11px; height: 11px; }
.sbn-n { font-size: var(--fs-xs); font-weight: 700; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbn-t { font-size: 0.6875rem; line-height: 1.2; color: var(--faint); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbn-rate { margin-top: var(--sp-1); padding: 2px var(--sp-2); border-radius: var(--r-pill); background: var(--surface-3); font: 700 0.6875rem/1.3 var(--sans); }
.sbn-rate.is-feat { background: var(--gold); color: #2a1500; }
.sbn-flag { position: absolute; top: 0; right: 6px; z-index: 1; padding: 1px 6px; border-radius: 0 0 6px 6px; background: var(--gold); color: #2a1500;
  font: 700 0.5625rem/1.4 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
.sbn-flag.is-gt { background: var(--grad); }

/* step track: hex badges joined by a line, the price and what each step adds; loop + one full round at the end */
.sbn-track { display: flex; align-items: center; gap: 10px; }
.sbn-scroll { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: thin; padding: 2px 0 var(--sp-1); }
.sbn-stops { list-style: none; display: flex; margin: 0; padding: 0; min-width: max-content; }
.sbn-stops li { position: relative; flex: 1 0 92px; display: flex; justify-content: center; }
.sbn-stops li + li::before { content: ""; position: absolute; top: 27px; right: calc(50% + 26px); width: calc(100% - 52px); height: 2px; background: rgba(255, 201, 74, 0.45); }
.sbn-stop { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); width: 90px; padding: var(--sp-1) 2px 6px; background: none; border: 0; border-radius: var(--r-sm); color: var(--text); cursor: pointer; font: inherit; }
.sbn-stop:hover .sbn-hex, .sbn-stop:focus-visible .sbn-hex { filter: brightness(1.2); }
.sbn-hex { display: grid; place-items: center; width: 52px; height: 46px; background: rgba(255, 201, 74, 0.75);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); flex: none; }
.sbn-hex > span { display: flex; align-items: baseline; justify-content: center; width: 46px; height: 40px; padding-top: 11px; background: #2a1c0e; box-sizing: border-box;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); font: 700 var(--fs-base)/1 var(--head); color: #fff2d0; }
.sbn-hex small { font-size: 0.72em; color: var(--muted); }
.sbn-stop[aria-pressed="true"] .sbn-hex { background: var(--gold); filter: drop-shadow(0 0 8px rgba(255, 201, 74, 0.55)); }
.sbn-stop[aria-pressed="true"] .sbn-hex > span { background: var(--orange); color: #1f0e00; }
.sbn-stop[aria-pressed="true"] .sbn-hex small { color: #3b1d00; }
.sbn-price { display: inline-flex; align-items: center; gap: 2px; font: 700 var(--fs-base)/1 var(--head); }
.sbn-price .sbx-pearl { width: 16px; height: 16px; }
.sbn-st-tags { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 26px; }
.sbn-st-tag { display: inline-flex; align-items: center; gap: 3px; font: 700 0.5625rem/1.2 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.sbn-st-tag svg { width: 11px; height: 11px; }
.sbn-st-tag.is-gt { color: var(--gold); } .sbn-st-tag.is-up { color: #ff8a7a; } .sbn-st-tag.is-deal { color: var(--ok); }
.sbn-end { display: flex; align-items: center; gap: var(--sp-3); flex: none; }
.sbn-loop { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); color: var(--faint); width: 64px; text-align: center; }
.sbn-loop svg { width: 18px; height: 18px; }
.sbn-loop small { font-size: 0.6875rem; font-weight: 600; line-height: 1.2; }
.sbn-total { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; box-shadow: inset 1px 0 0 var(--line-2); }
.sbn-total small { font: 700 var(--fs-label)/1.2 var(--sans); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); }
.sbn-total b { display: inline-flex; align-items: center; gap: 3px; font: 700 var(--fs-xl)/1.1 var(--head); letter-spacing: var(--tracking-tight); color: var(--gold); }
.sbn-total span { font-size: var(--fs-xs); color: var(--faint); }

/* guaranteed boxes */
.sbn-gboxes { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.sbn-gbox { flex: 1 1 260px; max-width: 100%; min-width: 0; padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-2); box-shadow: var(--ring); }
.sbn-gbox.is-feat { flex: 0 1 auto; box-shadow: 0 0 0 1px var(--accent-ring); }
.sbn-gbox.is-feat .sbn-tiles { grid-template-columns: repeat(var(--n, 1), 104px); }
.sbn-gbox .sbn-tile { background: var(--surface); }
.sbn-ghead { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-2); }
.sbn-hexes { display: flex; flex-wrap: wrap; gap: 3px; max-width: 50%; }
.sbn-hex.is-sm { width: 38px; height: 33px; }
.sbn-hex.is-sm > span { width: 34px; height: 29px; padding-top: 8px; font-size: var(--fs-xs); }
.sbn-gt { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.sbn-gt b { display: block; font-size: var(--fs-sm); font-weight: 700; }
.sbn-gt small { display: block; font: 700 var(--fs-label)/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.sbn-gcost { display: inline-flex; align-items: center; gap: 2px; font: 700 var(--fs-base)/1 var(--head); white-space: nowrap; }
.sbn-gcost .sbx-pearl { width: 16px; height: 16px; }
.sbn-gnote { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.sbn-link { background: none; border: 0; padding: 0 0 0 var(--sp-1); color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; min-height: 32px; }
.sbn-link:hover { text-decoration: underline; }

/* every character: rarity chips, the shared chance, search */
.sbn-ptools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) 10px; margin: 0 0 var(--sp-3); }
.sbn-tabs { margin: 0; }
.sbn-tabs .chip { gap: 6px; }
.sbn-tabs .stars img { width: 12px; height: 12px; }
.sbn-tabs .chip small { font-weight: 600; opacity: 0.8; }
.sbn-each[hidden] { display: none; }
.sbn-search { flex: 0 1 240px; margin-left: auto; }
.sbn-qnote { margin: -4px 0 10px; }
.sbn-more { margin-top: 10px; }

/* Try it: odds left, practice puller right */
.sbn-try { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 14px; align-items: start; }
.sbx-odds h3 { font-size: var(--fs-base); margin: 0 0 var(--sp-2); }
table.stat-table.sbx-oddtab { min-width: 0; width: 100%; }
table.stat-table.sbx-oddtab td:first-child { min-width: 0; }
.sbx-oddtab td:last-child { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.sbx-bar { flex: 1 1 auto; height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; min-width: 60px; }
.sbx-bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--grad); }
.sbx-oddtab b { min-width: 58px; text-align: right; color: var(--gold); }
.sbx-sim { padding: 14px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: var(--ring); }
.sbx-simbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-3); }
.sbx-go .sbx-pearl { width: 18px; height: 18px; }
.sbx-tally { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.sbx-tally div { min-width: 82px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--well); box-shadow: var(--ring); }
.sbx-tally dt { font: 700 var(--fs-label)/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.sbx-tally dd { margin: 0; font: 700 var(--fs-lg)/1.2 var(--head); }
.sbx-results { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-2); min-height: 104px; align-items: start; }
.sbx-results > p { grid-column: 1 / -1; margin: 0; align-self: center; text-align: center; }
.sbx-res { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px var(--sp-1); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--ring); color: var(--text); }
.sbx-res:hover { box-shadow: 0 0 0 1px var(--line-3); color: var(--text); }
.sbx-res.is-feat { box-shadow: 0 0 0 2px var(--gold); }
.sbx-res img:first-child, .sbx-res .noicon { width: 100%; max-width: 64px; height: auto; aspect-ratio: 1; border-radius: var(--r-sm); }
.sbx-res .stars { flex-wrap: wrap; justify-content: center; max-width: 100%; }
.sbx-res .stars img { width: 11px; height: 11px; }
.sbx-flag { font: 700 0.5625rem/1.2 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold); }
.sbx-flag.is-gt { color: var(--muted); }

/* footer: where the numbers come from */
.sbn-foot { margin: var(--sp-4) 0 0; padding: var(--sp-3) 0 var(--sp-4); box-shadow: inset 0 1px 0 var(--line); font-size: var(--fs-xs); color: var(--faint); }
.sbn-foot p { margin: 0; }
.sbn-foot a { color: var(--accent); }
.sbn-foot .sb-src { margin: 0 0 var(--sp-2); }

@media (max-width: 760px) {
  .sbn-wrap { padding-top: var(--sp-2); }
  .sbn { border-radius: var(--r-lg); }
  .sbn-hero { grid-template-columns: 1fr; gap: var(--sp-3); padding: 10px; }
  .sbn-head { padding: 0 var(--sp-1) var(--sp-1); }
  /* reserved: two title lines and the price row (nothing moves when they fill in) */
  .sbn-head h1 { min-height: 2.16em; }
  .sbn-buy, .sbn-buy:has(> .sk) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; min-height: 126px; }
  .sbn-sk-buy { height: 120px; }
  .sbn-btns { flex-direction: column; }
  .sbn-btn { min-width: 112px; padding: 5px 12px 6px; }
  .sbn-tags { flex-direction: column; gap: 6px; }
  .sbn-tag { padding: 4px var(--sp-2) 4px 4px; }
  .sbn-body { padding: 0 var(--sp-3) var(--sp-1); min-height: calc(100vh - 560px); }
  .sbn-body:has(> .sbn-sk) { min-height: 700px; }
  .sbn-pick { margin-left: 0; gap: 3px; }
  .sbn-pick .chips-label { display: none; }
  .sbn-pick .chip { min-width: 30px; }
  .sbn-tiles, .sbn-gbox.is-feat .sbn-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .sbn-tile { padding: 6px 3px; }
  .sbn-st .stars img { width: 9px; height: 9px; }
  .sbn-el { width: 18px; height: 18px; top: -4px; left: -4px; }
  .sbn-n { font-size: 0.6875rem; } .sbn-t { font-size: 0.625rem; }
  .sbn-rate { font-size: 0.625rem; padding: 1px 6px; }
  .sbn-flag { font-size: 0.5rem; right: 3px; padding: 1px var(--sp-1); }
  .sbn-track { flex-direction: column; align-items: stretch; }
  .sbn-end { justify-content: flex-start; }
  .sbn-loop { flex-direction: row; width: auto; }
  .sbn-total { box-shadow: none; padding-left: 0; }
  .sbn-search { flex: 1 1 100%; margin-left: 0; }
  .sbn-try { grid-template-columns: 1fr; }
  .sbn-gboxes { flex-direction: column; align-items: stretch; }
  .sbn-gbox, .sbn-gbox.is-feat { flex: 0 0 auto; }
  .sbn-hexes { max-width: 42%; }
  .sbx-res .stars img { width: 9px; height: 9px; }
}
@media (max-width: 600px) {
  .sbx-oddtab td:last-child { min-width: 0; }
  .sbx-oddtab .sbx-bar { display: none; }
  table.stat-table.sbx-oddtab th, table.stat-table.sbx-oddtab td { padding: var(--sp-2) 10px; white-space: normal; }
}
