#champions { --cd-panel: var(--paper-2); --cd-ok: #2f9e6a; --cd-part: #e6b422; --cd-bad: #d64545; --cd-glow: color-mix(in srgb, var(--highlight) 45%, transparent);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.4; }
:root[data-theme="dark"] #champions { --cd-part: #c99a16; --cd-bad: #c23a3a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #champions { --cd-part: #c99a16; --cd-bad: #c23a3a; } }
#champions h1 { margin: 0 0 .25rem; font-family: var(--font-display); font-weight: 400; font-size: 3rem; letter-spacing: 3px; text-transform: uppercase; text-align: center; }
#champions h1 span { color: var(--accent); }
#champions .lede { text-align: center; color: var(--muted); margin: 0 0 .5rem; }
#champions button, #champions input { font-family: inherit; }
#champions .search { position: relative; max-width: 420px; margin: 0 auto 16px; }
#champions .search input { width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--cd-panel); color: var(--ink); font-size: 16px; }
#champions .list { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; max-height: 320px; overflow: auto; z-index: 5; display: none; box-shadow: var(--box-shadow); }
#champions .list div { display: flex; align-items: center; gap: 10px; padding: 6px 10px; cursor: pointer; }
#champions .list div.sel, #champions .list div:hover { background: var(--cd-panel); }
#champions .list img { width: 36px; height: 36px; object-fit: cover; object-position: top; border-radius: 50%; background: #000; }
#champions .list small { color: var(--muted); }
#champions .info { text-align: center; color: var(--muted); margin-bottom: 10px; }
#champions .done { display: none; text-align: center; margin: 0 auto 14px; padding: 8px 14px; max-width: 420px; border-radius: 8px; background: var(--cd-panel); border: 1px solid var(--cd-ok); animation: cdfade .5s both; }
#champions .done.lost { border-color: var(--cd-bad); }
#champions .done button { margin-left: 8px; padding: 3px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--line); color: var(--ink); cursor: pointer; font-size: 13px; }
#champions .scroll { overflow-x: auto; }
#champions table { border-collapse: separate; border-spacing: 4px; margin: 0 auto; min-width: 700px; width: auto; font-size: 13px; }
#champions th { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0 0 4px; border: 0; text-align: center; letter-spacing: 0; }
#champions td { width: 84px; height: 68px; text-align: center; vertical-align: middle; border: 0; border-radius: 6px; background: var(--cd-panel); font-weight: 600; font-size: 13px; padding: 2px 4px; animation: cdflip .5s both; }
#champions td.hero { width: 96px; background: none; padding: 0; }
#champions td.hero img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; object-position: top; display: block; margin: 0 auto; background: #000; }
#champions td.hero div { font-size: 10px; color: var(--muted); font-weight: 500; line-height: 1.2; }
#champions td.ok { background: var(--cd-ok); color: #fff; }
#champions td.part { background: var(--cd-part); color: #1b1b1f; }
#champions td.bad { background: var(--cd-bad); color: #fff; }
#champions td small { display: block; font-weight: 500; font-size: 11px; opacity: .9; }
#champions tr.win td:not(.hero) { animation: cdflip .5s both, cdglow 1.2s .9s 2; }
#champions .legend { display: flex; gap: 14px; justify-content: center; color: var(--muted); font-size: 12px; margin-top: 18px; flex-wrap: wrap; }
#champions .legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
#champions .foot { text-align: center; color: var(--muted); font-size: 12px; margin: 28px auto 0; max-width: 640px; }
#champions #art { display: none; text-align: center; }
#champions #artFrame { margin: 0 auto 12px; border: 3px solid var(--line); border-radius: 10px; background-color: #000; background-repeat: no-repeat; max-width: 100%; transition: border-color .3s, background-size .7s ease, background-position .7s ease; }
#champions #artFrame.shake { animation: cdshake .4s; border-color: var(--cd-bad); }
#champions #artFrame.won { border-color: var(--highlight); box-shadow: 0 0 30px var(--cd-glow); }
#champions .tries { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
#champions .tries i { width: 26px; height: 8px; border-radius: 4px; background: var(--line); }
#champions .tries i.used { background: var(--cd-bad); }
#champions .tries i.won { background: var(--cd-ok); }
#champions .wrong { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 620px; margin: 0 auto; }
#champions .wrong span { background: var(--cd-panel); border: 1px solid var(--cd-bad); border-radius: 999px; padding: 3px 12px; font-size: 13px; }
#champions #fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; width: 100%; height: 100%; }
#champions .modal { display: none; position: fixed; inset: 0; background: #000a; align-items: center; justify-content: center; z-index: 50; padding: 12px; }
#champions .modal.show { display: flex; }
#champions .modal .box { background: var(--paper); border: 2px solid var(--highlight); border-radius: 14px; padding: 22px; max-width: 440px; width: 100%; text-align: center; animation: cdpop .6s cubic-bezier(.2,1.5,.4,1) both; box-shadow: 0 0 50px var(--cd-glow); max-height: 96vh; overflow: auto; }
#champions .modal .box.lose { border-color: var(--cd-bad); box-shadow: none; }
#champions .modal h2 { margin: 0 0 2px; font-size: 30px; text-transform: uppercase; letter-spacing: 1px; color: var(--highlight); text-shadow: 0 0 14px var(--cd-glow); }
#champions .modal .box.lose h2 { color: var(--cd-bad); text-shadow: none; }
#champions .modal h3 { margin: 0; font-size: 1.2rem; }
#champions .modal .sub { color: var(--muted); margin-bottom: 6px; }
#champions .modal .reveal { height: 190px; width: auto; max-width: 100%; border-radius: 10px; margin: 8px auto; display: block; box-shadow: 0 0 28px var(--cd-glow); animation: cdfloat 3s ease-in-out infinite; }
#champions .modal .box.lose .reveal { box-shadow: none; }
#champions .rank { font-size: 20px; margin: 4px 0; }
#champions .stats { display: flex; justify-content: center; gap: 22px; margin: 8px 0; }
#champions .stats b { display: block; font-size: 22px; }
#champions .stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
#champions .modal pre { background: var(--cd-panel); padding: 10px; border-radius: 8px; text-align: left; font-size: 14px; white-space: pre-wrap; margin: 8px 0; }
#champions .modal .btn { margin: 3px; }
#champions .modal .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
@keyframes cdflip { from { transform: rotateX(90deg); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes cdglow { 50% { box-shadow: 0 0 18px 4px var(--highlight); filter: brightness(1.3) } }
@keyframes cdshake { 25% { transform: translateX(-8px) } 75% { transform: translateX(8px) } }
@keyframes cdpop { from { transform: scale(.4) rotate(-6deg); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes cdfloat { 50% { transform: translateY(-6px) rotate(1deg) } }
@keyframes cdfade { from { opacity: 0; transform: translateY(-4px) } to { opacity: 1; transform: none } }

#champions .next { color: var(--muted); font-size: 13px; margin: 6px 0; }
#champions .next b { color: var(--ink); font-variant-numeric: tabular-nums; }
#champions .hintbar { text-align: center; margin: -6px auto 12px; max-width: 520px; font-size: 13px; }
#champions .hintbar .btn { padding: 4px 12px; font-size: 13px; border-style: dashed; }
#champions .hintbar .hint { display: inline-block; margin: 3px 4px; padding: 3px 12px; border-radius: 999px; background: var(--cd-panel); border: 1px solid var(--highlight); }
#champions .bars { text-align: left; margin: 10px 0; }
#champions .bars div { display: flex; align-items: center; gap: 8px; margin: 3px 0; font-size: 13px; }
#champions .bars span { width: 34px; text-align: right; color: var(--muted); }
#champions .bars i { display: block; height: 18px; min-width: 18px; border-radius: 4px; background: var(--line); color: var(--ink); font-style: normal; font-size: 12px; padding: 0 6px; line-height: 18px; text-align: right; }
#champions .bars i.hi { background: var(--cd-ok); color: #fff; }
#champions .gamestats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
#champions .gamestats div { background: var(--cd-panel); border-radius: 8px; padding: 6px; font-size: 12px; color: var(--muted); }
#champions .gamestats b { display: block; color: var(--ink); font-size: 15px; }
@media (max-width: 640px) {
  #champions h1 { font-size: 2.4rem; }
  #champions .scroll { overflow: visible; }
  #champions table, #champions tbody { display: block; min-width: 0; width: 100%; }
  #champions thead { display: none; }
  #champions tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 12px; }
  #champions td { width: auto; height: auto; min-height: 54px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
  #champions td[data-label]::before { content: attr(data-label); font-size: 9px; text-transform: uppercase; font-weight: 500; opacity: .85; margin-bottom: 2px; }
  #champions td.hero { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 0; }
  #champions td.hero img { margin: 0; width: 44px; height: 44px; }
  #champions td.hero div { text-align: left; font-size: 14px; color: var(--ink); font-weight: 600; }
  }
#champions .toast { min-height: 24px; margin: -8px 0 8px; text-align: center; font-weight: 600; opacity: 0; transition: opacity .25s; }
#champions .toast.show { opacity: 1; }
#champions .toast.toast_hot { color: var(--cd-bad); }
#champions .toast.toast_warm { color: #c9810a; }
#champions .toast.toast_cold { color: var(--accent); }
#champions .hintbar button#ruledBtn { margin-top: 6px; }

#champions .aux { background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); padding: 6px 12px; cursor: pointer; font-size: 15px; }
#champions .aux:hover { color: var(--ink); background: var(--cd-panel); }
#champions .tools { display: flex; justify-content: flex-end; gap: 6px; }
#champions .sec { margin: 26px 0 0; }
#champions .sech { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#champions .sech h2 { margin: 0; font-size: 1.25rem; }
#champions .prog { color: var(--muted); font-size: 13px; }
#champions .secsub { margin: 2px 0 12px; color: var(--muted); font-size: 13px; }
#champions .secsub .next { margin-left: 4px; font-size: 13px; }
#champions .ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
#champions .gcard { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--cd-panel); color: var(--ink); cursor: pointer; font-family: inherit; transition: transform .12s, border-color .12s; }
#champions .gcard:hover { transform: translateY(-2px); border-color: var(--accent); }
#champions .gcard .ge { font-size: 26px; line-height: 1.1; }
#champions .gcard .gn { font-weight: 700; font-size: 16px; margin-top: 4px; }
#champions .gcard .gd { color: var(--muted); font-size: 12px; line-height: 1.3; flex: 1; }
#champions .gcard .gs { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
#champions .gcard.prog { border-color: var(--highlight); }
#champions .gcard.won { border-color: var(--cd-ok); }
#champions .gcard.won .gs { color: var(--cd-ok); }
#champions .gcard.lost { border-color: var(--cd-bad); }
#champions .gcard.lost .gs { color: var(--cd-bad); }
#champions .topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
#champions #playTitle { font-size: 16px; }
#champions .topbar .btn { padding: 6px 12px; font-size: 14px; }
#champions .foot { margin-top: 40px; }
@media (max-width: 640px) {
  #champions .ggrid { grid-template-columns: repeat(2, 1fr); }
  #champions .gcard { padding: 12px; }
}
#champions .pill { display: inline-block; margin: 1px; padding: 1px 7px; border-radius: 999px; font-size: 12px; line-height: 1.5; }
#champions .pill.m { background: var(--cd-ok); color: #fff; box-shadow: 0 0 0 1.5px #fffd; }
#champions td.ok .pill.m { background: #ffffff33; }

/* ---- button system: one calm look for every button ---- */
#champions .btn, #champions .aux, #champions .done button, #champions .gcard { -webkit-tap-highlight-color: transparent; }
#champions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--cd-panel); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
#champions .btn:hover { border-color: var(--accent); }
#champions .btn:active { transform: scale(.97); }
#champions .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
#champions .btn.primary:hover { filter: brightness(1.1); }
#champions .btn:focus-visible, #champions .aux:focus-visible, #champions .gcard:focus-visible, #champions .done button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#champions .aux { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; border-radius: 999px; background: var(--cd-panel); border: 1px solid var(--line); color: var(--ink); font-size: 16px; cursor: pointer; transition: border-color .15s, background .15s; }
#champions .aux:hover { border-color: var(--accent); background: var(--cd-panel); }
#champions .tools { gap: 8px; }
#champions .topbar .btn { padding: 7px 14px; }
#champions .topbar .aux { min-width: 34px; height: 34px; padding: 0; }
#champions .hintbar .btn { border-style: solid; padding: 6px 14px; font-size: 13px; margin: 3px; }
#champions .hintbar .hint { background: color-mix(in srgb, var(--highlight) 18%, transparent); border: 1px solid color-mix(in srgb, var(--highlight) 60%, transparent); }
#champions .hintbar #hintBtn { background: color-mix(in srgb, var(--highlight) 30%, var(--cd-panel)); border-color: var(--highlight); }
#champions .hintbar #ruledBtn { background: transparent; color: var(--muted); font-weight: 500; padding: 3px 12px; }
#champions .hintbar #ruledBtn[aria-pressed="true"] { color: var(--ink); border-color: var(--cd-ok); background: color-mix(in srgb, var(--cd-ok) 14%, transparent); }
#champions .done button { border-radius: 999px; padding: 3px 14px; font-weight: 600; background: var(--cd-panel); }
#champions .modal .btn { margin: 4px; }

/* ---- result / stats / help modals ---- */
#champions .modal .box { position: relative; }
#champions .xbtn { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--cd-panel); color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#champions .xbtn:hover { color: var(--ink); border-color: var(--accent); }
#champions .xbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#champions .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
#champions .actions .btn { margin: 0; width: 100%; }
#champions .actions .btn.big { grid-column: 1 / -1; padding: 13px 18px; font-size: 16px; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
#champions .btn.ghost { background: transparent; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
#champions .btn.ghost:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: var(--accent); }
#champions .modal pre { margin-bottom: 4px; }
#champions .modal .reveal { height: 150px; }
#champions .modal .actions { position: sticky; bottom: -22px; margin: 12px -22px -22px; padding: 12px 22px 22px; background: linear-gradient(to bottom, transparent, var(--paper) 18px); }

#champions h1 { font-size: 2.6rem; letter-spacing: 2px; text-wrap: balance; line-height: 1.05; margin-top: .5rem; }
@media (max-width: 640px) { #champions h1 { font-size: 2rem; } }

/* ---- search box: looks like a search field AND offers the full list ---- */
#champions .search { max-width: 460px; }
#champions .search::before { content: '🔍'; position: absolute; left: 14px; top: 13px; font-size: 15px; pointer-events: none; opacity: .7; }
#champions .search input { padding: 13px 48px 13px 40px; border: 2px solid var(--line); border-radius: 999px; box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 8%, transparent); }
#champions .search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
#champions .qtoggle { position: absolute; right: 6px; top: 6px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
#champions .qtoggle:hover { background: var(--cd-panel); color: var(--ink); }
#champions .list { border-radius: 14px; max-height: 340px; box-shadow: var(--box-shadow); }
#champions .list .lhead { position: sticky; top: 0; z-index: 1; background: var(--paper); color: var(--muted); font-size: 12px; padding: 7px 14px; border-bottom: 1px solid var(--line); cursor: default; }
#champions .list .lfoot { color: var(--muted); font-size: 12px; padding: 8px 14px; cursor: default; justify-content: center; }
#champions .list .lhead:hover, #champions .list .lfoot:hover { background: var(--paper); }
