@font-face {
  font-family: Sirius;
  src: url("/assets/assets/sirius-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Sirius;
  src: url("/assets/assets/sirius-bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}
:root {
  font-family: Sirius, Arial, sans-serif;
  font-size: 80%;
  color: #192e3a;
  background: #f4f7f8;
  font-synthesis: none;
  --blue: #3b7698;
  --line: #dce5ea;
  --muted: #5c707d;
  --radius: 11px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #f4ad39;
  outline-offset: 2px;
}
a {
  color: #286486;
}
button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  background: white;
  color: inherit;
}
button:hover:not(:disabled) {
  border-color: var(--blue);
  background: #edf5fa;
}
.primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.primary:hover:not(:disabled) {
  background: #2d617f;
  color: white;
}
.danger {
  color: #a52638;
  border-color: #dfb4bb;
}
.quiet {
  border: 0;
  background: transparent;
}
.small {
  padding: 5px 8px;
  font-size: 10px;
}
.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 26px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  max-width: 248px;
}
.brand img {
  width: 100%;
  height: auto;
}
.service-name {
  font-size: 14px;
  font-weight: bold;
  border-left: 1px solid var(--line);
  padding-left: 19px;
}
.public-guide-link {
  font-size: 12px;
  white-space: nowrap;
  text-underline-offset: 4px;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-left: auto;
}
nav button {
  font-size: 11px;
  border: 0;
}
nav button.active {
  background: #eaf2f7;
  color: #245d7e;
}
main {
  max-width: 1700px;
  min-height: calc(100vh - 132px);
  margin: auto;
  padding: 26px;
}
h1 {
  font-size: 24px;
  margin: 0 0 7px;
  line-height: 1.2;
}
h2 {
  font-size: 16px;
  margin: 0 0 13px;
}
h3 {
  font-size: 13px;
  margin: 0 0 7px;
}
p {
  line-height: 1.45;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  color: var(--blue);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: bold;
  margin: 0 0 11px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-heading p {
  margin: 0;
}
.week-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: start;
}
.calendar-panel {
  min-width: 0;
}
.calendar-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
.calendar {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: calc(58px + var(--calendar-days, 7) * 104px);
  table-layout: fixed;
}
.calendar th,
.calendar td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 5px;
  vertical-align: top;
}
.calendar th:last-child,
.calendar td:last-child {
  border-right: 0;
}
.calendar tr:last-child th,
.calendar tr:last-child td {
  border-bottom: 0;
}
.calendar thead th {
  text-align: left;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 400;
  padding: 10px 6px;
}
.calendar thead strong {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}
.calendar th.pair {
  width: 58px;
  font-size: 10px;
  text-align: center;
  background: #f8fafc;
  padding: 10px 2px;
}
.pair strong {
  font-size: 17px;
  display: block;
  margin-bottom: 5px;
}
.pair span {
  display: block;
  font-size: 9px;
  font-weight: 400;
  line-height: 1.5;
}
.calendar td.current {
  box-shadow: inset 0 3px var(--blue);
  background: #f0f7fb;
}
.cell-label {
  font-size: 9px;
  margin-bottom: 4px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 2px;
}
.calendar td > .small-text {
  margin: 5px 0 0;
  line-height: 1.25;
}
.current .cell-label {
  color: #245d7e;
  font-weight: bold;
}
.pcs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}
.pc {
  aspect-ratio: auto;
  min-height: 24px;
  height: 24px;
  padding: 0;
  border-radius: 4px;
  font-size: 10px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid #bdd5ce;
  background: #f0f8f4;
  color: #2c6553;
}
.pc.busy {
  background: #e7ecf1;
  border-color: #c9d3de;
  color: #586775;
}
.pc.own {
  background: #d4e7f5;
  border-color: #5797be;
  color: #184f70;
  font-weight: bold;
}
.pc.unavailable {
  background: #fbecee;
  border-color: #e3bec5;
  color: #a03e4b;
}
.pc.past {
  background: #f0f1f3;
  border-color: #e0e3e6;
  color: #707980;
}
.pc.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 0 0 2px #d6e7f1;
}
.pc[aria-disabled="true"]:not(.busy):not(.own):not(.past) {
  background-image: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 5px,
    #6379870a 5px,
    #6379870a 10px
  );
}
.pc:hover:not(:disabled) {
  border-color: #1d5878;
  z-index: 1;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 10px;
  color: var(--muted);
  margin: 14px 0;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.swatch {
  width: 10px;
  height: 10px;
  border: 1px solid #bdd5ce;
  background: #f0f8f4;
  border-radius: 3px;
}
.swatch.busy {
  background: #e7ecf1;
  border-color: #c9d3de;
}
.swatch.own {
  background: #d4e7f5;
  border-color: #5797be;
}
.swatch.unavailable {
  background: #fbecee;
  border-color: #e3bec5;
}
.swatch.past {
  background: #f0f1f3;
  border-color: #d4d8de;
}
.sidebar {
  display: grid;
  gap: 13px;
}
.sidebar h2 {
  font-size: 14px;
}
.hint {
  font-size: 10px;
  color: #286486;
  background: #eef6fa;
  padding: 10px;
  border-radius: 6px;
}
.selection-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  gap: 6px;
  font-size: 10px;
}
.selection-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.selection-list small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 2px;
}
.selection-count {
  display: inline-flex;
  background: #eaf2f7;
  border-radius: 20px;
  padding: 3px 7px;
  font-size: 10px;
  margin-left: 6px;
}
.full {
  width: 100%;
}
.upcoming-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 11px 0;
  font-size: 10px;
}
.upcoming-item:first-of-type {
  border-top: 0;
}
.upcoming-item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.notice {
  position: fixed;
  left: 50%;
  bottom: 21px;
  transform: translateX(-50%);
  padding: 12px 18px;
  background: #173b51;
  color: white;
  box-shadow: 0 6px 30px #18374633;
  border-radius: 8px;
  max-width: 480px;
  width: max-content;
  z-index: 20;
  max-width: calc(100vw - 30px);
}
.notice.error {
  background: #8e3043;
}
.alert {
  border: 1px solid #dfc996;
  background: #fffbef;
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 10px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
}
.alert p {
  margin: 0;
}
.empty {
  text-align: center;
  padding: 28px 12px;
  color: var(--muted);
  font-size: 11px;
}
.loading {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
.login {
  display: grid;
  grid-template-columns: 1fr 328px;
  gap: 56px;
  align-items: center;
  max-width: 864px;
  margin: 60px auto;
}
.login h1 {
  font-size: 42px;
  line-height: 1.08;
  max-width: 520px;
  margin: 0 0 16px;
}
.login-copy > p {
  max-width: 416px;
  font-size: 14px;
  color: var(--muted);
}
.login-stats {
  display: flex;
  gap: 28px;
  margin-top: 30px;
}
.login-stats strong {
  display: block;
  font-size: 24px;
  color: var(--blue);
}
.login-stats span {
  font-size: 10px;
  color: var(--muted);
}
.login .card {
  padding: 26px;
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 10px;
  margin-top: 10px;
}
.auth-result {
  text-align: center;
}
.auth-result a.primary {
  display: block;
  padding: 8px 12px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
}
.auth-result .full + .full {
  margin-top: 8px;
}
.auth-result-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e6f3ed;
  color: #24634f;
  font-size: 21px;
  font-weight: bold;
}
.field {
  display: grid;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 14px;
}
.field input,
.field select {
  width: 100%;
  min-height: 35px;
  border: 1px solid #bfcdd6;
  border-radius: 7px;
  padding: 7px 9px;
  background: #fff;
  color: inherit;
}
.field small {
  color: var(--muted);
  font-size: 10px;
}
.form-error {
  color: #a22c40;
  font-size: 11px;
  min-height: 16px;
  margin: 10px 0;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.series-detail-actions {
  flex-wrap: wrap;
}
.series-detail-actions button {
  min-width: 0;
  max-width: 100%;
}
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.tabs button.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.personal-content {
  max-width: 1100px;
}
.booking-row {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.booking-row:last-child {
  border-bottom: 0;
}
.booking-row p {
  margin: 4px 0 0;
  font-size: 10px;
  color: var(--muted);
}
.booking-row strong {
  font-size: 13px;
}
.row-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}
.tag {
  font-size: 10px;
  background: #edf3f7;
  color: #2e617e;
  border-radius: 6px;
  padding: 4px 7px;
}
.filters {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filters .field {
  flex: 1;
  min-width: 140px;
  margin-bottom: 0;
}
.pagination {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}
.statistics {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.statistics strong {
  display: block;
  font-size: 24px;
  color: var(--blue);
}
.statistics p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 10px;
}
.statistics-period {
  margin: 16px 0 0;
  padding: 10px 11px;
  border-left: 3px solid var(--blue);
  border-radius: 0 7px 7px 0;
  background: #f0f7fb;
  color: #294f65;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.statistics-panel .field,
.statistics-panel select {
  min-width: 0;
  max-width: 100%;
}
.statistics-notice {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.statistics-zero {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.statistics-error .form-error {
  margin-bottom: 0;
}
.statistics-loading {
  padding: 18px 0;
}
.semester-list {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}
.semester-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.semester-card h3,
.semester-card p {
  margin: 0 0 6px;
}
.semester-card > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.compact-heading {
  align-items: end;
}
@media (max-width: 650px) {
  .semester-card {
    align-items: stretch;
    flex-direction: column;
  }
  .semester-card .row-meta {
    flex-wrap: wrap;
  }
}
.section-gap {
  margin-top: 19px;
}
.registration-policy form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 24px;
}
.registration-policy h2,
.registration-policy p {
  margin-bottom: 6px;
}
.registration-policy .checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
}
.registration-policy .checkbox-field input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}
.registration-policy .form-error {
  grid-column: 1 / -1;
  margin: 0;
}
.registration-policy button {
  justify-self: end;
}
.registration-pending-card {
  border-left: 4px solid #c78318;
}
.user-status.pending {
  background: #fff2d7;
  color: #76500c;
}
.registration-date {
  color: var(--muted);
  font-size: 12px;
  margin: 7px 0;
}
.profile-grid {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 13px;
  font-size: 12px;
}
.profile-grid dt {
  color: var(--muted);
}
.profile-grid dd {
  margin: 0;
}
.profile-password {
  max-width: 432px;
  margin-top: 26px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}
.page-error {
  max-width: 480px;
  margin: 24px auto;
  padding: 20px;
  text-align: center;
}
.mobile-days {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 22px;
  width: min(408px, calc(100vw - 21px));
  max-height: min(90vh, calc(100dvh - 21px));
  overflow: auto;
  color: inherit;
}
dialog::backdrop {
  background: #132d4073;
}
dialog h2 {
  padding-right: 20px;
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}
.dialog-header button {
  margin: -6px -8px 0 0;
}
.details {
  display: grid;
  gap: 11px;
  overflow-wrap: anywhere;
}
.details dt {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}
.details dd {
  margin: 0;
}
.details a {
  word-break: break-all;
}
.policy-form {
  max-width: 464px;
}
.muted.small-text {
  font-size: 10px;
}
.progress-bar {
  height: 5px;
  border-radius: 9px;
  background: #e4edf3;
  overflow: hidden;
  margin: 13px 0;
}
.progress-bar span {
  display: block;
  background: var(--blue);
  height: 100%;
}
footer {
  display: flex;
  justify-content: space-between;
  padding: 18px 26px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1550px) {
  .pc {
    font-size: 10px;
  }
  .cell-label {
    font-size: 9px;
  }
}
@media (max-width: 1200px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    grid-template-columns: 1fr 1fr;
  }
  .calendar {
    min-width: calc(58px + var(--calendar-days, 7) * 104px);
  }
  .site-header {
    gap: 13px;
    padding: 16px;
  }
  .brand {
    max-width: 208px;
  }
  .service-name {
    display: none;
  }
  main {
    padding: 19px;
  }
}
@media (max-width: 650px) {
  .site-header {
    min-height: 0;
    padding: 14px 13px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .brand {
    max-width: 228px;
  }
  nav {
    margin: 0;
    width: 100%;
    justify-content: space-between;
  }
  nav button {
    min-height: 40px;
    font-size: 11px;
    padding: 6px;
  }
  main {
    padding: 18px 11px;
  }
  h1 {
    font-size: 22px;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
    gap: 13px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .week-nav {
    width: 100%;
    justify-content: space-between;
  }
  .week-nav button {
    min-height: 40px;
  }
  .sidebar {
    grid-template-columns: 1fr;
  }
  .sidebar .card {
    padding: 16px;
  }
  .mobile-days {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
  }
  .mobile-days button {
    flex: 1;
    min-height: 40px;
    padding: 7px 2px;
    font-size: 11px;
  }
  .mobile-days button.active {
    background: var(--blue);
    color: #fff;
  }
  .calendar {
    min-width: 0;
    table-layout: auto;
  }
  .calendar .day-column {
    display: none;
  }
  .calendar .day-column.mobile-active {
    display: table-cell;
  }
  .calendar th.pair {
    width: 52px;
  }
  .calendar td {
    padding: 6px;
  }
  .pcs {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }
  .pc {
    font-size: 11px;
    min-height: 44px;
    height: 44px;
    aspect-ratio: auto;
  }
  .calendar thead th {
    padding: 10px;
  }
  .cell-label {
    font-size: 10px;
    margin-bottom: 2px;
  }
  .calendar td > .small-text {
    margin-top: 6px;
  }
  .legend {
    gap: 10px;
    font-size: 10px;
  }
  .login {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 12px auto;
    align-items: stretch;
  }
  .login h1 {
    font-size: 29px;
  }
  .login-copy > p {
    font-size: 13px;
  }
  .login-stats {
    display: none;
  }
  .login .card {
    padding: 20px;
  }
  .auth-links {
    align-items: stretch;
    flex-direction: column;
  }
  .booking-row {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }
  .row-meta {
    width: 100%;
    justify-content: space-between;
  }
  .filters {
    align-items: stretch;
  }
  .filters .field {
    min-width: 40%;
  }
  .filters button {
    width: 100%;
  }
  .registration-policy form {
    grid-template-columns: 1fr;
  }
  .registration-policy button {
    justify-self: stretch;
  }
  .alert {
    align-items: start;
    font-size: 11px;
    padding: 10px;
  }
  .alert button {
    flex-shrink: 0;
  }
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .profile-grid dd {
    margin-bottom: 10px;
  }
  footer {
    padding: 16px 11px;
    font-size: 10px;
    gap: 12px;
  }
  dialog {
    padding: 18px;
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
  .statistics {
    gap: 20px;
  }
}

.pc.selected:hover:not(:disabled) {
  background: var(--blue);
  color: white;
}
.mobile-booking-bar {
  display: none;
}
@media (max-width: 650px) {
  .mobile-booking-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 11px;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px #1d40521a;
  }
  .mobile-booking-bar strong {
    font-size: 11px;
  }
  .mobile-booking-bar small {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
  }
  body:has(.mobile-booking-bar) {
    padding-bottom: 68px;
  }
  .mobile-booking-bar button,
  .form-actions button,
  .field input,
  .field select {
    min-height: 44px;
  }
}

.pc.repair,
.swatch.repair {
  background: #fff3d9;
  border-color: #d5b16f;
  color: #815b17;
}
.computer-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(192px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.computer-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.history-filter {
  margin-top: 14px;
}
.computer-state-history {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  gap: 10px;
}
.computer-state-history li {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid #5c98ba;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.computer-state-history li.repair {
  border-left-color: #d5b16f;
}
.computer-state-history li.unavailable,
.computer-state-history li.unknown {
  border-left-color: #8b99a3;
}
.computer-state-history span,
.computer-state-history small {
  color: var(--muted);
}
@media (max-width: 650px) {
  nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.user-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}
.user-card {
  min-width: 0;
}
.user-card-heading {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
}
.user-card h2,
.user-email {
  overflow-wrap: anywhere;
}
.user-status {
  white-space: nowrap;
}
.user-status.blocked {
  color: #a52638;
  background: #fff0f2;
}
.user-status.inactive {
  color: #535d68;
  background: #edf0f3;
}
.user-search {
  flex: 2;
}

.closure-cards {
  display: grid;
  gap: 14px;
}
.closure-card h2 {
  overflow-wrap: anywhere;
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.checkbox-field input {
  width: 18px;
  height: 18px;
}
.calendar td.closure-cell,
.swatch.closed {
  background: #fff0f2;
  color: #92283c;
}
.closure-display {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 116px;
  text-align: center;
  overflow-wrap: anywhere;
  padding: 12px 4px;
  font-size: 12px;
}
.closure-icon {
  font-size: 28px;
}
.day-closure {
  display: block;
  margin-top: 5px;
  color: #92283c;
  font-size: 10px;
}
.closure-history {
  font-size: 10px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
  overflow-wrap: anywhere;
}
.weekday-options {
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 16px;
  margin: 20px 0;
}
.weekday-options legend {
  padding: 0 6px;
  font-weight: 600;
}
.day-restriction {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #995d14;
}
.pending-restoration {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.pending-restoration strong {
  font-size: 14px;
}
.pending-restoration p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.pending-restoration .small {
  width: 100%;
}

.admin-slot-picker {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin: 20px 0;
  min-width: 0;
}
.admin-slot-picker legend {
  font-size: 14px;
  padding: 0 6px;
}
.user-card > button {
  margin: 4px 6px 0 0;
}

.restoration-cards {
  display: grid;
  gap: 16px;
}
.restoration-project {
  overflow-wrap: anywhere;
}
.restoration-error {
  color: #a22c40;
  font-size: 14px;
}

.audit-filters .field {
  min-width: min(100%, 210px);
}
.audit-user-search {
  align-items: end;
  display: flex;
  gap: 16px;
  margin-top: 16px;
}
.audit-user-search > div {
  flex: 1;
  min-width: 0;
}
.audit-user-search .field {
  max-width: 520px;
}
.audit-user-search p {
  margin: 8px 0 0;
}
.audit-user-pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 10px;
}
.audit-cards {
  display: grid;
  gap: 16px;
}
.audit-card {
  min-width: 0;
}
.audit-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}
.audit-card-heading h2 {
  margin-bottom: 0;
}
.audit-card-heading code,
.audit-technical code {
  overflow-wrap: anywhere;
}
.audit-card-heading > code {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.audit-time {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 6px;
}
.audit-identities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  margin: 16px 0;
}
.audit-identities div {
  min-width: 180px;
}
.audit-identities dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.audit-identities dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.audit-technical {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 16px;
}
.audit-technical summary {
  cursor: pointer;
  font-weight: 700;
}
.audit-technical .details {
  margin-top: 18px;
}
.audit-technical pre {
  background: #f4f7f8;
  border-radius: 8px;
  font-size: 12px;
  max-width: 100%;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 650px) {
  .audit-user-search {
    align-items: stretch;
    display: grid;
  }
  .audit-user-pagination {
    align-items: stretch;
    display: grid;
    text-align: center;
  }
  .audit-card-heading {
    display: block;
  }
  .audit-card-heading > code {
    display: block;
    margin-top: 8px;
    text-align: left;
  }
  .audit-identities {
    display: grid;
  }
}

.academic-periods {
  display: grid;
  gap: 18px;
}
.academic-period {
  min-width: 0;
}
.academic-period h2,
.calendar-version p {
  overflow-wrap: anywhere;
}
.calendar-versions {
  margin-top: 20px;
}
.calendar-versions summary {
  cursor: pointer;
  color: var(--blue);
}
.calendar-version {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.calendar-version .tag {
  display: inline-block;
  margin-left: 8px;
}
.calendar-version ul {
  padding-left: 20px;
}
.calendar-slot-editor {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.calendar-slot-editor legend {
  max-width: 100%;
  padding: 0 6px;
}
.calendar-slot-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.calendar-slot-row strong {
  align-self: center;
}
.calendar-slot-row input {
  min-width: 0;
  padding: 8px;
}
.calendar-slot-row button {
  padding: 8px;
}
@media (max-width: 520px) {
  .calendar-slot-editor {
    padding: 12px;
  }
  .calendar-slot-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
  }
  .calendar-slot-row strong {
    grid-column: 1 / -1;
  }
}
.lesson-display {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  overflow-wrap: anywhere;
}
.lesson-trigger {
  width: 100%;
  min-height: 116px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: inherit;
}
.lesson-trigger:hover,
.lesson-trigger:focus-visible {
  background: #ffffff80;
  box-shadow: 0 0 0 2px var(--blue);
}
.lesson-pairs {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}
.lesson-pairs legend {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 9px;
}
#lesson-pair-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.lesson-pair-option {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}
.lesson-pair-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.lesson-pair-option span,
.lesson-pair-option small {
  display: block;
  min-width: 0;
}
.lesson-pair-option small {
  margin-top: 3px;
  color: var(--muted);
}
.lesson-pair-option.unavailable {
  background: #f1f3f5;
  color: var(--muted);
}
.lesson-preview-card {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin: 18px 0;
}
.lesson-cards {
  display: grid;
  gap: 16px;
}
.lesson-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.lesson-card h2 {
  margin: 10px 0 4px;
  overflow-wrap: anywhere;
}
.lesson-card p {
  margin: 4px 0;
}
@media (max-width: 600px) {
  #lesson-pair-options {
    grid-template-columns: 1fr;
  }
  .lesson-card {
    align-items: stretch;
    flex-direction: column;
  }
  .lesson-card .row-meta,
  .lesson-card .row-meta button {
    width: 100%;
  }
}
.lesson-display strong {
  color: var(--blue);
}
.lesson-cell.past .lesson-display {
  color: var(--muted);
}
.lesson-cell.past .lesson-display strong {
  color: inherit;
}

.series-patterns {
  padding: 0;
  border: 0;
}
.series-patterns legend {
  font-weight: 700;
  margin-bottom: 12px;
}
.series-cancellation-weekdays {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin-bottom: 18px;
}
@media (max-width: 480px) {
  .series-cancellation-weekdays {
    grid-template-columns: 1fr;
  }
}
.series-pattern {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.series-pair-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.series-pair-range .field {
  margin-bottom: 8px;
}
.discipline-templates {
  border: 1px solid #c8dce8;
  border-radius: 12px;
  background: #f5fafe;
  padding: 16px;
  margin: 4px 0 20px;
}
.discipline-templates > h3 {
  color: #245d7e;
}
.discipline-template-actions,
.discipline-template-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.discipline-template-status {
  min-height: 18px;
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}
.discipline-template-manager {
  border-top: 1px solid #c8dce8;
  margin-top: 14px;
  padding-top: 14px;
}
.discipline-template-manager .alert {
  display: block;
}
.discipline-template-card {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.discipline-template-card:first-child {
  border-top: 0;
}
.discipline-template-card strong,
.discipline-template-card small {
  display: block;
  overflow-wrap: anywhere;
}
.discipline-template-card small {
  color: var(--muted);
  margin-top: 4px;
}
.discipline-template-editor,
.discipline-template-delete {
  border-top: 1px solid #c8dce8;
  margin-top: 14px;
  padding-top: 16px;
}
.discipline-template-patterns {
  margin-top: 8px;
}
.discipline-template-pattern {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.discipline-template-editor-actions {
  margin-top: 14px;
}
@media (max-width: 480px) {
  .discipline-templates {
    padding: 13px;
  }
  .discipline-template-actions,
  .discipline-template-card-actions,
  .discipline-template-editor-actions {
    display: grid;
  }
  .discipline-template-actions button,
  .discipline-template-card-actions button,
  .discipline-template-editor-actions button {
    width: 100%;
  }
}
.series-preview-card {
  border-top: 1px solid var(--line);
  margin: 16px 0;
  padding-top: 16px;
}
.series-date-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  margin-bottom: 16px;
}
.series-date {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.series-date span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.series-date small {
  display: block;
  margin-top: 5px;
}
.series-date input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.series-date.unavailable {
  color: var(--muted);
  background: #f1f3f5;
}
.date-group {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.date-group + .date-group {
  margin-top: 8px;
}
.date-group-heading {
  margin: 0 0 7px;
  color: #245d7e;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.date-group-list {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.date-group-list > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
.future-target-pattern {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(90px, 0.7fr));
  gap: 12px;
}
.future-schedule-row .future-status {
  color: var(--blue);
  font-weight: 700;
}
.future-schedule-row.unavailable .future-status {
  color: inherit;
}
.future-plan-context,
.future-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
dialog:has(#lesson-series-plan-form) {
  width: min(768px, calc(100vw - 21px));
}
#lesson-series-plan-form,
.future-plan-grid .field,
.future-plan-operation,
.future-plan-operation input,
.future-plan-operation select {
  min-width: 0;
  max-width: 100%;
}
#lesson-series-plan-form {
  container-type: inline-size;
}
.future-plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.future-plan-editor,
.future-plan-operations {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}
.future-plan-section-heading,
.future-plan-add,
.future-plan-operation {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.future-plan-add .field {
  min-width: min(330px, 50vw);
}
.future-plan-operation {
  align-items: end;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0;
}
.future-plan-operation > div,
.future-plan-operation .field {
  min-width: 0;
  flex: 1 1 0;
}
.future-plan-metadata {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #eef5f8;
}
.future-plan-group > span {
  width: 100%;
}
.future-plan-action {
  display: block;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.future-plan-preserved small {
  display: block;
  color: var(--muted);
}
.plan-history-list {
  display: grid;
  gap: 14px;
}
.plan-history-version {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  min-width: 0;
}
.plan-history-version > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.plan-history-version h3,
.plan-history-version h4 {
  margin-top: 8px;
}
.plan-history-intention {
  background: #eef5f8;
  border-radius: 10px;
  margin: 14px 0;
  padding: 12px;
}
.plan-history-intention ul,
.plan-history-actions {
  padding-left: 22px;
}
.plan-history-action {
  margin: 12px 0;
}
.plan-history-action-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
  min-width: 0;
}
.plan-history-action-flow > span:not([aria-hidden]) {
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.plan-history-action-flow small {
  display: block;
  margin-top: 3px;
}
.plan-history-pagination {
  justify-content: space-between;
  margin-top: 16px;
}
@media (max-width: 520px) {
  .future-target-pattern {
    grid-template-columns: 1fr 1fr;
  }
  .future-target-pattern .field:first-child {
    grid-column: 1 / -1;
  }
  .plan-history-version > header,
  .plan-history-action-flow {
    align-items: stretch;
    flex-direction: column;
  }
  .plan-history-action-flow > span[aria-hidden] {
    transform: rotate(90deg);
    width: min-content;
  }
  .date-group {
    padding: 9px;
  }
}
@container (max-width: 640px) {
  .future-plan-context,
  .future-plan-grid {
    grid-template-columns: 1fr;
  }
  .future-plan-section-heading,
  .future-plan-add,
  .future-plan-operation {
    align-items: stretch;
    flex-direction: column;
  }
  .future-plan-add .field {
    min-width: 0;
    width: 100%;
  }
  .future-plan-operation > div,
  .future-plan-operation .field,
  .future-plan-operation button {
    width: 100%;
  }
}
