*{margin:0;padding:0;box-sizing:border-box}
body{font-family:system-ui,-apple-system,sans-serif;background:#0f172a;color:#e2e8f0;min-height:100vh}
header{background:rgba(15,23,42,.97);border-bottom:1px solid rgba(201,162,39,.25);padding:.85rem 1.25rem;display:flex;justify-content:space-between;align-items:center;gap:.75rem;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:.65rem;text-decoration:none}
.brand img{height:40px;width:auto}
.brand-name{font-weight:900;font-size:1.05rem;letter-spacing:.03em;background:linear-gradient(180deg,#93c5fd,#3b82f6 30%,#1e3a8a 65%,#0c1e3d);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;-webkit-text-stroke:1px rgba(232,197,71,.95);filter:drop-shadow(0 1px 0 #c9a227)}
.header-right{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;font-size:.85rem;color:#94a3b8}
.coin-pill{display:inline-flex;align-items:center;gap:.35rem;background:rgba(201,162,39,.15);border:1px solid rgba(201,162,39,.4);color:#f0d78c;padding:.35rem .7rem;border-radius:999px;font-weight:700}
.coin-pill img{height:22px;width:22px;border-radius:50%;object-fit:cover}
.btn{background:transparent;border:1px solid rgba(255,255,255,.15);color:#e2e8f0;padding:.4rem .85rem;border-radius:6px;font-size:.85rem;cursor:pointer;text-decoration:none;display:inline-block}
.btn-gold{background:linear-gradient(135deg,#c9a227,#a67c00);color:#0f172a;border:none;font-weight:700}
.btn-danger{border-color:rgba(248,113,113,.5);color:#fca5a5}
.btn:disabled{opacity:.45;cursor:not-allowed}
main{max-width:980px;margin:0 auto;padding:1.5rem 1.15rem 3rem}
h1{font-size:1.45rem;margin-bottom:.35rem}
.sub{color:#94a3b8;margin-bottom:1.25rem;font-size:.95rem}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.card{background:rgba(30,41,59,.65);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:1.15rem 1.25rem}
.card h2{font-size:1.1rem;margin-bottom:.35rem}
.card p{color:#94a3b8;font-size:.9rem;line-height:1.45}
.stat{font-size:1.35rem;font-weight:800;color:#c9a227}
.muted{color:#94a3b8;font-size:.85rem}
.msg{padding:.75rem 1rem;border-radius:8px;margin-bottom:1rem;display:none}
.msg.show{display:block}
.msg.ok{background:rgba(34,197,94,.12);border:1px solid rgba(34,197,94,.3);color:#86efac}
.msg.err{background:rgba(239,68,68,.12);border:1px solid rgba(239,68,68,.3);color:#fca5a5}
table{width:100%;border-collapse:collapse;font-size:.9rem}
th,td{padding:.55rem .4rem;border-bottom:1px solid rgba(255,255,255,.06);text-align:left}
th{color:#94a3b8;font-weight:500}
.board-wrap{display:flex;flex-direction:column;align-items:center;gap:1rem}
/* Fixed board size — does not reflow per move */
.board{
  display:grid;
  grid-template-columns:repeat(8, 1fr);
  grid-template-rows:repeat(8, 1fr);
  width:min(92vw, 520px);
  height:min(92vw, 520px);
  max-width:520px;
  max-height:520px;
  aspect-ratio:1 / 1;
  border:3px solid #c9a227;
  border-radius:8px;
  overflow:hidden;
  user-select:none;
  flex-shrink:0;
}
.sq{
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  position:relative;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
}
.sq.light{background:#e8d5a3}
.sq.dark{background:#5c4030}
.sq.highlight{outline:3px solid #fbbf24;outline-offset:-3px;z-index:1}
.sq.valid{box-shadow:inset 0 0 0 4px rgba(74,222,128,.85)}
.sq.last{box-shadow:inset 0 0 0 3px rgba(96,165,250,.6)}
.clocks{display:flex;gap:1rem;flex-wrap:wrap;justify-content:center}
.clock{background:rgba(15,23,42,.8);border:1px solid rgba(255,255,255,.1);border-radius:10px;padding:.75rem 1rem;min-width:140px;text-align:center}
.clock.active{border-color:#c9a227;box-shadow:0 0 0 1px rgba(201,162,39,.4)}
.clock .time{font-size:1.5rem;font-weight:800;font-variant-numeric:tabular-nums}
.clock .label{font-size:.75rem;color:#94a3b8;text-transform:uppercase;letter-spacing:.04em}
/* Bigger, clearer pieces */
.piece{
  pointer-events:none;
  line-height:1;
  font-size:clamp(1.75rem, 7.5vw, 2.85rem);
  font-weight:700;
  text-shadow:0 2px 3px rgba(0,0,0,.55), 0 0 1px rgba(0,0,0,.8);
  display:flex;
  align-items:center;
  justify-content:center;
  width:88%;
  height:88%;
}
.piece.white{color:#fff8e7;filter:drop-shadow(0 2px 2px rgba(0,0,0,.45))}
.piece.black{color:#0f172a;filter:drop-shadow(0 1px 1px rgba(255,255,255,.25))}
/* Checkers knobs as solid circles */
.piece.checker{
  border-radius:50%;
  font-size:clamp(1.6rem, 6.5vw, 2.5rem);
}
.piece.checker.red{
  background:radial-gradient(circle at 35% 30%, #fca5a5, #dc2626 55%, #7f1d1d);
  color:#fff;
  box-shadow:inset 0 -4px 6px rgba(0,0,0,.35), 0 3px 5px rgba(0,0,0,.4);
  text-shadow:none;
}
.piece.checker.black-piece{
  background:radial-gradient(circle at 35% 30%, #64748b, #1e293b 55%, #020617);
  color:#f8fafc;
  box-shadow:inset 0 -4px 6px rgba(0,0,0,.5), 0 3px 5px rgba(0,0,0,.4);
  text-shadow:none;
}
.piece.checker.king::after{
  content:"";
}
.status-bar{text-align:center;font-weight:600;min-height:1.5rem}
input,select{width:100%;padding:.55rem .65rem;border-radius:8px;border:1px solid rgba(255,255,255,.12);background:#0f172a;color:#e2e8f0;margin:.35rem 0 .75rem}
label{font-size:.85rem;color:#94a3b8}
@media(max-width:520px){.brand-name{font-size:.9rem}}

.online-row{display:flex;justify-content:space-between;align-items:center;gap:.75rem;padding:.55rem 0;border-bottom:1px solid rgba(255,255,255,.06);flex-wrap:wrap}
.online-row:last-child{border-bottom:none}
.online-meta strong{display:block}
.lb-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.lb-grid h3{font-size:.95rem;margin-bottom:.5rem;color:#c9a227}
.section-title{font-size:1.15rem;margin:1.5rem 0 .75rem}
