/* World attendance shares the original date, filters, rows, and save controls. */
.world-roll-hud { display:contents; }
.world-session #attendance-view .world-roll-hud {
  display:block; position:sticky; top:env(safe-area-inset-top); z-index:7;
  background:#fff0cf; border:1px solid #966140; border-radius:6px;
  padding:3px; margin-block:4px;
}
#world-roll-controls:not([hidden]) { display:flex; flex-wrap:wrap; gap:3px; align-items:center; justify-content:space-between; }
#world-roll-controls button, #world-roll-controls select {
  min-height:44px; padding:3px 7px; color:#3d261d; font-size:.79rem; font-weight:800;
  background:#ffe5a6; border:1px solid #865632; border-radius:4px;
}
#world-roll-controls button[aria-pressed=true] { background:#dcebb7; border-color:#527844; }
#world-roll-controls button:disabled { opacity:.55; }
.world-roll-display { display:flex; gap:3px; }
#world-roll-controls label { display:flex; align-items:center; gap:4px; font-size:.73rem; }
.world-session #attendance-view .world-roll-hud .summary-bar { margin:0; padding:2px; background:none; box-shadow:none; border:0; }
.world-session #attendance-view .world-roll-hud .roll-progress { display:none; }
.world-session #attendance-view .world-roll-hud .roll-stats { margin:0; }
.world-session #attendance-view .world-roll-hud .roll-stats div { padding:0; background:none; box-shadow:none; border:0; }
.world-session #attendance-view .world-roll-hud .roll-stats dd { font-size:.89rem; margin:0; }
.world-session #attendance-view:has(.world-classrooms) { padding-inline:clamp(3px,1vw,12px); }
.world-session #attendance-view .world-classrooms { display:block; background:none; }
.world-classroom-group {
  list-style:none; margin-block:0 11px; scroll-margin-top:118px;
  border-block:3px solid #673921; background:#c9854b;
  box-shadow:0 3px 0 #754629;
  content-visibility:auto; contain-intrinsic-block-size:auto 300px;
}
.world-classroom-group[hidden] { display:none !important; }
.world-classroom-front {
  display:grid; place-items:center; min-height:114px; padding:10px 3px 25px;
  background:#704529 url("assets/lincoln-world/room-school.jpeg") center 22% / cover no-repeat;
  border-bottom:4px solid #8d4726;
}
.world-classroom-board {
  min-width:157px; max-width:88%; color:#fff7cc; background:#204d39; text-align:center;
  padding:4px 8px; border:3px solid #b6723c; box-shadow:0 0 0 2px #643b29,inset 0 0 0 1px #326859,0 4px #704421;
}
.world-classroom-board :is(h2,p,b) { margin:0; font-size:.82rem; }
.world-classroom-board h2 { font-size:1.15rem; }
.world-classroom-board p { color:#d2e6c7; overflow-wrap:anywhere; }
#attendance-view .world-classroom-seats {
  list-style:none; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px 0;
  margin:0; padding:4px 0 8px;
  background:repeating-linear-gradient(0deg,#d49450 0 11px,#c18245 11px 12px,#d99b56 12px 23px,#b9753d 23px 25px);
}
.world-session #attendance-view .world-classroom-seats .student-row {
  position:relative; display:grid; align-content:start; gap:0; min-width:0; padding:0; margin:0;
  border:0; border-radius:0; box-shadow:none; background:none; color:#281a17;
}
.world-session #attendance-view .world-classroom-seats .student-row[hidden] {
  display:grid !important; visibility:hidden;
}
.world-seat-scene { position:relative; width:78px; max-width:100%; height:64px; margin-inline:auto; }
.world-seat-chair,.world-seat-desk,.world-seat-student { position:absolute; image-rendering:pixelated; }
.world-seat-chair,.world-seat-desk {
  background-image:url("assets/lincoln-world/classroom-furniture.png"); background-size:128px 64px;
  width:64px; height:64px; left:50%; transform:translateX(-50%); image-rendering:pixelated;
}
.world-seat-chair { background-position:0 0; }
.world-seat-desk { background-position:-64px 0; }
.world-seat-student { width:40px; height:40px; left:50%; top:1px; transform:translateX(-50%); }
.world-seat-mark {
  position:absolute; top:3px; right:4px; display:grid; place-items:center; width:17px; height:17px;
  color:#432518; background:#ffebaa; border:1px solid #75462d; font-size:.72rem; font-weight:900;
}
[data-attendance-status=present] .world-seat-mark { background:#dcecb3; color:#224b28; }
:is([data-attendance-status=absent],[data-attendance-status=leave]) .world-seat-mark { background:#fbd6cb; color:#842727; }
.world-session #attendance-view .world-classroom-seats :is(.student-info,.roll-student-identity) {
  display:block; padding:0; min-width:0; text-align:center;
}
.world-session #attendance-view .world-classroom-seats .student-profile-button {
  display:block; width:100%; height:44px; min-height:44px; padding:0 2px; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; font-size:.73rem; background:#fff0c6;
  color:#37211b; border:1px solid #aa6a3d; border-radius:4px 4px 0 0;
}
.world-classroom-seats :is(.roll-student-meta,.roll-student-tools) { display:none !important; }
.world-session #attendance-view .world-classroom-seats .status-actions {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0; margin:0; padding:0; width:100%;
}
.world-session #attendance-view .world-classroom-seats .status-btn {
  min-height:44px; height:44px; min-width:0; border-radius:2px; padding:0; font-size:.83rem; border-width:1px;
}
.world-session #attendance-view .world-classroom-seats .present-btn { background:#e3efc8; color:#234f32; }
.world-session #attendance-view .world-classroom-seats .absent-btn { background:#ffe2d1; color:#922f2b; }
.world-session #attendance-view .world-classroom-seats .present-btn.active { background:#35753f; color:#fffde2; }
.world-session #attendance-view .world-classroom-seats .absent-btn.active { background:#a24136; color:#fffde2; }
.world-session #attendance-view .world-classroom-seats .roll-reason {
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-height:36px; padding:2px;
  font-size:.67rem; margin:0; box-shadow:none; border:1px solid #9e5841; background:#fff1d6;
}
.world-session #attendance-view .world-classroom-seats .world-seat-health {
  position:absolute; top:0; left:0; min-width:44px; min-height:44px; padding:0; z-index:2;
  border:0; border-radius:5px; color:#831e16; background:#fff6d0e8; font-weight:900;
}
.world-session #attendance-view .world-classroom-seats .roll-health-reminder { display:none; }
.world-session #attendance-view .world-classroom-seats .seat-health-open .roll-health-reminder:not([hidden]) {
  display:block; position:absolute; inset:44px auto auto 1px; z-index:3; width:clamp(130px,45vw,235px);
  max-height:150px; overflow:auto; font-size:.75rem; padding:5px;
  border:2px solid #7b3b28; background:#fff4d7; color:#3b251b; text-align:left;
}
.world-session #attendance-view .world-classroom-seats .student-row:last-child .roll-health-reminder { inset-inline:auto 1px; }
.world-session #attendance-view .world-classroom-seats > .absence-inline { grid-column:1/-1; }
.world-session #attendance-view .world-classroom-seats > .absence-inline:not([hidden]) { border:2px solid #8f583b; }
.world-session #attendance-view .world-classroom-seats .student-row { scroll-margin-block:120px; }
@media (min-width:468px) { #attendance-view .world-classroom-seats { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media (min-width:650px) {
  #attendance-view .world-classroom-seats { grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px 4px; padding-inline:10px; }
  .world-classroom-front { min-height:148px; background-position:center 28%; }
}
@media (max-width:359px) {
  #attendance-view .world-classroom-seats { grid-template-columns:repeat(4,minmax(88px,1fr)); overflow-x:auto; }
}

#world-roll-submission { margin:0; color:#4b3a2a; text-align:center; font-size:.74rem; }
.world-session #attendance-view .world-classroom-seats .student-profile-button { text-align:center; }
.world-session #attendance-view .world-classroom-seats .student-row:nth-child(4n) .roll-health-reminder { inset-inline:auto 1px; }
@media(min-width:468px) {
  .world-session #attendance-view .world-classroom-seats .student-row:nth-child(5n) .roll-health-reminder { inset-inline:auto 1px; }
}
@media(min-width:650px) {
  .world-session #attendance-view .world-classroom-seats .student-row:nth-child(6n) .roll-health-reminder { inset-inline:auto 1px; }
}
.world-classroom-front {
  position:relative; padding-inline:76px;
}
.world-classroom-board { min-width:0; width:max-content; max-width:100%; }
.world-classroom-complete { display:block; color:#fff3a5; }
.world-classroom-complete[hidden] { display:none; }
.world-classroom-teacher {
  position:absolute; right:3px; bottom:3px; width:73px; display:grid; justify-items:center; align-items:end;
}
.world-teacher-sprite canvas { display:block; width:48px; height:72px; image-rendering:pixelated; }
.world-teacher-name {
  width:100%; color:#fff3d0; background:#8c512d; border:1px solid #5e3527; padding:2px;
  text-align:center; font-size:.66rem; font-weight:750; overflow-wrap:anywhere; line-height:1.15;
}
@media(min-width:650px) {
  .world-classroom-teacher { right:12%; width:122px; }
  .world-teacher-sprite canvas { width:64px; height:96px; }
}
.world-session:has(#attendance-view:not([hidden])) #teacher-bar { display:none; }
#attendance-view .world-classroom-seats {
  gap:7px 0; padding-block:6px 10px;
  background:
    repeating-linear-gradient(90deg,transparent 0 78px,#a5633b 78px 79px,transparent 79px 160px) 0 0 / 160px 12px,
    repeating-linear-gradient(0deg,#d79b5c 0 3px,#cc874c 3px 11px,#9e623d 11px 12px);
}
.world-session #attendance-view .world-classroom-seats .student-row {
  grid-template-rows:70px 44px 44px; align-items:start;
}
.world-seat-scene { width:88px; height:72px; }
.world-seat-chair,.world-seat-desk { width:80px; height:80px; background-size:160px 80px; }
.world-seat-desk { background-position:-80px 0; }
.world-seat-student { width:48px; height:48px; top:-1px; }
.world-seat-mark { border-radius:50%; right:2px; top:1px; }
.world-session #attendance-view .world-classroom-seats .student-profile-button {
  background:linear-gradient(transparent 6px,#fff1c7 6px 35px,transparent 35px);
  border:0; border-radius:0; box-shadow:none; line-height:44px; font-size:.8rem; text-decoration:none;
}
.world-session #attendance-view .world-classroom-seats .student-info {
  width:min(100%,108px); margin-inline:auto; background:#a86536;
  border:1px solid #71442c; border-bottom:0; border-radius:5px 5px 0 0;
}
.world-session #attendance-view .world-classroom-seats .status-actions {
  grid-row:3; width:min(100%,108px); margin-inline:auto;
  background:#a86536; border-radius:0 0 5px 5px;
}
.world-session #attendance-view .world-classroom-seats .status-btn {
  border-width:0; border-radius:0; box-shadow:inset 0 0 0 2px #875139;
}
.world-session #attendance-view .world-classroom-seats .roll-reason {
  position:absolute; top:23px; left:2px; right:2px; height:44px; min-height:44px;
  background:linear-gradient(transparent 9px,#fff1d6 9px 31px,transparent 31px); border:0;
}
.world-session #attendance-view .world-classroom-seats .world-seat-health {
  font-size:0; background:transparent;
}
.world-session #attendance-view .world-classroom-seats .world-seat-health::after {
  content:"!"; display:grid; place-items:center; position:absolute; top:3px; left:2px;
  width:17px; height:17px; border:1px solid #8f4d25; border-radius:50%;
  background:#ffdb79; color:#83291c; font-size:.75rem;
}
.world-classroom-front {
  display:block; min-height:0; aspect-ratio:2.8; padding:0;
  background:#704529 url("assets/lincoln-world/room-school.jpeg") center top / 100% auto no-repeat;
}
.world-classroom-board {
  position:absolute; inset:27% 26% auto 35%; width:auto; max-width:none;
  padding:0 2px; background:none; border:0; box-shadow:none;
  color:#ffefce; line-height:1.2; text-shadow:1px 1px #173e2d;
}
.world-classroom-board h2 { font-size:clamp(.86rem,2.35vw,1.55rem); }
.world-classroom-board :is(p,b,small) { font-size:clamp(.65rem,1.6vw,1rem); }
.world-classroom-board p { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.world-classroom-teacher { right:3%; width:19%; max-width:120px; }
.world-teacher-sprite canvas { width:clamp(43px,12vw,78px); height:auto; }
#attendance-view .world-classroom-seats {
  gap:8px 0; padding-block:9px 13px;
  background:
    repeating-linear-gradient(90deg,transparent 0 146px,#a35d354a 146px 147px,transparent 147px 275px) 0 0 / 275px 22px,
    repeating-linear-gradient(0deg,#bc7848 0 2px,#e3a268 2px 5px,#d59861 5px 22px);
}
.world-session #attendance-view .world-classroom-seats .student-row {
  grid-template-rows:103px 44px 44px;
}
.world-seat-scene { height:100px; margin-top:0; }
.world-seat-chair,.world-seat-desk {
  top:20px; background-image:url("assets/lincoln-world/classroom-furniture-v22.png");
}
.world-seat-student { top:24px; width:49px; height:49px; }
.world-seat-mark { top:37px; right:3px; }
.world-session #attendance-view .world-classroom-seats .student-info,
.world-session #attendance-view .world-classroom-seats .status-actions {
  border:0; border-radius:0; background:transparent;
}
.world-session #attendance-view .world-classroom-seats .student-profile-button {
  display:grid; place-content:center; line-height:1.05; text-align:center;
  white-space:normal; overflow-wrap:anywhere; padding:0 4px;
  background:linear-gradient(transparent 8px,#805234 8px 10px,#f0c287 10px 32px,#805234 32px 34px,transparent 34px);
}
.world-session #attendance-view .world-classroom-seats .status-btn {
  box-shadow:none; background:transparent; position:relative; isolation:isolate;
}
.world-session #attendance-view .world-classroom-seats .status-btn::before {
  content:""; position:absolute; inset:5px 3px; z-index:-1; border:1px solid currentColor; border-radius:4px;
  background:#edf0cc; box-shadow:0 1px #9c6542;
}
.world-session #attendance-view .world-classroom-seats .absent-btn::before { background:#ffdccc; }
.world-session #attendance-view .world-classroom-seats .present-btn.active::before { background:#35753f; }
.world-session #attendance-view .world-classroom-seats .absent-btn.active::before { background:#a24136; }
.world-session #attendance-view .world-classroom-seats .status-btn.active { background:transparent; }
.world-session #attendance-view .world-classroom-seats .roll-reason { top:48px; }
.world-session #attendance-view .world-classroom-seats .world-seat-health {
  left:50%; transform:translateX(-50%); top:0; width:calc(100% - 4px); height:44px;
  font-size:.65rem; background:transparent; color:#542e21;
}
.world-session #attendance-view .world-classroom-seats .world-seat-health::after { content:none; }
.world-seat-health > span {
  position:absolute; inset:0 0 auto; min-height:23px; display:grid; align-content:center;
  background:#ffedc2; border:1px solid #86553c; border-radius:4px; line-height:1.1;
}
.world-seat-health > span::before { content:"!"; position:absolute; left:3px; top:3px; font-weight:900; }
.world-seat-health > span::after {
  content:""; width:5px; height:5px; position:absolute; left:50%; bottom:-4px;
  rotate:45deg; background:inherit; border-right:1px solid #86553c; border-bottom:1px solid #86553c;
}
.world-seat-health[data-tone=red] > span { background:#ffd5c4; }
.world-seat-health[data-tone=blue] > span { background:#d5eaff; }
.world-seat-health[data-tone=purple] > span { background:#eedcff; }
.world-seat-health > span:empty { width:23px; margin-inline:auto; }
.world-seat-health > span:empty::before { left:8px; }
.world-seat-details article { margin-block:8px; border-bottom:1px solid #bf945f; }
.world-seat-details article p { white-space:pre-wrap; overflow-wrap:anywhere; }
.world-seat-details button { margin:3px; }
.world-session #attendance-view .world-classroom-seats .world-seat-profile {
  position:absolute; top:43px; left:50%; transform:translateX(-50%); z-index:1;
  width:44px; height:44px; padding:0; border:0; background:transparent;
}
.world-session #attendance-view .world-classroom-seats .roll-reason { z-index:2; }
.world-session #attendance-view .world-classroom-seats .status-btn[aria-pressed=true]::before {
  content:""; display:block; margin:0; width:auto; height:auto; inset:5px 3px;
}
.world-session #attendance-view .world-classroom-seats .present-btn[aria-pressed=true]::before { background:#35753f; }
.world-session #attendance-view .world-classroom-seats .absent-btn.active::before { background:#a24136; }
.world-classroom-front { scroll-margin-top:156px; }
@media(max-width:460px) {
  #world-roll-controls label { font-size:0; gap:0; }
  #world-roll-controls button, #world-roll-controls select { padding-inline:3px; font-size:.7rem; }
  .world-classroom-board { inset-inline:34% 25%; }
  .world-classroom-board b { font-size:.6rem; }
}
/* World seat controls use real rectangular fills, independent of the Quick tick. */
.world-session #attendance-view .world-classroom-seats .status-btn::before,
.world-session #attendance-view .world-classroom-seats .status-btn[aria-pressed=true]::before { content:none; }
.world-session #attendance-view .world-classroom-seats .status-btn,
.world-session #attendance-view .world-classroom-seats .status-btn.active {
  transform:none; outline:none; border:1px solid transparent; border-radius:5px;
  background:#ecf2d4 content-box; padding:5px 2px; box-shadow:none;
}
.world-session #attendance-view .world-classroom-seats .present-btn.active { background:#307341 content-box; color:#fff9e0; }
.world-session #attendance-view .world-classroom-seats .absent-btn { background:#fbd7c8 content-box; }
.world-session #attendance-view .world-classroom-seats .absent-btn.active { background:#a34038 content-box; color:#fff9e0; }
.world-session #attendance-view .world-classroom-seats .status-btn:focus-visible {
  outline:2px solid #163f79; outline-offset:-4px;
}
.world-session #attendance-view .world-classroom-seats .student-row {
  display:flex; flex-direction:column; align-items:stretch; scroll-margin-bottom:140px;
}
.world-session #attendance-view .world-classroom-seats .student-row[hidden] { display:flex !important; }
.world-session #attendance-view .world-classroom-seats .world-seat-health {
  order:-1; position:relative; inset:auto; transform:none; width:100%; height:auto;
  min-height:44px; min-width:0; margin:0 0 4px; padding:1px 2px 7px;
  display:grid; place-items:center; text-align:left;
}
.world-session #attendance-view .world-classroom-seats .world-seat-health[hidden] { display:none; }
.world-seat-health > span { position:relative; inset:auto; width:100%; padding:4px; overflow-wrap:anywhere; white-space:pre-wrap; }
.world-seat-health > span:not(:empty)::before { content:none; }
.world-seat-health > span > span { display:block; }
.world-seat-health > span > span + span { border-top:1px solid #9a70485c; margin-top:3px; padding-top:3px; }
.world-seat-health > span:empty { display:block; padding:0; }
.world-seat-scene { width:100%; max-width:124px; height:100px; margin-top:auto; isolation:isolate; }
.world-seat-scene::before {
  content:""; position:absolute; z-index:-1; width:72%; height:11px; bottom:8px; left:14%;
  background:#623b2f38; border-radius:50%;
}
.world-seat-chair,.world-seat-desk { top:0; width:106px; max-width:none; height:106px; background-size:212px 106px; }
.world-seat-desk { background-position:-106px 0; }
.world-seat-student { top:0; width:65px; height:65px; }
.world-seat-mark { top:13px; right:4px; }
.world-session #attendance-view .world-classroom-seats .roll-reason {
  position:static; align-self:center; order:3; width:min(100%,108px); min-width:0; height:auto; min-height:44px;
  padding:10px 3px; margin:0; color:#7c241f; font-weight:750; font-size:.65rem;
  background:#facfc0 content-box; line-height:1.2; white-space:normal; overflow-wrap:anywhere;
}
.world-session #attendance-view .world-classroom-seats .status-actions { order:4; }
.world-session #attendance-view .world-classroom-seats .world-seat-profile { top:auto; bottom:101px; }
.world-session #attendance-view .world-classroom-seats .student-row:not(:has(.roll-reason)) .status-actions { margin-top:auto; }
#attendance-view .world-classroom-seats {
  row-gap:12px; overflow-x:clip;
  background:repeating-linear-gradient(90deg,transparent 0 124px,#93532d36 124px 125px,transparent 125px 260px) 15px 0 / 260px 26px,
    repeating-linear-gradient(0deg,#bd784b 0 1px,#d8a371 1px 4px,#d29a66 4px 26px);
}
.world-classroom-board {
  top:54%; transform:translateY(-50%); line-height:1.18;
}
.world-classroom-board p:empty { display:none; }
.world-classroom-teacher { bottom:-11px; z-index:2; }
.world-teacher-sprite { position:relative; isolation:isolate; }
.world-teacher-sprite::after {
  content:""; position:absolute; z-index:-1; bottom:5px; left:20%; width:60%; height:8px;
  background:#492c245c; border-radius:50%;
}
.world-session #attendance-view:has(.world-classrooms) #attendance-content {
  padding-bottom:calc(var(--roll-footer-height, 96px) + 80px + env(safe-area-inset-bottom));
}
@media (min-width:650px) {
  #attendance-view .world-classroom-seats { column-gap:12px; }
}
@media(max-width:359px) {
  #attendance-view .world-classroom-seats { overflow-x:auto; }
}
.world-session #attendance-view .world-classroom-seats .world-seat-profile { bottom:auto; top:14px; }
.world-session #attendance-view:has(.world-classrooms) .sticky-finish {
  position:static; inset:auto; width:100%; transform:none;
  margin-top:8px; padding:8px; border-radius:8px;
}
.world-session #attendance-view:has(.world-classrooms) #attendance-content {
  padding-bottom:calc(64px + env(safe-area-inset-bottom));
}
@supports (grid-template-rows:subgrid) {
  #attendance-view .world-classroom-seats { row-gap:0; }
  .world-session #attendance-view .world-classroom-seats .student-row,
  .world-session #attendance-view .world-classroom-seats .student-row[hidden] {
    display:grid !important; grid-row:span 5; grid-template-rows:subgrid;
  }
  .world-session #attendance-view .world-classroom-seats .world-seat-health { grid-row:1; align-self:end; }
  .world-session #attendance-view .world-classroom-seats .world-seat-scene { grid-row:2; }
  .world-session #attendance-view .world-classroom-seats .student-info { grid-row:3; }
  .world-session #attendance-view .world-classroom-seats .roll-reason { grid-row:4; }
  .world-session #attendance-view .world-classroom-seats .status-actions { grid-row:5; margin-bottom:10px; }
}
.world-classroom-group { content-visibility:visible; overflow-anchor:none; }
.world-session #attendance-view .world-classroom-seats :is(.student-info,.roll-student-identity) {
  min-width:0; height:100%;
}
.world-session #attendance-view .world-classroom-seats .student-profile-button {
  box-sizing:border-box; width:100%; height:100%; min-height:44px; min-width:0; max-width:100%;
  display:flex; flex-direction:column; justify-content:center; align-items:stretch;
  gap:2px; padding:4px 3px; border:1px solid #805234; border-radius:4px;
  background:#f0c287; box-shadow:inset 0 1px #ffdeac;
  white-space:normal; overflow:visible; text-overflow:clip; line-height:1.2;
}
.world-seat-name-primary,.world-seat-name-english {
  display:block; min-width:0; max-width:100%; overflow-wrap:anywhere; white-space:normal;
}
.world-seat-name-primary { font-size:clamp(.8125rem,3.6vw,.875rem); font-weight:750; }
.world-seat-name-english { font-size:clamp(.6875rem,2.9vw,.75rem); font-weight:550; }
