[hidden] { display: none !important; }
:root {
  --bg: #f3f5f5;
  --panel: #ffffff;
  --ink: #142120;
  --muted: #5b6b6a;
  --line: #dde4e4;
  --line-strong: #c7d1d1;
  --accent: #0f898a;
  --accent-hover: #0b7273;
  --accent-ink: #ffffff;
  --accent-soft: #e2f2f2;
  --win: #1d8048;
  --win-soft: #e2f3e9;
  --loss: #b8382c;
  --loss-soft: #f8e5e2;
  --blue: #2d6bd0;
  --red: #cf4141;
  --warn: #8a5a00;
  --warn-soft: #fff4dc;
  --shadow: 0 1px 2px rgba(20, 33, 32, .06), 0 2px 8px rgba(20, 33, 32, .04);
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1313;
    --panel: #141c1c;
    --ink: #e4ecec;
    --muted: #93a4a3;
    --line: #243030;
    --line-strong: #314040;
    --accent: #2bb2b3;
    --accent-hover: #44c4c5;
    --accent-ink: #062223;
    --accent-soft: #123131;
    --win: #4cc483;
    --win-soft: #12301f;
    --loss: #ef7a6c;
    --loss-soft: #3a1a16;
    --blue: #6b9cf0;
    --red: #f07272;
    --warn: #f0c060;
    --warn-soft: #2e2511;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.55rem; letter-spacing: -.01em; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
h2 { font-size: 1.05rem; margin-bottom: .75rem; display: flex; align-items: center; gap: .45rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--accent-soft); padding: .1em .35em; border-radius: 5px; word-break: break-all; }
code.block { display: block; padding: .6rem .75rem; margin: .4rem 0; line-height: 1.45; white-space: pre-wrap; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.warn-text { color: var(--warn); font-weight: 600; }

/* barra in alto */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem;
  padding: .55rem 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .5rem; color: var(--ink); font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: .15rem; overflow-x: auto; flex: 1; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--muted); padding: .4rem .65rem; border-radius: 7px; white-space: nowrap; font-weight: 500;
  display: inline-flex; align-items: center; gap: .35rem;
}
.nav a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.logout { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.who { color: var(--muted); font-size: .9em; }
.badge {
  display: inline-block; min-width: 1.35rem; padding: 0 .38rem; border-radius: 999px;
  background: var(--loss); color: #fff; font-size: .75rem; font-weight: 700; line-height: 1.35rem; text-align: center;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 0 0 2rem; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin: .25rem 0 1rem; flex-wrap: wrap; }
.head p { margin: .3rem 0 0; }
.crumb { font-size: .9rem; display: inline-block; margin-bottom: .2rem; }
.key { font-family: ui-monospace, monospace; color: var(--muted); font-size: .85rem; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow); min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.card-head h2 { margin-bottom: .6rem; }
.more { font-size: .9rem; white-space: nowrap; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 1rem; }
.cols > .card { margin-bottom: 1rem; }
.cols.two { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.kpis.six { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* numeri in evidenza */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem;
  display: flex; flex-direction: column; color: var(--ink); box-shadow: var(--shadow);
}
a.kpi:hover { border-color: var(--accent); text-decoration: none; }
.kpi-n { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi-n small { font-size: .55em; color: var(--muted); font-weight: 600; margin: 0 .25em 0 .1em; }
.kpi-l { color: var(--muted); font-size: .88rem; }

/* tabelle */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
.list th, .list td { padding: .55rem .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.list th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--panel); white-space: nowrap; }
.list th.num, .list td.num { text-align: right; }
.list tbody tr:last-child td { border-bottom: none; }
.list tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.card:not(.flush) .list th:first-child, .card:not(.flush) .list td:first-child { padding-left: 0; }
.card:not(.flush) .list th:last-child, .card:not(.flush) .list td:last-child { padding-right: 0; }
.list td.empty { text-align: center; color: var(--muted); padding: 1.5rem; }
.list .champs { color: var(--muted); font-size: .9rem; }
.list .champs strong { color: var(--ink); }
.list .actions { white-space: nowrap; }
.list .actions form.inline { flex-wrap: nowrap; }
table.mini th, table.mini td { padding: .35rem .5rem; border-bottom: 1px solid var(--line); }
table.mini th { font-size: .8rem; color: var(--muted); text-align: left; }
table.mini th.num { text-align: right; }

/* etichette */
.pill { display: inline-block; padding: .08rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.st-active { background: var(--win-soft); color: var(--win); }
.st-pending { background: var(--warn-soft); color: var(--warn); }
.st-not_member { background: var(--warn-soft); color: var(--warn); }
.st-revoked, .st-rejected { background: var(--loss-soft); color: var(--loss); }
.tag { display: inline-block; padding: 0 .4rem; border: 1px solid var(--line-strong); border-radius: 5px; font-size: .75rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
.res { font-weight: 700; font-size: .9rem; }
.res.win { color: var(--win); }
.res.loss { color: var(--loss); }
.res.big { font-size: inherit; padding: .05rem .55rem; border-radius: 8px; }
.res.big.win { background: var(--win-soft); }
.res.big.loss { background: var(--loss-soft); }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; vertical-align: .05em; background: var(--line-strong); }
.dot.blue { background: var(--blue); }
.dot.red { background: var(--red); }

/* pulsanti e moduli */
.btn {
  appearance: none; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink);
  font: inherit; font-weight: 600; padding: .48rem .95rem; border-radius: 8px; cursor: pointer; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--loss); border-color: var(--loss); color: #fff; }
.btn.danger:hover { filter: brightness(1.08); color: #fff; }
.btn.small { padding: .3rem .65rem; font-size: .85rem; }
.btn.wide { width: 100%; padding: .65rem; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: .45rem .6rem; max-width: 100%;
}
textarea { width: 100%; resize: vertical; }
label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .9rem; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
.stack { display: flex; flex-direction: column; gap: .8rem; align-items: stretch; }
.stack .btn { align-self: flex-start; }
.stack .btn.wide { align-self: stretch; }
.row-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-top: .5rem; }
.row-form .grow { flex: 1 1 220px; }
.row-form label input, .row-form label select { width: 100%; }
form.inline { display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin: 0; }
.actions form.inline + form.inline { margin-left: .25rem; }

.flash { padding: .7rem 1rem; border-radius: var(--radius); background: var(--win-soft); color: var(--win); margin-bottom: 1rem; font-weight: 500; border: 1px solid color-mix(in srgb, var(--win) 25%, transparent); }
.flash.err { background: var(--loss-soft); color: var(--loss); border-color: color-mix(in srgb, var(--loss) 25%, transparent); }
.note { padding: .7rem .9rem; border-radius: 8px; background: var(--accent-soft); margin: .75rem 0; font-size: .92rem; }
.note.warn { background: var(--warn-soft); color: var(--warn); }

/* richieste di accesso */
.requests { display: flex; flex-direction: column; gap: .6rem; }
.request {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 9px; background: var(--bg);
}
.req-who { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.req-who .muted { font-size: .85rem; }
.ok-line { color: var(--win); font-size: .88rem; }
.warn-line { color: var(--warn); font-size: .88rem; }
.req-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }

ul.plain { list-style: none; padding: 0; margin: 0 0 .75rem; }
.li-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.li-row:last-child { border-bottom: none; }
.danger-zone { border-color: color-mix(in srgb, var(--loss) 35%, var(--line)); }
.danger-zone p { margin-top: 0; }

/* filtri e pagine */
.filters { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: .9rem; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; }
.tabs a { padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--panel); font-size: .9rem; font-weight: 500; }
.tabs a span { color: var(--muted); font-size: .8em; margin-left: .2rem; font-variant-numeric: tabular-nums; }
.tabs a:hover { text-decoration: none; border-color: var(--accent); }
.tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tabs a[aria-current="page"] span { color: inherit; opacity: .8; }
/* filtro Tutte / Scrim / Tornei, valido in tutte le pagine che contano partite */
.seg { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; margin: 0; padding: .3rem; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; }
.seg-l { color: var(--muted); font-size: .85rem; padding: 0 .4rem 0 .5rem; }
.seg a { padding: .28rem .8rem; border-radius: 999px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.seg a:hover { text-decoration: none; color: var(--ink); background: var(--bg); }
.seg a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }
.head-side { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.head > .seg { align-self: center; }
.kind { font-size: .85rem; font-weight: 600; }
.kind.k-tournament { color: var(--accent); }
.lobby { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.bulk { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: 0 0 .6rem; }
.bulk .muted { font-size: .9rem; margin-right: .2rem; }
.bulk.empty .btn { opacity: .5; pointer-events: none; }
.list th.sel, .list td.sel { width: 1%; padding-right: 0; }
.list td.sel input, .list th.sel input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); cursor: pointer; }
/* roster: riserve e rank */
.tag.sub { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.rank { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank { display: inline-flex; align-items: center; gap: .1rem; vertical-align: middle; }
.rank .emblem { width: 1.35rem; height: 1.2rem; object-fit: contain; margin-right: .35rem; flex-shrink: 0; }
.rank .tier { color: var(--ink); }
.rank .lp { color: var(--muted); font-weight: 500; margin-left: .25rem; }
/* Riot ID con icona dell'evocatore (come su op.gg) */
.rid { display: inline-flex; align-items: center; gap: .45rem; vertical-align: middle; min-width: 0; }
.rid .avatar { width: 1.6rem; height: 1.6rem; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: var(--line); }
.rid .avatar.none { display: inline-grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line-strong); background: var(--bg); }
.rid-name { font-weight: 600; color: var(--ink); }
.rid-tag { color: var(--muted); margin-left: -.15rem; }
.rids { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
a.rid-link:hover { text-decoration: none; }
a.rid-link:hover .rid-name { color: var(--accent); text-decoration: underline; }
.rid-line { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.rid-line .rid .avatar { width: 2rem; height: 2rem; }
h1.rid-title .rid { gap: .6rem; }
h1.rid-title .avatar { width: 2.4rem; height: 2.4rem; }
h1.rid-title .rid-tag { font-weight: 500; }
.t-iron { --tier: #6e6460; } .t-bronze { --tier: #a0673f; } .t-silver { --tier: #8e9ba3; } .t-gold { --tier: #c99a2e; }
.t-platinum { --tier: #2f9e8f; } .t-emerald { --tier: #1f9d55; } .t-diamond { --tier: #5a7de0; } .t-master { --tier: #a24fd1; }
.t-grandmaster { --tier: #d1453b; } .t-challenger { --tier: #e0b43a; }
.btn.primary.active { background: var(--accent-soft); color: var(--accent); }
.addcard { border-color: var(--accent); }
.pw { position: relative; display: block; }
.pw input { width: 100%; padding-right: 2.6rem; }
.pw-eye { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); width: 2rem; height: 2rem; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; padding: 0; }
.pw-eye:hover { color: var(--accent); background: var(--accent-soft); }
.pw-eye svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a.who { color: var(--muted); padding: .3rem .5rem; border-radius: 7px; white-space: nowrap; }
a.who:hover, a.who.current { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
a.who .lvl { font-size: .75rem; border: 1px solid var(--line-strong); border-radius: 5px; padding: 0 .3rem; margin-left: .2rem; }
.pill.lvl-superadmin { background: var(--accent); color: var(--accent-ink); }
.pill.lvl-admin { background: var(--accent-soft); color: var(--accent); }
.pill.lvl-editor { background: var(--warn-soft); color: var(--warn); }
.pill.lvl-standard { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; }
p.notes { white-space: pre-wrap; margin: 0; }
.acc { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.row-form .inline-check { align-self: center; padding-bottom: .1rem; }
.list.compact th, .list.compact td { padding-top: .4rem; padding-bottom: .4rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* partita */
.teams { display: grid; grid-template-columns: 1fr; gap: 0; }
.team { border-top: 3px solid var(--line-strong); }
.team.blue { border-top-color: var(--blue); }
.team.red { border-top-color: var(--red); }
.players td { font-size: .9rem; }
.bans { margin: .6rem 0 0; font-size: .9rem; }
.goldfig { margin: 0; }
svg.gold { width: 100%; height: auto; display: block; }
svg.gold .zero { stroke: var(--line-strong); stroke-width: 1; }
svg.gold .tick { stroke: var(--line); stroke-width: 1; }
svg.gold .lbl { fill: var(--muted); font-size: 11px; }
svg.gold .line { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
svg.gold .area.up { fill: var(--win); opacity: .22; }
svg.gold .area.down { fill: var(--loss); opacity: .22; }
.golds { display: flex; gap: 1.5rem; margin: .5rem 0 0; color: var(--muted); }
.golds strong { color: var(--ink); font-variant-numeric: tabular-nums; }
ol.draft { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .35rem; }
ol.draft li { display: flex; align-items: baseline; gap: .45rem; padding: .35rem .55rem; border-radius: 7px; background: var(--bg); border-left: 3px solid var(--line-strong); font-size: .9rem; flex-wrap: wrap; }
ol.draft li.blue { border-left-color: var(--blue); }
ol.draft li.red { border-left-color: var(--red); }
ol.draft li.ban .champ { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--loss) 60%, transparent); }
ol.draft .seq { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 1.3rem; }
ol.draft .what { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
ol.draft .champ { font-weight: 600; }
ol.steps { padding-left: 1.2rem; margin: 0 0 .5rem; }
ol.steps li { margin-bottom: .6rem; }

/* segreti appena creati */
.newsecret { border-color: var(--accent); }
.secret { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.secret code { font-size: 1rem; padding: .45rem .6rem; }
details summary { cursor: pointer; color: var(--accent); }

/* accesso */
body.bare { min-height: 100vh; }
.login { min-height: calc(100vh - 4rem); display: grid; place-items: center; }
.login-card { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 2rem 1.6rem; text-align: center; box-shadow: var(--shadow); }
.login-card h1 { justify-content: center; margin-top: .6rem; }
.login-card p { margin: .2rem 0 1.25rem; }
.login-card form { text-align: left; }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: .4rem .75rem; padding: .5rem .75rem; }
  .brand span { display: none; }
  .nav { order: 3; flex-basis: 100%; }
  .logout { margin-left: auto; }
  .wrap { padding: 1rem .75rem 2.5rem; }
  .teams, .cols, .cols.two { grid-template-columns: 1fr; }
  .kpis.six { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .kpi { padding: .7rem .8rem; }
  h1 { font-size: 1.3rem; }
  .kpi-n { font-size: 1.45rem; }
}
.section-title { margin: 1.4rem 0 .3rem; }

/* lingua */
.foot { display: flex; justify-content: center; align-items: center; gap: 1rem; flex-wrap: wrap; }
.langs { display: inline-flex; gap: .25rem; margin: 0; }
.langs button, .langs a { appearance: none; border: 1px solid transparent; background: none; font: inherit; font-size: .8rem; color: var(--muted); padding: .1rem .45rem; border-radius: 6px; cursor: pointer; }
.langs button:hover, .langs a:hover { color: var(--accent); text-decoration: none; }
.langs [aria-current="true"] { border-color: var(--line-strong); color: var(--ink); font-weight: 600; }
.login-langs { justify-content: center; margin-top: 1rem; }
h2.spaced { margin-top: 1.4rem; }

/* op.gg */
.btn.opgg { border-color: color-mix(in srgb, #5383e8 55%, var(--line-strong)); color: #5383e8; }
.btn.opgg:hover { background: color-mix(in srgb, #5383e8 12%, transparent); color: #5383e8; border-color: #5383e8; }
@media (prefers-color-scheme: dark) { .btn.opgg, .btn.opgg:hover { color: #8fb0ff; } }
.opgg-team { display: inline-flex; gap: .35rem; align-items: center; }
.btn.copied { border-color: var(--win); color: var(--win); }
.acc-actions { display: inline-flex; gap: .35rem; align-items: center; flex-shrink: 0; }
.pname { display: inline-flex; align-items: center; gap: .45rem; }
.pname .btn.opgg { padding: .12rem .45rem; font-size: .75rem; margin-left: .15rem; }

/* tracker online / offline */
.presence { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; }
.presence::before, .dot { content: ""; display: inline-block; width: .62rem; height: .62rem; border-radius: 50%; flex-shrink: 0; background: var(--red); }
.presence.on::before, .dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.presence.none { color: var(--muted); font-weight: 500; }
.dot { margin-right: .45rem; vertical-align: .05em; }

/* composizioni */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.champ-ico { width: 2.25rem; height: 2.25rem; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--line); display: inline-block; }
.champ-ico.empty { border: 1px dashed var(--line-strong); background: transparent; }
.comp-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
@media (max-width: 1100px) { .comp-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 840px) { .comp-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .comp-list { grid-template-columns: 1fr; } }
a.comp-card { display: flex; flex-direction: column; gap: .7rem; color: var(--ink); margin: 0; }
a.comp-card:hover { text-decoration: none; border-color: var(--accent); }
.comp-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.comp-card-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.comp-card-head .muted { white-space: nowrap; flex-shrink: 0; }
.comp-teams { display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.comp-mini { display: flex; justify-content: center; gap: .3rem; }
.comp-mini .champ-ico { width: 2.2rem; height: 2.2rem; }
a.comp-card { padding: .9rem; }
.comp-mini.none { opacity: .5; }
.comp-vs { color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
/* le note occupano sempre due righe: tutte le schede hanno la stessa altezza */
.comp-notes { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; height: 2.8em; text-align: left; }
.comp-notes strong { color: var(--ink); font-weight: 600; }
.comp-name-field input { width: 100%; max-width: 28rem; }
.comp-board { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: start; }
.comp-board .card { margin: 0; }
.comp-mid { align-self: center; }
.comp-team h2 { margin-bottom: .5rem; }
.comp-team.ours h2 { color: var(--blue); }
.comp-team.theirs h2 { color: var(--red); }
.comp-slot { display: grid; grid-template-columns: 5.5rem 1fr; align-items: center; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.comp-slot:last-child { border-bottom: none; }
.comp-role { color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.comp-pick { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .3rem .45rem; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.comp-pick:not([disabled]):hover { border-color: var(--accent); background: var(--accent-soft); }
.comp-pick[disabled] { cursor: default; }
.comp-pick .champ-ico { width: 2.75rem; height: 2.75rem; }
.comp-actions { display: flex; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }
.comp-form .card { margin-bottom: 1rem; }
.comp-delete { margin-top: .5rem; }
dialog.picker { width: min(780px, calc(100vw - 2rem)); max-height: min(80vh, 760px); padding: 1rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--panel); color: var(--ink); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
dialog.picker[open] { display: flex; flex-direction: column; }
dialog.picker::backdrop { background: rgba(0, 0, 0, .55); }
.picker-head { display: flex; gap: .5rem; align-items: center; }
.picker-search { flex: 1; min-width: 0; }
.picker-role { margin: .5rem 0; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .4rem; overflow-y: auto; padding: .1rem; }
.picker-champ { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .35rem .2rem; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--ink); font: inherit; font-size: .75rem; cursor: pointer; line-height: 1.15; text-align: center; }
.picker-champ img { width: 56px; height: 56px; border-radius: 6px; background: var(--line); }
.picker-champ:hover:not([disabled]), .picker-champ:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.picker-champ.current { border-color: var(--accent); }
.picker-champ[disabled] { opacity: .3; cursor: not-allowed; }
.picker-champ[hidden] { display: none; }
@media (max-width: 760px) {
  .comp-board { grid-template-columns: 1fr; }
  .comp-mid { justify-self: center; }
  .comp-slot { grid-template-columns: 4.6rem 1fr; }
}
