.front-clue-book {
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--edge);
  border-radius: 4px;
}

.front-clue-book > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: var(--linen);
  border-bottom: 1px solid var(--edge);
}

.front-clue-book > header h3 {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest);
  font-size: 1.1rem;
  line-height: 1.3;
}

.front-clue-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.front-clue-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: .8rem;
}

.front-clue-controls button[aria-pressed='true'],
.front-clue-controls button[aria-pressed='true']:hover:not(:disabled) {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}

.front-clue-scroll {
  min-width: 0;
  max-height: 240px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--edge) var(--paper);
  scrollbar-width: thin;
}

.front-clue-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--paper);
  color: var(--ink);
  font-size: .85rem;
}

.front-clue-table th:first-child {
  width: 36%;
}

.front-clue-table th:last-child {
  width: 36px;
}

.front-clue-table .front-clue-people {
  overflow-wrap: anywhere;
}

.front-clue-table .front-clue-people > span {
  display: block;
  font-weight: 700;
}

.front-clue-table td small {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.35;
}

.front-clue-table .sheet-word {
  min-height: 44px;
  min-width: 44px;
  color: var(--ink);
}

.front-clue-table .sheet-word[aria-pressed='true'] {
  border: 2px solid var(--rust);
  padding: 2px 0;
}

.front-clue-table .answer-count {
  color: var(--forest);
  font-size: 1.3rem;
}

.front-clue-empty {
  margin: 0;
  padding: 14px 12px;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.5;
}

.front-clue-book :focus-visible {
  outline: 3px solid var(--burgundy, var(--rust));
  outline-offset: -3px;
}

body.compact .front-clue-scroll {
  max-height: 160px;
}

body.compact .front-clue-book > header {
  padding: 7px 8px;
  gap: 6px;
}

body.compact .front-clue-book > header h3 {
  font-size: 1rem;
}

@media (max-width: 570px) {
  .front-clue-table th:first-child {
    width: 34%;
    font-size: .8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .front-clue-book button {
    transition: none;
  }
}

@media (forced-colors: active) {
  .front-clue-controls button[aria-pressed='true'],
  .front-clue-table .sheet-word[aria-pressed='true'] {
    border: 3px double Highlight;
  }

  .front-clue-book :focus-visible {
    outline-color: Highlight;
  }
}
