:root {
  color: #f4efe4;
  background: #10261e;
  font: 16px/1.4 "Segoe UI", sans-serif;
}

body { margin: 0; }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

h1 { font-size: 1.6rem; margin: 0 52px 12px 0; }

#leave {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
}

#leave:hover { background: #1f6b4a; }

button, input {
  font: inherit;
  color: inherit;
}

button {
  background: #1f6b4a;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 44px;
  cursor: pointer;
}

button[aria-pressed="true"] { outline: 3px solid #e6c35c; }

button:disabled {
  background: transparent;
  border: 1px solid #1f6b4a;
  cursor: default;
  color: #f4efe4;
}

form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

#hand {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
}

#hand button {
  background: #ffffff;
  color: #1a1a1a;
  border: 2px solid #e6c35c;
  border-radius: 12px 0 0 0;
}

#hand button.red { color: #d01212; }

#hand button:disabled {
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid #d4cbbc;
  opacity: 0.48;
}

#hand button.red:disabled { color: #d01212; }

#hand button[aria-pressed="true"] {
  border-width: 3px;
  outline: none;
}

label { display: flex; flex-direction: column; gap: 4px; }

input {
  background: #0e2a22;
  border: 1px solid #d7c4a3;
  border-radius: 8px;
  padding: 8px;
  min-height: 44px;
}

#board-wrap { position: relative; }

canvas {
  width: 100%;
  height: 520px;
  background: #14382c;
  border-radius: 16px;
  display: block;
}

#board-message {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 86%;
  text-align: center;
  pointer-events: none;
  color: #f4efe4;
  text-shadow: 0 1px 2px #0a1f18;
  line-height: 1.15;
}

#board-message p { margin: 0; }

#board-message button {
  pointer-events: auto;
  min-height: 0;
  padding: 0 12px;
  line-height: 1.15;
}

#cover { margin: 0; }

#menu-status { min-height: 1.4em; }
