:root {
  --paper: #e8e5de;
  --panel: #f1eee7;
  --ink: #252a23;
  --muted: #77796f;
  --line: #c8c7bc;
  --accent: #838d59;
  --gold: #c6bb7f;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  padding: 12px 18px;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s;
}
button:hover {
  background: #303735;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: 0;
  background: #24292a;
  padding: 12px;
  outline: none;
  min-width: 0;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: #687747;
  width: 17px;
  height: 17px;
  flex: none;
}
textarea {
  resize: vertical;
  min-height: 100px;
}
p {
  line-height: 1.8;
}
small {
  font-size: 10px;
  letter-spacing: 1px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-weight: 600;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 17px;
}
a {
  color: inherit;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0;
}
.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #e9ece8;
}
.primary:hover {
  background: #191c1d;
  color: white;
}
.primary span {
  margin-left: 26px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.tag {
  display: inline-block;
  border: 1px solid #414748;
  background: #24292a;
  padding: 4px 9px;
  font-size: 10px;
  line-height: 1.6;
  margin: 3px 5px 3px 0;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.empty {
  padding: 35px 15px;
  text-align: center;
  color: var(--muted);
}
.empty > span {
  font-size: 32px;
}
.empty h3 {
  color: var(--ink);
  margin-top: 16px;
}
.empty p {
  font-size: 12px;
}
.notice {
  background: #24292a;
  padding: 17px 20px;
  font-size: 12px;
  line-height: 1.8;
  border-left: 3px solid var(--accent);
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 20px;
  font-size: 12px;
}
.field > span {
  color: var(--muted);
}
.field input,
.field textarea,
.field select {
  width: 100%;
}
[hidden] {
  display: none !important;
}
header {
  height: 144px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 3.4vw 20px;
}
.brand {
  border: 0;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand:hover {
  background: none;
}
.brand > b {
  font-size: 42px;
  letter-spacing: -3.5px;
  line-height: 0.9;
}
.brand > span {
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.6px;
  margin-top: 8px;
}
.brand > strong {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 2px;
  margin-top: 4px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 12px;
}
.session {
  font-size: 9px;
  letter-spacing: 1px;
}
.session i,
footer i {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  margin-right: 8px;
}
.header-search {
  border: 0;
  display: flex;
  gap: 9px;
  align-items: center;
}
.header-search:first-letter {
  font-size: 24px;
}
kbd {
  font: 10px monospace;
  border: 1px solid var(--line);
  padding: 2px 5px;
  color: var(--muted);
}
.profile-button {
  border: 0;
  border-left: 1px solid var(--line);
  padding-left: 25px;
}
.role-label {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 7px;
  text-align: right;
}
.workspace {
  margin: 0 3.4vw;
}
nav {
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: stretch;
  gap: 8px;
}
nav button {
  border: 0;
  padding: 19px 22px;
  position: relative;
  font-size: 13px;
  min-width: 145px;
  text-align: left;
}
nav button small {
  color: var(--muted);
  font-size: 9px;
  margin-right: 10px;
}
nav button > span {
  font-size: 10px;
  margin-left: 25px;
}
nav button.active {
  background: var(--ink);
  color: #e9ece8;
}
nav button.active small {
  color: #a6aeaa;
}
.nav-note {
  margin-left: auto;
  align-self: center;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 0 12px;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 35px 0 24px;
  min-height: 76px;
}
.section-heading small {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1.4px;
}
.section-heading h1 {
  margin: 9px 0 0;
}
.section-heading h1 > span {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  margin-left: 20px;
  font-weight: 400;
  color: var(--muted);
}
.section-heading > p {
  font-size: 11px;
  color: var(--muted);
  margin: auto 0 5px 0;
}
.section-heading > .actions,
.section-heading > button {
  margin-left: auto;
}
.archive-tools {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  font-size: 11px;
}
.searchbox {
  width: 330px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #414748;
  padding: 0 4px;
}
.searchbox input {
  border: 0;
  background: transparent;
  box-shadow: none;
  width: 100%;
  font-size: 12px;
  padding: 10px 0;
}
.searchbox > span {
  font-size: 23px;
}
.archive-tools select {
  background: transparent;
  border: 0;
  padding: 10px;
  max-width: 200px;
  font-size: 11px;
}
.archive-tools #result-count {
  color: var(--muted);
}
.tools-note {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.warehouse {
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper);
}
.warehouse-stage {
  position: relative;
  height: clamp(460px, 55vh, 720px);
  isolation: isolate;
  overflow: hidden;
}
.warehouse-surface {
  position: absolute;
  inset: 0;
  background: var(--paper);
  touch-action: pan-y;
}
.warehouse-surface canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.warehouse-topline {
  position: absolute;
  top: 24px;
  left: 26px;
  right: 26px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1.5px;
}
.warehouse-detail {
  position: absolute;
  right: 5%;
  top: 34%;
  width: 350px;
  padding: 28px 30px;
  background: transparent;
  backdrop-filter: none;
  border-top: 0;
  transition:
    opacity 0.3s,
    transform 0.5s;
}
.warehouse-number {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 2px;
}
.warehouse-title {
  font-size: 26px;
  line-height: 1.45;
  margin: 20px 0 12px;
}
.warehouse-description {
  font-size: 12px;
  color: #a6aeaa;
  line-height: 1.85;
  margin-bottom: 24px;
}
.warehouse-detail button {
  font-size: 11px;
  padding: 13px 18px;
}
.warehouse-bottom {
  position: absolute;
  bottom: 22px;
  left: 26px;
  right: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.warehouse-hint {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.6px;
}
.warehouse-pagination {
  display: flex;
  gap: 16px;
  align-items: center;
}
.warehouse-pagination button {
  width: 42px;
  height: 42px;
  padding: 0;
  background: var(--panel);
}
.warehouse-count {
  font: 10px monospace;
}
.warehouse[data-extracting="true"] .warehouse-detail {
  opacity: 0;
  transform: translateY(25px);
  pointer-events: none;
}
.warehouse[data-extracting="true"] .warehouse-pagination {
  opacity: 0;
  pointer-events: none;
}
.warehouse.inspecting .warehouse-detail,
.warehouse.inspecting .warehouse-bottom,
.warehouse.inspecting .warehouse-topline {
  opacity: 0;
  pointer-events: none;
}
.warehouse.inspecting .warehouse-stage {
  height: clamp(460px, 55vh, 720px);
}
.warehouse-fallback .warehouse-surface {
  background: url("./archive-brand.svg") 12% 50%/45% auto no-repeat;
}
.warehouse-fallback.inspecting .warehouse-surface {
  background-position: 0 50%;
  background-size: 55% auto;
}
.archive-caption {
  display: flex;
  gap: 35px;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 18px 0;
}
.archive-caption span:last-child {
  margin-left: auto;
}
.detail-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 47%;
  padding: 29px 32px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    90deg,
    rgba(234, 230, 222, 0.8),
    rgba(234, 230, 222, 0.98) 18%
  );
  animation: detail-in 0.5s both;
}
.detail-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.detail-eyebrow button {
  border: 0;
  font-size: 10px;
  padding: 7px;
}
.detail-panel h2 {
  font-size: 26px;
  margin: 0 0 9px;
  line-height: 1.3;
}
.detail-sub {
  font-size: 12px;
  margin: 0 0 20px;
}
.detail-sub span {
  font-size: 9px;
  margin-left: 18px;
  color: var(--muted);
}
.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
  gap: 24px;
  padding-top: 19px;
}
.detail-meta small {
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0.6px;
}
.detail-meta p {
  font-size: 11px;
  margin: 8px 0 20px;
}
.detail-tabs {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  padding: 0 0 12px;
}
.detail-tabs span {
  font: 9px monospace;
  color: var(--muted);
}
.detail-list {
  flex: 1;
  overflow: auto;
  min-height: 0;
}
.detail-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  font-size: 11px;
}
.detail-actions .primary {
  flex: 1;
  text-align: left;
}
.file-row {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 15px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.file-row:hover {
  background: #24292a;
}
.file-row > div {
  flex: 1;
}
.file-row b {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.7;
}
.file-row small {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  color: var(--muted);
}
.file-icon {
  border: 1px solid #414748;
  width: 33px;
  height: 39px;
  display: grid;
  place-items: center;
  font: 9px monospace;
  color: #a6aeaa;
}
.list-title {
  font-size: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.question-row {
  border-bottom: 1px solid var(--line);
}
summary {
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
.question-row summary {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
}
.question-row summary > span:first-child {
  font: 20px monospace;
  color: #a6aeaa;
}
.question-row summary > div {
  flex: 1;
}
.question-row summary b {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.7;
}
.question-row summary small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 6px;
}
.question-menu {
  display: flex;
  gap: 12px;
  padding: 8px 0 15px;
}
.question-menu button {
  font-size: 10px;
  padding: 8px 12px;
}
.results-label {
  font-size: 10px;
  margin: 20px 0;
  color: var(--muted);
}
.result-row {
  display: flex;
  width: 100%;
  gap: 20px;
  align-items: center;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  font-size: 12px;
}
.result-row b {
  font-weight: 500;
  flex: 1;
}
.result-row > span:first-child {
  font: 12px monospace;
  color: var(--muted);
}
.result-row > span:last-child {
  font-size: 10px;
}
.result-row .tag {
  font-size: 9px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 3.4vw;
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--muted);
}
footer > span:last-child {
  color: var(--ink);
}
footer b {
  margin-left: 15px;
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  position: relative;
  padding: 8vh 8vw 100px;
  gap: 6vw;
  align-items: center;
}
.login-meta {
  position: absolute;
  top: 35px;
  left: 4vw;
  display: flex;
  gap: 20px;
  align-items: center;
}
.login-meta b {
  font-size: 27px;
  letter-spacing: -2px;
}
.login-meta span {
  font-size: 9px;
  letter-spacing: 1px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.login-art {
  position: relative;
  min-height: 580px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}
.login-art > .login-card {
  position: absolute;
  top: 35px;
  left: 5%;
  width: 88%;
  max-width: 490px;
  box-shadow: -20px 22px 28px #92907c26;
  transform: perspective(900px) rotateY(-15deg) rotateX(7deg) rotateZ(-10deg);
  animation: card-float 8s ease-in-out infinite;
  mix-blend-mode: multiply;
}
.login-orbit {
  position: absolute;
  border: 1px solid #41474866;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  top: 10px;
  left: 5%;
  transform: rotateX(30deg);
}
.login-orbit:after {
  content: "";
  position: absolute;
  inset: 30px;
  border: 1px dashed #414748;
  border-radius: 50%;
}
.cross {
  position: absolute;
  font-size: 18px;
  font-weight: 300;
  color: #a6aeaa;
}
.c1 {
  left: 0;
  top: 30px;
}
.c2 {
  right: 0;
  bottom: 140px;
}
.login-word {
  font-size: 43px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 3px;
  position: relative;
  padding-top: 350px;
}
.login-word i {
  font-style: normal;
  color: #a6aeaa;
}
.login-art > small {
  font-size: 8px;
  letter-spacing: 2px;
  margin-top: 20px;
}
.login-panel {
  max-width: 420px;
  justify-self: end;
  width: 100%;
  padding-top: 25px;
}
.login-panel > small {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
}
.login-panel h1 {
  font-size: 30px;
  margin: 21px 0 30px;
}
.login-panel h1 span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 13px;
  letter-spacing: 0.3px;
}
.role-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.role-tabs button {
  flex: 1;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 12px;
}
.role-tabs button.active {
  border-bottom-color: var(--ink);
  background: #303735;
}
.login-enter {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
  padding: 16px 20px;
  font-size: 12px;
}
.prototype-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 18px;
}
.login-footer {
  position: absolute;
  left: 4vw;
  right: 4vw;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 1px;
}
.login-footer button {
  border: 0;
  font-size: 10px;
  padding: 10px;
}
.boot {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  z-index: 999;
  overflow: hidden;
}
.boot[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.boot::backdrop {
  background: var(--paper);
}
body:has(.boot[open]) {
  overflow: hidden;
}
.boot-content {
  width: min(380px, 70vw);
  text-align: center;
}
.boot-content svg {
  width: 100%;
  height: auto;
  overflow: visible;
  display: block;
}
.brand-letters {
  font-family: Arial, sans-serif;
  font-weight: 900;
  font-size: 53px;
  letter-spacing: -5px;
}
.boot p {
  font-size: 13px;
  letter-spacing: 10px;
  padding-left: 10px;
  margin: 12px 0 0;
}
.boot small {
  display: block;
  margin-top: 16px;
  font-size: 10px;
  letter-spacing: 3px;
  opacity: 0.5;
}
.boot-skip {
  position: absolute;
  right: 35px;
  bottom: 30px;
  font-size: 11px;
}
.boot-skip span {
  margin-left: 25px;
}
dialog:not(.boot) {
  border: 1px solid #414748;
  background: var(--panel);
  color: var(--ink);
  padding: 0;
  width: min(560px, 94vw);
  max-height: 90dvh;
  box-shadow: 0 25px 100px #252a2326;
}
dialog.wide {
  width: min(920px, 94vw);
}
dialog::backdrop {
  background: rgba(46, 48, 38, 0.33);
  backdrop-filter: blur(7px);
}
body:has(#modal[open]) {
  overflow: hidden;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 3;
}
.modal-head small {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.modal-head h2 {
  margin: 9px 0 0;
  font-size: 22px;
}
.modal-head .icon {
  border: 0;
  padding: 5px 10px;
  font-size: 25px;
}
.modal-body {
  padding: 28px 30px;
}
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 25px;
  font-size: 11px;
}
.modal-actions > span {
  color: var(--muted);
  font-size: 10px;
}
.sticky {
  position: sticky;
  bottom: -28px;
  background: var(--panel);
  padding: 18px 0;
  border-top: 1px solid var(--line);
  z-index: 2;
}
.profile-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.profile-info small {
  color: var(--muted);
}
.profile-info p {
  font-size: 14px;
  margin: 10px 0;
}
.role-switch {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.question-meta > span:last-child {
  margin-left: auto;
  font-size: 12px;
}
.question-text {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.95;
  margin: 25px 0;
  white-space: pre-wrap;
}
.options {
  display: grid;
  gap: 10px;
}
.option {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 18px;
  text-align: left;
  border: 1px solid var(--line);
  font-size: 13px;
  background: #24292a;
  cursor: pointer;
}
.option > span {
  display: grid;
  place-items: center;
  border: 1px solid #414748;
  width: 27px;
  height: 27px;
  font: 12px monospace;
  flex: none;
}
.option.selected,
.option:has(input:checked) {
  border-color: #414748;
  background: #24292a;
}
.option input {
  width: 14px;
  height: 14px;
}
.answer-input {
  width: 100%;
  margin: 0 0 12px;
  min-height: 50px;
}
.answer-input:is(textarea) {
  min-height: 160px;
  line-height: 1.9;
}
.answer-box {
  border-left: 3px solid var(--accent);
  background: #24292a;
  padding: 20px;
}
.answer-box small {
  font-size: 9px;
  color: var(--muted);
}
.answer-box p {
  margin: 13px 0 0;
  white-space: pre-wrap;
}
.explanation {
  margin-top: 28px;
}
.explanation p {
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 2;
}
.file-frame {
  border: 1px solid var(--line);
  width: 100%;
  height: 60dvh;
  background: #24292a;
}
.file-image {
  display: block;
  max-width: 100%;
  max-height: 65dvh;
  object-fit: contain;
  margin: auto;
}
.text-file {
  white-space: pre-wrap;
  line-height: 2.1;
  font-size: 15px;
  padding: 10px 20px 30px;
}
.download-link {
  display: block;
  text-align: center;
  padding: 15px;
  text-decoration: none;
}
.select-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 15px 0;
  font-size: 12px;
}
.select-head label {
  display: flex;
  gap: 7px;
  align-items: center;
}
.select-question {
  display: flex;
  gap: 13px;
  padding: 17px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  align-items: flex-start;
  cursor: pointer;
}
.select-question input {
  margin-top: 2px;
}
.select-question b {
  font-weight: 400;
  line-height: 1.8;
  font-size: 12px;
}
.select-question small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}
.ai-intro {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 25px;
}
.ai-symbol {
  font-size: 52px;
  color: #a6aeaa;
}
.ai-intro h3 {
  margin-bottom: 8px;
}
.ai-intro p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.ai-steps {
  padding: 0;
  display: flex;
  list-style: none;
  gap: 28px;
  margin: 35px 0;
}
.ai-steps li {
  display: flex;
  gap: 13px;
  font-size: 12px;
  flex: 1;
}
.ai-steps b {
  font-size: 26px;
  font-weight: 400;
  color: #a6aeaa;
}
.ai-steps small {
  display: block;
  line-height: 1.8;
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
}
.import-question {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.import-question b {
  font-weight: 500;
  line-height: 1.9;
}
.import-question p {
  font-size: 12px;
  color: #a6aeaa;
}
.work-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.8fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 30px 0 40px;
}
.work-stats > div {
  padding: 30px;
  border-right: 1px solid var(--line);
}
.work-stats > div:first-child {
  padding-left: 0;
}
.work-stats > div:last-child {
  border: 0;
}
.work-stats small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.work-stats strong {
  font: 56px Arial;
  letter-spacing: -3px;
  display: block;
  margin-top: 12px;
}
.stat-quote {
  font-size: 21px;
  line-height: 1.6;
  color: #a6aeaa;
}
.stat-quote small {
  margin-top: 18px;
  font-size: 8px;
  letter-spacing: 2px;
}
.work-heading {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
  padding: 0 0 18px;
  font-size: 13px;
}
.work-heading span {
  font: 10px monospace;
  color: var(--muted);
}
.assignment-row {
  display: flex;
  align-items: center;
  gap: 35px;
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
}
.assignment-number {
  font: 36px Arial;
  color: #a6aeaa;
}
.assignment-row > div {
  flex: 1;
}
.assignment-row h2 {
  font-size: 18px;
  margin: 10px 0 8px;
}
.assignment-row small {
  font-size: 10px;
  color: var(--muted);
}
.assignment-row p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.assignment-row button {
  font-size: 11px;
}
.status {
  font-size: 11px;
  border-left: 3px solid #414748;
  padding-left: 10px;
  white-space: nowrap;
}
.status.submitted {
  border-color: #414748;
}
.status.graded {
  border-color: #414748;
}
.assignment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 25px;
}
.answer-layout {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 25px;
}
.question-index {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: start;
}
.question-index small {
  font-size: 7px;
  letter-spacing: 0.6px;
  margin-bottom: 5px;
}
.question-index button {
  font: 12px monospace;
  width: 44px;
  height: 44px;
  padding: 0;
}
.question-index button.answered {
  background: #24292a;
}
.answer-question {
  border-top: 1px solid var(--line);
  scroll-margin-top: 100px;
}
.answer-question > summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
}
.answer-question > summary > span:first-child {
  font: 24px Arial;
  color: #a6aeaa;
}
.answer-question > summary > span:last-child {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.answer-question > summary b {
  font-size: 12px;
}
.answer-body {
  padding-bottom: 16px;
}
.answer-body .question-text {
  font-size: 15px;
  margin-top: 10px;
}
.grade-controls {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 15px;
  margin-top: 20px;
}
.grade-controls textarea {
  min-height: 70px;
}
.grade-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 25px;
  background: #24292a;
  margin-bottom: 25px;
}
.grade-banner > span {
  font-size: 12px;
}
.grade-banner strong {
  font-size: 32px;
  font-weight: 400;
}
.grade-banner strong small {
  font-size: 13px;
}
.grade-banner p {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 0 auto;
}
.feedback {
  background: #24292a;
  padding: 15px;
  margin-top: 20px;
  font-size: 12px;
}
.feedback p {
  margin: 8px 0 0;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
}
th {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
  padding: 15px 20px;
}
td {
  padding: 22px 20px;
  border-bottom: 1px solid var(--line);
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
  font: 9px monospace;
}
td b {
  font-weight: 500;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 15px);
  background: var(--ink);
  color: #e9ece8;
  padding: 15px 25px;
  max-width: 90vw;
  width: max-content;
  z-index: 1000;
  font-size: 12px;
  box-shadow: 0 5px 30px #0002;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@keyframes detail-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes card-float {
  0%,
  100% {
    transform: perspective(900px) rotateY(-15deg) rotateX(7deg) rotateZ(-10deg)
      translateY(0);
  }
  50% {
    transform: perspective(900px) rotateY(-11deg) rotateX(6deg) rotateZ(-8deg)
      translateY(-14px);
  }
}
@media (min-width: 1600px) {
  .workspace {
    max-width: 1600px;
    margin: auto;
  }
  header,
  footer {
    max-width: 1710px;
    margin: auto;
  }
  .warehouse-stage {
    height: 650px;
  }
}
@media (max-width: 1100px) {
  .section-heading > p {
    display: none;
  }
  .session {
    display: none;
  }
  .header-right {
    gap: 10px;
  }
  .nav-note {
    font-size: 9px;
    max-width: 170px;
    line-height: 1.7;
  }
  nav button {
    min-width: 120px;
    padding: 17px 15px;
  }
  .warehouse-detail {
    right: 3%;
    width: 310px;
  }
  .detail-panel {
    width: 51%;
    padding: 25px;
  }
  .section-heading h1 > span {
    font-size: 9px;
    letter-spacing: 1px;
    margin-left: 15px;
  }
  .login {
    padding: 110px 6vw 90px;
    gap: 5vw;
  }
  .login-word {
    font-size: 36px;
  }
  .login-art {
    min-height: 510px;
  }
  .login-word {
    padding-top: 280px;
  }
  .assignment-row {
    gap: 20px;
  }
  .status {
    font-size: 10px;
  }
}
@media (max-width: 760px) {
  header {
    height: 112px;
    padding: 24px 5vw;
  }
  .brand > b {
    font-size: 35px;
  }
  .brand > strong {
    font-size: 17px;
  }
  .brand > span {
    font-size: 7px;
  }
  .header-search span,
  .header-search kbd {
    display: none;
  }
  .header-search {
    font-size: 25px;
    padding: 10px;
  }
  .profile-button {
    padding: 8px 0 8px 13px;
    font-size: 11px;
  }
  .workspace {
    margin: 0 5vw;
  }
  nav {
    gap: 0;
  }
  nav button {
    flex: 1;
    min-width: 0;
    padding: 15px 5px;
    font-size: 12px;
    text-align: center;
  }
  nav button small {
    display: none;
  }
  nav button > span {
    margin-left: 6px;
    font-size: 8px;
  }
  .nav-note {
    display: none;
  }
  .section-heading {
    margin: 26px 0 19px;
    gap: 10px;
  }
  .section-heading h1 {
    font-size: 26px;
  }
  .section-heading h1 > span {
    display: block;
    font-size: 8px;
    letter-spacing: 1px;
    margin: 8px 0 0;
  }
  .section-heading small {
    font-size: 7px;
  }
  .section-heading button {
    font-size: 10px;
    padding: 10px;
  }
  .actions {
    gap: 5px;
  }
  .archive-tools {
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 13px;
  }
  .searchbox {
    width: calc(100% - 120px);
  }
  .archive-tools select {
    max-width: 113px;
    font-size: 10px;
  }
  .tools-note {
    display: none;
  }
  .archive-tools #result-count {
    font-size: 9px;
  }
  .warehouse-stage {
    height: 520px;
  }
  .warehouse-topline {
    left: 15px;
    right: 15px;
    top: 17px;
    font-size: 7px;
    letter-spacing: 0.5px;
  }
  .warehouse-detail {
    top: auto;
    bottom: 80px;
    left: 18px;
    right: 18px;
    width: auto;
    padding: 20px 22px;
    background: transparent;
  }
  .warehouse-title {
    font-size: 23px;
    margin: 12px 0 8px;
  }
  .warehouse-description {
    font-size: 11px;
    margin-bottom: 16px;
  }
  .warehouse-bottom {
    left: 18px;
    right: 18px;
    bottom: 19px;
  }
  .warehouse-hint {
    font-size: 8px;
    max-width: 140px;
    line-height: 1.7;
  }
  .warehouse-pagination {
    gap: 9px;
  }
  .warehouse-pagination button {
    width: 35px;
    height: 35px;
  }
  .archive-caption {
    gap: 12px;
    flex-wrap: wrap;
    font-size: 8px;
    line-height: 1.8;
  }
  .archive-caption span:last-child {
    display: none;
  }
  .warehouse.inspecting .warehouse-stage {
    height: 890px;
  }
  .detail-panel {
    top: 270px;
    bottom: 0;
    width: 100%;
    padding: 24px;
    background: rgba(235, 232, 223, 0.97);
    border-top: 1px solid var(--line);
  }
  .detail-panel h2 {
    font-size: 23px;
  }
  .detail-eyebrow {
    margin-bottom: 13px;
  }
  .detail-meta {
    gap: 15px;
  }
  .detail-meta p {
    margin-bottom: 15px;
  }
  .warehouse.inspecting .warehouse-surface {
    bottom: auto;
    height: 520px;
  }
  .detail-sub {
    margin-bottom: 14px;
  }
  .detail-actions {
    padding-top: 14px;
  }
  .detail-actions button {
    font-size: 10px;
    padding: 12px;
  }
  .warehouse-fallback .warehouse-surface {
    background-size: 85%;
    background-position: center 5%;
  }
  .warehouse-fallback.inspecting .warehouse-surface {
    background-size: 90%;
    background-position: center top;
  }
  .result-row {
    gap: 10px;
    flex-wrap: wrap;
  }
  .result-row > span:nth-child(3) {
    display: none;
  }
  footer {
    padding: 24px 5vw;
    font-size: 7px;
  }
  footer > span:nth-child(2) {
    display: none;
  }
  .login {
    display: block;
    padding: 115px 8vw 100px;
  }
  .login-meta {
    top: 30px;
    left: 8vw;
  }
  .login-art {
    display: none;
  }
  .login-panel {
    max-width: 500px;
    margin: auto;
    padding-top: 20px;
  }
  .login-panel h1 {
    font-size: 30px;
  }
  .login-footer {
    left: 8vw;
    right: 8vw;
    bottom: 20px;
  }
  .login-footer > span:nth-child(2) {
    display: none;
  }
  .login-panel .field {
    margin-bottom: 18px;
  }
  .modal-head {
    padding: 20px;
  }
  .modal-head h2 {
    font-size: 20px;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-actions {
    flex-wrap: wrap;
  }
  .two {
    gap: 12px;
  }
  .work-stats {
    grid-template-columns: repeat(3, 1fr);
    margin: 24px 0 30px;
  }
  .work-stats > div {
    padding: 23px 17px;
  }
  .work-stats strong {
    font-size: 39px;
  }
  .work-stats .stat-quote {
    display: none;
  }
  .work-stats > div:nth-child(3) {
    border: 0;
  }
  .work-stats small {
    font-size: 10px;
  }
  .assignment-row {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 13px;
    padding: 24px 0;
  }
  .assignment-number {
    font-size: 26px;
  }
  .assignment-row > div {
    grid-column: 2;
  }
  .assignment-row h2 {
    font-size: 16px;
    line-height: 1.6;
  }
  .assignment-row .status {
    grid-column: 2;
    font-size: 10px;
    justify-self: start;
  }
  .assignment-row button {
    grid-column: 2;
    justify-self: start;
    padding: 10px 15px;
  }
  .answer-layout {
    display: block;
  }
  .question-index {
    flex-direction: row;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  .question-index small {
    width: 100%;
  }
  .question-index button {
    width: 35px;
    height: 35px;
  }
  .question-text {
    font-size: 15px;
  }
  .option {
    font-size: 12px;
    padding: 12px;
    gap: 10px;
  }
  .grade-controls {
    grid-template-columns: 80px 1fr;
    gap: 10px;
  }
  .grade-banner {
    padding: 15px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .grade-banner p {
    width: 100%;
  }
  .assignment-meta {
    align-items: start;
    gap: 10px;
    font-size: 10px;
    line-height: 1.8;
  }
  .ai-steps {
    display: block;
    margin: 25px 0;
  }
  .ai-steps li {
    margin: 18px 0;
  }
  .ai-intro {
    gap: 15px;
  }
  .ai-intro h3 {
    font-size: 15px;
  }
  .sticky {
    bottom: -20px;
  }
  .file-frame {
    height: 65dvh;
  }
  .question-meta > span:last-child {
    margin-left: 0;
  }
  .profile-info {
    gap: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.schema-example {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #24292a;
  padding: 20px;
  font: 12px/1.8 monospace;
}
.login-panel .two:has(.field:only-child) {
  grid-template-columns: 1fr;
}

.dialog-toast {
  position: sticky;
  top: 90px;
  z-index: 4;
  background: #303735;
  border-bottom: 1px solid #414748;
  padding: 14px 25px;
  font-size: 12px;
  line-height: 1.8;
}

/* Keep the body scrollable independently from its header and question rail. */
#modal[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#modal .modal-head {
  position: relative;
  flex: none;
}
#modal .modal-body {
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
#modal .modal-title {
  min-width: 0;
}
#modal .modal-title h2 {
  overflow-wrap: anywhere;
}
#modal .modal-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: none;
  gap: 8px;
  margin-left: 18px;
}
#modal .viewer-fullscreen-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: linear-gradient(145deg, #24292a80, #30373580);
  box-shadow: inset 0 1px #ffffff90, 0 1px 3px #252a2310;
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}
#modal .viewer-fullscreen-toggle:hover {
  background: #24292a;
}
#modal .viewer-fullscreen-toggle:focus-visible {
  outline: 2px solid #414748;
  outline-offset: 3px;
}
#modal .viewer-fullscreen-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#modal.viewer-fullscreen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
}
#modal.viewer-fullscreen > .modal-head {
  padding-top: max(18px, env(safe-area-inset-top));
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}
#modal.viewer-fullscreen > .modal-body {
  flex: 1;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
#modal.viewer-fullscreen > .dialog-toast {
  flex: none;
}
#modal.viewer-fullscreen .file-frame {
  display: block;
  height: max(240px, calc(var(--viewer-body-height, 85dvh) - 90px));
}
#modal.viewer-fullscreen .file-image {
  max-height: max(240px, calc(var(--viewer-body-height, 85dvh) - 90px));
}
#modal.viewer-fullscreen .assignment-pdf-frame {
  display: block;
  height: max(240px, calc(var(--viewer-body-height, 85dvh) - 125px));
}
#modal.viewer-fullscreen .question-index {
  max-height: max(180px, calc(var(--viewer-body-height, 85dvh) - 60px));
}
#modal.viewer-fullscreen .photo-canvas-scroll {
  max-height: max(220px, calc(var(--viewer-body-height, 85dvh) - 205px));
}
#modal.viewer-fullscreen .pdf-paper-scroll,
#modal.viewer-fullscreen .pdf-score-panel {
  max-height: max(220px, calc(var(--viewer-body-height, 85dvh) - 205px));
}
#modal.viewer-fullscreen .pdf-paper,
#modal.viewer-fullscreen .pdf-feedback-page {
  max-width: 1100px;
}
@media (max-width: 760px) {
  #modal .modal-head-actions {
    gap: 3px;
    margin-left: 10px;
  }
  #modal .viewer-fullscreen-toggle {
    min-height: 40px;
    padding: 8px;
    gap: 5px;
  }
  #modal.viewer-fullscreen > .modal-head {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  #modal.viewer-fullscreen > .modal-body {
    padding: 16px max(14px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }
  #modal.viewer-fullscreen .pdf-score-panel {
    max-height: none;
  }
}
.question-index {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: calc(90dvh - 210px);
  overflow: auto;
  padding: 8px 0;
  background: var(--panel);
  z-index: 2;
}
.question-index button {
  flex-shrink: 0;
}
.answer-layout > div {
  min-width: 0;
}
.question-source {
  margin: 18px 0;
}
.question-source img {
  display: block;
  width: 100%;
  height: auto;
  background: #24292a;
}
.question-source figcaption {
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
}
.question-text,
.import-question b {
  white-space: pre-wrap;
}
.grading-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 18px;
  background: #24292a;
  margin-bottom: 24px;
}
.grading-toolbar b,
.grading-toolbar small {
  display: block;
}
.grading-toolbar b {
  margin-top: 6px;
}
.grading-toolbar label,
.grading-toolbar > small {
  grid-column: 1 / -1;
}
.grading-toolbar small {
  font-size: 10px;
  color: var(--muted);
}
.work-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
  margin: 25px 0;
}
.work-filters label {
  flex: 1;
  min-width: 145px;
  font-size: 11px;
}
.work-filters select,
.grading-toolbar select {
  width: 100%;
  margin-top: 8px;
}
@media (max-width: 700px) {
  .question-index {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    max-height: none;
    padding: 8px 0;
  }
  .question-index small {
    display: none;
  }
  .grading-toolbar {
    grid-template-columns: 1fr;
  }
  .grading-toolbar .actions {
    flex-wrap: wrap;
  }
  .work-filters button {
    width: 100%;
  }
}

@media (min-width: 701px) {
  .answer-layout {
    grid-template-columns: 80px 1fr;
  }
  .question-index {
    display: grid;
    grid-template-columns: repeat(2, 34px);
    gap: 8px;
  }
  .question-index small {
    grid-column: 1 / -1;
  }
  .question-index button {
    width: 34px;
    height: 36px;
  }
}

.edit-archive { float:right; margin:16px 0 8px 12px; padding:8px 12px; font-size:11px; }

/* Question bank: render only the selected page. */
.bank-tools { flex-wrap: wrap; }
.bank-tools .searchbox { flex: 1; min-width: 230px; }
.bank-size-label { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; }
.bank-row { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 24px; padding: 26px 12px; border-bottom: 1px solid var(--line, #414748); }
.bank-number { font-size: 13px; opacity: .55; padding-top: 7px; }
.bank-meta { display: flex; align-items: center; gap: 12px; }
.bank-meta small { opacity: .6; }
.bank-question h2 { font-size: 16px; font-weight: 500; line-height: 1.8; margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bank-row-actions { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.bank-row-actions button { white-space: nowrap; }
.bank-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 28px 0; border: 0; }
.bank-pagination button { min-width: 40px; padding: 10px 14px; }
.bank-pagination > span { font-size: 12px; opacity: .6; padding: 0 8px; }
.card-detail { padding: 16px; }
.card-detail > p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.card-detail > small { display: block; margin-top: 20px; opacity: .55; }
.card-detail > button:last-child { margin-top: 14px; }
.attachment-retain { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 8px 0 16px; }
.attachment-retain input { width: auto; }
.chapter-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 20px; }
.chapter-card { padding: 32px; border: 1px solid #414748; background: #24292a80; }
.chapter-card > small { font-size: 10px; letter-spacing: .15em; opacity: .6; }
.chapter-card h2 { margin: 25px 0 12px; font-size: 23px; }
.chapter-card p { min-height: 40px; line-height: 1.7; opacity: .65; }
.chapter-card button { margin-top: 20px; }
.training-progress { display: flex; justify-content: space-between; gap: 20px; padding: 0 0 20px; font-size: 13px; }
.flip-card { display: block; width: 100%; padding: 0; border: 0; background: transparent; perspective: 1400px; cursor: pointer; text-align: left; }
.flip-inner { display: grid; transform-style: preserve-3d; transition: transform .65s cubic-bezier(.2,.7,.2,1); }
.flip-card.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { grid-area: 1/1; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 310px; gap: 32px; padding: 40px; border: 1px solid #414748; background: linear-gradient(140deg,#24292a,#24292a); box-shadow: 0 14px 40px #48483a12; }
.flip-face small { font-size: 11px; letter-spacing: .15em; color: #a6aeaa; }
.flip-face > span { font-size: 23px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.flip-face em { font-size: 12px; opacity: .55; font-style: normal; }
.flip-back { transform: rotateY(180deg); background: linear-gradient(140deg,#24292a,#24292a); }
#training-files { margin-top: 20px; }
.training-complete { text-align: center; padding: 50px 10px; }
.training-complete > small { letter-spacing: .2em; opacity: .6; }
.training-complete h2 { margin-top: 25px; }
.training-complete button { margin-top: 25px; }
@media(max-width:700px) {
  .bank-row { grid-template-columns: 32px minmax(0,1fr); gap: 12px; }
  .bank-row-actions { grid-column: 2; flex-direction: row; justify-content: flex-start; }
  .bank-meta { flex-wrap: wrap; }
  .flip-face { padding: 24px; min-height: 280px; }
  .flip-face > span { font-size: 19px; }
  .chapter-grid { grid-template-columns: 1fr; }
}
@media(prefers-reduced-motion:reduce) { .flip-inner { transition: none; } }

.knowledge-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; align-items: start; padding-bottom: 32px; }
.knowledge-resource { padding: 28px; background: #24292a80; border: 1px solid var(--line); min-width: 0; }
.knowledge-resource-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.knowledge-resource-top small { letter-spacing: .1em; }
.knowledge-resource h2 { margin: 20px 0 12px; font-size: 24px; line-height: 1.4; overflow-wrap: anywhere; }
.knowledge-resource > p { color: var(--muted); line-height: 1.8; font-size: 13px; }
.knowledge-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 18px 0 22px; }
.knowledge-files { border-top: 1px solid var(--line); }
.knowledge-files .file-row { width: 100%; }
.knowledge-files .file-row > div { min-width: 0; }
.knowledge-files .file-row b { white-space: normal; overflow-wrap: anywhere; }
.knowledge-grid > .empty { grid-column: 1 / -1; }
@media(max-width:760px) { .knowledge-grid { grid-template-columns: 1fr; } .knowledge-resource { padding: 22px; } }
.material-switch { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 11px; color: var(--muted); margin-left: auto; }
.material-switch select { min-width: 86px; color: var(--ink); }
.warehouse-fallback[data-material-mode="glass"] .warehouse-surface { opacity: .7; }
@media(max-width:760px) { .material-switch { margin-left: 0; } }

/* The complete detail body scrolls, so long metadata cannot squeeze the question list away. */
.detail-panel { min-height: 0; overflow: hidden; }
.detail-body { flex: 1 1 0; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y; scrollbar-gutter: stable; padding-right: 8px; }
.detail-body .detail-list { flex: none; overflow: visible; min-height: auto; }
.detail-eyebrow, .detail-actions { flex-shrink: 0; }
.detail-actions { border-top: 1px solid var(--line); margin-top: 10px; }
.archive-tag-summary { font-size: 11px; line-height: 1.7; margin: 8px 0 16px; }
.archive-tag-summary summary span { display: block; margin-top: 4px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.archive-tag-summary[open] summary span { text-decoration: none; }
.archive-tag-summary p { margin-bottom: 0; }
.bank-tag-button { cursor: pointer; border: 1px solid transparent; margin-right: 5px; }
.bank-tag-button:hover, .bank-tag-button[aria-pressed="true"] { color: var(--ink); background: #303735; border-color: #414748; }

/* A real interactive assembly replaces the login page's flat illustration. */
.login-model { position: absolute; top: 0; left: -8%; width: 112%; height: 410px; z-index: 2; }
.login-model-canvas { width: 100%; height: 325px; }
.login-model-canvas canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.login-model-canvas canvas:active { cursor: grabbing; }
.login-model-canvas canvas:focus-visible { outline: 1px solid var(--ink); outline-offset: -4px; }
.login-model-canvas img { height: 100%; max-width: 100%; object-fit: contain; display: block; margin: auto; }
.login-model-status { text-align: center; font-size: 10px; color: var(--muted); margin: 8px 0 0; letter-spacing: 1px; }
.login-model-parts { text-align: center; font-size: 9px; color: var(--muted); margin: 6px 0 0; visibility: hidden; }
.login-model[data-exploded="true"] .login-model-parts { visibility: visible; }
.login-art .login-word { padding-top: 420px; pointer-events: none; }
.login-art .login-orbit { pointer-events: none; }
@media (max-width: 1000px) and (min-width: 761px) {
  .login-model { left: -12%; width: 120%; }
}
@media (max-width: 760px) {
  .login-art { display: block; min-height: 375px; }
  .login-model { position: relative; left: -6%; width: 112%; height: 355px; }
  .login-model-canvas { height: 275px; }
  .login-art .login-word, .login-art > small, .login-art .cross, .login-art .login-orbit { display: none; }
  .login-panel { padding-top: 15px; }
}

.login-model-help { text-align: center; font-size: 11px; letter-spacing: 1px; color: var(--ink); margin: 14px 0 0; }

.archive-description { font-size:13px; line-height:1.8; color:var(--muted); white-space:pre-wrap; overflow-wrap:anywhere; }

/* Student directory, learning records and direct conversations. */
.student-space{display:grid;grid-template-columns:270px minmax(0,1fr);gap:28px;align-items:start}
.student-space.student-self{grid-template-columns:minmax(0,1fr);max-width:1200px;margin:auto}
.student-roster-panel{border:1px solid var(--line);padding:22px 14px;position:sticky;top:24px;background:var(--panel)}
.student-roster-panel>small{display:block;font-size:10px;letter-spacing:1px;margin:0 8px 24px;color:var(--muted)}
.student-roster-panel label{display:block;font-size:12px;margin:0 8px 12px}
.student-roster-panel select,.student-roster-panel>input{width:100%;margin-top:8px;padding:12px;background:transparent;border:1px solid var(--line);color:var(--ink)}
.student-roster-panel>input{width:calc(100% - 16px);margin:0 8px}
.roster-caption{display:flex;justify-content:space-between;font-size:9px;color:var(--muted);padding:22px 8px 12px}
.student-row{display:flex;align-items:center;gap:10px;width:100%;border:0;border-top:1px solid var(--line);padding:18px 8px;text-align:left;background:transparent}
.student-row:hover,.student-row.active{background:rgba(127,140,95,.15)}
.student-avatar{display:grid;place-items:center;flex-shrink:0;width:36px;height:40px;border:1px solid var(--line);font-size:12px}
.student-row b{font-size:14px}.student-row small{display:block;font-size:10px;color:var(--muted);margin-top:5px}.student-row-metric{margin-left:auto;font:14px monospace;text-align:right}
.student-detail{min-width:0}.student-profile{display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);padding:10px 0 24px}
.student-profile small{font-size:10px;letter-spacing:2px;color:var(--muted)}.student-profile h2{font-size:30px;margin:14px 0 10px}.student-profile h2 span{font-size:13px;font-weight:400;margin-left:16px;color:var(--muted)}.student-profile p{font-size:12px;color:var(--muted);margin:0}
.student-downloads{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.student-downloads button{font-size:11px;padding:12px}
.student-tabs{display:flex;gap:28px;margin:24px 0}.student-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;padding:12px 0;font-size:13px;color:var(--muted)}.student-tabs [aria-selected=true]{color:var(--ink);border-bottom-color:var(--ink);font-weight:700}
.student-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);background:var(--panel)}.student-metrics article{padding:22px 18px;border-right:1px solid var(--line)}.student-metrics article:last-child{border:0}.student-metrics small{font-size:11px;color:var(--muted);display:block}.student-metrics strong{font-size:33px;font-weight:500;display:block;margin:14px 0}.student-metrics span{font-size:10px;color:var(--muted)}
.report-method{font-size:11px;color:var(--muted);line-height:1.8;margin:16px 0 24px}.report-two{display:grid;grid-template-columns:1fr 1fr;gap:20px}.report-card{padding:24px;border:1px solid var(--line);margin-bottom:20px;background:var(--panel);min-width:0}.report-card>small,.report-card-heading small{font-size:10px;letter-spacing:1px;color:var(--muted)}.report-card h3{font-size:18px;font-weight:500;margin:14px 0 28px}.report-bar{margin:22px 0}.report-bar>div{display:flex;justify-content:space-between;gap:12px;font-size:12px}.report-bar span{font-size:10px;color:var(--muted)}.report-bar meter{width:100%;height:8px;margin-top:10px;appearance:none;border:0;background:var(--line)}.report-bar meter::-webkit-meter-bar{background:var(--line);border:0;border-radius:0}.report-bar meter::-webkit-meter-optimum-value{background:#191c1d}.report-bar meter::-moz-meter-bar{background:#191c1d}
.submission-summary{display:flex;flex-wrap:wrap;gap:14px;font-size:11px;color:var(--muted);border-top:1px solid var(--line);padding-top:20px;margin-top:30px}.submission-summary b{color:var(--ink);margin-left:5px}.score-trend{display:flex;align-items:end;gap:18px;overflow-x:auto;padding:8px 0}.score-column{text-align:center;flex:1;min-width:60px}.score-column>b{font:18px monospace;display:block;margin-bottom:12px}.score-column>b small{font-size:10px;color:var(--muted)}.score-track{height:110px;display:flex;align-items:end;background:rgba(127,137,96,.08)}.score-track span{display:block;width:100%;background:#191c1d;min-height:2px}.score-column>small{display:block;font:10px monospace;margin-top:12px;color:var(--muted)}.score-column>span{font:9px monospace;color:var(--muted)}
.report-card-heading{display:flex;align-items:center;justify-content:space-between}.report-card-heading>span{font:10px monospace;color:var(--muted)}.report-table-scroll{overflow:auto}.report-table{width:100%;border-collapse:collapse;font-size:12px}.report-table th{text-align:left;font-size:10px;font-weight:400;color:var(--muted);padding:12px 10px;border-bottom:1px solid var(--line);white-space:nowrap}.report-table td{padding:16px 10px;border-bottom:1px solid var(--line);min-width:85px}.report-table td:first-child{min-width:160px}.report-table td small{display:block;font-size:10px;color:var(--muted);margin-top:6px}.report-table .demo-label{display:inline;margin-left:8px;border:1px solid var(--line);padding:1px 5px}.status-dot:before{content:'';display:inline-block;width:5px;height:5px;background:#191c1d;margin-right:6px}.status-dot.graded:before{background:#191c1d}.student-empty{padding:48px 16px;color:var(--muted);font-size:13px;text-align:center}
.student-chat{border:1px solid var(--line);padding:24px;background:var(--panel)}.chat-heading{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:16px}.chat-heading small{font-size:9px;letter-spacing:2px;color:var(--muted)}.chat-heading h3{margin:10px 0 0;font-size:20px}.chat-heading>span{font-size:11px;color:var(--muted)}.chat-history{height:360px;overflow:auto;overscroll-behavior:contain;padding:12px 8px}.chat-message{max-width:80%;margin:0 0 24px}.chat-message small{font-size:10px;color:var(--muted);display:block;margin-bottom:7px}.chat-message p{margin:0;padding:16px 18px;background:rgba(127,137,96,.1);font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}.chat-message.mine{margin-left:auto}.chat-message.mine small{text-align:right}.chat-message.mine p{background:#191c1d;color:#e9ece8}.student-chat form{border-top:1px solid var(--line);padding-top:22px}.student-chat form label{font-size:12px}.student-chat textarea{display:block;width:100%;margin-top:12px;padding:14px;border:1px solid var(--line);background:transparent;color:inherit;resize:vertical;font:inherit;font-size:13px;box-sizing:border-box}.student-chat form>div{display:flex;align-items:center;justify-content:space-between;margin-top:12px}.student-chat form>div span{font-size:10px;color:var(--muted)}.student-chat form button{padding:12px 20px;font-size:12px}
@media(max-width:1000px){.student-space{grid-template-columns:230px minmax(0,1fr);gap:18px}.student-metrics{grid-template-columns:1fr 1fr}.student-metrics article:nth-child(2){border-right:0}.student-metrics article:nth-child(-n+2){border-bottom:1px solid var(--line)}.report-two{grid-template-columns:1fr}.student-profile{flex-direction:column}}
@media(max-width:700px){.student-space{grid-template-columns:1fr}.student-roster-panel{position:static}.student-roster-panel #student-roster{max-height:220px;overflow:auto}.student-tabs{gap:22px}.student-profile h2{font-size:26px}.student-metrics article{padding:18px 12px}.student-metrics strong{font-size:28px}.report-card,.student-chat{padding:18px}.chat-message{max-width:92%}.score-trend{gap:12px}}

.student-row>span:nth-child(2){min-width:0;flex:1}.student-row small{line-height:1.5}.student-row-metric{flex-shrink:0;white-space:nowrap}.student-row b{white-space:nowrap}

/* Subject-bound learning assistants. */
.ai-mode{font-size:10px;letter-spacing:.5px;border:1px solid #414748;padding:9px 12px;color:#a6aeaa;white-space:nowrap}
.ai-space-intro{display:flex;gap:22px;align-items:center;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:25px 0;margin-bottom:30px}.ai-space-intro>span{font:64px/1 Georgia,serif;color:#a6aeaa}.ai-space-intro b{font-size:18px;font-weight:500}.ai-space-intro p{font-size:12px;color:var(--muted);line-height:1.7;margin:8px 0 0}.ai-space-intro>small{margin-left:auto;font:9px monospace;color:var(--muted);letter-spacing:1px}
.ai-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line)}.ai-overview article{padding:24px;border-right:1px solid var(--line)}.ai-overview article:last-child{border:0}.ai-overview small,.ai-overview span{display:block;font-size:10px;color:var(--muted)}.ai-overview b{display:block;font-size:25px;font-weight:500;margin:16px 0}.ai-overview i{font-style:normal;font-size:12px}
.ai-settings{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);gap:40px}.ai-config,.ai-policy{border:1px solid var(--line);padding:30px}.ai-config>small,.ai-policy>small{font-size:10px;letter-spacing:1px;color:var(--muted)}.ai-config h2,.ai-record-head h2{font-size:24px;font-weight:500}.ai-config>label{display:block;font-size:12px;margin-top:24px}.ai-config select,.ai-config input:not([type=checkbox]){display:block;width:100%;margin-top:10px;padding:13px;border:1px solid var(--line);background:transparent;color:var(--ink);box-sizing:border-box;font:12px monospace}.ai-config input[readonly]{background:rgba(127,137,96,.07)}.ai-field-help{display:block;margin-top:9px}.ai-key-note{display:flex;gap:12px;align-items:center;margin-top:10px;font-size:10px;color:var(--muted);line-height:1.8}.ai-key-note button{white-space:nowrap;padding:8px;font-size:10px}.ai-config fieldset{border:1px solid var(--line);padding:20px;margin:26px 0;font-size:12px}.ai-check{display:inline-flex;gap:8px;align-items:center;margin:0 18px 8px 0;cursor:pointer}.ai-config input[type=checkbox]{accent-color:#6c7953;width:15px;height:15px}.ai-config>label.ai-enabled{display:flex;margin-bottom:24px}.ai-save-caption{font-size:10px;color:var(--muted);display:inline-block;margin:12px}.ai-policy{align-self:start;background:rgba(127,137,96,.06)}.ai-policy h3{font-size:25px;font-weight:500;margin:28px 0}.ai-policy ol{padding-left:20px}.ai-policy li{padding:12px 0 12px 10px}.ai-policy b{font-size:13px}.ai-policy p{font-size:12px;color:var(--muted);line-height:1.9}.ai-policy .report-method{border-top:1px solid var(--line);padding-top:20px;margin-bottom:0}
.ai-record-head{display:flex;justify-content:space-between;align-items:center}.ai-record-head small{font:10px monospace;color:var(--muted)}.ai-record-head>span{font-size:11px;color:var(--muted)}.ai-filters{display:flex;gap:10px;align-items:center;margin:18px 0 24px;flex-wrap:wrap}.ai-filters select{border:1px solid var(--line);padding:10px 28px 10px 12px;background:transparent;font-size:12px}.ai-filters>span{margin-left:auto;font:11px monospace;color:var(--muted)}.ai-record{border-top:1px solid var(--line)}.ai-record:last-child{border-bottom:1px solid var(--line)}.ai-record summary{display:flex;align-items:center;gap:22px;padding:22px 12px;cursor:pointer;list-style:none}.ai-record summary::-webkit-details-marker{display:none}.ai-record summary:hover{background:rgba(127,137,96,.06)}.ai-record-person{min-width:105px}.ai-record-person b{font-size:13px}.ai-record small{display:block;color:var(--muted);font-size:10px;margin-top:7px}.ai-record-question{flex:1;font-size:14px;overflow-wrap:anywhere}.ai-result{font-size:10px;padding:6px 9px;border:1px solid var(--line);white-space:nowrap}.ai-result.learning{color:#a6aeaa}.ai-result.redirect{color:#a6aeaa}.ai-record-answer{padding:0 22px 24px 140px}.ai-record-answer p{font-size:13px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}
.ai-student-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:28px}.ai-teachers>small{font-size:10px;letter-spacing:.5px;color:var(--muted);display:block;margin-bottom:18px}.ai-teacher{width:100%;display:block;text-align:left;padding:24px;margin-bottom:14px;border:1px solid var(--line);background:transparent}.ai-teacher.active{background:#191c1d;color:#e9ece8;border-color:#414748}.ai-subject-number{font:10px monospace;letter-spacing:1px;opacity:.65}.ai-teacher strong{display:flex;justify-content:space-between;font-size:25px;font-weight:500;margin:24px 0 16px}.ai-teacher>span:not(:first-child){font-size:12px}.ai-teacher small{display:block;font-size:10px;opacity:.65;margin-top:12px}.ai-chat-panel{border:1px solid var(--line);padding:25px;background:rgba(250,249,242,.2)}.ai-chat-panel header{display:flex;align-items:center;justify-content:space-between;gap:15px}.ai-chat-panel header small{font:10px monospace;letter-spacing:1px;color:var(--muted)}.ai-chat-panel h2{font-size:22px;font-weight:500;margin:12px 0 20px}.ai-learning-note{font-size:11px;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:var(--muted)}.ai-history{height:380px;overflow:auto;overscroll-behavior:contain;padding:22px 4px}.ai-dialogue{margin-bottom:28px}.ai-question{max-width:86%;margin-left:auto}.ai-response{max-width:92%;margin-top:20px}.ai-history small{font-size:10px;color:var(--muted)}.ai-question small{display:block;text-align:right}.ai-history p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.9;margin:8px 0 0}.ai-question p{background:#191c1d;color:#e9ece8;padding:14px 18px}.ai-response p{padding:15px 18px;background:rgba(127,137,96,.08)}.ai-examples{border-top:1px solid var(--line);padding:16px 0}.ai-examples>small{display:block;color:var(--muted);font-size:10px;margin-bottom:10px}.ai-examples button{display:block;background:transparent;border:0;padding:6px 0;font-size:11px;text-align:left;color:#a6aeaa}.ai-chat-panel form label{font-size:12px}.ai-chat-panel textarea{width:100%;box-sizing:border-box;margin-top:10px;padding:14px;background:transparent;border:1px solid var(--line);font-family:inherit;font-size:13px;line-height:1.8;color:var(--ink);resize:vertical}.ai-chat-panel form>div{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-top:10px}.ai-chat-panel form>div>span{font-size:10px;color:var(--muted);line-height:1.8}.ai-chat-panel form button{font-size:12px;white-space:nowrap;padding:13px 18px}.ai-empty{padding:70px 15px;text-align:center;color:var(--muted)}.ai-empty>span{font:70px Georgia,serif;color:#a6aeaa}.ai-empty h2,.ai-empty h3{font-size:20px;font-weight:500}.ai-empty p{font-size:12px}
@media(max-width:1000px){.ai-settings{gap:20px;grid-template-columns:1.3fr 1fr}.ai-config,.ai-policy{padding:22px}.ai-student-layout{grid-template-columns:230px minmax(0,1fr);gap:18px}.ai-overview article{padding:18px}.ai-overview b{font-size:20px}.ai-space-intro>small{display:none}}
@media(max-width:760px){.ai-overview{grid-template-columns:1fr 1fr}.ai-overview article:nth-child(2){border-right:0}.ai-overview article:nth-child(-n+2){border-bottom:1px solid var(--line)}.ai-settings,.ai-student-layout{grid-template-columns:1fr}.ai-teachers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.ai-teachers>small,.ai-teachers>.report-method{grid-column:1/-1}.ai-teacher{padding:14px 10px;margin:0}.ai-teacher strong{font-size:18px;margin:15px 0}.ai-teacher small{line-height:1.7}.ai-subject-number{font-size:9px}.ai-record summary{gap:12px;padding:20px 0}.ai-record-person{min-width:72px}.ai-record-answer{padding:0 12px 20px}.ai-result{padding:5px;font-size:9px}.ai-chat-panel{padding:18px}.ai-config .primary{font-size:12px}.ai-history{height:340px}.ai-record-head>span{display:none}.ai-key-note{flex-direction:column;align-items:start}}

/* Picture answers and teacher pen feedback. */
.answer-images{border:1px solid var(--line);padding:18px;margin:18px 0 24px;background:rgba(127,137,96,.04)}.answer-photo-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:15px}.answer-photo-head b{font-size:12px}.answer-photo-head>span{font-size:10px;color:var(--muted);line-height:1.6}.answer-photo-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.photo-upload-button{position:relative;border:1px solid var(--line);padding:11px 14px;font-size:12px;cursor:pointer;overflow:hidden}.photo-upload-button:hover{background:rgba(127,137,96,.12)}.photo-upload-button input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.photo-upload-button:focus-within{outline:2px solid #414748;outline-offset:2px}.answer-photo-actions>small{font-size:10px;color:var(--muted);line-height:1.7;flex-basis:100%;margin:5px 0}.answer-photo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.answer-photo{margin-top:16px;min-width:0;border:1px solid var(--line);background:var(--panel)}.answer-photo-preview{padding:0;width:100%;border:0;background:white;display:block}.answer-photo-preview img{display:block;width:100%;height:185px;object-fit:contain;color:var(--muted);font-size:12px}.answer-photo-caption{display:flex;align-items:center;gap:8px;padding:10px}.answer-photo-caption>span{font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.answer-photo-caption>button{white-space:nowrap;font-size:11px;padding:8px}.photo-marked{display:block;margin:0 10px 12px;color:#f2ad9d;font-size:10px}.photo-operation-status{font-size:11px;margin:8px 0 0;color:var(--muted)}.photo-operation-status:empty{display:none}.photo-full-view img{display:block;max-width:100%;height:auto;margin:auto}.photo-full-view p{font-size:12px;text-align:center;color:var(--muted)}
.photo-editor-tools{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;position:sticky;top:0;z-index:4;background:var(--panel);border-bottom:1px solid var(--line);padding:12px 0}.photo-tool-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.photo-tool-group button{padding:10px 13px;font-size:12px}.photo-tool-group button[aria-pressed=true]{background:var(--ink);color:#e9ece8}.photo-tool-group label{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted)}.photo-tool-group select{padding:8px;border:1px solid var(--line);font-size:12px;background:transparent;color:var(--ink)}.photo-editor-help{font-size:11px;color:var(--muted);line-height:1.8}.photo-canvas-scroll{overflow:auto;max-height:62vh;border:1px solid var(--line);background:#24292a;padding:12px}.photo-canvas-scroll canvas{display:block;width:100%;height:auto;background:white;touch-action:none;cursor:crosshair}.photo-editor-footer{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:18px 0 4px;position:sticky;bottom:0;background:var(--panel);z-index:4}.photo-editor-footer span{font-size:11px;color:var(--muted)}.photo-editor-footer button{font-size:12px;padding:14px 20px}
@media(max-width:600px){.answer-photo-grid{grid-template-columns:1fr}.answer-photo-head{align-items:start;flex-direction:column;gap:8px}.photo-canvas-scroll{padding:4px;max-height:58vh}.photo-tool-group button{padding:8px;font-size:11px}.photo-editor-footer button{padding:12px;font-size:11px}.photo-editor-tools{gap:8px}}

/* Integrated assignment PDF review */
.assignment-pdf-actions{border-bottom:1px solid var(--line);padding:0 0 18px;margin-bottom:20px}.assignment-pdf-actions .actions{flex-wrap:wrap}.pdf-format{display:flex;gap:10px;align-items:center;font-size:13px}.pdf-format select{max-width:200px;padding:10px}.assignment-pdf-frame{width:100%;height:70vh;border:1px solid var(--line);margin-top:15px;background:#24292a}.pdf-review .actions{flex-wrap:wrap;margin-bottom:15px}.pdf-pen-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:var(--paper,#24292a);border:1px solid var(--line);padding:10px;position:sticky;top:0;z-index:3}.pdf-pen-tools label{display:flex;gap:6px;align-items:center;font-size:13px}.pdf-pen-tools select{padding:8px}.pdf-pen-tools button{padding:9px 13px}.pdf-pen-tools [aria-pressed=true]{background:#191c1d;color:#e9ece8}#pdf-save-status{font-size:12px;color:var(--muted)}.pdf-review-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:18px}.pdf-paper-scroll{background:#303735;max-height:64vh;overflow:auto;overscroll-behavior:contain;padding:20px}.pdf-paper{margin:0 auto 20px;max-width:900px}.pdf-paper small{display:block;padding:8px}.pdf-sheet{position:relative;background:white;box-shadow:0 2px 6px #0002}.pdf-sheet img,.pdf-sheet canvas{position:absolute;inset:0;width:100%;height:100%}.pdf-sheet canvas{touch-action:none;cursor:crosshair}.pdf-score-panel{max-height:64vh;overflow:auto;padding:4px 8px}.pdf-score-panel label{display:block;font-size:13px;margin-bottom:12px}.pdf-score-panel input,.pdf-score-panel textarea{display:block;width:100%;margin-top:7px}.pdf-score-panel textarea{min-height:75px}.pdf-feedback-page{display:block;width:100%;max-width:900px;margin:0 auto 18px}.pdf-review .modal-actions{flex-wrap:wrap;gap:14px}@media(max-width:760px){.pdf-review-layout{grid-template-columns:1fr}.pdf-score-panel{max-height:none}.pdf-paper-scroll{padding:10px;max-height:65vh}.pdf-pen-tools{position:static}.pdf-format{flex-wrap:wrap}}

/* Public learning gallery */
.login-public{display:flex;align-items:center;justify-content:space-between;width:100%;margin-top:18px;padding:18px 20px;text-align:left;border:1px solid #414748;background:#24292a4d}
.login-public b{display:block;font-size:17px;font-weight:500}.login-public small{display:block;margin-top:7px;letter-spacing:.5px;color:var(--muted)}.login-public>span:last-child{font-size:26px}
.public-page{min-height:100vh}.public-header{padding:28px 5vw;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:20px}
.public-brand{text-decoration:none;color:var(--ink);font-size:34px;font-weight:700;letter-spacing:-1px}.public-brand span{display:block;font-size:10px;font-weight:400;letter-spacing:2px;margin-top:6px}.public-header>div{display:flex;align-items:center;gap:26px}.public-visitor{font-size:12px;color:var(--muted);letter-spacing:1px}
.public-main{max-width:1500px;margin:auto;padding:0 5vw 70px}.public-hero{display:grid;grid-template-columns:1.2fr 1fr;align-items:center;min-height:370px;padding:55px 0 45px;gap:20px}.public-hero small{color:var(--muted);letter-spacing:2px}.public-hero h1{font-size:clamp(38px,4.5vw,66px);line-height:1.2;letter-spacing:-1px;margin:24px 0}.public-hero h1>span{color:var(--accent)}.public-hero p{color:var(--muted);font-size:15px;margin:0}.public-hero-mark{justify-self:center;text-align:center;color:#a6aeaa}.public-hero-mark>span{font-size:clamp(140px,19vw,250px);line-height:.9;display:block;font-weight:300;letter-spacing:-15px}.public-hero-mark small{display:block;margin-top:20px;letter-spacing:2px}
.public-section-title{display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid var(--ink);padding-top:25px}.public-section-title h2{margin:0;font-size:24px}.public-section-title h2 span{font-size:10px;letter-spacing:2px;color:var(--muted);margin-left:20px}.public-section-title>small{color:var(--muted)}
.public-filters{display:flex;align-items:center;gap:20px;padding:24px 0 30px}.public-filters .searchbox{flex:1;max-width:620px}.public-filters .searchbox input{width:100%}.public-filters select{background:transparent;border:none;border-bottom:1px solid var(--line);max-width:200px}.public-filters>span{font-size:12px;color:var(--muted);margin-left:auto;white-space:nowrap}
.public-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.public-grid>.empty{grid-column:1/-1}.public-card{border:1px solid var(--line);background:#24292a;display:flex;flex-direction:column;min-width:0}.public-card-art{padding:20px 25px;min-height:185px;display:flex;flex-direction:column;background:linear-gradient(130deg,#303735,#24292a);border-bottom:1px solid var(--line);position:relative;overflow:hidden}.public-card-art:after{content:'';position:absolute;right:-30px;top:15px;width:130px;height:130px;border:1px solid #4147484d;transform:rotate(35deg)}.public-card-art[data-theme="force"]{background:linear-gradient(130deg,#24292a,#24292a)}.public-card-art small{letter-spacing:2px;font-size:9px;color:#a6aeaa}.public-card-art strong{font-size:60px;line-height:1.3;font-weight:500;letter-spacing:-3px;margin:8px 0;color:#a6aeaa}.public-card-art[data-theme="force"] strong{font-size:49px;letter-spacing:-2px;color:#a6aeaa}.public-card-art>span{font-size:10px;letter-spacing:2px;margin-top:auto}.public-card-body{padding:25px;display:flex;flex-direction:column;flex:1}.public-card-meta{display:flex;align-items:center;justify-content:space-between;gap:14px;color:var(--muted);font-size:11px;letter-spacing:.4px}.public-card h3{font-size:21px;line-height:1.5;margin:18px 0 12px}.public-card p{color:var(--muted);font-size:13px;line-height:1.9;margin:0 0 15px}.public-card .knowledge-tags{margin-bottom:25px}.public-card .tag{background:transparent;font-size:10px}.public-read{display:flex;align-items:center;justify-content:space-between;border:0;border-top:1px solid var(--line);padding:18px 0 0;margin-top:auto;text-align:left;font-size:14px}.public-read:hover{background:transparent;color:#a6aeaa}.public-read>span{font-size:24px}
.public-footer{display:flex;justify-content:space-between;gap:20px;padding:25px 5vw;border-top:1px solid var(--line);font-size:10px;letter-spacing:1px;color:var(--muted)}.public-pagination{display:flex;align-items:center;justify-content:center;gap:20px;margin-top:28px}.public-admin-stats{display:flex;align-items:center;gap:35px;padding:20px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}.public-admin-stats>span{color:var(--muted);font-size:12px;white-space:nowrap}.public-admin-stats b{font-size:30px;color:var(--ink);margin-right:10px}.public-admin-stats p{margin:0;font-size:12px;color:var(--muted)}.public-admin-row{display:flex;align-items:center;justify-content:space-between;gap:30px;border-top:1px solid var(--line);padding:26px 0}.public-admin-row>div:first-child{max-width:650px;min-width:0}.public-admin-row .public-card-meta{justify-content:flex-start;margin-bottom:12px}.public-admin-row h2{font-size:22px;margin-bottom:10px}.public-admin-row p{font-size:13px;color:var(--muted);margin-bottom:12px}.public-admin-row small{color:var(--muted)}.public-admin-row .actions{flex-shrink:0;flex-wrap:wrap}.public-status{font-weight:400;border:1px solid var(--line);padding:4px 8px;font-size:10px}.public-status.published{color:#e9ece8;border-color:#414748;background:#24292a}.public-demo-note{font-size:12px;padding-top:15px;border-top:1px solid var(--line)}.public-lesson{max-width:900px;margin:auto}.public-lesson-intro{font-size:20px;margin-top:24px}.public-lesson-content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px;line-height:2;margin:28px 0;border-top:1px solid var(--line);padding-top:25px}.public-attachments{margin-top:30px}.public-attachments h3{display:flex;justify-content:space-between}.public-file{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;margin-top:10px;padding:20px;gap:20px}.public-file b{font-weight:500;overflow-wrap:anywhere}.public-file small{display:block;margin-top:8px;color:var(--muted)}.public-download{display:inline-block;margin-top:18px;padding:12px 20px;color:var(--ink);border:1px solid var(--line);text-decoration:none}
@media(max-width:1000px){.public-grid{gap:15px}.public-card-body{padding:18px}.public-card h3{font-size:18px}.public-admin-row{align-items:flex-start;flex-direction:column;gap:18px}.public-hero{min-height:300px}.public-hero-mark small{font-size:8px}}
@media(max-width:700px){.public-header{padding:20px 6vw}.public-header>div{gap:0}.public-header button{font-size:12px;padding:10px}.public-visitor{display:none}.public-brand{font-size:28px}.public-brand span{font-size:8px;letter-spacing:1px}.public-main{padding:0 6vw 40px}.public-hero{padding:32px 0;grid-template-columns:1fr;min-height:0}.public-hero h1{font-size:38px}.public-hero-mark{display:none}.public-hero p{font-size:13px}.public-section-title{align-items:flex-start}.public-section-title h2 span{display:block;margin:7px 0 0;font-size:8px}.public-section-title>small{font-size:9px}.public-filters{flex-wrap:wrap;gap:12px;padding:20px 0}.public-filters .searchbox{flex-basis:100%;max-width:none}.public-filters select{max-width:70%}.public-grid{grid-template-columns:1fr}.public-card-art{min-height:150px}.public-card-body{padding:23px}.public-card h3{font-size:21px}.public-footer{flex-direction:column;gap:10px}.public-admin-stats{gap:20px}.public-lesson-intro{font-size:17px}.public-lesson-content{font-size:14px}.public-file{padding:14px}}

.public-hero-mark svg{display:block;width:clamp(180px,23vw,300px);height:auto;margin:20px auto 40px}
.header-right{position:relative}.profile-menu{position:absolute;right:0;top:calc(100% + 12px);z-index:80;min-width:220px;padding:10px;background:#24292a;border:1px solid #414748;box-shadow:0 15px 45px #252a2020}.profile-menu button{display:block;width:100%;text-align:left;padding:16px;border:0;background:transparent}.profile-menu button:hover,.profile-menu button:focus-visible{background:#24292a}.token-scopes{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:20px;border:1px solid #414748;margin-bottom:22px}.token-scopes label{display:flex;align-items:flex-start;gap:10px;font-size:14px}.token-scopes input{width:18px;height:18px;flex-shrink:0;margin:2px 0}.token-list article{display:flex;justify-content:space-between;align-items:center;gap:20px;border-top:1px solid #414748;padding:18px 0}.token-list p{margin:7px 0}.token-list small{color:#a6aeaa}#token-error{color:#f2ad9d;white-space:pre-wrap;margin-bottom:14px}#token-issued:not(:empty){border:1px solid #414748;padding:20px;margin:25px 0}#token-manifest{font-family:monospace;font-size:13px;width:100%;word-break:break-all}@media(max-width:600px){.token-scopes{grid-template-columns:1fr}}

/* Keep class directories within the viewport; unread contacts move to the top. */
.student-roster-panel{max-height:calc(100dvh - 48px);display:flex;flex-direction:column;min-height:0}
#student-roster{min-height:0;max-height:55vh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin}
.unread-dot{display:inline-block;width:8px;height:8px;min-width:8px;border-radius:50%;background:#ff625b;vertical-align:middle;margin-left:7px;box-shadow:0 0 0 2px var(--panel,#eeece4)}
.section-unread:empty{display:none}
@media(max-width:700px){.student-roster-panel{max-height:420px}#student-roster{max-height:220px}}

.pwa-tools{position:fixed;left:max(12px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom));z-index:120;max-width:min(430px,calc(100vw - 24px));display:flex;flex-wrap:wrap;gap:8px;padding:8px;background:#24292af2;border:1px solid #414748;box-shadow:0 4px 20px #252a2014;font-size:12px}
.pwa-tools button{font:inherit;color:#e9ece8;background:transparent;border:1px solid #414748;padding:8px 12px;min-height:40px;cursor:pointer}
.pwa-tools p{flex-basis:100%;margin:4px 6px;line-height:1.6}.pwa-tools[data-offline=true]{border-color:#414748}
.pwa-install-help{max-width:470px;padding:28px;background:#24292a;color:#e9ece8;border:1px solid #414748}.pwa-install-help p{line-height:1.8}.pwa-install-help button{padding:12px 25px;background:#191c1d;color:#e9ece8;border:0}.pwa-install-help::backdrop{background:#191c1d44}
.install-page{margin:0;background:#24292a;color:#e9ece8}.install-sheet{max-width:760px;padding:48px 24px 150px;margin:auto}.install-sheet>small{display:block;letter-spacing:2px;margin-top:18px}.install-sheet h1{font-size:clamp(34px,5vw,58px);line-height:1.2}.install-sheet h2{font-size:22px;margin-top:40px;border-top:1px solid #414748;padding-top:24px}.install-sheet p,.install-sheet li{line-height:1.9}.install-sheet li{margin:12px 0}.install-sheet .primary{display:inline-block;text-decoration:none;padding:16px 25px;background:#191c1d;color:#e9ece8}.install-sheet details{margin:28px 0}.app-loading{padding:10vh 8vw;color:#a6aeaa}
@media(display-mode:standalone){body{padding-top:env(safe-area-inset-top)}.login-footer,footer{padding-bottom:max(24px,env(safe-area-inset-bottom))}}

/* Stable section tabs: fixed single-line cells, independent of active marker. */
nav[aria-label="功能分区"] { gap:0; overflow-x:auto; align-items:stretch; }
nav[aria-label="功能分区"] > button { flex:1 0 138px; min-width:138px; height:64px; box-sizing:border-box; display:flex; align-items:center; justify-content:flex-start; gap:12px; white-space:nowrap; padding:0 18px; }
nav[aria-label="功能分区"] > button small { flex-shrink:0; margin:0; }
nav[aria-label="功能分区"] > button > span:last-child { flex-shrink:0; width:12px; margin-left:auto; text-align:center; }
nav[aria-label="功能分区"] .section-unread { position:absolute; right:10px; top:9px; margin:0; }
.delete-link { color:#f2ad9d; font-size:12px; padding:9px 12px; }
button.danger { background:#402c29; color:white; border-color:#a16e60; }

/* Compact update control: only a small icon occupies the page until opened. */
.pwa-tools{display:block;width:36px;height:36px;max-width:none;padding:0;border:0;background:transparent;box-shadow:none}
.pwa-tools .pwa-icon{position:relative;display:grid;place-items:center;width:36px;height:36px;min-height:36px;padding:8px;border:1px solid #414748;border-radius:50%;background:#24292ae8;box-shadow:0 2px 8px #252a2014}
.pwa-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.pwa-dot,.pwa-offline-dot{position:absolute;right:0;top:0;width:8px;height:8px;border:1px solid #414748;border-radius:50%;background:#402c29}.pwa-offline-dot{background:#191c1d}
.pwa-popover{position:absolute;bottom:46px;left:0;width:min(280px,calc(100vw - 24px));padding:16px;background:#24292a;border:1px solid #414748;box-shadow:0 6px 24px #252a201c}.pwa-popover[hidden]{display:none}
.pwa-popover button{margin:4px 5px 0 0}.pwa-popover p{margin:8px 0;line-height:1.6}.pwa-popover b{font-size:13px}.pwa-notice:empty{display:none}
.pwa-confirm-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}
@media(pointer:coarse){.pwa-tools,.pwa-tools .pwa-icon{width:44px;height:44px}.pwa-popover{bottom:54px}}
.ai-connection-test{margin-top:18px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.ai-test-result{white-space:pre-wrap;line-height:1.6}.ai-result.error{color:#f2ad9d}

.pwa-recovery{display:block;margin-top:10px;font-size:12px;color:var(--muted);text-decoration:underline;text-underline-offset:3px}

.pwa-icon.has-update svg{animation:pwa-update-turn 2s linear infinite;transform-origin:center}
@keyframes pwa-update-turn{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.pwa-icon.has-update svg{animation:none}}

/* Archive controls sit in a shallow metal tray beside, never above, the title. */
.archive-title-row{display:flex;align-items:flex-start;gap:20px;margin:24px 0 12px;flex-wrap:wrap}
.detail-panel .archive-title-row h2{flex:1 1 180px;margin:0;overflow-wrap:anywhere}
.archive-tool-tray{display:flex;align-items:center;gap:7px;padding:6px;border:1px solid #414748;border-radius:10px;background:linear-gradient(145deg,#303735,#24292a);box-shadow:inset 0 1px 3px #625e5426,0 1px 0 #fff9;flex-shrink:0;margin-left:auto}
.archive-tool-tray .archive-tool{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 13px;border:1px solid #414748;border-radius:6px;background:linear-gradient(#24292a,#24292a);color:#e9ece8;font-size:12px;line-height:1.2;box-shadow:inset 0 1px 0 #fff,0 2px 1px #77716530;transition:transform .12s,box-shadow .12s,background .12s}
.archive-tool svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.archive-tool-tray .archive-tool:hover{background:linear-gradient(#24292a,#24292a);transform:translateY(-1px);box-shadow:inset 0 1px 0 #fff,0 3px 3px #77716530}
.archive-tool-tray .archive-tool:active{transform:translateY(1px);box-shadow:inset 0 2px 3px #77716535}
.archive-tool-tray .archive-tool:focus-visible{outline:2px solid #414748;outline-offset:3px}
.archive-tool-tray .archive-tool-delete{width:42px;padding:10px;color:#a6aeaa;background:linear-gradient(#24292a,#303735)}
.archive-tool-tray .archive-tool-delete:hover{color:#f2ad9d;background:linear-gradient(#402c29,#24292a)}
.archive-tool-divider{height:23px;width:1px;background:#303735;box-shadow:1px 0 #fff8}
@media(max-width:600px){.archive-title-row{gap:14px}.archive-tool-tray{margin-left:0}.detail-panel .archive-title-row h2{flex-basis:100%}}
.daily-material{border:1px solid var(--line,#414748);padding:clamp(20px,4vw,42px);margin:24px 0;background:#24292a2e}
.daily-material header{padding-bottom:18px;border-bottom:1px solid #414748}.daily-material header small{color:#a6aeaa;letter-spacing:.06em}.daily-material h2{margin:12px 0}
.daily-question{padding-top:20px}.daily-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}.daily-options{padding-left:28px;line-height:1.8}.daily-options li{padding:8px 12px;border-bottom:1px solid #414748;white-space:pre-wrap}
.daily-answer{margin-top:24px;border-left:3px solid #414748;padding:20px 24px;background:#191c1d0c}.daily-answer small{color:#a6aeaa;letter-spacing:.12em}
.daily-notice{padding:16px 20px;background:#191c1d0e;border-left:2px solid #414748;line-height:1.7}.daily-preview{border:1px solid #414748;padding:16px;margin:18px 0}.daily-preview summary{cursor:pointer}
.recipient-field{border:1px solid #414748;padding:16px;margin:20px 0;min-width:0}.recipient-field legend{padding:0 8px;font-size:13px}.recipient-field>input{width:100%;margin-bottom:12px}.recipient-list{max-height:260px;overflow:auto;overscroll-behavior:contain}.recipient-list label{display:flex;align-items:center;gap:10px;padding:10px 6px;border-bottom:1px solid #4147484d}.recipient-list label[hidden]{display:none}.recipient-list small{display:block;color:#a6aeaa;font-size:11px;margin-top:5px}.recipient-list input[type=checkbox]{width:17px;height:17px;flex-shrink:0}
.ai-scope-table{width:100%;border-collapse:collapse;font-size:13px}.ai-scope-scroll{max-height:340px;overflow:auto;border:1px solid #414748}.ai-scope-table th{position:sticky;top:0;background:#24292a;z-index:1;text-align:left}.ai-scope-table td,.ai-scope-table th{padding:12px;border-bottom:1px solid #414748}.ai-scope-table td small{display:block;color:#a6aeaa;margin-top:5px}.ai-scope-table select{min-width:130px}.ai-access-help{line-height:1.7;color:#a6aeaa}.ai-config-entry{margin-left:auto}
.daily-material>header{display:block;position:static;height:auto;min-height:0;width:auto;margin:0;padding:0 0 18px;background:none;gap:0}
.daily-material>header h2{font-size:24px;line-height:1.4;overflow-wrap:anywhere}
.daily-study-note{color:#a6aeaa;line-height:1.6;margin:-12px 0 24px;font-size:13px}

/* Archive sea fills the workspace below navigation; controls float above it. */
#app.is-archive-workspace{min-height:100svh;display:flex;flex-direction:column}
#app.is-archive-workspace>header{flex-shrink:0;width:100%}
#app.is-archive-workspace>.workspace{flex:1;display:flex;flex-direction:column;margin:0;max-width:none;width:100%;min-height:0}
#app.is-archive-workspace>.workspace>nav{flex-shrink:0;margin:0 3.4vw}
#app.is-archive-workspace>footer{display:none}
#content.archive-immersive{flex:1;position:relative;min-height:560px;isolation:isolate}
.archive-immersive>.warehouse{position:absolute;inset:0;border:0;z-index:0}
.archive-immersive .warehouse-stage,.archive-immersive .warehouse.inspecting .warehouse-stage{height:100%}
.archive-immersive::before{content:"";position:absolute;inset:0 0 auto;height:190px;background:linear-gradient(#24292aeb,#24292a85 65%,transparent);pointer-events:none;z-index:1}
.archive-immersive>.section-heading{position:absolute;top:24px;left:3.4vw;right:3.4vw;margin:0;min-height:0;z-index:3;pointer-events:none;gap:16px}
.archive-immersive>.section-heading h1{font-size:26px;margin-top:5px}
.archive-immersive>.section-heading>p{display:none}
.archive-immersive>.section-heading .actions{pointer-events:auto;display:flex;gap:10px}
.archive-immersive>.section-heading .actions>button:not(.primary){background:#24292adc;backdrop-filter:blur(10px)}
.archive-immersive>.archive-tools{position:absolute;top:105px;left:3.4vw;right:3.4vw;margin:0;z-index:3;gap:12px;pointer-events:none;flex-wrap:wrap}
.archive-immersive>.archive-tools>*{pointer-events:auto;background:#24292ade;border:1px solid #41474899;backdrop-filter:blur(10px);box-shadow:0 3px 14px #252a2308}
.archive-immersive>.archive-tools .searchbox{width:min(340px,38vw);padding:0 12px}
.archive-immersive>.archive-tools #result-count{background:transparent;box-shadow:none;border:0;backdrop-filter:none;pointer-events:none}
.archive-immersive>.archive-tools .material-switch{margin-left:auto;padding:0 12px}
.archive-immersive .warehouse-topline{display:none}
.archive-immersive .warehouse-detail{top:auto;bottom:100px;right:3.4vw;padding:22px;width:min(350px,38vw);text-shadow:0 1px 14px #f1eee7}
.archive-immersive .warehouse-title{margin:14px 0 10px}
.archive-immersive .warehouse-description{margin:0 0 20px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.archive-immersive .warehouse-bottom{left:3.4vw;right:3.4vw;bottom:26px}
.archive-immersive .warehouse-hint{padding:8px 12px;background:#24292ab3;backdrop-filter:blur(8px)}
.archive-immersive .warehouse-pagination{padding:7px;background:#24292ab3;backdrop-filter:blur(8px)}
.archive-immersive>.archive-caption{display:none}
.archive-immersive>#search-results:not(:empty){position:absolute;z-index:4;top:164px;left:3.4vw;width:min(560px,50vw);max-height:calc(100% - 245px);overflow:auto;overscroll-behavior:contain;padding:16px;background:#24292aed;backdrop-filter:blur(16px);border:1px solid var(--line);box-shadow:0 12px 35px #252a2314}
.archive-immersive .result-row{gap:10px}
.archive-immersive .result-row>span:nth-child(3){display:none}
.archive-immersive:has(.warehouse.inspecting)::before,
.archive-immersive:has(.warehouse.inspecting)>.section-heading,
.archive-immersive:has(.warehouse.inspecting)>.archive-tools,
.archive-immersive:has(.warehouse.inspecting)>#search-results{visibility:hidden;pointer-events:none}
@media(max-width:850px){
 .archive-immersive>.section-heading h1>span{display:none}
 .archive-immersive>.archive-tools{gap:8px;top:100px}
 .archive-immersive>.archive-tools .searchbox{width:calc(60% - 8px)}
 .archive-immersive>.archive-tools>select{max-width:38%}
 .archive-immersive>.archive-tools .material-switch{margin-left:0}
 .archive-immersive .warehouse-detail{width:min(340px,55vw);bottom:100px}
 .archive-immersive .warehouse-hint{max-width:42%;font-size:9px;line-height:1.6}
 .archive-immersive>#search-results:not(:empty){top:200px;width:calc(100% - 6.8vw);max-height:calc(100% - 280px)}
}
@media(max-width:650px){
 #content.archive-immersive{min-height:660px}
 .archive-immersive>.section-heading{top:20px}
 .archive-immersive>.section-heading h1{font-size:23px}
 .archive-immersive>.section-heading small{font-size:7px}
 .archive-immersive>.section-heading .actions{gap:6px}
 .archive-immersive>.section-heading .actions>button{padding:11px;font-size:11px}
 .archive-immersive .warehouse-detail{width:80%;padding:15px;bottom:95px;right:3.4vw}
 .archive-immersive .warehouse-title{font-size:24px}
 #content.archive-immersive:has(.warehouse.inspecting){min-height:940px}
 .archive-immersive .warehouse.inspecting .warehouse-surface{height:420px}
 .archive-immersive .detail-panel{top:340px;padding:24px 5vw}
}

/* Full-size question sheets remain legible before opening the pen editor. */
.handwriting-answer .answer-photo-grid{grid-template-columns:minmax(0,1fr)}
.handwriting-answer .answer-photo-preview img{height:auto;max-height:520px;object-fit:contain}
.handwriting-answer .answer-photo-preview{cursor:crosshair}
.legacy-answer{padding:12px 16px;border-left:2px solid var(--line);white-space:pre-wrap}

/* Portable question selection tray */
#question-cart{position:fixed;right:26px;bottom:30px;z-index:90;width:72px;height:78px;padding:10px 8px;border:1px solid #414748;border-radius:17px;background:linear-gradient(145deg,#24292a,#303735);color:#e9ece8;box-shadow:inset 1px 1px 0 #fff9,inset -1px -2px 2px #7b80653b,0 7px 20px #20251b30;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;cursor:grab;touch-action:none;user-select:none}
#question-cart:active{cursor:grabbing}#question-cart svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.5;pointer-events:none}#question-cart span{font-size:12px;letter-spacing:.06em;pointer-events:none}#question-cart b{position:absolute;right:-5px;top:-6px;min-width:23px;height:23px;padding:2px 5px;border-radius:20px;background:#191c1d;color:#e9ece8;font:12px/19px monospace;pointer-events:none}
#question-cart:focus-visible{outline:3px solid #414748;outline-offset:4px}.bank-row.in-question-cart{background:#191c1d0c;box-shadow:inset 3px 0 #758160}.cart-select[aria-pressed="true"]{background:#24292a;border-color:#414748;color:#e9ece8}.cart-summary{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}.cart-summary span{font-size:13px;color:#a6aeaa}#cart-items{max-height:36vh;overflow:auto;overscroll-behavior:contain;border-block:1px solid #b7b9ab;margin-bottom:24px}.cart-item{display:flex;align-items:center;gap:16px;padding:16px 4px;border-bottom:1px solid #414748}.cart-item>div:first-of-type{flex:1;min-width:0}.cart-item b{font-size:16px;overflow-wrap:anywhere}.cart-item p{font-size:12px;color:#a6aeaa;margin:6px 0 0}.cart-item-actions{display:flex;gap:6px}.cart-item-actions button{padding:8px 10px;font-size:12px}.cart-empty{padding:20px 8px;color:#a6aeaa}.bank-pagination{padding-right:90px}@media(max-width:600px){#question-cart{right:16px;bottom:20px;width:64px;height:68px}.cart-item{gap:8px}.cart-item-actions{flex-direction:column}}
/* Nine student sections remain discoverable on landscape tablets. */
nav[aria-label="功能分区"][data-count="9"]>button{flex-basis:104px;min-width:104px;font-size:12px;padding:0 10px;gap:6px}

/* Compact attachment management beside each solution file. */
.explanation-file-item{display:flex;align-items:center;gap:12px;border-bottom:1px solid #414748}
.explanation-file-item .file-row{flex:1;min-width:0;border-bottom:0}
.explanation-file-item .file-row b{overflow-wrap:anywhere}
.solution-file-delete{flex:none;width:36px;height:36px;padding:0;border:1px solid #414748;border-radius:50%;background:linear-gradient(#24292a,#24292a);box-shadow:0 2px 3px #292b2114,inset 0 1px #ffffffaa;color:#f2ad9d;font-size:23px;line-height:1;cursor:pointer}
.solution-file-delete:hover{background:#402c29;border-color:#a16e60}
.solution-file-delete:focus-visible{outline:2px solid #a16e60;outline-offset:3px}
/* Read-only, device-local material reader. Always fills the tablet viewport. */
dialog.local-reader:not(.boot){position:fixed;inset:0;width:100%;max-width:none;height:100vh;height:100dvh;max-height:none;box-sizing:border-box;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:var(--paper,#24292a);color:#e9ece8}.local-reader>header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;padding:14px 24px;background:#24292a;border-bottom:1px solid #414748;z-index:1}.local-reader h2{font-size:22px;margin:0}.local-reader-content{padding:22px;overflow:auto;height:calc(100% - 70px)}.local-tabs,.local-page-tools{display:flex;gap:12px;align-items:center;margin:16px 0}.local-reader button{padding:12px 18px;border:1px solid #414748;background:#24292a;color:#e9ece8;cursor:pointer}.local-tabs [aria-pressed=true]{background:#191c1d;color:white}.local-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}.local-grid button{text-align:left;overflow-wrap:anywhere;display:flex;flex-direction:column;gap:14px}.local-document img,.local-document canvas{display:block;max-width:100%;height:auto;margin:auto}.local-document iframe{width:100%;height:75vh;border:0}.local-reader pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}.local-question{padding:20px 0;border-bottom:1px solid #414748}.local-reader a{display:inline-block;padding:18px}.local-status{color:#f2ad9d}

/* Mixed question body and bottom answer workbench */
.question-code {white-space:pre;overflow-x:auto;padding:20px;border:1px solid #414748;background:#24292a;font:16px/1.85 ui-monospace,monospace;tab-size:4;color:#e9ece8}
.structured-answer {margin-top:28px;border-top:2px solid #414748;padding:20px 0}
.structured-answer header {display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;margin-bottom:22px}
.answer-part {margin:20px 0}.answer-part>b {display:block;margin:0 0 12px}.answer-part textarea {width:100%;min-height:120px;font-size:18px}
.token-answer-line {display:flex;align-items:baseline;gap:8px;width:100%;min-height:64px;text-align:left;border:0;border-bottom:2px solid #414748;background:#24292a;padding:14px;font:19px/1.6 ui-monospace,monospace;overflow-wrap:anywhere}
.token-answer-line em{margin-left:auto;font:12px sans-serif;color:#a6aeaa;flex-shrink:0}.token-answer-line:disabled{opacity:1;color:inherit}.token-answer-line small{font:inherit}
.part-options {display:grid;gap:10px}.part-options button{display:flex;gap:15px;text-align:left;align-items:baseline;border:1px solid #414748;background:#24292a;padding:14px;font-size:17px;white-space:pre-wrap}.part-options button[aria-pressed=true]{background:#191c1d;color:white;border-color:#414748}.part-options button:disabled{opacity:1}
.token-panel{position:sticky;bottom:0;z-index:9;background:#24292a;border:1px solid #414748;box-shadow:0 -8px 24px #252a2320;padding:16px;border-radius:16px 16px 0 0;max-height:55vh;overflow:auto}.token-panel[hidden]{display:none}
.token-panel-head,.token-tools{display:flex;justify-content:space-between;gap:12px;align-items:center}.token-panel button{touch-action:manipulation;min-height:44px}.token-keys{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.token-keys button{min-width:44px;padding:8px 13px;background:#24292a;border:1px solid #414748;border-radius:6px;box-shadow:0 2px 0 #a9b39b;font:18px ui-monospace,monospace}.token-keys button:active{transform:translateY(2px);box-shadow:none}.token-sequence{display:flex;flex-wrap:wrap;align-items:center;max-height:100px;overflow:auto}.token-sequence button{min-width:14px;padding:0;background:transparent;border:0;color:#e9ece8}.token-sequence button.active{color:#a6aeaa;background:#24292a}.token-sequence span{font:18px monospace}.structured-photo-help{background:#24292a;padding:14px;line-height:1.8}

.token-expression{display:block;background:#24292a;padding:12px;margin-top:12px;font:18px/1.6 ui-monospace,monospace;overflow-wrap:anywhere}.part-editor{margin:16px 0;padding:16px;border:1px solid #414748;display:grid;grid-template-columns:1fr 1fr;gap:14px}.part-editor label{display:flex;flex-direction:column;gap:8px}.part-editor label[hidden]{display:none}.part-editor textarea{min-height:100px}.part-editor input,.part-editor select,.part-editor textarea,#layout-editor>label textarea{width:100%;font-size:16px}#layout-editor>label{display:block}@media(max-width:600px){.part-editor{grid-template-columns:1fr}}

.publish-file-list{max-height:280px;overflow-y:auto;border:1px solid #414748;padding:8px 16px;scrollbar-width:thin}.publish-file-list .select-question span{overflow-wrap:anywhere}.publish-file-tools{display:flex;gap:12px;margin:10px 0}

/* The offline reader owns the viewport; do not inherit the generic dialog size. */
dialog.local-reader[open]{display:flex;flex-direction:column}
body:has(dialog.local-reader[open]){overflow:hidden}
.local-reader>header{position:relative;flex:0 0 auto;height:auto;min-height:64px;box-sizing:border-box;gap:16px;padding:10px max(20px,env(safe-area-inset-right)) 10px max(20px,env(safe-area-inset-left))}
.local-reader-content{flex:1 1 auto;min-height:0;height:auto;box-sizing:border-box;overscroll-behavior:contain;padding:clamp(14px,3vw,32px);padding-bottom:max(24px,env(safe-area-inset-bottom))}
.local-reader .local-document{width:100%;min-width:0}
.local-reader .local-document iframe{height:calc(100dvh - 220px);min-height:360px}
.local-reader [data-close]{display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;padding:0;font-size:24px;line-height:1;border-radius:50%}
.local-reader .local-page-tools{position:sticky;top:-1px;z-index:1;justify-content:center;background:var(--paper,#24292a);padding:8px;margin:8px 0 16px}

.question-image-status{display:block;padding:14px;margin:8px 0;color:#a6aeaa;background:#24292a;border:1px dashed #414748;font-size:13px;line-height:1.6}
.question-index button.has-mistake,.question-index button.has-mistake.answered{color:#f2ad9d;background:#402c29;border-color:#a16e60;font-weight:700;box-shadow:inset 0 -3px #bb5647}
.answer-question.has-mistake>summary{color:#f2ad9d;border-left:3px solid #a16e60;padding-left:12px}
.answer-question.has-mistake .option.selected,.answer-question.has-mistake .legacy-answer{border-color:#a16e60;background:#402c29;color:#f2ad9d}
.structured-answer .answer-part-wrong{border:1px solid #a16e60;border-left:4px solid #a16e60;background:#402c29;padding:14px;color:#f2ad9d}
.answer-part-wrong .token-answer-line,.answer-part-wrong textarea,.answer-part-wrong .part-options [aria-pressed=true]{color:#f2ad9d!important;border-color:#a16e60!important;background:#402c29!important;opacity:1}
.answer-part-wrong .token-answer-line:disabled{opacity:1}
.part-grade-note{font-size:13px;line-height:1.6;margin:12px 0 0;color:#a6aeaa}.answer-part-wrong .part-grade-note{color:#f2ad9d}
.part-grade-control{display:flex;align-items:center;gap:12px;margin-top:12px;font-size:13px}.part-grade-control select{width:auto;min-width:120px;padding:8px;background:#24292a;border:1px solid #414748}
.student-downloads .student-chat-toggle{margin-left:auto;min-width:132px;border-radius:24px;border:1px solid #414748;background:#24292a;color:#e9ece8;display:inline-flex;align-items:center;justify-content:center;gap:9px;white-space:nowrap}
.student-chat-toggle::before{content:'';width:9px;height:9px;border-radius:50%;background:#191c1d;box-shadow:0 0 0 3px #647d431b}
.student-chat-toggle.is-blocked{background:#24292a;border-color:#a16e60;color:#f2ad9d}.student-chat-toggle.is-blocked::before{background:#402c29;box-shadow:0 0 0 3px #b66c501b}
.chat-permission-note{color:#f2ad9d;font-size:14px}

dialog.submission-confirm{width:min(520px,calc(100vw - 32px));max-height:90dvh;overflow:auto;margin:auto;padding:32px;border:1px solid #414748;background:#24292a;color:#e9ece8;box-shadow:0 24px 90px #10170f44;border-radius:16px}
.submission-confirm::backdrop{background:#191c1d70;backdrop-filter:blur(5px)}
.submission-confirm h2{font-size:25px;margin:14px 0}.submission-confirm-name{font-weight:600}.submission-confirm-count{padding:16px;background:#24292a;border-radius:8px}.submission-confirm .actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.submission-confirm button{padding:14px 20px}
.grading-answer-sheet pre{white-space:pre-wrap;overflow-wrap:anywhere;font:500 21px/1.7 ui-monospace,monospace;margin:14px 0;color:inherit}.grading-answer-sheet>small{color:#a6aeaa}.grading-answer-sheet .answer-part{padding:20px 0}.grading-answer-sheet .answer-part pre{background:#24292a;padding:14px 18px;border-radius:6px}

/* Lightweight class → assignment → answer-sheet navigation. */
.work-space{display:grid;grid-template-columns:210px minmax(0,1fr);gap:28px}.work-class-panel{border-right:1px solid #414748;padding-right:18px}.work-class-list{display:flex;flex-direction:column;gap:8px;max-height:65vh;overflow:auto;margin-top:18px}.work-class-list button{text-align:left;flex:none}.work-class-list button[aria-pressed=true]{background:#191c1d;color:#e9ece8}.work-list-tools,.work-pager{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 24px}.work-pager{justify-content:flex-end;margin-top:22px}.work-list-tools b{margin-right:auto}.work-group-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:18px}.work-group-card{display:block;text-align:left;padding:24px;background:#24292a;border:1px solid #414748;min-height:210px}.work-group-card:hover{border-color:#414748;box-shadow:0 5px 18px #252b2310}.work-group-card h2{font-size:22px;margin:16px 0}.work-group-card>div{display:flex;gap:18px;margin:22px 0}.work-group-card>div span{font-size:12px;color:#a6aeaa}.work-group-card>div b{display:block;font-size:24px;color:#e9ece8}.work-group-card>strong{font-size:14px}.work-main{min-width:0}.work-main .assignment-row{display:flex;flex-wrap:wrap;gap:16px}.work-main .assignment-row>div{flex:1;min-width:200px}@media(max-width:800px){.work-space{grid-template-columns:1fr}.work-class-panel{border:0;padding:0}.work-class-list{flex-direction:row;max-height:none;overflow:auto;margin:10px 0}.work-group-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}}

/* Courseware controls share the application's existing buttons and color tokens. */
.classroom-panel{padding:16px;margin-bottom:16px;background:var(--surface,#191e1d);border:1px solid var(--border,#353c39);border-radius:8px}
.classroom-actions,.classroom-options{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.classroom-actions{margin-bottom:12px}.classroom-actions [role=status]{flex:1;min-width:120px;font-size:14px}.classroom-panel button{min-height:40px;font-size:14px}.classroom-options details{width:100%}.classroom-options summary{cursor:pointer;min-height:44px;display:flex;align-items:center}.classroom-options details button,.classroom-options input{margin:4px}.classroom-panel button[aria-pressed=true]{border-color:var(--accent,#d7bd80);color:var(--accent,#d7bd80)}.classroom-panel input{max-width:100%;box-sizing:border-box}@media(max-width:640px){.classroom-panel{padding:12px}.classroom-panel button{min-height:44px}}

.classroom-options>span{flex:1;min-width:120px}.classroom-options details{width:auto}.classroom-options details[open]{flex-basis:100%;order:2}.classroom-options summary::after{content:"⌄";margin-left:10px}.classroom-options details[open] summary::after{content:"⌃"}

/* Two-pixel row tracks pack varying lesson heights without changing reading order. */
@media(min-width:761px){#student-knowledge{grid-auto-rows:2px;row-gap:0;padding-bottom:10px}}
#knowledge-pagination .work-pager{margin-top:0}

.ui-icon{display:inline-block;width:1.15em;height:1.15em;flex-shrink:0;vertical-align:-.18em;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.file-row>span:last-child .ui-icon{width:18px;height:18px}.file-row>span:last-child{color:var(--muted)}

.ui-date-picker{width:360px!important;box-sizing:border-box;overscroll-behavior:contain}.ui-date-selected{font-size:20px;font-variant-numeric:tabular-nums;color:#e5c58d;margin:12px 0}.ui-date-shortcuts{display:flex;gap:8px}.ui-date-shortcuts button{flex:1;font-size:13px;min-height:38px}.ui-date-picker .ui-calendar-days button{min-height:38px}.ui-time-controls{display:flex;gap:16px;margin-top:16px}.ui-time-controls label{flex:1;font-size:13px;color:#c4cbc7}.ui-time-controls label>div{display:flex;align-items:center;gap:4px;margin-top:8px}.ui-time-controls input{width:46px!important;min-width:0;text-align:center;margin:0!important;padding:8px!important;font-size:18px;font-variant-numeric:tabular-nums}.ui-time-controls button{min-width:36px;padding:6px;min-height:40px}.ui-date-picker .ui-control-actions{position:sticky;bottom:-16px;background:#24292a;padding:12px 0 4px;margin-bottom:0}.ui-date-picker .ui-control-actions button{min-height:42px}.ui-date-picker .ui-field-error:empty{display:none}

/* Application update controls: opaque working surfaces over custom backgrounds. */
.pwa-tools{width:44px;height:44px}
.pwa-tools .pwa-icon{width:44px;height:44px;min-height:44px;padding:10px;background:#24292a;color:#e9ece8;border-color:#59615d}
.pwa-tools .pwa-icon svg{width:22px;height:22px}
.pwa-tools .pwa-dot{width:12px;height:12px;top:-2px;right:-2px;background:#ff625b;border:2px solid #151a1b;box-sizing:content-box}
.pwa-tools .pwa-offline-dot{top:auto;bottom:-1px;background:#ddbd80;border:2px solid #151a1b;width:9px;height:9px}
.pwa-tools .pwa-icon.has-update svg{animation:none}
.pwa-tools .pwa-popover{bottom:56px;width:min(340px,calc(100vw - 24px));max-height:calc(100dvh - 88px);overflow:auto;box-sizing:border-box;padding:22px;background:#1d2223;border:1px solid #434c48;border-radius:14px;box-shadow:0 16px 48px #0006;font-size:14px;line-height:1.5}
.pwa-panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px;padding:0;background:transparent}
.pwa-tools .pwa-panel-head h2,dialog.pwa-install-help h2{margin:0;font-size:20px;line-height:1.4;color:#f0f0e9;letter-spacing:0}
.pwa-tools button,.pwa-install-help button{border-radius:8px;transition:background .15s,transform .12s,border-color .15s;font-size:14px;line-height:1.4;min-height:44px;cursor:pointer}
.pwa-tools button:active,.pwa-install-help button:active{transform:translateY(2px)}
.pwa-tools button:hover,.pwa-install-help button:hover{background:#343b38;border-color:#798378}
.pwa-tools button:focus-visible,.pwa-install-help button:focus-visible{outline:2px solid #ddbd80;outline-offset:3px}
.pwa-tools button:disabled,.pwa-install-help button:disabled{opacity:.55;cursor:wait;transform:none}
.pwa-panel-head button.pwa-close{display:grid;place-items:center;flex:0 0 36px;min-height:36px;width:36px;padding:8px;margin:0;background:transparent;border:0;color:#aeb9b1}
.pwa-tools svg,.pwa-install-help svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.pwa-status span{display:flex;align-items:center;gap:8px;font-weight:600;color:#e9ece8}
.pwa-status.is-ready span:before{content:'';width:7px;height:7px;background:#ff625b;border-radius:50%}
.pwa-tools .pwa-status p{margin:8px 0 18px;color:#b7c0ba;font-size:14px;line-height:1.65}
.pwa-tools button.pwa-update-primary,dialog.pwa-install-help button.pwa-update-primary{display:flex;align-items:center;justify-content:center;gap:14px;background:#ddbd80;color:#20251f;border:1px solid #ddbd80;font-weight:650;padding:12px 18px;margin:0}
.pwa-tools button.pwa-update-primary{width:100%}
.pwa-tools button.pwa-update-primary:hover,dialog.pwa-install-help button.pwa-update-primary:hover{background:#ecd3a0;border-color:#ecd3a0}
.pwa-utilities{display:flex;gap:10px;margin:12px 0 18px;flex-wrap:wrap}
.pwa-tools .pwa-utilities button{flex:1;margin:0;padding:10px 12px;white-space:nowrap}
.pwa-tools button.pwa-local{position:relative;display:grid;width:100%;text-align:left;gap:3px;padding:13px 36px 13px 0;margin:0;border:0;border-top:1px solid #39423d;border-radius:0;background:transparent}
.pwa-local span{font-weight:600}.pwa-local small{font-size:12px;color:#b7c0ba}.pwa-local svg{position:absolute;right:0;top:22px}
.pwa-tools .pwa-notice{margin:8px 0;padding:10px 12px;background:#2c3430;border-radius:6px;color:#e9ece8;font-size:13px}
.pwa-tools .pwa-notice:empty{display:none}.pwa-tools .pwa-recovery{margin-top:10px;color:#b7c0ba;font-size:12px}
 dialog.pwa-install-help{box-sizing:border-box;width:min(480px,calc(100vw - 32px));max-width:480px;max-height:calc(100dvh - 32px);padding:28px;margin:auto;border:1px solid #434c48;border-radius:16px;background:#1d2223;color:#e9ece8;box-shadow:0 24px 80px #0007;overflow:auto}
 dialog.pwa-install-help::backdrop{background:#080d10a6;backdrop-filter:none}
 dialog.pwa-install-help>p{font-size:15px;line-height:1.7;margin:0 0 20px;color:#b7c0ba}
.pwa-save-note{background:#2c3430;padding:16px 18px;border-radius:8px;margin:20px 0 24px}.pwa-save-note strong{font-size:15px;color:#eee9db}.pwa-save-note p{margin:6px 0 0;font-size:14px;color:#c5cec6;line-height:1.7}
 dialog.pwa-install-help .pwa-confirm-actions{display:grid;grid-template-columns:1fr 1.6fr;gap:12px;margin:0}
 dialog.pwa-install-help .pwa-confirm-actions button{margin:0;padding:12px 14px;border:1px solid #505b53}
@media(max-width:480px){dialog.pwa-install-help{padding:22px}.pwa-tools .pwa-popover{padding:20px}dialog.pwa-install-help .pwa-confirm-actions{grid-template-columns:1fr}.pwa-confirm-actions [data-answer=update]{grid-row:1}}
@media(prefers-reduced-motion:reduce){.pwa-tools button,.pwa-install-help button{transition:none}}
.file-entry{display:flex;align-items:center;gap:8px;min-width:0;background:#24292a;border:1px solid #39413e;border-radius:8px;margin:8px 0;padding:0 10px}
.file-entry>.file-row{flex:1;min-width:0;margin:0;border:0;border-radius:0;background:transparent;padding:16px 8px;box-shadow:none}
.file-entry>.file-row>div{min-width:0}.file-entry .file-row b{overflow-wrap:anywhere}
.file-entry .file-order-handle,.file-entry .file-remove{display:flex;align-items:center;justify-content:center;gap:6px;flex-shrink:0;min-height:44px;padding:10px;border:0;background:transparent;box-shadow:none}
.file-entry .file-order-handle{cursor:grab;color:#aeb9b1}.file-entry .file-remove{color:#ffb3a0;font-size:13px;white-space:nowrap}
.file-entry .file-remove:hover{background:#49332e}.file-entry button:active{transform:translateY(1px)}
.file-entry svg,.reorder-dialog svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
 dialog.reorder-dialog{box-sizing:border-box;width:min(680px,calc(100vw - 24px));max-height:85dvh;padding:24px;margin:auto;background:#1d2223;color:#e9ece8;border:1px solid #434c48;border-radius:12px;overflow:auto}
 dialog.reorder-dialog h2{font-size:22px;margin:0 0 12px}.reorder-dialog>p{font-size:14px;color:#b7c0ba;line-height:1.6}
.reorder-row{display:flex;align-items:center;gap:8px;border-bottom:1px solid #39413e;padding:12px 0;min-width:0}.reorder-row>span{flex:1;min-width:0;font-size:14px;overflow-wrap:anywhere}
.reorder-row button{min-width:44px;min-height:44px;padding:8px;font-size:12px}.reorder-row .reorder-handle{touch-action:none;background:transparent;border:0;cursor:grab;color:#bcc5bc}
.reorder-dialog.is-sorting{user-select:none;cursor:grabbing}.reorder-footer{display:flex;justify-content:flex-end;gap:12px;padding-top:20px;position:sticky;bottom:-24px;background:#1d2223;padding-bottom:20px}
@media(max-width:480px){.file-entry{gap:2px;padding:0 6px}.file-entry .file-icon{display:none}.file-entry .file-remove span{display:none}.reorder-row{gap:4px}dialog.reorder-dialog{padding:18px}.reorder-row button{min-width:40px}}
.pwa-tools .pwa-panel-head,dialog.pwa-install-help .pwa-panel-head{height:auto;min-height:36px;padding:0;margin:0 0 18px}

/* Unified graphite / amber workspace. Artwork, handwriting canvases and 3D motion keep their own rendering. */
:root{color-scheme:dark;--paper:#101112;--panel:#191c1d;--ink:#e9ece8;--muted:#a6aeaa;--line:#353c3d;--accent:#d6b77f;--gold:#d6b77f;font-family:"PingFang SC","Microsoft YaHei",Arial,sans-serif;background:var(--paper);color:var(--ink)}
body{background:#101112;color:#e9ece8}button,input,textarea,select{border-radius:6px;font:inherit}button{background:#24292a;border:1px solid #414748;color:#e9ece8;min-height:40px;padding:10px 14px;transition:background .15s}button:hover{background:#333b3b}button.primary,.primary{background:#e9e7df;color:#202322;border-color:#e9e7df}button.primary:hover{background:#d6b77f;border-color:#d6b77f}input,textarea,select{background:#24292a;border-color:#414748;color:#e9ece8;min-height:42px}input::placeholder,textarea::placeholder{color:#a6aeaa}input:focus,textarea:focus{box-shadow:none;outline:2px solid #d6b77f;outline-offset:2px}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #d6b77f;outline-offset:3px}input[type=checkbox],input[type=radio]{appearance:none;-webkit-appearance:none;width:19px;height:19px;min-height:19px;padding:0;display:inline-grid;place-content:center;vertical-align:middle;flex:none;border:1px solid #78847e;background:#24292a;border-radius:4px}input[type=radio]{border-radius:50%}input[type=checkbox]:checked,input[type=radio]:checked{background:#d6b77f;border-color:#d6b77f}input[type=checkbox]:checked:after{content:'';width:8px;height:4px;border-left:2px solid #171b19;border-bottom:2px solid #171b19;transform:rotate(-45deg);margin-top:-2px}input[type=radio]:checked:after{content:'';width:7px;height:7px;border-radius:50%;background:#171b19}input:disabled{opacity:.5}input[type=range]{appearance:none;background:#58665d;min-height:6px;height:6px;border:0;padding:0}input[type=range]::-webkit-slider-thumb{appearance:none;width:20px;height:20px;background:#e0c48d;border:2px solid #101112;border-radius:50%}input[type=range]::-moz-range-thumb{width:18px;height:18px;background:#e0c48d;border:2px solid #101112;border-radius:50%}input[type=number]{appearance:textfield}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{appearance:none;margin:0}input[type=file]::file-selector-button{font:inherit;border:1px solid #58635c;background:#303735;color:#e9ece8;padding:8px 12px;border-radius:4px;margin-right:12px}progress,meter{appearance:none;border:0;border-radius:3px;background:#303735}progress::-webkit-progress-bar,meter::-webkit-meter-bar{background:#303735;border:0;border-radius:3px}progress::-webkit-progress-value,meter::-webkit-meter-optimum-value{background:#d6b77f;border-radius:3px}progress::-moz-progress-bar,meter::-moz-meter-bar{background:#d6b77f}summary::marker{color:#d6b77f}
#app>header{height:100px;padding:20px 40px;max-width:1600px;margin:auto;background:#101112}.brand>b{font-size:32px;letter-spacing:-1.5px}.brand>span{font-size:12px;letter-spacing:0;font-weight:400;color:#a6aeaa}.brand>strong{display:none}.session{font-size:12px;letter-spacing:0}.header-right{gap:18px}.header-search{background:#24292a;border:1px solid #414748;font-size:13px}.profile-button{padding:0;border:0;background:none}#app>.workspace,#app.is-archive-workspace>.workspace{display:block;width:calc(100% - 80px);max-width:1520px;margin:0 auto;flex:initial}#app>.workspace>nav,#app.is-archive-workspace>.workspace>nav{display:flex;margin:0;gap:26px;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap;align-items:stretch;border-bottom:1px solid #303536;background:#101112;padding:0}#app>.workspace>nav button{flex:none;min-width:0;font-size:14px;padding:18px 0;border:0;border-radius:0;background:none;white-space:nowrap;color:#a6aeaa;text-align:left}#app>.workspace>nav button.active{color:#f4f4ec;border-bottom:2px solid #d6b77f;background:none}#app>.workspace>nav button small,#app>.workspace>nav button>span:last-child{display:none}#app>.workspace>nav button .section-unread{margin-left:6px}.section-heading{margin:32px 0 24px;gap:24px;flex-wrap:wrap;min-height:70px}.section-heading small,.section-heading h1>span{display:none}.section-heading h1{font-size:28px;margin:0;line-height:1.4}.section-heading>p{font-size:14px;line-height:1.8;color:#a6aeaa}.section-heading .actions{flex-wrap:wrap;gap:8px}.tag{color:#e0c48d;background:#303735;border:0;border-radius:4px;font-size:12px;padding:5px 9px}.muted{color:#a6aeaa}h2{font-size:22px}h3{font-size:18px}.actions{gap:10px}.field>span{font-size:14px;color:#b9c1bc}.field{gap:10px}table th{background:transparent;color:#a6aeaa}table td,table th{border-color:#353c3d;font-variant-numeric:tabular-nums}table tr:hover{background:#24292a}#app>footer{color:#a6aeaa;border-color:#303536;padding:24px 40px;font-size:12px}
/* The warehouse is framed with the same surfaces as the rest of the app. No animation transforms or timings are overridden. */
#content.archive-immersive{position:relative;min-height:0;isolation:auto;flex:initial}.archive-immersive::before{display:none}.archive-immersive>.section-heading{position:static;pointer-events:auto;margin:32px 0 24px;gap:24px}.archive-immersive>.section-heading>p{display:block}.archive-immersive>.section-heading .actions>button:not(.primary){background:#24292a;backdrop-filter:none}.archive-immersive>.archive-tools{position:static;margin:0 0 20px;pointer-events:auto;display:flex;gap:12px;flex-wrap:wrap}.archive-immersive>.archive-tools>*{background:transparent;box-shadow:none;backdrop-filter:none;border:0}.archive-immersive>.archive-tools .searchbox{background:#191c1d;border:1px solid #414748;width:min(400px,40vw);border-radius:6px}.archive-immersive>.archive-tools .material-switch{padding:0;gap:10px}.archive-immersive>.warehouse{position:relative;inset:auto;border:0;border-radius:8px;z-index:auto;background:#191c1d}.archive-immersive .warehouse-stage,.archive-immersive .warehouse.inspecting .warehouse-stage{height:clamp(540px,65vh,760px)}.archive-immersive .warehouse-topline{display:flex;left:24px;right:24px;top:20px;color:#d5dad5;font-size:12px;letter-spacing:0}.archive-immersive .warehouse-detail{top:auto;bottom:80px;right:24px;padding:24px;width:min(360px,40%);background:#202526;text-shadow:none;border-radius:8px}.archive-immersive .warehouse-title{font-size:24px;color:#e9ece8}.archive-immersive .warehouse-description{font-size:14px;color:#bdc4c0}.archive-immersive .warehouse-number{color:#d6b77f;letter-spacing:0;font-size:12px}.archive-immersive .warehouse-bottom{left:24px;right:24px;bottom:20px}.archive-immersive .warehouse-hint,.archive-immersive .warehouse-pagination{background:#202526;backdrop-filter:none;border-radius:6px;color:#bdc4c0}.archive-immersive .warehouse-pagination button{background:#303735}.archive-immersive>#search-results:not(:empty){position:static;width:100%;max-height:360px;overflow:auto;background:#191c1d;backdrop-filter:none;border:0;border-radius:6px;margin-top:20px;box-shadow:none}.archive-immersive:has(.warehouse.inspecting)>.section-heading,.archive-immersive:has(.warehouse.inspecting)>.archive-tools{visibility:visible;pointer-events:auto}.detail-panel{background:#191c1d;color:#e9ece8;border-color:#414748;border-radius:8px}.detail-panel h2{color:#e9ece8}
/* Floating surfaces and dynamic modules share one control language. */
body dialog:not(.boot){background:#191c1d;color:#e9ece8;border:1px solid #414748;border-radius:12px;box-shadow:0 22px 80px #0008}body dialog::backdrop{background:#000a;backdrop-filter:none}body #modal .modal-head,body #modal .modal-actions{background:#191c1d;border-color:#353c3d}body #toast{background:#e9e7df;color:#202322;border-radius:6px;box-shadow:0 8px 28px #0004}.bank-row,.work-card,.report-card,.student-metrics>article,.ai-card,.knowledge-card,.public-card,.account-card{background:#191c1d;color:#e9ece8;border-color:#353c3d;border-radius:8px;box-shadow:none}.bank-row{padding:24px;gap:22px}.bank-number{color:#a6aeaa}.bank-row h2{font-size:17px;line-height:1.8}.bank-row-actions{gap:8px}.report-card h3{font-size:19px}.report-method,.ai-access-help{color:#a6aeaa}.public-card-art{background:#292f30;color:#d6b77f}.public-card-art strong{color:#d6b77f}.work-heading{background:#191c1d;color:#e9ece8}.work-table th{background:#191c1d}.grade-banner,.feedback,.notice{background:#303735;color:#e0c48d;border-color:#58665d}.options .option{background:#24292a;border-color:#414748}.options .option.selected{background:#333a34;border-color:#d6b77f}.searchbox input{background:transparent}.ui-original-field{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;opacity:0!important;pointer-events:none!important;clip-path:inset(50%)}.ui-field-adapter{display:inline-block;position:relative;min-width:140px;max-width:100%;vertical-align:middle}.ui-field-adapter[hidden]{display:none}.field>.ui-field-adapter{width:100%}.ui-field-trigger{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;min-height:42px;white-space:normal}.ui-control-popup{position:fixed;inset:auto;margin:0;padding:6px;background:#24292a;color:#e9ece8;border:1px solid #4a5151;border-radius:8px;box-shadow:0 12px 28px #0008;max-height:min(380px,calc(100dvh - 24px));overflow:auto;z-index:2147483647}.ui-control-popup>button[role=option]{display:block;width:100%;text-align:left;background:transparent;border:0;min-height:40px;border-radius:4px}.ui-control-popup>button[aria-selected=true]{background:#303735;color:#e5c58d}.ui-control-popup>button[aria-selected=true]:after{content:'✓';float:right;margin-left:12px}.ui-control-popup>button:hover{background:#363e3e}.ui-calendar{padding:16px;width:320px!important;max-width:calc(100vw - 24px)}.ui-calendar>input,.ui-calendar label input{width:100%;margin:12px 0}.ui-calendar-nav,.ui-control-actions{display:flex;gap:10px;align-items:center;justify-content:space-between;margin:12px 0}.ui-calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center;font-size:13px}.ui-calendar-days span{padding:6px 0}.ui-calendar-days button{padding:5px;min-height:32px;border:0}.ui-calendar-days button[aria-pressed=true]{background:#d6b77f;color:#171b19}.ui-field-error{display:block;color:#f2ad9d;font-size:13px;margin:8px 0}.ui-confirm-dialog{padding:26px;max-width:calc(100vw - 32px);width:460px}.ui-confirm-dialog p{line-height:1.8}.ui-swatches{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.ui-swatches button{padding:8px 3px;font-size:12px;border-bottom-width:6px}
@media(max-width:1100px){#app>header{padding:20px 24px}#app>.workspace,#app.is-archive-workspace>.workspace{width:calc(100% - 48px)}.header-right{gap:12px}.section-heading>p{flex-basis:100%;order:2;margin:0}.section-heading>.actions{margin-left:auto}.archive-immersive .warehouse-detail{width:340px;max-width:70%}.bank-row{flex-wrap:wrap}.bank-row-actions{flex-wrap:wrap}.archive-immersive>.archive-tools .material-switch{margin-left:0}}
@media(max-width:650px){#app>header{padding:16px;height:84px}.brand>b{font-size:28px}.header-search span,.session{display:none}.header-right{gap:8px}#app>.workspace,#app.is-archive-workspace>.workspace{width:calc(100% - 32px)}#app>.workspace>nav,#app.is-archive-workspace>.workspace>nav{gap:22px}#app>.workspace>nav button{padding:16px 0;min-height:48px}.section-heading,.archive-immersive>.section-heading{margin:26px 0 20px;gap:14px}.section-heading h1,.archive-immersive>.section-heading h1{font-size:24px}.section-heading>.actions{margin-left:0;flex-basis:100%}.archive-immersive>.archive-tools .searchbox{width:100%;flex-basis:100%}.archive-immersive>.archive-tools{gap:10px}.archive-immersive .warehouse-stage,.archive-immersive .warehouse.inspecting .warehouse-stage{height:640px;min-height:0}.archive-immersive .warehouse-detail{right:16px;left:16px;bottom:80px;width:auto;max-width:none;padding:20px}.archive-immersive .warehouse-topline{left:16px;right:16px;font-size:11px}.archive-immersive .warehouse-bottom{left:16px;right:16px}.warehouse-hint{display:none}.archive-immersive .warehouse-pagination{margin-left:auto}.ui-field-adapter{min-width:120px}.bank-row{padding:20px}.bank-question{min-width:0}.bank-row-actions{width:100%;gap:8px}.bank-row-actions button{min-height:44px}.two{grid-template-columns:1fr}body #modal{width:calc(100vw - 24px);max-width:none;margin:12px;max-height:calc(100dvh - 24px)}.ui-control-popup{max-height:55dvh}.section-heading>p{font-size:13px}#app>footer{padding:24px 16px}}
body .brand{background:transparent;border-radius:0}body .brand:hover{background:transparent}
body .rewards-space{--reward-ink:#e9ece8;--reward-muted:#a6aeaa;--reward-line:#353c3d;--reward-paper:#191c1d;--reward-green:#d6b77f;color:#e9ece8}body .rewards-heading h1{font-size:28px;line-height:1.4}body .rewards-heading>div>small,body .rewards-section-title>small,body .rewards-pack-picker .rewards-section-title>div>small{display:none}body .rewards-wallet,body .rewards-draw,body .rewards-admin-summary,body .rewards-exclusive-intro,body .rewards-honor{background:#191c1d;color:#e9ece8;border:0;border-radius:8px;box-shadow:none}body .rewards-wallet strong,body .rewards-admin-summary>div>strong{font-weight:500;line-height:1.4;font-family:inherit;font-size:28px;letter-spacing:0}body .rewards-primary,body .rewards-primary:hover{background:#e9e7df;color:#202322;border-color:#e9e7df;box-shadow:none;border-radius:6px}body .rewards-outline,body .rewards-admin-nav button,body .badge-decorate-toggle,body .badge-customize-close{background:#24292a;color:#e9ece8;border-color:#414748;border-radius:6px;box-shadow:none}body .rewards-admin-nav button.is-active{background:#303735;color:#e0c48d;border-color:#d6b77f;box-shadow:none}body .rewards-space .rewards-pack-choice,body .rewards-space .rewards-pack-choice:hover:not(:disabled){background:#191c1d;border-color:#414748;box-shadow:none;color:#e9ece8}body .rewards-space .rewards-pack-choice.is-selected{background:#303735;border-color:#d6b77f;box-shadow:none}body .rewards-pack-choice-name,body .rewards-pack-group-label h3,body .rewards-pack-choice-count b{color:#e9ece8}body .rewards-pack-choice-count,body .rewards-draw-copy>p,body .rewards-draw-copy>small,body .rewards-pack-picker-note,body .rewards-insufficient{color:#a6aeaa}body .rewards-pack-group,body .rewards-history,body .rewards-admin-nav{border-color:#353c3d}body .rewards-link{color:#e0c48d}body .rewards-pack-choice-check{background:#24292a;color:#a6aeaa;border-color:#78847e}body .rewards-pack-choice.is-selected .rewards-pack-choice-check{background:#d6b77f;color:#171b19;border-color:#d6b77f}body .profile-badge-caption small{color:#a6aeaa}body .rewards-admin-nav button small{display:none}body .badge-decorate-icon{background:#303735;color:#d6b77f;border-color:#414748;box-shadow:none}

*{scrollbar-color:#58635c #191c1d;scrollbar-width:thin}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-track{background:#191c1d}::-webkit-scrollbar-thumb{background:#58635c;border:2px solid #191c1d;border-radius:6px}
/* Button revision: a compact tool shelf, a clear reading action, and quiet secondary actions. */
#app>.workspace>nav,#app.is-archive-workspace>.workspace>nav{gap:5px;padding:10px 0 14px;border-bottom:1px solid #292e2e;align-items:center;scrollbar-width:none}
#app>.workspace>nav button{padding:11px 17px;min-height:44px;min-width:72px;text-align:center;border:1px solid transparent;border-radius:7px;font-size:14px;font-weight:500;line-height:20px;color:#aeb6b1;transition:background .16s,color .16s,border-color .16s,translate .1s}
#app>.workspace>nav button:hover{background:#202627;color:#f1f2ec}
#app>.workspace>nav button.active{background:#343b35;color:#f2d49d;border:1px solid #62614c;border-bottom:1px solid #62614c;box-shadow:none}
#app>.workspace>nav button:has(+button[data-section=bank]),#app>.workspace>nav button:has(+button[data-section=daily]){margin-right:18px}
body button{font-weight:500;font-size:14px;line-height:20px;border-color:#414b48;border-radius:7px;min-height:40px;padding:10px 15px;transition:background .15s,border-color .15s,color .15s,translate .09s,scale .09s}
body button:hover:not(:disabled){border-color:#6d7b70;background:#303936}
body button.primary{background:#d9bd8b;color:#1b211c;border-color:#d9bd8b}
body button.primary:hover:not(:disabled){background:#e8ce9f;border-color:#e8ce9f}
body button:active:not(:disabled),.action-more summary:active{translate:0 2px;scale:.985;filter:brightness(.88)}
body button.ui-clicked,.action-more summary.ui-clicked{animation:ui-button-click .22s ease-out}
@keyframes ui-button-click{0%{box-shadow:inset 0 0 0 2px #d6b77f88}100%{box-shadow:inset 0 0 0 2px transparent}}
body button:disabled{opacity:.45;cursor:not-allowed}body button.ui-pending{position:relative;padding-right:38px;cursor:progress;opacity:.8}body button.ui-pending:after{content:'';display:block;position:absolute;right:13px;top:calc(50% - 6px);width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:ui-button-spin .7s linear infinite}
@keyframes ui-button-spin{to{rotate:360deg}}
body .bank-list{display:grid;gap:14px;padding:14px 0}
body .bank-row{display:grid;grid-template-columns:32px minmax(0,1fr);gap:12px 18px;padding:24px 26px;border:1px solid #303938;border-radius:10px;background:#191e1e;box-shadow:none;align-items:start}
body .bank-row .bank-number{font:500 12px/24px inherit;color:#87968c;padding-top:2px}
body .bank-question{min-width:0}body .bank-question h2{font-size:17px;line-height:1.8;margin:12px 0 14px;font-weight:500;max-width:1000px}
body .bank-meta{gap:12px;align-items:center;flex-wrap:wrap}body .bank-meta small{font-size:12px;color:#a6b2aa}
body .bank-row .bank-row-actions{grid-column:2;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:8px;flex-wrap:wrap;width:auto;padding-top:8px}
body .bank-row-actions button{min-height:38px;padding:8px 14px;white-space:nowrap;font-size:13px;border-radius:6px}
body .bank-row-actions .bank-open{background:#d9bd8b;border-color:#d9bd8b;color:#1b211c;padding-inline:20px}
body .bank-row-actions .bank-open:hover{background:#e8ce9f;border-color:#e8ce9f}
body .bank-row-actions .button-quiet{border-color:transparent;background:transparent;color:#c9d2cc}
body .bank-row-actions .button-quiet:hover{background:#293330;border-color:transparent;color:#fff}
body .bank-row-actions .cart-select{background:#252e2b;border-color:#414f46;color:#dce4dc}
body .bank-row-actions .cart-select[aria-pressed=true]{background:#354335;border-color:#7e9572;color:#e2efda}
body .bank-row.in-question-cart{background:#1d251f;border-color:#586e50;box-shadow:none}
body .bank-tag-button{background:transparent;color:#aab8ae;border:0;padding:3px 8px;min-height:30px;font-size:12px}body .bank-tag-button:hover{background:#303c34}
.action-more{position:relative;margin-left:auto;color:#b3c0b6;font-size:13px}.action-more summary{display:flex;align-items:center;justify-content:center;gap:12px;list-style:none;cursor:pointer;min-height:38px;padding:8px 12px;border-radius:6px;border:1px solid transparent;user-select:none;transition:background .15s,translate .1s}.action-more summary::-webkit-details-marker{display:none}.action-more summary>span{font-size:20px;line-height:14px;letter-spacing:1px}.action-more[open]>summary,.action-more summary:hover{background:#303936;color:#edf1eb;border-color:#4b5a50}.action-more-panel{position:absolute;right:0;top:calc(100% + 6px);z-index:15;min-width:180px;display:grid;gap:4px;padding:6px;border:1px solid #4a5650;border-radius:9px;background:#252e2a;box-shadow:0 12px 32px #0006}.action-more:not([open])>.action-more-panel{display:none}body .action-more-panel button{display:block;width:100%;text-align:left;background:transparent;border:0;min-height:40px;padding:10px 12px;color:#dce4dc}body .action-more-panel button:hover{background:#354239}body .action-more-panel button.delete-link{color:#efab99;border-top:1px solid #4c4840;border-radius:0 0 5px 5px;margin-top:3px}body .action-more-panel button.delete-link:hover{background:#46312c}
body .work-heading{background:transparent;padding:16px 0 4px;border:0;font-size:13px;color:#b8c4ba}
@media(max-width:650px){#app>.workspace>nav,#app.is-archive-workspace>.workspace>nav{gap:4px;padding:7px 0 12px}#app>.workspace>nav button{font-size:14px;padding:11px 14px;min-width:70px}body .bank-row{grid-template-columns:minmax(0,1fr);padding:20px;gap:10px}body .bank-row .bank-number{display:none}body .bank-row .bank-row-actions{grid-column:1;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:8px}body .bank-row-actions button{width:100%;min-height:44px;font-size:13px;padding:10px 8px}.action-more{margin:0}.action-more summary{min-height:44px}.action-more-panel{min-width:190px}body .bank-question h2{font-size:16px;line-height:1.8}body .bank-meta{gap:8px}}
@media(prefers-reduced-motion:reduce){body button,.action-more summary{transition:none}body button:active:not(:disabled),.action-more summary:active{translate:none;scale:none}body button.ui-clicked,.action-more summary.ui-clicked{animation:none;outline:2px solid #d6b77f}body button.ui-pending:after{animation:none;border-style:dotted}}
#app>.workspace>nav button{display:inline-flex;align-items:center;justify-content:center;height:44px;max-height:44px;padding-block:10px;flex-shrink:0}
body button.ui-pending{padding-right:15px}body button.ui-pending:after{right:3px;width:9px;height:9px;top:calc(50% - 5px)}
body .bank-pagination{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-right:0}body .bank-pagination button{flex:none;min-width:44px;white-space:nowrap;padding:10px 14px;font-size:13px}body .bank-pagination>span{white-space:nowrap;font-size:12px}
@media(max-width:650px){body .bank-pagination{justify-content:flex-start;margin-bottom:92px}body .bank-pagination button{min-width:44px;min-height:44px}body .bank-row-actions .ui-pending{padding-inline:8px}}

/* Shared interface surfaces. Collectible artwork and archive animation are intentionally untouched. */
:root{--ui-surface:#191e1e;--ui-raised:#242c29;--ui-border:#45514a;--ui-text:#e9ece8;--ui-muted:#b0bcb3;--ui-action:#d9bd8b;--ui-action-ink:#1b211c;--ui-danger:#f4ae9c}
body #content>.actions{flex-wrap:wrap;align-items:center;gap:10px}
body #content>.actions>button{flex:0 0 auto;white-space:nowrap}
body #account-search{flex:1;min-width:min(220px,100%)}
body .class-management-actions{display:flex;gap:8px;flex-wrap:wrap}
body .ai-chat-panel{background:var(--ui-surface)}
body .ai-chat-panel>header{height:auto;min-height:0;padding:0 0 18px}
body .ai-chat-panel>header h2{font-size:20px;margin:8px 0}
body .ui-field-trigger{gap:12px}.ui-field-trigger .ui-field-label{min-width:0;overflow-wrap:anywhere}
/* Ranking/search chrome uses the same graphite surfaces as assignments and the bank. */
body .rewards-people{background:var(--ui-surface);border-color:var(--ui-border);border-radius:8px}
body .rewards-people :is(h2,b){color:var(--ui-text)}
body .rewards-people :is(label,small,.rewards-people-notice,.rewards-people-count,.rewards-person-info>span){color:var(--ui-muted);font-size:12px;letter-spacing:0}
body .rewards-people :is(input,select){background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-border);border-radius:7px}
body .rewards-people :is(input,select)::placeholder{color:var(--ui-muted)}
body .rewards-person,body .rewards-rank-row,body .rewards-rank-header,body .rewards-rank-filters{border-color:var(--ui-border)}
body .rewards-rank-row.is-me{background:#29352e}
body .rewards-rank-row>div>span,body .rewards-rank-badge,body .rewards-rank-filters>label,body .rewards-rank-header,body .rewards-rank-earned small{color:var(--ui-muted);font-size:12px;letter-spacing:0}
body .rewards-rank-earned{color:var(--ui-text);font-family:inherit;font-size:24px;font-weight:600;line-height:1.4;font-variant-numeric:tabular-nums}
body .rewards-rank-number{color:var(--ui-muted)}body .rewards-rank-number.is-podium{color:var(--ui-action)}
body .rewards-rank-row>div>b small{color:var(--ui-action);border-color:#66775f}
body .rewards-rank-filters select{color:var(--ui-text);background:var(--ui-raised);border-color:var(--ui-border)}
body .rewards-rank-mark{font-size:48px;transform:none;color:var(--ui-muted)}
body .rewards-rank-mark svg{width:48px;height:48px}
body .rewards-empty,body .rewards-loading{color:var(--ui-muted)}
body .rewards-primary,body .rewards-primary:hover{background:var(--ui-action);color:var(--ui-action-ink);border-color:var(--ui-action);border-radius:7px}
/* Campus-card controls are interface chrome; the pb-card itself keeps its artwork. */
body .badge-profile-editor{color:var(--ui-text)}
body .badge-profile-actions button,body .badge-closet-search button,body .badge-closet-pages button,body .badge-outfit,body .badge-decorate-toggle,body .badge-decorate-toggle[aria-expanded=true]{background:var(--ui-raised);color:var(--ui-text);border:1px solid var(--ui-border);box-shadow:none}
body .badge-profile-actions button:hover,body .badge-closet-search button:hover,body .badge-closet-pages button:hover,body .badge-outfit:hover,body .badge-decorate-toggle:hover{background:#354139;color:var(--ui-text);box-shadow:none}
body .badge-decorate-copy small,body .badge-decorate-chevron,body .badge-profile-actions button>span:last-child,body .badge-wallet,body .badge-closet-hint,body .badge-closet-pages,body .badge-save-row span,body .badge-public-caption p,body .badge-source-link,body .badge-customize-heading small{color:var(--ui-muted);font-size:12px;letter-spacing:0;line-height:1.5}
body .badge-wallet b,body .badge-profile-customize h3{color:var(--ui-text)}
body .badge-profile-customize,body .badge-closet-tabs{border-color:var(--ui-border)}
body .badge-closet-search input{background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-border)}
body .badge-closet-tabs button{color:var(--ui-muted);border:0;background:transparent}
body .badge-closet-tabs button[aria-selected=true]{background:#354139;color:var(--ui-action)}
body .badge-outfit.selected{outline-color:var(--ui-action)}
body .badge-outfit>b{background:var(--ui-action);color:var(--ui-action-ink)}
body .badge-save-row.has-changes{background:#2a342e;border-color:var(--ui-border)}
body .badge-save-row button{background:var(--ui-action);color:var(--ui-action-ink);box-shadow:none;border-color:var(--ui-action)}
body .badge-shop-link,body .badge-profile-actions .badge-logout{color:var(--ui-muted);background:transparent;border-color:transparent}
body .badge-profile-actions .badge-logout:hover{background:#303b34;color:var(--ui-text)}
body .badge-home-background{background:var(--ui-raised);border-color:var(--ui-border)}
body .badge-home-background strong{color:var(--ui-text);font-size:15px}
body .badge-home-background :is(p,small){color:var(--ui-muted);font-size:12px;letter-spacing:0}
body .badge-home-background-actions button{background:#303b34;color:var(--ui-text);border-color:#758475;box-shadow:none;font-size:13px}
body .badge-home-background-actions button:first-child:not(:disabled){background:var(--ui-action);color:var(--ui-action-ink);border-color:var(--ui-action)}
body .badge-home-background-actions button:not(:disabled):hover{background:#425044;color:#fff}
body .badge-home-background-actions button:disabled{background:#29342d;color:#aeb9ac;border-color:#52604f;opacity:1}
/* The sticker manager is dark UI around unchanged sticker artwork. */
body .desktop-sticker-manager{color:var(--ui-text)}
body .desktop-sticker-manager :is(p,small,.desktop-sticker-manager-heading>span){color:var(--ui-muted)}
body .desktop-sticker-manager-heading,body .desktop-sticker-manager-actions,body .desktop-sticker-manager-footer{border-color:var(--ui-border)}
body .desktop-sticker-manager button:not(.desktop-sticker-option),body .desktop-sticker-option{background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-border);box-shadow:none}
body .desktop-sticker-manager button:not(.desktop-sticker-option):hover,body .desktop-sticker-option:hover{background:#354139;color:var(--ui-text);border-color:#7f8c80}
body .desktop-sticker-option.is-selected{background:#354139;border-color:var(--ui-action)}
body .desktop-sticker-option.is-selected:after{color:var(--ui-action)}
body .desktop-sticker-manager button.desktop-sticker-place{background:var(--ui-action);color:var(--ui-action-ink);border-color:var(--ui-action);box-shadow:none}
/* The teaching-class editor had dark ink tokens on dark form surfaces. */
body .teaching-class-editor{--tc-ink:var(--ui-text);--tc-muted:var(--ui-muted);--tc-line:var(--ui-border)}
body .teaching-class-intro{background:var(--ui-raised);box-shadow:none}
body .teaching-class-intro>span{background:var(--ui-surface);box-shadow:none;transform:none}
body .teaching-class-editor :is(input:not([type=checkbox]),select){color:var(--ui-text);border-radius:7px}
body .teaching-class-editor button{border-radius:7px}
body .teaching-class-save{background:var(--ui-surface)}
@media(max-width:650px){body #content>.actions{gap:8px}body #content>.actions>button{white-space:normal;min-width:100px;max-width:100%;flex:1 0 auto}body #content>.actions>label{min-width:140px}body #account-search{width:100%;flex-basis:100%}body .badge-closet-search input,body .rewards-people input{font-size:16px}body .rewards-rank-mark{font-size:32px}body .rewards-rank-mark svg{width:32px;height:32px}}
@media(pointer:coarse){body .modal-actions>button,body .class-management-actions>button,body .badge-profile-actions button,body .badge-closet-tabs button,body .badge-closet-pages button{min-height:44px}}
body .rewards-tabs{max-width:100%;flex-wrap:wrap;background:var(--ui-surface);border-color:var(--ui-border);border-radius:7px}
body .rewards-tabs button{color:var(--ui-muted);min-height:40px;border-radius:5px}
body .rewards-tabs button.is-active{background:#354139;color:var(--ui-action);box-shadow:none}
body .rewards-rules summary,body .rewards-item-title>span.rewards-owned,body .rewards-admin-item-actions button{color:var(--ui-action)}
body .rewards-ledger-row .is-positive{color:#b7d5a4}body .rewards-ledger-row .is-negative{color:var(--ui-muted)}
body .rewards-ledger-row,body .rewards-admin-item-actions{border-color:var(--ui-border)}
body .rewards-pagination>span,body .rewards-admin-summary p,body .rewards-form-status,body .rewards-ledger-caption,body .rewards-ledger-caption>small{color:var(--ui-muted)}
body .rewards-pagination button{border-color:var(--ui-border);border-radius:7px}
body .rewards-admin-summary input,body .rewards-picker-list>button{background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-border);border-radius:7px;box-shadow:none}
body .rewards-picker-list>button.is-selected,body .rewards-picker-selected{background:#354139;color:var(--ui-text);border-color:var(--ui-action)}
body .rewards-picker-list small,body .rewards-picker-selected small{color:var(--ui-muted);font-size:12px}
body .teaching-selected-panel{background:var(--ui-raised);box-shadow:none}
body .teaching-panel-heading>button{background:var(--ui-raised);box-shadow:none}
body .teaching-class-save>.primary{background:var(--ui-action);color:var(--ui-action-ink);border-color:var(--ui-action);box-shadow:none;border-radius:7px}
body :is(.teaching-class-editor,.badge-profile-editor,.desktop-sticker-manager,.rewards-space) :is(button,input,select):focus-visible{outline:2px solid var(--ui-action);outline-offset:3px}

body.install-page{background:#101212;color:var(--ui-text)}
body .install-sheet h1{font-size:32px;line-height:1.4}body .install-sheet h2{font-size:20px;border-color:var(--ui-border)}
body .install-sheet :is(p,li,small){color:var(--ui-muted)}body .install-sheet b{color:var(--ui-text)}
body .install-sheet .primary{background:var(--ui-action);color:var(--ui-action-ink);border:1px solid var(--ui-action);border-radius:7px;transition:transform .12s,background .12s}
body .install-sheet .primary:hover{background:#e8cc9a}body .install-sheet .primary:active{transform:translateY(2px)}body .install-sheet .primary:focus-visible{outline:2px solid var(--ui-action);outline-offset:4px}
body .install-sheet .primary svg{width:18px;height:18px;vertical-align:middle;margin-left:6px}
/* Classroom lifecycle controls share the site's compact graphite action rows. */
body .classroom-panel{padding:16px;border:1px solid var(--ui-border);border-radius:8px;background:var(--ui-surface);color:var(--ui-text);margin-bottom:12px}
body .classroom-options{display:flex;flex-direction:column;align-items:stretch;gap:12px;margin-top:12px}
body .classroom-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
body .classroom-actions>strong{margin-right:auto}body .classroom-actions>[role=status]{color:var(--ui-muted);font-size:13px}
body .classroom-room-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--ui-border)}
body .classroom-room-row>div:first-child{min-width:0;flex:1}body .classroom-room-row strong{display:block;overflow-wrap:anywhere;font-size:14px}
body .classroom-room-row small,body .classroom-hint{display:block;color:var(--ui-muted);font-size:12px;line-height:1.7}
body .classroom-panel button{min-height:40px;white-space:nowrap}body .classroom-panel .classroom-danger{color:var(--ui-danger);background:transparent;border-color:var(--ui-border)}
body .classroom-panel details{padding:12px;background:var(--ui-raised);border:1px solid var(--ui-border);border-radius:7px}
body .classroom-panel details>button,body .classroom-panel details>input{margin:8px 8px 0 0}body .classroom-panel summary{cursor:pointer;color:var(--ui-text)}
body .classroom-tabs button[aria-pressed=true]{background:#354139;color:var(--ui-action);border-color:#66775f}
@media(max-width:650px){body .classroom-room-row{align-items:stretch;flex-direction:column;gap:8px}body .classroom-panel button{min-height:44px}body .classroom-actions>[role=status]{flex-basis:100%}body .classroom-panel{padding:12px}body .classroom-panel details>input{width:100%}}

body dialog.ui-confirm-dialog{box-sizing:border-box;width:460px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:24px;overflow:auto}
body dialog.ui-confirm-dialog h2{font-size:20px;line-height:1.5;margin:0 0 16px}body dialog.ui-confirm-dialog p{font-size:14px;line-height:1.8;margin:0;color:var(--ui-muted);overflow-wrap:anywhere}
body dialog.ui-confirm-dialog .ui-control-actions{justify-content:flex-end;flex-wrap:wrap;margin:24px 0 0}body dialog.ui-confirm-dialog button{min-height:44px}
@media(max-width:480px){body dialog.ui-confirm-dialog{padding:20px}}
