body.play-screen #next-goal {
  min-height: 44px;
  max-width: 190px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.play-screen[data-compact-hud] #next-goal { grid-column: 1 / -1; max-width: none; }

body.play-screen :is(#next-goal, #panel[open] :is(.first-delivery,.neighbor-request,.community-panel,.village-progression) button) {
  --css-frame-bg: none !important;
  --css-frame-border: none !important;
  min-height: 44px;
  border: 1px solid #ad8ec4;
  border-image: none;
  border-radius: 8px;
  background: #fff4e3;
  color: var(--ui-ink);
  box-shadow: 0 2px #a682bf;
}

body.play-screen #next-goal {
  --control-face: #eadcf5;
}

body.play-screen #panel[open] :is(.first-delivery,.neighbor-request,.community-panel) button:is(
  [data-delivery-accept],[data-delivery-confirm],[data-neighbor-confirm],[data-contribute],[data-community-make]
):not(:disabled) {
  border-color: #ba6574;
  background: #ff9684;
  box-shadow: 0 2px #b76378;
}

body.play-screen #panel[open] :is(.first-delivery,.neighbor-request,.community-panel) button:disabled {
  border-color: #d0bdb3;
  background: #f0e7da;
  color: #655466;
  box-shadow: 0 2px #cbbab0;
}

body.play-screen #panel[open] .community-panel button[aria-pressed="true"] {
  border-color: #8663a4;
  background: #eadcf5;
  box-shadow: 0 2px #8663a4;
}
.bridge-project :is(h2, h3, p) { margin-block: 0 0.6rem; }
.bridge-project :is(.bridge-checklist, .bridge-cost) {
  display: grid;
  gap: 0.3rem;
  margin: 0 0 0.85rem;
  padding-inline-start: 1.4rem;
}
.bridge-project button { min-height: 44px; }
.bridge-project button[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.bridge-checklist button { text-align: start; }
.bridge-confirmation { margin-block-end: 0.6rem; }
.bridge-confirmation[inert] { visibility: hidden; }
.riverside-farm { display: grid; gap: 0.8rem; }
.riverside-farm :is(h2, h3, p) { margin: 0; }
.riverside-farm button { min-height: 44px; }
.riverside-bed {
  display: grid;
  gap: 0.7rem;
  padding: clamp(0.75rem, 3vw, 1.3rem);
  border: 1px solid #b6a1c7;
  border-radius: 0.8rem;
  background: #f7edff;
}
.riverside-bed-sample {
  min-height: 5rem;
  border: 0.45rem solid #9477a6;
  border-radius: 0.7rem;
  background: #d7b3a2;
}
.riverside-bed[data-bed="growing"] .riverside-bed-sample {
  background: linear-gradient(170deg, #c1e8e6 0 35%, #92c8d5 35% 64%, #abd9db 64%);
}
.riverside-bed[data-bed="ready"] .riverside-bed-sample { display: none; }
.riverside-bed-art {
  justify-self: center;
  image-rendering: pixelated;
}
@media (max-width: 374px) {
  .riverside-bed-art { width: 160px; height: 96px; }
}
.riverside-bed-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.riverside-bed-actions [aria-disabled="true"] { opacity: 0.6; cursor: default; }
.riverside-market { display: grid; gap: 0.65rem; }
.riverside-market :is(h2, h3, p) { margin: 0; }
.riverside-market button { min-height: 44px; }
.riverside-market .market-french {
  font-size: 1.22rem;
  font-weight: 700;
  color: #4b2863;
}
.market-choices { display: grid; gap: 0.4rem; }
.market-help { display: flex; flex-wrap: wrap; gap: 0.4rem; }
[data-riverside-lesson] { margin-block: 0 0.6rem; }

body.play-screen #panel[open] :is(.first-delivery,.neighbor-request,.community-panel) :is(p, small):not(.community-intro, .delivery-request > p:first-child) {
  color: #604b60;
}

body.play-screen #panel[data-learning-screen="board"] .course-study-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;

  & .course-streak-note { flex: 1 1 180px; margin: 0; }
}

.progress-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-block: 10px;
}

.progress-overview-grid article {
  padding: 12px 16px;
  border: 1px solid var(--study-line);
  border-radius: 10px;
  background: var(--study-card);
}

.progress-overview-grid article:nth-child(n+3) { background: #eee6f6; border-color: #d1bade; }
.progress-overview-grid h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 5px; font-size: 18px; }
.progress-overview-grid h3 :is(svg,img) { width: 20px; height: 20px; flex: none; object-fit: contain; }
.progress-overview-grid p { margin: 0 0 4px; color: var(--study-copy); }
.progress-overview-note { margin: 0; padding: 9px 12px; border-radius: 8px; background: #eee6f6; color: var(--study-copy); }
.progress-next-goal { display: grid; gap: 6px; }
.progress-next-goal h3 { margin: 0; }
.progress-next-goal button { min-height: 44px; justify-self: start; }
#progress-course { padding-inline: 12px; }

@media (max-width: 480px) {
  .progress-overview-grid { grid-template-columns: minmax(0, 1fr); }
}

body.play-screen #panel[data-learning-screen="reviewResult"] .review-batch-summary {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #d1bade;
  border-radius: 10px;
  background: #eee6f6;
}

body.play-screen #panel[data-learning-screen="reviewResult"] .review-batch-summary [data-review-count] {
  color: var(--ui-ink);
  font-weight: 800;
}

body.play-screen #panel[data-learning-screen="reviewResult"] .review-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.play-screen #panel[data-learning-screen="reviewResult"] #review-another {
  --control-face: #ff9684;
  --control-line: #ba6574;
  --control-edge: #b76378;
  padding: 8px 12px;
}
