/* A fighter's page: sibling links, stats, skills, rank and insights, the star selector. Loaded in the order base, roster, fighter, team, companions, panels, pages, insights: a later file wins over an earlier one at equal weight. */
/* fighter page */
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 20px; color: var(--muted); text-decoration: none; font-size: 15px; }
.back:hover { color: var(--text); }
.back-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; }
/* previous, next and jump-to: small and out of the way at the end of the back row */
.sib-nav { margin: 20px 0 0 auto; display: flex; align-items: center; gap: 6px; }
.sib-link { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--muted); font-size: 22px; line-height: 1; text-decoration: none; }
.sib-link:hover, .sib-link:focus-visible { color: var(--text); border-color: #5A5D6B; }
.sib-search { width: 150px; height: 36px; padding: 0 10px; font-size: 14px; }
/* the same controls, fixed at the bottom left once the ones at the top are out of sight */
.sib-float { position: fixed; left: 16px; bottom: 16px; z-index: 30; display: flex; align-items: center; gap: 4px; padding: 3px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; opacity: .88; }
.sib-float[hidden] { display: none; }
.sib-float:hover, .sib-float:focus-within { opacity: 1; }
.sib-float .sib-link { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.sib-float .sib-search { width: 130px; height: 34px; }
.sib-float .sib-search[hidden] { display: none; }
.sib-find { font-size: 20px; }
@media (max-width: 640px) { .sib-nav { margin-top: 20px; } .sib-search { width: 112px; } }
.back-from { color: var(--text); font-weight: 600; }
.f-hero { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 8px; padding-bottom: 48px; }
.f-art { flex: 1 1 420px; min-width: 0; position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 640px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.f-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--rc); }
.f-ghost { position: absolute; top: 24px; left: 0; right: 0; text-align: center; font: 400 var(--ghost, 176px)/.85 var(--display); letter-spacing: .02em; color: var(--panel-2); text-transform: uppercase; white-space: nowrap; overflow: hidden; }
.f-art img { position: relative; display: block; height: 620px; width: auto; max-width: 100%; object-fit: contain; margin-bottom: 6px; }
.f-info { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; padding-top: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 4px; background: var(--panel); border: 1px solid var(--line-2); font: 700 14px var(--cond); letter-spacing: .08em; text-transform: uppercase; }
.badge-r { color: var(--rc); border-color: var(--rc); }
.badge-hot { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.f-name { margin: 0; font: 400 clamp(56px, 7vw, 96px)/.92 var(--display); text-transform: uppercase; }
.f-style { margin: 10px 0 0; font: 600 26px var(--cond); letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts div { background: var(--panel); padding: 14px 16px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 600; }
.h-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.h-sub { margin: 0; font: 700 22px var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat-label { font: 700 14px var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat-max { margin-top: 6px; font: 400 30px/1 var(--display); font-variant-numeric: tabular-nums; }
.stat-min { margin-top: 6px; font-size: 13px; color: var(--muted); }
.sub-toggle { display: none; }
/* smaller stat cards on a phone: three across, smaller numbers */
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 9px 10px; border-radius: 8px; }
  .stat-label { font-size: 12px; letter-spacing: .08em; }
  .stat-max { margin-top: 4px; font-size: 22px; }
  .stat-min { margin-top: 4px; font-size: 11px; line-height: 1.3; }
  .lvl-panel:not(.show-sub) .stat-min { display: none; }
  .sub-toggle { display: inline-block; justify-self: start; font-size: 12px; padding: 0; margin: -4px 0 0; }
}
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 160px; align-items: center; gap: 14px; }
.bar-label { font: 600 15px var(--cond); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.bar { height: 14px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--bc); }
.bar-val { font-size: 15px; font-variant-numeric: tabular-nums; }
.bar-val em { font-style: normal; color: var(--muted); }
.band { border-top: 1px solid var(--line); }
.band > .wrap { padding-top: 40px; padding-bottom: 48px; }
.band-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.band-title { margin: 0; font: 400 40px/1 var(--display); text-transform: uppercase; }
/* a fighter's synergy: who it affects, then its tiers (needed count, bonus, conditions) for standard and event battles side by side */
.syn-info + .syn-info { margin-top: 32px; }
.syn-name { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font: 700 22px var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.syn-name img, .syn-name svg { width: 28px; height: 28px; }
.syn-affects { margin: 0 0 4px; }
.syn-battles { margin-top: 8px; border-top: 1px solid var(--line); }
.syn-battles > summary .syn-col-title { margin: 0; color: var(--text-2); }
.syn-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 32px; margin-top: 14px; }
.syn-col-title { margin: 0 0 8px; font: 600 14px var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.syn-tiers { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.syn-tier { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.syn-need { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 2px solid var(--accent); border-radius: 50%;
  color: var(--accent); font: 400 15px/1 var(--display); }
.syn-tier-text { display: grid; gap: 2px; min-width: 0; }
@media (max-width: 640px) { .syn-cols { grid-template-columns: minmax(0, 1fr); } }
.toggle { display: inline-flex; padding: 4px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; }
.toggle button { height: 40px; padding: 0 18px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font: 600 15px var(--cond); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--text); color: var(--ink); }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.skill { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.skill-head { display: flex; align-items: center; gap: 14px; }
.skill-icon { width: 56px; height: 56px; flex: none; border-radius: 10px; background: var(--panel-2); object-fit: cover; }
.skill-letter { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; flex: none; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--kc); color: var(--kc); font: 400 24px var(--display); }
.skill-kind { font: 700 13px var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--kc); }
/* under a skill's text: what the effects it names do (from the Buffs tab) */
.effect-notes { list-style: none; margin: 10px 0 0; padding: 6px 0 0 10px; border-left: 2px solid var(--line-2);
  display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.45; color: var(--muted); white-space: pre-line; }
.effect-notes b { color: var(--tag); font-weight: 600; }

/* rank and insights from the site's editors */
.badge-rank { border-color: var(--rk); color: var(--rk); }
.badge-rank[hidden] { display: none; }
.badge-rank b { margin-left: 2px; font: 400 16px/1 var(--display); }
.notes-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px 40px; align-items: start; }
@media (max-width: 760px) { .notes-grid { grid-template-columns: minmax(0, 1fr); } }
.rank-box { display: flex; gap: 18px; align-items: flex-start; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.rank-tile { width: 96px; height: 96px; flex: none; display: flex; align-items: center; justify-content: center; border: 3px solid var(--rk); border-radius: 16px;
  color: var(--rk); font: 400 64px/1 var(--display); }
.rank-tile.is-empty { border-style: dashed; border-color: var(--line-2); color: var(--faint); font-size: 40px; }
.rank-text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.rank-text p { margin: 0; }
.rank-pick { flex-wrap: wrap; margin-top: 4px; }
.rank-word { color: var(--rk); }
.rank-legend { margin: 8px 0 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.rank-legend div { display: flex; gap: 8px; }
.rank-legend dt { width: 1.2em; font: 400 15px/1.2 var(--display); color: var(--rk); }
.rank-legend dd { margin: 0; }
.rank-pick button { min-width: 38px; height: 38px; padding: 0 8px; font: 400 20px/1 var(--display); color: var(--rk); }
.rank-pick button[aria-pressed="true"] { background: var(--rk); color: var(--ink); }
.role-box { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.role-box .sc-head { margin-bottom: 0; }
.role-now { margin: 0; font-size: 15px; }
.role-now b { font: 400 22px/1.1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.role-now.is-empty { color: var(--muted); font-size: 14px; }
.role-pick { flex-wrap: wrap; }
.role-pick button { height: 36px; padding: 0 12px; }
.notes-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.notes-col > .h-sub, .rank-text > .h-sub { margin: 0; }
.notes-col > .band-head { margin-bottom: 0; }
.wrap > .notes-grid:first-child { padding-top: 40px; padding-bottom: 24px; }
.insights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.insight { padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.insight-body { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.insight-body.md { white-space: normal; }
.insight-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.insight-meta .linkish, .rank-text .linkish { min-height: 32px; padding: 0 4px; font-size: 13px; }
.insight-form textarea { display: block; width: 100%; min-height: 96px; padding: 10px 12px; background: var(--ink); border: 1px solid var(--line-2); border-radius: 8px;
  color: var(--text); font: inherit; resize: vertical; }
.insight-form textarea:focus { border-color: var(--accent); outline: none; }
/* a visible grip in the corner: drag it to make the box taller (vertical only) */
.insight-form textarea::-webkit-resizer { background: linear-gradient(135deg, transparent 50%, var(--muted) 50%, var(--muted) 58%, transparent 58%, transparent 72%, var(--muted) 72%, var(--muted) 80%, transparent 80%); }
.insight-form-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.insight-form-row > .muted { margin-right: auto; }
.notes-msg { margin: 12px 0 0; min-height: 1.2em; color: #FFB59E; }

/* a value the sheet couldn't fill in ("[?]"): a dashed marker with a tooltip, not an effect name */
.unknown { position: relative; display: inline-block; min-width: 1.5em; padding: 0 5px; border: 1px dashed var(--faint); border-radius: 4px; background: rgba(255,255,255,.06);
  color: var(--muted); font-weight: 700; text-align: center; cursor: help; }
.unknown::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); z-index: 5; width: max-content; max-width: 220px;
  padding: 5px 9px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); font: 500 13px/1.3 var(--body); text-align: left;
  white-space: normal; opacity: 0; pointer-events: none; transition: opacity .12s; }
.unknown:hover::after, .unknown:focus::after, .unknown:focus-visible::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .unknown::after { transition: none; } }
.skill-type { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 1px 8px; border-radius: 4px; border: 1px solid var(--tc); color: var(--tc); letter-spacing: .1em; }
.skill-name { margin: 2px 0 0; font: 700 24px/1.1 var(--cond); text-transform: uppercase; }
.skill-text { margin: 0; font-size: 15px; line-height: 1.55; color: #D5D6DC; white-space: pre-line; }
.skill-text b { color: var(--tag); font-weight: 600; }
.skill-note { margin: 0; font-size: 13px; color: var(--muted); }
.skill-note strong { color: var(--text-2); font-weight: 600; }
/* a star level (not base) picked in the selector, and the text it changes */
.toggle button.is-star[aria-pressed="true"] { background: var(--chg); color: var(--ink); }
mark.chg { background: rgba(92, 225, 230, .14); color: var(--chg); border-radius: 3px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
mark.chg b { color: inherit; }
.skill-note strong.chg-text { color: var(--chg); }
.chg-note { margin: -8px 0 16px; min-height: 20px; font-size: 14px; color: var(--muted); }
.toggle-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toggle { flex-wrap: wrap; }
.toggle button { min-width: 52px; padding: 0 14px; }
.tiers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tier { display: flex; gap: 20px; align-items: flex-start; padding: 18px 20px; background: var(--panel); }
.tier-star { flex: none; display: inline-flex; align-items: baseline; justify-content: center; gap: 2px; width: 64px; padding: 8px 0; border-radius: 8px; background: var(--panel-2); color: #FFB020; }
.tier-star b { font: 400 28px/1 var(--display); color: var(--text); }
.tier-star span { font-size: 16px; }
.tier-text { min-width: 0; font-size: 15px; line-height: 1.55; color: #D5D6DC; }
.tier-text p { margin: 0 0 4px; }
.tier-text p:last-child { margin-bottom: 0; }
.tier-text .tier-head { font: 700 16px var(--cond); letter-spacing: .05em; text-transform: uppercase; color: var(--text); }
.tier-text b { color: var(--tag); font-weight: 600; }
