/* ForeverGear v2: the in-game tooltip look. Names in the exact game quality colours on a dark
   background; everything else is high-contrast, fully opaque text. No badges, no scores. */
:root {
  --bg: #0a0c10;
  --panel: #0e1220;          /* the game's tooltip navy */
  --panel-2: #151a2b;
  --line: #2b3350;
  --ink: #f2efe6;
  --muted: #c9c4b8;
  --gold: #ffd100;           /* the game's gold (headings, set names in game use it too) */
  --green: #1eff00;          /* Equip / Use / Chance on hit lines, as in game */
  --q0: #9d9d9d; --q1: #ffffff; --q2: #1eff00; --q3: #0070dd; --q4: #a335ee; --q5: #ff8000;
  --focus: #ffe680;
  --radius: 6px;
  --font: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --caps: 'Alegreya Sans SC', 'Atkinson Hyperlegible', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.4 var(--font); -webkit-text-size-adjust: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button { font: inherit; color: inherit; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ---------- top bar ---------- */
.top { border-bottom: 1px solid var(--line); background: #0c0f18; position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 54px; flex-wrap: wrap; }
.brand { font: 800 22px/1 var(--caps); letter-spacing: .05em; color: var(--gold); text-decoration: none; }
.brand small { font: 400 13px var(--font); color: var(--muted); letter-spacing: 0; margin-left: 10px; }
nav.views { display: flex; gap: 4px; }
nav.views a { text-decoration: none; padding: 8px 14px; border-radius: var(--radius); color: var(--muted);
  font: 700 15px var(--caps); letter-spacing: .1em; text-transform: uppercase; }
nav.views a[aria-current="page"] { color: #10131c; background: var(--gold); }
nav.views a:hover:not([aria-current="page"]) { color: var(--ink); background: var(--panel-2); }

/* ---------- pickers ---------- */
.pickers { padding: 14px 0 8px; display: grid; gap: 10px; }
.row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 7px; border: 1px solid var(--line);
  background: var(--panel); border-radius: 999px; cursor: pointer; font-weight: 700; color: var(--muted); }
.chip img { width: 22px; height: 22px; border-radius: 50%; }
.chip[aria-pressed="true"] { background: var(--ink); color: #10131c; border-color: var(--ink); }
.chip:hover:not([aria-pressed="true"]) { color: var(--ink); border-color: var(--muted); }
.chips .chip { padding: 5px 11px; font-size: 14px; }
.chips .chip[aria-pressed="true"]::before { content: '\2713'; font-weight: 700; }
.chips .reset { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 4px; }
.lead { color: var(--muted); max-width: 860px; margin: 4px 0 14px; }
.lead strong { color: var(--ink); }

/* ---------- slot cards ---------- */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; padding-bottom: 40px; align-items: start; }
@media (max-width: 640px) { .slots { grid-template-columns: 1fr; } }
section.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
section.card > h2 { margin: 0; padding: 9px 12px 8px; border-bottom: 1px solid var(--line);
  font: 700 17px var(--caps); letter-spacing: .08em; color: var(--gold); }
section.card > h2 small { font: 400 13px var(--font); color: var(--muted); letter-spacing: 0; margin-left: 8px; }
ol.items { list-style: none; margin: 0; padding: 2px 0; }
li.it { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 10px 12px; }
li.it + li.it { border-top: 1px solid #1d2336; }
.icon { width: 40px; height: 40px; border-radius: 5px; border: 1px solid #3a3f4d; background: #000; display: block; }
.tt { min-width: 0; font-size: 14px; line-height: 1.35; }
.nm { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.name { font-weight: 700; font-size: 15px; text-decoration: none; overflow-wrap: anywhere; }
.name:hover { text-decoration: underline; }
.q0 { color: var(--q0); } .q1 { color: var(--q1); } .q2 { color: var(--q2); }
.q3 { color: var(--q3); } .q4 { color: var(--q4); } .q5 { color: var(--q5); }
.flag { font: 700 11px var(--font); letter-spacing: .08em; color: var(--ink); border: 1px solid var(--ink);
  border-radius: 3px; padding: 0 5px; cursor: default; }
.ln { color: var(--ink); }
.ln.sp { display: flex; justify-content: space-between; gap: 12px; max-width: 320px; }
.ln.eq { color: var(--green); }
.ln.set { color: var(--muted); }
.ln.dim, .so, .chg { color: var(--muted); }
.so { margin-top: 3px; }
.chg { font-size: 13px; }
.duel { color: var(--ink); margin: 1px 0 2px; }
.empty { padding: 12px; color: var(--muted); }

/* ---------- hover tooltip (desktop) ---------- */
#tip { position: fixed; z-index: 50; max-width: 340px; background: rgba(8, 11, 24, .97); border: 1px solid #6d7690;
  border-radius: 4px; padding: 8px 10px; font-size: 13px; line-height: 1.35; pointer-events: none; display: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .6); }
#tip .t-name { font-weight: 700; font-size: 15px; }

/* ---------- notes page ---------- */
table.notes { width: 100%; border-collapse: collapse; font-size: 13px; }
table.notes td, table.notes th { text-align: left; padding: 5px 8px; border-top: 1px solid var(--line); vertical-align: top; }
table.notes th { color: var(--muted); }
.notes-body { padding: 10px 12px; }
.notes-body a { color: var(--gold); }
footer.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 14px 0 30px; }
footer.foot a { color: var(--muted); }
@media (max-width: 640px) {
  body { font-size: 14px; }
  .top { position: static; }
  .top .wrap { gap: 10px; padding-top: 8px; padding-bottom: 8px; }
  .brand small { display: block; margin: 4px 0 0; }
  nav.views a { padding: 7px 10px; font-size: 14px; }
  li.it { grid-template-columns: 36px 1fr; padding: 10px; }
  .icon { width: 36px; height: 36px; }
}
