.sprint-app {
  max-width: 820px;
  overflow-x: hidden;
}

html.modal-open,
body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

body.modal-open #activeSession .finish-actions {
  display: none;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sprint-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.sprint-hero h2 {
  margin-top: 4px;
  font-size: 24px;
}

.days-box {
  display: grid;
  place-items: center;
  min-width: 86px;
  min-height: 86px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
}

.days-box strong {
  font-size: 34px;
  line-height: 1;
}

.days-box span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.compact-panel {
  padding: 12px;
}

.panel-help {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.next-action-panel {
  border-color: var(--accent);
}

.next-action-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.next-action-card strong {
  display: block;
  margin: 3px 0 5px;
  font-size: 17px;
  line-height: 1.2;
}

.next-action-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.next-action-card button {
  min-width: 132px;
  padding: 0 12px;
}

.stakes-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stake-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.stake-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stake-item strong {
  font-size: 20px;
  line-height: 1;
}

.stake-item small,
.timeline-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.timeline-list {
  display: grid;
  gap: 8px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.timeline-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline-item > strong {
  font-size: 13px;
  line-height: 1.25;
}

.timeline-item div {
  display: grid;
  gap: 3px;
}

.timeline-item span {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.timeline-item.past {
  opacity: 0.62;
}

.priority-item p {
  margin-bottom: 8px;
}

.action-first-item {
  display: grid;
  gap: 10px;
}

.priority-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.priority-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.priority-main button {
  min-width: 150px;
  min-height: 44px;
  padding: 0 12px;
}

.guide-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
}

.guide-details summary {
  min-height: 38px;
  padding: 9px 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.guide-details .action-guide {
  margin: 0 10px 10px;
}

.action-guide {
  display: grid;
  gap: 9px;
  margin: 10px 0;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

.guide-intro {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.grand-oral-panel {
  border-color: var(--accent);
}

.student-greeting {
  margin: 2px 0 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

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

.auth-tab {
  background: #ffffff;
  color: var(--ink);
}

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

.auth-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
  padding: 12px;
}

.auth-card h2 {
  margin: 0;
  font-size: 18px;
}

.signup-fields {
  display: grid;
  gap: 10px;
}

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

.signup-name-grid label {
  display: grid;
  gap: 6px;
}

.signup-name-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.grand-oral-questions {
  display: grid;
  gap: 12px;
}

.grand-oral-question-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
  padding: 10px;
}

.grand-oral-question-card h3 {
  margin: 0;
  font-size: 15px;
}

.grand-oral-plan {
  display: grid;
  gap: 10px;
}

.grand-oral-plan label {
  display: grid;
  gap: 6px;
}

.grand-oral-plan span,
.oral-timer span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.grand-oral-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.grand-oral-draft {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
  padding: 10px;
}

.grand-oral-draft label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.oral-recording-actions {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.oral-trainer {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
  padding: 10px;
}

.oral-timer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.oral-timer strong {
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 7px 10px;
  font-variant-numeric: tabular-nums;
  font-size: 24px;
  line-height: 1;
}

.oral-trainer audio {
  width: 100%;
}

.recording-toggle {
  border-color: #b94b45;
  color: #7d211d;
  font-weight: 900;
}

.recording-toggle.is-recording {
  background: #c63a32;
  border-color: #c63a32;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(198, 58, 50, 0.16);
}

.oral-recording-live {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid #f0b7b2;
  border-radius: 8px;
  background: #fff4f2;
  color: #7d211d;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 850;
}

.oral-recording-live[hidden] {
  display: none;
}

.oral-recording-live span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #c63a32;
  animation: recordingPulse 1s ease-in-out infinite;
}

.oral-recording-live strong {
  font-variant-numeric: tabular-nums;
}

.oral-recording-live em {
  font-style: normal;
  overflow-wrap: anywhere;
}

.oral-feedback-result {
  display: grid;
  gap: 12px;
  white-space: normal;
}

.oral-feedback-result h3,
.oral-feedback-result h4 {
  margin: 0;
}

.oral-transcript,
.oral-coach-feedback {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.oral-transcript-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.oral-markdown {
  display: grid;
  gap: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.oral-markdown h4,
.oral-markdown p,
.oral-markdown ul,
.oral-markdown ol {
  margin: 0;
}

.oral-markdown ul,
.oral-markdown ol {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.oral-markdown li {
  overflow-wrap: anywhere;
}

@keyframes recordingPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 560px) {
  .auth-tabs,
  .priority-main,
  .signup-name-grid,
  .grand-oral-actions {
    grid-template-columns: 1fr;
  }

  .priority-main button {
    width: 100%;
  }
}

.guide-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.guide-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.guide-checks div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.guide-checks span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-checks p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.field-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.tag-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  min-height: 38px;
  width: auto;
  border-color: var(--line);
  background: #ffffff;
  padding: 0 10px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.tag-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

@media (max-width: 520px) {
  .next-action-card {
    grid-template-columns: 1fr;
  }

  .next-action-card button {
    width: 100%;
  }
}

.exercise-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.exercise-actions a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.exercise-actions button {
  min-height: 38px;
  padding: 0 12px;
}

.exercise-item > p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.selected-exercise-panel {
  border-color: var(--accent);
}

.selected-exercise {
  display: grid;
  gap: 12px;
}

.selected-subject {
  display: grid;
  gap: 10px;
}

.selected-subject > strong {
  font-size: 16px;
}

.subject-steps {
  display: grid;
  gap: 8px;
}

.subject-steps div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.subject-steps span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 900;
}

.subject-steps p {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.subject-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.subject-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  box-sizing: border-box;
  padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
}

.subject-modal[hidden] {
  display: none !important;
}

.subject-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(23 32 27 / 0.45);
}

.subject-modal-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 920px);
  height: auto;
  max-height: min(980px, calc(100dvh - 16px));
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgb(0 0 0 / 0.25);
}

.subject-modal-sheet.session-active {
  height: calc(100dvh - 16px);
  max-height: calc(100dvh - 16px);
}

.subject-modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.subject-modal-header h2 {
  margin-top: 3px;
  font-size: 18px;
}

.subject-modal-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #fbfcf9;
}

.subject-mission {
  border-bottom: 1px solid var(--line);
  background: #fbfcf9;
  padding: 10px 12px;
  overflow: visible;
}

.subject-modal-sheet.pdf-open .subject-mission {
  max-height: none;
}

.mission-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.mission-card.compact {
  background: #fbfcf9;
}

.subject-modal .mission-card {
  gap: 6px;
  padding: 8px;
}

.mission-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mission-card-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mission-card-header strong {
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 5px 8px;
  font-size: 13px;
  white-space: nowrap;
}

.mission-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.subject-modal .mission-card h3 {
  font-size: 16px;
}

.mission-warning,
.mission-proof,
.mission-scroll-hint {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.mission-proof {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.mission-scroll-hint {
  border: 1px solid #bfd4ca;
  border-radius: 8px;
  background: #eef8f3;
  color: var(--accent);
  padding: 8px;
  font-size: 13px;
  font-weight: 850;
}

.subject-modal .mission-warning {
  font-size: 13px;
  font-weight: 750;
}

.subject-modal .mission-proof {
  display: none;
}

.mission-statement {
  display: grid;
  gap: 5px;
}

.mission-statement span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.latex-rendered {
  max-height: 34dvh;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f5;
  padding: 9px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mission-card.compact .latex-rendered {
  max-height: 180px;
}

.subject-modal .mission-card.compact .latex-rendered {
  max-height: none;
  overflow: visible;
}

.subject-modal-sheet.pdf-open .mission-card.compact .latex-rendered {
  max-height: none;
  overflow: visible;
}

.latex-rendered p {
  margin: 0 0 10px;
}

.latex-rendered p:last-child {
  margin-bottom: 0;
}

.latex-rendered .latex-admin-note {
  border-left: 3px solid var(--accent);
  background: #eef8f3;
  color: var(--accent);
  padding: 8px;
  font-size: 13px;
  font-weight: 850;
}

.latex-rendered .latex-subject-heading {
  margin: 12px 0 4px;
  color: var(--accent);
  font-size: 15px;
  line-height: 1.25;
}

.latex-rendered ol,
.latex-rendered ul {
  display: grid;
  gap: 8px;
  margin: 8px 0 10px 20px;
  padding: 0;
}

.latex-rendered li > p {
  margin: 0 0 6px;
}

.latex-rendered .katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 8px 0;
  padding-bottom: 4px;
}

.latex-rendered .katex {
  font-size: 1.03em;
}

.latex-placeholder {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 9px;
  font-size: 13px;
  font-weight: 800;
}

.latex-smallcaps {
  font-variant: small-caps;
}

.subject-pdf-viewer {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow: visible;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
  background: #eef2ef;
  padding: 10px;
}

.subject-pdf-section {
  min-height: 180px;
  display: grid;
  grid-template-rows: auto auto;
  border-bottom: 1px solid var(--line);
}

.subject-pdf-section[hidden] {
  display: none !important;
}

.subject-pdf-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: #eef2ef;
  padding: 8px 10px;
}

.subject-pdf-title div {
  display: grid;
  gap: 2px;
}

.subject-pdf-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.subject-pdf-title strong {
  font-size: 13px;
}

.pdf-page {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: max-content;
  min-width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.pdf-page-label {
  justify-self: start;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pdf-page canvas {
  display: block;
  max-width: none;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.08);
  will-change: width, height;
}

.subject-loading {
  align-self: center;
  justify-self: center;
  max-width: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 12px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.subject-modal-footer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  background: #ffffff;
}

.subject-modal-sheet.session-active .subject-modal-footer {
  grid-template-columns: 1fr;
}

.subject-modal-timer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #eef8f3;
  color: var(--accent);
  padding: 8px 10px;
}

.subject-modal-timer[hidden],
.subject-modal-finish[hidden] {
  display: none !important;
}

.subject-modal-timer span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.subject-modal-timer strong {
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 6px 10px;
  font-variant-numeric: tabular-nums;
  font-size: 24px;
  line-height: 1;
}

.subject-modal-timer strong.is-over,
.timer-value.is-over {
  background: #fff2c9;
  color: #714c00;
}

.subject-modal-timer [data-timer-state].is-over,
.session-live-head [data-timer-state].is-over {
  color: #714c00;
}

.subject-modal-finish {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.subject-modal-finish button {
  min-height: 48px;
  padding: 0 8px;
  font-size: 15px;
}

.finish-form {
  grid-column: 1 / -1;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #fbfcf9;
  padding: 10px;
}

.finish-form form,
.finish-form label {
  display: grid;
  gap: 8px;
}

.finish-form form {
  gap: 10px;
}

.finish-form-head {
  display: grid;
  gap: 2px;
}

.finish-form-head span,
.finish-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.finish-form-head strong {
  font-size: 18px;
  line-height: 1.2;
}

.finish-form p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.finish-form textarea,
.finish-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
}

.finish-form textarea {
  resize: vertical;
}

.finish-photo-field {
  display: grid;
  gap: 7px;
}

.finish-photo-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.file-action {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-transform: none;
  cursor: pointer;
}

.file-action.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.file-action input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.finish-photo-hint {
  border-left: 3px solid var(--accent);
  padding-left: 9px;
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.4;
}

.finish-photo-hint strong {
  color: var(--ink);
}

.finish-photo-list {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.photo-page-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.photo-page-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.photo-page-row button {
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.finish-photo-list strong {
  color: var(--ink);
}

.finish-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.subject-modal-sheet.session-active .subject-modal-footer > p {
  display: none;
}

.subject-modal-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.sprint-panel {
  display: block;
}

.session-subject-suggestions {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}

.session-subject-heading {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.session-chapter-field {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
  padding: 10px;
}

.session-chapter-field span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.session-chapter-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.session-subject-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  cursor: pointer;
}

.session-subject-option:has(input:checked) {
  border-color: var(--accent);
  background: #fff9e8;
}

.session-subject-option input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.session-subject-option strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.session-subject-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.session-subject-free {
  background: #fbfcf9;
}

.session-subject-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.session-box {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
  padding: 12px;
}

.session-live-head {
  position: sticky;
  top: 8px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: -4px -4px 10px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.08);
}

.session-live-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.session-live-head strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.session-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.session-subject {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.session-subject p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.session-subject-note {
  border: 1px solid #bfd4ca;
  border-radius: 8px;
  background: #eef8f3;
  color: var(--accent);
  padding: 8px;
  font-weight: 850;
}

.session-subject .mission-card.compact {
  background: #ffffff;
}

.session-subject .mission-card.compact .latex-rendered {
  max-height: min(44dvh, 380px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.session-subject a {
  color: var(--accent);
  font-weight: 900;
}

.chat-panel {
  gap: 12px;
}

.chat-messages {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  margin-bottom: 12px;
  padding: 2px;
}

.chat-bubble {
  width: fit-content;
  max-width: min(100%, 620px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-bubble.assistant {
  background: #fbfcf9;
}

.chat-bubble.user {
  justify-self: end;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

#chatInput {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  max-height: 138px;
  margin: 0;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.35;
  resize: none;
  overflow-y: hidden;
  -webkit-text-size-adjust: 100%;
}

#sendChat {
  min-width: 86px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.timer-value {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: 34px;
  font-weight: 900;
  white-space: nowrap;
}

.finish-actions {
  grid-template-columns: 1fr;
}

.finish-attempt-button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  min-height: 62px;
  padding: 9px 10px;
  white-space: normal;
}

.finish-attempt-button span {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
}

.finish-attempt-button small {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0.85;
}

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

@media (max-width: 520px) {
  .sprint-hero {
    grid-template-columns: 1fr;
  }

  .days-box {
    grid-template-columns: auto auto;
    justify-content: center;
    min-height: 64px;
    width: 100%;
  }

  .days-box strong {
    font-size: 30px;
  }

  .exercise-actions {
    grid-template-columns: 1fr;
  }

  .subject-actions {
    grid-template-columns: 1fr;
  }

  .subject-modal {
    padding: 0;
  }

  .subject-modal-sheet {
    width: 100%;
    height: auto;
    max-height: 100dvh;
    border-radius: 0;
  }

  .subject-modal-sheet.session-active {
    height: 100dvh;
    max-height: 100dvh;
  }

  .subject-modal-header {
    padding: 10px;
  }

  .subject-modal-header h2 {
    font-size: 17px;
  }

  .subject-mission {
    padding: 8px;
  }

  .subject-modal-sheet.pdf-open .subject-mission {
    max-height: none;
  }

  .subject-modal .mission-card.compact .latex-rendered {
    font-size: 13px;
  }

  .subject-modal-sheet.pdf-open .mission-card.compact .latex-rendered {
    max-height: none;
  }

  .subject-modal-footer {
    grid-template-columns: 1fr;
  }

  .subject-modal-sheet.session-active .subject-modal-footer {
    grid-template-columns: 1fr;
  }

  .subject-modal-finish {
    grid-template-columns: 1fr;
  }

  .subject-modal-footer p {
    font-size: 12px;
  }

  .finish-actions,
  .relance-actions {
    grid-template-columns: 1fr;
  }

  .photo-add-actions {
    grid-template-columns: 1fr;
  }

  .subject-modal-finish {
    grid-template-columns: 1fr;
  }

  .guide-checks {
    grid-template-columns: 1fr;
  }

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

  .timeline-item {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .chat-composer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #sendChat {
    min-width: 76px;
  }
}
