/* Hallmark · scope: app · mode: redesign · reference: Google Classroom · type: Pretendard · signature: a classroom seating chart */
/* Critique: one class banner, legible desk names, short state transitions, a quiet print sheet. */
@font-face {
  font-family: Pretendard;
  src: url("fonts/PretendardVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --font: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --ink: #202622;
  --muted: #57635a;
  --line: #d6ddd6;
  --field-line: #7b867c;
  --line-soft: #e6eae4;
  --surface: #fff;
  --paper: #f9faf7;
  --soft: #eff3ec;
  --accent: #18694f;
  --accent-hover: #11523c;
  --accent-tint: #e1f1e7;
  --focus: #2469ac;
  --error: #a63631;
  --banner: #19343d;
  --moon-tint: #c7ddcf;
  --moon-light: #a8c7bc;
  --moon-line: #abcdef2e;
  --overlay: #142d2980;
  --wood: #f8eacf;
  --wood-edge: #c7b18b;
  --wood-shadow: #e2cea9;
  --chair: #d7bf96;
  --desk-ink: #382f23;
  --desk-secondary: #65553d;
  --board: #38614e;
  --chalk: #eaf4e3;
  --rail: #c1a077;
  --floor: #f6f4ed;
  --tile: #d0caba63;
  --print-ink: #111;
  --print-edge: #64748b;
  --hatch: #dce2d8;
  --banner-btn: #fff;
  --banner-control: #24433d;
  --backdrop: #192d255c;
  --shadow: 0 12px 48px #122c2526;
  --fabric-deep: #143e35;
  --fabric-dark: #184a3c;
  --fabric-light: #3f7960;
  --fabric-mid: #2c634d;
  --curtain-shade: rgb(5 30 23 / 36%);
  --curtain-scrim: rgb(5 26 21 / 62%);
  --curtain-thread: #b5b699;
  --gold: #f3d298;
  --max: 1256px;
  --radius: 13px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
html,
body {
  overflow-x: clip;
}
body,
h1,
h2,
h3,
p {
  margin: 0;
}
body {
  min-height: 100vh;
}
h1,
h2,
h3 {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: keep-all;
  line-height: 1.25;
}
button,
a,
input,
select {
  font: inherit;
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
a {
  color: var(--accent);
}
button:disabled,
input:disabled {
  color: var(--muted);
  background: var(--soft);
  border-color: var(--line);
  cursor: not-allowed;
}
:where(button, a, input, select):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.icon {
  vertical-align: middle;
  flex: none;
  pointer-events: none;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.icon-button:hover {
  background: var(--soft);
}
.masthead {
  min-height: 62px;
  padding: 10px clamp(16px, 4vw, 72px);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.045em;
  font-weight: 660;
}
.brand img {
  width: 36px;
  height: 36px;
}
.mode-label {
  font-size: 14px;
  color: var(--muted);
}
.mast-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.mast-right a {
  text-decoration: none;
}
.account-action,
.account-signup {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 8px;
  font-weight: 610;
  color: var(--accent);
}
.account-action:hover {
  background: var(--soft);
}
.account-menu {
  position: relative;
  max-width: 38vw;
}
.account-menu summary {
  display: list-item;
  list-style-position: inside;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu summary:focus-visible {
  outline: 3px solid var(--focus);
}
.account-links {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 4;
  display: grid;
  gap: 2px;
  width: max-content;
  min-width: 148px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
}
.account-feedback {
  text-align: center;
  padding: 8px 16px;
  color: var(--accent);
  background: var(--accent-tint);
}
.account-signup {
  background: var(--accent-tint);
}
.account-signup:hover {
  color: var(--accent-hover);
}
.user-name {
  color: var(--muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shell {
  min-width: 0;
}
.course-nav,
main {
  max-width: var(--max);
  margin-inline: auto;
  width: calc(100% - 64px);
}
aside {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.course-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 55px;
}
.class-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 32%;
  font-weight: 620;
  border-radius: 8px;
  padding: 6px 9px 6px 3px;
}
.class-switch:hover {
  background: var(--soft);
}
#current-class {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.class-icon {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.class-switch .icon {
  width: 17px;
}
.course-nav nav {
  align-self: stretch;
  display: flex;
  gap: 3px;
}
.nav-item {
  white-space: nowrap;
  position: relative;
  padding: 0 15px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 580;
}
.nav-item:after {
  content: "";
  position: absolute;
  inset: auto 10px -1px;
  height: 3px;
  border-radius: 4px 4px 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.22s var(--ease);
}
.nav-item.active {
  color: var(--accent);
}
.nav-item.active:after {
  transform: scaleX(1);
}
.nav-item:hover {
  background: var(--paper);
}
main {
  padding: 24px 0 38px;
}
.viewer aside {
  display: none;
}
.viewer main {
  max-width: 1150px;
}
.class-cover {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 24px 32px;
  min-height: 150px;
  color: var(--surface);
  background: var(--banner);
  border-radius: var(--radius);
  margin-bottom: 22px;
}
.moon {
  mix-blend-mode: screen;
  position: absolute;
  z-index: -1;
  inset: 0 0 0 28%;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 67% 55%,
    var(--moon-line),
    transparent 64%
  );
}
.moon:before {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  top: 50%;
  right: 10%;
  transform: translateY(-48%) rotate(-15deg);
  background: url("class-moon.jpg") center/cover no-repeat;
  filter: grayscale(1);
  mix-blend-mode: screen;
  opacity: 0.64;
}
.class-cover:before,
.class-cover:after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  right: 4%;
  top: 50%;
  width: 56%;
  height: 120%;
  border: 1px solid var(--moon-line);
  border-radius: 50%;
  transform: translateY(-50%) rotate(-14deg);
}
.class-cover:after {
  right: -3%;
  width: 68%;
  height: 165%;
}
.cover-info {
  position: relative;
  max-width: 68%;
  text-shadow: 0 1px 3px var(--overlay);
}
.cover-info h1 {
  font-size: 36px;
  font-weight: 690;
  letter-spacing: -0.045em;
}
.cover-info p {
  margin-top: 7px;
  font-size: 15px;
  font-weight: 490;
}
.actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.class-cover .actions {
  position: relative;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 610;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.14s var(--ease),
    background-color 0.15s;
}
.btn:hover,
.list-action:hover,
.class-tile:hover {
  background: var(--paper);
  border-color: var(--accent);
}
.btn:active,
.text-btn:active,
.class-tile:active {
  transform: scale(0.97);
}
.btn.primary,
.btn.dark {
  color: var(--surface);
  background: var(--accent);
  border-color: var(--accent);
}
.btn.primary:hover,
.btn.dark:hover {
  background: var(--accent-hover);
}
.class-cover .btn {
  background: var(--banner-btn);
  color: var(--banner-control);
  border-color: transparent;
}
.class-cover .btn:focus-visible {
  outline-color: var(--surface);
  box-shadow: 0 0 0 3px var(--banner);
}
.class-cover .btn:hover {
  background: var(--accent-tint);
}
.btn.wide {
  width: 100%;
}
.btn.ghost,
.text-btn {
  color: var(--accent);
  border: 0;
  background: transparent;
}
.text-btn {
  font-size: 14px;
  line-height: 1.3;
  border-radius: 7px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  font-weight: 600;
}
.text-btn:hover {
  background: var(--accent-tint);
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 25px;
}
.page-head h1 {
  font-size: 32px;
  letter-spacing: -0.045em;
}
.page-head p {
  margin-top: 8px;
  color: var(--muted);
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  align-items: start;
  gap: 22px;
}
.workspace-grid > div,
.card {
  min-width: 0;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.card-head,
.panel-title,
.section-head {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 61px;
  padding: 13px 19px;
  border-bottom: 1px solid var(--line-soft);
}
.card-head,
.section-head {
  justify-content: space-between;
}
.lhs,
.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.blue-icon {
  display: inline-flex;
  color: var(--accent);
}
.card-head h2,
.panel-title h2,
.section-head h2,
.class-tile b {
  font-size: 18px;
  letter-spacing: -0.03em;
  font-weight: 680;
}
.board-count {
  font-size: 13px;
  color: var(--muted);
  margin-left: 2px;
}
.plan-frame {
  background-color: var(--floor);
  background-image:
    linear-gradient(90deg, var(--tile) 1px, transparent 1px),
    linear-gradient(var(--tile) 1px, transparent 1px);
  background-size: 56px 56px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 17px clamp(13px, 3.3vw, 55px) 21px;
}
.plan-inner {
  min-width: calc(var(--cols) * 56px);
}
.lectern {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 28%;
  min-width: 95px;
  max-width: 190px;
  height: 25px;
  background: var(--board);
  color: var(--chalk);
  border-radius: 4px 4px 2px 2px;
  margin: 0 auto 15px;
  font-size: 13px;
  font-weight: 560;
  box-shadow: 0 3px 0 var(--rail);
}
.desks {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 10px clamp(8px, 1.6vw, 26px);
}
.desk {
  min-width: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-direction: column-reverse;
  justify-content: center;
  position: relative;
  color: var(--desk-ink);
  text-align: center;
  background: transparent;
}
.desktop {
  width: 100%;
  min-height: 49px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 4px 2px;
  border: 1px solid var(--wood-edge);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: var(--desk-fill, var(--wood));
  box-shadow: 0 1px 0 var(--wood-shadow);
  transition:
    transform 0.17s var(--ease),
    box-shadow 0.17s var(--ease);
}
.desktop small {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  line-height: 1.25;
  color: var(--desk-secondary);
  font-weight: 570;
}
.desktop strong {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 660;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.chair {
  width: 44%;
  height: 5px;
  background: var(--chair);
  border: 1px solid var(--wood-edge);
  border-top: 0;
  border-radius: 0 0 4px 4px;
}
.desktop i {
  position: absolute;
  right: 4px;
  top: 3px;
  color: var(--accent);
}
button.desk:hover .desktop,
button.desk:focus-visible .desktop {
  transform: translateY(-2px);
  box-shadow: 0 3px 0 var(--wood-shadow);
  border-color: var(--desk-secondary);
}
button.desk:active .desktop {
  transform: translateY(1px);
}
.teacher .desk {
  flex-direction: column;
}
.teacher .chair {
  transform: rotate(180deg);
}
.teacher .lectern {
  margin: 15px auto 3px;
}
.empty .desktop {
  background: var(--desk-fill, var(--paper));
  border: 1px dashed var(--wood-edge);
  color: var(--muted);
}
.blocked .desktop {
  background: repeating-linear-gradient(
    135deg,
    var(--paper),
    var(--paper) 5px,
    var(--hatch) 6px,
    var(--hatch) 7px
  );
}
.invisible {
  visibility: hidden;
}
.board-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  padding: 7px 16px;
  font-size: 13px;
  color: var(--muted);
}
.board-foot span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.board-foot .text-btn {
  font-size: 13px;
}
.note-row {
  margin: 11px 3px 0;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}
.note-row .icon {
  margin-top: 2px;
}
.board-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
  gap: 2px;
}
.setting {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.setting label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 620;
}
.setting label .icon {
  color: var(--muted);
  width: 17px;
}
.setting p,
.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.setting p {
  margin: 5px 0 0;
}
.setting select {
  margin-top: 5px;
}
.unit {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.setting .seconds {
  max-width: 56px;
  min-height: 32px;
  text-align: center;
  padding: 4px;
}
.draw-area {
  padding: 14px 17px;
}
.draw-area .btn {
  min-height: 43px;
}
input:not([type="checkbox"], [type="hidden"]),
select {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--field-line);
  border-radius: 7px;
  min-height: 40px;
  width: 100%;
  padding: 8px 10px;
  font-size: 15px;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-size: 14px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.toggle {
  width: 37px;
  height: 22px;
  appearance: none;
  border-radius: 24px;
  background: var(--muted);
  cursor: pointer;
  position: relative;
  flex: none;
  margin: 0;
  transition: background-color 0.17s;
}
.toggle:before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.18s var(--ease);
}
.toggle:checked {
  background: var(--accent);
}
.toggle:checked:before {
  transform: translateX(15px);
}
.field {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.field > span,
.checkline {
  font-size: 14px;
}
.field > span {
  font-weight: 630;
}
.checkline {
  display: flex;
  align-items: center;
  gap: 7px;
}
.checkline input {
  accent-color: var(--accent);
  width: 17px;
  height: 17px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-actions {
  justify-content: flex-end;
}
.form-error {
  color: var(--error);
  font-size: 14px;
}
.form-error:empty {
  display: none;
}
.form-error ul {
  padding-left: 18px;
  margin: 0;
}
dialog {
  padding: 0;
  width: min(440px, calc(100% - 32px));
  max-height: 88vh;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(5px);
  transition:
    opacity 155ms ease,
    transform 200ms var(--ease),
    display 200ms allow-discrete,
    overlay 200ms allow-discrete;
}
dialog[open] {
  opacity: 1;
  transform: none;
}
dialog::backdrop {
  background: var(--backdrop);
  opacity: 0;
  transition:
    opacity 175ms ease,
    display 175ms allow-discrete,
    overlay 175ms allow-discrete;
}
dialog[open]::backdrop {
  opacity: 1;
}
@starting-style {
  dialog[open] {
    opacity: 0;
    transform: translateY(8px);
  }
  dialog[open]::backdrop {
    opacity: 0;
  }
}
.modal-shell {
  padding: 22px;
  margin: 0;
  display: grid;
  gap: 15px;
}
.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.modal-top h2 {
  font-size: 22px;
  letter-spacing: -0.03em;
}
.modal-list {
  display: grid;
  gap: 6px;
}
.list-action {
  padding: 12px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  background: var(--paper);
}
.class-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 16px;
}
.managed-context {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45em;
  padding: 8px max(16px, calc((100% - var(--max)) / 2));
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 14px;
}
.managed-context a { color: inherit; text-decoration: underline }
.managed-class .class-tile { width: 100% }
.managed-actions { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 4px }
.class-tile {
  text-align: left;
  display: grid;
  justify-items: start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.class-tile .class-icon {
  background: var(--accent-tint);
  border-radius: 9px;
  padding: 8px;
}
.class-tile small {
  color: var(--muted);
}
.empty-state,
.waiting {
  padding: 42px 25px;
}
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.waiting {
  text-align: center;
}
.waiting .icon {
  margin-bottom: 12px;
  color: var(--accent);
}
.empty-state p,
.waiting p {
  color: var(--muted);
  margin: 7px 0 17px;
}
.roster-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.roster-bar input {
  max-width: 72px;
}
.roster-table {
  border-collapse: collapse;
  width: 100%;
}
.roster-table th,
.roster-table td {
  text-align: left;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.roster-table th {
  font-size: 14px;
  background: var(--soft);
}
.roster-table td:first-child {
  width: 16%;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.roster-table td:last-child {
  width: 24%;
}
.roster-table input[type="text"] {
  max-width: 420px;
}
.roster-actions {
  padding: 16px;
  text-align: right;
}
.loading {
  padding: 20px;
  color: var(--muted);
}
#toasts {
  position: fixed;
  z-index: 8;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
}
.toast {
  background: var(--ink);
  color: var(--surface);
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 14px;
  animation: dialog-in 0.15s var(--ease);
}
#print-root {
  display: none;
}
.auth-main {
  display: grid;
  place-items: start center;
  min-height: calc(100vh - 64px);
  padding-block: min(10vh, 84px);
  max-width: 100%;
}
.auth-form {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.auth-form h1 {
  font-size: 29px;
  letter-spacing: -0.045em;
}
.auth-form > p,
.auth-links {
  color: var(--muted);
  font-size: 15px;
  margin-top: 8px;
}
.auth-form form {
  display: grid;
  gap: 15px;
  margin-block: 23px 16px;
}
.auth-form .btn {
  margin-top: 4px;
}
.auth-links a {
  font-weight: 650;
}
#reveal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  color: var(--chalk);
}
#reveal[hidden] {
  display: none;
}
/* Both wings use the same local coordinates, with their rail at the outer edge. */
.curtain-wing {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: calc(50% + 2px);
  pointer-events: none;
}
.curtain-wing.right {
  left: auto;
  right: 0;
  transform: scaleX(-1);
}
.fabric {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform-origin: left top;
  background-color: var(--fabric-dark);
  background-image:
    linear-gradient(
      176deg,
      var(--curtain-shade),
      transparent 22%,
      transparent 58%,
      var(--curtain-shade)
    ),
    repeating-linear-gradient(
      91deg,
      var(--fabric-deep) 0%,
      var(--fabric-dark) 2.4%,
      var(--fabric-mid) 5.7%,
      var(--fabric-light) 8%,
      var(--fabric-mid) 10%,
      var(--fabric-dark) 13.6%,
      var(--fabric-deep) 15.2%
    );
}
.fabric::before {
  content: "";
  position: absolute;
  inset: -6%;
  background:
    radial-gradient(ellipse at 87% 58%, var(--curtain-shade), transparent 58%),
    repeating-radial-gradient(
      ellipse 200% 170% at 210% 57%,
      var(--fabric-deep) 0%,
      var(--fabric-mid) 2.7%,
      var(--fabric-light) 4%,
      var(--fabric-mid) 4.9%,
      var(--fabric-deep) 7.6%
    );
  transform-origin: left center;
}
.fabric::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2.6%;
  height: 3px;
  border-block: 1px solid var(--curtain-thread);
  opacity: 0.5;
}
#reveal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--curtain-scrim);
}
#reveal.opening:not(.flat) .fabric {
  animation: gather-cloth var(--curtain-time, 2150ms) linear both;
}
#reveal.opening:not(.flat) .fabric::before {
  animation: fold-light var(--curtain-time, 2150ms) var(--ease) both;
}
#reveal.opening::before {
  animation: scrim-lift 1060ms var(--ease) both;
}
#reveal.flat {
  background: var(--banner);
}
#reveal.flat .curtain-wing,
#reveal.flat::before {
  display: none;
}
#reveal.flat.opening {
  animation: soft-clear 230ms ease-out both;
}
.reveal-text {
  position: relative;
  text-align: center;
}
.reveal-text > span {
  font-size: 20px;
  font-weight: 540;
}
.reveal-text strong {
  display: block;
  min-height: 1.1em;
  line-height: 1.1;
  font-size: clamp(78px, 15vw, 160px);
  font-weight: 660;
  font-variant-numeric: tabular-nums;
}
.reveal-text strong span {
  display: inline-block;
  animation: count-in 430ms var(--ease) both;
}
#reveal.opening .reveal-text {
  animation: caption-away 210ms ease-in both;
}
.released .desk {
  animation: desk-settle 540ms var(--ease) both;
  animation-delay: calc(var(--reveal-delay, 0ms) + var(--stagger, 0ms));
}
/* The leading edge draws in at its tie first. The loose hem follows, then
   the gathered cloth finishes its short travel beyond the frame. */
@keyframes gather-cloth {
  0% {
    transform: translateX(0) scaleX(1);
    clip-path: polygon(
      0 0,
      100% 0,
      100% 12%,
      100% 27%,
      100% 42%,
      100% 57%,
      100% 70%,
      100% 83%,
      100% 94%,
      100% 100%,
      0 100%
    );
    clip-path: shape(
      from 0% 0%,
      line to 100% 0%,
      curve to 100% 57% with 100% 21% / 100% 39%,
      curve to 100% 100% with 100% 76% / 100% 92%,
      line to 0% 100%,
      close
    );
    animation-timing-function: cubic-bezier(0.4, 0, 0.59, 0.52);
  }
  25% {
    transform: translateX(0) scaleX(0.86);
    clip-path: polygon(
      0 0,
      96% 0,
      94% 12%,
      88% 27%,
      80% 42%,
      77% 57%,
      80% 70%,
      87% 83%,
      96% 94%,
      100% 100%,
      0 100%
    );
    clip-path: shape(
      from 0% 0%,
      line to 96% 0%,
      curve to 77% 57% with 96% 21% / 77% 39%,
      curve to 100% 100% with 77% 76% / 90% 92%,
      line to 0% 100%,
      close
    );
    animation-timing-function: cubic-bezier(0.15, 0.46, 0.27, 1);
  }
  72% {
    transform: translateX(0) scaleX(0.235);
    clip-path: polygon(
      0 0,
      87% 0,
      84% 12%,
      73% 27%,
      57% 42%,
      48% 57%,
      51% 70%,
      65% 83%,
      86% 94%,
      100% 100%,
      0 100%
    );
    clip-path: shape(
      from 0% 0%,
      line to 87% 0%,
      curve to 48% 57% with 87% 21% / 48% 39%,
      curve to 100% 100% with 48% 76% / 74% 92%,
      line to 0% 100%,
      close
    );
    animation-timing-function: cubic-bezier(0.36, 0, 0.38, 1);
  }
  100% {
    transform: translateX(-16%) scaleX(0.145);
    clip-path: polygon(
      0 0,
      84% 0,
      82% 12%,
      69% 27%,
      54% 42%,
      46% 57%,
      52% 70%,
      67% 83%,
      87% 94%,
      100% 100%,
      0 100%
    );
    clip-path: shape(
      from 0% 0%,
      line to 84% 0%,
      curve to 46% 57% with 84% 21% / 46% 39%,
      curve to 100% 100% with 46% 76% / 73% 92%,
      line to 0% 100%,
      close
    );
  }
}
@keyframes fold-light {
  from {
    transform: skewX(0);
    opacity: 0.4;
  }
  62% {
    transform: skewX(-5deg);
    opacity: 0.95;
  }
  to {
    transform: skewX(-3deg);
    opacity: 0.68;
  }
}
@keyframes scrim-lift {
  0%,
  14% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes soft-clear {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes caption-away {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-5px);
  }
}
@keyframes count-in {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes desk-settle {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes panel-arrive {
  from {
    opacity: 0.3;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media screen and (prefers-reduced-motion: no-preference) {
  main[data-enter] > * {
    animation: panel-arrive 255ms var(--ease) both;
  }
  main[data-enter] > :nth-child(2) {
    animation-delay: 37ms;
  }
  .account-menu[open] .account-links,
  .auth-form {
    animation: dialog-in 230ms var(--ease) both;
  }
  .toast {
    animation:
      dialog-in 200ms var(--ease) both,
      soft-clear 235ms ease-in 3150ms forwards;
  }
  .roster-table input {
    transition:
      background-color 180ms ease,
      color 180ms ease;
  }
  .class-tile {
    transition:
      transform 170ms var(--ease),
      background-color 170ms ease,
      border-color 170ms ease;
  }
}
@media (min-width: 1500px) {
  .class-cover {
    min-height: 170px;
  }
  .desktop {
    min-height: 57px;
  }
  .desks {
    row-gap: 13px;
  }
}
@media (max-width: 920px) {
  .course-nav,
  main {
    width: calc(100% - 34px);
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 12px;
  }
  .plan-frame {
    padding: 16px 12px;
  }
  .plan-inner {
    min-width: calc(var(--cols) * 42px);
  }
  .desks {
    column-gap: 6px;
  }
  .desktop strong {
    font-size: 15px;
  }
  .setting,
  .draw-area {
    padding-inline: 13px;
  }
}
@media (max-width: 720px) {
  .masthead {
    min-height: 52px;
    padding: 7px 12px;
    gap: 5px;
  }
  .brand {
    font-size: 17px;
    gap: 5px;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .mast-right {
    gap: 2px;
  }
  .account-action,
  .account-signup {
    font-size: 13px;
    padding: 6px 8px;
  }
  .user-name {
    max-width: 65px;
  }
  .course-nav,
  main {
    width: calc(100% - 24px);
  }
  .course-nav {
    gap: 4px;
    min-height: 47px;
    justify-content: space-between;
  }
  .class-switch {
    max-width: 42%;
    font-size: 14px;
    gap: 5px;
  }
  .class-switch .class-icon {
    display: none;
  }
  .nav-item {
    padding: 0 9px;
    font-size: 14px;
  }
  .nav-item:after {
    inset-inline: 6px;
  }
  main {
    padding-top: 12px;
  }
  .class-cover {
    min-height: 138px;
    padding: 16px;
    display: block;
    margin-bottom: 13px;
  }
  .cover-info {
    max-width: 95%;
  }
  .cover-info h1 {
    font-size: 28px;
  }
  .cover-info p {
    font-size: 13px;
    margin-top: 3px;
  }
  .class-cover .actions {
    margin-top: 11px;
  }
  .class-cover .btn {
    min-height: 32px;
    font-size: 13px;
    padding: 4px 9px;
  }
  .moon {
    left: 23%;
  }
  .moon:before {
    width: 210px;
    height: 210px;
    right: -20%;
    opacity: 0.48;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .card-head,
  .panel-title {
    min-height: 48px;
    padding: 9px 12px;
  }
  .card-head h2,
  .panel-title h2 {
    font-size: 16px;
  }
  .board-count {
    display: none;
  }
  .desktop {
    min-height: 42px;
  }
  .desktop strong {
    font-size: 14px;
  }
  .desk .chair {
    height: 4px;
  }
  .desks {
    row-gap: 8px;
  }
  .plan-frame {
    padding: 13px 8px 16px;
  }
  .lectern {
    margin-bottom: 12px;
  }
  .board-foot {
    padding: 4px 9px;
  }
  .note-row {
    font-size: 13px;
  }
  .board-tools {
    margin-top: 2px;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .roster-table th,
  .roster-table td {
    padding: 6px 9px;
  }
  .page-head {
    flex-wrap: wrap;
    padding: 9px 0 18px;
  }
  .page-head h1 {
    font-size: 26px;
  }
  .page-head p {
    font-size: 14px;
  }
  .auth-form {
    padding: 22px;
  }
  .auth-main {
    padding-top: 35px;
  }
}
@media (max-width: 360px) {
  .class-switch {
    max-width: 28%;
    min-width: 0;
  }
  .nav-item {
    padding-inline: 6px;
  }
  .class-cover .actions {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  #reveal.opening:not(.flat) .fabric {
    animation: quiet-curtain var(--curtain-time, 850ms) ease-in-out both !important;
  }
  #reveal.opening::before, #reveal.opening .reveal-text {
    animation: soft-clear 350ms ease-out both !important;
  }
  #reveal.flat.opening { animation: soft-clear 230ms ease-out both !important }
}
@keyframes quiet-curtain {
  from { clip-path: inset(0 0 0 0) }
  to { clip-path: inset(0 100% 0 0) }
}

.skip-field { margin: 0; padding: 0; border: 0; min-width: 0 }
.field[hidden] { display: none }
.skip-field legend { margin-bottom: 8px; font-weight: 600 }
.skip-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; max-height: 215px; overflow: auto; padding: 2px }
.skip-grid label { position: relative; cursor: pointer }
.skip-grid input { position: absolute; opacity: 0 }
.skip-grid span { display: block; text-align: center; padding: 5px; border: 1px solid var(--line); border-radius: 5px }
.skip-grid input:checked + span { background: var(--accent-tint); color: var(--accent); border-color: var(--accent); text-decoration: line-through }
.skip-grid input:focus-visible + span { outline: 2px solid var(--focus) }

@media screen {
  :fullscreen .viewer .masthead {
    display: none;
  }
  :fullscreen .viewer main {
    height: 100dvh;
    width: 98%;
    max-width: none;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
  }
  :fullscreen .viewer .class-cover {
    min-height: auto;
    flex: none;
    display: flex;
    align-items: center;
    padding: 8px 18px;
    margin: 0 0 8px;
  }
  :fullscreen .viewer .cover-info h1 {
    font-size: 24px;
  }
  :fullscreen .viewer .cover-info p,
  :fullscreen .viewer .moon,
  :fullscreen .viewer .card-head {
    display: none;
  }
  :fullscreen .viewer .class-cover .actions {
    margin: 0;
  }
  :fullscreen .viewer .card {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  :fullscreen .viewer .waiting {
    justify-content: center;
    align-items: center;
  }
  :fullscreen .viewer .plan-frame {
    display: flex;
    flex: 1;
    min-height: 0;
    padding: 10px 2.5vw;
    overflow: auto;
  }
  :fullscreen .viewer .plan-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  :fullscreen .viewer .lectern {
    flex: none;
    font-size: 17px;
    max-width: 250px;
    height: 31px;
  }
  :fullscreen .viewer .desks {
    flex: 1;
    grid-template-rows: repeat(var(--rows), minmax(22px, 1fr));
  }
  :fullscreen .viewer .desktop {
    flex: 1;
    min-height: 0;
  }
  :fullscreen .viewer .desktop strong {
    font-size: clamp(
      14px,
      min(calc(20vw / var(--cols)), calc(36vh / var(--rows))),
      64px
    );
  }
  :fullscreen .viewer .desktop small {
    font-size: clamp(
      11px,
      min(calc(9vw / var(--cols)), calc(20vh / var(--rows))),
      28px
    );
  }
}

dialog:has(.export-layout) {
  width: min(1050px, calc(100% - 32px));
}
.export-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 216px;
  gap: 24px;
  align-items: start;
}
#sheet-preview {
  background: var(--paper);
  padding: 12px;
  border: 1px solid var(--line);
}
#sheet-preview svg, #print-root svg {
  display: block;
  width: 100%;
  height: auto;
}
#sheet-preview svg {
  border: 1px solid var(--line);
}
.export-settings {
  display: grid;
  gap: 15px;
}
.export-settings .field { margin: 0 }
.export-settings textarea {
  font: inherit;
  width: 100%;
  padding: 8px 10px;
  resize: vertical;
  border-radius: 6px;
  border: 1px solid var(--field-line);
}
#note-status { color: var(--accent); font-size: 14px }
#note-status:empty { display: none }
.export-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 720px) {
  .export-layout { grid-template-columns: minmax(0, 1fr); gap: 16px }
  #sheet-preview { padding: 4px }
}
@page {
  size: A4 landscape;
  margin: 9mm;
}
@media print {
  html, body {
    margin: 0;
    padding: 0;
    height: auto;
    min-height: 0;
    background: var(--surface);
  }
  body > *:not(#print-root) { display: none !important }
  #print-root {
    display: block !important;
    width: 100%;
    break-inside: avoid;
  }
  #print-root svg { max-height: 190mm }
}
