:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #5e655d;
  --paper: #f5f2e9;
  --panel: #fffdf7;
  --line: #d8d0bf;
  --accent: #18a36f;
  --accent-strong: #11845a;
  --card: #f7cb46;
  --card-ink: #201a0d;
  --gold: #b37610;
  --notice: #6a6f68;
  --shadow: 0 18px 42px rgba(36, 30, 18, 0.13);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 23, 23, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px, 24px 24px, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  align-items: stretch;
}

.game {
  width: 100%;
  min-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.topbar {
  padding: 4px 0 10px;
  border-bottom: 3px solid var(--ink);
}

.date,
.answer-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.edition {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 2px 0 0;
  font-size: 2.82rem;
  font-weight: 900;
  line-height: 0.92;
  white-space: nowrap;
}

.topbar h1 {
  font-family: Georgia, "Times New Roman", serif;
}

.dek {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.1;
}

.mobile-break {
  display: none;
}

.subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
}

.rules-link {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.rules-link:hover {
  color: var(--accent);
}

.rules-link-primary {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(23, 23, 23, 0.16);
  font-size: 0.82rem;
}

.rules-link-primary:hover {
  background: var(--accent);
  color: #fff;
}

.header-links {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.secondary-links {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.clock {
  justify-self: start;
  min-height: 34px;
  margin: 0;
  padding: 8px 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.room-divider {
  display: grid;
  gap: 15px;
  margin: 12px 0 15px;
}

.room-divider-line {
  height: 3px;
  background: var(--ink);
}

.room-divider.no-yesterday .room-divider-line {
  display: none;
}

.prompt-panel {
  padding: 17px 18px 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.12);
}

.prompt-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 9px;
  border-bottom: 2px solid rgba(32, 26, 13, 0.18);
}

.room-label,
.prompt-panel .date,
.prompt-panel .edition,
.reveal-meta p {
  color: rgba(32, 26, 13, 0.68);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

.prompt-panel .date {
  text-align: right;
  align-self: center;
}

.prompt-panel .room-label {
  align-self: center;
}

.prompt-panel h2 {
  margin: 15px 0 0;
  font-size: 1.92rem;
  line-height: 1.06;
}

.answer-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 54px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--panel);
  color: var(--ink);
  font-size: 1rem;
  outline: none;
}

textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

button {
  min-height: 54px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 900;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.message {
  min-height: 24px;
  margin: 0;
  color: var(--notice);
  font-weight: 700;
}

.results {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.1);
}

.locked-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.read-card {
  min-width: 0;
  min-height: 172px;
  display: grid;
  grid-template-rows: 42px 1fr;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.18);
}

.read-card-top {
  display: flex;
  align-items: center;
  padding: 10px 12px 8px;
  border-bottom: 5px solid var(--ink);
}

.read-card-top p {
  margin: 0;
  color: inherit;
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.read-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 12px 13px;
}

.locked-answer {
  max-width: 100%;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 0.98;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.locked-answer.long-word {
  font-size: 1.36rem;
  line-height: 1;
  word-break: break-word;
}

.locked-answer.very-long-word {
  font-size: 1.12rem;
  line-height: 1.04;
}

.signal-card .read-card-body {
  justify-content: stretch;
  padding: 11px 12px 10px;
}

.read-meter {
  --needle-angle: -90deg;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.dial-wrap {
  width: min(100%, 170px);
  height: 74px;
  overflow: hidden;
  position: relative;
}

.dial-track {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto;
  border-radius: 999px;
  background:
    conic-gradient(
      from 270deg,
      #6fa9cf 0deg 45deg,
      #f2c94c 45deg 90deg,
      #dc852c 90deg 135deg,
      #c83e36 135deg 180deg,
      transparent 180deg 360deg
    );
  border: 2px solid var(--ink);
}

.dial-track::after {
  content: "";
  position: absolute;
  inset: 15px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid rgba(23, 23, 23, 0.12);
}

.dial-needle {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 72px;
  width: 4px;
  height: 58px;
  border-radius: 999px;
  background: var(--ink);
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(var(--needle-angle));
  transition: transform 260ms ease;
}

.dial-hub {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 66px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  transform: translateX(-50%);
}

.read-meter.signal-too-early .dial-track {
  filter: grayscale(0.75);
  opacity: 0.72;
}

.read-meter.signal-too-early .dial-needle,
.read-meter.signal-too-early .dial-hub {
  opacity: 0.45;
}

.dial-label {
  margin-top: -2px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.dial-scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 172px);
  gap: 0;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.dial-scale span {
  display: block;
}

.rank {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.records {
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.1);
}

.records-head {
  padding: 7px 10px 6px;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.stats-strip div {
  min-width: 0;
  padding: 11px 6px;
  text-align: center;
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.record-lifetime {
  grid-column: span 2;
}

.record-run {
  grid-column: span 3;
  border-bottom: 0 !important;
}

.stats-strip .record-lifetime:nth-child(3),
.stats-strip div:last-child {
  border-right: 0;
}

.stats-strip span {
  display: block;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 950;
  line-height: 1;
}

.stats-strip p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.share-panel {
  display: grid;
  gap: 8px;
  margin: 0;
}

.share-panel button {
  background: var(--accent);
  color: white;
  box-shadow: 3px 3px 0 var(--ink);
}

.share-panel button:hover {
  background: var(--accent-strong);
}

.email-panel {
  margin-top: 12px;
}

.email-form {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.12);
}

.email-title {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.1;
}

.email-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
}

.email-row input {
  min-height: 48px;
  width: 100%;
  padding: 0 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
}

.email-row button {
  min-height: 48px;
  padding-inline: 10px;
  font-size: 0.8rem;
}

.email-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.email-consent input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  accent-color: var(--green);
}

.email-consent span {
  display: block;
  min-width: 0;
}

.group-panel,
.group-detail {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.12);
}

.group-panel-head,
.group-detail-head,
.group-share-row,
.group-owner-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.group-panel h3,
.group-detail h2,
.group-section h3 {
  margin: 0;
  line-height: 1.05;
}

.group-panel h3,
.group-section h3 {
  font-size: 1.2rem;
}

.group-detail h2 {
  margin-top: 3px;
  font-size: 1.7rem;
}

.group-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) auto;
  gap: 8px;
}

.group-join-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.group-form input,
.group-owner-actions input,
.group-share-row input {
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 0.92rem;
  font-weight: 650;
}

.group-form button,
.group-owner-actions button,
.group-share-row button,
.group-panel-head button,
.leave-group-button {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 0.78rem;
}

.group-panel-head button,
.group-form button,
.group-share-row button {
  background: var(--accent);
  color: #fff;
}

.group-list,
.group-results {
  display: grid;
  gap: 8px;
}

.group-list-item,
.group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
}

.group-list-item strong,
.group-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.group-list-item span,
.group-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: right;
}

.group-row span {
  min-width: 0;
  color: var(--ink);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.group-row.is-you {
  border-color: var(--accent);
  background: rgba(24, 163, 111, 0.08);
}

.group-section {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 2px solid var(--line);
}

.group-section > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
}

.leave-group-button {
  background: var(--ink);
  color: #fff;
}

.board-card {
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.16);
}

.board-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 2px solid rgba(32, 26, 13, 0.18);
}

.board-card h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1;
}

.board-list,
.board-preview-list {
  display: grid;
  gap: 8px;
}

.board-row,
.board-preview-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 3px 3px 0 rgba(23, 23, 23, 0.12);
}

.board-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
}

.board-row.flipped {
  animation: board-flip 560ms ease both;
}

.board-rank {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--card);
  font-weight: 950;
}

.board-row strong,
.board-preview-row strong {
  min-width: 0;
  font-size: 1rem;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.board-preview-row-admin {
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
}

.board-preview-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.board-preview-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.reveal-image-admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.upload-reveal-image {
  background: var(--accent);
  color: #fff;
}

.reveal-image-admin-thumb {
  grid-column: 2 / -1;
  width: min(100%, 220px);
  aspect-ratio: 16 / 9;
  border: 2px solid var(--ink);
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel);
}

.board-votes {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.board-row.hidden-answer strong,
.board-preview-row.hidden-answer strong {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
}

.preview-summary {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid var(--line);
}

.preview-summary-head {
  margin-bottom: 4px;
}

.preview-summary-head h4,
.preview-summary-head p {
  margin: 0;
}

.preview-summary-head h4 {
  font-size: 1.2rem;
  line-height: 1;
}

.preview-summary-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
}

.preview-summary-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.72);
}

.preview-rank {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 950;
}

.preview-answer {
  min-width: 0;
}

.preview-answer strong {
  display: block;
  font-weight: 950;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.preview-answer small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.preview-percent {
  color: var(--muted);
  font-weight: 950;
  text-align: right;
}

.notable-admin {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(247, 203, 70, 0.18);
  box-shadow: 3px 3px 0 rgba(23, 23, 23, 0.1);
}

.notable-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notable-admin h4,
.notable-admin p {
  margin: 0;
}

.notable-admin h4 {
  font-size: 1.2rem;
}

.notable-admin-head p,
.notable-admin-row p {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.notable-admin-list {
  display: grid;
  gap: 0;
  padding-top: 4px;
}

.notable-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(23, 23, 23, 0.14);
  background: transparent;
}

.notable-admin-row:last-child {
  border-bottom: 0;
}

.notable-admin-copy {
  display: grid;
  grid-template-columns: auto auto minmax(90px, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.notable-dash {
  color: var(--muted);
  font-weight: 900;
}

.notable-admin-copy input {
  min-height: 32px;
  padding: 4px 7px;
  border-width: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 0.86rem;
  font-weight: 850;
}

.notable-admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.notable-answer-button {
  background: var(--card);
  color: var(--ink);
}

@keyframes board-flip {
  0% {
    transform: rotateX(0deg);
  }
  45% {
    transform: rotateX(88deg);
  }
  100% {
    transform: rotateX(0deg);
  }
}

.answer-row button {
  box-shadow: 3px 3px 0 var(--ink);
}

.results {
  padding: 18px;
}

.results-head {
  margin-bottom: 13px;
}

.reveal-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 2px solid rgba(32, 26, 13, 0.18);
}

.results h3 {
  margin: 0;
  font-size: 1.45rem;
}

.results-head > div {
  min-width: 0;
}

.reveal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reveal-meta p {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  white-space: normal;
}

.reveal-meta p:last-child {
  text-align: right;
}

#totalAnswers {
  margin: 0;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.results .reveal-question,
.results.reveal-pending .empty-note {
  min-width: 0;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.36rem;
  font-weight: 600;
  line-height: 1.18;
  white-space: normal;
  box-shadow: none;
}

.results.reveal-pending .empty-note {
  margin-top: 0;
}

.results .reveal-question::before {
  content: none;
}

.rules-page {
  min-height: auto;
}

.rules-card {
  padding: 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.1);
}

.rules-card h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
  line-height: 1;
}

.rules-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.4;
}

.rules-card p + p {
  margin-top: 10px;
}

.rules-card strong {
  color: var(--ink);
  font-weight: 950;
}

.bars {
  display: grid;
  gap: 9px;
}

.result-spotlight {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 50px;
  gap: 9px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px 9px 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.13);
  overflow: hidden;
}

.result-spotlight::before {
  content: none;
}

.result-spotlight strong {
  display: block;
  margin: 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.result-spotlight p {
  margin: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  text-align: right;
}

.result-rank {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.result-spotlight .result-rank {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 30px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.76rem;
  box-shadow: 2px 2px 0 var(--ink);
}

.result-rank-row {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 9px;
  min-height: var(--row-height, 54px);
  padding: 9px 10px 9px 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.13);
  overflow: hidden;
}

.result-rank-row:nth-child(odd) {
  transform: translateX(3px);
}

.result-rank-row .result-rank {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 30px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.76rem;
  box-shadow: 2px 2px 0 var(--ink);
}

.result-rank-row strong {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.result-rank-with-image:not(.result-rank-feature-image) {
  grid-template-columns: 46px minmax(0, 1fr) 48px 58px;
}

.result-rank-image {
  display: block;
  width: 58px;
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 6px;
  object-fit: cover;
  background: var(--panel);
}

.result-rank-feature-image {
  grid-template-columns: 46px minmax(0, 1fr) 48px;
}

.result-rank-feature-image .result-rank-image {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 1;
  margin-top: 4px;
  border-radius: 8px;
}

.result-rank-2 {
  --row-height: 54px;
}

.result-rank-3 {
  --row-height: 54px;
}

.result-rank-4 {
  --row-height: 54px;
}

.result-rank-5 {
  --row-height: 54px;
}

.percent {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-weight: 900;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.full-scoreboard {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 3px solid var(--ink);
}

.notable-card {
  margin-top: 0;
  width: 100%;
}

.notable-list {
  display: none;
  gap: 0;
  margin-top: 12px;
  padding: 11px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 3px 3px 0 rgba(23, 23, 23, 0.1);
}

.notable-card.expanded .notable-list {
  display: grid;
}

.notable-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  column-gap: 5px;
  row-gap: 2px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid rgba(23, 23, 23, 0.14);
}

.notable-item:last-child {
  border-bottom: 0;
}

.notable-item strong {
  min-width: auto;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.notable-item span {
  color: var(--ink);
  font-size: inherit;
  font-weight: 700;
}

.notable-item p {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: inherit;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}

.notable-item-empty-comment span,
.notable-item-empty-comment p {
  display: none;
}

.full-scoreboard-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.full-scoreboard h4 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1;
}

.reveal-scoreboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.reveal-read-card {
  min-height: 150px;
  max-width: 280px;
}

.reveal-read-card .read-card-body {
  min-height: 112px;
}

.scoreboard-toggle-stack {
  --scoreboard-button-width: min(100%, 280px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.scoreboard-toggle,
.scoreboard-subtoggle {
  position: relative;
  min-height: 48px;
  width: var(--scoreboard-button-width, min(100%, 230px));
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 48px 8px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(23, 23, 23, 0.18);
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.scoreboard-toggle::after,
.scoreboard-subtoggle::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--panel);
  transform: translateY(-50%);
}

.scoreboard-toggle::before,
.scoreboard-subtoggle::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 16px;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 16px 3px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 3px 16px no-repeat;
  transform: translateY(-50%);
}

.scoreboard-toggle[aria-expanded="true"]::before,
.scoreboard-subtoggle[aria-expanded="true"]::before {
  background: linear-gradient(var(--ink), var(--ink)) center / 16px 3px no-repeat;
}

.scoreboard-toggle:hover,
.scoreboard-subtoggle:hover {
  background: var(--accent);
  color: #fff;
}

.scoreboard-list {
  display: none;
  gap: 10px;
  margin: 2px 0 10px;
}

.full-scoreboard.expanded .scoreboard-list {
  display: grid;
}

.scoreboard-unclustered-list {
  display: none;
  margin: 2px 0 10px;
}

.scoreboard-unclustered-list.expanded {
  display: block;
}

.scoreboard-cluster {
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 3px 3px 0 rgba(23, 23, 23, 0.12);
}

.scoreboard-unclustered {
  background: var(--panel);
}

.scoreboard-unclustered-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.scoreboard-unclustered-head span {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.scoreboard-cluster-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.scoreboard-cluster-head span {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 950;
}

.scoreboard-cluster-head strong {
  min-width: 0;
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.scoreboard-cluster-head p {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.scoreboard-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.scoreboard-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1;
}

.scoreboard-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.scoreboard-chip strong {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  border-radius: 999px;
  background: #ede7d9;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
}

.scoreboard-unclustered-body {
  margin-top: 10px;
}

.admin-shell {
  width: min(100%, 720px);
}

.text-link {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.text-link:hover {
  color: var(--accent-strong);
}

.admin-panel {
  padding: 18px;
}

.admin-form {
  display: grid;
  gap: 10px;
}

.admin-form button {
  margin-top: 4px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tab-button {
  min-height: 46px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
}

.tab-button:hover,
.tab-button.active {
  background: var(--ink);
  color: var(--paper);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.email-admin-grid {
  display: grid;
  gap: 14px;
}

.email-admin-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--shadow);
}

.email-admin-card h3 {
  margin: 0;
}

.email-queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-queue-actions .danger-button[aria-pressed="true"] {
  background: #c93d2b;
  color: #fff;
}

.compact-head {
  margin-bottom: 0;
}

.admin-group-list {
  display: grid;
  gap: 12px;
}

.admin-group-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--shadow);
}

.admin-group-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.admin-group-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.admin-group-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-group-head a {
  padding: 8px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.admin-group-meta,
.admin-group-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-group-meta span,
.admin-group-member {
  padding: 5px 8px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.admin-group-member {
  color: var(--ink);
  background: #fffdf7;
}

.admin-group-member.inactive {
  opacity: 0.55;
}

.subscriber-list {
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow: auto;
}

.subscriber-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fffdf7;
}

.subscriber-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.subscriber-row span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.subscriber-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
}

.subscriber-row.inactive {
  opacity: 0.58;
}

.subscriber-row.inactive span {
  color: var(--muted);
}

.question-list {
  display: grid;
  gap: 10px;
}

.idea-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.idea-filter-row select {
  width: auto;
  min-height: 34px;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 900;
}

.duplicate-list {
  display: grid;
  gap: 10px;
}

.duplicate-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
}

.duplicate-row strong {
  display: block;
  font-weight: 950;
  line-height: 1.2;
}

.duplicate-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.schedule-calendar-wrap {
  position: relative;
}

.schedule-calendar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.calendar-day {
  position: relative;
  min-height: 94px;
  width: 100%;
  display: grid;
  gap: 5px;
  align-content: start;
  padding: 9px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  text-align: left;
  box-shadow: none;
}

.calendar-day:hover,
.calendar-day.selected {
  background: #f1ede1;
}

.calendar-day.scheduled {
  border-color: var(--accent);
  background: rgba(24, 163, 111, 0.1);
  color: var(--ink);
}

.calendar-day.selected {
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.calendar-date {
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.calendar-day strong {
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.calendar-day small {
  display: -webkit-box;
  overflow: hidden;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.calendar-clear-button {
  min-height: 30px;
  width: auto;
  margin-top: 4px;
  padding: 0 8px;
  border-width: 1px;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
}

.calendar-tooltip {
  position: absolute;
  z-index: 5;
  width: 260px;
  max-width: calc(100% - 16px);
  padding: 10px 11px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.18);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.25;
}

.question-row {
  min-height: auto;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 82px;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
  color: var(--ink);
  text-align: left;
}

.question-row:hover {
  background: #edf2ea;
}

.question-date,
.question-source {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.question-copy strong {
  display: block;
  min-width: 0;
  font-weight: 850;
  line-height: 1.25;
}

.question-copy small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
}

.question-source {
  text-align: right;
}

.idea-list {
  display: grid;
  gap: 10px;
}

.idea-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px 96px;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
}

.idea-copy strong {
  display: block;
  font-weight: 950;
  line-height: 1.25;
}

.idea-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
}

.idea-copy small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.rubric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rubric-grid label {
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.rubric-grid input {
  min-height: 42px;
  margin-top: 5px;
  padding: 0 8px;
  text-align: center;
}

.idea-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 78px;
  gap: 8px;
}

.idea-actions input {
  min-height: 42px;
  padding: 0 8px;
  font-size: 0.86rem;
}

.idea-actions button {
  min-height: 42px;
  padding: 0 8px;
  font-size: 0.82rem;
}

.idea-archive {
  background: var(--muted);
}

.idea-archive:hover {
  background: #444c45;
}

.idea-status {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

.admin-question {
  margin: -4px 0 20px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
  white-space: normal;
}

.admin-panel .empty-note,
.admin-section > .empty-note,
.cluster-list > .empty-note,
.suggestion-list > .empty-note,
.admin-question {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-alert:empty {
  display: none;
}

.ai-mode-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.ai-mode-panel h3,
.ai-mode-panel p {
  margin: 0;
}

.ai-mode-panel h3 {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.ai-mode-panel p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
}

.ai-mode-toggle {
  min-height: 42px;
  width: auto;
  padding: 0 12px;
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.ai-mode-panel.automatic {
  border-color: #b42318;
  background: #fff0ed;
  box-shadow: 3px 3px 0 rgba(180, 35, 24, 0.18);
}

.ai-mode-panel.automatic h3,
.ai-mode-panel.automatic p {
  color: #8f1d14;
}

.ai-mode-panel.automatic .ai-mode-toggle {
  background: #b42318;
  color: #fff;
}

.danger-title {
  color: #8f1d14;
}

.danger-text {
  color: #b42318 !important;
}

.ai-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ai-control-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.ai-control-grid input[type="number"] {
  min-height: 42px;
  padding: 8px 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 750;
}

.ai-control-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.ai-control-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.ai-control-actions {
  justify-content: flex-start;
  margin-top: 12px;
}

.ai-scan-summary {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.ai-scan-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0 0;
  border-top: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-scan-group {
  display: grid;
  gap: 8px;
}

.ai-scan-group h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
}

.ai-scan-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.ai-scan-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ai-scan-card-head strong {
  font-weight: 900;
}

.ai-scan-card-head span,
.ai-scan-card p {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.25;
}

.ai-scan-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.cluster-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(120px, 160px));
  gap: 10px;
  align-items: end;
  margin: 0;
}

.cluster-edit .answer-label {
  grid-column: 1 / -1;
  margin: 0;
}

.cluster-edit .secondary-action {
  background: var(--ink);
}

.two-line-button {
  display: grid;
  place-items: center;
  gap: 1px;
  line-height: 1.05;
}

.two-line-button small {
  display: block;
  font-size: 0.68rem;
  font-weight: 850;
  opacity: 0.82;
}

.cluster-workbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  margin-top: 14px;
  margin-bottom: 20px;
  padding: 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 4px 4px 0 rgba(15, 15, 14, 0.18);
}

.selected-answer-tray {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid var(--line);
}

.selected-answer-tray span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cluster-review-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cluster-review-actions p {
  margin: 0;
}

.cluster-list {
  display: grid;
  gap: 12px;
}

#savedClusterList > .empty-note {
  margin: 14px 0 20px;
  line-height: 1.45;
}

#clusterList > .empty-note {
  margin: 12px 0 18px;
}

.subsection-title {
  margin: 34px 0 12px;
  padding-top: 18px;
  border-top: 3px solid var(--ink);
  font-size: 1.18rem;
}

.cluster-workbar + .subsection-title {
  margin-top: 22px;
}

.suggestion-list {
  display: grid;
  gap: 10px;
}

.cluster-group,
.suggestion-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
  padding: 12px;
  overflow-wrap: anywhere;
}

.singleton-group {
  background: var(--panel);
}

.saved-cluster-group {
  border-color: var(--ink);
  background: #fff5bd;
}

.cluster-head,
.suggestion-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.suggestion-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.suggestion-title-wrap {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.cluster-title {
  min-height: auto;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 950;
  text-align: left;
}

.suggestion-title {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.15;
}

.cluster-title:hover {
  background: transparent;
  color: var(--accent);
}

.small-button {
  min-height: 38px;
  width: auto;
  padding: 0 12px;
  font-size: 0.82rem;
}

.danger-button {
  background: #b42318;
}

.danger-button:hover {
  background: #8f1d14;
}

.use-label-button {
  flex: 0 0 auto;
}

.load-suggestion-button {
  flex: 0 0 auto;
}

.cluster-meta {
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.suggestion-reason {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.answer-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.saved-answer-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.answer-chip {
  min-height: 38px;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 850;
}

.answer-chip:hover,
.answer-chip.selected {
  background: var(--accent);
  color: white;
}

.answer-chip strong {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(24, 24, 24, 0.08);
  text-align: center;
  font-size: 0.78rem;
}

.answer-chip.selected strong {
  background: rgba(255, 255, 255, 0.22);
}

.mini-release-button {
  min-height: 32px;
  width: auto;
  padding: 0 8px;
  border-width: 1px;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
}

.empty-note {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 390px) {
  .shell {
    padding: 14px;
  }

  .answer-row {
    grid-template-columns: 1fr;
  }

  .email-row {
    grid-template-columns: 1fr;
  }

  .group-panel-head,
  .group-detail-head,
  .group-share-row,
  .group-owner-actions,
  .admin-group-head,
  .group-form,
  .group-join-form {
    grid-template-columns: 1fr;
  }

  .group-row {
    grid-template-columns: 1fr;
  }

  .group-row p {
    text-align: left;
  }

  button {
    width: 100%;
  }

  h1 {
    font-size: 2.2rem;
  }

  .prompt-panel h2 {
    font-size: 1.68rem;
  }

}

@media (max-width: 520px) {
  .mobile-break {
    display: block;
  }

  .full-scoreboard-head,
  .scoreboard-cluster-head {
    align-items: start;
  }

  .full-scoreboard-head {
    flex-direction: column;
    gap: 6px;
  }

  .reveal-scoreboard-grid {
    grid-template-columns: 1fr;
  }

  .scoreboard-toggle-stack {
    --scoreboard-button-width: min(100%, 230px);
  }

  .scoreboard-cluster-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .scoreboard-cluster-head p {
    grid-column: 2;
    white-space: normal;
  }

}

@media (max-width: 340px) {
  h1 {
    font-size: 2rem;
  }

  .dek {
    font-size: 0.82rem;
  }

  .prompt-panel h2 {
    font-size: 1.54rem;
  }
}

@media (max-width: 560px) {
  .admin-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .question-row,
  .idea-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .schedule-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-source,
  .idea-status {
    text-align: left;
  }

  .idea-actions {
    grid-template-columns: 1fr;
    margin-top: 6px;
  }

  .cluster-edit {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cluster-workbar {
    grid-template-columns: 1fr;
  }

  .cluster-edit input {
    grid-column: 1 / -1;
  }

  .cluster-edit button {
    min-width: 0;
    padding-inline: 8px;
  }

  .cluster-head,
  .suggestion-head {
    grid-template-columns: 1fr;
  }

  .cluster-review-actions {
    display: grid;
    justify-items: start;
  }

  .ai-mode-panel,
  .ai-control-grid {
    grid-template-columns: 1fr;
  }

  .ai-control-actions {
    justify-items: stretch;
  }

  .cluster-meta {
    flex: auto;
  }
}
