body.player .player-main {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}

body.player .card { padding: 12px; }

#slotButtons { flex-wrap: wrap; }
#slotButtons button { min-width: 72px; }

/* ---- status strip ---- */
.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
}
.status-strip .pair {
  text-align: center;
}
.status-strip .label {
  color: var(--dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.status-strip .value {
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.status-strip .value#myTime.warn { color: var(--warn); }
.status-strip .value#myTime.danger { color: var(--bad); animation: pulse 0.6s infinite alternate; }
@keyframes pulse {
  from { opacity: 1; }
  to { opacity: 0.6; }
}

/* ---- mini grid ---- */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #3b2d1d;
  padding: 8px;
  border-radius: 14px;
  border: 2px solid #1b1208;
  max-width: 320px;
  margin: 0 auto;
}
.mini-cell {
  background: linear-gradient(180deg, #fffbe5 0%, #f3dca1 100%);
  color: var(--tile-text);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: 900;
  font-size: clamp(1.4rem, 7vw, 2.4rem);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.12);
  user-select: none;
}
.mini-cell.qu { font-size: clamp(1.1rem, 5.5vw, 1.9rem); }

/* ---- word entry ---- */
.word-form {
  display: flex;
  gap: 8px;
}
.word-form input {
  flex: 1;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.word-form button { font-weight: 700; }

.guess-feedback {
  min-height: 1.4em;
  font-weight: 600;
  text-align: center;
  padding: 2px 0;
}
.guess-feedback.good { color: var(--good); }
.guess-feedback.bad { color: var(--bad); }
.guess-feedback.warn { color: var(--warn); }

/* ---- word list ---- */
.wordlist-heading {
  margin: 4px 0 2px;
  color: var(--dim);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wordlist {
  list-style: none;
  margin: 0;
  padding: 6px 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 45vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column-reverse;   /* most recent on top */
  gap: 2px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.wordlist li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 2px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.06);
  animation: slideIn 0.2s ease-out;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.wordlist li .pts { color: var(--dim); font-size: 0.8rem; }

/* ---- waiting view ---- */
#waiting { display: flex; flex-direction: column; gap: 10px; }
.waiting-head .row { margin-top: 10px; }
/* Action row (Start round / Back to lobby) spans the full card width so the
   primary button is the same visual width as a scoreline row below it. */
.waiting-head .row.actions {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.waiting-head .row.actions button {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.05rem;
}
.waiting-head .row.actions button.big { font-size: 1.15rem; font-weight: 800; letter-spacing: 0.02em; }
.waiting-scoreboard {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.waiting-scoreboard .scoreline {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.waiting-scoreboard .scoreline.me { border-color: var(--accent); }
.waiting-scoreboard .scoreline.winner { background: rgba(245, 200, 66, 0.15); border-color: var(--accent); font-weight: 700; }

/* Longest-word bonus banner (shown to everyone on the waiting view). */
.longest-banner {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(245, 200, 66, 0.12);
  border: 1px solid var(--accent);
  border-radius: 10px;
  line-height: 1.4;
}
.longest-banner .label {
  color: var(--accent);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.longest-banner .words { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-weight: 700; }
.longest-banner .credit { color: var(--dim); font-size: 0.85rem; }
.longest-banner.mine { background: rgba(34, 197, 94, 0.14); border-color: var(--good); }
.longest-banner.mine .label { color: var(--good); }

/* ---- round review (categorized word lists on the phone) ---- */
.review-title { margin: 0; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; }
.review-section + .review-section { margin-top: 10px; }
.review-head {
  margin: 0 0 4px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.review-head .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.review-head.common .dot { background: var(--dim); }
.review-head.unique .dot { background: var(--good); }
.review-head.missed .dot { background: var(--bad); }
.review-head.common { color: var(--dim); }
.review-head.unique { color: var(--good); }
.review-head.missed { color: var(--bad); }
.review-list {
  list-style: none;
  margin: 0;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 2px 8px;
  max-height: 32vh;
  overflow-y: auto;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9rem;
}
.review-list li {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}
.review-list li .pts { font-size: 0.75rem; opacity: 0.7; }
.review-list.common li { color: var(--dim); }
.review-list.unique li { color: var(--good); }
.review-list.missed li { color: var(--bad); }
.review-list li.empty { grid-column: 1 / -1; color: var(--dim); text-align: center; font-style: italic; opacity: 0.7; padding: 4px; }
