.assignment-submit-panel { display: flex; flex: 1 1 auto; flex-direction: column; gap: 0.9rem; min-height: 0; overflow: hidden; padding: 1.35rem; border: 1px solid rgba(148, 163, 184, 0.24); border-radius: 1rem; background: rgba(255, 255, 255, 0.97); box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1); }
.assignment-submit-content { display: flex; flex: 1 1 auto; flex-direction: column; gap: 0.9rem; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.assignment-response-label { color: #334155; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.assignment-restore-draft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid #16a34a;
  border-radius: 0.5rem;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.assignment-restore-draft-button:hover {
  background: #bbf7d0;
}
.assignment-editor { display: flex; flex: 1 1 0; flex-direction: column; min-height: 12rem; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 0.75rem; background: #fff; }
.assignment-editor:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14); }
.assignment-editor-toolbar { display: flex; flex: 0 0 auto; align-items: center; gap: 0.35rem; padding: 0.45rem 0.55rem; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.assignment-editor-tool { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border: 1px solid transparent; border-radius: 0.45rem; background: transparent; color: #334155; cursor: pointer; }
.assignment-editor-tool { transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.assignment-editor-tool:hover:not([aria-pressed="true"]) { border-color: #dbe4ee !important; background: #eef3f8 !important; color: #173b61 !important; }
.assignment-editor-tool[aria-pressed="true"] { border-color: #002147 !important; background: #002147 !important; color: #fff !important; box-shadow: 0 2px 5px rgba(0, 33, 71, 0.2); }
.assignment-editor-tool:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.assignment-editor-toolbar-divider { width: 1px; height: 1.4rem; margin: 0 0.2rem; background: #cbd5e1; }
.assignment-save-draft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: auto;
  height: 2.2rem;
  padding: 0 0.65rem;
  border: 1px solid #002147;
  border-radius: 0.45rem;
  background: #002147;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  transition: background 0.15s ease;
}
.assignment-save-draft-button:hover {
  background: #003366;
}
.assignment-save-draft-button span {
  display: inline-block;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.assignment-save-draft-button.saving i {
  animation: spin 1s linear infinite;
}
.app-dark .assignment-save-draft-button {
  border-color: #fff;
  background: #fff;
  color: #002147;
}
.app-dark .assignment-save-draft-button:hover {
  background: #e2e8f0;
}
.assignment-response-editor { box-sizing: border-box; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0.9rem 1rem; color: #0f172a; font: inherit; font-size: 0.92rem; line-height: 1.6; text-align: start; overflow-wrap: anywhere; outline: none; }
.assignment-response-editor:empty::before { content: attr(data-placeholder); color: #94a3b8; pointer-events: none; }
.assignment-response-editor ul, .assignment-response-editor ol { display: block; margin: 0.5rem 0; padding-inline-start: 1.5rem; }
.assignment-response-editor ul { list-style: disc outside; }
.assignment-response-editor ol { list-style: decimal outside; }
.assignment-response-editor li { display: list-item; padding-inline-start: 0.15rem; }
.assignment-response-editor p { margin: 0 0 0.5rem; }
.assignment-response-editor p:last-child { margin-bottom: 0; }
.assignment-attachment-section { display: flex; flex-direction: column; align-items: stretch; gap: 0.55rem; padding: 1rem; border: 1px dashed #94a3b8; border-radius: 0.8rem; background: #f8fafc; }
.assignment-attachment-section.is-drag-over { border-color: #2563eb; background: #eff6ff; box-shadow: inset 0 0 0 1px #2563eb; }
.assignment-attachment-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.assignment-attachment-section > p { margin: 0; color: #64748b; font-size: 0.78rem; }
.assignment-attachment-section > #assignment-attachment-hint[hidden] { display: none; }
.assignment-attachment-drop-hint { display: none; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.5rem; border: 1px dashed #60a5fa; border-radius: 0.6rem; color: #1d4ed8 !important; font-weight: 800; }
.assignment-attachment-section.is-drag-over .assignment-attachment-drop-hint:not([hidden]) { display: flex; }
.assignment-attachment-feedback { margin: 0; color: #64748b; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.assignment-attachment-upload-feedback:not(:empty) { color: #b91c1c; }
.assignment-attachment-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 2.4rem; padding: 0.5rem 0.8rem; border: 1px solid #cbd5e1; border-radius: 0.7rem; background: #fff; color: #334155; font: inherit; font-size: 0.78rem; font-weight: 800; cursor: pointer; transition: background 0.18s ease, transform 0.18s ease; }
.assignment-attachment-button:hover { background: #f1f5f9; transform: translateY(-1px); }
.assignment-attachment-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); gap: 0.55rem; width: 100%; margin: 0; padding: 0; list-style: none; }
.assignment-attachment-card { position: relative; display: flex; min-width: 0; flex-direction: column; align-items: stretch; gap: 0.45rem; padding: 0.45rem; border: 1px solid #e2e8f0; border-radius: 0.65rem; background: #fff; color: #334155; }
.assignment-attachment-preview { display: grid; width: 100%; aspect-ratio: 4 / 3; place-items: center; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 0.45rem; background: #f1f5f9; color: #64748b; font-size: 1.5rem; }
.assignment-attachment-preview img { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; background: #fff; }
.assignment-attachment-document-thumbnail { display: flex; width: 42%; height: 84%; flex-direction: column; gap: 0.4rem; padding: 0.35rem; border: 1px solid #dbe4ee; border-radius: 0.2rem; background: #fff; box-shadow: 0 2px 5px rgba(15, 23, 42, 0.12); }
.assignment-attachment-document-heading { display: flex; align-items: center; gap: 0.2rem; color: #002147; font-size: 0.46rem; font-weight: 800; }
.assignment-attachment-document-heading i { font-size: 0.52rem; }
.assignment-attachment-document-lines { display: grid; gap: 0.22rem; }
.assignment-attachment-document-lines span { height: 2px; border-radius: 2px; background: #cbd5e1; }
.assignment-attachment-document-lines span:nth-child(3) { width: 78%; }
.assignment-attachment-document-lines span:nth-child(4) { width: 56%; }
.assignment-attachment-details { display: flex; min-width: 0; flex-direction: column; gap: 0.15rem; padding: 0 0.1rem 0.1rem; }
.assignment-attachment-name { display: block; overflow: hidden; color: #334155; font-size: 0.72rem; font-weight: 800; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.assignment-attachment-meta { color: #64748b; font-size: 0.66rem; }
.assignment-remove-attachment { position: absolute; top: 0.65rem; right: 0.65rem; display: inline-flex; align-items: center; justify-content: center; width: 1.65rem; height: 1.65rem; border: 1px solid rgba(148, 163, 184, 0.35); border-radius: 50%; background: rgba(255, 255, 255, 0.94); color: #64748b; cursor: pointer; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18); }
.assignment-remove-attachment:hover { background: #fee2e2; color: #b91c1c; }
@media (hover: hover) {
  .assignment-remove-attachment { opacity: 0; transition: opacity 140ms ease, background 140ms ease, color 140ms ease; }
  .assignment-attachment-card:hover .assignment-remove-attachment,
  .assignment-attachment-card:focus-within .assignment-remove-attachment { opacity: 1; }
}
.assignment-submission-notice { display: flex; align-items: center; justify-content: center; gap: 0.65rem; margin: 0; padding: 0.7rem 0.85rem; border: 1px solid #bfdbfe; border-radius: 0.65rem; background: #eff6ff; color: #1e3a5f; font-size: 0.78rem; font-weight: 700; text-align: center; }
.assignment-submission-notice[hidden] { display: none; }
.assignment-submission-notice > i { flex: 0 0 auto; color: #b45309; font-size: 1rem; }
.assignment-submission-notice > span { text-align: center; }
.assignment-submit-panel .assignment-primary-button:disabled { cursor: not-allowed !important; opacity: 0.58; transform: none; }
.assignment-submit-panel .assignment-primary-button:disabled:hover { cursor: not-allowed !important; transform: none; }
.assignment-submit-panel.is-read-only .assignment-attachment-button.is-disabled,
.assignment-submit-panel.is-read-only #assignment-video-file-label.is-disabled { opacity: 0.55; pointer-events: none; }
.assignment-submit-error { min-height: 1.2rem; margin: 0; color: #b91c1c; font-size: 0.8rem; }
.assignment-submit-error:empty { display: none; }
.assignment-submit-panel .assignment-detail-actions { display: flex; justify-content: flex-end; }
#assignment-text-response { display: flex; flex: 1 1 0; flex-direction: column; gap: 0.9rem; min-height: 0; }
#assignment-text-response[hidden],
.assignment-media-section[hidden],
.assignment-media-preview[hidden],
.assignment-progress-overlay[hidden],
.assignment-upload-details[hidden] { display: none; }
.assignment-media-section { display: flex; flex: 1 1 0; flex-direction: column; gap: 0.75rem; min-height: 0; padding: 1rem; border: 1px solid rgba(148,163,184,0.24); border-radius: 0.9rem; background: #f8fafc; }
.assignment-media-help { margin: -0.45rem 0 0; color: #64748b; font-size: 0.82rem; }
.assignment-media-controls, .assignment-media-preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.assignment-media-controls button:disabled { opacity: 0.55; cursor: not-allowed; }
.assignment-recording-timer { min-width: 3.8rem; color: #b91c1c; font-variant-numeric: tabular-nums; font-size: 1rem; font-weight: 800; }
.assignment-media-preview { display: flex; flex-direction: column; align-items: flex-start; gap: 0.65rem; min-height: 0; }
.assignment-media-preview audio { width: min(100%, 32rem); }
.assignment-media-preview video { width: min(100%, 42rem); max-height: 24rem; border-radius: 0.75rem; background: #0f172a; }
.assignment-media-filename { min-width: 0; color: #475569; font-size: 0.8rem; overflow-wrap: anywhere; }
.assignment-progress-overlay { position: fixed; z-index: 300; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(15, 23, 42, 0.5); }
.assignment-progress-card { display: flex; box-sizing: border-box; flex-direction: column; justify-content: center; width: min(28rem, calc(100vw - 2rem)); min-height: 18rem; padding: 2rem; border: 1px solid rgba(148,163,184,0.3); border-radius: 1.25rem; background: #fff; color: #0f172a; text-align: center; box-shadow: 0 24px 70px rgba(15,23,42,0.28); }
.assignment-progress-icon { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin: 0 auto 1rem; border-radius: 50%; background: #eff6ff; color: #002147; font-size: 1.8rem; }
.assignment-progress-card h2 { margin: 0; color: #0f172a; font-size: 1.35rem; font-weight: 800; line-height: 1.3; }
.assignment-progress-card > p { margin: 0.55rem 0 1.35rem; color: #64748b; font-size: 0.84rem; line-height: 1.5; }
.assignment-progress-track { width: 100%; height: 0.65rem; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.assignment-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #002147, #3b82f6); transition: width 100ms linear; }
.assignment-upload-details { margin-bottom: 0.8rem; text-align: left; }
.assignment-upload-progress-label { display: flex; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.45rem; color: #334155; font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.assignment-upload-details > p { margin: 0.55rem 0 0; color: #64748b; font-size: 0.7rem; line-height: 1.4; }
@media (max-width: 480px) {
  .assignment-progress-card { padding: 1.5rem 1.1rem; }
}

.app-dark #page-assignment-submit .assignment-response-label {
  color: #dbeafe;
}
.app-dark #page-assignment-submit .assignment-editor {
  border-color: #24466b;
  background: #002147;
}
.app-dark #page-assignment-submit .assignment-editor:focus-within {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96,165,250,0.18);
}
.app-dark #page-assignment-submit .assignment-editor-toolbar {
  border-color: #24466b;
  background: #0b3158;
}
.app-dark #page-assignment-submit .assignment-editor-tool {
  color: #dbeafe;
}
.app-dark #page-assignment-submit .assignment-editor-tool:hover:not([aria-pressed="true"]) {
  border-color: #4777a8 !important;
  background: #194b78 !important;
  color: #ffffff !important;
}
.app-dark #page-assignment-submit .assignment-editor-tool[aria-pressed="true"] {
  border-color: #ffffff !important;
  background: #ffffff !important;
  color: #002147 !important;
}
.app-dark #page-assignment-submit .assignment-editor-toolbar-divider {
  background: #4777a8;
}
.app-dark #page-assignment-submit .assignment-response-editor {
  background: #002147;
  color: #f1f5f9;
  caret-color: #ffffff;
}
.app-dark #page-assignment-submit .assignment-response-editor:empty::before {
  color: #9aabc0;
}
.app-dark #page-assignment-submit .assignment-attachment-section {
  border-color: #4777a8;
  background: #002147;
}
.app-dark #page-assignment-submit .assignment-attachment-section.is-drag-over {
  border-color: #60a5fa;
  background: #102946;
  box-shadow: inset 0 0 0 1px #60a5fa;
}
.app-dark #page-assignment-submit .assignment-attachment-drop-hint {
  border-color: #60a5fa;
  color: #bfdbfe !important;
}
.app-dark #page-assignment-submit .assignment-attachment-section > p,
.app-dark #page-assignment-submit .assignment-attachment-feedback,
.app-dark #page-assignment-submit .assignment-attachment-meta {
  color: #a8b6c8;
}
.app-dark #page-assignment-submit .assignment-attachment-upload-feedback:not(:empty) { color: #fda4af; }
.app-dark #page-assignment-submit .assignment-attachment-button {
  border-color: #24466b;
  background: #0b3158;
  color: #e2e8f0;
}
.app-dark #page-assignment-submit .assignment-attachment-button:hover {
  background: #123b65;
}
.app-dark #page-assignment-submit .assignment-attachment-card {
  border-color: #24466b;
  background: #0b3158;
  color: #e2e8f0;
}
.app-dark #page-assignment-submit .assignment-attachment-preview { border-color: #24466b; background: #001a38; color: #bfdbfe; }
.app-dark #page-assignment-submit .assignment-attachment-document-thumbnail { border-color: #cbd5e1; background: #fff; color: #002147; }
.app-dark #page-assignment-submit .assignment-attachment-document-lines span { background: #cbd5e1; }
.app-dark #page-assignment-submit .assignment-attachment-name { color: #e2e8f0; }
.app-dark #page-assignment-submit .assignment-submission-notice { border-color: #24466b; background: #0b3158; color: #dbeafe; }
.app-dark #page-assignment-submit .assignment-submission-notice > i { color: #fbbf24; }
.app-dark #page-assignment-submit .assignment-remove-attachment {
  border-color: #24466b;
  background: rgba(0, 26, 56, 0.94);
  color: #a8b6c8;
}
.app-dark #page-assignment-submit .assignment-remove-attachment:hover {
  background: #4a2938;
  color: #fecdd3;
}
.app-dark #page-assignment-submit .assignment-submit-error {
  color: #fda4af;
}
.app-dark #page-assignment-submit .assignment-media-section {
  border-color: #24466b;
  background: #002147;
}
.app-dark #page-assignment-submit .assignment-media-help,
.app-dark #page-assignment-submit .assignment-media-filename {
  color: #a8b6c8;
}
.app-dark #page-assignment-submit .assignment-progress-card {
  border-color: #24466b;
  background: #001a38;
  color: #e2e8f0;
}
.app-dark #page-assignment-submit .assignment-progress-card h2 {
  color: #f1f5f9;
}
.app-dark #page-assignment-submit .assignment-progress-card > p,
.app-dark #page-assignment-submit .assignment-upload-details > p {
  color: #a8b6c8;
}
.app-dark #page-assignment-submit .assignment-progress-icon {
  background: #002147;
  color: #93c5fd;
}
.app-dark #page-assignment-submit .assignment-progress-track {
  background: #123b65;
}
.app-dark #page-assignment-submit .assignment-progress-track span {
  background: linear-gradient(90deg, #60a5fa, #bfdbfe);
}
.app-dark #page-assignment-submit .assignment-upload-progress-label {
  color: #dbeafe;
}
.app-dark #page-assignment-submit .assignment-primary-button {
  border-color: #ffffff;
  background: #ffffff;
  color: #002147;
}
.app-dark #page-assignment-submit .assignment-primary-button:hover {
  border-color: #e2e8f0;
  background: #e2e8f0;
}

@media (max-width: 520px) {
  .assignment-submit-panel { padding: 1rem; }
  .assignment-submit-panel .assignment-detail-actions,
  .assignment-submit-panel .assignment-primary-button { width: 100%; }
}

@media (max-height: 640px) {
  .assignment-submit-panel { gap: 0.65rem; padding: 1rem; }
  .assignment-attachment-section { padding: 0.75rem; }
}

#assignment-text-response { display: flex; flex: 1 1 0; flex-direction: column; gap: 0.9rem; min-height: 0; }
#assignment-text-response[hidden],
.assignment-media-section[hidden],
.assignment-media-preview[hidden],
.assignment-progress-overlay[hidden],
.assignment-upload-details[hidden],
.assignment-audio-studio[hidden],
.assignment-video-choice-area[hidden],
.assignment-media-status[hidden] { display: none; }
.assignment-media-section { display: flex; flex: 0 0 auto; flex-direction: column; gap: 0.75rem; min-height: 0; padding: clamp(0.85rem, 2vw, 1.15rem); border: 1px solid #dbe4ee; border-radius: 1rem; background: linear-gradient(145deg, #fff 0%, #f8fafc 100%); }
.assignment-media-heading { display: flex; align-items: center; gap: 0.8rem; padding-bottom: 0.7rem; border-bottom: 1px solid #e2e8f0; }
.assignment-media-heading-icon { display: grid; flex: 0 0 auto; place-items: center; width: 3rem; height: 3rem; border: 1px solid #dbeafe; border-radius: 0.9rem; background: #eff6ff; color: #002147; font-size: 1.15rem; }
.assignment-media-eyebrow { margin: 0 0 0.12rem !important; color: #64748b !important; font-size: 0.66rem !important; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.assignment-media-heading h2 { margin: 0; color: #0f172a; font-size: 1.15rem; font-weight: 800; }
.assignment-media-heading > div > p:last-child { margin: 0.2rem 0 0; color: #64748b; font-size: 0.82rem; line-height: 1.45; }
.assignment-media-section > .assignment-submit-error:empty { display: none; }
.assignment-media-status { display: flex; align-items: center; gap: 0.55rem; min-height: 2.7rem; padding: 0.6rem 0.8rem; border: 1px solid #e2e8f0; border-radius: 0.7rem; background: #fff; color: #475569; font-size: 0.8rem; font-weight: 700; }
.assignment-media-status-dot { width: 0.55rem; height: 0.55rem; flex: 0 0 auto; border-radius: 50%; background: #94a3b8; }
.assignment-media-status.is-recording .assignment-media-status-dot,
.assignment-video-recording-status:not([hidden]) .assignment-media-status-dot { background: #dc2626; box-shadow: 0 0 0 0 rgba(220,38,38,0.35); animation: assignment-recording-pulse 1.4s ease-out infinite; }
.assignment-recording-timer { min-width: 3.8rem; margin-left: auto; color: #0f172a; font-variant-numeric: tabular-nums; font-size: 0.9rem; font-weight: 800; text-align: right; }
.assignment-recording-timer[hidden] { display: none; }
.assignment-audio-studio { display: flex; flex: 0 0 auto; flex-direction: column; justify-content: center; gap: 1.2rem; width: min(100%, 40rem); margin: 0 auto; }
.assignment-audio-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; min-height: 12rem; border: 1px dashed #cbd5e1; border-radius: 0.9rem; background: rgba(255,255,255,0.7); }
.assignment-record-button { display: inline-flex; align-items: center; gap: 0.7rem; min-height: 3.1rem; padding: 0.6rem 1.15rem 0.6rem 0.7rem; border: 1px solid #002147; border-radius: 999px; background: #002147; color: #fff; font: inherit; font-size: 0.86rem; font-weight: 800; cursor: pointer; box-shadow: 0 7px 18px rgba(0,33,71,0.16); transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.assignment-record-button:hover { transform: translateY(-1px); background: #123b65; box-shadow: 0 10px 22px rgba(0,33,71,0.2); }
.assignment-record-button-icon { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: rgba(255,255,255,0.16); }
.assignment-stop-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.5rem; padding: 0.55rem 0.9rem; border: 1px solid #fecaca; border-radius: 0.7rem; background: #fff7f7; color: #b42318; font: inherit; font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.assignment-stop-button:disabled { opacity: 0.48; cursor: not-allowed; }
.assignment-recording-hint { margin: 0; color: #94a3b8; font-size: 0.73rem; text-align: center; }
.assignment-media-preview { display: flex; flex-direction: column; gap: 0.9rem; min-height: 0; padding: 1rem; border: 1px solid #dbe4ee; border-radius: 0.9rem; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,0.06); }
.assignment-preview-heading { display: flex; align-items: center; gap: 0.7rem; }
.assignment-preview-icon { display: grid; flex: 0 0 auto; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; background: #eff6ff; color: #002147; }
.assignment-preview-heading > div { display: flex; min-width: 0; flex-direction: column; gap: 0.12rem; }
.assignment-preview-heading strong { color: #0f172a; font-size: 0.86rem; }
.assignment-preview-heading > div > span { color: #64748b; font-size: 0.72rem; }
.assignment-preview-ready { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: auto; color: #15803d; font-size: 0.7rem; font-weight: 800; white-space: nowrap; }
.assignment-audio-preview audio { display: block; width: 100%; }
.assignment-video-preview video { display: block; width: min(100%, 52rem); max-height: min(52vh, 30rem); margin: 0 auto; border-radius: 0.75rem; background: #0f172a; }
.assignment-media-preview-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; padding-top: 0.7rem; border-top: 1px solid #eef2f6; }
.assignment-preview-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 2.2rem; padding: 0.45rem 0.7rem; border: 1px solid #dbe4ee; border-radius: 0.6rem; background: #fff; color: #334155; font: inherit; font-size: 0.74rem; font-weight: 800; cursor: pointer; }
.assignment-preview-secondary:hover { border-color: #93c5fd; background: #eff6ff; color: #002147; }
.assignment-video-choice-area { display: flex; flex: 0 0 auto; flex-direction: column; justify-content: center; gap: 1rem; }
.assignment-video-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.9rem; width: min(100%, 52rem); margin: 0 auto; }
.assignment-video-choice-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; min-height: 0; padding: 0.85rem; border: 1px solid #dbe4ee; border-radius: 0.9rem; background: #fff; box-shadow: 0 6px 18px rgba(15,23,42,0.04); }
.assignment-video-choice-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 0.7rem; background: #eff6ff; color: #002147; font-size: 0.9rem; }
.assignment-video-choice-card h3 { margin: 0.25rem 0 0; color: #0f172a; font-size: 0.95rem; font-weight: 800; }
.assignment-video-choice-card p { margin: 0; color: #64748b; font-size: 0.78rem; line-height: 1.5; }
.assignment-choice-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; min-height: 2.55rem; padding: 0.55rem 0.75rem; border: 1px solid #002147; border-radius: 0.65rem; background: #002147; color: #fff; font: inherit; font-size: 0.77rem; font-weight: 800; text-align: center; cursor: pointer; transition: background 160ms ease, transform 160ms ease; }
.assignment-choice-button:hover { transform: translateY(-1px); background: #123b65; }
.assignment-video-choice-card > .assignment-stop-button { width: 100%; }
.assignment-video-recording-status { width: 100%; }
.assignment-media-filename { min-width: 0; margin-right: auto; color: #475569; font-size: 0.76rem; overflow-wrap: anywhere; }
.assignment-submit-panel > .assignment-detail-actions { flex: 0 0 auto; padding-top: 0.85rem; border-top: 1px solid #e2e8f0; }
#assignment-video-recorder { flex: 0 0 auto; }
.assignment-video-choice-card { min-height: 10rem; }
.assignment-stop-button[hidden] { display: none; }
#page-assignment-submit .assignment-detail-header { padding: 0.8rem 1.1rem; }
#page-assignment-submit .assignment-detail-header h1 { font-size: 1.5rem; }
#assignment-submission-form.is-media-submission { gap: 0.6rem; padding: 0.85rem; }
#assignment-submission-form.is-media-submission > .assignment-detail-actions { padding-top: 0.6rem; }
@keyframes assignment-recording-pulse { 70% { box-shadow: 0 0 0 0.45rem rgba(220,38,38,0); } 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); } }

.app-dark #page-assignment-submit .assignment-media-section { border-color: #24466b; background: linear-gradient(145deg, #001a38 0%, #002147 100%); }
.app-dark #page-assignment-submit .assignment-media-heading { border-color: #24466b; }
.app-dark #page-assignment-submit .assignment-media-heading h2,
.app-dark #page-assignment-submit .assignment-preview-heading strong,
.app-dark #page-assignment-submit .assignment-video-choice-card h3 { color: #f1f5f9; }
.app-dark #page-assignment-submit .assignment-media-heading > div > p:last-child,
.app-dark #page-assignment-submit .assignment-preview-heading > div > span,
.app-dark #page-assignment-submit .assignment-video-choice-card p { color: #a8b6c8; }
.app-dark #page-assignment-submit .assignment-media-heading-icon,
.app-dark #page-assignment-submit .assignment-preview-icon,
.app-dark #page-assignment-submit .assignment-video-choice-icon { border-color: #24466b; background: #0b3158; color: #bfdbfe; }
.app-dark #page-assignment-submit .assignment-media-status,
.app-dark #page-assignment-submit .assignment-audio-action,
.app-dark #page-assignment-submit .assignment-media-preview,
.app-dark #page-assignment-submit .assignment-video-choice-card { border-color: #24466b; background: #001a38; color: #dbeafe; }
.app-dark #page-assignment-submit .assignment-recording-timer { color: #f1f5f9; }
.app-dark #page-assignment-submit .assignment-recording-hint { color: #8295ad; }
.app-dark #page-assignment-submit .assignment-preview-secondary { border-color: #24466b; background: #002147; color: #dbeafe; }
.app-dark #page-assignment-submit .assignment-preview-secondary:hover { border-color: #4777a8; background: #0b3158; color: #fff; }
.app-dark #page-assignment-submit .assignment-media-preview-actions { border-color: #24466b; }
.app-dark #page-assignment-submit .assignment-media-filename { color: #a8b6c8; }
.app-dark #page-assignment-submit .assignment-stop-button { border-color: #773540; background: #321e29; color: #fda4af; }
.app-dark #page-assignment-submit .assignment-submit-panel > .assignment-detail-actions { border-color: #24466b; }

.assignment-audio-studio { width: min(100%, 46rem); gap: 0.8rem; }
.assignment-audio-studio .assignment-media-status { min-height: 0; padding: 0; border: 0; background: transparent; color: #64748b; }
.assignment-audio-studio .assignment-audio-action { min-height: 0; padding: 1rem 0; border: 0; border-radius: 0; background: transparent; }
.assignment-audio-studio .assignment-recording-hint { margin-top: 0.1rem; }
.assignment-audio-preview { gap: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.assignment-audio-player { display: grid; grid-template-columns: 2.75rem minmax(0,1fr) auto; align-items: center; gap: 1rem; }
.assignment-audio-play-button { display: grid; flex: 0 0 auto; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: #002147; color: #fff; font-size: 0.9rem; cursor: pointer; box-shadow: 0 5px 12px rgba(0,33,71,0.16); transition: transform 150ms ease, background 150ms ease; }
.assignment-audio-play-button:hover { transform: translateY(-1px); background: #123b65; }
.assignment-audio-track { display: flex; min-width: 0; flex-direction: column; gap: 0.4rem; }
.assignment-audio-waveform { display: flex; align-items: center; justify-content: space-between; gap: 3px; height: 2.3rem; overflow: hidden; }
.assignment-audio-waveform span { display: block; flex: 1 1 2px; min-width: 2px; max-width: 5px; height: var(--wave-height); border-radius: 99px; background: #cbd5e1; transition: background-color 100ms linear; }
.assignment-audio-waveform span.is-played { background: #2563eb; }
.assignment-audio-seek { width: 100%; height: 0.32rem; margin: 0; border-radius: 99px; outline: none; appearance: none; background: linear-gradient(to right, #2563eb 0 var(--audio-progress, 0%), #e2e8f0 var(--audio-progress, 0%) 100%); cursor: pointer; }
.assignment-audio-seek::-webkit-slider-thumb { width: 0.8rem; height: 0.8rem; border: 2px solid #fff; border-radius: 50%; appearance: none; background: #002147; box-shadow: 0 1px 5px rgba(15,23,42,0.3); }
.assignment-audio-seek::-moz-range-thumb { width: 0.6rem; height: 0.6rem; border: 2px solid #fff; border-radius: 50%; background: #002147; box-shadow: 0 1px 5px rgba(15,23,42,0.3); }
.assignment-audio-time { min-width: 5.6rem; color: #64748b; font-size: 0.72rem; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.assignment-audio-player-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid #e2e8f0; }
.assignment-audio-player-caption { display: inline-flex; align-items: center; gap: 0.4rem; color: #64748b; font-size: 0.74rem; }
.assignment-audio-player-caption i { color: #16a34a; }
.assignment-audio-player-actions { display: flex; align-items: center; gap: 0.45rem; }
.assignment-audio-tool-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-width: 2.8rem; min-height: 2.1rem; padding: 0.35rem 0.55rem; border: 1px solid transparent; border-radius: 0.55rem; background: transparent; color: #475569; font: inherit; font-size: 0.74rem; font-weight: 800; cursor: pointer; transition: border-color 150ms ease, background 150ms ease, color 150ms ease; }
.assignment-audio-tool-button:hover { border-color: #dbe4ee; background: #f8fafc; color: #002147; }
.assignment-audio-action-divider { width: 1px; height: 1.2rem; background: #e2e8f0; }
.app-dark #page-assignment-submit .assignment-audio-studio .assignment-media-status { background: transparent; color: #a8b6c8; }
.app-dark #page-assignment-submit .assignment-audio-studio .assignment-audio-action { background: transparent; }
.app-dark #page-assignment-submit .assignment-audio-play-button { background: #fff; color: #002147; }
.app-dark #page-assignment-submit .assignment-audio-play-button:hover { background: #dbeafe; }
.app-dark #page-assignment-submit .assignment-audio-waveform span { background: #24466b; }
.app-dark #page-assignment-submit .assignment-audio-waveform span.is-played { background: #60a5fa; }
.app-dark #page-assignment-submit .assignment-audio-seek { background: linear-gradient(to right, #60a5fa 0 var(--audio-progress, 0%), #24466b var(--audio-progress, 0%) 100%); }
.app-dark #page-assignment-submit .assignment-audio-seek::-webkit-slider-thumb { background: #bfdbfe; }
.app-dark #page-assignment-submit .assignment-audio-seek::-moz-range-thumb { background: #bfdbfe; }
.app-dark #page-assignment-submit .assignment-audio-time,
.app-dark #page-assignment-submit .assignment-audio-player-caption { color: #a8b6c8; }
.app-dark #page-assignment-submit .assignment-audio-player-footer { border-color: #24466b; }
.app-dark #page-assignment-submit .assignment-audio-tool-button { color: #cbd5e1; }
.app-dark #page-assignment-submit .assignment-audio-tool-button:hover { border-color: #24466b; background: #002147; color: #fff; }
.app-dark #page-assignment-submit .assignment-audio-action-divider { background: #24466b; }

@media (max-width: 600px) {
  .assignment-video-choice-grid { grid-template-columns: minmax(0,1fr); }
  .assignment-video-choice-card { min-height: 0; }
  .assignment-media-section { padding: 0.85rem; }
  .assignment-media-heading { align-items: flex-start; }
  .assignment-media-heading-icon { width: 2.6rem; height: 2.6rem; }
  .assignment-media-heading h2 { font-size: 1rem; }
  .assignment-audio-action { min-height: 0; }
  .assignment-audio-player { grid-template-columns: 2.5rem minmax(0,1fr); gap: 0.7rem; }
  .assignment-audio-play-button { width: 2.5rem; height: 2.5rem; }
  .assignment-audio-time { grid-column: 2; justify-self: end; margin-top: -0.2rem; }
  .assignment-audio-player-footer { align-items: flex-start; flex-direction: column; }
  .assignment-audio-player-actions { align-self: flex-end; }
}

.assignment-submit-panel { flex: 1 1 auto; }
#assignment-text-response { flex: 0 0 auto; }
.assignment-editor { flex: 0 0 15rem; }
#assignment-text-response[hidden] { display: none; }
.assignment-submit-panel > .assignment-detail-actions { margin-top: auto; }
#assignment-audio-recorder,
#assignment-audio-preview { flex: 1 1 auto; }

.assignment-audio-studio { flex: 1 1 auto; width: 100%; max-width: none; gap: 0; }
.assignment-audio-capture-card { display: flex; flex-direction: column; gap: 0.85rem; padding: 1rem 1.1rem; border: 1px solid #dbe4ee; border-radius: 0.85rem; background: #fff; }
.assignment-audio-capture-status { display: flex; align-items: center; gap: 0.5rem; min-height: 1.5rem; color: #64748b; font-size: 0.75rem; font-weight: 800; }
.assignment-audio-capture-status .assignment-media-status-dot { width: 0.5rem; height: 0.5rem; }
.assignment-audio-capture-status.is-recording { color: #b42318; }
.assignment-audio-capture-status.is-recording .assignment-media-status-dot { background: #dc2626; }
.assignment-audio-capture-main { display: flex; align-items: center; gap: 0.8rem; }
.assignment-audio-capture-icon { display: grid; flex: 0 0 auto; place-items: center; width: 2.65rem; height: 2.65rem; border-radius: 0.75rem; background: #eff6ff; color: #002147; font-size: 0.95rem; }
.assignment-audio-capture-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 0.2rem; }
.assignment-audio-capture-copy strong { color: #0f172a; font-size: 0.86rem; font-weight: 800; }
.assignment-audio-capture-copy > span { color: #64748b; font-size: 0.74rem; line-height: 1.4; }
.assignment-audio-capture-actions { display: flex; flex: 0 0 auto; align-items: center; }
.assignment-audio-capture-actions .assignment-record-button,
.assignment-audio-capture-actions .assignment-audio-finish-button { min-height: 2.45rem; }
.assignment-audio-capture-actions .assignment-record-button { gap: 0.5rem; padding: 0.45rem 0.85rem; border-radius: 0.65rem; font-size: 0.76rem; box-shadow: none; }
.assignment-audio-finish-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.45rem 0.8rem; border: 1px solid #fecaca; border-radius: 0.65rem; background: #fff7f7; color: #b42318; font: inherit; font-size: 0.76rem; font-weight: 800; cursor: pointer; }
.assignment-audio-finish-button:hover { border-color: #fca5a5; background: #fee2e2; }
.assignment-audio-finish-button:disabled { opacity: 0.5; cursor: not-allowed; }
.assignment-audio-finish-button[hidden] { display: none; }
.assignment-audio-live-waveform { display: flex; align-items: center; justify-content: center; gap: 3px; height: 2rem; padding: 0 0.4rem; overflow: hidden; border-radius: 0.5rem; background: #f8fafc; }
.assignment-audio-live-waveform[hidden] { display: none; }
.assignment-audio-live-waveform span { display: block; flex: 1 1 2px; min-width: 2px; max-width: 5px; height: var(--wave-height); border-radius: 99px; background: #93c5fd; transform: scaleY(0.42); }
.assignment-audio-recording-status.is-recording ~ .assignment-audio-capture-main .assignment-audio-capture-icon { background: #fff1f2; color: #b42318; }
.assignment-audio-recording-status.is-recording ~ .assignment-audio-live-waveform span { animation: assignment-live-wave 650ms ease-in-out infinite alternate; }
.assignment-audio-live-waveform span:nth-child(3n) { animation-delay: 110ms !important; }
.assignment-audio-live-waveform span:nth-child(4n) { animation-delay: 230ms !important; }
@keyframes assignment-live-wave { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }

.app-dark #page-assignment-submit .assignment-audio-capture-card { border-color: #24466b; background: #001a38; }
.app-dark #page-assignment-submit .assignment-audio-capture-status { color: #a8b6c8; }
.app-dark #page-assignment-submit .assignment-audio-capture-status.is-recording { color: #fda4af; }
.app-dark #page-assignment-submit .assignment-audio-capture-icon { background: #0b3158; color: #bfdbfe; }
.app-dark #page-assignment-submit .assignment-audio-recording-status.is-recording ~ .assignment-audio-capture-main .assignment-audio-capture-icon { background: #40232f; color: #fda4af; }
.app-dark #page-assignment-submit .assignment-audio-capture-copy strong { color: #f1f5f9; }
.app-dark #page-assignment-submit .assignment-audio-capture-copy > span { color: #a8b6c8; }
.app-dark #page-assignment-submit .assignment-audio-live-waveform { background: #002147; }
.app-dark #page-assignment-submit .assignment-audio-live-waveform span { background: #4777a8; }
.app-dark #page-assignment-submit .assignment-audio-recording-status.is-recording ~ .assignment-audio-live-waveform span { background: #f28b98; }
.app-dark #page-assignment-submit .assignment-audio-finish-button { border-color: #773540; background: #321e29; color: #fda4af; }
.app-dark #page-assignment-submit .assignment-audio-finish-button:hover { border-color: #a94e5a; background: #40232f; }

@media (max-width: 600px) {
  .assignment-editor { flex-basis: 12rem; }
  .assignment-attachment-header { flex-wrap: wrap; align-items: flex-start; }
  .assignment-attachment-feedback { margin-left: auto; }
  .assignment-attachment-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 7rem), 1fr)); }
  .assignment-audio-capture-card { padding: 0.85rem; }
  .assignment-audio-capture-main { flex-wrap: wrap; }
  .assignment-audio-capture-copy { flex-basis: calc(100% - 3.5rem); }
  .assignment-audio-capture-actions { width: 100%; padding-left: 3.45rem; }
  .assignment-audio-capture-actions > button { width: 100%; }
}