.pictionary-page {
  --accent: #1d2926;
  padding-top: 104px;
  padding-bottom: 60px;
}
.pictionary-page.absurd {
  --accent: #7b3fc9;
}
.pictionary-page h1 {
  font-size: clamp(36px, 5vw, 60px);
}
.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}
.pictionary-controls {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.control-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.pictionary-controls select,
.pictionary-page button {
  padding: 12px 16px;
  border: 1px solid #cbd4c5;
  border-radius: 8px;
  background: white;
  font: inherit;
  color: var(--ink);
  max-width: 100%;
  cursor: pointer;
}
.pictionary-page button:disabled {
  opacity: 0.5;
  cursor: default;
}
.pictionary-page button.primary {
  background: var(--lime);
  font-weight: 600;
}
.seg {
  display: inline-flex;
}
.seg button {
  border-radius: 0;
}
.seg button:first-child {
  border-radius: 8px 0 0 8px;
}
.seg button:last-child {
  border-radius: 0 8px 8px 0;
  margin-left: -1px;
}
.seg button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 600;
}
.limits {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.pictionary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 22px;
}
.pictionary-card {
  min-width: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.pictionary-label {
  margin: 0 0 10px;
  font: 600 12px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* target word + timer */
.prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 40px;
  margin-bottom: 12px;
}
.prompt-word {
  font-size: 22px;
  font-weight: 700;
}
.prompt-word span {
  color: var(--accent);
}
.prompt-timer {
  margin-left: auto;
  font: 600 20px var(--mono);
}
.prompt.won .prompt-word span,
.prompt.won .prompt-timer {
  color: #2b8a3e;
}

/* canvas */
.pad {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  touch-action: none;
  cursor: crosshair;
}
.pad canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.pad-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #a3aba0;
}
.pad-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: #2b8a3e;
  color: white;
  font-weight: 700;
  white-space: nowrap;
}
.prompt[hidden],
.pad-banner[hidden],
.pad-hint[hidden] {
  display: none;
}
.pad-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.pad-tools .push {
  margin-left: auto;
}

/* guesses */
.guess-lead {
  color: var(--muted);
  font-size: 16px;
}
.guess-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.guess-name {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.guess-pct {
  font: 600 20px var(--mono);
  color: var(--muted);
}
.guess-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 10px 0 20px;
}
.guess-meta dt {
  font-size: 11px;
  color: var(--muted);
}
.guess-meta dd {
  margin: 0;
  font: 600 14px var(--mono);
}
.board {
  display: grid;
  gap: 6px;
}
.board-row {
  display: grid;
  grid-template-columns: 150px 1fr 48px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.board-row .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.board-row.top .name {
  color: var(--ink);
  font-weight: 600;
}
.board-row.target .name::after {
  content: " ◎";
  color: var(--accent);
}
.board-row .track {
  height: 14px;
  overflow: hidden;
  border-radius: 4px;
  background: #edf1e7;
}
.board-row .fill {
  width: 0;
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
  opacity: 0.35;
  transition: width 0.3s ease-out;
}
.board-row.top .fill {
  opacity: 1;
}
.board-row .value {
  text-align: right;
  font: 12px var(--mono);
  color: var(--muted);
}
.words {
  margin: 18px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.response-inspector {
  margin-top: 22px;
}
.response-inspector summary {
  cursor: pointer;
  font-weight: 600;
}
.response-inspector pre {
  max-height: 360px;
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  background: #1d2926;
  color: #e7ecdf;
  font: 12px/1.5 var(--mono);
}

@media (max-width: 820px) {
  .pictionary-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .board-row .fill {
    transition: none;
  }
}
