@charset "UTF-8";
:root {
  --wine: #172b50;
  --wine-dark: #0e1c36;
  --wine-light: #edf1f7;
  --ink: #263238;
  --muted: #68747b;
  --border: #e1e5e7;
  --canvas: #f5f6f7;
  --white: #fff;
  --green: #276650;
  --green-bg: #edf7f1;
  --amber: #8e5a0d;
  --amber-bg: #fff5de;
  --red: #b42332;
  --red-bg: #ffeff0;
  --blue: #2c6085;
  --blue-bg: #edf4fa;
  --radius: 8px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC",
    "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: var(--wine);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #c59458;
  outline-offset: 2px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: 0.025em;
  line-height: 1.35;
}
h2 {
  font-size: 19px;
  font-weight: 700;
}
h3 {
  font-size: 16px;
  font-weight: 700;
}
.muted {
  color: var(--muted);
}
.small,
small {
  font-size: 12px;
}
.mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.nowrap {
  white-space: nowrap;
}
.preline {
  white-space: pre-wrap;
}
.text-right {
  text-align: right;
}
.hidden,
[hidden] {
  display: none !important;
}
.initial-loading {
  padding: 25vh 20px;
  text-align: center;
  color: var(--muted);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand-seal {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.brand-subtitle {
  font-size: 11px;
  letter-spacing: 0;
  line-height: 1.35;
  opacity: 0.8;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.sidebar .brand {
  color: var(--wine);
  padding: 30px 22px 26px;
}
.nav-label {
  padding: 8px 26px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #899298;
}
.nav {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.nav a:hover {
  text-decoration: none;
  background: var(--canvas);
  color: var(--wine);
}
.nav a.active {
  background: var(--wine-light);
  color: var(--wine);
}
.nav svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.7;
  flex-shrink: 0;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 22px 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  border-top: 1px solid var(--border);
}
.workspace {
  margin-left: 236px;
  min-height: 100vh;
}
.topbar {
  height: 74px;
  border-bottom: 1px solid var(--border);
  background: #ffffffdd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  gap: 12px;
}
.topbar .today {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.025em;
}
.user-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  border-radius: 50%;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  background: var(--wine-light);
  color: var(--wine);
  font-weight: 700;
  font-size: 13px;
}
.user-info {
  font-size: 12px;
  line-height: 1.5;
}
.user-info strong {
  font-size: 13px;
}
.user-info span {
  display: block;
  color: var(--muted);
}
.user-area .btn {
  font-size: 12px;
  padding: 7px 10px;
  min-height: 34px;
}
main {
  max-width: 1560px;
  margin: 0 auto;
  padding: 32px 36px 70px;
}
.global-demo-note {
  max-width: 1560px;
  margin: 20px auto 0;
  padding: 0 36px;
}
.global-demo-note .note {
  margin-bottom: 0;
}
@media (max-width: 800px) {
  .global-demo-note {
    padding: 0 18px;
    margin-top: 18px;
  }
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 10px;
  color: var(--wine);
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-head p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 9px 15px;
  min-height: 40px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}
.btn:hover {
  background: #f9f9fa;
  text-decoration: none;
  border-color: #bdc3c7;
}
.btn.primary {
  background: var(--wine);
  color: #fff;
  border-color: var(--wine);
}
.btn.primary:hover {
  background: var(--wine-dark);
}
.btn.soft {
  background: var(--wine-light);
  border-color: transparent;
  color: var(--wine);
}
.btn.danger {
  color: var(--red);
  border-color: #e9c8cb;
}
.btn.tiny {
  font-size: 12px;
  padding: 6px 10px;
  min-height: 31px;
}
.btn.icon {
  padding: 8px;
}
.btn svg {
  width: 15px;
  height: 15px;
}
.btn.link {
  background: none;
  border: 0;
  padding: 5px;
  color: var(--wine);
  min-height: 28px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 23px;
  border-bottom: 1px solid var(--border);
}
.card-body {
  padding: 23px;
}
.card-foot {
  padding: 15px 23px;
  border-top: 1px solid var(--border);
  background: #fcfcfd;
}
.card-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
}
.filters .field {
  min-width: 130px;
  flex: 1;
}
.filters .field.wide {
  min-width: 240px;
  flex: 2;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > span,
.field > label {
  font-size: 12px;
  font-weight: 600;
  color: #505b62;
}
.field small {
  font-weight: 400;
  color: var(--muted);
}
input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d4dade;
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  color: var(--ink);
}
input::placeholder,
textarea::placeholder {
  color: #929b9f;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: #f4f5f6;
  color: #788186;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-height: 17px;
  accent-color: var(--wine);
  margin: 0;
  flex-shrink: 0;
}
input[type="file"] {
  padding: 12px;
  background: #fafafa;
}
textarea {
  min-height: 88px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.checkline {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  padding: 8px 0;
}
.checkline input {
  margin-top: 2px;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  background: #f0f2f4;
  color: #606c73;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.green {
  color: var(--green);
  background: var(--green-bg);
}
.badge.amber {
  color: var(--amber);
  background: var(--amber-bg);
}
.badge.red {
  color: var(--red);
  background: var(--red-bg);
}
.badge.blue {
  color: var(--blue);
  background: var(--blue-bg);
}
.badge.wine {
  color: var(--wine);
  background: var(--wine-light);
}
.note {
  display: flex;
  gap: 10px;
  background: var(--blue-bg);
  color: var(--blue);
  padding: 13px 16px;
  border-radius: 7px;
  font-size: 12px;
  margin-bottom: 20px;
  line-height: 1.7;
  border: 1px solid #dce8f0;
}
.note.warning {
  background: var(--amber-bg);
  color: var(--amber);
  border-color: #f2e0b8;
}
.note.error {
  background: var(--red-bg);
  color: var(--red);
  border-color: #f1d6d9;
}
.note.success {
  background: var(--green-bg);
  color: var(--green);
  border-color: #d5e8dc;
}
.note svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.note p + p {
  margin-top: 4px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.stat-label {
  color: var(--muted);
  font-size: 12px;
}
.stat-number {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}
.stat-number span {
  font-size: 11px;
  font-weight: 400;
  margin-left: 5px;
  color: var(--muted);
}
.stat-footer {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}
.stat.green .stat-number {
  color: var(--green);
}
.stat.red .stat-number {
  color: var(--red);
}
.stat.amber .stat-number {
  color: var(--amber);
}
.table-wrap {
  overflow: auto;
  max-width: 100%;
  scrollbar-width: thin;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
}
th {
  background: #f9fafb;
  color: #6b767d;
  font-size: 11px;
  letter-spacing: 0.025em;
  font-weight: 600;
  white-space: nowrap;
}
th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid #edf0f1;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fcfcfd;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 11px;
}
td .btn {
  margin: 2px 3px 2px 0;
}
td input,
td select {
  min-height: 35px;
  padding: 6px 8px;
  font-size: 12px;
}
td input[type="checkbox"] {
  min-height: 17px;
}
td.num {
  font-variant-numeric: tabular-nums;
}
td.name {
  min-width: 90px;
  font-weight: 600;
}
td.note-cell {
  min-width: 170px;
}
td.status-cell {
  min-width: 117px;
}
.time-input {
  min-width: 106px;
}
.seat {
  font-weight: 700;
  color: var(--wine);
  font-family: ui-monospace, SFMono-Regular, monospace;
}
.empty {
  padding: 58px 24px;
  text-align: center;
  color: var(--muted);
}
.empty svg {
  width: 44px;
  height: 44px;
  color: #b5bcc0;
  margin-bottom: 13px;
}
.empty h3 {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 7px;
}
.empty p {
  font-size: 13px;
  max-width: 450px;
  margin: 0 auto;
  line-height: 1.8;
}
.empty .btn {
  margin-top: 17px;
}
.section-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 23px;
  overflow: auto;
}
.section-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 0 1px 13px;
  font-size: 13px;
  white-space: nowrap;
  font-weight: 600;
}
.section-tabs button.active {
  color: var(--wine);
  border-color: var(--wine);
}
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}
.split .card {
  margin: 0;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.group-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.roll-header {
  padding: 22px 23px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: flex-start;
}
.roll-header h2 {
  font-size: 18px;
}
.roll-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 23px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
}
.roll-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 23px;
  border-top: 1px solid var(--border);
}
.roll-footer .field {
  flex: 1;
  max-width: 430px;
}
.face-detail {
  max-width: 260px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.face-detail summary {
  cursor: pointer;
  white-space: nowrap;
  color: var(--blue);
}
.face-detail p {
  margin: 5px 0;
}
.row-status-present {
  box-shadow: inset 3px 0 0 #78ae96;
}
.row-status-absent {
  box-shadow: inset 3px 0 0 #cf7e87;
}
.row-status-late {
  box-shadow: inset 3px 0 0 #d6b566;
}
.row-status-conflict {
  background: #fff5f5;
}
.view-only {
  font-size: 12px;
  color: var(--muted);
}
.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 21px 0;
}
.progress {
  height: 5px;
  background: #edf0f2;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 7px;
  min-width: 90px;
}
.progress div {
  height: 100%;
  background: var(--green);
  border-radius: 10px;
}
.list-pair {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.list-pair:last-child {
  border: 0;
}
.list-pair dt {
  color: var(--muted);
}
.list-pair dd {
  margin: 0;
  text-align: right;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.summary-grid .stat {
  padding: 12px 15px;
}
.summary-grid .stat-number {
  font-size: 23px;
  margin-top: 5px;
}
.scroll-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 7px;
}
.student-pick {
  padding: 9px 12px;
  border-bottom: 1px solid #edf0f2;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.student-pick:last-child {
  border: 0;
}
.student-pick small {
  color: var(--muted);
  margin-left: auto;
}
.dropzone {
  border: 1px dashed #bdc6cd;
  border-radius: 10px;
  padding: 25px 20px;
  background: #fcfcfd;
  text-align: center;
  margin-bottom: 18px;
}
.dropzone.drag {
  background: var(--wine-light);
  border-color: var(--wine);
}
.dropzone h3 {
  margin-bottom: 5px;
}
.dropzone input {
  margin-top: 14px;
  background: white;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.error-details {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.help-list {
  padding-left: 20px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.help-list li {
  margin-bottom: 5px;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.login-story {
  background: var(--wine-dark);
  color: white;
  padding: 54px 60px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.login-story .brand {
  position: relative;
  z-index: 1;
}
.login-copy {
  margin: auto 0;
  max-width: 520px;
  position: relative;
  z-index: 1;
}
.login-copy .eyebrow {
  color: #c7d1e3;
  margin-bottom: 25px;
}
.login-copy h1 {
  font-size: 42px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  font-weight: 650;
}
.login-copy p {
  font-size: 14px;
  line-height: 2.1;
  color: #e3cbd0;
  max-width: 365px;
  margin-top: 24px;
}
.login-story footer {
  font-size: 11px;
  color: #c7a7ae;
  position: relative;
  z-index: 1;
}
.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fcfcfd;
  padding: 44px 35px;
}
.login-form {
  width: 100%;
  max-width: 365px;
}
.login-form h2 {
  font-size: 24px;
  margin-bottom: 9px;
}
.login-form > .muted {
  font-size: 13px;
  margin-bottom: 30px;
}
.login-form .field {
  margin-bottom: 18px;
}
.login-form .btn {
  width: 100%;
  margin-top: 9px;
  min-height: 45px;
}
.login-form .footnote {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 22px;
}
.login-form .note {
  margin-top: 18px;
}
dialog {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 90px #1c293433;
  width: min(720px, calc(100vw - 30px));
  max-height: 90vh;
  color: var(--ink);
}
dialog.wide {
  width: min(1080px, calc(100vw - 30px));
}
dialog::backdrop {
  background: #17222b88;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 {
  font-size: 19px;
}
.modal-body {
  padding: 24px;
  overflow: auto;
  max-height: calc(90vh - 145px);
}
.modal-foot {
  padding: 15px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  background: #fafbfc;
}
.modal-body .note {
  margin-top: 0;
}
.modal-body table {
  font-size: 12px;
}
.modal-body th,
.modal-body td {
  padding: 9px 12px;
}
.modal-body .error-box:empty {
  display: none;
}
.modal-body .error-box {
  margin-top: 15px;
}
#toast {
  position: fixed;
  right: 24px;
  bottom: 23px;
  max-width: 460px;
  padding: 13px 19px;
  border-radius: 8px;
  background: #253b32;
  color: #fff;
  box-shadow: 0 6px 24px #0002;
  z-index: 100;
  display: none;
  font-size: 13px;
  white-space: pre-wrap;
}
#toast.error {
  background: #8e2e39;
}
#print-area {
  display: none;
}
.loading-line {
  height: 3px;
  background: var(--wine);
}

.loading-panel {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}
@keyframes loading {
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-line {
    animation: none;
  }
}
@media (min-width: 1600px) {
  main {
    padding-top: 40px;
  }
  .stats {
    gap: 18px;
  }
  .stat {
    padding: 22px 25px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 204px;
  }
  .workspace {
    margin-left: 204px;
  }
  .sidebar .brand {
    padding: 24px 17px;
  }
  .brand-title {
    font-size: 13px;
  }
  .brand-subtitle {
    font-size: 10px;
  }
  .brand-seal {
    width: 36px;
    height: 36px;
  }
  .topbar {
    padding: 0 25px;
  }
  main {
    padding: 28px 24px 55px;
  }
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 45px 40px;
  }
  .login-copy h1 {
    font-size: 35px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar .brand {
    padding: 15px 20px;
  }
  .sidebar .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    flex-direction: row;
    overflow: auto;
    padding: 0 12px 10px;
    gap: 3px;
  }
  .nav a {
    min-height: 36px;
    font-size: 12px;
    padding: 7px 11px;
    gap: 7px;
  }
  .nav svg {
    width: 16px;
    height: 16px;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    height: 60px;
    padding: 0 20px;
  }
  .topbar .today {
    font-size: 11px;
  }
  .user-area {
    gap: 7px;
  }
  .avatar {
    display: none;
  }
  .user-info {
    font-size: 10px;
  }
  .user-info strong {
    font-size: 12px;
  }
  .user-area .btn {
    font-size: 11px;
    padding: 5px 7px;
  }
  main {
    padding: 24px 18px 45px;
  }
  .page-head {
    margin-bottom: 20px;
    gap: 12px;
  }
  .page-head h1 {
    font-size: 24px;
  }
  .page-head p {
    font-size: 12px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 15px;
  }
  .stat-number {
    font-size: 24px;
    margin-top: 9px;
  }
  .card-head,
  .card-body,
  .roll-header {
    padding: 17px;
  }
  .card-foot,
  .roll-toolbar,
  .roll-footer {
    padding: 13px 17px;
  }
  .form-grid {
    gap: 14px;
  }
  .filters {
    gap: 12px;
  }
  .filters .field {
    min-width: 130px;
  }
  .filters .field.wide {
    min-width: 200px;
  }
  .roll-footer {
    flex-wrap: wrap;
  }
  .roll-footer .field {
    min-width: 100%;
    max-width: none;
  }
  .roll-header {
    flex-wrap: wrap;
  }
  .roll-header .actions {
    margin-top: 2px;
  }
  .section-tabs {
    gap: 20px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 25px;
    min-height: 190px;
  }
  .login-copy {
    margin: 27px 0 7px;
  }
  .login-copy .eyebrow,
  .login-story footer,
  .login-copy p {
    display: none;
  }
  .login-copy h1 {
    font-size: 25px;
    line-height: 1.5;
  }
  .login-copy br {
    display: none;
  }
  .login-form-side {
    padding: 35px 25px 50px;
  }
  .login-form h2 {
    font-size: 22px;
  }
  .login-form > .muted {
    margin-bottom: 23px;
  }
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  dialog .modal-body {
    padding: 18px;
  }
  .modal-head,
  .modal-foot {
    padding: 15px 18px;
  }
}
@media (max-width: 480px) {
  .topbar .today {
    max-width: 100px;
  }
  .user-info span {
    display: none;
  }
  .page-head {
    flex-wrap: wrap;
  }
  .page-head > .actions {
    width: 100%;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-label {
    font-size: 11px;
  }
  .stat-number {
    font-size: 25px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .filters .field {
    min-width: calc(50% - 12px);
  }
  .filters .field.wide {
    min-width: 100%;
  }
  .filters > .btn {
    flex: 1;
  }
  .card-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .roll-toolbar {
    flex-wrap: wrap;
  }
  .roll-footer > .actions {
    width: 100%;
  }
  .roll-footer > .actions .btn {
    flex: 1;
  }
  .btn {
    padding: 8px 12px;
    font-size: 12px;
  }
  .modal-foot .btn {
    flex: 1;
  }
  .note {
    font-size: 11px;
  }
  .page-head p {
    line-height: 1.8;
  }
  #toast {
    left: 15px;
    right: 15px;
    bottom: 15px;
  }
  .login-story {
    min-height: 175px;
  }
}
@page {
  size: A4 portrait;
  margin: 12mm 10mm 13mm;
}
@media print {
  body {
    background: white;
    color: black;
    font-size: 10pt;
  }
  #app,
  #modal,
  #toast,
  noscript {
    display: none !important;
  }
  #print-area {
    display: block !important;
    font-family:
      "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  }
  #print-area h1 {
    font-size: 18pt;
    text-align: center;
    margin-bottom: 5mm;
  }
  #print-area h2 {
    font-size: 12pt;
    margin: 5mm 0 2mm;
  }
  #print-area p {
    font-size: 9pt;
    line-height: 1.7;
    margin-bottom: 2mm;
  }
  #print-area table {
    width: 100%;
    table-layout: fixed;
    font-size: 9pt;
    border-collapse: collapse;
  }
  #print-area thead {
    display: table-header-group;
  }
  #print-area tr {
    break-inside: avoid;
  }
  #print-area th,
  #print-area td {
    border: 1px solid #999;
    padding: 2mm 1.4mm;
    white-space: normal;
    overflow-wrap: anywhere;
    color: black;
    background: white;
  }
  #print-area th {
    font-size: 8pt;
  }
  #print-area .print-meta {
    display: flex;
    justify-content: space-between;
    gap: 5mm;
    font-size: 9pt;
    border-bottom: 1px solid #555;
    padding-bottom: 3mm;
    margin-bottom: 3mm;
  }
  #print-area .print-sign {
    margin-top: 5mm;
    font-size: 9pt;
    line-height: 2;
  }
  #print-area .print-group {
    break-before: page;
  }
  #print-area .print-group:first-child {
    break-before: auto;
  }
  #print-area .print-note {
    font-size: 8pt;
    color: #444;
  }
  #print-area .print-blank td {
    height: 8mm;
  }
  a {
    color: black;
    text-decoration: none;
  }
}
/* School identity and planning controls. */
.sidebar {
  border-top: 3px solid var(--red);
}
.nav a.active {
  background: var(--wine);
  color: white;
}
.brand-subtitle {
  text-transform: none;
}
.live-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin: 14px 0 20px;
}
.live-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green);
}
.live-dot.stale {
  background: var(--red);
}
.planning-summary {
  margin-bottom: 18px;
}
.planning-preview-table {
  max-height: 550px;
}
.card-head.compact {
  padding-left: 0;
  padding-right: 0;
  margin-top: 18px;
}
.daily-rows {
  margin: 18px 0;
  display: grid;
  gap: 12px;
}
.daily-row {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  flex-wrap: wrap;
}
.daily-row > .field {
  width: 185px;
}
.daily-row fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  flex: 1;
  min-width: 230px;
}
.daily-row legend {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.grade-checks {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
}
.daily-preview {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.daily-preview summary {
  font-weight: 600;
  cursor: pointer;
}
.daily-preview > p {
  margin: 10px 0;
}
#layout-rows input[type="number"] {
  min-width: 65px;
}
#layout-rows input:not([type="checkbox"]) {
  width: 100%;
  padding: 6px 8px;
}
@media (max-width: 600px) {
  .daily-row > .field {
    width: 100%;
  }
  .daily-row fieldset {
    min-width: 0;
    width: 100%;
    flex-basis: 100%;
  }
  .brand-subtitle {
    max-width: 150px;
  }
}
@media print {
  #print-area .print-brand {
    display: flex;
    gap: 4mm;
    justify-content: center;
    align-items: center;
    margin-bottom: 4mm;
    color: #172b50;
    font-size: 14pt;
    font-weight: 700;
  }
  #print-area .print-brand img {
    height: 18mm;
    width: 18mm;
    object-fit: contain;
  }
  #print-area .print-brand small {
    display: block;
    font-size: 9pt;
    font-weight: 400;
  }
}
.allocation-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--wine);
}
.allocation-room {
  padding-top: 16px;
}
.allocation-room h2 {
  margin-bottom: 6px;
}
.seat-map-scroll {
  overflow: auto;
  margin-top: 16px;
  padding-bottom: 4px;
}
.seat-map {
  display: grid;
  gap: 6px;
  min-width: 600px;
}
.seat-map-cell {
  border: 1px solid #cbd1da;
  min-width: 0;
  padding: 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-wrap: anywhere;
  background: white;
}
.seat-map-cell strong {
  font-size: 12px;
  color: var(--wine);
}
.seat-map-cell .allocation-student {
  font-size: 13px;
}
.seat-map-label {
  font-size: 10px;
  color: var(--red);
  margin-bottom: 3px;
}
.seat-map-cell.disabled {
  background: #f1f2f4;
}
@media print {
  #print-area .seat-map {
    min-width: 0;
    gap: 1.3mm;
    grid-auto-rows: auto;
  }
  #print-area .seat-map-scroll {
    overflow: visible;
    margin-top: 3mm;
  }
  #print-area .seat-map-cell {
    padding: 1.2mm;
    break-inside: avoid;
  }
  #print-area .seat-map-cell strong {
    font-size: 8pt;
  }
  #print-area .seat-map-cell .allocation-student {
    font-size: 9pt;
  }
  #print-area .seat-map-label {
    font-size: 7pt;
  }
  #print-area .allocation-room h2 {
    text-align: center;
    font-size: 14pt;
  }
}

.seat-map {
  grid-template-columns: repeat(var(--seat-columns), minmax(72px, 1fr));
}
@media print {
  #print-area .seat-map {
    grid-template-columns: repeat(var(--seat-columns), minmax(0, 1fr));
  }
}
/* Compact operations workspace: local typefaces, restrained school colours. */
:root {
  --canvas: #f3f5f8;
  --ink: #1c293a;
  --muted: #647287;
  --border: #e0e5ed;
  --radius: 6px;
  font-family:
    "SF Pro Text",
    "PingFang TC",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft JhengHei",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
}
.sidebar {
  width: 224px;
  background: #142645;
  border-right: 0;
  border-top: 3px solid var(--red);
}
.sidebar .brand {
  color: white;
  padding: 24px 18px 26px;
  gap: 10px;
}
.sidebar .brand-title {
  font-size: 14px;
  letter-spacing: 0.04em;
}
.sidebar .brand-subtitle {
  font-size: 10px;
  line-height: 1.4;
  color: #c7d2e4;
  opacity: 1;
}
.sidebar .brand-seal {
  width: 44px;
  height: 44px;
}
.sidebar .nav-label {
  color: #8fa2bf;
  font-size: 9px;
  padding: 4px 24px 12px;
  letter-spacing: 0.13em;
}
.nav {
  gap: 4px;
  padding: 0 10px;
}
.nav a {
  border-radius: 5px;
  min-height: 41px;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 500;
  color: #cdd7e6;
}
.nav a:hover {
  color: white;
  background: #203657;
}
.nav a.active {
  color: #122543;
  background: white;
  box-shadow: inset 3px 0 0 var(--red);
  font-weight: 650;
}
.nav svg {
  width: 17px;
  height: 17px;
}
.sidebar-bottom {
  border-color: #ffffff1a;
  color: #9cafc9;
  padding: 18px 23px;
  font-size: 10px;
}
.workspace {
  margin-left: 224px;
}
.topbar {
  height: 60px;
  background: white;
  padding: 0 28px;
}
.topbar-context {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-context > strong {
  font-size: 13px;
  font-weight: 600;
  color: #26364d;
}
.topbar .today {
  font-size: 11px;
  letter-spacing: 0;
  color: #778397;
}
.user-area {
  gap: 10px;
}
.avatar {
  border-radius: 5px;
  width: 29px;
  height: 29px;
  font-size: 12px;
}
.user-info strong {
  font-weight: 600;
  font-size: 12px;
}
.user-info span {
  font-size: 10px;
}
.user-area .btn {
  border-color: transparent;
  background: transparent;
  font-size: 11px;
  color: #627087;
}
.user-area .btn:hover {
  background: #f0f3f8;
  color: var(--wine);
}
main {
  padding: 26px 28px 50px;
  max-width: 1720px;
}
.global-demo-note {
  margin: 0;
  max-width: none;
  padding: 0;
}
.global-demo-note .note {
  border: 0;
  border-bottom: 1px solid #eadfc7;
  border-radius: 0;
  background: #fffaf0;
  padding: 8px 28px;
  font-size: 11px;
  color: #796332;
}
.global-demo-note .note svg {
  display: none;
}
.page-head {
  margin-bottom: 20px;
  align-items: center;
  gap: 18px;
}
.page-head .eyebrow {
  display: none;
}
.page-head h1 {
  font-size: 24px;
  letter-spacing: -0.015em;
  font-weight: 650;
}
.page-head p {
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.7;
}
h2 {
  font-size: 17px;
  font-weight: 650;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
.btn {
  border-radius: 5px;
  font-size: 12px;
  min-height: 35px;
  padding: 7px 13px;
  font-weight: 550;
  box-shadow: none;
}
.btn.tiny {
  font-size: 11px;
  min-height: 29px;
  padding: 5px 9px;
}
.badge {
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0;
  font-weight: 550;
}
.card {
  box-shadow: none;
  margin-bottom: 16px;
}
.card-head {
  padding: 17px 20px;
}
.card-body {
  padding: 20px;
}
.card-foot {
  padding: 13px 20px;
  background: #fafbfd;
}
.field > span {
  font-size: 11px;
  font-weight: 550;
  color: #57657a;
}
input,
select,
textarea {
  border-radius: 5px;
  font-size: 13px;
}
.field input,
.field select {
  min-height: 36px;
}
.section-tabs {
  gap: 24px;
  margin-bottom: 18px;
}
.section-tabs button {
  font-size: 12px;
  font-weight: 550;
}
.note {
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.75;
}
.stats {
  gap: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.stats > .stat {
  border: 0;
  border-radius: 0;
  border-right: 1px solid var(--border);
  padding: 18px 20px;
  background: white;
  box-shadow: none;
}
.stats > .stat:last-child {
  border-right: 0;
}
.stat-number {
  font-size: 28px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}
.stat-label {
  font-size: 11px;
  color: #66748a;
}
th {
  font-size: 11px;
  letter-spacing: 0.015em;
  font-weight: 600;
  background: #f7f9fc;
  color: #68778d;
}
td {
  font-size: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.roll-header {
  padding: 19px 20px;
}
.roll-header h2 {
  font-size: 18px;
  font-weight: 650;
}
.roll-toolbar,
.roll-footer {
  padding: 13px 20px;
}
.group-meta {
  font-size: 11px;
}
.login {
  grid-template-columns: 0.88fr 1.12fr;
}
.login-story {
  background: #142645;
  padding: 48px;
}
.login-story .brand-seal {
  width: 58px;
  height: 58px;
}
.login-story .brand-title {
  font-size: 18px;
}
.login-copy h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.login-copy p {
  font-size: 13px;
  color: #b9c8de;
  margin-top: 15px;
}
.login-form h2 {
  font-size: 23px;
  letter-spacing: -0.02em;
  font-weight: 650;
}
.login-form-side {
  background: #fff;
}
@media (min-width: 801px) and (max-width: 1100px) {
  .topbar-context > strong {
    display: none;
  }
  .topbar-context {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    width: 100%;
    height: auto;
  }
  .sidebar .brand {
    padding: 13px 18px;
  }
  .sidebar .brand-seal {
    width: 36px;
    height: 36px;
  }
  .sidebar .brand-subtitle {
    max-width: none;
    font-size: 9px;
  }
  .nav {
    padding: 0 10px 10px;
    gap: 4px;
  }
  .nav a {
    min-height: 34px;
    font-size: 11px;
    padding: 7px 11px;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    height: 56px;
    padding: 0 18px;
  }
  .topbar-context {
    flex-direction: column;
    gap: 1px;
    align-items: flex-start;
  }
  .topbar-context > strong {
    font-size: 11px;
  }
  .topbar .today {
    font-size: 9px;
    max-width: none;
  }
  .user-area {
    gap: 5px;
  }
  .user-info strong {
    max-width: 82px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .user-area .btn {
    padding: 5px;
    font-size: 10px;
  }
  main {
    padding: 22px 16px 40px;
  }
  .global-demo-note .note {
    padding: 7px 18px;
    font-size: 10px;
  }
  .page-head h1 {
    font-size: 22px;
  }
  .page-head {
    align-items: flex-start;
  }
  .page-head p {
    font-size: 11px;
  }
  .card-head,
  .card-body,
  .roll-header {
    padding: 16px;
  }
  .roll-toolbar,
  .roll-footer,
  .card-foot {
    padding: 12px 16px;
  }
  .stats {
    gap: 0;
  }
  .stats > .stat {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }
  .stats > .stat:nth-child(2n) {
    border-right: 0;
  }
  .stat-number {
    font-size: 25px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 22px;
    min-height: 150px;
  }
  .login-story .brand-seal {
    height: 43px;
    width: 43px;
  }
  .login-story .brand-title {
    font-size: 15px;
  }
  .login-copy {
    margin-top: 23px;
  }
  .login-copy h1 {
    font-size: 22px;
  }
  .login-form-side {
    padding: 30px 24px;
  }
}
@media (max-width: 800px) {
  .login {
    display: block;
  }
  .login-story {
    min-height: 0;
    padding: 20px 24px 24px;
  }
  .login-copy {
    margin: 22px 0 0;
  }
  .login-form-side {
    padding: 32px 24px 38px;
  }
}
.login {
  background: #fff;
}
/* Live room monitor, with text and symbols in addition to colour. */
.live-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}
.live-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}
.live-legend .live-seat {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  font-style: normal;
}
.live-seat {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #9eabbc;
  border-radius: 3px;
  font-size: 10px;
  line-height: 1;
  color: #3c4c63;
  background: white;
}
.live-seat.state-present {
  background: #21754e;
  color: white;
  border-color: #21754e;
}
.live-seat.state-late {
  background: #f2c161;
  color: #623c08;
  border-color: #b57812;
}
.live-seat.state-absent {
  background: #b62d3d;
  color: white;
  border-color: #b62d3d;
}
.live-seat.state-face_only {
  background: #3b76ba;
  color: white;
  border-color: #2d619b;
}
.live-seat.state-leave {
  background: #805ba8;
  color: white;
  border-color: #68448f;
}
.live-seat.state-conflict {
  background: #fff0f2;
  color: #a9172c;
  border: 2px solid #b62d3d;
  font-weight: 800;
}
.live-seat.state-pending {
  background: white;
  color: #627289;
  border: 2px solid #8d9bad;
}
.live-seat.state-nonexam_day,
.live-seat.state-nonexam_session {
  background: #dce1e8;
  color: #6a7789;
  border-color: #bcc5d1;
}
.live-seat.state-empty {
  border-style: dashed;
  background: #fafbfc;
  color: #8d98a7;
}
.live-seat.state-disabled {
  background: #f2f3f5;
  color: #7c8796;
  border: 1px dotted #9aa6b7;
}
.live-session-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 20px 0;
}
.live-session-label strong {
  font-size: 18px;
  color: var(--wine);
}
.live-session-label p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}
.live-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 16px 0 22px;
  font-size: 14px;
  color: var(--muted);
}
.live-counts strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.live-room-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.live-room-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 20px;
  text-align: left;
  color: var(--ink);
  min-width: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.live-room-card:hover {
  border-color: #5c7295;
  box-shadow: 0 3px 12px #14264512;
}
.live-room-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.live-room-card-head > span {
  font-size: 14px;
  color: var(--muted);
}
.live-room-card-head h2 {
  font-size: 23px;
  letter-spacing: 0.01em;
}
.live-grid-scroll {
  overflow: auto;
  max-width: 100%;
  padding: 3px;
}
.live-seat-grid {
  display: grid;
  grid-template-columns: repeat(var(--live-columns), minmax(17px, 1fr));
  gap: 6px;
  min-width: 150px;
}
.live-room-card .live-seat {
  height: 22px;
  min-width: 17px;
  font-size: 11px;
}
.live-room-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  font-size: 14px;
  color: #526078;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}
.live-card-warning {
  color: #915b10;
  font-size: 14px;
  margin-top: 10px;
}
.live-seat-grid.detail {
  grid-template-columns: repeat(var(--live-columns), minmax(112px, 1fr));
  min-width: 720px;
  margin: 18px 0;
  gap: 8px;
}
.live-seat.detail-seat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 130px;
  line-height: 1.25;
  padding: 10px 6px;
  text-align: center;
  border-radius: 5px;
}
.detail-seat .seat-code {
  font-size: 14px;
  opacity: 0.85;
}
.detail-seat .live-cell-status {
  font-size: 13px;
  line-height: 1.3;
}
.detail-seat strong {
  font-size: 16px;
}
.detail-seat .live-student-name {
  font-size: 18px;
  font-weight: 550;
}
.live-roster-heading {
  margin: 26px 0 14px;
}
.live-state-label {
  font-size: 16px;
  font-weight: 550;
}
.live-face-time {
  display: block;
  margin: 7px 0;
}
#live-room-detail table {
  min-width: 1050px;
}
#live-room-detail td {
  vertical-align: top;
}
#live-room-detail td > small {
  display: block;
  margin-top: 7px;
  max-width: 220px;
  line-height: 1.6;
}
#live-room-detail details {
  margin-top: 8px;
  font-size: 14px;
}
#live-room-detail details summary {
  cursor: pointer;
  color: var(--blue);
}
#live-room-detail details p {
  margin-top: 8px;
  max-width: 240px;
  overflow-wrap: anywhere;
}
.live-highlight td {
  background: #fff4d8 !important;
}
@media (max-width: 1100px) {
  .live-room-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .live-room-cards {
    grid-template-columns: 1fr;
  }
  .live-room-card {
    padding: 18px;
  }
  .live-session-label {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .live-legend {
    gap: 10px 14px;
  }
  .live-legend > span {
    font-size: 13px;
  }
  .live-building-tabs {
    gap: 18px;
  }
}
/* Larger classroom reading sizes and comfortable touch targets. */
:root {
  font-size: 16px;
}
.sidebar {
  width: 256px;
}
.workspace {
  margin-left: 256px;
}
.sidebar .brand {
  padding: 22px 18px 25px;
}
.sidebar .brand-title {
  font-size: 17px;
}
.sidebar .brand-subtitle {
  font-size: 13px;
  line-height: 1.4;
}
.sidebar .brand-seal {
  width: 48px;
  height: 48px;
}
.sidebar .nav-label {
  font-size: 13px;
  letter-spacing: 0.06em;
}
.nav a {
  font-size: 16px;
  min-height: 48px;
  padding: 11px 13px;
}
.nav svg {
  width: 20px;
  height: 20px;
}
.sidebar-bottom {
  font-size: 13px;
}
.topbar {
  height: 72px;
}
.topbar-context > strong {
  font-size: 16px;
}
.topbar .today {
  font-size: 13px;
}
.user-info strong {
  font-size: 15px;
}
.user-info span {
  font-size: 13px;
}
.user-area .btn {
  font-size: 14px;
  min-height: 44px;
}
.small,
small {
  font-size: 14px;
}
.page-head h1 {
  font-size: 28px;
}
.page-head p {
  font-size: 15px;
}
h2 {
  font-size: 21px;
}
h3 {
  font-size: 18px;
}
.btn,
.btn.tiny {
  font-size: 16px;
  min-height: 44px;
  padding: 9px 14px;
}
.btn.tiny {
  font-size: 14px;
  padding: 8px 12px;
}
.global-demo-note .note {
  font-size: 14px;
  line-height: 1.6;
  padding: 10px 28px;
}
.field > span {
  font-size: 14px;
}
input,
select,
textarea {
  font-size: 16px;
}
.field input,
.field select {
  min-height: 44px;
}
.field small {
  font-size: 14px;
}
.form-grid {
  gap: 20px;
}
.section-tabs button {
  font-size: 16px;
  min-height: 44px;
}
.note {
  font-size: 15px;
}
.card-head p {
  font-size: 14px;
}
.card-foot,
.footnote {
  font-size: 14px;
}
.badge,
.chip {
  font-size: 14px;
  line-height: 1.5;
}
.stat-label {
  font-size: 14px;
}
.stat-number {
  font-size: 32px;
}
.stat-number span,
.stat-footer {
  font-size: 13px;
}
.stats > .stat {
  padding: 20px 16px;
}
th {
  font-size: 14px;
}
td {
  font-size: 16px;
  line-height: 1.6;
}
td small {
  font-size: 14px;
}
.roll-header h2 {
  font-size: 23px;
}
.group-meta {
  font-size: 14px;
}
.roll-group td.name {
  font-size: 18px;
}
.roll-group .badge,
.roll-group input,
.roll-group select {
  font-size: 16px;
}
.roll-group input:not([type="checkbox"]),
.roll-group select {
  min-height: 44px;
}
.roll-group .status-cell {
  min-width: 135px;
}
.roll-group .time-input {
  width: 142px;
}
.roll-group .note-cell {
  min-width: 245px;
}
.help-list,
.empty p,
.view-only {
  font-size: 15px;
}
.live-status {
  font-size: 14px;
}
.modal-head h2 {
  font-size: 23px;
}
.modal-body table {
  font-size: 16px;
}
.modal-body .small,
.modal-body small {
  font-size: 14px;
}
.modal-body td.live-student-name {
  font-size: 18px;
}
.brand-subtitle {
  font-size: 13px;
}
.login-story .brand-title {
  font-size: 20px;
}
.login-copy p {
  font-size: 16px;
}
.login-copy .eyebrow {
  font-size: 14px;
}
.login-form h2 {
  font-size: 26px;
}
.login-form > .muted {
  font-size: 16px;
}
.login-form .footnote {
  font-size: 14px;
}
#toast {
  font-size: 16px;
}
.seat-map-cell .allocation-student {
  font-size: 17px;
}
.seat-map-cell strong {
  font-size: 15px;
}
.seat-map-label {
  font-size: 13px;
}
@media (max-width: 1100px) and (min-width: 801px) {
  .topbar-context > strong {
    display: none;
  }
}
@media (max-width: 800px) {
  .sidebar {
    width: 100%;
  }
  .workspace {
    margin-left: 0;
  }
  .sidebar .brand {
    padding: 14px 18px;
  }
  .sidebar .brand-title {
    font-size: 17px;
  }
  .sidebar .brand-subtitle {
    font-size: 13px;
  }
  .sidebar .brand-seal {
    width: 44px;
    height: 44px;
  }
  .nav a {
    font-size: 16px;
    min-height: 44px;
    padding: 9px 12px;
  }
  .topbar {
    height: auto;
    min-height: 75px;
    padding: 10px 16px;
    flex-wrap: wrap;
  }
  .topbar-context {
    gap: 4px;
  }
  .topbar-context > strong {
    font-size: 15px;
  }
  .topbar .today {
    font-size: 13px;
  }
  .user-info strong {
    font-size: 14px;
    max-width: 95px;
  }
  .user-area .btn {
    font-size: 14px;
    padding: 8px;
  }
  .user-area {
    margin-left: auto;
  }
  .global-demo-note .note {
    font-size: 13px;
    padding: 9px 18px;
  }
  .page-head h1 {
    font-size: 26px;
  }
  .page-head p {
    font-size: 15px;
  }
  .page-head > .actions {
    flex-wrap: wrap;
  }
  .stats > .stat {
    padding: 17px 15px;
  }
  .stat-label {
    font-size: 14px;
  }
  .stat-number {
    font-size: 30px;
  }
  .filters .field {
    min-width: calc(50% - 8px);
  }
  .filters {
    gap: 16px;
  }
  .section-tabs {
    gap: 22px;
  }
  .section-tabs button {
    font-size: 16px;
    white-space: nowrap;
  }
  .login-story .brand-title {
    font-size: 17px;
  }
  .login-story .brand-subtitle {
    font-size: 13px;
  }
  .login-copy h1 {
    font-size: 25px;
  }
  .login-form h2 {
    font-size: 25px;
  }
  .login-form-side {
    padding: 30px 24px;
  }
  .modal-head h2 {
    font-size: 21px;
  }
}
@media print {
  #print-area table,
  #print-area td {
    font-size: 9pt;
  }
  #print-area th {
    font-size: 8pt;
  }
  #print-area .seat-map-cell strong {
    font-size: 8pt;
  }
  #print-area .seat-map-cell .allocation-student {
    font-size: 9pt;
  }
  #print-area .seat-map-label {
    font-size: 7pt;
  }
}
/* Simplified six-colour attendance rule requested by the school. */
.live-seat.state-late,
.live-seat.state-absent,
.live-seat.state-pending {
  background: white;
  color: #354359;
  border: 1px solid #8997aa;
}
.live-seat.state-leave,
.live-seat.state-nonexam_day,
.live-seat.state-nonexam_session {
  background: #d5dbe3;
  color: #49576a;
  border-color: #aeb9c7;
}
.live-seat.state-grade_off {
  background: #252a31;
  color: white;
  border-color: #252a31;
}
.live-seat.state-conflict {
  background: #bc2639;
  border: 1px solid #a21729;
  color: white;
}
.live-conflict-reason {
  color: #a21729;
  font-weight: 600;
}
.live-state-label.state-conflict {
  color: #a21729;
}
.live-leave-badge {
  display: inline-block;
  background: #d5dbe3;
  color: #49576a;
  border: 1px solid #aeb9c7;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 16px;
}
/* Latest school decision: lateness and absence have distinct colours again. */
.live-seat.state-late {
  background: #f5bd63;
  color: #593600;
  border: 1px solid #ad720e;
}
.live-seat.state-absent {
  background: #f9dce1;
  color: #893141;
  border: 1px solid #c9808b;
}
.live-seat.state-conflict {
  background: #b31f33;
  color: white;
  border: 2px solid #8f1324;
  font-weight: 700;
}
.live-room-card:has(.state-conflict) {
  border-color: #b31f33;
}
.live-cell-reason {
  font-size: 13px;
  line-height: 1.5;
}
/* Room overview: building sections and clear rows, instead of stacked box grids. */
.live-monitor {
  padding-top: 20px;
}
.live-monitor .page-head {
  margin-bottom: 14px;
}
.live-monitor .page-head h1 {
  font-size: 24px;
}
.live-monitor .page-head p {
  font-size: 14px;
}
.live-monitor .card {
  margin-bottom: 12px;
}
.live-monitor .card-body {
  padding: 13px 16px;
}
.live-monitor #live-query {
  gap: 12px;
}
.live-monitor #live-query .field {
  min-width: 120px;
}
.live-monitor #live-query .field:has([name="session_key"]) {
  flex: 2;
  min-width: 210px;
}
.live-monitor .live-status {
  margin: 10px 0;
  font-size: 13px;
}
.live-monitor > .card:has(.live-legend) {
  background: transparent;
  border: 0;
  margin: 0;
}
.live-monitor > .card:has(.live-legend) .card-body {
  padding: 8px 0;
}
.live-monitor .live-legend {
  gap: 8px 15px;
}
.live-monitor .live-legend > span {
  font-size: 13px;
}
.live-monitor .live-legend .live-seat {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
  font-size: 9px;
  border-radius: 50%;
}
.live-monitor .live-session-label {
  margin: 12px 0;
  align-items: center;
}
.live-monitor .live-session-label strong {
  font-size: 16px;
}
.live-monitor .live-session-label p {
  font-size: 13px;
  margin-top: 4px;
}
.live-paper-list {
  font-size: 13px;
  color: var(--muted);
  max-width: 45%;
}
.live-paper-list summary {
  cursor: pointer;
}
.live-paper-list p {
  padding: 5px 0;
}
.live-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: white;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin: 12px 0 14px;
}
.live-summary > div {
  padding: 11px 15px;
  border-right: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
}
.live-summary > div:last-child {
  border-right: 0;
}
.live-summary span {
  font-size: 13px;
  color: var(--muted);
}
.live-summary strong {
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}
.live-monitor .live-building-tabs {
  margin-bottom: 12px;
}
.live-monitor .live-building-tabs button {
  font-size: 14px;
  min-height: 36px;
}
.live-room-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.live-building-section {
  min-width: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
}
.live-building-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 17px;
  border-bottom: 2px solid #dfe5ee;
}
.live-building-section > header h2 {
  font-size: 18px;
  font-weight: 650;
}
.live-building-section > header > span {
  font-size: 13px;
  color: var(--muted);
}
.live-room-card {
  display: grid;
  grid-template-columns: 70px minmax(90px, 1fr) 143px;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px 17px;
  border: 0;
  border-bottom: 1px solid #e8ecf2;
  border-radius: 0;
  min-height: 101px;
}
.live-room-card:last-child {
  border-bottom: 0;
}
.live-room-card:hover {
  background: #f6f8fc;
  box-shadow: none;
}
.live-room-card:has(.state-conflict) {
  box-shadow: inset 3px 0 0 #b31f33;
}
.live-room-card-head {
  display: block;
  margin: 0;
}
.live-room-card-head h3 {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 650;
}
.live-room-card-head > span {
  display: block;
  font-size: 11px;
  color: #738198;
  margin-top: 8px;
}
.live-room-card .live-grid-scroll {
  padding: 0;
  overflow: hidden;
  min-width: 0;
}
.live-room-card .live-seat-grid {
  grid-template-columns: repeat(var(--live-columns), 12px);
  min-width: 0;
  gap: 3px;
  justify-content: center;
}
.live-room-card .live-seat {
  height: 12px;
  width: 12px;
  min-width: 12px;
  border-radius: 50%;
  font-size: 0;
}
.live-room-card .live-seat.state-conflict {
  font-size: 9px;
  border-width: 1px;
}
.live-room-card .live-seat.state-empty {
  background: transparent;
  border-color: #b9c2cf;
}
.live-room-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 12px;
  line-height: 1.35;
}
.live-room-card-stats .room-arrived {
  grid-column: 1/-1;
  font-size: 14px;
}
.live-room-card-stats strong {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.live-room-card-stats small {
  display: block;
  font-size: 10px;
  color: #7a889c;
  margin-top: 3px;
}
.live-room-card-stats .has-conflict {
  color: #a5192c;
  font-weight: 600;
}
#live-room-detail .live-legend {
  gap: 9px 14px;
  margin: 15px 0;
}
#live-room-detail .live-legend > span {
  font-size: 13px;
}
#live-room-detail .live-session-label strong {
  font-size: 16px;
}
#live-room-detail .live-session-label p {
  font-size: 14px;
}
#live-room-detail .live-seat-grid.detail {
  grid-template-columns: repeat(var(--live-columns), minmax(90px, 1fr));
  min-width: 640px;
  gap: 6px;
}
#live-room-detail .detail-seat {
  min-height: 100px;
  padding: 8px 5px;
  gap: 5px;
}
#live-room-detail .detail-seat .seat-code {
  font-size: 12px;
}
#live-room-detail .detail-seat .live-cell-status {
  font-size: 13px;
}
#live-room-detail .detail-seat strong {
  font-size: 14px;
}
#live-room-detail .detail-seat .live-student-name {
  font-size: 15px;
}
#live-room-detail table td,
#live-room-detail table th {
  font-size: 14px;
}
#live-room-detail table td.live-student-name {
  font-size: 15px;
}
#live-room-detail td small,
#live-room-detail .live-state-label,
#live-room-detail .badge,
#live-room-detail .live-leave-badge {
  font-size: 13px;
}
#live-room-detail .live-counts {
  font-size: 13px;
  gap: 8px 16px;
}
#live-room-detail .live-counts strong {
  font-size: 16px;
}
#live-room-detail .btn {
  font-size: 14px;
}
@media (max-width: 1250px) {
  .live-room-sections {
    grid-template-columns: 1fr;
  }
  .live-room-card {
    grid-template-columns: 90px minmax(130px, 1fr) 210px;
  }
  .live-room-card-stats {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
  .live-room-card-stats .room-arrived {
    grid-column: auto;
  }
}
@media (max-width: 800px) {
  .live-monitor .live-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .live-summary > div {
    padding: 11px;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    border-bottom: 1px solid var(--border);
  }
  .live-monitor .live-session-label {
    align-items: flex-start;
  }
  .live-paper-list {
    max-width: none;
  }
  .live-room-card {
    grid-template-columns: 65px minmax(96px, 1fr) 126px;
    gap: 7px;
    padding: 13px 12px;
  }
  .live-room-card-stats {
    grid-template-columns: 1fr 1fr;
  }
  .live-room-card-stats .room-arrived {
    grid-column: 1/-1;
  }
  .live-room-card-stats small {
    font-size: 10px;
  }
  .live-room-card .live-seat-grid {
    grid-template-columns: repeat(var(--live-columns), 10px);
    gap: 3px;
  }
  .live-room-card .live-seat {
    width: 10px;
    height: 10px;
    min-width: 10px;
  }
  .live-room-card-head h3 {
    font-size: 16px;
  }
  .live-room-card-stats .room-arrived {
    font-size: 13px;
  }
  .live-monitor #live-query .field {
    min-width: calc(50% - 8px);
  }
  .live-monitor #live-query .field:has([name="session_key"]) {
    min-width: 100%;
  }
}
.room-diagram {
  display: grid;
  gap: 8px;
  min-width: 0;
  align-items: stretch;
  margin-top: 14px;
  grid-template-areas: "seats";
  grid-template-columns: minmax(0, 1fr);
}
.diagram-seats {
  grid-area: seats;
  min-width: 0;
}
.podium-marker {
  grid-area: podium;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  align-self: center;
  border: 1px solid #8492a5;
  background: #fafbfd;
  color: #53637a;
  font-size: 13px;
  width: 130px;
  height: 26px;
  border-radius: 2px;
  letter-spacing: 0.12em;
}
.podium-top {
  grid-template-areas: "podium" "seats";
}
.podium-bottom {
  grid-template-areas: "seats" "podium";
}
.podium-left {
  grid-template-areas: "podium seats";
  grid-template-columns: 26px minmax(0, 1fr);
}
.podium-right {
  grid-template-areas: "seats podium";
  grid-template-columns: minmax(0, 1fr) 26px;
}
.podium-left > .podium-marker,
.podium-right > .podium-marker {
  height: 100px;
  width: 26px;
  writing-mode: vertical-rl;
}
.podium-unset {
  font-size: 13px;
  color: #7b8798;
  margin-top: 10px;
}
.room-diagram.mini {
  margin: 0;
  gap: 4px;
}
.mini > .podium-marker {
  width: 30px;
  height: 2px;
  min-height: 0;
  border: 0;
  border-top: 2px solid #6c7c90;
  border-radius: 0;
  background: transparent;
  font-size: 0;
}
.mini.podium-left {
  grid-template-columns: 3px minmax(0, 1fr);
}
.mini.podium-right {
  grid-template-columns: minmax(0, 1fr) 3px;
}
.mini.podium-left > .podium-marker,
.mini.podium-right > .podium-marker {
  width: 2px;
  height: 25px;
  border: 0;
  border-left: 2px solid #6c7c90;
}
.live-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #dfe5ee;
  border-radius: 5px;
  background: #f8fafc;
  margin: 20px 0 28px;
  overflow: hidden;
}
.live-detail-summary > div {
  padding: 15px 16px;
  border-right: 1px solid #dfe5ee;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.live-detail-summary > div:last-child {
  border-right: 0;
}
.live-detail-summary span {
  font-size: 14px;
  color: #647287;
}
.live-detail-summary strong {
  font-size: 23px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: #20314c;
}
.live-detail-heading {
  margin: 0 0 16px;
}
.live-detail-heading h3 {
  font-size: 18px;
}
.live-detail-heading p {
  font-size: 14px;
  color: #718096;
  margin-top: 7px;
}
.live-detail-plan {
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e7ef;
}
.live-detail-legend {
  padding: 24px 0 27px;
  border-bottom: 1px solid #e2e7ef;
  margin-bottom: 25px;
}
.live-detail-legend h3 {
  font-size: 18px;
  margin-bottom: 16px;
}
#live-room-detail .live-detail-legend .live-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px 20px;
  margin: 0;
  align-items: start;
}
#live-room-detail .live-detail-legend .live-legend > span {
  font-size: 14px;
  align-items: flex-start;
  line-height: 1.5;
}
#live-room-detail .live-detail-legend .live-seat {
  margin-top: 1px;
}
#live-room-detail .live-roster-heading {
  font-size: 18px;
  margin-top: 0;
}
#live-room-detail .room-diagram .live-seat-grid.detail {
  margin-top: 0;
}
@media (max-width: 800px) {
  .live-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .live-detail-summary > div {
    padding: 13px;
    border-bottom: 1px solid #dfe5ee;
  }
  .live-detail-summary > div:nth-child(2n) {
    border-right: 0;
  }
  #live-room-detail .live-detail-legend .live-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }
}
@media print {
  #print-area .room-diagram {
    margin-top: 3mm;
    gap: 2mm;
  }
  #print-area .podium-marker {
    font-size: 9pt;
    height: 6mm;
    width: 35mm;
  }
  #print-area .podium-left > .podium-marker,
  #print-area .podium-right > .podium-marker {
    height: 25mm;
    width: 6mm;
  }
  #print-area .podium-unset {
    font-size: 8pt;
  }
  #print-area .room-diagram .seat-map-scroll {
    margin-top: 0;
  }
}
/* Keep the live overview compact while leaving teacher roll text unchanged. */
.live-monitor {
  padding-top: 10px;
}
.live-monitor .page-head {
  margin-bottom: 8px;
  align-items: center;
}
.live-monitor .page-head p,
.live-monitor .page-head .eyebrow {
  display: none;
}
.live-monitor .page-head .btn {
  min-height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.live-monitor .card {
  margin-bottom: 6px;
}
.live-monitor #live-query {
  padding: 8px 12px;
}
.live-monitor .live-status {
  margin: 4px 0;
}
.live-monitor > .card:has(.live-legend) .card-body {
  padding: 2px 0;
}
.live-monitor .live-session-label {
  margin: 4px 0 6px;
}
.live-monitor .live-session-label p {
  display: none;
}
.live-monitor .live-summary {
  margin: 6px 0;
}
.live-monitor .live-summary > div {
  padding-top: 7px;
  padding-bottom: 7px;
}
.live-monitor .live-building-tabs {
  margin-bottom: 6px;
}
.live-building-section > header {
  padding: 8px 16px;
}
.live-room-card {
  min-height: 92px;
  padding: 8px 16px;
}
.live-room-card .live-seat-grid {
  grid-template-columns: repeat(var(--live-columns), 10px);
  gap: 2px;
}
.live-room-card .live-seat {
  width: 10px;
  height: 10px;
  min-width: 10px;
}
.live-room-card .live-seat.state-conflict {
  font-size: 8px;
}
.live-room-card-head > span {
  margin-top: 4px;
}
.live-room-sections.single-building {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1251px) {
  .live-room-sections.single-building .live-building-rows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .live-room-sections.single-building .live-room-card:nth-child(odd) {
    border-right: 1px solid #e8ecf2;
  }
}
@media (max-width: 800px) {
  .live-monitor .page-head {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .live-monitor .page-head h1 {
    font-size: 22px;
  }
  .live-monitor .page-head .btn {
    font-size: 14px;
  }
  .live-room-card {
    padding: 8px 12px;
  }
}
/* Room detail: explain the denominator separately from the colour key. */
#live-room-detail .live-stat-panel {
  margin: 24px 0 30px;
  padding: 22px;
  border: 1px solid #dbe2ec;
  border-radius: 7px;
  background: white;
}
#live-room-detail .live-panel-heading h3 {
  font-size: 18px;
  color: #1b2e4b;
  margin: 0;
}
#live-room-detail .live-panel-heading > p {
  font-size: 14px;
  color: #617188;
  line-height: 1.65;
  margin: 7px 0 0;
}
#live-room-detail .live-detail-summary {
  margin: 20px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 18px;
}
#live-room-detail .live-detail-summary > .live-stat-item {
  padding: 0 16px 0 0;
  gap: 12px;
  border-right: 1px solid #e3e8ef;
  border-bottom: 0;
}
#live-room-detail .live-detail-summary > .live-stat-item:last-child {
  border-right: 0;
  padding-right: 0;
}
#live-room-detail .live-stat-item > span {
  color: #364963;
  font-weight: 600;
  font-size: 14px;
}
#live-room-detail .live-stat-number {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
#live-room-detail .live-stat-number strong {
  font-size: 28px;
  line-height: 1.15;
}
#live-room-detail .live-stat-number em {
  font-style: normal;
  font-size: 15px;
  color: #728095;
}
#live-room-detail .live-stat-item p {
  font-size: 13px;
  color: #67778c;
  line-height: 1.65;
  margin: 0;
}
#live-room-detail .live-stat-item.has-conflict .live-stat-number strong {
  color: #a51d31;
}
#live-room-detail .live-detail-legend {
  background: #f5f7fa;
  border: 1px solid #e0e6ee;
  border-radius: 7px;
  padding: 22px;
  margin: 0 0 32px;
}
.live-legend-descriptions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 32px;
  margin-top: 24px;
}
.live-legend-entry {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-width: 0;
}
#live-room-detail .live-legend-entry .live-seat {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  font-size: 14px;
  border-radius: 5px;
  margin: 0;
}
.live-legend-entry strong {
  display: block;
  font-size: 14px;
  color: #24364f;
  line-height: 1.6;
}
.live-legend-entry p {
  font-size: 13px;
  color: #63738a;
  line-height: 1.65;
  margin: 3px 0 0;
}
.live-legend-footnote {
  margin: 22px 0 0;
  padding-top: 15px;
  border-top: 1px solid #dfe5ee;
  font-size: 13px;
  color: #63738a;
}
@media (max-width: 800px) {
  #live-room-detail .live-stat-panel,
  #live-room-detail .live-detail-legend {
    padding: 17px;
  }
  #live-room-detail .live-detail-summary {
    gap: 22px 13px;
  }
  #live-room-detail .live-detail-summary > .live-stat-item:nth-child(2n) {
    border-right: 0;
    padding-right: 0;
  }
  #live-room-detail .live-stat-number strong {
    font-size: 26px;
  }
  .live-legend-descriptions {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
.live-reconciliation {margin-top:22px;padding-top:18px;border-top:1px solid #e1e7ef;font-size:14px}
.live-reconciliation summary {font-weight:600;color:#2c4569;cursor:pointer}
.live-reconciliation dl {margin:18px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 24px}
.live-reconciliation dl>div {display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #e8ecf2}
.live-reconciliation dt {color:#607188}
.live-reconciliation dd {margin:0;color:#203653;font-weight:600;white-space:nowrap}
.live-reconciliation .total {border-top:1px solid #b8c5d6}
.live-reconciliation p {font-size:13px;color:#66778d;line-height:1.7}
.hall-context {margin-bottom:16px}.hall-context p{font-size:14px;color:var(--muted)}
.hall-current {padding:18px;margin:18px 0;background:#f5f7fa;border:1px solid var(--border);border-radius:6px}
.hall-current p{margin:6px 0 12px}.hall-current .btn{margin-right:8px}
.hall-plan-summary{display:flex;gap:20px;align-items:center;padding:16px 0;border-bottom:1px solid var(--border);margin-bottom:18px}
.hall-plan-summary span{font-size:14px;color:var(--muted)}
.hall-plan-controls{display:grid;grid-template-columns:1fr 2fr;gap:16px;margin-bottom:16px}
.hall-schematic-scroll{overflow-x:auto;margin:18px 0}
.hall-schematic-grid{display:grid;grid-template-columns:repeat(var(--hall-columns),minmax(95px,1fr));gap:7px;min-width:max-content}
.hall-seat{min-height:78px;display:flex;flex-direction:column;gap:4px;padding:8px;border:1px solid #d5dfe9;background:#f8fafc;border-radius:4px;font-size:14px;text-align:center}
.hall-seat>span:first-child{font-size:12px;color:#66768c}.hall-seat strong{font-size:14px}.hall-student-name{font-size:14px}
.hall-plan-actions{padding-top:18px;margin-top:18px;border-top:1px solid var(--border)}
@media(max-width:800px){.live-reconciliation dl{grid-template-columns:1fr}.hall-plan-controls{grid-template-columns:1fr}.hall-plan-summary{align-items:flex-start;flex-direction:column;gap:7px}}
.live-range-controls {display:grid;grid-template-columns:1fr 2fr;gap:16px;margin:20px 0 12px}
@media(max-width:800px){.live-range-controls{grid-template-columns:1fr}}
.live-room-exams{display:flex;flex-wrap:wrap;gap:10px 20px;margin:12px 0 20px;padding:13px 16px;border-left:3px solid #243f69;background:#f5f7fb}
.live-room-exams>div{display:flex;flex-direction:column;gap:4px}.live-room-exams strong{font-size:14px;color:#253b5b}.live-room-exams span{font-size:14px;color:#667890}
.live-room-card .live-seat-grid.hall-mini{grid-template-columns:repeat(var(--live-columns),4px);gap:1px}
.live-room-card .hall-mini .live-seat{width:4px;height:4px;min-width:4px;border-radius:1px;border-width:0.5px;font-size:0}
#google-login{margin:24px 0}.google-login-button{width:100%;min-height:48px;font-size:16px;justify-content:center}
.google-domain-help{font-size:13px;color:#65758b;line-height:1.75;margin:13px 0 0}
.google-pending{font-size:13px;margin:9px 0 0;color:#8c5e17}
.password-login{border-top:1px solid #dfe5ed;padding-top:18px;margin-top:22px}
.password-login>summary{font-size:14px;color:#536784;cursor:pointer;padding:7px 0;list-style-position:inside}
.password-login[open]>summary{margin-bottom:18px}
#login-form>.field{margin-bottom:18px}
#login-form>button[type=submit]{width:100%;margin-top:8px}
.google-config-status{display:flex;flex-wrap:wrap;gap:10px 24px;margin-bottom:20px;font-size:14px;color:#65758a}
.google-redirect{padding:14px;border:1px solid #dbe3ed;background:#f6f8fb;border-radius:5px;margin:16px 0 22px;display:flex;flex-direction:column;gap:8px}
.google-redirect>span{font-size:13px;color:#677890}.google-redirect code{font-size:14px;overflow-wrap:anywhere}
.google-teacher-email{padding:14px;background:#f5f7fb;border-radius:5px;margin-bottom:22px;overflow-wrap:anywhere}
.live-other-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 20px;margin-top:22px;padding:16px;background:#f7f9fc;border:1px solid #e3e9f1;border-radius:5px}
.live-other-stats>div{display:flex;align-items:baseline;gap:8px;font-size:14px}
.live-other-stats span{color:#586c84}.live-other-stats strong{font-size:20px;color:#283f60}.live-other-stats small{font-size:13px;color:#6d7d92}
.live-reconciliation-equation{font-size:14px;line-height:1.8;margin:16px 0 0;color:#334e73}
.live-legend-entry .live-seat{font-style:normal}
.live-room-card.schematic{grid-template-columns:92px minmax(90px,1fr) 143px}
@media(max-width:800px){.live-other-stats{grid-template-columns:1fr;gap:10px}.live-room-card.schematic{grid-template-columns:78px minmax(70px,1fr) 126px;gap:7px}}
.login-privacy-link{display:inline-block;color:#274b7a;text-decoration:underline;text-underline-offset:3px;margin-top:5px}
.room-diagram.hall-diagram:not(.mini)>.podium-marker{width:100%;height:36px;font-size:15px;letter-spacing:.1em;background:#e9eef5;border:1px solid #73869d;color:#203855;font-weight:600}
.hall-range-direction{font-size:14px;color:#4d6685;line-height:1.7;margin:0 0 13px}
.hall-schematic-scroll{max-height:540px;overflow:auto;border:1px solid #dce4ef;border-radius:5px;padding:10px;background:#fff;margin:0 0 20px}
.hall-schematic-grid{grid-template-columns:repeat(var(--hall-columns),minmax(145px,1fr));min-width:0}
.hall-column-label{font-size:13px;font-weight:600;color:#526c8b;padding:4px 0 9px;text-align:center;white-space:nowrap}
.hall-seat{min-height:74px;font-size:14px;background:#f7f9fc}
.hall-live-scroll{max-height:620px;overflow:auto}
.hall-roster-table{max-height:420px;overflow:auto;margin-top:22px}
@media(max-width:800px){.hall-schematic-grid{min-width:max-content;grid-template-columns:repeat(var(--hall-columns),145px)}.hall-schematic-scroll{max-height:430px}.hall-live-scroll{max-height:500px}}

/* Five attendance categories; red is an additional warning, not a category. */
.badge.white { background:#fff; color:#43516a; border:1px solid #ccd4df; }
.badge.gray { background:#e1e5eb; color:#49576a; }
.badge.black { background:#252a31; color:#fff; }
.live-seat.has-conflict { background:#b31f33; color:#fff; border:2px solid #8f1324; font-weight:700; }
.live-state-label.has-conflict,.roll-conflict-note { color:#a21729; font-weight:600; }
.live-room-card .live-seat.has-conflict { font-size:8px; }
.live-summary.five-category-summary,#live-room-detail .live-detail-summary.five-category-summary { grid-template-columns:repeat(5,minmax(0,1fr)); }
.live-summary-context { color:#617188; font-size:14px; margin:8px 0 14px; }
@media(max-width:700px) {
 .live-summary.five-category-summary,#live-room-detail .live-detail-summary.five-category-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
 #live-room-detail .five-category-summary .live-stat-item:last-child { grid-column:1/-1; }
}
