body[data-class-shortcuts] { --class-shortcut-offset: 55px; }

.class-shortcuts {
  position: fixed;
  top: calc(max(14px, env(safe-area-inset-top)) + 44px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  display: flex;
  gap: 4px;
  max-width: calc(100vw - 24px);
  padding: 3px 5px;
  overflow-x: auto;
  scrollbar-width: none;
  pointer-events: auto;
}
.class-shortcuts button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 4px 13px;
  border: 0;
  border-radius: 15px;
  background: #e6efdf;
  color: #234e36;
  font: 800 13px/1.15 var(--font);
  white-space: nowrap;
  cursor: pointer;
}
.class-shortcuts button:hover:not(:disabled) { background: #d2e4cd; }
.class-shortcuts button[aria-expanded="true"] { background: #28573e; color: #fffdf8; }
.class-shortcuts button:disabled { background: transparent; color: #52666c; cursor: default; }
.class-shortcuts small { display: block; margin-top: 2px; font-size: 10px; font-weight: 650; }
#classShortcutChoices { display: grid; gap: 0; margin-block: 10px; }
#classShortcutChoices label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 45px;
  gap: 12px;
  border-bottom: 1px solid #d8d5c8;
  font-weight: 750;
}
#classShortcutChoices input { width: 22px; min-height: auto; height: 22px; accent-color: var(--sage-dark); }

body[data-class-room][data-class-overlay] :is(#pcHint, #mobileControls) { display: none; }
body[data-board-open] :is(#classStatus, #classPresentation) { visibility: hidden; }
#classSlideEmpty { margin: 8px 0 0; color: #48636c; }

.board-panel {
  --board-controls-height: 60px;
  position: fixed;
  z-index: 25;
  top: calc(max(14px, env(safe-area-inset-top)) + var(--class-shortcut-offset, 0px) + var(--board-controls-height));
  bottom: max(66px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, calc(100vw - 24px));
  padding: clamp(12px, 2vw, 22px);
  border: 2px solid var(--ink);
  border-radius: 21px;
  background: var(--cream);
  box-shadow: 0 8px 0 rgba(24, 51, 70, .15);
  pointer-events: auto;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
body[data-class-teacher] .board-panel { --board-controls-height: 103px; }
body[data-board-open] .emoji-bar { bottom: max(12px, env(safe-area-inset-bottom)); }
.board-top { min-width: 0; border-top: 4px solid #619569; padding-top: 9px; }
.board-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.board-heading h2 {
  margin: 0;
  color: #234b39;
  font-size: clamp(19px, 3vw, 28px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
#boardPrompt {
  margin: 9px 0 0;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.board-status { display: flex; flex-wrap: wrap; gap: 5px; }
.board-status span {
  margin-top: 7px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #eef1e5;
  color: #3f5946;
  font-size: 13px;
  font-weight: 800;
}
#boardLocked { background: #f7ead3; color: #664b2e; }

.board-panel button {
  min-height: 44px;
  padding: 5px 9px;
  border: 1px solid #cecdbf;
  border-radius: 9px;
  background: var(--cream-soft);
  color: var(--ink);
  font: 800 13px/1.15 var(--font);
  white-space: nowrap;
  cursor: pointer;
}
.board-panel button:hover:not(:disabled) { background: #eae5d6; }
.board-panel button:disabled { opacity: .55; cursor: default; }
.board-panel .board-primary { background: #3e734e; color: #fffdf8; border-color: #3e734e; }
.board-panel .board-primary:hover:not(:disabled) { background: #2f5e3d; }
.board-panel :is(input, select, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid #cecdbf;
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  font: 550 16px/1.34 var(--font);
}
.board-panel button:focus-visible, .class-shortcuts button:focus-visible, .board-panel a:focus-visible {
  outline: 2px solid #3e734e;
  outline-offset: 2px;
}
.board-panel textarea { resize: vertical; }
.board-compose, .board-settings {
  display: grid;
  gap: 7px;
  margin-top: 13px;
  padding: 10px;
  border: 1px solid #d9dfd1;
  border-radius: 12px;
  background: #f1f4ea;
}
.board-compose label, .board-settings label, .board-settings legend { font-size: 14px; font-weight: 800; }
.board-settings label { display: grid; gap: 3px; }
.board-settings fieldset { margin: 0; border: 0; padding: 0; }
.board-settings fieldset input { margin-top: 4px; }
.board-settings button { justify-self: start; }
#boardLength { margin-left: 3px; font-size: 12px; color: #526b65; }
.board-compose-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
.board-compose-actions:has(#boardColumn.hidden) { grid-template-columns: minmax(0, 1fr) auto; }
.board-compose-actions select { max-width: 160px; }
.board-error { margin-top: 7px; }
.board-empty { color: #536b65; text-align: center; padding-block: 12px; }

#boardCards { margin-top: 13px; }
.board-wall, .board-lanes, .board-lane-cards { display: grid; gap: 8px; align-items: start; }
.board-wall { grid-template-columns: repeat(auto-fill, minmax(min(100%, 228px), 1fr)); }
.board-lanes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
}
.board-lane {
  min-width: 0;
  min-height: 102px;
  padding: 8px;
  border: 1px solid #dce3d5;
  border-radius: 12px;
  background: #f2f5ed;
  scroll-snap-align: start;
}
.board-lane h3 {
  margin: 0 0 8px;
  padding: 3px 2px 7px;
  border-bottom: 2px solid #8bb18d;
  color: #355744;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.board-card {
  padding: 9px;
  border: 1px solid #d6d6c7;
  border-radius: 10px;
  background: #fffefb;
  box-shadow: 0 2px 0 rgba(24, 51, 70, .07);
}
.board-card[data-hidden] { border-style: dashed; background: #f1eee7; }
.board-card header { display: flex; justify-content: space-between; gap: 4px; color: #335b47; font-size: 13px; }
.board-card p { margin: 6px 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.48; }
.board-card a { display: inline-block; margin-bottom: 5px; color: #305e44; font-size: 13px; font-weight: 800; }
.board-card .class-row { flex-wrap: wrap; }
.board-card button[aria-pressed="true"] { background: #fae8e8; color: #97354a; border-color: #dfbac4; }
.board-card .board-heart { color: #89394a; }

@media (max-width: 590px) {
  .class-shortcuts button { padding-inline: 8px; }
  .board-lanes { grid-template-columns: repeat(3, minmax(187px, 70%)); padding-bottom: 8px; }
  .board-heading { flex-wrap: wrap; }
  .board-heading h2 { flex: 1 1 120px; }
  .board-compose-actions:has(#boardColumn:not(.hidden)) { grid-template-columns: minmax(0, 1fr) auto; }
  .board-compose-actions:has(#boardColumn:not(.hidden)) input { grid-column: 1 / -1; }
  .board-compose-actions select { max-width: none; }
}
@media (max-width: 375px) {
  .class-shortcuts button { padding-inline: 6px; }
}
@media (max-height: 475px) {
  .board-panel { bottom: max(53px, env(safe-area-inset-bottom)); }
}
