:root {
  --bg: #f5f6f8; --panel: #ffffff; --text: #1b1f27; --muted: #667085; --line: #dde1e8;
  --accent: #2459d6; --accent-bg: #e4ecfc; --pos: #0b7a3e; --neg: #b42318; --warn-bg: #fff4d6;
  --bar: #8fa8e8; --bar-dot: #1b3d99;
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c; --panel: #1c2027; --text: #e6e9ef; --muted: #98a2b3; --line: #2e343e;
    --accent: #7ea2ff; --accent-bg: #23314f; --pos: #4cc38a; --neg: #ff8a80; --warn-bg: #3b3317;
    --bar: #3f5aa8; --bar-dot: #b5c8ff;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.35; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hint { color: var(--muted); font-weight: normal; font-size: 12px; }

.controls { background: var(--panel); border-bottom: 1px solid var(--line); padding: 10px 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-start; margin-bottom: 8px; }
.row:last-child { margin-bottom: 0; }
.field { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 12px; }
.field select { min-width: 190px; font-weight: normal; font-size: 14px; }
.field input[type=text] { font-weight: normal; font-size: 14px; width: 210px; }
.ta { position: relative; }
.suggest { position: absolute; top: 52px; left: 0; z-index: 20; margin: 0; padding: 2px; list-style: none; width: 100%; background: var(--panel);
  border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); font-weight: normal; font-size: 14px; }
.suggest li { padding: 5px 8px; border-radius: 4px; cursor: pointer; }
.suggest li.hi, .suggest li:hover { background: var(--accent-bg); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; min-height: 26px; }
.chip { display: inline-flex; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--bg); font-weight: normal; font-size: 13px; }
.chip-main { padding: 2px 8px; background: none; border: 0; }
.chip-main em { font-style: normal; color: var(--muted); font-size: 11px; margin-left: 2px; }
.chip-x { border: 0; background: none; padding: 2px 8px 2px 4px; color: var(--muted); }
.chip-x:hover { color: var(--neg); }
.chip.ban { background: var(--accent-bg); border-color: var(--accent); }
.chip.nban { background: var(--warn-bg); }

fieldset.seg { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
fieldset.seg legend { font-weight: 600; font-size: 12px; padding: 0; margin-bottom: 3px; float: left; width: 100%; }
fieldset.seg label { display: inline-block; }
fieldset.seg input { position: absolute; opacity: 0; pointer-events: none; }
fieldset.seg span { display: inline-block; padding: 5px 10px; border: 1px solid var(--line); margin-left: -1px; cursor: pointer; background: var(--panel); }
fieldset.seg label:first-of-type span { border-radius: 5px 0 0 5px; margin-left: 0; }
fieldset.seg label:last-of-type span { border-radius: 0 5px 5px 0; }
fieldset.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { fieldset.seg input:checked + span { color: #0b1020; } }
fieldset.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; padding-top: 18px; }
.toolbar .check { padding-top: 0; }
.btn { padding: 5px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; margin-top: 17px; }
.btn:hover { background: var(--accent-bg); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 14px; padding: 14px; align-items: start; }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.main, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.side { display: flex; flex-direction: column; gap: 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.summary { font-size: 15px; margin-bottom: 6px; }
.widen { background: var(--warn-bg); border-radius: 6px; padding: 6px 8px; margin-bottom: 8px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.widen-btn { border: 1px solid var(--line); border-radius: 5px; background: var(--panel); padding: 2px 8px; }
.widen-btn:hover { border-color: var(--accent); }
.warn { background: var(--warn-bg); padding: 8px; border-radius: 6px; }

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--panel); }
th button { background: none; border: 0; padding: 0; font-weight: 600; color: inherit; }
th.sorted button { color: var(--text); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num button { text-align: right; }
.strong { font-weight: 700; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
tr.thin td { color: var(--muted); }
tr.thin .rb { opacity: .5; }
.tag { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; color: var(--muted); }
.link { background: none; border: 0; padding: 0; color: inherit; font-weight: 600; text-decoration: underline dotted; text-underline-offset: 3px; }
tr.thin .link { font-weight: 500; }
.link:hover { color: var(--accent); }
.cls { font-size: 12px; color: var(--muted); }
.empty { padding: 16px 6px; }
td.range { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
th.range { }
table.pick td.range { display: table-cell; }
.rb { position: relative; display: inline-block; width: 90px; height: 10px; background: var(--bg); border-radius: 5px; vertical-align: middle; }
.rb-mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--muted); opacity: .6; }
.rb-span { position: absolute; top: 3px; height: 4px; background: var(--bar); border-radius: 2px; }
.rb-dot { position: absolute; top: 1px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--bar-dot); }
.rb-txt { font-size: 11px; color: var(--muted); margin-left: 6px; display: inline-block; min-width: 42px; }
@media (max-width: 700px) { .hide-narrow { display: none; } .rb-txt { display: none; } .rb { width: 60px; } .field input[type=text], .field select { width: 100%; } .field { flex: 1 1 160px; } }

.panel h2 { font-size: 15px; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.panel h2 .muted { font-size: 12px; font-weight: normal; }
.panel h3 { font-size: 13px; margin: 12px 0 3px; }
.panel p { margin: 4px 0; }
table.mini { font-size: 13px; }
table.mini th, table.mini td { padding: 3px 5px; }
.x { margin-left: auto; font-size: 12px; background: none; border: 1px solid var(--line); border-radius: 4px; padding: 1px 8px; }
footer { padding: 4px 14px 24px; color: var(--muted); font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
code { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }

.tabs { display: flex; gap: 4px; padding: 10px 14px 0; }
.tab { padding: 6px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .tab.on { color: #0b1020; } }
[hidden] { display: none !important; }
.modelpanel { border: 1px solid var(--accent); border-radius: 8px; padding: 8px 10px; margin-bottom: 14px; }
.modelpanel h2, h2.sect { font-size: 15px; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
h2.sect { margin-top: 4px; }
.modelpanel h3 { font-size: 13px; margin: 14px 0 3px; }
.modelpanel h2 .muted { font-size: 12px; font-weight: normal; }
.msort { font-size: 12px; font-weight: normal; display: inline-flex; gap: 10px; }
.msort label { display: inline-flex; align-items: center; gap: 4px; }
.note { background: var(--warn-bg); border-radius: 6px; padding: 6px 8px; margin: 4px 0 6px; font-size: 13px; }
.modelpanel td.why { white-space: normal; font-size: 12px; min-width: 200px; }
.why-i { display: inline-block; margin-right: 10px; white-space: nowrap; }
.why-i .muted { margin-right: 3px; }
.matchups { margin: 14px; }
.mu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px 18px; }
.mu-grid h3 { font-size: 13px; margin: 10px 0 3px; }

.pickline { margin: 4px 0 6px; font-size: 13px; }
.modelpanel td.ans { white-space: normal; font-size: 12px; min-width: 150px; }
.tablewrap.calc { opacity: .7; }

/* observed records (version 3 page) */
.obs-strip { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; margin: 6px 0 8px; font-size: 13px; background: var(--bg); }
.obs-line { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 3px 14px; }
.obs-item { white-space: nowrap; }
.recbar { margin: 4px 0; }
td.exp-c { width: 24px; padding: 2px 3px; }
button.exp { width: 20px; height: 20px; line-height: 1; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }
button.exp:hover { border-color: var(--accent); }
tr.open > td { border-bottom-color: transparent; }
tr.detail > td { background: var(--bg); white-space: normal; padding: 4px 8px 8px; }
table.recs { width: auto; }
table.recs th { white-space: normal; max-width: 160px; }
td.rec { font-size: 12px; }
td.dim, td.dim * { color: var(--muted) !important; opacity: .75; }

/* ban suggestions */
.bansview { margin: 14px; }
header.controls.bans-view .pickfield { display: none; }
.ban-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(560px, 1fr)); gap: 6px 18px; align-items: start; }
@media (max-width: 700px) { .ban-cols { grid-template-columns: minmax(0, 1fr); } }
.ban-col { min-width: 0; }
.ban-col h3 { font-size: 14px; margin: 10px 0 3px; }
.ban-set { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; margin: 6px 0; background: var(--bg); font-size: 13px; }
.ban-set .btn-ban { margin-right: 4px; }
.btn-ban { background: var(--accent-bg); border: 1px solid var(--accent); border-radius: 12px; padding: 1px 9px; font-weight: 600; }
.btn-ban:hover { background: var(--accent); color: #fff; }
.btn-ban:disabled { opacity: .5; cursor: default; }
table.bantab td.why { white-space: normal; font-size: 12px; min-width: 170px; }
table.bantab td.name .link { font-weight: 600; }
.ban-progress { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 6px 0; }
.ban-progress progress { width: 220px; height: 10px; }
.ban-cap { font-size: 13px; margin: 8px 0; }

/* Fast bans view */
.fastview .row { margin-top: 8px; }
.fast-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .fast-grid { grid-template-columns: minmax(0, 1fr); } }
.fastview h3 { font-size: 13px; margin: 8px 0 3px; }
.fastview td.why, .tune-opt .why { white-space: normal; font-size: 12px; color: var(--muted); }
.fastview td.why { min-width: 220px; }
.fastview tr.top3 td { background: var(--accent-bg); }
.tune-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 8px; }
.tune-head .btn, .tune-foot .btn { margin-top: 0; }
.tune-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.tune-opt { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: block; }
.tune-opt:hover { border-color: var(--accent); background: var(--accent-bg); }
.opt-title { font-weight: 700; margin-bottom: 3px; }
.tune-foot { display: flex; gap: 8px; margin-top: 10px; }

/* Draft board (default view). Always dark, same variable names as the page. */
.boardview { --bg: #14171c; --panel: #1c2027; --text: #e6e9ef; --muted: #98a2b3; --line: #2e343e; --accent: #7ea2ff; --accent-bg: #23314f;
  --blue: #3d8bff; --red: #ff5a52; --ban: #ffb02e; --pos: #4cc38a; --neg: #ff8a80; --warn-bg: #3b3317;
  margin: 10px 14px 14px; background: #101318; color: var(--text); }
.boardview fieldset.seg input:checked + span { color: #0b1020; }
.bd-top { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: flex-end; }
.bd-mapf label { font-weight: 600; font-size: 12px; }
.bd-mapbox { display: flex; gap: 4px; }
.bd-mapbox input { width: 150px; }
.bd-mapbox select { width: 170px; }
.bd-btns { display: flex; gap: 6px; }
.bd-btns .btn { margin-top: 0; }
.bd-btns .btn:disabled { opacity: .4; cursor: default; }
.bd-status { margin: 8px 0; padding: 6px 10px; border-radius: 6px; background: var(--panel); border-left: 4px solid var(--line); font-weight: 600; }
.bd-status.me { border-left-color: var(--blue); } .bd-status.enemy { border-left-color: var(--red); }
.bd-body { display: grid; grid-template-columns: 184px minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
@media (max-width: 1000px) { .bd-body { grid-template-columns: minmax(0, 1fr); } }
.bd-left h3, .bd-advice h3 { margin: 0 0 4px; font-size: 13px; }
.bd-left h3 small { font-weight: normal; color: var(--muted); margin-left: 4px; }
.team { padding: 6px; border-radius: 8px; margin-bottom: 8px; border: 1px solid var(--line); }
.team.me { background: rgba(61, 139, 255, .12); border-color: rgba(61, 139, 255, .45); }
.team.enemy { background: rgba(255, 90, 82, .12); border-color: rgba(255, 90, 82, .45); }
.slot { display: flex; align-items: center; gap: 8px; width: 100%; height: 62px; margin: 4px 0; padding: 2px 8px 2px 4px; border: 1px dashed var(--line); border-radius: 6px; background: rgba(0, 0, 0, .25); text-align: left; }
.slot.filled { border-style: solid; }
.slot.me.filled { border-color: var(--blue); } .slot.enemy.filled { border-color: var(--red); }
button.slot:hover { background: rgba(255, 255, 255, .08); }
.slot.turn { box-shadow: 0 0 0 2px var(--accent); }
.slot .num { width: 20px; text-align: center; font-size: 20px; font-weight: 800; color: var(--muted); }
.slot.me .num { color: var(--blue); } .slot.enemy .num { color: var(--red); }
.slot img { border-radius: 5px; flex: none; }
.slot .sn { font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .empty { font-size: 11px; color: var(--muted); }
.bans { padding: 6px; border: 1px solid var(--line); border-radius: 8px; }
.brow { display: flex; gap: 6px; margin: 4px 0; }
.bslot { position: relative; width: 52px; height: 46px; border-radius: 6px; border: 2px solid; padding: 0; background: rgba(0, 0, 0, .25); overflow: hidden; }
.bslot.me { border-color: var(--blue); } .bslot.enemy { border-color: var(--red); }
.bslot.empty { border-style: dashed; opacity: .6; } .bslot.empty.turn { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.bslot img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.6); }
.bslot .x { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; color: #fff; text-shadow: 0 0 4px #000; }

.bd-searchrow { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bd-searchrow input { flex: 1; max-width: 420px; }
.bd-grid { display: flex; gap: 18px; align-items: flex-start; overflow-x: auto; overflow-y: hidden; padding: 4px 4px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.bd-grp { flex: none; }
.bd-grp-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 4px 2px; white-space: nowrap; }
.bd-grp-f { display: grid; grid-auto-flow: column; grid-template-rows: repeat(8, auto); gap: 4px; }
.face { position: relative; width: 60px; height: 51px; padding: 0; border: 2px solid #2a303a; border-radius: 6px; background: #0b0d11; overflow: visible; }
.face img { display: block; width: 100%; height: 100%; border-radius: 4px; object-fit: cover; }
.face:hover:not(:disabled) { border-color: #fff; }
.face .nm { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; line-height: 12px; background: rgba(0, 0, 0, .65); color: #fff; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 0 0 4px 4px; }
.face.taken { cursor: default; } .face.taken img { filter: grayscale(1) brightness(.5); opacity: .6; }
.face.nomatch { opacity: .2; } .face.hit { border-color: var(--accent); }
.face .m { position: absolute; top: -4px; right: -4px; font-style: normal; font-size: 10px; font-weight: 800; min-width: 16px; padding: 0 3px; text-align: center; border-radius: 8px; color: #fff; line-height: 15px; z-index: 2; }
.face .m.me { background: var(--blue); } .face .m.enemy { background: var(--red); }
.face .m.ban { top: 14px; right: auto; left: 50%; transform: translateX(-50%); font-size: 9px; border-radius: 3px; background: rgba(0, 0, 0, .8); border: 1px solid var(--red); } 
.face .m.ban.me { border-color: var(--blue); } .face .m.ban + .m.ban { top: 28px; }
.face .rk { position: absolute; top: -6px; left: -6px; z-index: 3; min-width: 17px; line-height: 17px; font-size: 11px; font-weight: 800; border-radius: 9px; text-align: center; background: var(--ban); color: #111; }
.face .rk:empty { display: none; }
.face.rec-me { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); } .face.rec-me .rk { background: var(--blue); color: #fff; }
.face.rec-en { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); } .face.rec-en .rk { background: var(--red); color: #fff; }
.face.rec-ban { border-color: var(--ban); box-shadow: 0 0 0 2px var(--ban); }
.face.r1 { box-shadow: 0 0 0 3px currentColor, 0 0 10px 2px currentColor; }
.face.r1.rec-me { color: var(--blue); } .face.r1.rec-en { color: var(--red); } .face.r1.rec-ban { color: var(--ban); }
.bd-advice { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.bd-advice p { margin: 4px 0; }
.advl { list-style: none; margin: 6px 0; padding: 0; }
.advrow { display: flex; gap: 6px; align-items: flex-start; width: 100%; text-align: left; padding: 4px; margin: 0 0 3px; border: 1px solid var(--line); border-radius: 6px; background: transparent; }
.advrow:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-bg); }
.advrow:disabled { opacity: .45; cursor: default; }
.advrow img { flex: none; border-radius: 4px; }
.ar { flex: none; width: 18px; font-weight: 800; color: var(--ban); text-align: center; line-height: 28px; }
.advl.pick.me .ar { color: var(--blue); } .advl.pick.enemy .ar { color: var(--red); }
.ab { min-width: 0; }
.av { display: block; font-size: 11px; color: var(--muted); }
.aw { display: block; font-size: 11px; color: var(--muted); max-height: 2.6em; overflow: hidden; }
.advrow:hover .aw, .advrow:focus-visible .aw { max-height: none; }

/* ---- step-by-step draft */
.dr-setup { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: flex-end; }
.dr-setup .btn { margin-top: 0; }
.dr-nav { display: flex; align-items: center; gap: 10px; margin: 12px 0 8px; }
.dr-arrow { margin-top: 0; font-weight: 700; padding: 8px 14px; min-width: 92px; }
.dr-arrow:disabled { opacity: .35; cursor: default; }
.dr-stepbox { flex: 1; text-align: center; min-width: 0; }
.dr-step { font-size: 18px; font-weight: 800; }
.dr-step.ban { color: #ff6b6b; } .dr-step.me { color: var(--blue); } .dr-step.enemy { color: var(--red); }
.dr-step.you { color: #5fe08a; text-shadow: 0 0 10px rgba(80, 220, 120, .6); }
.dr-hint { font-size: 12px; color: var(--muted); }
.dr-teams { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dr-team, .dr-bans { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dr-team h3, .dr-bans h3 { margin: 0 6px 0 0; font-size: 13px; }
.dr-team h3 small { font-weight: normal; color: var(--muted); }
.dr-team.me { border-left: 4px solid var(--blue); } .dr-team.enemy { border-left: 4px solid var(--red); }
.dr-bans img { border-radius: 4px; filter: grayscale(.6); }
.dr-slot { position: relative; display: flex; flex-direction: column; align-items: center; width: 54px; font-size: 10px; }
.dr-slot .num { position: absolute; top: -4px; left: -2px; font-size: 10px; font-weight: 800; background: #000a; border-radius: 6px; padding: 0 4px; z-index: 1; }
.dr-slot .ph { width: 44px; height: 37px; border: 2px dashed var(--line); border-radius: 5px; display: block; }
.dr-slot img { border-radius: 5px; }
.dr-slot.cur .ph { border-color: #fff; }
.dr-slot.you .sn { color: #5fe08a; font-weight: 700; }
.dr-why { min-height: 40px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; font-size: 13px; }
.dr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 7px; padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.dr-grid .face { width: 100%; height: auto; aspect-ratio: 128 / 108; }
.face.rec-ban { border-color: rgba(255, 40, 40, var(--sev)); box-shadow: 0 0 0 3px rgba(255, 40, 40, var(--sev)); }
.face.rec-ban::after, .face.rec-pick::after { content: ''; position: absolute; inset: 0; border-radius: 4px; pointer-events: none; }
.face.rec-ban::after { background: rgba(255, 0, 0, calc(var(--sev) * .4)); }
.face.rec-ban .rk { background: #e33; color: #fff; }
.face.rec-pick { border-color: rgba(60, 220, 110, var(--sev)); box-shadow: 0 0 0 3px rgba(60, 220, 110, var(--sev)); }
.face.rec-pick::after { background: rgba(0, 220, 90, calc(var(--sev) * .25)); }
.face.rec-pick .rk { background: #2b4; color: #fff; }
.face.sel { border-color: #fff; box-shadow: 0 0 0 3px #fff; }
.face.sel img { filter: brightness(.55); }
.dr-grid .face .m.ban { top: 35%; left: 50%; right: auto; transform: translateX(-50%); background: #c22; border: 0; }
.dr-tip { position: absolute; z-index: 50; background: #0b0d11; color: #e6e9ef; border: 1px solid #ff5a5a; border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 6px 20px #000a; pointer-events: none; }
.dr-tip.pick { border-color: #3c6; }
.dr-tip .muted, .dr-why .muted { color: var(--muted); }
@media (max-width: 600px) { .dr-arrow { min-width: 0; padding: 8px; } .dr-step { font-size: 15px; } }
.dr-task { margin: 14px 0 4px; padding: 12px 16px; border-radius: 10px; text-align: center; font-size: clamp(22px, 4vw, 38px); font-weight: 900; letter-spacing: .02em; background: var(--panel); border: 2px solid var(--line); }
.dr-task.ban { color: #ff6b6b; border-color: #ff6b6b; }
.dr-task.enemy { color: var(--red); border-color: var(--red); }
.dr-task.me { color: var(--blue); border-color: var(--blue); }
.dr-task.you { color: #5fe08a; border-color: #5fe08a; box-shadow: 0 0 18px rgba(80, 220, 120, .35); }
.dr-task.done { color: var(--text); }
/* class columns like the in-game ranked screen */
.dr-grid { display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; padding: 8px 8px 12px; }
.dr-grid .bd-grp-f { display: grid; grid-auto-flow: column; grid-template-rows: repeat(9, auto); gap: 6px; }
.dr-grid .face { width: 64px; height: 54px; aspect-ratio: auto; }

/* Player tab */
.playerview { margin: 14px; }
.playerview .toolbar input { width: 160px; }
.pl-go { margin-top: 0; }
.pl-status { min-height: 20px; margin: 4px 0 8px; }
.pl-head h2 { margin: 4px 0 2px; }
.pl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 12px 0 6px; }
.pl-tile { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--bg); }
.pl-tl { font-size: 12px; color: var(--muted); font-weight: 600; }
.pl-big { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; }
.pl-sub { font-size: 12px; color: var(--muted); }
h3.pl-h { margin: 18px 0 2px; font-size: 15px; }
.pl-face { vertical-align: middle; margin-right: 5px; }
.pl-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.pl-two h4 { margin: 6px 0 2px; font-size: 13px; }
/* bigger, clearer controls on the Draft tab */
body:has(#view-board:not([hidden])) footer { display: none; }
.tabs .tab { font-size: 16px; padding: 10px 18px; }
.dr-setup { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; gap: 14px 28px; }
.dr-setup legend, .dr-setup .bd-mapf label { font-size: 14px !important; margin-bottom: 6px !important; }
.boardview .dr-setup fieldset.seg span { padding: 10px 18px; font-size: 16px; font-weight: 700; min-width: 56px; text-align: center; }
.dr-setup input, .dr-setup select { font-size: 16px; padding: 9px 10px; min-height: 44px; }
.dr-new { font-size: 16px; padding: 10px 18px; min-height: 44px; }
.dr-arrow { font-size: 20px; padding: 14px 26px; min-width: 150px; min-height: 56px; border-radius: 10px; }
#dr-next:not(:disabled) { background: #2b8a4a; border-color: #3fbf68; color: #fff; }
#dr-next.ready { animation: drpulse 1.2s ease-in-out infinite; }
@keyframes drpulse { 50% { box-shadow: 0 0 0 6px rgba(63, 191, 104, .35); } }
.dr-step { font-size: 22px; } .dr-hint { font-size: 14px; }
.bd-searchrow input#bd-search { font-size: 17px; padding: 12px 14px; min-height: 48px; max-width: 520px; width: 100%; }
.dr-grid .face { width: 72px; height: 61px; }
.dr-grid .face .nm { font-size: 10px; }
.dr-grid .bd-grp-h { font-size: 13px; }
.dr-why { font-size: 15px; }
@media (max-width: 600px) { .dr-arrow { min-width: 0; font-size: 16px; padding: 12px 14px; } }
/* Order tab */
.orderview { margin: 14px; }
.or-intro { max-width: 900px; }
.or-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 14px; align-items: start; }
.or-card { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px 12px; background: var(--bg); min-width: 0; }
.or-row { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 6px 0; }
.or-row label { font-size: 12px; font-weight: 600; color: var(--muted); }
.or-row .btn { margin-top: 0; }
.or-chk { display: inline-flex; gap: 4px; align-items: center; font-weight: 400 !important; }
.or-grid { width: 100%; }
.or-grid td { white-space: normal; vertical-align: top; }
.or-grid th[scope=row] { font-size: 12px; white-space: nowrap; text-align: left; padding-right: 8px; }
.or-in { width: 92px; margin: 2px 3px 2px 0; }
.or-in.bad { outline: 2px solid var(--neg, #c33); }
.or-res { margin-top: 8px; }
tr.or-grp td { border-top: 2px solid var(--line); }
@media (max-width: 520px) { .or-cols { grid-template-columns: 1fr; } .or-in { width: 76px; } }
/* top-ten sidebar + huge rank numbers */
.dr-main { display: flex; gap: 12px; align-items: flex-start; }
.dr-main .dr-grid { flex: 1; min-width: 0; }
.dr-top { flex: none; width: 220px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; position: sticky; top: 8px; }
.dr-top h3 { margin: 2px 4px 8px; font-size: 18px; }
.dr-top ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.dr-toprow { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 8px; border-radius: 8px; border: 2px solid var(--line); background: #0b0d11; color: var(--text); cursor: pointer; text-align: left; }
.dr-toprow img { border-radius: 5px; }
.dr-toprow .tr { font-size: 28px; font-weight: 900; width: 34px; text-align: center; line-height: 1; }
.dr-toprow .tn { font-size: 15px; font-weight: 700; }
.dr-toprow.ban { border-color: rgba(255, 50, 50, var(--sev)); background: rgba(255, 0, 0, calc(var(--sev) * .25)); } .dr-toprow.ban .tr { color: #ff5a5a; }
.dr-toprow.pick { border-color: rgba(60, 220, 110, var(--sev)); background: rgba(0, 220, 90, calc(var(--sev) * .18)); } .dr-toprow.pick .tr { color: #5fe08a; }
.dr-toprow:hover:not(:disabled) { border-color: #fff; }
.dr-toprow.off { opacity: .35; text-decoration: line-through; cursor: default; }
.dr-grid .face .rk { top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 0; background: none !important; font-size: 40px; line-height: 1; font-weight: 900; color: #fff; -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 0 2px 6px #000; opacity: 1; pointer-events: none; }
.dr-grid .face.rec-ban .rk { color: #ff4d4d; } .dr-grid .face.rec-pick .rk { color: #6dff9c; }
@media (max-width: 900px) { .dr-main { flex-direction: column-reverse; } .dr-top { width: 100%; position: static; } .dr-top ol { flex-direction: row; flex-wrap: wrap; } .dr-top li { flex: 1 1 150px; } }
.dr-top { width: 250px; }
.dr-toprow .tb { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dr-toprow .tv { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 2px; }
.dr-toprow .tv img { border-radius: 3px; }
.dr-toprow.enemy { border-color: rgba(255, 150, 40, var(--sev)); } .dr-toprow.enemy .tr { color: #ffa94d; }
.dr-rep { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.dr-rep img { border-radius: 3px; vertical-align: middle; }
.dr-tip.enemy { border-color: #ffa94d; }
.face.taken { cursor: pointer; }
.face.taken:hover { border-color: #fff; }
.face.rec-en2 { border-color: rgba(255, 150, 40, var(--sev)); box-shadow: 0 0 0 3px rgba(255, 150, 40, var(--sev)); }
.dr-grid .face.rec-en2 .rk { color: #ffa94d; }
.dr-win { display: flex; align-items: center; gap: 18px; justify-content: center; }
.dr-win .wm, .dr-win .we { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.dr-win .wl { font-size: 15px; font-weight: 700; color: var(--muted); }
.dr-win .wp { font-size: clamp(36px, 7vw, 64px); font-weight: 900; }
.dr-win .wm .wp { color: var(--blue); } .dr-win .we .wp { color: var(--red); }
.dr-win .wbar { flex: 1; max-width: 420px; height: 18px; border-radius: 9px; background: var(--red); overflow: hidden; }
.dr-win .wbar i { display: block; height: 100%; background: var(--blue); }
.wsub { font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 6px; letter-spacing: 0; }

/* ban sides (2026-11-20): my team / enemy / global (tournament) bans */
.dr-gchk { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; min-height: 44px; padding: 0 12px; border: 1px dashed var(--muted); border-radius: 8px; cursor: pointer; }
.dr-gchk input { width: 20px; height: 20px; }
.dr-gchk.on { border-style: solid; border-color: #ccc; background: #ffffff14; }
.dr-task.g { color: #ddd; border-color: #aaa; border-style: dashed; }
.dr-bans .bg { display: inline-flex; gap: 3px; align-items: center; padding: 2px 5px; border-radius: 6px; }
.dr-bans .bg small { font-size: 10px; color: var(--muted); margin-right: 2px; }
.dr-bans .bg.me { border: 1px solid var(--blue); } .dr-bans .bg.enemy { border: 1px solid var(--red); } .dr-bans .bg.g { border: 1px dashed var(--muted); }
.dr-grid .face .m.ban.g { background: #666; }
.dr-grid .face .m.ban.me { background: #2a5bd7; }
.dr-res { margin-top: 10px; display: flex; gap: 8px; justify-content: center; }
.dr-res .btn { margin: 0; font-size: 15px; padding: 8px 16px; }
.dr-res .btn.on { background: #2b8a4a; border-color: #3fbf68; color: #fff; }
.dr-task .dr-res .btn { font-size: 15px; font-weight: 700; letter-spacing: 0; padding: 8px 16px; }
.dr-setup .dr-gchk { flex-direction: row; white-space: nowrap; }
.dr-setup .dr-gchk input { min-height: 0; padding: 0; width: 20px; height: 20px; margin: 0; }
/* rank selector on the draft board (2026-11-27) */
.dr-setup .dr-tierf select { min-width: 150px; }

/* ---- simplified step flow (2026-11-27): top row map / first pick / skill / global bans, step bar, auto-advance */
.dr-setup { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 22px; }
.dr-cell { display: flex; flex-direction: column; gap: 6px; padding: 6px 8px; border-radius: 10px; border: 2px solid transparent; transition: border-color .15s, box-shadow .15s; }
.dr-cell > label, .dr-cell > legend, .dr-cell .dr-lbl { font-size: 14px; font-weight: 700; }
.dr-cell.cur { border-color: #ffd34d; box-shadow: 0 0 0 4px rgba(255, 211, 77, .18); background: #ffd34d0d; }
.dr-cell.cur > label, .dr-cell.cur > legend { color: #ffd34d; }
fieldset.dr-cell { margin: 0; }
fieldset.dr-cell legend { float: left; width: 100%; margin-bottom: 6px; }
.dr-setup .dr-small > label, .dr-setup .dr-small .dr-lbl { font-size: 12px !important; color: var(--muted); font-weight: 600; margin: 0 !important; }
.dr-setup .dr-small select { font-size: 13px; min-height: 34px; padding: 5px 8px; min-width: 0; }
.dr-setup .dr-small .dr-gchk { font-size: 13px; min-height: 34px; padding: 0 10px; gap: 6px; font-weight: 600; }
.dr-setup .dr-small .dr-gchk input { width: 16px; height: 16px; }
.dr-setup .dr-new { margin-left: auto; align-self: center; }
.dr-combo { position: relative; }
.dr-combo input { width: 260px; }
.dr-maplist { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; width: 300px; max-height: min(60vh, 440px); overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: #0b0d11; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px #000c; }
.dr-maplist li { padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 15px; }
.dr-maplist li.grp { cursor: default; padding: 10px 10px 5px; margin-top: 6px; border-top: 1px solid #ffffff18; font-size: 16px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: var(--mc, var(--muted)); }
.dr-maplist li.grp:first-child { margin-top: 0; border-top: 0; }
.dr-maplist li.grp.pick { cursor: pointer; }
.dr-maplist li.grp small { margin-left: 8px; font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
.dr-maplist li.grp.chosen { color: var(--mc); text-decoration: underline; }
.dr-maplist li.m { margin-left: 6px; border-left: 3px solid var(--mc, transparent); border-radius: 0 6px 6px 0; }
.dr-maplist li.none { cursor: default; color: var(--muted); }
.dr-maplist li.act { background: var(--accent-bg); }
.dr-maplist li.chosen { font-weight: 700; color: #ffd34d; }
/* step bar */
.dr-nav { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; }
.dr-arrow { font-size: 16px; padding: 10px 16px; min-width: 0; min-height: 44px; border-radius: 10px; }
.dr-steps { display: flex; flex: 1; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.dr-steps li { flex: 1 0 auto; text-align: center; padding: 8px 10px; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--panel); border: 2px solid var(--line); border-radius: 8px; white-space: nowrap; }
.dr-steps li.done { color: var(--text); opacity: .6; }
.dr-steps li.done::before { content: '\2713  '; }
.dr-steps li.cur { color: #111; background: #ffd34d; border-color: #ffd34d; box-shadow: 0 0 12px rgba(255, 211, 77, .45); }
.dr-steps li.cur.me { background: #5fe08a; border-color: #5fe08a; box-shadow: 0 0 12px rgba(80, 220, 120, .5); }
.dr-steps li.cur.enemy { background: #ffa94d; border-color: #ffa94d; box-shadow: 0 0 12px rgba(255, 150, 40, .45); }
/* task banner */
.dr-task { margin: 10px 0 8px; }
.dr-task.setup { color: #ffd34d; border-color: #ffd34d; }
.dr-task .cnt { display: inline-block; margin-left: 10px; padding: 0 12px; border-radius: 999px; background: #ffffff14; font-size: .7em; vertical-align: middle; }
.dr-task .dr-inl { margin: 0 0 0 12px; font-size: 16px; padding: 8px 14px; vertical-align: middle; letter-spacing: 0; }
.dr-choice { display: inline-flex; gap: 12px; margin-left: 14px; vertical-align: middle; }
.dr-big { margin: 0; font-size: 20px; font-weight: 800; padding: 12px 26px; border-radius: 10px; letter-spacing: 0; }
.dr-big.me { background: var(--blue); border-color: var(--blue); color: #fff; }
.dr-big.enemy { background: var(--red); border-color: var(--red); color: #fff; }
.dr-link { background: none; border: 0; padding: 4px; margin-top: 4px; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--muted); text-decoration: underline; }
.dr-link:hover { color: var(--text); }
.flash { animation: drflash .5s ease-in-out 2; }
@keyframes drflash { 50% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(255, 211, 77, .35); } }
/* bans row with 6 slots */
.dr-bans .bslot { display: inline-block; width: 34px; height: 29px; }
.dr-bans .bslot.ph { border: 2px dashed var(--line); border-radius: 4px; }
.dr-bans .bslot.cur { border-color: #ffd34d; }
.dr-bans.cur { border-color: #ffd34d; box-shadow: 0 0 0 3px rgba(255, 211, 77, .2); }
.dr-slot.cur .ph { border-color: #ffd34d; border-style: solid; box-shadow: 0 0 8px rgba(255, 211, 77, .5); }
.dr-grid.idle .face { opacity: .45; }
/* tooltip */
.dr-tip { border-color: var(--line); }
.dr-tip .tp-h { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 14px; }
.dr-tip .tp-h img { border-radius: 4px; }
.dr-tip .tp-rank { font-weight: 800; font-size: 13px; margin-bottom: 4px; }
.dr-tip .tp-rank.top.ban { color: #ff6b6b; } .dr-tip .tp-rank.top.pick { color: #5fe08a; } .dr-tip .tp-rank.top.enemy { color: #ffa94d; }
.dr-tip .tp-note { color: #ffd34d; margin-bottom: 4px; }
.dr-tip .tp-st { font-weight: 700; }
.dr-tip .tp-why { margin: 3px 0; }
.dr-tip .tp-parts { list-style: none; margin: 6px 0 0; padding: 0; }
.dr-tip .tp-parts li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; border-top: 1px solid #ffffff10; }
.dr-tip .tp-parts li span { display: inline-flex; align-items: center; gap: 4px; }
.dr-tip .tp-parts img { border-radius: 3px; }
.dr-tip .tp-parts .pos { color: #5fe08a; } .dr-tip .tp-parts .neg { color: #ff8a80; }
.dr-tip .tp-unit { font-size: 10px; color: var(--muted); text-align: right; }
@media (max-width: 700px) { .dr-combo input { width: 100%; } .dr-maplist { width: 100%; } .dr-setup .dr-new { margin-left: 0; } .dr-choice { display: flex; justify-content: center; margin: 10px 0 0; } }
fieldset.dr-cell.seg { flex-direction: row; flex-wrap: wrap; gap: 0; }
fieldset.dr-cell.seg label:first-of-type span { border-radius: 8px 0 0 8px; }
fieldset.dr-cell.seg label:last-of-type span { border-radius: 0 8px 8px 0; }
fieldset.dr-cell.seg input:disabled + span { opacity: .55; cursor: default; }
fieldset.dr-cell.seg { border: 2px solid transparent; padding: 6px 8px; }
fieldset.dr-cell.seg.cur { border-color: #ffd34d; }

/* ---- 2026-11-28: hard edges, Next button, skill info tip ---- */
*, *::before, *::after { border-radius: 0 !important; }
.btn, input, select, .dr-tip, .suggest, .dr-maplist { box-shadow: none; }
.dr-tip { box-shadow: 4px 4px 0 #000; }
.dr-next { margin-left: 14px; padding: 8px 26px; font-size: 18px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; border: 2px solid currentColor; }
.dr-tierf { position: relative; }
.dr-info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 4px; border: 1px solid var(--muted);
  color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1; cursor: help; vertical-align: middle; position: relative; }
.dr-info:hover, .dr-info:focus { color: var(--fg, #fff); border-color: currentColor; outline: none; }
.dr-info::after { content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: 240px; z-index: 60;
  background: #0b0d11; color: #e6e9ef; border: 1px solid var(--line); box-shadow: 4px 4px 0 #000; padding: 8px 10px; font-size: 12px; font-weight: normal;
  text-transform: none; letter-spacing: 0; line-height: 1.35; text-align: left; white-space: normal; visibility: hidden; opacity: 0; pointer-events: none; }
.dr-info:hover::after, .dr-info:focus::after { visibility: visible; opacity: 1; }
