:root {
  color-scheme: light dark;
  --bg: #f7f8fb;
  --paper: #fff;
  --ink: #202a3b;
  --muted: #657086;
  --line: #e1e6ee;
  --blue: #215abd;
  --tint: #ecf2ff;
  --green: #23714b;
  --green-bg: #eaf5ee;
  --orange: #975416;
  --orange-bg: #fff4e5;
  --red: #b63838;
  --shadow: 0 4px 20px #172a4610;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans CJK SC",
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s;
}
button:hover {
  background: var(--tint);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
button.primary:hover {
  filter: brightness(0.95);
}
button.danger {
  color: var(--red);
}
button.flat {
  border-color: transparent;
  background: transparent;
  padding: 9px 12px;
}
button.small {
  padding: 7px 12px;
  font-size: 14px;
  min-height: 44px;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #7aa7ff;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.35;
  letter-spacing: -1px;
}
h2 {
  font-size: 23px;
  line-height: 1.4;
}
h3 {
  font-size: 18px;
}
p + p {
  margin-top: 12px;
}
small,
.smalltext {
  font-size: 14px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  color: var(--blue);
  font-weight: 650;
  letter-spacing: 0.06em;
  font-size: 14px;
  margin-bottom: 12px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 24px;
}
.gap8 {
  gap: 8px;
}
.top24 {
  margin-top: 24px;
}
.top16 {
  margin-top: 16px;
}
.top8 {
  margin-top: 8px;
}
.grow {
  flex: 1;
}
.right {
  margin-left: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 2px;
}
.logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  border-radius: 10px;
  font:
    italic 700 27px Georgia,
    serif;
  letter-spacing: 0;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.nav {
  width: 100%;
  border: 0;
  text-align: left;
  color: var(--muted);
  padding: 12px 16px;
}
.nav.active {
  color: var(--blue);
  background: var(--tint);
  font-weight: 650;
}
.course-tag {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 14px;
}
.sidebar-foot {
  margin-top: auto;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 650;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 76px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.content {
  max-width: 1200px;
  margin: auto;
  padding: 40px;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.page-heading p {
  margin-top: 8px;
}
.tag {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--tint);
  color: var(--blue);
  font-size: 14px;
  font-weight: 550;
}
.tag.green {
  background: var(--green-bg);
  color: var(--green);
}
.tag.orange {
  background: var(--orange-bg);
  color: var(--orange);
}
.tag.gray {
  background: var(--bg);
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}
.stat strong {
  font-size: 32px;
  line-height: 1.2;
  font-weight: 650;
  display: block;
  margin-top: 12px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 24px;
}
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.assignment {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: start;
}
.assignment + .assignment {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 24px;
}
.assignment-icon {
  width: 48px;
  height: 48px;
  background: var(--tint);
  color: var(--blue);
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 22px;
}
.assignment h3 {
  margin-bottom: 8px;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 14px;
  margin-top: 10px;
}
.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}
.empty strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  margin: 12px;
}
.notice {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  background: var(--paper);
  border-radius: 8px;
  font-size: 14px;
}
.notice.warning {
  border-left-color: var(--orange);
  background: var(--orange-bg);
}
.code {
  font:
    700 20px/1.4 ui-monospace,
    SFMono-Regular,
    monospace;
  letter-spacing: 3px;
  overflow-wrap: anywhere;
}
.back {
  margin: -8px 0 16px -12px;
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}
.side-note {
  position: sticky;
  top: 24px;
}
.field {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
.field:last-child {
  margin-bottom: 0;
}
.field > label {
  font-size: 14px;
  font-weight: 650;
}
input,
textarea,
select {
  width: 100%;
  padding: 11px 12px;
  min-height: 44px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}
textarea {
  resize: vertical;
  line-height: 1.6;
  min-height: 100px;
}
input[type="number"] {
  max-width: 130px;
}
.question-editor {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 24px;
}
.question-editor:first-of-type {
  border-top: 0;
  margin-top: 16px;
}
.sticky-actions {
  position: static;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  z-index: 3;
}
.question-title {
  font-size: 21px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-weight: 550;
}
.question-num {
  font:
    650 14px/1.5 ui-monospace,
    monospace;
  color: var(--blue);
  margin-bottom: 8px;
}
.board-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 8px;
}
.board-tools button.active {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--tint);
}
.board-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1000/440;
  background: #fff;
  border: 1px solid #d5dce8;
  border-radius: 8px;
  overflow: hidden;
}
.board-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.board-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.board-wrap.grid {
  background-color: #fff;
  background-image:
    linear-gradient(#e9edf4 1px, transparent 1px),
    linear-gradient(90deg, #e9edf4 1px, transparent 1px);
  background-size: 24px 24px;
}
.board-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #657086;
  pointer-events: none;
  font-size: 14px;
}
.answer-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
  min-height: 60px;
  margin-top: 16px;
}
.grade-controls {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  margin-top: 24px;
}
.feedback {
  background: var(--green-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.feedback .score {
  font-size: 23px;
  font-weight: 650;
  color: var(--green);
}
.summary-score {
  font-size: 36px;
  line-height: 1.3;
  font-weight: 650;
  color: var(--green);
}
.reference {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  white-space: pre-wrap;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
td,
th {
  padding: 16px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
th {
  color: var(--muted);
  font-weight: 550;
}
tr:last-child td {
  border-bottom: 0;
}
.login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-story {
  background: #163a73;
  color: white;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 720px;
}
.login-story .brand {
  margin-bottom: 64px;
}
.login-story .logo {
  background: #fff;
  color: #16468c;
}
.login-story h1 {
  font-size: 48px;
  line-height: 1.35;
  letter-spacing: -1px;
}
.login-story .sub {
  color: #d6e3fa;
  max-width: 400px;
  margin-top: 24px;
  font-size: 18px;
}
.math-identity {
  font:
    italic 36px/1.6 Georgia,
    serif;
  border-top: 1px solid #ffffff33;
  padding-top: 32px;
  margin-top: 48px;
}
.math-identity small {
  display: block;
  font:
    14px/1.6 -apple-system,
    sans-serif;
  color: #d6e3fa;
  margin-top: 8px;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.login-panel {
  width: 100%;
  max-width: 390px;
}
.login-panel h2 {
  font-size: 28px;
}
.login-panel .tabs {
  display: flex;
  gap: 8px;
  margin: 32px 0 24px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 12px 16px;
  color: var(--muted);
}
.tabs button.active {
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
  font-weight: 650;
}
.full {
  width: 100%;
}
.error {
  color: var(--red);
  font-size: 14px;
  white-space: pre-wrap;
  margin: 12px 0;
}
.login-footer {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  margin-top: 24px;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
  z-index: 20;
  display: none;
  white-space: pre-wrap;
}
#toast.show {
  display: block;
}
.saving {
  font-size: 14px;
  color: var(--muted);
}
.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  margin-right: 8px;
}
.account-form {
  max-width: 520px;
}
.nowrap {
  white-space: nowrap;
}
@media (min-width: 1500px) {
  .content {
    padding-top: 48px;
  }
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 24px 16px;
  }
  .content {
    padding: 32px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .side-note {
    position: static;
  }
  .login-story {
    padding: 48px 36px;
  }
  .login-story h1 {
    font-size: 38px;
  }
}
@media (max-width: 700px) {
  h1 {
    font-size: 27px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    display: block;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    font-size: 20px;
  }
  .sidebar .logo {
    width: 32px;
    height: 32px;
    font-size: 23px;
  }
  .sidebar nav {
    display: flex;
    margin-top: 16px;
    gap: 8px;
    overflow: auto;
  }
  .nav {
    width: auto;
    padding: 8px 12px;
    white-space: nowrap;
  }
  .course-tag,
  .sidebar-foot {
    display: none;
  }
  .topbar {
    height: auto;
    min-height: 64px;
    padding: 12px 16px;
    font-size: 14px;
  }
  .topbar .tag {
    font-size: 14px;
  }
  .content {
    padding: 24px 16px;
  }
  .page-heading {
    display: block;
    margin-bottom: 24px;
  }
  .page-heading > button {
    margin-top: 20px;
  }
  .stats {
    gap: 8px;
    margin-bottom: 24px;
  }
  .stat {
    padding: 16px 12px;
  }
  .stat strong {
    font-size: 26px;
  }
  .stat .muted {
    font-size: 14px;
  }
  .card {
    padding: 20px 16px;
  }
  .assignment {
    grid-template-columns: 36px 1fr;
    gap: 12px;
  }
  .assignment-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .assignment > button {
    grid-column: 2;
    justify-self: start;
  }
  .assignment h3 {
    font-size: 17px;
  }
  .meta {
    gap: 6px 12px;
  }
  .sticky-actions {
    padding: 12px;
    bottom: 8px;
  }
  .sticky-actions .saving {
    width: 100%;
    order: 3;
  }
  .board-wrap {
    aspect-ratio: 1000/440;
  }
  .grade-controls {
    grid-template-columns: 1fr;
  }
  .grade-controls textarea {
    min-height: 80px;
  }
  .login {
    display: block;
  }
  .login-story {
    padding: 24px;
    min-height: 0;
  }
  .login-story .brand {
    margin-bottom: 24px;
  }
  .login-story h1 {
    font-size: 28px;
  }
  .login-story .sub {
    font-size: 14px;
    margin-top: 12px;
  }
  .math-identity {
    display: none;
  }
  .login-story footer {
    display: none;
  }
  .login-form {
    padding: 32px 24px;
  }
  .login-panel .tabs {
    margin-top: 24px;
  }
  .login-panel h2 {
    font-size: 24px;
  }
  .card-title {
    flex-wrap: wrap;
  }
  .row.right {
    margin-left: 0;
  }
  .board-tools {
    gap: 4px;
  }
  .board-tools button {
    padding: 8px 10px;
  }
  .notice {
    padding: 14px;
  }
  .code {
    font-size: 18px;
  }
  .question-title {
    font-size: 18px;
  }
  .reference {
    font-size: 14px;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161c27;
    --paper: #202837;
    --ink: #eef2fa;
    --muted: #acb7ca;
    --line: #3b465a;
    --blue: #8bb5ff;
    --tint: #293c5a;
    --green: #92d7b0;
    --green-bg: #223a32;
    --orange: #f0bf82;
    --orange-bg: #3e3427;
    --red: #ffaaa5;
    --shadow: 0 4px 20px #0003;
  }
  button.primary {
    background: #356bc4;
    border-color: #356bc4;
    color: #fff;
  }
  .board-wrap {
    border-color: #657086;
  }
  .login-story {
    background: #132e55;
  }
  .login-story .brand {
    color: white;
  }
  .question-num {
    color: var(--blue);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.icon {
  width: 19px;
  height: 19px;
  display: inline-block;
  vertical-align: -4px;
  flex: none;
}
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.assignment-icon .icon {
  width: 24px;
  height: 24px;
}
.board-tools button .icon {
  margin-right: 4px;
}
@media (max-width: 700px) {
  .sticky-actions > .grow {
    flex-basis: 100%;
    min-width: 0;
  }
  .sticky-actions > button {
    flex: 1;
  }
}
/* Classroom practice layout and pen-safe surfaces. */
.practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}
.practice-layout > main,
.submission-rail {
  min-width: 0;
}
.submission-rail {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  overscroll-behavior: contain;
}
.submission-rail > .card {
  padding: 18px;
}
.submission-rail h2 {
  font-size: 20px;
}
.record-card {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.record-card .question-title {
  font-size: 15px;
  margin-top: 12px;
  white-space: pre-wrap;
}
.record-answer,
.exercise-image {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin-top: 12px;
}
.exercise-image {
  max-height: 700px;
}
.record-answer {
  background: #fff;
  border: 1px solid var(--line);
}
.annotation-preview {
  position: relative;
  background: #fff;
  aspect-ratio: 1000 / 440;
  margin-top: 10px;
}
.annotation-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.question-card,
.question-title,
.board-wrap,
.board-tools,
.exercise-image {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.question-card input,
.question-card textarea {
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
}
.board-wrap,
.board-wrap canvas {
  touch-action: none;
  overscroll-behavior: none;
}
.board-wrap canvas {
  display: block;
  cursor: crosshair;
}
.board-wrap img,
.board-hint {
  pointer-events: none;
}
body.inking,
body.inking * {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}
.praise-label {
  color: var(--blue);
  font-weight: 700;
  margin-top: 12px;
}
.upload-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  max-width: 100%;
}
.upload-control input {
  max-width: 100%;
  font-size: 14px;
}
.fireworks-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #14234388, transparent 70%);
}
.celebrate-message {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  width: min(540px, 90vw);
  padding: 28px;
  text-align: center;
  color: #fff;
  background: #122448f2;
  border: 1px solid #ffffff66;
  border-radius: 20px;
  box-shadow: 0 12px 70px #0004;
}
.celebrate-message h2 {
  color: #ffe296;
}
.firework-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 1px;
}
.firework-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffe190;
  box-shadow: 0 0 12px currentColor;
  animation: firework 1.4s ease-out 2 both;
}
.burst-0 {
  left: 20%;
  top: 35%;
  color: #ffcc50;
}
.burst-1 {
  left: 75%;
  top: 30%;
  color: #7adfff;
}
.burst-2 {
  left: 42%;
  top: 65%;
  color: #ffa1d4;
}
.burst-3 {
  left: 80%;
  top: 70%;
  color: #98f7c1;
}
.burst-4 {
  left: 15%;
  top: 77%;
  color: #c7b0ff;
}
.burst-1 .firework-spark,
.burst-3 .firework-spark {
  animation-delay: 0.6s;
}
.burst-2 .firework-spark,
.burst-4 .firework-spark {
  animation-delay: 1.1s;
}
@keyframes firework {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--x), var(--y)) scale(0.3);
    opacity: 0;
  }
}
@media (min-width: 1000px) {
  body:has(.practice-layout) .content {
    max-width: 1600px;
    padding: 30px;
  }
  body:has(.practice-layout) .sidebar {
    width: 175px;
  }
  body:has(.practice-layout) .shell {
    grid-template-columns: 175px minmax(0, 1fr);
  }
}
@media (min-width: 768px) and (max-width: 1100px) {
  .practice-layout {
    grid-template-columns: minmax(0, 1fr) 265px;
    gap: 14px;
  }
  .practice-layout .card {
    padding: 16px;
  }
  .board-tools {
    gap: 4px;
  }
  .board-tools button {
    padding: 7px;
  }
}
@media (max-width: 767px) {
  .practice-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .submission-rail {
    position: static;
    max-height: none;
    overflow: visible;
  }
}
@media (prefers-reduced-motion: reduce) {
  .firework-spark {
    animation: none;
  }
  .fireworks-overlay {
    background: transparent;
  }
}

.ray-0 {
  --x: 150px;
  --y: 0px;
}
.ray-1 {
  --x: 145px;
  --y: 39px;
}
.ray-2 {
  --x: 130px;
  --y: 75px;
}
.ray-3 {
  --x: 106px;
  --y: 106px;
}
.ray-4 {
  --x: 75px;
  --y: 130px;
}
.ray-5 {
  --x: 39px;
  --y: 145px;
}
.ray-6 {
  --x: 0px;
  --y: 150px;
}
.ray-7 {
  --x: -39px;
  --y: 145px;
}
.ray-8 {
  --x: -75px;
  --y: 130px;
}
.ray-9 {
  --x: -106px;
  --y: 106px;
}
.ray-10 {
  --x: -130px;
  --y: 75px;
}
.ray-11 {
  --x: -145px;
  --y: 39px;
}
.ray-12 {
  --x: -150px;
  --y: 0px;
}
.ray-13 {
  --x: -145px;
  --y: -39px;
}
.ray-14 {
  --x: -130px;
  --y: -75px;
}
.ray-15 {
  --x: -106px;
  --y: -106px;
}
.ray-16 {
  --x: -75px;
  --y: -130px;
}
.ray-17 {
  --x: -39px;
  --y: -145px;
}
.ray-18 {
  --x: 0px;
  --y: -150px;
}
.ray-19 {
  --x: 39px;
  --y: -145px;
}
.ray-20 {
  --x: 75px;
  --y: -130px;
}
.ray-21 {
  --x: 106px;
  --y: -106px;
}
.ray-22 {
  --x: 130px;
  --y: -75px;
}
.ray-23 {
  --x: 145px;
  --y: -39px;
}
@media (min-width: 1000px) {
  body:has(.practice-layout) .sidebar {
    padding: 28px 16px;
  }
  body:has(.practice-layout) .nav {
    font-size: 14px;
    padding-left: 8px;
    padding-right: 8px;
    white-space: nowrap;
  }
}

/* Teacher presentation player: static pages, no third-party viewer. */
.cw-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.cw-item:last-child {
  border-bottom: 0;
}
.cw-cover {
  width: 160px;
  height: 90px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.cw-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cw-cover .icon {
  width: 32px;
  height: 32px;
  color: var(--muted);
}
.cw-meta {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.cw-item-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cw-upload-row {
  flex-wrap: wrap;
}
.cw-upload-row input {
  max-width: 100%;
}
.cw-player-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.cw-player-heading h1 {
  font-size: 28px;
  overflow-wrap: anywhere;
}
.cw-player {
  border-radius: 12px;
  overflow: hidden;
  background: #151e2d;
  color: #fff;
  border: 1px solid #303d53;
}
.cw-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: #202d44;
}
.cw-title {
  max-width: 240px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cw-controls button {
  background: #2b3b56;
  color: #fff;
  border-color: #53627a;
  white-space: nowrap;
}
.cw-controls button:hover {
  background: #3d5276;
}
.cw-controls button:disabled {
  cursor: default;
}
.cw-page-label {
  white-space: nowrap;
}
.cw-page-label input {
  width: 66px;
  padding: 7px;
  text-align: center;
  background: #fff;
  color: #202a3b;
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid #a7b7d0;
}
.cw-slide-area {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  height: min(62vh, 760px);
  padding: 12px;
  overflow: hidden;
}
.cw-slide-area img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
}
#cwImageStatus {
  position: absolute;
  bottom: 12px;
  left: 20px;
  right: 20px;
  margin: 0;
  text-align: center;
  background: #202d44d9;
  border-radius: 6px;
}
#cwImageStatus:empty {
  display: none;
}
.cw-hint {
  padding: 9px 18px;
  color: #c4d0e2;
  font-size: 13px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cw-thumbnails {
  display: flex;
  gap: 12px;
  padding: 16px;
  overflow-x: auto;
  background: #202d44;
}
.cw-thumbnails[hidden] {
  display: none;
}
.cw-thumbnails button {
  width: 140px;
  flex: none;
  background: #151e2d;
  color: #fff;
  border: 2px solid #62718a;
  padding: 4px;
}
.cw-thumbnails button.active {
  border-color: #85b2ff;
  background: #284b85;
}
.cw-thumbnails img {
  display: block;
  width: 128px;
  height: 72px;
  object-fit: contain;
}
.cw-player:fullscreen {
  width: 100vw;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}
.cw-player:fullscreen .cw-slide-area {
  flex: 1;
  min-height: 0;
  height: 0;
}
.cw-player:fullscreen .cw-controls,
.cw-player:fullscreen .cw-thumbnails,
.cw-player:fullscreen .cw-hint {
  flex-shrink: 0;
}
@media (max-width: 1100px) {
  .cw-item {
    flex-wrap: wrap;
  }
  .cw-item-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .cw-title {
    display: none;
  }
  .cw-player-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .cw-player-heading .row {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  .cw-item {
    gap: 12px;
  }
  .cw-cover {
    width: 112px;
    height: 68px;
  }
  .cw-controls {
    padding: 10px;
    gap: 10px;
  }
  .cw-controls button {
    padding: 8px;
    font-size: 13px;
  }
  .cw-slide-area {
    height: 40vh;
    min-height: 180px;
  }
  .cw-hint {
    font-size: 12px;
  }
  .cw-player-heading h1 {
    font-size: 24px;
  }
}

.assignment-actions { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
@media(max-width: 700px) { .assignment-actions { width: 100%; margin-left: 0; justify-content: flex-start; } }
@media(max-width: 700px) { .assignment > .assignment-actions { grid-column: 2; } }

/* Generic classroom identity and teacher submission preview */
.generic-logo { font-style: normal; }
.generic-logo .icon { width: 30px; height: 30px; }
.classroom-illustration { margin: 28px 0 16px; max-width: 560px; }
.classroom-art { width: 100%; height: auto; display: block; }
.record-filters { display: flex; gap: 14px; flex-wrap: wrap; }
.record-filters label { min-width: 130px; }
.submission-thumb { width: 154px; height: 112px; padding: 6px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-align: left; }
.submission-thumb img { width: 140px; height: 74px; object-fit: contain; background: #f6f8fc; }
.text-thumb { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; height: 74px; font-size: 13px; line-height: 23px; white-space: pre-wrap; overflow-wrap: anywhere; color: #253651; }
.thumb-caption { font-size: 11px; color: #506583; text-align: center; }
.answer-preview-dialog { width: min(1000px, 94vw); max-width: 94vw; max-height: 92dvh; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: #202c40; box-shadow: 0 24px 90px #0005; }
.answer-preview-dialog::backdrop { background: #10213c99; }
.answer-preview-dialog h2 { font-size: 21px; }
.preview-scroll { max-height: 65dvh; overflow: auto; margin-top: 20px; }
.full-answer-preview { display: block; width: 100%; height: auto; background: #f6f8fc; border: 1px solid var(--line); margin-top: 10px; }
.preview-actions { margin-top: 18px; flex-wrap: wrap; }
@media(max-width: 760px) { .record-filters { width: 100%; } .record-filters label { flex: 1; min-width: 110px; } .answer-preview-dialog { padding: 16px; } .classroom-illustration { max-width: 360px; margin: 14px 0; } }

.review-navigation { margin: 0 0 22px; flex-wrap: wrap; }
