
:root{color-scheme:dark;--bg:#0b0f14;--panel:#0f1620;--panel2:#0c121a;--border:#243041;--border2:#2f3d52;--text:#e6edf3;--muted:#9fb0c2;--input:#0b111a;--inputBorder:#2b3a51;--btn:#e6edf3;--btnText:#0b0f14;--btn2:#162131;--btn2Text:#e6edf3;--hover:#122033;--good:#3fb950;--warn:#d29922;--bad:#f85149;--link:#9cc2ff}
*{box-sizing:border-box}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;margin:0;background:var(--bg);color:var(--text)}
a{color:var(--link);text-decoration:none} a:hover{text-decoration:underline}
.container{max-width:1100px;margin:0 auto;padding:18px}
.topbar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:14px;flex-wrap:wrap}
.brand{display:flex;gap:10px;align-items:center}
.brand b{font-size:18px}
.pill{display:inline-block;padding:2px 8px;border:1px solid var(--border);border-radius:999px;font-size:12px;color:var(--muted);background:rgba(255,255,255,.02)}
.row{display:flex;gap:14px;flex-wrap:wrap;align-items:flex-start}
.card{border:1px solid var(--border);border-radius:14px;padding:14px;min-width:320px;background:var(--panel)}
.card h2{margin:0 0 10px 0;font-size:16px}
.muted{color:var(--muted);font-size:13px}
.small{font-size:12px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;border-radius:12px;border:1px solid var(--border);background:var(--btn2);color:var(--btn2Text);cursor:pointer}
.btn.primary{background:var(--btn);color:var(--btnText);border:0}
.btn:hover{background:var(--hover)}
.notice{padding:10px;border:1px solid var(--border);border-radius:12px;background:rgba(255,255,255,.02)}
.grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
.cell{border:1px solid var(--border2);border-radius:14px;padding:10px;background:var(--panel2);display:flex;flex-direction:column;align-items:center;gap:8px;min-height:128px;background-color:#46555c; color:#c8c8c8;font-weight:bold;justify-content:center;text-align:center;}
.cell img{width:52px;height:52px;object-fit:contain;filter:drop-shadow(0 0 6px rgba(0,0,0,.35))}
.cell .name{font-size:12px;text-align:center;line-height:16px;min-height:32px}
.cell.done{outline:2px solid rgba(63,185,80,.45);background:rgba(63,185,80,.06)}
.cell.done .tick{display:inline-flex}
.tick{display:none;font-size:12px;color:var(--good);border:1px solid rgba(63,185,80,.35);border-radius:999px;padding:2px 8px;background:rgba(63,185,80,.08)}
table{width:100%;border-collapse:separate;border-spacing:0}
th,td{padding:10px;border-bottom:1px solid var(--border);vertical-align:top}
th{color:var(--muted);font-weight:600;text-align:left;font-size:12px}
.teamRow{cursor:pointer}
.teamRow:hover{background:rgba(255,255,255,.02)}
.progress{display:flex;gap:10px;align-items:center}
.bar{flex:1;height:10px;border:1px solid var(--border);border-radius:999px;overflow:hidden;background:rgba(255,255,255,.03)}
.bar > div{height:100%;background:rgba(156,194,255,.65);width:0%}
.kpis{display:flex;gap:10px;flex-wrap:wrap}
.kpi{border:1px solid var(--border);border-radius:12px;padding:10px;background:rgba(255,255,255,.02);min-width:170px}
.badge{font-weight:700}
footer{margin-top:18px;color:var(--muted);font-size:12px}

.roster{display:flex;flex-wrap:wrap;gap:12px}
.member{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.02);width:110px}
.member img{width:48px;height:48px;object-fit:contain;border-radius:10px;background:rgba(0,0,0,.2)}


/* Game layout: make Board + Teams cards equal height and allow internal scrolling in Teams list */
.row.gameLayout{align-items:stretch}
.row.gameLayout > .card{display:flex;flex-direction:column;min-height:0}
.row.gameLayout .boardCard #board{flex:1;min-height:0}
.row.gameLayout .teamsCard{min-height:0}
.row.gameLayout .teamsCard #teams{flex:1;min-height:0;overflow:auto;padding-right:4px}

/* Team pill clickable + hide the old View button without removing it */
.row.gameLayout .teamsCard #teams .teamPill{cursor:pointer;user-select:none}
.row.gameLayout .teamsCard #teams .teamPill:hover{background:rgba(255,255,255,.03)}
.row.gameLayout .teamsCard #teams .teamPill.active{outline:2px solid rgba(156,194,255,.5);outline-offset:-2px}
.row.gameLayout .teamsCard #teams .teamPill .btn{display:none}


/* ===============================
   Claimed line overlay (clean strokes)
   =============================== */

#board{position:relative;}
.claimedLineOverlay{position:absolute;inset:0;pointer-events:none;z-index:5;}
.claimedLineStroke{stroke-width:40;stroke-linecap:round;opacity:0.20;}
table{width:100%;border-collapse:separate;border-spacing:0}
th,td{padding:10px;border-bottom:1px solid var(--border);vertical-align:top}
th{color:var(--muted);font-weight:600;text-align:left;font-size:12px}
.status{font-weight:700}
.status.scheduled{color:var(--warn)} .status.active{color:var(--good)} .status.ended{color:var(--muted)}
.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 14px 0}
.tab{padding:8px 10px;border:1px solid var(--border);border-radius:999px;background:rgba(255,255,255,.02);color:var(--text)}
.tab.active{background:var(--hover);border-color:#3a4a63}
pre{background:var(--code);padding:10px;border-radius:12px;overflow:auto;border:1px solid var(--border);color:var(--text)}
.inline{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
hr{border:0;border-top:1px solid var(--border);margin:18px 0}
.pill-logout{border-color:var(--border2);}


/* Team colour indicator dot */
.teamColourDot{
    width:12px;
    height:12px;
    border-radius:50%;
    display:inline-block;
    margin-right:6px;
    vertical-align:middle;
}


/* Toggle: hide/show claimed line strokes */
#board.linesHidden .claimedLineOverlay{display:none;}
