:root{
  --bg:#fffbe6;
  --panel:#ffffff;
  --accent:#222;
  --muted:#666;
  --tile:#e6a400;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--bg);
  color:#111;
  display:flex;
  justify-content:center;
  padding:20px;
  min-height:100vh;
}
.wrap{
  width:100%;
  max-width:980px;
}
h1{
  text-align:center;
  margin:6px 0 18px;
  font-size:20px;
}
.game{
  display:flex;
  gap:20px;
  align-items:flex-start;
  justify-content:center;
}
canvas{
  display:block;
  background:var(--panel);
  border-radius:8px;
  box-shadow:0 6px 18px rgba(0,0,0,0.08);
}
#board{
  width:240px;
  height:480px;
  border:1px solid #ddd;
}
.side{
  width:260px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.info{
  background:#fff;
  padding:10px;
  border-radius:8px;
  border:1px solid #eee;
  font-size:15px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.next-box{
  background:#fff;
  padding:10px;
  border-radius:8px;
  border:1px solid #eee;
}
.label{font-size:13px;color:var(--muted);margin-bottom:8px}
.controls{
  display:flex;
  gap:8px;
}
.controls button{
  flex:1;
  padding:10px;
  border-radius:8px;
  border:none;
  background:var(--accent);
  color:#fff;
  cursor:pointer;
  font-weight:600;
}
.controls button:hover{opacity:0.95}
.help{
  background:#fff;
  padding:10px;
  border-radius:8px;
  border:1px solid #eee;
  font-size:13px;
  color:var(--muted);
}
.overlay{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  color:#fff;
  background:rgba(0,0,0,0.55);
}
.hidden{display:none}

/* responsive */
@media (max-width:760px){
  .game{flex-direction:column; align-items:center}
  .side{width:100%}
  #board{width:200px;height:400px}
}
