body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f5f5;
  margin: 0;
  color: #111;
}
.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 14px;
}
.card, .subcard {
  background: white;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.controlsCard {
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 5;
}
.hidden { display: none; }
.error { color: #b00020; min-height: 1.2em; }
.subtle { color: #666; }
label { display: block; margin-bottom: 12px; }
input, select {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  font-size: 16px;
  box-sizing: border-box;
}
button {
  padding: 12px 14px;
  font-size: 16px;
  cursor: pointer;
}
.buttonRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.topRow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.identityBlock {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.identityName {
  font-size: 18px;
}
.miniStats {
  font-size: 14px;
  color: #555;
}
.statusPill {
  background: #eee;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #ccc;
  min-width: 120px;
  text-align: center;
}
.wordBox {
  font-size: 24px;
  font-weight: bold;
  padding: 12px;
  border: 1px solid #ddd;
  background: #fafafa;
  border-radius: 8px;
  text-align: center;
}
.playerRows {
  display: grid;
  gap: 10px;
}
.playerRow {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  background: #fafafa;
}
.playerRow.clickable {
  cursor: pointer;
  border-color: #888;
}
.playerRow.clickable:hover {
  background: #f0f0f0;
}
.playerRow.selected {
  border-color: #2a6df4;
  background: #eaf1ff;
}
.playerNameRow {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.playerName {
  font-weight: bold;
  font-size: 17px;
}
.playerMeta {
  font-size: 14px;
  color: #555;
}
.answerLine {
  display: flex;
  gap: 8px;
  margin: 4px 0;
  font-size: 15px;
}
.answerLabel {
  width: 32px;
  flex: 0 0 32px;
  font-weight: bold;
}
.answerValue {
  flex: 1 1 auto;
  word-break: break-word;
}
.answerMeta {
  display: flex;
  justify-content: flex-end;
  margin: 6px 0 10px;
  color: #666;
  font-size: 14px;
}
ul {
  margin-top: 8px;
}
@media (max-width: 700px) {
  .topRow { flex-direction: row; align-items: flex-start; }
  .statusPill { min-width: auto; }
  .page { padding: 10px; }
  .card, .subcard { padding: 12px; margin-bottom: 10px; }
  .controlsCard { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  button { width: 100%; }
  .buttonRow { display: grid; grid-template-columns: 1fr; }
}


.clickableStatus {
  cursor: pointer;
  user-select: none;
}

.answerCard {
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 5;
}

.miniStats.clickableStatus {
  display: inline-block;
}


.modeOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modeOverlay.hidden {
  display: none;
}

.modeModal {
  width: min(420px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 18px;
  box-sizing: border-box;
}

.modeModal h2 {
  margin-top: 0;
}
