/* Hallmark · checked: 2026-11-05 · genre: modern-minimal (inferred) · shape: app screen
 * floor: 0 FAIL in this file · fixed: 15, 26b, 34, 39a, 48, 63, 24b · structural: chart order, KPI rows, empty opponent column, pitch colour
 * built: the project · redesign: polish · v2.0.0 */
/* FC LA MASIA 데이터 대시보드 — FM 다크 (중립 회색 바탕 + 주황 강조). 값은 토큰만 바꾸면 전체에 적용된다.
   스타일: 데이터 터미널. 카드는 바탕보다 어둡게, 높이 차이는 명도로만 두고, 선택 표시는 라벨 너비의 1px 주황 선 하나로 통일한다.
   주황은 그 선과 핵심 데이터(득점 막대)에만 쓴다. */
:root {
  color-scheme: dark;
  --bg: #1b1b1b;
  --side: #1b1b1b;
  --panel: #141414;
  --raised: #242424;
  --line: #333333;
  --rule: #262626;
  --text: #f2f2f2;
  --muted: #a6a6a6;
  --accent: #ffa528;
  --on-accent: #141414;
  --s2: #5aa9ff;
  --s3: #62d394;
  --s4: #e08cff;
  --win: #62d394;
  --draw: #b8b8b8;
  --loss: #ff8a8a;
  --warn: #ffc982;
  --warn-bg: #2b2217;
  --pitch: #12321f;
  --pitch-line: #2c5e40;
  --cell-off: #0f2a1a;
  --pitch-board: #0f5a2a;
  --scrim: rgb(0 0 0 / .6);
  --chip-ink-bg: rgb(0 0 0 / .55);
  --shadow-ink: rgb(0 0 0 / .5);
  --badge-line: rgb(255 255 255 / .6);
  --option-ink: #111111;
  --radius: 8px;
  --font: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-variant-numeric: tabular-nums; line-height: 1.5; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 5px; }
button, select, input { font: inherit; }
/* 기본 버튼은 반전(밝은 바탕 + 어두운 글자). 주황 면은 쓰지 않는다. */
button { min-height: 40px; padding: 0 16px; border-radius: 6px; border: 1px solid transparent; background: var(--text); color: var(--on-accent); font-weight: 700; cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:disabled:not([class]), button.ghost:disabled { background: var(--raised); color: var(--muted); border-color: var(--line); }
button[class]:not(.ghost):not(.tac-opt):disabled { opacity: .5; background: var(--raised); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
button:active:not(:disabled):not(.tb-chip) { transform: translateY(1px); }
button.ghost { background: transparent; color: var(--text); border-color: var(--line); font-weight: 500; }
button.ghost:hover { border-color: var(--muted); }
select, input[type=search], input[type=text] { min-height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--raised); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 10; background: var(--text); color: var(--on-accent); padding: 12px 16px; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
#preference-status:empty { display: none; }

.dash { display: flex; flex-wrap: wrap; min-height: 100vh; }
/* 사이드바는 화면 높이에 고정(본문만 스크롤). 바탕과 같은 색에 1px 선 하나로만 나눈다. */
.dash-side { flex: 0 0 200px; position: sticky; top: 0; height: 100vh; overflow-y: auto; align-self: flex-start; max-width: 100%; padding: 20px 16px; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.dash-side > a:not(.dash-brand) { display: flex; align-items: center; min-height: 40px; padding: 0 8px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.dash-side > a:not(.dash-brand) > span { display: inline-block; padding: 8px 0; }
.dash-side > a:not(.dash-brand):hover { color: var(--text); }
/* 선택한 메뉴: 라벨이 흰색이 되고 라벨 너비만큼 1px 주황 선이 붙는다. */
.dash-side > a[aria-current="page"] { color: var(--text); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 8px; }
.dash-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 20px; color: var(--text); text-decoration: none; }
.dash-brand small { display: block; color: var(--muted); font-size: 12px; }
.dash-crest { width: 34px; height: 38px; border-radius: 4px 4px 14px 14px; border: 1px solid var(--accent); display: grid; place-content: center; font-weight: 800; font-size: 13px; color: var(--text); }
.dash-account { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.dash-account small { color: var(--muted); }
.dash-main { flex: 999 1 560px; min-width: 0; max-width: 1240px; padding: 28px clamp(16px, 3vw, 40px) 48px; display: flex; flex-direction: column; gap: 16px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.dash-head > div:first-child { display: flex; flex-direction: column; }
.dash-head h1 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.3; }
/* 제목 아래 한 줄: 화면이 말해 주는 핵심 한 가지(회색). 제목 앞에 붙는 영문 라벨은 쓰지 않는다. */
.dash-eyebrow { order: 2; margin-top: 2px; font-size: 14px; color: var(--muted); }
.dash-eyebrow:empty { display: none; }
.dash-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.dash-filters label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.dash-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.dash-status:empty { display: none; }
.dash-status { margin: 0; padding: 12px 16px; border-radius: 6px; background: var(--warn-bg); color: var(--warn); font-size: 14px; }
.dash-view { display: flex; flex-direction: column; gap: 16px; }
.dash-card { padding: 20px; border-radius: var(--radius); background: var(--panel); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dash-card h2 { margin: 0; font-size: 16px; font-weight: 700; }
.dash-card > p { margin: 0; }
.dash-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.dash-login { max-width: 560px; }
.discord-login-options { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
/* 핵심 숫자는 칸 하나에 이어 붙인 한 줄(칸마다 상자를 두르지 않는다). 칸 사이 1px 선은 gap에 비치는 바탕색이다. */
.grid-auto:has(> .kpi:nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-auto:has(> .kpi:nth-child(7)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto:has(> .kpi) { gap: 0; background: var(--panel); clip-path: inset(1px 0 0 1px round var(--radius)); }
.kpi { padding: 16px 20px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi strong { font-size: 24px; font-weight: 600; line-height: 1.2; }
.kpi small { font-size: 12px; color: var(--muted); }
/* 주요 선수: 상자 대신 순위 줄. 항목 이름은 왼쪽, 숫자는 오른쪽 끝에 맞춘다. */
.dash-card .grid-auto:has(> .leader) { grid-template-columns: 1fr; gap: 0; }
.leader { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "name value"; column-gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--text); text-decoration: none; }
.leader:last-child { border-bottom: 0; }
.leader:hover { outline: 1px solid var(--line); outline-offset: 0; }
.leader span { grid-area: label; font-size: 12px; color: var(--muted); }
.leader strong { grid-area: name; font-size: 15px; font-weight: 600; }
.leader b { grid-area: value; font-size: 20px; font-weight: 600; text-align: right; }

.form-row { display: flex; flex-wrap: wrap; gap: 8px; }
/* 승·무·패: 면 대신 같은 색의 1px 테두리와 글자(상태 표시이므로 색을 쓴다). */
.res { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 6px; display: inline-grid; place-content: center; font-weight: 700; font-size: 13px; background: transparent; border: 1px solid currentColor; }
.res-승 { color: var(--win); } .res-무 { color: var(--draw); } .res-패 { color: var(--loss); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.bars-scale { display: flex; gap: 8px; }
.bars-axis { flex: none; width: 22px; height: 130px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 11px; line-height: 1; color: var(--muted); }
.bars-scale .bars { flex: 1; min-width: 0; }
.bars { height: 130px; display: flex; align-items: flex-end; gap: 8px; border-bottom: 1px solid var(--muted); padding-bottom: 0; }
.bars > div { flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 100%; min-width: 0; }
.bars span { flex: 1; border-radius: 0; min-height: 2px; }
/* 득점은 채운 막대, 실점은 윤곽 막대: 색만으로 구분하지 않는다(범례 견본도 같은 모양). */
.bar-for { background: var(--accent); }
.bar-against { background: transparent; box-shadow: none; border: 1px solid var(--muted); border-bottom: 0; }
.legend .sw-for { background: var(--accent); }
.legend .sw-against { background: transparent; border: 1px solid var(--muted); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 12px 8px; border-bottom: 1px solid var(--rule); text-align: left; white-space: nowrap; }
table.data thead th { font-size: 12px; font-weight: 500; color: var(--muted); border-bottom-color: var(--line); }
table.data th.num, table.data td.num { text-align: right; }
table.data tbody tr[data-href] { cursor: pointer; }
table.data tbody tr[data-href]:hover { outline: 1px solid var(--line); outline-offset: -1px; }
th button.sort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; min-height: 28px; }
th button.sort:focus-visible { outline: 2px solid var(--accent); }
th[aria-sort="ascending"] button.sort::after { content: "▲"; font-size: 9px; color: var(--text); }
th[aria-sort="descending"] button.sort::after { content: "▼"; font-size: 9px; color: var(--text); }
.pos-tag { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; background: var(--raised); color: var(--text); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
/* 탭·보기 전환: 면을 채우지 않는다. 선택한 항목만 라벨 너비의 1px 주황 선이 붙는다. */
.seg { display: inline-flex; flex-wrap: wrap; gap: 20px; padding: 0; border-radius: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); }
.seg button { background: transparent; color: var(--muted); min-height: 40px; padding: 0; border-radius: 0; border: 0; border-bottom: 1px solid transparent; margin-bottom: -1px; font-weight: 500; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }
.seg.small { gap: 16px; }
.seg.small button { min-height: 34px; padding: 0; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--raised); font-size: 13px; }
.chip i { width: 10px; height: 10px; border-radius: 50%; }
.chip button { all: unset; cursor: pointer; color: var(--muted); padding: 0 2px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.sample { padding: 12px 16px; border-radius: 6px; background: var(--raised); font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.sample.warn { background: var(--warn-bg); }
.sample .warn-text { color: var(--warn); font-weight: 700; font-size: 12px; }
.cmp-cell { display: flex; align-items: center; gap: 12px; }
.cmp-cell b, .cmp-cell span.v { min-width: 56px; }
.cmp-cell span.v { color: var(--muted); }
.cmp-bar { flex: 1; max-width: 150px; height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.cmp-bar i { display: block; height: 100%; }
.share { display: flex; height: 28px; border-radius: 6px; overflow: hidden; }
.share span { display: grid; place-content: center; font-size: 12px; font-weight: 800; color: var(--on-accent); min-width: 0; overflow: hidden; white-space: nowrap; }
.score-big { font-size: 40px; font-weight: 700; letter-spacing: .02em; }
.picker { display: flex; flex-wrap: wrap; gap: 8px; max-height: 220px; overflow: auto; }
.picker label { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 6px; background: var(--raised); font-size: 13px; cursor: pointer; }
.picker input { accent-color: var(--accent); }
.more { align-self: flex-start; }
.empty { color: var(--muted); padding: 12px 0; }

/* 포지션 선호: 5×5 칸 + GK */
/* 넓은 화면: 보드는 왼쪽(520px), 요약과 저장 버튼은 보드 옆에 둔다. 좁은 화면은 한 열로 쌓는다. */
.pref-form { display: grid; gap: 16px; grid-template-columns: minmax(0, 520px) minmax(220px, 1fr); column-gap: 32px; align-items: start; }
.pref-kinds { grid-column: 1; }
.pref-board { grid-column: 1; grid-row: 2 / span 3; }
.pref-summary { grid-column: 2; grid-row: 2; }
.pref-actions { grid-column: 2; grid-row: 3; }
.pref-kinds { display: flex; flex-wrap: wrap; gap: 20px; border-bottom: 1px solid var(--line); }
.pref-kind { background: transparent; color: var(--muted); border: 0; border-bottom: 1px solid transparent; margin-bottom: -1px; border-radius: 0; min-height: 44px; padding: 0; font-weight: 500; }
.pref-kind[aria-checked="true"] { border-bottom-color: var(--accent); color: var(--text); font-weight: 700; }
.pref-board { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--pitch-line); border-radius: 8px; background: var(--pitch); }
.pref-row { display: grid; grid-template-columns: 36px repeat(5, minmax(0, 1fr)); gap: 8px; }
.pref-row-gk { grid-template-columns: 36px minmax(0, 1fr); justify-items: center; margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--pitch-line); }
.pref-row-gk .pref-cell { width: calc((100% - 24px) / 5); min-width: 52px; }
.pref-row-label { display: grid; place-content: center; color: var(--muted); font-size: 11px; }
.pref-cell { position: relative; display: grid; place-content: center; min-height: 48px; padding: 4px; background: var(--cell-off); color: var(--muted); border: 1px solid var(--pitch-line); border-radius: 6px; font-size: 12px; font-weight: 600; }
.pref-cell:hover { border-color: var(--accent); }
.pref-cell .pref-tag { position: absolute; top: 2px; right: 4px; font-size: 10px; font-weight: 800; }
.pref-cell.is-main { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pref-cell.is-sub1 { background: var(--raised); color: var(--text); border-color: var(--accent); }
.pref-cell.is-sub2 { background: var(--panel); color: var(--text); border: 1px dashed var(--accent); }
.pref-summary { margin: 0; color: var(--muted); font-size: 13px; }
.pref-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pref-admin-status:empty { display: none; }
.pref-admin-scroll { overflow-x: auto; }
.pref-admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pref-admin-table th, .pref-admin-table td { padding: 8px; border-bottom: 1px solid var(--rule); text-align: left; white-space: nowrap; }
.pref-reset { min-height: 36px; margin-top: 8px; background: transparent; color: var(--text); border-color: var(--line); }

/* 상호작용 피드백: 눌러 보라는 표시와 짧은 색 전환(움직임을 줄인 환경에서는 끈다). */
.leader, .chip, .picker label, .seg button, .pref-cell, .lu-cell, table.data tbody tr[data-href] { cursor: pointer; }
a, button, .leader, .pref-cell, .lu-cell, .seg button, th button.sort { transition: color .15s ease-out, border-color .15s ease-out, background-color .15s ease-out; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

@media (max-width: 1000px) {
  .grid-auto:has(> .kpi:nth-child(5):last-child), .grid-auto:has(> .kpi:nth-child(7)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  /* 휴대폰: 메뉴를 5칸 격자로 접는다(옆으로 밀지 않아도 모두 보인다). 위쪽은 두 줄. */
  .dash-side { flex: 1 1 100%; position: static; height: auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; gap: 0; padding: 4px 12px;
    overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .dash-brand { padding: 0; justify-content: center; }
  .dash-brand > span:last-child { display: none; }
  .dash-crest { width: 28px; height: 32px; font-size: 11px; }
  .dash-side > a:not(.dash-brand) { justify-content: center; min-height: 40px; padding: 0 2px; font-size: 13px; white-space: nowrap; text-align: center; }
  .dash-side > a[aria-current="page"] { text-underline-offset: 6px; }
  .dash-account { margin: 0; padding: 0; border-top: 0; flex-direction: row; align-items: center; justify-content: center; }
  .dash-account > span, .dash-account > small { display: none; }
  .dash-account button { min-height: 36px; padding: 0 8px; font-size: 12px; white-space: nowrap; }
  .dash-main { padding-top: 20px; }
  /* 손가락으로 누르는 곳은 44px 이상. */
  .dash-side > a:not(.dash-brand), .dash-account button, .seg button, .seg.small button, th button.sort, .more { min-height: 44px; }
  .picker label { min-height: 44px; }
  .kpi strong { font-size: 20px; }
  .grid-auto:has(> .kpi) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-auto:has(> .kpi) > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .pref-row { grid-template-columns: 28px repeat(5, minmax(0, 1fr)); gap: 4px; }
  .pref-cell { min-height: 44px; font-size: 11px; }
}

/* 태블릿: 핵심 숫자 줄은 2열(5개나 7개가 3열로 접혀 칸이 어긋나지 않게). 홀수 마지막 칸은 한 줄 전체를 쓴다. */
@media (max-width: 1000px) {
  .grid-auto:has(> .kpi) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-auto:has(> .kpi) > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .pref-form { grid-template-columns: minmax(0, 520px); }
  .pref-kinds, .pref-board, .pref-summary, .pref-actions { grid-column: 1; grid-row: auto; }
}

/* 전술 탭: 팀 지침(선택한 값에 1px 주황 선), 5×5 대형 보드, 개인 지침 */
.tac-root { display: flex; flex-direction: column; gap: 16px; }
.tac-root table.data th, .tac-root table.data td { white-space: normal; vertical-align: top; }
.tac-group h3 { margin: 4px 0 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.tac-group + .tac-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.tac-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 4px 0; }
.tac-label { color: var(--muted); font-size: 13px; }
.tac-third { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.tac-third-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 8px; border-bottom: 1px solid var(--rule); }
.tac-third-row .tac-opt { padding: 0 4px; line-height: 1.3; text-align: center; min-height: 44px; }
.tac-opts { display: flex; flex-wrap: wrap; gap: 0 20px; }
.tac-opt { min-height: 36px; padding: 0; background: transparent; border: 0; border-bottom: 1px solid transparent; border-radius: 0; color: var(--muted); font-size: 14px; font-weight: 500; }
.tac-opt[aria-checked="true"], .tac-opt[aria-checked="true"]:disabled { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }
.tac-opt:disabled { background: transparent; color: var(--muted); cursor: default; }
.tac-opt:not(:disabled):hover { color: var(--text); cursor: pointer; }
.tac-board, .tac-keeper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 8px; background: var(--pitch); border: 1px solid var(--pitch-line); }
.tac-keeper .tac-cell { grid-column: 3; }
.tac-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 4px; border-radius: 6px; background: var(--cell-off); border: 1px dashed var(--pitch-line); color: var(--muted); text-align: center; }
.tac-cell.filled { background: var(--panel); border: 1px solid var(--accent); color: var(--text); }
.tac-cell strong { font-size: 14px; }
.tac-cell small { font-size: 11px; line-height: 1; color: var(--muted); }
.tac-cell select { width: 100%; min-height: 44px; margin: 0; padding: 0 2px; background: transparent; border: 0; color: inherit; font-size: 14px; font-weight: 700; text-align: center; }
.tac-cell select option { color: var(--option-ink); }
/* 피치 보드 */
:root { --white: #ffffff; --black: #000000; --gold: #f0c875; --arrow: #ffd98a; }
.tb-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(300px, 4fr); gap: 20px; align-items: start; }
.tb-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tb-side .tac-row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.tb-side .tac-row:last-child { border-bottom: 0; }
.tb-squad { display: flex; flex-direction: column; }
.tb-squad-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 40px; padding: 0 8px; margin: 0; background: transparent; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; color: var(--text); font-weight: 500; text-align: left; }
.tb-squad-row:hover { outline: 1px solid var(--line); outline-offset: -1px; }
.tb-squad-row[aria-pressed="true"] { box-shadow: none; border-bottom-color: var(--accent); }
.tb-squad-row b { font-size: 13px; }
.tb-squad-row small { color: var(--muted); font-size: 12px; }
.tb-pitch { position: relative; width: 100%; aspect-ratio: 985 / 1130; border-radius: 8px; overflow: hidden; background: var(--pitch-board); container-type: normal; }
.fm-field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.tb-overlay { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.tb-overlay polygon { filter: drop-shadow(0 0 1.5px var(--shadow-ink)); }
.tb-chip { position: absolute; z-index: 2; transform: translate(-50%, -50%) scale(var(--chip-scale, 1)); display: grid; justify-items: center; gap: 2px; min-width: 48px; min-height: 48px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--white); cursor: pointer; }
.tb-chip[hidden] { display: none; }
.tb-badge { display: grid; place-items: center; width: 46px; height: 32px; border-radius: 6px; background: var(--panel); border: 1px solid var(--badge-line); color: var(--text); font-size: 13px; font-weight: 800; }
.tb-chip[data-duty="attack"] .tb-badge, .tb-chip[data-duty="roam"] .tb-badge { border-color: var(--accent); }
.tb-chip[aria-pressed="true"] .tb-badge { outline: 2px solid var(--white); outline-offset: 2px; }
.tb-name { padding: 0 4px; border-radius: 3px; background: var(--chip-ink-bg); font-size: 11px; font-weight: 700; line-height: 1.5; }
.tb-pitch[data-tab="shape"] .tb-name { display: none; }
.tb-dir { position: absolute; left: 50%; top: 16px; width: 20px; overflow: visible; fill: none; stroke: var(--arrow); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) translateY(-34px); transform-origin: 50% 50%; pointer-events: none; }
.tb-panel { display: flex; flex-direction: column; gap: 12px; }
.tb-panel h3 { margin: 0; font-size: 15px; }
.tb-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.tb-tags { display: flex; flex-direction: column; gap: 2px; }
.tb-tag { flex-direction: row !important; align-items: center; gap: 8px !important; min-height: 36px; font-size: 14px !important; color: var(--text); }
.tb-tag.is-blocked { color: var(--muted); }
.tb-tag input { width: 18px; height: 18px; accent-color: var(--accent); }
@media (max-width: 900px) { .tb-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .tb-pitch { aspect-ratio: 985 / 1130; } .tb-tag { min-height: 44px; } }
.tac-warn { color: var(--warn); font-size: 13px; }
.tac-note { margin: 0; padding: 12px 16px; border-radius: 6px; background: var(--raised); }
@media (max-width: 1000px) {
  .grid-auto:has(> .kpi:nth-child(5):last-child), .grid-auto:has(> .kpi:nth-child(7)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .tac-row { grid-template-columns: minmax(0, 1fr); }
  .tac-opt { min-height: 44px; }
  .tac-board, .tac-keeper { gap: 4px; padding: 8px; }
  .tac-cell select { font-size: 12px; }
}

/* 선발명단 5×5 */
.lu-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.lu-layout > .dash-card { flex: 3 1 520px; }
.lu-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.lu-name { font-size: 24px; font-weight: 700; }
.lu-board { padding: 12px; border-radius: 8px; background: var(--pitch); border: 1px solid var(--pitch-line); display: flex; flex-direction: column; gap: 8px; }
.lu-row { display: grid; grid-template-columns: 34px repeat(5, minmax(0, 1fr)); gap: 8px; }
.lu-gk { grid-template-columns: 34px minmax(0, 1fr); justify-items: center; margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--pitch-line); }
.lu-gk .lu-cell { width: calc((100% - 32px) / 5); min-width: 60px; }
.lu-label { display: grid; place-content: center; font-size: 11px; color: var(--muted); }
.lu-cell { min-height: 60px; padding: 4px; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--cell-off); border: 1px dashed var(--pitch-line); color: var(--muted); font-weight: 500; text-align: center; }
.lu-cell strong { font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; }
.lu-cell small { font-size: 11px; opacity: .8; }
.lu-cell em { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.lu-cell.on { background: var(--panel); border: 1px solid var(--accent); color: var(--text); }
.lu-cell.filled { background: var(--raised); }
.lu-actions { display: flex; flex-direction: column; gap: 8px; }
.lu-actions > button { min-height: 48px; }
.lu-counts .kpi strong { font-size: 20px; }
@media (max-width: 720px) { .lu-row { grid-template-columns: 26px repeat(5, minmax(0, 1fr)); gap: 4px; } .lu-gk { grid-template-columns: 26px minmax(0, 1fr); } .lu-cell { min-height: 54px; } .lu-cell strong { font-size: 11px; } }

/* 빌드 연구실 · 관리 */
.button-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 6px; background: var(--text); color: var(--on-accent); font-weight: 700; text-decoration: none; align-self: flex-start; }
.dash-admin { display: flex; flex-direction: column; gap: 16px; }
.legacy-tool { display: flex; flex-direction: column; gap: 12px; min-width: 0; overflow-x: auto; }
.legacy-tool table { width: 100%; border-collapse: collapse; font-size: 13px; }
.legacy-tool th, .legacy-tool td { padding: 8px; border-bottom: 1px solid var(--rule); text-align: left; }
.legacy-tool form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.legacy-tool label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.legacy-tool .clubhouse-tool-status[data-error="true"] { color: var(--loss); }
/* 예전 운영 도구 안쪽: 항목은 이름(회색)과 값을 두 열로, 버튼은 윤곽선만(반전 버튼은 화면의 주 동작 하나에만 쓴다). */
.legacy-tool dl { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.legacy-tool dt { color: var(--muted); font-size: 13px; }
.legacy-tool dd { margin: 0; overflow-wrap: anywhere; }
.legacy-tool h3 { margin: 8px 0 0; font-size: 15px; }
.legacy-tool button { align-self: flex-start; background: transparent; color: var(--text); border-color: var(--line); font-weight: 500; }
.legacy-tool button:hover { border-color: var(--muted); }
.profile-admin-tabs { display: flex; flex-wrap: wrap; gap: 20px; border-bottom: 1px solid var(--line); }
.profile-admin-tabs button { background: transparent; color: var(--muted); border: 0; border-bottom: 1px solid transparent; margin-bottom: -1px; border-radius: 0; padding: 0; font-weight: 500; }
.profile-admin-tabs button[aria-selected="true"] { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }
button.pos-edit { all: unset; box-sizing: border-box; display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; background: var(--raised); color: var(--text); border: 1px solid var(--line); cursor: pointer; min-height: 28px; line-height: 24px; }
button.pos-edit:hover { border-color: var(--accent); }
button.pos-edit:focus-visible { outline: 2px solid var(--accent); }
dialog.pos-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); }
dialog.pos-dialog::backdrop { background: var(--scrim); }
.pos-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.pos-dialog-head h3 { margin: 0; font-size: 16px; }
.pos-dialog-foot { display: flex; justify-content: flex-end; margin-top: 16px; }
.pos-line { display: grid; gap: 8px; margin-top: 12px; }
.pos-line-label { font-size: 12px; color: var(--muted); }
.pos-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-width: 64px; min-height: 44px; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font-weight: 500; }
.pos-chip strong { font-size: 14px; }
.pos-chip small { font-size: 10px; color: var(--muted); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-chip.wide { flex-direction: row; gap: 8px; padding: 4px 16px; }
.pos-chip:hover:not(:disabled) { border-color: var(--accent); }
.pos-chip.on { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.pos-chip.on small { color: var(--on-accent); }
.pos-chip:disabled { opacity: .45; color: var(--muted); border-color: var(--line); cursor: not-allowed; }
@media (max-width: 720px) { dialog.pos-dialog { padding: 16px; } .pos-chip { flex: 1 1 28%; } }
.pos-cell { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.pos-tag.pos-ea { background: transparent; border: 1px solid var(--line); color: var(--muted); }

/* 시안: 막대와 결과를 같은 칸에 (오른쪽이 최근) */
.bars-cols .bars { flex: none; }
.bars-cols { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.bars-foot { display: flex; gap: 8px; }
.bars-foot > div { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bars-foot small { font-size: 12px; color: var(--muted); }
.crumb { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
/* 시안: 예전 도구의 입력칸을 기본 입력과 같은 모양으로 */
.legacy-tool input[type=date], .legacy-tool input[type=number], .legacy-tool input[type=text], .legacy-tool select { min-height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--raised); color: var(--text); color-scheme: dark; }
.legacy-tool select[multiple] { min-height: 96px; padding: 8px; }
.legacy-tool input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; align-self: flex-start; }
@media (max-width: 1000px) {
  .grid-auto:has(> .kpi:nth-child(5):last-child), .grid-auto:has(> .kpi:nth-child(7)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .grid-auto:has(> .kpi:nth-child(5):last-child), .grid-auto:has(> .kpi:nth-child(7)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bars-foot small { display: none; }
  .d-yr { display: none; }
  .bars-foot .res { min-width: 0; width: 100%; padding: 0; font-size: 11px; }
}
