:root {
  color-scheme: light;
  --paper: #f4f0e6;
  --paper-deep: #e9e2d2;
  --paper-light: #fffdf7;
  --ink: #183149;
  --ink-soft: #52616d;
  --graphite: #667077;
  --rule: rgba(24, 49, 73, 0.17);
  --rule-strong: rgba(24, 49, 73, 0.38);
  --accent: #a13f32;
  --accent-dark: #7d2c24;
  --accent-wash: #f2d9d1;
  --gold: #8a681e;
  --shadow: rgba(55, 47, 33, 0.14);
  --hand: "Segoe Print", "Bradley Hand", "Chalkboard SE", "Marker Felt", cursive;
  --body: Aptos, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  font-size: 18px;
  scroll-behavior: smooth;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  font-family: var(--body);
  line-height: 1.5;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

button:active,
.opinion-link:active {
  transform: translateY(1px);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--paper-light);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.game-shell,
.site-footer {
  position: relative;
  z-index: 2;
  width: min(100% - 40px, 1240px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.wordmark {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  color: var(--ink);
  font-family: var(--hand);
  font-size: clamp(2.5rem, 4.4vw, 4.4rem);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transform: rotate(-0.6deg);
}

.wordmark-mark {
  position: relative;
  color: var(--accent);
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.text-button,
.clear-button,
.quiet-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.text-button {
  padding: 8px 10px;
  font-family: var(--hand);
  font-size: 1.12rem;
  font-weight: 700;
}

.text-button:hover,
.quiet-button:hover {
  color: var(--accent);
}

.game-shell {
  padding: clamp(34px, 6vw, 78px) 0 34px;
}

.round-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.65fr);
  gap: 44px;
  align-items: end;
  margin-bottom: 26px;
  padding-top: 16px;
}

.eyebrow,
.dialog-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--hand);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 800px;
  margin: 0;
  font-family: var(--hand);
  font-size: clamp(2.4rem, 3.8vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.065em;
  transform: rotate(-0.3deg);
}

.round-intro {
  max-width: 37ch;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: clamp(1.18rem, 1.9vw, 1.4rem);
  line-height: 1.55;
}

.round-intro::before {
  display: block;
  width: 46px;
  height: 2px;
  margin-bottom: 14px;
  background: var(--accent);
  content: "";
  transform: rotate(2deg);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(265px, 340px);
  gap: clamp(18px, 3vw, 32px);
  align-items: stretch;
}

.play-sheet,
.case-notes {
  position: relative;
  border: 2px solid var(--ink);
  background: rgba(255, 253, 247, 0.86);
  box-shadow: 7px 8px 0 var(--shadow);
}

.play-sheet {
  min-height: 510px;
  padding: clamp(18px, 3vw, 30px);
  padding-top: clamp(28px, 4vw, 40px);
  border-radius: 7px 15px 6px 12px / 13px 7px 15px 8px;
  background-color: rgba(255, 253, 247, 0.96);
  transform: rotate(0.08deg);
}

.play-sheet::before,
.case-notes::before {
  position: absolute;
  pointer-events: none;
  content: "";
}

.play-sheet::before {
  inset: 5px -4px -5px 4px;
  z-index: -1;
  border: 1px solid rgba(24, 49, 73, 0.34);
  transform: rotate(-0.18deg);
}

.selection-strip {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 70px;
  margin: -4px 2px 10px 0;
  padding: 17px 16px 18px;
  border: 1.6px solid rgba(24, 49, 73, 0.52);
  border-radius: 11px 4px 13px 6px / 5px 14px 7px 12px;
  background: rgba(255, 246, 207, 0.58);
  box-shadow: 3px 4px 0 rgba(55, 47, 33, 0.09);
  transform: rotate(-0.25deg);
}

.selection-strip::before {
  position: absolute;
  top: -9px;
  left: clamp(38px, 10%, 76px);
  width: 68px;
  height: 17px;
  border: 1px solid rgba(138, 104, 30, 0.16);
  background: rgba(229, 205, 122, 0.46);
  content: "";
  transform: rotate(-3deg);
}

.selection-note {
  max-width: 8ch;
  color: var(--accent);
  font-family: var(--hand);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  transform: rotate(-3deg);
}

.selection-slots {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
  gap: 10px;
  align-items: center;
}

.selection-slot {
  display: grid;
  min-height: 42px;
  place-items: center;
  padding: 7px 10px;
  border-bottom: 2px solid var(--ink);
  font-family: var(--hand);
  font-size: 1.05rem;
  text-align: center;
}

.selection-slot.has-value {
  color: var(--ink);
  font-weight: 700;
}

.combine-symbol {
  color: var(--accent);
  font-family: var(--hand);
  font-size: 1.5rem;
  font-weight: 800;
}

.clear-button {
  padding: 8px 4px;
  color: var(--accent);
  font-family: var(--hand);
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.clear-button:disabled {
  color: #8c969c;
  cursor: default;
  opacity: 0.55;
}

.feedback {
  min-height: 48px;
  padding: 14px 6px 6px;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

.feedback[data-tone="success"] {
  color: #245d49;
}

.feedback[data-tone="miss"] {
  color: var(--accent-dark);
}

.feedback[data-tone="hint"] {
  color: var(--gold);
  font-family: var(--hand);
  font-weight: 700;
}

.word-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 10px;
  align-content: flex-start;
  min-height: 265px;
  padding: 22px 8px 28px;
}

.word-card {
  position: relative;
  min-height: 48px;
  padding: 11px 17px 12px;
  border: 1.8px solid var(--ink);
  border-radius: 9px 4px 12px 5px / 5px 11px 6px 10px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 2px 3px 0 rgba(24, 49, 73, 0.1), inset 0 0 0 1px rgba(24, 49, 73, 0.05);
  cursor: pointer;
  font-family: var(--hand);
  font-size: clamp(1.02rem, 1.45vw, 1.18rem);
  font-weight: 700;
  line-height: 1.25;
  transform: rotate(var(--tilt));
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.word-card:nth-child(3n + 2) {
  border-radius: 4px 11px 5px 10px / 10px 5px 12px 6px;
  background: rgba(244, 240, 230, 0.96);
}

.word-card:nth-child(3n) {
  border-radius: 12px 5px 8px 3px / 6px 12px 5px 10px;
  background: rgba(255, 252, 241, 0.96);
}

.word-card:nth-child(4n + 1)::after {
  position: absolute;
  right: 8px;
  bottom: 4px;
  left: 11px;
  height: 1px;
  background: var(--rule);
  content: "";
  transform: rotate(-1deg);
}

.word-card:hover {
  box-shadow: 3px 5px 0 rgba(24, 49, 73, 0.14), inset 0 0 0 1px rgba(24, 49, 73, 0.06);
  transform: rotate(0deg) translateY(-2px);
}

.word-card.is-selected {
  border-color: var(--accent-dark);
  color: var(--paper-light);
  background: var(--accent);
  box-shadow: 3px 4px 0 rgba(125, 44, 36, 0.22), 0 0 0 2px var(--accent-wash);
  transform: rotate(0deg) translateY(-2px);
}

.word-card.is-new {
  animation: note-arrives 650ms cubic-bezier(0.22, 0.9, 0.3, 1.2) both;
}

.tray-miss {
  animation: quiet-no 260ms ease-in-out;
}

.play-footer {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-start;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.primary-button,
.outline-button,
.results-button,
.opinion-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 3px 7px 4px 6px;
  cursor: pointer;
  font-family: var(--hand);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 130ms ease, background-color 130ms ease, color 130ms ease;
}

.primary-button {
  padding: 11px 18px;
  border: 2px solid var(--accent-dark);
  color: var(--paper-light);
  background: var(--accent-dark);
  box-shadow: 3px 4px 0 rgba(125, 44, 36, 0.18);
}

.primary-button:hover {
  background: #6f241e;
}

.case-notes {
  display: flex;
  flex-direction: column;
  min-height: 510px;
  padding: 31px 23px 24px;
  border-color: rgba(89, 73, 34, 0.64);
  border-radius: 14px 6px 12px 8px / 7px 13px 6px 15px;
  background-color: rgba(248, 231, 161, 0.97);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 29px,
    rgba(55, 92, 121, 0.18) 30px,
    rgba(55, 92, 121, 0.18) 31px,
    transparent 32px
  );
  box-shadow: 5px 6px 0 rgba(138, 104, 30, 0.12), 10px 11px 0 rgba(55, 47, 33, 0.08);
  transform: rotate(-0.45deg);
}

.case-notes::before {
  top: 19px;
  bottom: 16px;
  left: 17px;
  width: 2px;
  background: rgba(161, 63, 50, 0.37);
}

.case-notes::after {
  position: absolute;
  top: -10px;
  left: 42%;
  width: 82px;
  height: 21px;
  background: rgba(218, 190, 91, 0.38);
  box-shadow: inset 0 0 0 1px rgba(138, 104, 30, 0.11);
  content: "";
  pointer-events: none;
  transform: rotate(2.5deg);
}

.notes-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding-left: 10px;
}

.notes-heading h2 {
  margin: 0;
  color: var(--accent);
  font-family: var(--hand);
  font-size: 2.25rem;
  letter-spacing: -0.03em;
}

.discovery-list {
  flex: 1;
  max-height: 325px;
  margin: 19px 0 20px;
  padding: 0 4px 0 28px;
  overflow-y: auto;
  scrollbar-color: var(--rule-strong) transparent;
}

.discovery-list li {
  padding: 5px 2px 11px 3px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.discovery-list li::marker {
  color: var(--accent);
  font-family: var(--hand);
}

.discovery-equation {
  display: block;
  margin-bottom: 1px;
  color: var(--graphite);
}

.discovery-list strong {
  color: var(--ink);
  font-family: var(--hand);
  font-size: 1.15rem;
}

.progress-wrap {
  padding: 15px 0 0 10px;
  border-top: 2px solid var(--ink);
}

.progress-copy {
  margin-bottom: 10px;
  font-family: var(--hand);
  font-size: 1.08rem;
}

.progress-stitches {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 7px;
}

.progress-stitch {
  height: 7px;
  border: 1.5px solid var(--ink);
  background: transparent;
  transform: rotate(-1deg);
}

.progress-stitch:nth-child(even) {
  transform: rotate(1deg);
}

.progress-stitch.is-complete {
  border-color: var(--accent-dark);
  background: var(--accent);
}

.round-actions {
  display: flex;
  gap: 11px;
  justify-content: flex-end;
  padding: 25px 3px 0;
}

.outline-button {
  padding: 9px 15px;
  border: 1.8px solid var(--ink);
  color: var(--ink);
  background: transparent;
}

.case-navigation {
  display: grid;
  grid-template-columns: repeat(2, 46px);
  gap: 8px;
}

.case-nav-button {
  width: 46px;
  height: 46px;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
}

.case-nav-button:first-child {
  transform: rotate(-1deg);
}

.case-nav-button:last-child {
  transform: rotate(1.2deg);
}

.case-nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.results-button {
  padding: 9px 15px;
  border: 1.8px solid var(--accent-dark);
  color: var(--accent-dark);
  background: var(--accent-wash);
}

.results-button:hover {
  color: var(--paper-light);
  background: var(--accent-dark);
}

.outline-button:not(:disabled):hover {
  color: var(--paper-light);
  background: var(--ink);
}

.site-footer {
  display: flex;
  gap: 30px;
  justify-content: space-between;
  padding: 22px 0 32px;
  border-top: 1px solid var(--rule-strong);
  color: var(--graphite);
  font-size: 1rem;
}

.site-footer p {
  margin: 0;
}

.footer-note {
  font-family: var(--hand);
}

.paper-dialog {
  width: min(92vw, 690px);
  max-height: min(90dvh, 820px);
  padding: 0;
  overflow: auto;
  border: 2px solid var(--ink);
  border-radius: 3px 8px 4px 6px;
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: 10px 13px 0 rgba(24, 49, 73, 0.22);
}

.how-dialog {
  border-color: rgba(89, 73, 34, 0.76);
  border-radius: 10px 4px 13px 6px / 5px 12px 7px 14px;
  background: #fff0b8;
  box-shadow: 8px 10px 0 rgba(138, 104, 30, 0.16), 14px 16px 0 rgba(24, 49, 73, 0.12);
  transform: rotate(-0.25deg);
}

.how-dialog::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: -15px;
  z-index: 2;
  width: 46px;
  background: radial-gradient(
      ellipse at center,
      transparent 0 6px,
      rgba(24, 49, 73, 0.82) 6.5px 8px,
      transparent 8.5px
    )
    center top / 44px 36px repeat-y;
  content: "";
  pointer-events: none;
}

.paper-dialog::backdrop {
  background: rgba(20, 32, 42, 0.64);
  backdrop-filter: blur(2px);
}

.dialog-inner,
.reveal-inner {
  position: relative;
  padding: clamp(24px, 5vw, 52px);
}

.how-dialog .dialog-inner {
  padding-left: clamp(62px, 9vw, 86px);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    rgba(55, 92, 121, 0.18) 32px,
    rgba(55, 92, 121, 0.18) 33px,
    transparent 34px
  );
}

.how-dialog .dialog-inner::before {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 45px;
  width: 2px;
  background: rgba(161, 63, 50, 0.34);
  content: "";
  pointer-events: none;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 13px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  place-items: center;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-family: var(--hand);
  font-size: 1.7rem;
}

.paper-dialog h2 {
  margin: 0 0 20px;
  font-family: var(--hand);
  font-size: clamp(2rem, 6vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.how-steps {
  display: grid;
  gap: 15px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.how-steps li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 13px;
  align-items: start;
}

.how-steps span {
  display: grid;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  place-items: center;
  color: var(--accent);
  font-family: var(--hand);
  font-weight: 800;
  transform: rotate(-3deg);
}

.how-steps p,
.how-note {
  margin: 5px 0 0;
}

.how-note {
  margin: 20px 0 26px;
  padding: 16px 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.reveal-dialog {
  width: min(96vw, 1080px);
  max-height: 94dvh;
  overflow: hidden;
  border-color: rgba(89, 73, 34, 0.76);
  border-radius: 12px 4px 14px 7px / 5px 13px 7px 15px;
  background: #fff3bd;
  box-shadow: 8px 10px 0 rgba(138, 104, 30, 0.16), 14px 16px 0 rgba(24, 49, 73, 0.12);
  transform: rotate(0.12deg);
}

.reveal-dialog::before {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: -15px;
  z-index: 2;
  width: 46px;
  background: radial-gradient(
      ellipse at center,
      transparent 0 6px,
      rgba(24, 49, 73, 0.82) 6.5px 8px,
      transparent 8.5px
    )
    center top / 44px 36px repeat-y;
  content: "";
  pointer-events: none;
}

.reveal-inner {
  isolation: isolate;
  padding: clamp(22px, 3vw, 36px) clamp(24px, 3vw, 38px) clamp(20px, 2.7vw, 32px) clamp(62px, 6vw, 78px);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 28px,
    rgba(55, 92, 121, 0.17) 29px,
    rgba(55, 92, 121, 0.17) 30px,
    transparent 31px
  );
}

.reveal-inner::before {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 45px;
  width: 2px;
  background: rgba(161, 63, 50, 0.34);
  content: "";
  pointer-events: none;
}

.reveal-stamp {
  display: block;
  width: max-content;
  margin: 0 0 7px auto;
  padding: 6px 10px;
  border: 3px double var(--accent);
  color: var(--accent);
  font-family: var(--hand);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(5deg);
}

.reveal-dialog h2 {
  max-width: none;
  margin: 0 0 5px;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.citation-line {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 650;
}

.reveal-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.25fr 0.95fr;
  gap: 0;
  border-top: 2px solid var(--ink);
}

.reveal-grid section {
  padding: 14px 16px 12px 0;
}

.reveal-grid section:nth-child(n + 2) {
  padding-left: 16px;
  border-left: 1px solid var(--rule-strong);
}

.reveal-grid .legal-question {
  grid-column: auto;
}

.reveal-grid h3 {
  margin: 0 0 5px;
  color: var(--accent);
  font-family: var(--hand);
  font-size: 0.95rem;
}

.reveal-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(0.84rem, 0.95vw, 0.96rem);
  line-height: 1.45;
}

.reveal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
}

.opinion-link {
  gap: 8px;
  padding: 8px 13px;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: var(--paper-light);
}

.opinion-link:hover {
  color: var(--paper-light);
  background: var(--ink);
}

.quiet-button {
  padding: 8px 7px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.courtroom-doodles {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  color: rgba(61, 72, 80, 0.31);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.doodle {
  position: absolute;
  border-color: currentColor;
  font-family: var(--hand);
  opacity: var(--doodle-opacity, 0.82);
  transform: rotate(var(--doodle-turn, 0deg));
  transform-origin: center;
}

.doodle i {
  position: absolute;
  display: block;
  border-color: currentColor;
  content: "";
}

.doodle i {
  filter: drop-shadow(1px 0.8px 0 rgba(61, 72, 80, 0.19));
}

.doodle-label {
  position: absolute;
  color: currentColor;
  font-size: 0.82rem;
  text-shadow: 0.8px 0.6px rgba(61, 72, 80, 0.12);
  white-space: nowrap;
}

.doodle-bench {
  top: -32px;
  left: 53vw;
  width: 145px;
  height: 88px;
  --doodle-opacity: 0.72;
  --doodle-turn: -9deg;
}

.doodle-bench .doodle-label {
  top: -24px;
  left: 38px;
}

.bench-top {
  top: 0;
  left: 0;
  width: 140px;
  height: 18px;
  border: 2px solid;
  border-radius: 2px 7px 1px 5px;
}

.bench-panel {
  top: 20px;
  width: 62px;
  height: 62px;
  border: 2px solid;
}

.bench-panel.one {
  left: 5px;
  border-radius: 4px 1px 6px 2px;
  transform: rotate(0.8deg);
}

.bench-panel.two {
  right: 5px;
  border-radius: 2px 5px 1px 7px;
  transform: rotate(-0.7deg);
}

.doodle-witness {
  top: 52%;
  left: -31px;
  width: 90px;
  height: 100px;
  --doodle-opacity: 0.9;
  --doodle-turn: 11deg;
}

.doodle-witness .doodle-label {
  top: -20px;
  left: 2px;
}

.witness-rail {
  inset: 0 0 6px 0;
  border: 2px solid;
  border-top-width: 5px;
  border-radius: 5px 2px 9px 3px;
}

.witness-mic {
  top: -5px;
  right: 10px;
  width: 20px;
  height: 35px;
  border-top: 2px solid;
  border-right: 2px solid;
  border-radius: 0 18px 0 0;
}

.doodle-jury {
  top: -38px;
  right: 18vw;
  width: 118px;
  height: 100px;
  border-right: 2px solid;
  border-bottom: 2px solid;
  --doodle-opacity: 0.67;
  --doodle-turn: 7deg;
}

.doodle-jury .doodle-label {
  top: -24px;
  right: 8px;
}

.doodle-jury i {
  right: 6px;
  width: 82px;
  height: 15px;
  border: 1.5px solid;
  border-radius: 50% 50% 8px 8px;
}

.doodle-jury i:nth-of-type(1) { top: 7px; }
.doodle-jury i:nth-of-type(2) { top: 29px; right: 18px; transform: rotate(-2deg); }
.doodle-jury i:nth-of-type(3) { top: 51px; transform: rotate(1.5deg); }
.doodle-jury i:nth-of-type(4) { top: 73px; right: 18px; transform: rotate(-1deg); }

.doodle-counsel {
  right: -54px;
  bottom: 14%;
  width: 140px;
  height: 70px;
  --doodle-opacity: 0.82;
  --doodle-turn: -8deg;
}

.doodle-counsel .doodle-label {
  top: -24px;
  right: 22px;
}

.table-top {
  top: 0;
  width: 136px;
  height: 12px;
  border: 2px solid;
  border-radius: 5px 2px 4px 1px;
  transform: rotate(-0.8deg);
}

.table-leg {
  top: 12px;
  width: 2px;
  height: 53px;
  border-left: 2px solid;
}

.table-leg.left { left: 17px; }
.table-leg.right { right: 17px; }

noscript {
  position: fixed;
  inset: auto 12px 12px;
  z-index: 10;
  padding: 12px;
  color: var(--paper-light);
  background: var(--accent-dark);
  text-align: center;
}

@keyframes note-arrives {
  0% { opacity: 0; transform: translateY(16px) rotate(4deg) scale(0.92); }
  70% { opacity: 1; transform: translateY(-3px) rotate(-1deg) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) rotate(var(--tilt)) scale(1); }
}

@keyframes quiet-no {
  0%, 100% { transform: translateX(0); }
  33% { transform: translateX(-3px); }
  66% { transform: translateX(3px); }
}

@media (min-width: 821px) {
  .game-shell {
    padding: 8px 0;
  }

  .round-heading {
    gap: 32px;
    align-items: center;
    margin-bottom: 10px;
    padding: 20px 0 4px;
  }

  .eyebrow {
    margin-bottom: 2px;
  }

  .round-intro {
    margin-bottom: 0;
    line-height: 1.35;
  }

  .round-intro::before {
    margin-bottom: 8px;
  }

  .game-layout {
    height: clamp(350px, calc(100dvh - 311px), 424px);
  }

  .play-sheet,
  .case-notes {
    min-height: 0;
    height: 100%;
  }

  .play-sheet {
    display: flex;
    flex-direction: column;
    padding: 24px 18px 14px;
  }

  .selection-strip {
    min-height: 58px;
    margin-bottom: 5px;
    padding: 10px 14px 11px;
  }

  .selection-slot {
    min-height: 34px;
    padding-block: 4px;
  }

  .feedback {
    min-height: 36px;
    padding: 7px 4px 2px;
  }

  .word-tray {
    flex: 1;
    min-height: 0;
    padding: 9px 6px 11px;
    overflow-y: auto;
  }

  .word-card {
    min-height: 42px;
    padding: 8px 13px 9px;
  }

  .play-footer {
    padding-top: 8px;
  }

  .case-notes {
    padding: 24px 20px 17px;
  }

  .discovery-list {
    min-height: 0;
    margin: 10px 0;
  }

  .progress-wrap {
    padding-top: 9px;
  }

  .round-actions {
    padding-top: 9px;
  }

  .site-footer {
    padding: 8px 0 10px;
  }
}

@media (max-width: 1360px) {
  .courtroom-doodles {
    opacity: 0.68;
  }

  .doodle-bench,
  .doodle-witness,
  .doodle-jury,
  .doodle-counsel {
    transform: scale(0.72) rotate(var(--doodle-turn));
  }

  .doodle-bench { left: 50vw; }
  .doodle-witness { left: -49px; }
  .doodle-jury { right: 19vw; }
  .doodle-counsel { right: -74px; }
}

@media (max-width: 820px) {
  .site-header,
  .game-shell,
  .site-footer {
    width: min(100% - 28px, 680px);
  }

  .round-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(2.75rem, 12vw, 5rem);
  }

  .round-intro {
    max-width: 46ch;
  }

  .game-layout {
    grid-template-columns: 1fr;
  }

  .play-sheet,
  .case-notes {
    min-height: unset;
  }

  .word-tray {
    min-height: 240px;
  }

  .case-notes {
    max-height: 390px;
  }

  .courtroom-doodles {
    opacity: 0.5;
  }

  .doodle-witness,
  .doodle-counsel {
    display: none;
  }

  .doodle-bench { top: -25px; left: 42%; }
  .doodle-jury { top: -32px; right: 10%; }

  .reveal-dialog {
    max-height: 96dvh;
    overflow: auto;
  }

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

  .reveal-grid .legal-question {
    grid-column: 1 / -1;
    padding-left: 0;
    border-top: 1px solid var(--rule-strong);
    border-left: 0;
  }

  .reveal-dialog h2 {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    min-height: 104px;
    padding-top: 10px;
  }

  .wordmark {
    display: grid;
    gap: 0;
    font-size: clamp(2.1rem, 9.5vw, 2.75rem);
    line-height: 1.15;
  }

  .header-actions {
    gap: 0;
  }

  .text-button {
    max-width: none;
    padding-inline: 6px;
    font-size: 1.05rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .game-shell {
    padding-top: 34px;
  }

  .round-heading {
    margin-bottom: 20px;
  }

  h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .round-intro {
    font-size: 1.1rem;
  }

  .play-sheet {
    padding: 24px 15px 15px;
  }

  .selection-strip {
    grid-template-columns: 1fr auto;
    gap: 7px 10px;
  }

  .selection-note {
    grid-column: 1 / -1;
    max-width: none;
  }

  .selection-slots {
    gap: 5px;
  }

  .selection-slot {
    min-width: 0;
    padding-inline: 4px;
    font-size: 0.98rem;
  }

  .feedback {
    min-height: 60px;
    padding-inline: 2px;
    font-size: 1.05rem;
  }

  .word-tray {
    gap: 10px 7px;
    min-height: 225px;
    padding: 14px 1px 24px;
  }

  .word-card {
    flex: 1 1 auto;
    max-width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    font-size: 1.02rem;
  }

  .play-footer {
    align-items: flex-start;
  }

  .primary-button {
    min-height: 48px;
  }

  .case-notes {
    padding: 29px 18px 21px;
  }

  .round-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .case-navigation {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .outline-button {
    width: 100%;
    min-height: 48px;
    padding-inline: 8px;
    font-size: 1rem;
  }

  .results-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }

  .site-footer {
    display: grid;
    gap: 5px;
  }

  .reveal-stamp {
    position: static;
    display: block;
    margin: 0 0 12px auto;
  }

  .reveal-dialog h2 {
    max-width: none;
    margin-right: 0;
    font-size: clamp(1.35rem, 6.5vw, 1.7rem);
  }

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

  .reveal-grid section:nth-child(2) {
    padding-left: 0;
    border-top: 1px solid var(--rule-strong);
    border-left: 0;
  }

  .reveal-grid .legal-question {
    grid-column: auto;
    padding-left: 0;
    border-top: 1px solid var(--rule-strong);
    border-left: 0;
  }

  .reveal-actions {
    display: grid;
  }

  .reveal-actions > * {
    width: 100%;
  }

  .reveal-inner {
    padding: 22px 18px 20px 56px;
  }

  .courtroom-doodles {
    opacity: 0.42;
  }

  .doodle-bench {
    top: -28px;
    left: 54%;
  }

  .doodle-jury {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --rule: rgba(24, 49, 73, 0.35);
    --rule-strong: rgba(24, 49, 73, 0.65);
  }

  .courtroom-doodles {
    display: none;
  }
}
