.board-paper.site-shell {
  --board-sheet: var(--stock);
  --board-edge: #baa283;
  --board-rule: #d7c6aa;
  --board-red: #9c402e;
  --board-green: #43644e;
  --muted: #725d48;
  background-color: #f3e5cc;
  background-image: radial-gradient(ellipse at 48% 22%, #fff6e7c7 10%, #f7e9d2b5 65%, #dfc7a792), var(--paper);
  background-size: auto, 480px;
}
.board-paper main.page-board {
  box-sizing: border-box;
  width: min(calc(100% - 2 * var(--student-bar-inset)), 1344px);
  max-width: none;
  margin: 0 auto;
  padding: clamp(20px, 2.2vw, 34px) 0 52px;
  color: var(--ink);
  font-family: var(--font-cn);
}
.board-heading {
  display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: end;
  gap: 12px 20px; margin-bottom: 20px;
}
.board-identity { min-width: 0; }
.board-context { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; color: #705641; font: 700 13px/1.4 var(--font-round); }
.board-context > span:first-child { overflow-wrap: anywhere; }
.board-session { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: #765a41; }
.board-session::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9f7950; }
.board-session[data-phase="live"]::before { background: #698454; box-shadow: 0 0 0 2px #91ad7730; }
.board-heading h1 { margin: 4px 0 0; color: var(--ink); font: 900 clamp(29px, 2.7vw, 42px)/1.18 var(--font-round); letter-spacing: .025em; }
.board-heading .filterbar {
  display: grid; grid-auto-flow: column; grid-template-rows: auto auto; grid-template-columns: minmax(0,1.22fr) minmax(0,1fr);
  align-items: end; gap: 3px 10px; width: clamp(300px,31vw,445px); min-width: 0; margin: 0; padding: 0;
}
.board-heading .filterbar label { margin: 0; font: 740 12px/1.35 var(--font-cn); color: var(--muted); }
.board-heading .filterbar select {
  width: 100%; max-width: 100%; min-width: 0; min-height: 38px; padding: 4px 24px 4px 9px;
  overflow: hidden; text-overflow: ellipsis;
  border: 1px solid var(--board-edge); border-radius: 6px;
  background-color: #fff6e5; color: var(--ink); box-shadow: 0 2px #ac845426;
  font: 700 14px/1.4 var(--font-cn);
}
.board-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap:wrap; gap: 7px; }
.board-lesson-action, .board-export, .board-paper .board-text-button, .board-flags-more, .board-paper .reel-foot button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid #ae8c61; border-radius: 7px;
  background: linear-gradient(#fff5e0e8,#f3dfbddd), var(--paper) center / 350px;
  color: #593f2c; box-shadow: inset 0 1px #fff9e7, 0 2px #b090694f;
  font: 750 13px/1.4 var(--font-round); cursor: pointer;
}
.board-lesson-action, .board-export { min-height: 38px; padding: 5px 11px; white-space: nowrap; }
.board-lesson-action.primary {
  color: #fff8e9; border-color: #934731;
  background: linear-gradient(#af523bdb,#943d2beb), var(--grain) center / 280px;
  box-shadow: inset 0 1px #db8873, 0 2px #8a473a;
}
.board-lesson-action:disabled { opacity: .6; cursor: default; }
.board-desk {
  display: grid; grid-template-columns: minmax(0,1.86fr) minmax(0,1fr);
  grid-template-areas: "film progress" "flags post" "roster roster";
  gap: clamp(16px,1.65vw,25px); align-items: start;
}
.board-film { grid-area: film; }
.board-progress { grid-area: progress; }
.board-flags { grid-area: flags; }
.board-paper .broadcast-panel { grid-area: post; }
.board-paper .roster-fold { grid-area: roster; }
.board-desk h2, .board-sheet summary strong {
  display: flex; align-items: center; gap: 8px;
  margin: 0; color: #443123; font: 900 clamp(18px,1.52vw,23px)/1.3 var(--font-round); letter-spacing: .015em;
}
.board-desk h2 > .icon { flex: none; color: #77563b; }
.board-title, .board-sheet-head, .board-paper .post-header { display: flex; align-items: center; gap: 8px; }
.board-sheet-head, .board-paper .post-header { justify-content: space-between; }
.board-count, .board-paper .post-audience { color: #73573e; font: 700 12px/1.4 var(--font-cn); }
.board-paper .board-sheet {
  min-width: 0; margin: 0; padding: clamp(14px,1.45vw,22px);
  border: 1px solid var(--board-edge); border-radius: 11px;
  background: var(--board-sheet); box-shadow: inset 0 1px #fff9e9, 1px 3px #ceba99, 1px 5px 9px #62472818;
}
.board-paper .board-film {
  min-width: 0; padding: 0; align-self: stretch;
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #9e7953; border-radius: 12px;
  background: linear-gradient(110deg,#ebcda2c9,#d6af7ec2), var(--kraftimg) center / 480px;
  box-shadow: inset 0 1px #fbe3bd, 2px 4px #ad8056, 3px 6px #d8b47a, 2px 9px 10px #75513421;
}
.board-paper .board-film-head { padding: 12px clamp(12px,1.2vw,20px); gap: 7px 12px; flex-wrap: wrap; align-items: center; }
.board-paper .film-controls { flex-wrap: wrap; gap: 6px 11px; }
.board-paper .unseen-filter, .board-paper .reminder { min-height: 32px; padding: 3px 7px; color: #523a29; font: 750 12px/1.3 var(--font-round); }
.board-paper .unseen-filter { border: 1px solid #aa8359; border-radius: 6px; background: #fff0d7; box-shadow: var(--lift-1); }
.board-paper .unseen-filter[aria-pressed="true"] { background: #98503b; border-color: #814331; color: #fff5e3; }
.board-paper .unseen-filter b { font: 800 12px var(--font-mono); }
.board-paper .reminder { padding-inline: 0; }
.board-paper .reminder .switch { border-color: #8d785a; background: #ad9c82; }
.board-paper .reminder .switch.on { border-color: #57734f; background: #63865f; }
.board-cutting-mat {
  display: grid; align-content: center; flex: 1; min-width: 0; margin: 0 9px;
  border: 1px solid #536b53; border-radius: 6px;
  background:
    repeating-linear-gradient(0deg,transparent 0 17px,#edf3d324 17px 18px),
    repeating-linear-gradient(90deg,transparent 0 17px,#edf3d324 17px 18px),
    linear-gradient(115deg,#648268f0,#496a57ef), var(--paper) center / 400px;
  box-shadow: inset 0 2px 3px #2d423a52, 0 1px #fce7c6;
}
.board-paper .film-spool {
  margin: 0; padding: 16px 12px; min-width: 0; gap: clamp(8px,1vw,16px);
  scroll-padding-inline: 12px;
}
.board-paper .film-card {
  position: relative; flex: 0 0 clamp(150px,31.9%,265px); min-width: 0; align-self: stretch;
  padding: 5px 5px 7px;
  border: 1px solid #d7c5a1; border-radius: 3px;
  background: var(--board-sheet); box-shadow: 1px 3px 4px #24392d66;
  color: #4c3728;
}
.board-paper .film-card::after {
  content: ""; position: absolute; top: -4px; left: 50%; width: 30px; height: 8px; pointer-events: none;
  background: #e9cc90b8; box-shadow: 0 1px #77573839; transform: translateX(-50%) rotate(-3deg);
}
.board-paper .film-card:nth-child(even)::after { transform: translateX(-50%) rotate(3deg); }
.board-paper .board-print-image { display:block;position:relative;overflow:hidden;aspect-ratio:1.67;border:0;border-radius:1px; }
.board-paper .film-card .still { position:absolute;inset:0;margin:0;width:100%;height:100%;background:#f3eddf; }
.board-paper .film-card .version-photo { background: #353a31; }
.board-paper .film-card .still > :is(img,svg) { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.board-paper .film-card .crop { display: none; }
.board-paper .film-card.submitted-print { border-color:#924731; box-shadow:inset 0 0 0 3px #a75033,0 3px 5px #513b2950; }
.board-paper .film-card > b { display:flex;align-items:center;justify-content:space-between;gap:6px;margin:6px 4px 1px;font:850 15px/1.4 var(--font-round); }
.board-paper .board-print-version { flex:none;color:#85513c;font:750 12px/1 var(--font-mono); }
.board-paper .film-card > small { margin-inline:4px;display:block;color:#705741;font:600 12px/1.4 var(--font-cn); }
.board-paper .board-print-author { font:inherit;color:inherit; }
.board-paper :is(.board-print-author,.film-card > small) { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.board-paper .board-letter-card { text-align:start; }
.board-letter-card .text-work-paper { padding:8px clamp(8px,1vw,14px) 24px;gap:3px; }
.board-letter-card .text-paper-kind .icon { flex:none; }
.board-letter-card .text-paper-title { font-size:clamp(14px,1.35vw,20px); }
.board-letter-card .text-paper-excerpt { -webkit-line-clamp:2; }
.board-paper .board-letter-card .unseen-mark { left:auto;right:5px; }
.board-paper .film-card:focus-visible { outline:2px solid #f6d387;outline-offset:2px; }
.board-paper .unseen-mark { left: 5px; top: 5px; color: #fff9ea; background: #984734; border: 1px solid #f4c19c; box-shadow: 0 1px 2px #241b1052; font: 800 11px/1.45 var(--font-cn); }
.board-paper .reel-foot { margin: 0; padding: 6px 11px 7px; gap: 5px; }
.board-paper .reel-foot button { width: 34px; height: 30px; padding: 0; }
.board-paper .reel-foot button:disabled { opacity: .42; box-shadow: none; }
.board-paper .reel-track { background: #88654250; }
.board-paper .reel-track i { background: #70563b; }
.board-cutting-mat .empty { min-height: 154px; justify-content: center; border: 1px dashed #e9f0d26b; color: #fff7e4; background: #29493845; }
.board-cutting-mat .empty :is(.icon,h3) { color: #fff7e4; }
.board-paper .board-progress { align-self: stretch; display: flex; flex-direction: column; }
.board-paper .board-progress h2 .icon { color: var(--board-green); }
.board-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: clamp(14px,2vw,27px) 0 15px; }
.board-totals dt, .board-facts dt { color: #6b523e; font: 650 14px/1.4 var(--font-cn); }
.board-totals dd, .board-facts dd { margin: 0; }
.board-totals dd:not(.board-meter) { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; margin: 4px 0 8px; }
.board-totals strong { color: var(--board-green); font: 800 clamp(29px,2.65vw,43px)/1 var(--font-mono); letter-spacing: -.065em; }
.board-totals > div:nth-child(2) strong { color: var(--board-red); }
.board-totals small, .board-facts small { color: #6c5541; font: 600 12px/1.3 var(--font-cn); }
.board-meter { display: block; height: 5px; overflow: hidden; border-radius: 4px; background: #e5d6bb; }
.board-meter i { display: block; height: 100%; border-radius: inherit; background: #718b69; }
.board-totals > div:nth-child(2) .board-meter i { background: #bb6a51; }
.board-facts { display: grid; align-content: end; flex: 1; margin: 0; }
.board-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--board-rule); }
.board-facts > div:last-child { padding-bottom: 0; }
.board-facts dd { color: #4f392a; font: 750 17px/1.35 var(--font-mono); }
.board-facts small { margin-left: 4px; }
.board-work-stats { width: 100%; margin: 0 0 12px; border-collapse: collapse; color: #624936; font: 650 13px/1.4 var(--font-cn); }
.board-work-stats th, .board-work-stats td { padding: 5px 6px; border-bottom: 1px solid var(--board-rule); text-align: left; }
.board-work-stats :is(th,td):not(:first-child) { text-align: center; }
.board-work-stats thead { background: #e6e9d7; color: #3a5039; }
.board-work-stats td { font: 750 14px/1.4 var(--font-mono); }
.work-period-stamp { position: absolute; bottom: 5px; left: 5px; padding: 2px 5px; border-radius: 3px; background: #f4e6cf; color: #624325; font: 750 11px/1.3 var(--font-cn); }
.work-period-stamp[data-work-period="inClass"] { background: #e0ead2; color: #315236; }
.board-paper .board-text-button { flex: none; min-height: 32px; padding: 3px 9px; }
.board-flags h2 .icon { color: var(--board-red); }
.board-flag-list { list-style: none; padding: 0; margin: 9px 0 0; }
.board-flag-list li { display: grid; grid-template-columns: minmax(100px,.75fr) minmax(0,1.5fr) auto; align-items: center; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--board-rule); }
.board-flag-student, .board-flag-reasons { min-width: 0; overflow-wrap: anywhere; }
.board-flag-student b { display: block; font: 850 15px/1.4 var(--font-round); }
.board-flag-student small { display: block; color: var(--muted); font: 580 12px/1.4 var(--font-cn); }
.board-flag-reasons { display: grid; grid-template-columns: max-content minmax(0,1fr); align-items: start; gap: 7px; font: 580 13px/1.5 var(--font-cn); }
.board-flag-detail { display: grid; gap: 2px; }
.board-stage, .board-paper .roster-fold .badge { width: max-content; border: 1px solid #cfb18b; border-radius: 4px; padding: 1px 5px; color: #774b2d; background: #f4e2c2; font: 750 11px/1.5 var(--font-round); }
.board-reply { display: inline-flex; align-items: center; justify-content: end; gap: 2px; min-height: 36px; color: var(--board-red); white-space: nowrap; font: 750 13px/1.4 var(--font-round); }
.board-reply svg { width: 13px; }
.board-flags-more { min-height: 32px; padding: 3px 8px; margin-top: 1px; box-shadow: none; }
.board-flags .empty { padding: 20px 8px; border: 0; color: var(--board-green); background: transparent; }
.board-paper .broadcast-panel { background: linear-gradient(130deg,#fff6dae8,#f7e9bbe0), var(--paper) center / 410px; }
.board-paper .post-header { flex-wrap: wrap; }
.board-paper .post-modes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2px; margin-top: 14px; padding: 3px; border: 1px solid #c5a77b; border-radius: 7px; background: #e7cfaa99; }
.board-paper .post-modes button { min-width: 0; min-height: 32px; padding: 3px; color: #684b32; font: 700 13px/1.35 var(--font-round); }
.board-paper .post-modes .on { background: #fff5db; color: #84412f; border-color: #b98d56; box-shadow: var(--lift-1); }
.board-paper .post-write { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; margin-top: 10px; }
.board-paper .post-write textarea {
  grid-column: 1 / -1; width: 100%; min-height: 73px; padding: 7px 10px; resize: vertical; color: #483527;
  border: 1px solid #c5ac88; border-radius: 6px; background: #fffaf0;
  font: 500 14px/1.55 var(--font-cn);
}
.board-paper .post-write textarea::placeholder { color: #827362; }
.board-paper .post-write .btn { grid-column: 2; justify-self: end; }
.board-paper .broadcast-panel .btn, .board-cutting-mat .empty .btn {
  min-height: 35px; padding: 5px 11px; border: 1px solid #b4946f;
  background: #fff1d6; color: #614733; font: 750 13px/1.4 var(--font-round);
}
.board-paper .broadcast-panel .btn.primary { border-color: #944731; background: linear-gradient(#b95944,#a74632); color: #fff8e8; box-shadow: 0 2px #863f2f; }
.board-paper .broadcast-panel .btn:disabled { opacity: .54; box-shadow: none; }
.board-paper .template-hint, .board-paper .post-history summary { margin: 5px 0 0; color: #71583e; font: 600 12px/1.5 var(--font-cn); }
.board-paper .post-history summary { min-height: 27px; padding-block: 5px; font-weight: 750; }
.board-paper .post-receipt { border-color: #cdba96; color: #4a3828; overflow-wrap: anywhere; }
.board-paper .timer-controls > div { flex-wrap: wrap; gap: 7px; font: 650 14px/1.5 var(--font-cn); }
.board-paper .timer-controls input { min-height: 36px; border-color: var(--board-edge); background: #fff8e9; }
.board-paper .roster-fold { padding-block: 0; }
.board-paper .roster-fold summary { display: flex; align-items: center; gap: 8px; min-height: 54px; list-style: none; }
.board-paper .roster-fold summary::-webkit-details-marker { display: none; }
.board-paper .roster-fold summary strong { font-size: 18px; }
.board-paper .roster-fold summary span { margin: 0; font-weight: 650; }
.board-paper .roster-fold summary > .icon:first-child { color: #715137; }
.board-paper .roster-fold summary > .icon:last-child { margin-left: auto; }
.board-paper .roster-fold[open] summary > .icon:last-child { transform: rotate(180deg); }
.board-paper .roster-tools { margin: 0 0 9px; }
.board-paper .roster-tools label { max-width: 100%; width: 275px; position: relative; display: block; }
.board-paper .roster-tools svg { position: absolute; top: 50%; left: 9px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.board-paper .roster-tools input { width: 100%; min-height: 37px; padding-left: 33px; background: #fff8eb; border-color: var(--board-edge); }
.board-paper #pupil-table { margin-bottom: 12px; }
.board-paper .board-roster th { color: #694f39; background: #f4e5c9; font-size: 12px; }
.board-paper .board-roster :is(td,th) { border-color: var(--board-rule); }
.board-paper .board-roster td { background: transparent; font-size: 13px; }
.board-paper .board-roster .badge.success { color: #3f5c42; background: #e1ead3; border-color: #a4bb91; }
.board-roster .mini-avatar { color: #684e35; background: #efe0bd; border-color: #c5ac84; }
.board-paper .board-roster .text-btn { color: var(--board-red); }
@media (hover:hover) {
  .board-paper :is(.board-lesson-action,.board-export,.board-text-button,.board-flags-more,.unseen-filter,.reel-foot button):enabled:hover { border-color: #795537; filter: brightness(1.04); }
  .board-paper .film-card:hover { outline: 2px solid #f6d387; outline-offset: 2px; }
  .board-reply:hover { text-decoration: underline; }
}
@media (max-width: 1030px) {
  .board-desk { grid-template-columns: minmax(0,1.55fr) minmax(280px,1fr); }
  .board-heading { gap: 10px; }
  .board-flag-list li { grid-template-columns: minmax(80px,.8fr) minmax(0,1.45fr) auto; gap: 8px; }
}
@media (max-width: 810px) {
  .board-desk { grid-template-columns: minmax(0,1fr); grid-template-areas: "film" "progress" "flags" "post" "roster"; }
  .board-totals { margin-top: 14px; }
  .board-facts { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
  .board-facts > div { display: grid; gap: 3px; padding-bottom: 0; }
  .board-flag-list li { grid-template-columns: minmax(90px,.75fr) minmax(0,1.5fr) auto; }
}
@media (max-width: 660px) {
  .board-paper main.page-board { padding-top: 19px; }
  .board-heading { grid-template-columns: minmax(0,1fr) auto; gap: 11px 7px; margin-bottom: 14px; }
  .board-heading h1 { margin-top: 3px; }
  .board-heading .filterbar { grid-area: 2 / 1 / 3 / -1; width: 100%; }
  .board-heading .filterbar select { padding-right: 16px; font-size: 13px; }
  .board-heading-actions { align-self: center; gap: 5px; }
  .board-lesson-action, .board-export { padding-inline: 8px; }
  .board-paper .board-film-head { padding: 10px; }
  .board-paper .film-controls { gap: 8px; }
  .board-paper .film-spool { padding: 12px 9px; gap: 9px; }
  .board-paper .film-card { flex-basis: clamp(148px,53%,225px); }
  .board-paper .film-card > b { font-size: 14px; }
  .board-letter-card .text-paper-excerpt {
    display:block;max-height:none;white-space:nowrap;text-overflow:ellipsis;line-height:1.25;
  }
  .board-flag-list li { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "student reply" "reasons reasons"; gap: 4px 8px; }
  .board-flag-student { grid-area: student; }
  .board-flag-reasons { grid-area: reasons; }
  .board-reply { grid-area: reply; }
  .board-paper .board-roster { display: block; width: 100%; min-width: 0; }
  .board-roster thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .board-roster tbody { display: block; }
  .board-roster tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 6px 8px; padding: 10px 0; border-top: 1px solid var(--board-rule); }
  .board-paper .board-roster td { align-self: center; white-space: normal; padding: 0; border: 0; }
  .board-roster td:first-child, .board-roster td:nth-child(6) { grid-column: span 2; }
  .board-roster td:nth-child(2), .board-roster td:last-child { justify-self: end; }
  .board-roster td:nth-child(n+3):nth-child(-n+6)::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; }
  .board-roster .pct i { width: 26px; }
}
@media (max-width: 460px) {
  .board-heading-actions { flex-direction: column; align-items: stretch; }
}
@media (max-width: 355px) {
  .board-letter-card .text-work-paper { padding-top:6px;gap:2px; }
  .board-letter-card .text-paper-title { padding-bottom:2px;line-height:1.12; }
}
@media (max-width: 380px) {
  .board-context { font-size: 12px; }
  .board-paper .board-totals { gap: 12px; }
  .board-facts dt { font-size: 12px; }
}

.board-paper .post-template-actions {grid-column:1 / -1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
