:root {
  --bg: #0e1117; --panel: #161b24; --panel2: #1d2430; --line: #2a3342;
  --text: #e6e9ef; --muted: #8b95a7; --ally: #3b82f6; --enemy: #ef4444;
  --good: #22c55e; --bad: #f87171;
  --brand: #8B5CF6; --brand-strong: #5B3BC4; --brand-soft: #A78BFA; --brand-bg: rgba(139,92,246,.16);
  --t0: #ff5a5a; --t1: #ff9f43; --t2: #f6d365; --t3: #7dd3a8; --t4: #7aa7e6; --t5: #8b95a7;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 "Pretendard", "Malgun Gothic", system-ui, sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; }
.muted { color: var(--muted); }
.pad { padding: 24px; }

.top { display: flex; align-items: center; gap: 20px; padding: 10px 20px;
  background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-size: 17px; display: flex; align-items: center; text-decoration: none; color: inherit; }
.brand img { height: 30px; width: auto; display: block; }
.brand b { color: var(--brand-soft); }
.tabs { display: flex; gap: 4px; }
.tabs button { background: none; border: 0; padding: 7px 12px; border-radius: 6px; color: var(--muted); }
.tabs button.on { background: var(--brand-bg); color: #fff; }
.meta { margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; }
#banner .warn { background: #3b2a0b; color: #f7d58b; padding: 8px 20px; font-size: 13px;
  border-bottom: 1px solid #5a4214; }
main { max-width: 1280px; margin: 0 auto; padding: 18px 20px 60px; }

/* 챔피언 아이콘 */
.ci { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 8px; background: #2b3444; overflow: hidden; flex: none; font-weight: 700; color: #cbd5e1; }
.ci img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ci.lg { width: 64px; height: 64px; border-radius: 10px; font-size: 22px; }
.ci.sm { width: 28px; height: 28px; border-radius: 6px; font-size: 12px; }

/* 드래프트 보드 */
.board { display: grid; grid-template-columns: 1fr 300px 1fr; gap: 14px; align-items: stretch; }
.team { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.team h3 { margin: 0 0 10px; font-size: 14px; }
.team.ally h3 { color: var(--ally); } .team.enemy h3 { color: var(--enemy); }
.slot { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; margin-bottom: 8px;
  background: var(--panel2); border: 1px dashed var(--line); border-radius: 10px; text-align: left; }
.slot.filled { border-style: solid; }
.slot.target { outline: 2px solid var(--brand); outline-offset: 1px; }
.slot .lbl { font-size: 12px; color: var(--muted); }
.slot .nm { font-size: 16px; font-weight: 600; }
.slot .x { margin-left: auto; color: var(--muted); padding: 2px 8px; border-radius: 6px; }
.slot .x:hover { background: #333c4d; color: var(--text); }
.slot .tgt { margin-left: auto; font-size: 12px; color: var(--brand-soft); }

.pred { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.pred .row { display: flex; justify-content: space-between; align-items: baseline; }
.pred .big { font-size: 26px; font-weight: 700; }
.bar { height: 8px; background: var(--enemy); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ally); }
.pred .note { font-size: 12px; color: var(--muted); }

.bans { display: flex; align-items: center; gap: 6px; margin: 14px 0; flex-wrap: wrap; }
.bans .lbl { color: var(--muted); margin-right: 6px; }
.banslot { width: 36px; height: 36px; border-radius: 8px; border: 1px dashed var(--line);
  background: var(--panel); display: grid; place-items: center; padding: 0; color: var(--muted); }
.banslot .ci { width: 34px; height: 34px; filter: grayscale(1) brightness(.7); }
.banslot.f { border-style: solid; }

.controls { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.controls label { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.controls input[type=range] { width: 160px; }
.controls input[type=number] { width: 70px; background: var(--panel2); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
.seg { display: inline-flex; background: var(--panel2); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 6px; color: var(--muted); }
.seg button.on { background: var(--brand-bg); color: #fff; }

.cols { display: grid; grid-template-columns: 1fr 340px; gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.card h4 { margin: 0 0 10px; font-size: 14px; }

.rec { display: grid; grid-template-columns: 26px 64px 1fr 120px; gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line); }
.rec:first-of-type { border-top: 0; }
.rec .rank { color: var(--muted); font-weight: 700; text-align: center; }
.rec .name { font-size: 16px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.rec .line { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.rec .score { text-align: right; }
.rec .score b { font-size: 20px; }
.rec .pick { margin-top: 4px; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel2); font-size: 12px; }
.rec .pick:hover { border-color: var(--brand); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel2); color: var(--muted); }
.chip.pos { color: var(--good); } .chip.neg { color: var(--bad); }
.raw { font-size: 12px; color: var(--muted); margin-top: 4px; }
.raw b { color: var(--text); font-weight: 600; }

.tier { display: inline-block; min-width: 30px; text-align: center; font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: 5px; color: #111; }
.t0 { background: var(--t0); } .t1 { background: var(--t1); } .t2 { background: var(--t2); }
.t3 { background: var(--t3); } .t4 { background: var(--t4); } .t5 { background: var(--t5); }
.tn { background: #3a4252; color: var(--muted); }

.threat { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.threat:first-of-type { border-top: 0; }
.threat .info { flex: 1; font-size: 12.5px; }
.threat .info div:first-child { font-size: 14px; font-weight: 600; }
.threat button { border: 1px solid var(--line); background: var(--panel2); border-radius: 6px; padding: 3px 9px; font-size: 12px; }
.threat button:hover { border-color: var(--enemy); }
.pos { color: var(--good); } .neg { color: var(--bad); }

/* 표 */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12.5px; cursor: pointer; user-select: none; }
th.on { color: var(--brand-soft); }
td.l, th.l { text-align: left; }
tbody tr:hover { background: var(--panel2); cursor: pointer; }
.cname { display: flex; gap: 8px; align-items: center; }

.detail-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.detail-head h2 { margin: 0; }
.stats { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); }
.stats b { color: var(--text); font-size: 16px; display: block; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
select { background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font: inherit; }

/* 모달 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 10; }
.modal.hidden { display: none; }
.picker { width: min(760px, 94vw); max-height: 86vh; overflow: auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.picker .head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.picker input { flex: 1; background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font: inherit; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
@media (max-width: 960px) {
  .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .pitem { padding: 6px 2px; font-size: 11px; min-width: 0; }
  .pitem > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .picker { padding: 10px; }
}
.pitem { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px;
  border: 1px solid transparent; border-radius: 10px; background: var(--panel2); font-size: 12px; }
.pitem:hover { border-color: var(--brand); }
.pitem[disabled] { opacity: .3; cursor: not-allowed; }
.pitem .sub { color: var(--muted); font-size: 11px; }

.about { max-width: 860px; }
.about h3 { margin-top: 26px; }
.about code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; }
.about li { margin: 4px 0; }

/* 4열 밴픽 보드 */
.topline { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 4px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
.topline .big { font-size: 28px; font-weight: 800; }
.topline .gd { justify-self: end; font-weight: 700; }
.topline .bar { grid-column: 1 / -1; }
.topline .note { grid-column: 1 / -1; font-size: 11px; color: var(--muted); min-height: 0; }
.topline .note:empty { display: none; }
.dgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.dcol { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; min-width: 0; }
.dcol.ally { border-top: 3px solid var(--ally); } .dcol.enemy { border-top: 3px solid var(--enemy); }
.dhead { font-size: 12px; font-weight: 700; text-align: center; margin-bottom: 6px; white-space: nowrap; }
.dcol.ally .dhead { color: var(--ally); } .dcol.enemy .dhead { color: var(--enemy); }
.cslot { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 8px 2px;
  background: var(--panel2); border: 1px dashed var(--line); border-radius: 8px; position: relative; font-size: 12px; }
.cslot.filled { border-style: solid; }
.cslot .ci { width: 44px; height: 44px; }
.cslot .x { position: absolute; top: 2px; right: 2px; background: none; border: 0; color: var(--muted); padding: 2px 5px; }
.cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.clist { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.citem { display: flex; align-items: center; gap: 5px; padding: 4px; background: none; border: 1px solid transparent;
  border-radius: 7px; font-size: 12px; text-align: left; min-width: 0; }
.citem:hover, .citem:active { background: var(--panel2); border-color: var(--line); }
.citem .cn { flex: 1; min-width: 0; }
.citem b { font-size: 12px; }

@media (max-width: 960px) {
  .wide-only { display: none; }
  main { padding: 10px 8px 40px; }
  .top { padding: 8px 10px; gap: 8px; } .top .meta { display: none; }
  .tabs button { padding: 6px 8px; font-size: 13px; }
  .citem .ci.sm { display: none; }
  .bans { gap: 4px; } .banslot { width: 30px; height: 30px; } .banslot .ci { width: 28px; height: 28px; }
  .board, .cols, .grid3 { grid-template-columns: 1fr; }
  .rec { grid-template-columns: 22px 48px 1fr; }
  .rec .score { grid-column: 2 / -1; text-align: left; }
}

/* 티어 구간 선택 */
.bucketbar { display: flex; gap: 4px; }
.bucketbar button { border: 1px solid var(--line, #333); background: transparent; color: inherit; padding: 4px 10px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.bucketbar button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.bucketbar button:disabled { opacity: .35; cursor: default; }
@media (max-width: 960px) { .brand img { height: 24px; } .bucketbar { width: 100%; } .bucketbar button { flex: 1; padding: 6px 4px; } }

.btable { border-collapse: collapse; width: 100%; font-size: 13px; }
.btable th, .btable td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.btable .l { text-align: left; }
.btable tr.on td { background: var(--panel2); font-weight: 600; }

/* ===== 2026-12-05: 추천 원딜 | 추천 서폿 2열 + 박스 안 추천·상성 2열x3행 ===== */
.board-note { font-size: 12px; margin: 8px 0 12px; }
.duo-recs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.drec { border-top: 3px solid var(--brand); }
.drec-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.drec-head h4 { margin: 0; font-size: 16px; color: var(--brand-soft); }
.drec-head .muted { font-size: 12px; }
.drow { padding: 12px 0; border-top: 1px solid var(--line); }
.drec-head + .drow { border-top: 0; }
.dtop { display: grid; grid-template-columns: 24px auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.drow .drank { font-weight: 800; color: var(--muted); text-align: center; font-size: 13px; }
.drow.big .drank { width: 24px; height: 24px; line-height: 24px; border-radius: 7px; background: var(--brand-bg); color: var(--brand-soft); }
.ci.md { width: 48px; height: 48px; border-radius: 9px; font-size: 18px; }
.dmain { min-width: 0; }
.dname { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; min-width: 0; }
.drow.big .dname { font-size: 16px; }
.dsub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.dsub b { font-weight: 700; }
.dbar { height: 5px; background: var(--panel2); border-radius: 99px; overflow: hidden; margin-top: 6px; max-width: 260px; }
.dbar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.drow:not(.big) .dbar { height: 3px; margin-top: 4px; }
.dval { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.dval b { font-size: 15px; font-weight: 700; }
.drow.big .dval b { font-size: 22px; font-weight: 800; line-height: 1.1; }
.dval small { font-size: 11px; color: var(--muted); }
.dbtns { display: flex; gap: 4px; margin-top: 4px; }
.dbtns .pick { padding: 4px 12px; border-radius: 6px; border: 1px solid var(--brand); background: var(--brand-bg); color: #fff; font-size: 12px; font-weight: 600; }
.dbtns .pick:hover { background: var(--brand); }
/* 박스 안 미니 표: 2열 x 3행 */
.dpair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0 36px; }
.dpcol { display: flex; flex-direction: column; gap: 3px; background: var(--panel2); border-radius: 8px; padding: 6px; min-width: 0; }
.dph { font-size: 11px; font-weight: 700; padding: 0 2px 2px; }
.dpcol.good .dph { color: var(--ally); } .dpcol.bad .dph { color: var(--enemy); }
.dpc { display: flex; align-items: center; gap: 6px; padding: 3px 4px; background: none; border: 1px solid transparent; border-radius: 6px;
  text-align: left; min-width: 0; font-size: 12px; }
.dpc:hover { border-color: var(--line); background: var(--panel); }
.dpc .cn { flex: 1; min-width: 0; }
.dpv { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; flex: none; }
.dpv b { font-size: 13px; }
.dpv small { font-size: 10px; color: var(--muted); }
.dpc-empty { font-size: 12px; padding: 4px; }
.drow:not(.big) .dpair { margin-top: 8px; }
.drec-more { display: none; }
.drec.open .drec-more { display: block; }
.drec-toggle { display: block; width: 100%; margin-top: 8px; padding: 7px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--brand-soft); font-size: 13px; font-weight: 600; }
.drec-toggle:hover { border-color: var(--brand); background: var(--brand-bg); }

/* 라인전 바 + 오른쪽 밴 10칸 */
.topline { display: flex; gap: 20px; align-items: center; }
.tl-main { flex: 1; min-width: 0; display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 4px 12px; }
.tl-main .big { font-size: 28px; font-weight: 800; }
.tl-main .gd { justify-self: end; font-weight: 700; }
.tl-main .bar { grid-column: 1 / -1; }
.tl-main .note { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.tl-main .note:empty { display: none; }
.tl-bans { flex: none; display: flex; flex-direction: column; gap: 6px; padding-left: 20px; border-left: 1px solid var(--line); }
.tl-banhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.tl-reset { border: 1px solid var(--line); background: var(--panel2); border-radius: 6px; padding: 2px 8px; font-size: 12px; color: var(--muted); }
.tl-reset:hover { border-color: var(--enemy); color: var(--bad); }
.bangrid { display: grid; grid-template-columns: repeat(5, 36px); gap: 6px; }

@media (max-width: 960px) {
  .duo-recs { grid-template-columns: 1fr; gap: 10px; margin-top: 4px; }
  .dtop { gap: 8px; grid-template-columns: 20px auto minmax(0, 1fr) auto; }
  .drow.big .dval b { font-size: 19px; }
  .ci.md { width: 42px; height: 42px; }
  .dbar { max-width: none; }
  .dpair { margin-left: 0; gap: 6px; }
  .dpc .ci.sm { width: 24px; height: 24px; }
  .topline { flex-direction: column; align-items: stretch; gap: 10px; }
  .tl-main { width: 100%; }
  .tl-bans { padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .bangrid { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
  .bangrid .banslot { width: 100%; height: auto; aspect-ratio: 1; }
  .bangrid .banslot .ci { width: 90%; height: 90%; }
}
@media (max-width: 380px) { .dpc .cn { display: none; } .dpc { justify-content: space-between; } }

/* ===== 2026-12-05: PC(961px 이상) 여백 ===== */
@media (min-width: 961px) {
  .top { padding: 14px 64px; }
  main { max-width: 1360px; padding: 30px 64px 80px; }
  .card { padding: 18px 22px; }
  .team, .pred { padding: 20px; }
  .dcol { padding: 12px; }
  .controls { padding: 16px 22px; margin-bottom: 24px; }
  .topline { padding: 18px 22px; margin-bottom: 24px; }
  .board, .cols, .grid3, .duo-recs { gap: 24px; }
  .dgrid { gap: 20px; }
  .board-note { margin: 12px 0 24px; }
  .detail-head { margin-bottom: 24px; }
  th, td { padding-top: 9px; padding-bottom: 9px; }
}
.dph small { font-weight: 500; color: var(--muted); margin-left: 4px; }

/* ===== 2026-12-05: 박스 안 2열x3행을 수치·픽하기 오른쪽으로 (PC) ===== */
.dtop > .dpair { grid-column: 1 / -1; }
@media (min-width: 961px) {
  .drec { container-type: inline-size; }
  .dtop { grid-template-columns: 24px auto minmax(0, 1fr) auto auto; }
  .dtop > .dpair { grid-column: auto; margin: 0; align-self: stretch; }
  .dtop > .dpair .dpcol { padding: 5px; justify-content: center; }
  .dtop > .dpair .dph small { display: none; }
  .dtop > .dpair .dpc { padding: 2px 3px; gap: 5px; }
  .dtop > .dpair .dpc .cn { max-width: 4.5em; }
  .dbar { max-width: 180px; }
  @container (max-width: 640px) {
    .dtop > .dpair .dpc .cn { display: none; }
    .dtop > .dpair .dpc { justify-content: space-between; }
    .dtop > .dpair .dpcol { min-width: 84px; }
  }
}

/* ===== 2026-12-05: 글자 크기·이름 잘림 개선 ===== */
.dname { flex-wrap: wrap; row-gap: 2px; }
.dname .cn { overflow: visible; text-overflow: clip; max-width: none; }
@media (min-width: 961px) {
  /* 헤더 */
  .tabs button { font-size: 15px; padding: 8px 14px; }
  .bucketbar button { font-size: 14px; padding: 5px 12px; }
  .meta { font-size: 12.5px; }
  /* 위쪽 4열 목록 */
  .dhead { font-size: 14px; }
  .citem { font-size: 14px; gap: 8px; padding: 5px 6px; }
  .citem .ci.sm { width: 32px; height: 32px; }
  .citem b { font-size: 14px; }
  .cslot { font-size: 13px; }
  .board-note, .topline .note, .tl-main .note { font-size: 13px; }
  .tl-banhead { font-size: 13px; }
  .tl-reset { font-size: 13px; }
  .tier { font-size: 12px; }
  /* 추천 박스: 이름 칸 우선 */
  .drec-head .muted { font-size: 13px; }
  .dtop { grid-template-columns: 20px 44px minmax(140px, 1fr) auto auto; gap: 8px; }
  .ci.md { width: 44px; height: 44px; }
  .drow.big .dname, .dname { font-size: 16px; font-weight: 700; }
  .dsub { font-size: 12.5px; }
  .dval small { font-size: 12px; }
  .drow.big .dval b { font-size: 20px; }
  .dbtns .pick { font-size: 13px; padding: 4px 10px; }
  .dph { font-size: 12px; }
  .dpv b { font-size: 13.5px; }
  .dpv small { font-size: 12px; }
  .dtop > .dpair { gap: 6px; }
  .dtop > .dpair .dpcol { padding: 5px 4px; }
  /* 카드가 좁으면(약 1200px 미만 화면) 미니 표는 아래 줄로 */
  @container (max-width: 500px) {
    .dtop { grid-template-columns: 20px 44px minmax(0, 1fr) auto; }
    .dtop > .dpair { grid-column: 1 / -1; margin-top: 8px; }
    .dtop > .dpair .dpc .cn { display: block; }
    .dtop > .dpair .dph small { display: inline; }
  }
}
@media (max-width: 960px) {
  .dname { font-size: 15px; }
  .dpv b { font-size: 13px; }
  .dph { font-size: 12px; }
}
.dph small { font-size: 12px; }
@media (max-width: 960px) { .citem .cn { white-space: normal; word-break: break-all; overflow: visible; line-height: 1.15; letter-spacing: -.2px; } }

/* ===== 2026-12-05: PC 4열 보드 → 2열(우리 원딜·우리 서폿 / 상대 원딜·상대 서폿) ===== */
@media (min-width: 961px) {
  .dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
  .dcol { padding: 14px 16px; }
  .dhead { font-size: 15px; margin-bottom: 10px; }
  .cslot { flex-direction: row; justify-content: center; gap: 10px; padding: 10px; font-size: 14px; }
  .cslot .ci { width: 48px; height: 48px; }
  .clist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; margin-top: 10px; }
}
@media (min-width: 961px) {
  .dcol { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 14px; align-items: start; }
  .dcol .dhead { grid-column: 1 / -1; }
  .dcol .cslot { flex-direction: column; height: 100%; min-height: 130px; justify-content: center; }
  .dcol .clist { margin-top: 0; }
  .citem { font-size: 15px; padding: 5px 6px; }
  .citem .ci.sm { width: 36px; height: 36px; }
  .citem b { font-size: 16px; }
}
@media (min-width: 961px) {
  .dcol { grid-template-columns: 96px minmax(0, 1fr); column-gap: 10px; }
  .citem { gap: 6px; }
  .citem .cn { white-space: normal; word-break: keep-all; overflow-wrap: anywhere; overflow: visible; line-height: 1.15; }
}

/* ===== 2026-12-05: PC 다시 4열, 각 열 안의 목록을 2열(5개씩) ===== */
@media (min-width: 961px) {
  .dgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .dcol { display: block; padding: 10px; }
  .dhead { font-size: 14px; margin-bottom: 8px; }
  .dcol .cslot { flex-direction: row; height: auto; min-height: 0; justify-content: center; gap: 8px; padding: 8px; font-size: 14px; }
  .dcol .cslot .ci { width: 40px; height: 40px; }
  .dcol .clist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; margin-top: 8px; }
  .citem { font-size: 13.5px; gap: 5px; padding: 4px 3px; }
  .citem .ci.sm { width: 28px; height: 28px; }
  .citem b { font-size: 14px; }
  .citem .cn { letter-spacing: -.2px; }
}
@media (min-width: 961px) {
  .dcol .clist { grid-template-rows: repeat(5, auto); grid-auto-flow: column; }
}
@media (min-width: 961px) and (max-width: 1200px) {
  .citem .ci.sm { width: 24px; height: 24px; }
  .citem { font-size: 13px; gap: 4px; padding: 3px 2px; }
  .citem b { font-size: 13px; }
}
@media (min-width: 961px) and (max-width: 1200px) {
  .dcol { padding: 8px 6px; }
  .dcol .clist { gap: 4px 4px; }
  .citem { flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 5px 2px; }
  .citem .ci.sm { width: 30px; height: 30px; }
  .citem .cn { flex: none; white-space: nowrap; overflow-wrap: normal; max-width: none; font-size: 13px; letter-spacing: -.3px; }
  .citem b { font-size: 13px; line-height: 1.1; }
}


/* ---------- 푸터 · 약관 페이지 ---------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 20px 20px 28px; color: var(--muted); font-size: 12px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--text); text-decoration: underline; }
.site-foot b { color: var(--text); font-weight: 600; }
.riot-legal { margin: 0; max-width: 820px; line-height: 1.55; opacity: .85; }
.legal-page .tabs a { color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 6px; }
.legal-page .tabs a:hover { background: var(--brand-bg); color: #fff; }
.legal { max-width: 820px; margin: 0 auto; padding: 28px 20px 8px; font-size: 15px; line-height: 1.75; }
.legal h1 { font-size: 26px; margin: 0 0 6px; }
.legal h2 { font-size: 17px; margin: 30px 0 8px; color: var(--brand-soft); }
.legal li { margin: 4px 0; }
.legal .ltable { border-collapse: collapse; width: 100%; font-size: 14px; margin: 8px 0; }
.legal .ltable th, .legal .ltable td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal .ltable th { background: var(--panel); color: var(--muted); font-weight: 600; }
.todo { background: rgba(250,204,21,.18); color: #facc15; padding: 0 5px; border-radius: 4px; }
.about .ref-note { border-left: 3px solid var(--brand); padding: 8px 12px; background: var(--brand-bg); border-radius: 0 8px 8px 0; }

/* ===== 2026-12-06: 박스 안 미니 표 3열(추천 | 상성 원딜 | 상성 서폿) ===== */
.drec { container-type: inline-size; }
.dpair { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dpcol.bad .dph { color: var(--enemy); }
@media (min-width: 961px) {
  /* 기본(카드가 좁으면): 표는 박스 아래 줄 */
  .dtop { grid-template-columns: 20px 44px minmax(0, 1fr) auto; }
  .dtop > .dpair { grid-column: 1 / -1; margin: 8px 0 0; }
  .dtop > .dpair .dpc .cn { display: block; }
  .dtop > .dpair .dph small { display: inline; }
  /* 카드가 충분히 넓으면: 큰 %·픽하기 오른쪽 */
  @container (min-width: 556px) {
    .dtop { grid-template-columns: 20px 44px minmax(120px, 1fr) auto auto; }
    .dtop > .dpair { grid-column: auto; margin: 0; }
    .dtop > .dpair .dpc .cn { display: none; }
    .dtop > .dpair .dph small { display: none; }
    .dtop > .dpair .dpcol { min-width: 82px; }
  }
}
/* 좁은 카드(작은 PC·휴대폰): 표 안 이름은 숨기고 아이콘+수치(툴팁에 이름) */
@container (max-width: 470px) {
  .dpair .dpc .cn { display: none !important; }
  .dpair .dpc { justify-content: space-between; }
  .dph small { display: none !important; }
}
@media (min-width: 1400px) { main { max-width: 1600px; } }
@media (min-width: 961px) {
  @container (min-width: 556px) {
    /* 556~589px 카드에서는 3열 표가 비좁으므로 아래 줄 유지 */
    .dtop { grid-template-columns: 20px 44px minmax(0, 1fr) auto; }
    .dtop > .dpair { grid-column: 1 / -1; margin: 8px 0 0; }
  }
  @container (min-width: 590px) {
    .dtop { grid-template-columns: 20px 44px minmax(110px, 1fr) auto auto; }
    .dtop > .dpair { grid-column: auto; margin: 0; gap: 5px; }
    .dtop > .dpair .dpcol { min-width: 92px; padding: 5px 3px; }
    .dtop > .dpair .dpc { gap: 4px; padding: 2px; }
    .dtop > .dpair .dpc .ci.sm { width: 24px; height: 24px; }
  }
}
@container (max-width: 555px) {
  .dpair .dpc .cn { display: none !important; }
  .dpair .dpc { justify-content: space-between; }
  .dph small { display: none !important; }
}

/* ===== 2026-12-06c: 미니 표 2열(추천 | 비추천), 본문 폭 되돌림 ===== */
.dpair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dpcol.bad .dph, .dpcol.bad .dpv b { color: var(--enemy); }
@media (min-width: 1400px) { main { max-width: 1440px; } }
/* 아래 줄일 때는 이름 보이게 (휴대폰 아주 좁을 때만 숨김) */
@container (max-width: 555px) {
  .dpair .dpc .cn { display: block !important; }
  .dpair .dpc { justify-content: flex-start; }
  .dph small { display: inline !important; }
}
@container (max-width: 360px) {
  .dpair .dpc .cn { display: none !important; }
  .dpair .dpc { justify-content: space-between; }
  .dph small { display: none !important; }
}
@media (min-width: 961px) {
  @container (min-width: 500px) {
    .dtop { grid-template-columns: 20px 44px minmax(120px, 1fr) auto auto; }
    .dtop > .dpair { grid-column: auto; margin: 0; gap: 6px; }
    .dtop > .dpair .dpcol { min-width: 92px; padding: 5px 4px; }
    .dtop > .dpair .dpc .cn { display: none !important; }
    .dtop > .dpair .dph small { display: none !important; }
  }
  @container (min-width: 640px) {
    .dtop > .dpair .dpcol { min-width: 150px; }
    .dtop > .dpair .dpc .cn { display: block !important; }
    .dtop > .dpair .dpc { justify-content: flex-start; }
  }
}
.dpair .dpc .cn { max-width: none !important; overflow: visible; }

/* ===== 2026-12-06d: 선픽/후픽 배지 ===== */
.phase { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.phase.first { background: rgba(250, 204, 21, .15); color: #facc15; }
.phase.partial { background: rgba(148, 163, 184, .18); color: var(--muted); }
.phase.last { background: rgba(74, 222, 128, .15); color: #4ade80; }

/* ===== 2026-12-06e: 추천 정렬 토글 ===== */
.recsort { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--panel, rgba(255,255,255,.04)); border: 1px solid var(--line, rgba(255,255,255,.08)); margin: 0 0 12px; }
.recsort button { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.recsort button.on { background: var(--brand); color: #fff; }

/* ===== 2026-12-06g: 정렬 토글 공유(보드 위 · 픽 창) ===== */
.sortbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.sortbar .recsort, .psort .recsort { margin: 0; }
.sortbar .muted, .psort .muted { font-size: 12.5px; }
.psort { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 12px; }
.pitem .sub b { font-size: 11.5px; }

.duoq { background: var(--card, #1b2130); color: inherit; border: 1px solid rgba(148,163,184,.3); border-radius: 8px; padding: 5px 10px; font-size: 13px; min-width: 190px; }
