:root {
  --surface: #ffffff;
  --surface-soft: #f7f7f8;
  --surface-panel: #fbfbfc;
  --ink: #111111;
  --muted: #555555;
  --accent: #e4002b;
  --blue: #002fa7;
  --male: #ececef;
  --female: #ffffff;
  --unknown: #ffffff;
  --rule: 1px solid #111111;
  --rule-soft: 1px solid #d8d8dc;
  --layer-modal: 10000;
  --layer-toast: 10100;
}

/* Account entry and authentication */
#accountAuthPanel [hidden],
.header-account [hidden] {
  display: none !important;
}

.header-account {
  position: relative;
  z-index: 180;
  justify-self: end;
}

.account-avatar-button {
  display: inline-grid;
  min-width: 128px;
  min-height: 44px;
  grid-template-columns: 34px minmax(0, auto) 16px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--surface);
  padding: 4px 9px 4px 5px;
  color: var(--ink);
  box-shadow: 0 7px 20px rgba(22, 27, 36, 0.08);
  transition: border-color 160ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.account-avatar-button:hover,
.account-avatar-button[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--line));
  box-shadow: 0 10px 26px rgba(22, 27, 36, 0.13);
  transform: translateY(-1px);
}

.account-avatar-frame,
.account-profile-avatar {
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
}

.account-avatar-frame {
  width: 34px;
  height: 34px;
}

.account-avatar-frame img,
.account-profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar-label {
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-avatar-chevron {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: var(--muted);
  transition: transform 180ms ease;
}

.account-avatar-button[aria-expanded="true"] .account-avatar-chevron {
  transform: rotate(180deg);
}

.account-popover[hidden] {
  display: none;
}

.account-popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 220;
  width: 292px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass-fill-strong);
  box-shadow: 0 20px 54px rgba(22, 27, 36, 0.2), inset 0 1px 0 var(--glass-highlight);
  padding: 14px;
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
  animation: account-popover-in 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes account-popover-in {
  from { opacity: 0; transform: translateY(-7px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.account-popover-signed-out {
  display: grid;
  gap: 8px;
}

.account-popover-signed-out > strong {
  font-size: 17px;
}

.account-popover-signed-out > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.account-popover-signed-out > button {
  width: 100%;
  margin-top: 3px;
}

.account-profile-summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
}

.account-profile-avatar {
  width: 46px;
  height: 46px;
}

.account-profile-summary strong,
.account-profile-summary p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-summary strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.account-profile-summary p {
  color: var(--muted);
  font-size: 13px;
}

.account-profile-details {
  display: grid;
  gap: 9px;
  margin: 12px 0;
}

.account-profile-details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-profile-details dt,
.account-profile-details dd {
  margin: 0;
  font-size: 13px;
}

.account-profile-details dt {
  color: var(--muted);
}

.account-profile-details dd {
  font-weight: 750;
}

.account-logout-button {
  width: 100%;
}

.account-auth-modal {
  z-index: var(--layer-modal);
}

.account-auth-dialog {
  width: min(520px, 100%);
  max-height: min(820px, calc(100vh - 36px));
  overflow: auto;
  border-top: 4px solid var(--accent);
  padding: 0;
}

.account-auth-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 20px 20px 17px;
}

.account-auth-brand {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.account-auth-brand > img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  box-shadow: 0 7px 18px rgba(22, 27, 36, 0.12);
}

.account-auth-brand h2 {
  margin: 0 0 5px;
  font-size: 21px;
}

.account-auth-brand p {
  max-width: 360px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.account-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
}

.account-auth-tab {
  min-height: 50px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.account-auth-tab:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.account-auth-tab.is-active {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.account-auth-pane {
  padding: 22px 26px 10px;
}

.wechat-auth-pane {
  display: grid;
  justify-items: center;
  gap: 13px;
  text-align: center;
}

.wechat-qr-mount {
  display: grid;
  width: 100%;
  justify-items: center;
  gap: 9px;
}

.wechat-qr-placeholder {
  position: relative;
  display: grid;
  width: 208px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px) 0 0 / 13px 13px,
    linear-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px) 0 0 / 13px 13px,
    var(--surface);
  color: var(--ink);
}

.wechat-qr-placeholder::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent);
  animation: account-qr-scan 2.2s ease-in-out infinite alternate;
}

.wechat-qr-placeholder .ui-icon {
  width: 82px;
  height: 82px;
}

@keyframes account-qr-scan {
  from { transform: translateY(-68px); }
  to { transform: translateY(68px); }
}

.wechat-qr-mount > strong {
  font-size: 17px;
}

.wechat-qr-mount > p,
.account-auth-note,
.account-auth-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.wechat-qr-widget {
  width: 300px;
  max-width: 100%;
  min-height: 330px;
  overflow: hidden;
}

.wechat-qr-widget iframe {
  width: 300px !important;
  max-width: 100%;
  height: 330px !important;
}

.account-auth-primary {
  width: min(320px, 100%);
  min-height: 42px;
}

.phone-auth-pane {
  display: grid;
  gap: 16px;
}

.phone-binding-notice {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  padding: 12px;
}

.phone-binding-notice > .ui-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.phone-binding-notice strong {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
}

.phone-binding-notice p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.phone-auth-form {
  display: grid;
  gap: 14px;
}

.phone-auth-form label {
  display: grid;
  gap: 7px;
}

.phone-auth-form label > span:first-child {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.phone-auth-form input {
  min-height: 44px;
  font-size: 15px;
}

.auth-code-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 8px;
}

.auth-code-field button {
  min-height: 44px;
  padding-inline: 10px;
  font-size: 13px;
}

.phone-auth-form .account-auth-primary {
  width: 100%;
  margin-top: 2px;
}

.account-auth-status {
  min-height: 20px;
  text-align: center;
}

.account-auth-status[data-tone="danger"],
.wechat-qr-mount > p[data-tone="danger"] {
  color: #b42318;
}

.account-auth-status[data-tone="warning"],
.wechat-qr-mount > p[data-tone="warning"] {
  color: #9a6700;
}

.account-auth-status[data-tone="success"] {
  color: #087443;
}

.account-auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding: 14px 26px 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.account-auth-consent input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--accent);
}

.account-auth-consent a {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.account-auth-consent a:hover {
  text-decoration: underline;
}

html.auth-required:not(.auth-granted) .page {
  pointer-events: none;
  user-select: none;
}

html.no-liquid-glass .account-popover,
html.no-liquid-glass .account-auth-dialog {
  background: var(--surface);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html.no-liquid-glass .account-avatar-button,
html.no-liquid-glass .account-popover,
html.no-liquid-glass .account-auth-dialog {
  animation: none;
  transition: none;
}

:root.theme-dark .account-auth-status[data-tone="danger"],
:root.theme-dark .wechat-qr-mount > p[data-tone="danger"] {
  color: #ff9a90;
}

:root.theme-dark .account-auth-status[data-tone="warning"],
:root.theme-dark .wechat-qr-mount > p[data-tone="warning"] {
  color: #ffd470;
}

:root.theme-dark .account-auth-status[data-tone="success"] {
  color: #78dbaa;
}

@media (max-width: 760px) {
  .brand-hero {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .account-avatar-button {
    min-width: 44px;
    grid-template-columns: 34px;
    padding: 4px;
  }

  .account-avatar-label,
  .account-avatar-chevron {
    display: none;
  }

  .account-popover {
    position: fixed;
    top: 72px;
    right: 14px;
    width: min(292px, calc(100vw - 28px));
  }

  .account-auth-modal {
    padding: 12px;
  }

  .account-auth-head,
  .account-auth-pane {
    padding-inline: 16px;
  }

  .account-auth-consent {
    padding-inline: 16px;
  }

  .account-auth-brand {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .account-auth-brand > img {
    width: 40px;
    height: 40px;
  }

  .auth-code-field {
    grid-template-columns: minmax(0, 1fr) 112px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wechat-qr-placeholder::after {
    animation: none;
  }
}

@media print {
  .header-account,
  .account-auth-modal {
    display: none !important;
  }
}

:root.theme-dark {
  --surface: #111111;
  --surface-soft: #000000;
  --surface-panel: #171717;
  --ink: #f7f7f8;
  --muted: #b8b8be;
  --accent: #ff4f00;
  --blue: #8ab4ff;
  --male: #2d2d32;
  --female: #111111;
  --unknown: #111111;
  --rule: 1px solid #f7f7f8;
  --rule-soft: 1px solid #44444c;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface-soft);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

.app-toast[hidden] {
  display: none;
}

.app-toast {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  z-index: var(--layer-toast);
  width: max-content;
  max-width: min(420px, calc(100vw - 28px));
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background:
    var(--glass-sheen-soft),
    var(--glass-fill-strong);
  color: var(--ink);
  box-shadow:
    0 12px 30px rgba(22, 27, 36, 0.16),
    inset 0 1px 0 var(--glass-highlight);
  padding: 9px 14px 9px 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity 160ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.app-toast[data-tone="info"] {
  border-left-color: var(--blue);
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.app-toast.is-leaving {
  opacity: 0;
  transform: translate(-50%, -6px);
}

@media (prefers-reduced-motion: reduce) {
  .app-toast {
    transition: none;
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 44px;
  border: var(--rule);
  border-radius: 0;
  cursor: pointer;
  font-weight: 700;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

input,
select,
textarea {
  width: 100%;
  border: var(--rule);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

.page {
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 14px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(24px, 2.7vw, 38px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  border: var(--rule);
  border-top: 4px solid var(--accent);
  background: var(--surface);
  padding: 12px 14px;
}

.brand-mark {
  display: grid;
  width: clamp(52px, 4.6vw, 68px);
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: grid;
  gap: 5px;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.version-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: var(--rule);
  padding: 0 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.brand-copy p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-self: end;
}

.header-action-button {
  min-height: 34px;
  padding: 0 11px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}

.function-bar {
  display: grid;
  grid-template-columns: 180px minmax(350px, 420px) minmax(420px, 1fr) 180px;
  margin-bottom: 12px;
  border: var(--rule);
  border-top: 4px solid var(--ink);
  background: var(--surface);
}

.function-block {
  min-width: 0;
  padding: 12px;
  border-right: var(--rule);
}

.function-block:last-child {
  border-right: 0;
}

.function-title {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.function-title .function-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: var(--rule);
  color: var(--ink);
}

.function-title h2 {
  font-size: 16px;
}

.function-bar label {
  margin-bottom: 0;
}

.function-bar input,
.function-bar select {
  min-height: 36px;
  padding: 7px 9px;
}

.layout-function .layout-type-control {
  margin-bottom: 8px;
}

.layout-function .layout-grid {
  gap: 8px;
}

.layout-function .layout-grid label span {
  margin-bottom: 4px;
}

.layout-function > .compact {
  width: 100%;
  min-height: 36px;
  margin-top: 8px;
}

.adjust-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 94px));
  justify-content: start;
  gap: 6px;
}

.adjust-function {
  position: relative;
}

.seat-rotation-popover {
  position: absolute;
  z-index: 40;
  width: 118px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(22, 27, 36, 0.18);
  padding: 9px;
}

.seat-rotation-popover[hidden] {
  display: none;
}

.seat-rotation-pad {
  display: grid;
  grid-template-areas:
    ". back ."
    "left center right"
    ". front .";
  grid-template-columns: repeat(3, 30px);
  grid-template-rows: repeat(3, 30px);
  gap: 4px;
}

.rotation-direction,
.rotation-pad-center {
  display: inline-grid;
  width: 30px;
  height: 30px;
  min-height: 0;
  border-radius: 5px;
  padding: 0;
  place-items: center;
}

.rotation-direction {
  border: 1px solid var(--line);
  background: var(--surface-panel);
  color: var(--ink);
}

.rotation-direction:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.rotation-direction:active {
  transform: translateY(1px) scale(0.94);
}

.rotation-direction .ui-icon,
.rotation-pad-center .ui-icon {
  width: 15px;
  height: 15px;
}

.rotation-back { grid-area: back; }
.rotation-left { grid-area: left; }
.rotation-right { grid-area: right; }
.rotation-front { grid-area: front; }

.rotation-pad-center {
  grid-area: center;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.name-size-control {
  display: grid;
  grid-column: span 2;
  grid-template-columns: minmax(54px, auto) 26px 24px 26px;
  width: 176px;
  max-width: 100%;
  gap: 2px;
  align-items: center;
  min-height: 36px;
  border: var(--rule);
  padding: 2px 4px 2px 8px;
  font-size: 12px;
  font-weight: 800;
}

.name-size-control > span {
  overflow: hidden;
  white-space: nowrap;
}

.font-label {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.font-icon {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
}

.font-icon .ui-icon {
  width: 14px;
  height: 14px;
}

.name-size-control output {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.icon-button {
  display: inline-grid;
  width: 32px;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 6px;
  place-items: center;
}

.icon-button:hover {
  background: var(--ink);
  color: var(--surface);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
  transform: none;
}

.seat-color-panel {
  margin-top: 8px;
  border: var(--rule-soft);
  background: var(--surface-panel);
  padding: 9px;
}

.seat-color-row {
  display: grid;
  grid-template-columns: 44px 44px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  font-size: 12px;
  font-weight: 800;
}

.seat-color-row input[type="color"] {
  width: 38px;
  height: 28px;
  border: var(--rule);
  padding: 2px;
  cursor: pointer;
}

.seat-color-row label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  white-space: nowrap;
}

.seat-color-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
}

.seat-color-panel > button {
  width: 100%;
  margin-top: 7px;
}

.adjust-actions .compact,
.export-actions .compact {
  min-width: 0;
  min-height: 36px;
  padding: 0 7px;
  font-size: 12px;
  white-space: nowrap;
}

.adjust-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.adjust-function .search-field {
  position: relative;
  display: block;
  width: calc(25% - 5px);
  min-width: 96px;
  margin: 8px 0 0 auto;
}

.search-field input {
  width: 100%;
  height: 36px;
  padding-left: 34px;
}

button[data-icon],
.file-button[data-icon] {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.ui-icon {
  display: inline-grid;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  order: -1;
  place-items: center;
  pointer-events: none;
}

.ui-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.function-icon .ui-icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

.search-field > .ui-icon {
  position: absolute;
  top: 50%;
  left: 10px;
  z-index: 1;
  transform: translateY(-50%);
}

.class-info-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(140px, 1.6fr) minmax(80px, 0.8fr) minmax(70px, 0.7fr);
  gap: 8px;
}

.class-info-grid label,
.school-field {
  min-width: 0;
  margin-bottom: 0;
}

.school-field input {
  min-width: 0;
  width: 100%;
}

.export-actions {
  display: grid;
  width: 100%;
  max-width: 100%;
  gap: 8px;
}

#seatWorkspace {
  --seat-left-track: minmax(272px, 326px);
  --seat-center-track: minmax(640px, 1fr);
  --seat-right-track: minmax(272px, 326px);
  --seat-workspace-gap: 12px;
}

.workbench {
  display: grid;
  grid-template-columns: var(--seat-left-track, minmax(272px, 326px)) var(--seat-center-track, minmax(640px, 1fr)) var(--seat-right-track, minmax(272px, 326px));
  grid-template-areas:
    "left board side";
  gap: var(--seat-workspace-gap, 12px);
  align-items: start;
}

.controls {
  display: contents;
}

.left-stack,
.side-stack {
  display: grid;
  gap: 12px;
  align-self: start;
}

.left-stack {
  grid-area: left;
}

.side-stack {
  grid-area: side;
}

.panel,
.board-panel {
  background: var(--surface);
  border: var(--rule);
  min-width: 0;
  padding: 14px;
}

.panel {
  border-top-width: 4px;
}

.board-panel {
  grid-area: board;
  min-height: calc(100vh - 120px);
  border: 0;
  padding: 16px;
}

.panel-head {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

h2 {
  font-size: 21px;
  line-height: 1.1;
  font-weight: 800;
}

.panel-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

label {
  display: block;
  margin-bottom: 12px;
}

label span,
.avoid-builder > span {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.layout-grid,
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.layout-type-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.layout-type-btn {
  min-height: 36px;
  padding: 0 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.layout-type-btn.is-active {
  background: var(--ink);
  color: var(--surface);
}

.controls .actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rule-panel-head {
  display: block;
}

.controls .rule-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.rule-actions button {
  min-width: 0;
  min-height: 36px;
  gap: 5px;
  padding: 0 7px;
  font-size: 12px;
  white-space: nowrap;
}

.rule-actions button .ui-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.rule-conflict-notice {
  max-height: 240px;
  margin-top: 12px;
  overflow: auto;
  padding: 11px 12px;
  font-size: 12px;
}

.rule-conflict-notice p {
  line-height: 1.45;
}

.rank-rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 11px;
}

.rank-rule-row > label {
  margin-bottom: 0;
}

.rank-close-gap-field {
  width: 92px;
}

.rank-close-gap-field[hidden] {
  display: none;
}

.rank-close-gap-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 40px;
  align-items: center;
  gap: 3px;
  border: var(--rule-soft);
  background: var(--surface-panel);
  padding: 0 8px;
}

.rank-close-gap-control span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rank-close-gap-control input {
  width: 34px;
  min-width: 0;
  height: auto;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: center;
  font-weight: 800;
  box-shadow: none;
}

.rank-close-gap-control input:focus {
  outline: 0;
  box-shadow: none;
}

.board-warning-box {
  width: 100%;
  max-height: 220px;
  margin: 16px 0 0;
  text-align: left;
}

.board-warning-box strong {
  color: var(--ink);
}

.import-row {
  display: grid;
  width: 100%;
  max-width: 100%;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 0;
}

.seat-command-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  gap: 8px;
}

.seat-command-actions button {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  justify-content: center;
  border-radius: 6px;
  padding-inline: 7px;
  font-size: 12px;
}

.import-row .file-button,
.import-row button {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border-color: var(--line);
  background: var(--surface-panel);
  padding-inline: 9px;
  font-size: 12px;
}

.import-row .file-button span {
  font-size: 12px;
}

.smart-import-button.is-loading {
  cursor: wait;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--accent);
}

.tips-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 24px;
  font-weight: 700;
  line-height: 1.45;
}

.tips-list li::marker {
  color: var(--accent);
  font-weight: 800;
}

.file-button {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  margin: 0;
  border: var(--rule);
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
}

.file-button span {
  margin: 0;
  font-size: 14px;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.rule-input {
  min-height: 58px;
}

.avoid-builder {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-panel);
  padding: 10px;
}

.avoid-selection-button {
  width: 100%;
  margin-bottom: 8px;
  min-height: 50px;
  border: 0;
  justify-content: flex-start;
  padding: 7px 12px;
  text-align: left;
}

.avoid-selection-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.avoid-selection-copy strong {
  font-size: 13px;
  line-height: 1.2;
}

.avoid-selection-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.avoid-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.avoid-pair-list {
  display: grid;
  gap: 0;
  margin-top: 9px;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}

.avoid-pair-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 7px 2px;
  font-size: 13px;
  font-weight: 700;
}

.avoid-pair-row button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.avoid-pair-row:last-child {
  border-bottom: 0;
}

.avoid-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.primary {
  width: 100%;
  background: var(--accent);
  color: var(--surface);
}

.primary:hover {
  background: var(--ink);
}

.secondary {
  width: 100%;
  background: var(--surface);
  color: var(--ink);
}

.secondary:hover,
.file-button:hover {
  background: var(--ink);
  color: var(--surface);
}

.compact {
  width: auto;
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.danger {
  color: var(--accent);
}

.desk-line {
  width: min(220px, 24%);
  margin: 0 auto 12px;
  padding: 8px;
  border: var(--rule);
  background: var(--surface-soft);
  text-align: center;
  font-weight: 800;
  letter-spacing: 0;
}

.desk-line[hidden] {
  display: none;
}

.desk-bottom {
  margin-top: 14px;
  margin-bottom: 0;
}

.class-title {
  margin: 10px 0 14px;
  text-align: center;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
}

.seat-board {
  display: grid;
  gap: 7px;
  padding: 4px 0;
  background: var(--surface);
}

.seat-row {
  display: grid;
  gap: clamp(26px, 3.2vw, 48px);
}

.seat-board[data-layout-type="single"] .seat-row {
  gap: 12px;
}

.seat-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.seat {
  position: relative;
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 62px;
  border: var(--rule);
  background: var(--seat-fill, var(--surface));
  padding: 7px 6px;
  text-align: center;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.seat:hover {
  transform: translateY(-1px);
}

.seat.dragging {
  opacity: 0.45;
}

.seat.drag-over {
  outline: 3px solid var(--state-drop);
  outline-offset: -3px;
}

.seat.selected {
  background: var(--blue);
  color: var(--surface);
}

.seat.search-match {
  outline: 4px solid var(--state-search);
  outline-offset: -4px;
}

.seat.zone-preview {
  border-color: var(--state-zone);
  border-style: dashed;
  background: color-mix(in srgb, var(--state-zone) 8%, var(--seat-fill, var(--surface)));
  box-shadow: inset 0 0 0 1px var(--state-zone);
}

.seat.editing-seat {
  border-color: var(--state-edit);
  box-shadow: inset 0 0 0 3px var(--state-edit);
}

.seat.selected .seat-meta {
  color: var(--surface);
}

.seat.locked {
  border-color: var(--state-lock);
  box-shadow: inset 4px 0 0 var(--state-lock);
}

.seat.blocked {
  border-style: dashed;
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
}

.seat-blocked-mark {
  display: grid;
  color: var(--muted);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  place-items: center;
}

.seat-board.blank-mode .seat {
  cursor: pointer;
}

.seat-board.blank-mode .seat:hover {
  border-color: var(--state-blank);
  box-shadow: inset 0 0 0 1px var(--state-blank);
}

.seat-name {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.seat-placeholder {
  min-height: 62px;
}

.seat-column-controls {
  min-height: 28px;
}

.seat-column-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100%;
  min-height: 28px;
  border: 1px dashed var(--muted);
  background: var(--surface-soft);
  color: var(--ink);
  opacity: 0;
  padding: 3px;
}

.seat-column-control:hover,
.seat-column-control:focus-within,
.seat-column-control:focus-visible {
  background: var(--surface-soft);
  color: var(--ink);
  opacity: 1;
  transform: none;
}

.seat-column-action {
  display: inline-flex;
  min-width: 0;
  min-height: 22px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  align-items: center;
  justify-content: center;
}

.seat-column-action + .seat-column-action {
  border-left: var(--rule-soft);
}

.seat-column-action:hover,
.seat-column-action:focus-visible {
  background: var(--surface);
  color: var(--accent);
  transform: none;
}

.seat-column-action svg {
  width: 15px;
  height: 15px;
}

.extra-seat-control {
  min-height: 62px;
  align-self: stretch;
}

.extra-seat-control .seat-column-action svg {
  width: 17px;
  height: 17px;
}

.seat-meta {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.seat-lock {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.seat-lock::before {
  position: absolute;
  left: 5px;
  top: 1px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--state-lock);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  content: "";
}

.seat-lock::after {
  position: absolute;
  left: 3px;
  top: 8px;
  width: 12px;
  height: 9px;
  border: 2px solid var(--state-lock);
  border-radius: 2px;
  background:
    linear-gradient(var(--state-lock), var(--state-lock)) center 4px / 2px 4px no-repeat,
    var(--surface);
  content: "";
}

@media (min-width: 1181px) {
  .left-stack {
    position: sticky;
    top: 18px;
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding-right: 2px;
  }

  .student-details-panel {
    position: sticky;
    top: 18px;
  }
}

.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 6px solid var(--accent);
  background: var(--surface-soft);
}

.notice strong {
  display: block;
  margin-bottom: 6px;
}

.notice p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.versions {
  margin-top: 0;
  border-top: 4px solid var(--ink);
  padding-top: 14px;
  min-height: 190px;
}

.version-empty {
  margin-top: 14px;
  padding: 18px 0;
  border-top: var(--rule);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: var(--rule);
}

.version-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.versions-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  border-top: var(--rule);
  padding-top: 12px;
}

.versions-dialog {
  width: min(620px, 100%);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(15, 18, 24, 0.24);
}

.versions-dialog .modal-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.modal-close-button,
.detail-close-button {
  flex: 0 0 34px;
  width: 34px;
  min-height: 34px;
  border-color: var(--line);
  background: var(--surface-panel);
}

.versions-page-info {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.rotation-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}

.rotation-row {
  display: grid;
  grid-template-columns: minmax(64px, 1fr) repeat(4, 34px);
  gap: 4px;
  align-items: center;
  min-height: 34px;
  border: var(--rule-soft);
  padding: 6px;
  font-size: 12px;
  font-weight: 800;
}

.rotation-row.is-head {
  border-color: var(--ink);
  background: var(--surface-soft);
}

.rotation-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rotation-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.audit-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.version-row:first-child {
  margin-top: 12px;
}

.modal[hidden] {
  display: none;
}

.modal,
body > .modal {
  position: fixed;
  inset: 0;
  z-index: var(--layer-modal);
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(17, 17, 17, 0.42);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: var(--rule);
  background: var(--surface);
  padding: 20px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

body.modal-open {
  overflow: hidden;
}

.smart-import-review-dialog {
  width: min(1120px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto auto minmax(180px, 1fr) auto;
  overflow: hidden;
  border-top: 4px solid var(--accent);
  box-shadow: 0 22px 60px rgba(15, 18, 24, 0.24);
}

.smart-import-review-head {
  margin-bottom: 14px;
}

.smart-import-review-head p {
  max-width: 640px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.smart-import-review-toolbar {
  display: grid;
  grid-template-columns: auto 150px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-block: var(--rule-soft);
  background: var(--surface-soft);
  padding: 10px 0;
}

.smart-import-review-count {
  display: flex;
  min-width: 112px;
  align-items: baseline;
  gap: 5px;
  padding-left: 12px;
}

.smart-import-review-count strong {
  color: var(--accent);
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.smart-import-review-count span,
.smart-import-review-toolbar p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.smart-import-expected-count {
  display: grid;
  grid-template-columns: auto 68px;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.smart-import-expected-count input {
  height: 34px;
  min-height: 34px;
  padding: 5px 7px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.smart-import-review-toolbar p[data-state="mismatch"] {
  color: var(--accent);
}

.smart-import-review-toolbar p[data-state="matched"] {
  color: var(--blue);
}

.smart-import-review-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 16px;
  min-height: 0;
  overflow: hidden;
  padding: 14px 0;
}

.smart-import-image-pane,
.smart-import-name-pane {
  min-width: 0;
  min-height: 0;
  margin: 0;
}

.smart-import-image-pane {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px;
}

.smart-import-image-stage {
  position: relative;
  align-self: center;
  width: 100%;
  max-height: 100%;
  overflow: hidden;
  border: var(--rule-soft);
  background: var(--surface-soft);
}

.smart-import-image-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.smart-import-image-markers {
  position: absolute;
  inset: 0;
}

.smart-import-image-marker {
  position: absolute;
  min-width: 22px;
  min-height: 20px;
  border: 2px solid color-mix(in srgb, var(--blue) 72%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--blue) 8%, transparent);
  padding: 0;
  color: var(--blue);
  transform: none;
}

.smart-import-image-marker:hover,
.smart-import-image-marker.is-active {
  z-index: 2;
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 22%, transparent);
  transform: none;
}

.smart-import-image-marker.is-uncertain {
  border-style: dashed;
  border-color: var(--accent);
  color: var(--accent);
}

.smart-import-image-marker span {
  position: absolute;
  top: -9px;
  left: -7px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 9px;
  background: var(--blue);
  color: var(--surface);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.smart-import-image-marker.is-uncertain span {
  background: var(--accent);
}

.smart-import-image-pane figcaption,
.smart-import-name-pane-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.smart-import-name-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-left: var(--rule-soft);
  padding-left: 14px;
}

.smart-import-name-pane-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  padding-bottom: 9px;
}

.smart-import-name-pane-head strong {
  font-size: 14px;
}

.smart-import-review-list {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding: 14px 2px 14px 0;
}

.smart-import-name-row {
  display: grid;
  grid-template-columns: 34px minmax(90px, 1fr) auto 34px;
  gap: 7px;
  align-items: center;
  min-height: 46px;
  border: var(--rule-soft);
  border-left: 3px solid var(--blue);
  background: var(--surface-panel);
  padding: 5px;
}

.smart-import-name-row.is-uncertain {
  border-left-color: var(--accent);
}

.smart-import-name-row.is-active {
  border-color: var(--blue);
  border-left-width: 3px;
  background: color-mix(in srgb, var(--blue) 5%, var(--surface-panel));
}

.smart-import-name-number {
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.smart-import-name-row input {
  min-width: 0;
  height: 34px;
  border: 0;
  border-bottom: var(--rule-soft);
  background: transparent;
  padding: 4px 6px;
  font-weight: 800;
}

.smart-import-name-status {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.smart-import-name-row.is-uncertain .smart-import-name-status {
  color: var(--accent);
}

.smart-import-name-remove {
  width: 34px;
  min-height: 34px;
  border-color: transparent;
  background: transparent;
}

.smart-import-review-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: var(--rule);
  padding-top: 14px;
}

.smart-import-review-footer button {
  min-width: 150px;
}

.student-form {
  display: grid;
  gap: 14px;
}

.student-form[hidden] {
  display: none;
}

.student-details-panel {
  min-height: 520px;
}

.student-details-panel .panel-head p {
  min-height: 38px;
  padding-bottom: 10px;
  border-bottom: var(--rule-soft);
}

.student-details-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.student-seat-search {
  position: relative;
  display: block;
  width: auto;
  min-width: 96px;
  max-width: 132px;
  flex: 1 1 112px;
  margin: 0 0 0 auto;
}

.student-seat-search input {
  height: 32px;
  min-height: 32px;
  padding: 5px 8px 5px 30px;
  font-size: 12px;
}

.student-seat-search > .ui-icon {
  left: 9px;
  width: 14px;
  height: 14px;
}

.student-detail-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  align-items: center;
}

.detail-remove-button,
.detail-close-button {
  width: 32px;
  min-height: 32px;
  padding: 7px;
}

.detail-remove-button {
  color: var(--state-blank);
}

.detail-remove-button:hover:not(:disabled) {
  color: var(--accent);
}

.detail-remove-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.student-details-heading h2 {
  display: inline-flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
}

.student-details-heading h2 .function-icon {
  flex: 0 0 auto;
}

.student-details-panel .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 8px;
}

.student-details-panel label {
  min-width: 0;
  margin-bottom: 0;
}

.student-details-panel input,
.student-details-panel select {
  min-width: 0;
  width: 100%;
}

.student-details-panel .field-wide {
  grid-column: 1 / -1;
}

.seat-zone-fieldset {
  min-width: 0;
  margin: 2px 0 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-panel);
  padding: 10px;
}

.seat-zone-fieldset legend {
  padding: 0 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.zone-selection-toolbar {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.zone-selection-toolbar > span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.zone-rotation-summary {
  display: block;
  min-height: 14px;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.zone-selection-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.zone-selection-actions .secondary {
  width: auto;
  min-height: 32px;
  padding: 0 9px;
  font-size: 11px;
}

.zone-clear-btn {
  width: 32px;
  min-height: 32px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.zone-podium {
  display: grid;
  width: 52%;
  min-height: 27px;
  margin: 10px auto 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--ink);
  border-radius: 4px;
  background: var(--surface-soft);
  padding: 2px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.classroom-zone-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 8px;
  row-gap: 6px;
  margin-top: 10px;
}

.seat-zone-map button {
  display: grid;
  position: relative;
  min-width: 0;
  min-height: 64px;
  grid-template-rows: 32px 14px;
  align-content: center;
  gap: 3px;
  place-items: center;
  border-color: transparent;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 6px;
}

.seat-zone-map button:hover,
.seat-zone-map button:focus-visible {
  z-index: 1;
  border-color: var(--accent);
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.seat-zone-map button.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.seat-zone-map button .ui-icon {
  order: 1;
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

.seat-zone-map button .ui-icon svg {
  stroke-width: 1.65;
}

.seat-zone-day-count {
  order: 2;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1;
  pointer-events: none;
}

.seat-zone-map button.has-rotation-history .seat-zone-day-count {
  color: var(--ink);
  font-weight: 800;
}

.seat-zone-map button.is-selected .seat-zone-day-count {
  color: var(--ink);
}

.student-details-panel .actions {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.student-details-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.assignment-reason {
  border: var(--rule);
  border-left: 5px solid var(--accent);
  background: var(--surface-soft);
  padding: 11px 12px;
}

.assignment-reason strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.assignment-reason p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Modern Swiss workspace refresh */
:root {
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --surface-panel: #fafbfc;
  --ink: #20242c;
  --muted: #68707d;
  --accent: #e4002b;
  --blue: #20242c;
  --male: #eceef1;
  --female: #ffffff;
  --unknown: #ffffff;
  --line: #e0e4e9;
  --line-strong: #c8ced6;
  --rule: 1px solid var(--line-strong);
  --rule-soft: 1px solid var(--line);
  --shadow-soft: 0 8px 28px rgba(32, 36, 44, 0.07);
  --state-lock: #4b5563;
  --state-edit: #2563eb;
  --state-search: #d97706;
  --state-zone: #0f766e;
  --state-drop: #16803b;
  --state-blank: #6b7280;
  --glass-border: color-mix(in srgb, var(--line-strong) 78%, #ffffff);
  --glass-fill: color-mix(in srgb, var(--surface) 82%, transparent);
  --glass-fill-strong: color-mix(in srgb, var(--surface) 88%, transparent);
  --glass-sheen: linear-gradient(145deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.08) 44%, transparent 72%);
  --glass-sheen-soft: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.06) 46%, transparent 74%);
  --ambient-a: rgba(228, 0, 43, 0.055);
  --ambient-b: rgba(0, 47, 167, 0.06);
  --ambient-c: rgba(228, 0, 43, 0.035);
  --glass-highlight: rgba(255, 255, 255, 0.62);
  --glass-highlight-strong: rgba(255, 255, 255, 0.8);
}

:root.theme-dark {
  --surface: #272a31;
  --surface-soft: #1f2228;
  --surface-panel: #2d3139;
  --ink: #f4f5f7;
  --muted: #b6bdc8;
  --accent: #ff4f62;
  --blue: #f4f5f7;
  --male: #353a43;
  --female: #272a31;
  --unknown: #272a31;
  --line: #3c414a;
  --line-strong: #515762;
  --rule: 1px solid var(--line-strong);
  --rule-soft: 1px solid var(--line);
  --shadow-soft: 0 10px 32px rgba(0, 0, 0, 0.16);
  --state-lock: #c0c7d1;
  --state-edit: #60a5fa;
  --state-search: #fbbf24;
  --state-zone: #2dd4bf;
  --state-drop: #4ade80;
  --state-blank: #d1d5db;
  --glass-border: color-mix(in srgb, var(--line-strong) 84%, transparent);
  --glass-fill: color-mix(in srgb, var(--surface) 86%, transparent);
  --glass-fill-strong: color-mix(in srgb, var(--surface) 90%, transparent);
  --glass-sheen: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025) 45%, transparent 74%);
  --glass-sheen-soft: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 46%, transparent 74%);
  --ambient-a: rgba(255, 79, 98, 0.07);
  --ambient-b: rgba(138, 180, 255, 0.055);
  --ambient-c: rgba(255, 79, 98, 0.04);
  --glass-highlight: rgba(255, 255, 255, 0.14);
  --glass-highlight-strong: rgba(255, 255, 255, 0.2);
}

:root.no-liquid-glass {
  --glass-border: var(--line-strong);
  --glass-fill: var(--surface);
  --glass-fill-strong: var(--surface-panel);
  --glass-sheen: linear-gradient(180deg, transparent, transparent);
  --glass-sheen-soft: linear-gradient(180deg, transparent, transparent);
  --glass-highlight: transparent;
  --glass-highlight-strong: transparent;
}

html {
  background:
    radial-gradient(900px 520px at 12% -8%, var(--ambient-a), transparent 62%),
    radial-gradient(1000px 640px at 96% 14%, var(--ambient-b), transparent 58%),
    radial-gradient(760px 520px at 50% 108%, var(--ambient-c), transparent 64%),
    var(--surface-soft);
  background-attachment: fixed;
}

html.no-liquid-glass {
  background: var(--surface-soft);
}

body {
  color: var(--ink);
  font-family: "Helvetica Neue", "Microsoft YaHei", "PingFang SC", Helvetica, Arial, sans-serif;
  font-size: 14px;
}

button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

html.has-liquid-glass button.secondary,
html.has-liquid-glass .icon-button,
html.has-liquid-glass input,
html.has-liquid-glass select,
html.has-liquid-glass textarea,
html.has-liquid-glass .search-field,
html.has-liquid-glass .file-button,
html.has-liquid-glass .settings-state {
  border-color: color-mix(in srgb, var(--glass-border) 86%, transparent);
  background:
    var(--glass-sheen-soft),
    color-mix(in srgb, var(--surface) 74%, transparent);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 5px 16px rgba(16, 24, 40, 0.045);
  backdrop-filter: blur(12px) saturate(145%);
  -webkit-backdrop-filter: blur(12px) saturate(145%);
}

html.has-liquid-glass button:hover,
html.has-liquid-glass .settings-row:hover,
html.has-liquid-glass .grade-subject-button:hover,
html.has-liquid-glass .primary-nav-item:hover {
  box-shadow:
    inset 0 1px 0 var(--glass-highlight-strong),
    0 10px 24px rgba(16, 24, 40, 0.08);
}

html.no-liquid-glass *,
html.no-liquid-glass *::before,
html.no-liquid-glass *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

html.no-liquid-glass button:hover {
  transform: none;
}

button:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--surface-soft);
  transform: none;
}

button:disabled,
button.is-disabled,
button[aria-disabled='true'] {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input,
select,
textarea {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  padding: 9px 11px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink);
}

.page {
  width: min(1640px, 100%);
  padding: 18px;
}

h1 {
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

.brand-hero {
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  margin-bottom: 10px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  padding: 2px 2px 10px;
}

.brand-mark {
  width: 48px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: 0 5px 14px rgba(17, 17, 17, 0.12);
}

.brand-mark img {
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.brand-title-row {
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.brand-copy h1 {
  font-size: 25px;
  line-height: 1.05;
}

.version-badge {
  min-height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  padding: 0 7px;
  font-size: 12px;
}

.header-actions {
  gap: 6px;
}

.header-action-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 0 11px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.function-bar {
  grid-template-columns: 180px minmax(350px, 420px) minmax(420px, 1fr) 180px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background:
    var(--glass-sheen-soft),
    var(--glass-fill);
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 color-mix(in srgb, var(--line) 50%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.function-block {
  padding: 14px;
  border-right: 1px solid var(--line);
}

.function-title {
  gap: 8px;
  margin-bottom: 13px;
}

.function-title .function-icon {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--accent);
}

.function-title h2 {
  font-size: 14px;
  font-weight: 750;
}

.function-bar input,
.function-bar select {
  min-height: 38px;
  padding: 7px 10px;
}

.layout-type-control,
.adjust-actions {
  gap: 8px;
}

.layout-type-btn {
  min-height: 36px;
  border-color: var(--line);
  border-radius: 6px;
  background: var(--surface-panel);
  font-size: 12px;
}

.layout-type-btn.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.adjust-actions .compact,
.export-actions .compact {
  min-height: 36px;
  border-color: var(--line);
  background: var(--surface-panel);
  padding: 0 9px;
  font-size: 12px;
}

.adjust-actions .compact {
  min-height: 36px;
  padding: 0 6px;
  font-size: 12px;
  cursor: grab;
  user-select: none;
}

.adjust-actions .compact .ui-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.function-bar .compact .ui-icon,
.function-bar .file-button .ui-icon,
.function-bar .layout-type-btn .ui-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.adjust-actions .compact:active {
  cursor: grabbing;
}

.adjust-actions .compact.is-disabled {
  opacity: 0.45;
}

.adjust-actions .compact.is-dragging {
  border-style: dashed;
  border-color: var(--accent);
  opacity: 0.35;
  cursor: grabbing;
}

.adjust-actions .compact:hover,
.export-actions .compact:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

.adjust-actions .compact.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.adjust-actions #seatRotationBtn.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.name-size-control {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-panel);
  justify-self: start;
}

.icon-button {
  border-radius: 4px;
}

.icon-button:hover {
  border-color: transparent;
  background: var(--surface-soft);
  color: var(--ink);
}

.adjust-function .search-field {
  margin-top: 10px;
}

.search-field input {
  width: 100%;
  height: 38px;
  border-color: var(--line);
  background: var(--surface-panel);
  padding: 7px 10px 7px 36px;
}

.search-field > .ui-icon {
  left: 11px;
  width: 16px;
  height: 16px;
}

.class-title {
  display: block;
}

.class-title[hidden] {
  display: none;
}

.seat-color-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-panel);
}

.adjust-detail-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  align-items: stretch;
}

.adjust-control-card {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-panel);
  padding: 0 8px;
}

.name-size-control {
  grid-column: span 2;
  width: 100%;
  max-width: none;
  min-height: 38px;
  justify-self: stretch;
  padding: 0 8px;
}

.adjust-control-heading {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  gap: 5px;
  align-items: center;
  color: var(--ink);
}

.adjust-control-heading strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adjust-control-heading .font-icon,
.adjust-control-heading .font-icon .ui-icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.name-size-actions {
  display: grid;
  grid-template-columns: 25px minmax(22px, 1fr) 25px;
  flex: 0 0 82px;
  gap: 2px;
  align-items: center;
  align-self: center;
  margin-left: auto;
}

.name-size-actions .icon-button {
  width: 25px;
  min-height: 25px;
  padding: 4px;
}

.name-size-actions output {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.seat-color-panel {
  grid-column: span 2;
  margin: 0;
  min-height: 38px;
  gap: 6px;
  padding: 0 6px;
}

.seat-rotation-control {
  grid-column: span 2;
  margin: 0;
  min-height: 38px;
  gap: 6px;
  padding: 0 6px;
}

.seat-rotation-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  gap: 3px;
}

.seat-rotation-actions .rotation-direction {
  display: grid;
  width: 100%;
  height: 24px;
  min-width: 0;
  min-height: 24px;
  grid-area: auto;
  border-color: var(--line);
  border-radius: 4px;
  background: var(--surface);
  padding: 0;
  place-items: center;
}

.seat-rotation-actions .rotation-direction .ui-icon {
  width: 13px;
  height: 13px;
}

.seat-color-options {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.seat-color-option {
  display: flex;
  min-width: 0;
  min-height: 0;
  gap: 3px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.seat-color-option input[type="checkbox"] {
  width: 12px;
  height: 12px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.seat-color-option input[type="color"] {
  width: 22px;
  height: 20px;
  min-height: 0;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  padding: 2px;
  cursor: pointer;
}

.adjust-function {
  --adjust-grid-columns: 4;
  --adjust-grid-gap: 8px;
}

.adjust-actions {
  display: grid;
  grid-template-columns: repeat(var(--adjust-grid-columns), minmax(0, 1fr));
  grid-template-rows: repeat(var(--adjust-grid-row-count, 4), 38px);
  grid-auto-rows: 38px;
  width: 100%;
  gap: var(--adjust-grid-gap);
}

.adjust-slot {
  position: relative;
  min-width: 0;
  min-height: 38px;
  border-radius: 6px;
}

.adjust-slot > .compact {
  width: 100%;
  height: 100%;
  min-width: 0;
  justify-content: center;
  touch-action: none;
}

.adjust-slot > .adjust-grid-item {
  width: 100%;
  height: 100%;
  min-width: 0;
}

.adjust-slot.is-tall {
  min-height: 84px;
}

.adjust-slot:empty::after {
  position: absolute;
  inset: 0;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, border-color 120ms ease, background-color 120ms ease;
}

.adjust-actions.is-reordering .adjust-slot:empty::after {
  background: color-mix(in srgb, var(--blue) 4%, transparent);
  opacity: 1;
}

.adjust-slot.is-drop-target {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.adjust-slot.is-drop-invalid {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

.adjust-slot.is-tall-drop-target:not(.is-tall)::before {
  position: absolute;
  inset: -2px;
  z-index: 2;
  height: calc(200% + var(--adjust-grid-gap) + 2px);
  border: 2px solid var(--blue);
  border-radius: 7px;
  content: "";
  pointer-events: none;
}

.adjust-actions .compact {
  gap: 4px;
  padding-inline: 4px;
  font-size: 11px;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease,
    opacity 140ms ease, box-shadow 180ms ease;
}

.adjust-actions .adjust-grid-item.is-dragging {
  box-shadow: 0 10px 22px color-mix(in srgb, var(--blue) 18%, transparent);
  opacity: 0.28;
  pointer-events: none;
}

.adjust-drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 160;
  margin: 0;
  border-color: var(--blue);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--blue) 22%, transparent);
  opacity: 0.96;
  pointer-events: none;
  will-change: transform;
}

.adjust-detail-controls:empty {
  display: none;
}

.adjust-detail-controls[hidden] {
  display: none;
}

.adjust-slot.is-tall > .adjust-control-card {
  min-height: 84px;
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
  justify-content: flex-start;
  padding: 6px 5px;
  cursor: grab;
  touch-action: none;
}

.adjust-slot.is-tall .adjust-control-heading {
  width: 100%;
  min-height: 27px;
  justify-content: center;
  gap: 3px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
  cursor: grab;
  user-select: none;
}

.adjust-slot.is-tall .adjust-control-heading strong {
  font-size: 11px;
  font-weight: 700;
}

.adjust-slot.is-tall .adjust-control-heading .font-icon,
.adjust-slot.is-tall .adjust-control-heading .font-icon .ui-icon {
  width: 14px;
  height: 14px;
}

.adjust-slot.is-tall > .name-size-control,
.adjust-slot.is-tall > .seat-color-panel,
.adjust-slot.is-tall > .seat-rotation-control {
  width: 100%;
  min-height: 84px;
  padding: 6px 5px;
}

.adjust-slot.is-tall .seat-rotation-actions {
  width: 100%;
  flex: none;
  gap: 3px;
  margin: auto 0 2px;
}

.adjust-slot.is-tall .seat-rotation-actions .rotation-direction {
  height: 25px;
  min-height: 25px;
}

.adjust-slot.is-tall .name-size-actions {
  grid-template-columns: 22px minmax(18px, 1fr) 22px;
  width: 100%;
  flex: none;
  gap: 1px;
  margin: auto 0 2px;
}

.adjust-slot.is-tall .name-size-actions .icon-button {
  width: 22px;
  min-height: 24px;
  padding: 4px;
}

.adjust-slot.is-tall .name-size-actions output {
  font-size: 12px;
}

.adjust-slot.is-tall .seat-color-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  flex: none;
  gap: 4px;
  margin: auto 0 2px;
}

.adjust-slot.is-tall .seat-color-option {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px;
  justify-content: center;
  font-size: 11px;
}

.adjust-slot.is-tall .seat-color-option input[type="color"] {
  grid-column: 1 / -1;
  width: 100%;
  height: 14px;
  padding: 1px;
}

.adjust-slot.is-search-slot > .search-field {
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
}

.adjust-slot.is-search-slot > .search-field input {
  height: 38px;
  padding: 7px 4px 7px 27px;
  font-size: 11px;
}

.adjust-slot.is-search-slot > .search-field > .ui-icon {
  left: 8px;
  width: 14px;
  height: 14px;
}

.file-button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  padding: 0 13px;
  font-size: 13px;
}

.file-button:hover {
  border-color: var(--ink);
  background: var(--surface-soft);
  color: var(--ink);
}

.layout-function > .compact {
  min-height: 36px;
  border-color: var(--line-strong);
  background: var(--surface);
}

@media (min-width: 1251px) {
  .function-bar {
    grid-template-columns: 180px minmax(350px, 370px) minmax(420px, 1fr) 180px;
  }

  .layout-function {
    padding: 12px;
  }

  .layout-function .function-title {
    margin-bottom: 9px;
  }

  .layout-function .layout-type-control {
    gap: 6px;
    margin-bottom: 6px;
  }

  .layout-function .layout-type-btn {
    min-height: 36px;
    gap: 4px;
    padding: 0 6px;
    font-size: 12px;
  }

  .layout-function .layout-type-btn .ui-icon {
    flex-basis: 14px;
    width: 14px;
    height: 14px;
  }

  .layout-function .layout-grid,
  .layout-function .class-info-grid {
    gap: 6px;
  }

  .layout-function .class-info-grid {
    grid-template-columns: minmax(140px, 1.65fr) minmax(72px, 0.75fr) minmax(66px, 0.65fr);
  }

  .layout-function .layout-grid label span {
    margin-bottom: 3px;
    font-size: 11px;
  }

  .layout-function input,
  .layout-function select,
  .layout-function > .compact {
    min-height: 34px;
    height: 34px;
  }

  .layout-function > .compact {
    min-height: 36px;
    height: 36px;
    font-size: 12px;
  }

  .layout-function input,
  .layout-function select {
    padding: 5px 8px;
    font-size: 12px;
  }

  .layout-function > .compact {
    margin-top: 6px;
    font-size: 12px;
  }
}

.workbench {
  grid-template-columns: minmax(260px, 306px) minmax(650px, 1fr) minmax(260px, 306px);
  gap: 14px;
}

.left-stack,
.side-stack {
  gap: 14px;
}

.panel {
  border: 1px solid var(--glass-border);
  border-top-width: 1px;
  border-radius: 8px;
  background:
    var(--glass-sheen-soft),
    var(--glass-fill);
  padding: 16px;
  box-shadow:
    0 4px 18px rgba(32, 36, 44, 0.04),
    inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.board-panel {
  min-height: calc(100vh - 160px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background:
    var(--glass-sheen-soft),
    var(--glass-fill);
  padding: 20px 22px;
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.panel-head {
  gap: 8px;
  margin-bottom: 14px;
}

.panel-head p {
  margin-top: 5px;
  font-size: 13px;
}

label {
  margin-bottom: 11px;
}

label span,
.avoid-builder > span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rules-panel > .panel-head h2,
.versions > h2,
.student-details-panel .panel-head h2 {
  font-size: 18px;
  letter-spacing: 0;
}

.avoid-selection-button {
  border: 0;
  background: var(--surface-soft);
}

.rotation-row {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-panel);
}

.avoid-pair-row {
  border-radius: 0;
  background: transparent;
}

.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(228, 0, 43, 0.16);
}

.primary:hover {
  border-color: #bd0024;
  background: #bd0024;
  color: #ffffff;
}

.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.secondary:hover {
  border-color: var(--ink);
  background: var(--surface-soft);
  color: var(--ink);
}

.primary:disabled,
.primary.is-disabled,
.secondary:disabled,
.secondary.is-disabled {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  box-shadow: none;
}

.primary:hover:not(:disabled):not(.is-disabled),
.secondary:hover:not(:disabled):not(.is-disabled) {
  border-color: var(--ink);
  background: var(--surface-soft);
  color: var(--ink);
}

.primary:hover:not(:disabled):not(.is-disabled) {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(228, 0, 43, 0.16);
}

.danger {
  color: var(--accent);
}

.controls .rule-actions {
  gap: 5px;
  margin-top: 0;
}

.desk-line {
  width: min(170px, 22%);
  margin-bottom: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  padding: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.desk-bottom {
  margin-top: 18px;
}

.class-title {
  margin: 4px 0 20px;
  font-size: 25px;
  font-weight: 750;
}

.seat-board {
  gap: 8px;
  background: transparent;
  padding: 2px 0;
}

.seat-board[data-layout-type="single"] .single-layout-row {
  gap: clamp(16px, 1.25vw, 20px);
}

.seat-board[data-layout-type="single"] .single-layout-row .seat-group {
  gap: 0;
}

.seat-board[data-layout-type="single"] .seat {
  padding-inline: 6px;
}

.seat-group {
  gap: 8px;
}

.seat {
  min-height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 8px 7px;
  color: var(--seat-ink, var(--ink));
  box-shadow: 0 1px 2px rgba(32, 36, 44, 0.03);
  transition: border-color 140ms ease, box-shadow 180ms ease, background-color 140ms ease,
    transform 180ms cubic-bezier(0.2, 0.85, 0.25, 1), opacity 140ms ease;
}

.seat:hover {
  border-color: var(--ink);
  box-shadow: 0 5px 14px rgba(32, 36, 44, 0.09);
  transform: none;
}

.seat.selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.seat.selected .seat-name,
.seat.selected .seat-meta {
  color: var(--surface);
}

.seat.search-match {
  outline: 2px solid var(--state-search);
  outline-offset: 2px;
}

.seat.zone-preview {
  border-color: var(--state-zone);
  border-style: dashed;
  background: color-mix(in srgb, var(--state-zone) 8%, var(--seat-fill, var(--surface)));
  box-shadow: inset 0 0 0 1px var(--state-zone);
}

.seat.editing-seat {
  border-color: var(--state-edit);
  box-shadow: inset 0 0 0 2px var(--state-edit);
}

.seat.locked {
  border-color: var(--state-lock);
  box-shadow: inset 3px 0 0 var(--state-lock);
}

.seat.locked.editing-seat {
  border-color: var(--state-edit);
  box-shadow: inset 3px 0 0 var(--state-lock), inset 0 0 0 2px var(--state-edit);
}

.seat.dragging {
  z-index: 3;
  opacity: 0.24;
  transform: scale(0.92) rotate(-1deg);
  box-shadow: inset 0 0 0 2px var(--state-drop);
}

.seat.drag-over {
  z-index: 2;
  outline: 2px solid var(--state-drop);
  outline-offset: 3px;
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--state-drop) 20%, transparent);
}

.drag-ghost {
  position: fixed;
  left: -2000px;
  top: -2000px;
  z-index: 9999;
  opacity: 0.92;
  transform: rotate(2deg) scale(1.04);
  border-color: var(--state-drop);
  background: var(--seat-fill, var(--surface));
  box-shadow: 0 18px 38px rgba(32, 36, 44, 0.24);
  pointer-events: none;
}

.seat.swap-animating {
  z-index: 4;
  will-change: transform, box-shadow;
}

.seat-board.lock-mode .seat {
  cursor: pointer;
}

.seat-board.lock-mode .seat:hover {
  border-color: var(--state-lock);
  box-shadow: inset 0 0 0 1px var(--state-lock), 0 5px 14px color-mix(in srgb, var(--state-lock) 16%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .seat,
  .drag-ghost {
    transition: none;
  }
}

.seat-name {
  color: inherit;
  font-weight: 750;
}

.seat[style*="--seat-ink"] .seat-meta {
  color: var(--seat-ink);
  opacity: 0.72;
}

.seat-column-control {
  min-height: 24px;
  border-color: var(--line-strong);
  border-radius: 5px;
  background: var(--surface-panel);
  color: var(--muted);
}

.seat-column-action {
  color: var(--muted);
}

.seat-column-control:hover,
.seat-column-control:focus-within,
.seat-column-control:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

@media (hover: none) {
  .seat-column-control {
    opacity: 1;
  }
}

.notice {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: var(--surface-panel);
}

.versions {
  min-height: 190px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.version-empty,
.version-row,
.versions-pager {
  border-color: var(--line);
}

.modal-backdrop {
  background: rgba(15, 18, 24, 0.44);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

.modal-panel {
  overflow: auto;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background:
    var(--glass-sheen),
    var(--glass-fill-strong);
  box-shadow:
    0 22px 60px rgba(15, 18, 24, 0.24),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 color-mix(in srgb, var(--line) 55%, transparent);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.feedback-dialog {
  width: min(560px, 100%);
  overflow: hidden;
}

.feedback-form {
  display: grid;
  gap: 14px;
}

.feedback-form label {
  display: grid;
  gap: 6px;
}

.feedback-form label > span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.feedback-content-field textarea {
  min-height: 150px;
  resize: vertical;
}

.feedback-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin: 2px -20px -20px;
  padding: 14px 20px 18px;
}

.feedback-form-footer button {
  min-width: 100px;
}

.assignment-reason {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: var(--surface-panel);
}

/* Compact seating workspace with independent tool cards above the board. */
#seatWorkspace .function-bar {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: var(--seat-left-track) var(--seat-center-track) var(--seat-right-track);
  gap: var(--seat-workspace-gap);
  align-items: stretch;
  margin-bottom: 12px;
  overflow: visible;
  isolation: isolate;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#seatWorkspace .function-bar .function-block {
  position: relative;
  z-index: 0;
  min-width: 0;
  height: 100%;
  overflow: visible;
  border: var(--rule);
  border-top-width: 4px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 12px;
}

#seatWorkspace .seat-center-tools,
#seatWorkspace .seat-right-tools {
  position: relative;
  z-index: 0;
  display: grid;
  min-width: 0;
  gap: var(--seat-workspace-gap);
  align-items: stretch;
  overflow: visible;
}

#seatWorkspace .seat-center-tools {
  grid-template-columns: minmax(0, 1fr) minmax(136px, 152px);
}

#seatWorkspace .seat-right-tools {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#seatWorkspace .seat-center-tools > .function-block,
#seatWorkspace .seat-right-tools > .function-block {
  height: 100%;
}

#seatWorkspace .seat-center-tools:has(.adjust-control-card.is-open),
#seatWorkspace .seat-right-tools:has(.seat-export-menu:not([hidden])) {
  z-index: 2;
}

#seatWorkspace .workbench {
  position: relative;
  z-index: 1;
  grid-template-columns: var(--seat-left-track) var(--seat-center-track) var(--seat-right-track);
  gap: var(--seat-workspace-gap);
}

#seatWorkspace .adjust-function {
  --adjust-grid-columns: 5;
  --adjust-grid-gap: 8px;
}

#seatWorkspace .adjust-actions {
  display: grid;
  grid-template-columns: repeat(var(--adjust-grid-columns), minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-rows: 38px;
  gap: var(--adjust-grid-gap);
  overflow: visible;
}

#seatWorkspace .adjust-actions .compact,
#seatWorkspace .adjust-actions > .adjust-grid-item {
  font-size: 12px;
  font-weight: 750;
}

#seatWorkspace .adjust-actions .compact,
#seatWorkspace .adjust-control-card {
  padding-inline: 4px;
}

#seatWorkspace .layout-function,
#seatWorkspace .seat-command-function,
#seatWorkspace .seat-record-panel,
#seatWorkspace .seat-output-panel {
  padding: 12px;
}

#seatWorkspace .layout-type-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

#seatWorkspace .layout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#seatWorkspace .layout-grid label {
  margin: 0;
}

#seatWorkspace .layout-grid select {
  text-align: center;
  text-align-last: center;
}

#seatWorkspace .seat-command-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

#seatWorkspace .seat-command-actions button,
#seatWorkspace .seat-record-actions > button,
#seatWorkspace .seat-output-actions > button,
#seatWorkspace .seat-output-actions .seat-export-control > button {
  width: 100%;
  min-height: 38px;
  padding-inline: 4px;
  font-size: 12px;
  font-weight: 750;
  justify-content: center;
  white-space: nowrap;
}

#seatWorkspace .seat-record-actions,
#seatWorkspace .seat-output-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

#seatWorkspace .adjust-actions > .compact,
#seatWorkspace .adjust-actions > .adjust-control-card,
#seatWorkspace .adjust-actions > .search-field {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  height: 38px;
  margin: 0;
  justify-content: center;
}

#seatWorkspace .adjust-actions > .adjust-control-card {
  position: relative;
  display: flex;
  grid-column: auto;
  gap: 4px;
  align-items: center;
  border-color: var(--line);
  background: var(--surface-panel);
  cursor: pointer;
}

#seatWorkspace .adjust-actions > .adjust-control-card:hover,
#seatWorkspace .adjust-actions > .adjust-control-card:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  outline: none;
}

#seatWorkspace .adjust-control-heading {
  width: 100%;
  justify-content: center;
  gap: 4px;
}

#seatWorkspace .adjust-control-heading strong {
  font-size: 12px;
  font-weight: 750;
}

#seatWorkspace .name-size-actions,
#seatWorkspace .seat-rotation-actions,
#seatWorkspace .seat-color-options {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  z-index: 1000;
  display: none;
  width: max-content;
  min-width: 156px;
  border: var(--rule);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 36px color-mix(in srgb, var(--ink) 16%, transparent);
  padding: 10px;
  transform: translateX(-50%);
}

#seatWorkspace .adjust-control-card.is-open .name-size-actions,
#seatWorkspace .adjust-control-card.is-open .seat-rotation-actions,
#seatWorkspace .adjust-control-card.is-open .seat-color-options {
  display: grid;
}

#seatWorkspace .name-size-actions {
  grid-template-columns: 34px minmax(38px, 1fr) 34px;
  gap: 6px;
  align-items: center;
}

#seatWorkspace .seat-rotation-actions {
  grid-template-columns: repeat(4, 34px);
  gap: 6px;
}

#seatWorkspace .seat-color-options {
  grid-template-columns: repeat(2, minmax(64px, 1fr));
  gap: 8px;
}

#seatWorkspace .seat-color-option {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px;
  justify-content: center;
  color: var(--ink);
  font-size: 12px;
}

#seatWorkspace .seat-color-option input[type="color"] {
  grid-column: 1 / -1;
  width: 100%;
  height: 18px;
}

#seatWorkspace .adjust-search-item input {
  height: 38px;
  font-size: 12px;
}

#seatWorkspace .adjust-grid-item {
  touch-action: manipulation;
}

#seatWorkspace .adjust-grid-item.is-dragging,
#seatWorkspace .adjust-actions.is-reordering {
  cursor: default;
}

#seatWorkspace .adjust-actions .compact:active {
  cursor: pointer;
}

.seat-board-toolbar {
  position: relative;
  display: block;
  align-items: center;
  margin-bottom: 10px;
}

.seat-title-editor {
  justify-content: center;
  min-width: 0;
}

.seat-title-editor .class-title {
  margin: 0;
}

.seat-title-editor .workspace-title-edit-button {
  flex: 0 0 30px;
}

.seat-title-editor .workspace-title-edit-form {
  grid-template-columns: minmax(160px, 280px) 30px 30px;
}

.seat-export-control {
  position: relative;
}

.seat-utility-panel {
  padding: 12px;
}

.seat-utility-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.seat-utility-actions > button,
.seat-utility-actions .seat-export-control > button {
  width: 100%;
  min-height: 38px;
  justify-content: center;
  white-space: nowrap;
}

.seat-export-menu {
  top: calc(100% + 8px);
  bottom: auto;
  right: 0;
  width: 100%;
  min-width: 160px;
  z-index: 1000;
  box-shadow: 0 18px 36px color-mix(in srgb, var(--ink) 16%, transparent);
}

@media (min-width: 1181px) {
  .left-stack {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .student-details-panel {
    top: 16px;
  }
}

@media (max-width: 1280px) {
  #seatWorkspace {
    --seat-left-track: minmax(250px, 300px);
    --seat-center-track: minmax(0, 1fr);
    --seat-right-track: minmax(250px, 300px);
  }

  #seatWorkspace .adjust-function {
    --adjust-grid-columns: 4;
  }
}

@media (max-width: 1180px) {
  #seatWorkspace .function-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .workbench {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "board"
      "side";
  }

  .board-panel {
    min-height: 0;
  }

}

@media (max-width: 900px) {
  .smart-import-review-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .smart-import-image-stage {
    width: auto;
    max-width: 100%;
    height: min(300px, 35vh);
    justify-self: center;
  }

  .smart-import-name-pane {
    min-height: 300px;
    border-top: var(--rule-soft);
    border-left: 0;
    padding-top: 12px;
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 18px;
  }

  .brand-hero {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
  }

  .brand-copy {
    display: grid;
    gap: 6px;
    align-self: center;
  }

  .brand-copy h1 {
    font-size: 23px;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .function-bar {
    grid-template-areas:
      "commands"
      "layout"
      "adjust"
      "export";
    grid-template-columns: 1fr;
  }

  .function-block,
  .function-block:nth-child(2) {
    border-right: 0;
    border-bottom: var(--rule);
  }

  .function-block:last-child {
    border-bottom: 0;
  }

  .adjust-function {
    --adjust-grid-columns: 3;
  }

  .adjust-detail-controls {
    grid-template-columns: repeat(var(--adjust-grid-columns), minmax(0, 1fr));
  }

  .adjust-function .search-field {
    width: 100%;
  }

  .adjust-slot.is-search-slot > .search-field {
    width: 100%;
    margin: 0;
  }

  .layout-grid,
  .avoid-picker,
  .actions,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .actions.rule-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .class-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .class-info-grid .school-field {
    grid-column: 1 / -1;
  }

  .panel-head {
    display: grid;
  }

  .compact {
    width: 100%;
  }

  .seat {
    min-height: 62px;
  }

  .board-panel {
    overflow-x: auto;
  }

  .seat-board {
    min-width: 680px;
  }

  .seat-column-control {
    opacity: 0.28;
  }

  .import-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .file-button {
    width: 100%;
  }

  .modal {
    padding: 10px;
  }

  .smart-import-review-dialog {
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .smart-import-review-toolbar {
    grid-template-columns: 1fr auto;
  }

  .smart-import-review-toolbar p {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 0 12px;
  }

  .smart-import-expected-count {
    grid-column: 2;
    grid-row: 1;
  }

  .smart-import-review-toolbar #addSmartImportNameBtn {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
  }

  .smart-import-review-body {
    gap: 10px;
    padding: 10px 0;
  }

  .smart-import-image-stage {
    height: min(240px, 30vh);
  }

  .smart-import-review-list {
    grid-template-columns: 1fr;
  }

  .smart-import-name-status {
    display: none;
  }

  .smart-import-name-row {
    grid-template-columns: 34px minmax(90px, 1fr) 34px;
  }

  .smart-import-review-footer button {
    min-width: 0;
    flex: 1;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  :root.theme-dark {
    --surface: #ffffff;
    --surface-soft: #f7f7f8;
    --surface-panel: #ffffff;
    --ink: #111111;
    --muted: #555555;
    --male: #ececef;
    --female: #ffffff;
    --unknown: #ffffff;
    --rule: 1px solid #111111;
    --rule-soft: 1px solid #d8d8dc;
  }

  body {
    background: #ffffff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .page {
    width: 190mm;
    padding: 0;
  }

  .controls,
  .function-bar,
  .brand-hero,
  .notice,
  .versions,
  .modal,
  .app-toast {
    display: none;
  }

  .workbench,
  .board-panel {
    display: block;
    border: 0;
  }

  .panel {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .board-panel {
    padding: 0;
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .function-bar {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .class-title {
    margin: 0 0 7mm;
    font-size: 18pt;
    text-align: center;
  }

  .desk-line {
    width: 32%;
    margin-bottom: 5mm;
    padding: 3mm;
    background: #ffffff;
    font-size: 12pt;
    border-radius: 0;
    box-shadow: none;
  }

  .desk-bottom {
    margin-top: 5mm;
    margin-bottom: 0;
  }

  .seat-board {
    gap: var(--print-row-gap, 3mm);
  }

  .seat-row {
    gap: 9mm;
  }

  .seat-board[data-layout-type="single"] .seat-row {
    gap: 3mm;
  }

  .seat-group {
    gap: 2.5mm;
  }

  .seat {
    min-height: var(--print-seat-height, 16mm);
    padding: 2mm;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .seat-name {
    font-size: 10pt;
  }

  .seat-meta {
    font-size: 7pt;
  }

  .seat.locked {
    border-color: #111111;
    box-shadow: none;
  }

  .seat.blocked {
    border-style: dashed;
    background: #ffffff;
  }

  .seat-blocked-mark {
    color: #666666;
  }

  .seat-lock {
    display: none;
  }

  .seat-column-controls,
  .seat-column-control,
  .seat-column-action {
    display: none;
  }

  body.seat-print-mode .page {
    width: 190mm;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  body.seat-print-mode .app-shell,
  body.seat-print-mode .workspace-stage,
  body.seat-print-mode #seatWorkspace,
  body.seat-print-mode #seatWorkspace .workbench,
  body.seat-print-mode #seatWorkspace .board-panel {
    display: block !important;
  }

  body.seat-print-mode .primary-sidebar,
  body.seat-print-mode .workspace-stage > :not(#seatWorkspace),
  body.seat-print-mode #seatWorkspace > :not(.workbench),
  body.seat-print-mode #seatWorkspace .workbench > :not(.board-panel),
  body.seat-print-mode #seatWorkspace .seat-board-toolbar .no-export,
  body.seat-print-mode #seatWorkspace .board-warning-box {
    display: none !important;
  }

  body.seat-print-mode #seatWorkspace .board-panel {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
  }
}
