* { box-sizing: border-box; }
:root {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1e1e1e;
  background: #f4f1e8;
}
body { margin: 0; }
button, input, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 8px;
  padding: .72rem 1rem;
  cursor: pointer;
  background: #222;
  color: white;
}
button:disabled { opacity: .45; cursor: not-allowed; }
input, textarea {
  width: 100%;
  border: 1px solid #c9c5ba;
  border-radius: 8px;
  padding: .72rem .8rem;
  background: white;
}
.shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}
.hero { margin-bottom: 1.4rem; }
.hero h1 { margin: .15rem 0; font-size: clamp(2rem, 5vw, 4rem); line-height: .98; }
.eyebrow, .label { text-transform: uppercase; letter-spacing: .11em; font-size: .74rem; color: #6f6a60; }
.tagline { font-size: 1.15rem; color: #575249; }
.status-card, .board-panel, .side-panel, .conversation, .access {
  background: rgba(255,255,255,.72);
  border: 1px solid #ded8cc;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,.04);
}
.status-card {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1rem;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
}
.status-card div { display: flex; flex-direction: column; gap: .25rem; }
.game-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 1.2rem; }
.board-panel, .side-panel, .conversation, .access { padding: 1.2rem; }
.board {
  width: min(100%, 680px);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(8,1fr);
  border: 8px solid #2a2824;
  margin: 0 auto;
}
.square {
  position: relative;
  display: grid;
  place-items: center;
  font-size: clamp(1.7rem, 5vw, 4.4rem);
  user-select: none;
}
.square.light { background: #ece4d2; }
.square.dark { background: #7f8b78; }
.square .coord {
  position: absolute;
  font-size: .58rem;
  opacity: .55;
}
.square .file { bottom: 2px; right: 4px; }
.square .rank { top: 2px; left: 4px; }
.move-entry, .comment-form { margin-top: 1rem; }
.row { display: flex; gap: .6rem; align-items: center; }
.row input { flex: 1; }
.side-panel section + section { border-top: 1px solid #ddd6ca; margin-top: 1.2rem; padding-top: 1.2rem; }
.moves { line-height: 1.8; }
.vote-line, .comment {
  padding: .7rem 0;
  border-bottom: 1px solid #e1dbd0;
}
.vote-line { display: flex; justify-content: space-between; gap: 1rem; }
.conversation, .access { margin-top: 1.2rem; }
.comments:empty::before { content: "No comments yet."; color: #777; }
.comment strong { display: block; margin-bottom: .2rem; }
.comment p { margin: 0; white-space: pre-wrap; }
.comment-form { display: grid; gap: .65rem; }
.comment-form button { justify-self: start; }
.small, .hint { color: #6d685f; font-size: .92rem; }
.hint { margin: .45rem 0 0; }
.hidden { display: none !important; }

@media (max-width: 760px) {
  .status-card { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: 1fr; }
  .row { align-items: stretch; }
}
