/* 과제 칸: 모든 실습실이 함께 쓴다. 색은 변수만. */
.jwt-tasks,
[data-tasks] {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 과제 목록: 통과 = 초록 점 원, 지금 = 옅은 보라 줄, 남은 것 = 빈 원 */
.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-list li {
  border-radius: var(--radius-input);
  font-size: 15px;
  color: var(--text-muted);
}

/* 줄 전체가 단추다. 누르면 그 과제 하나만 아래에 펼친다. */
.task-pick {
  width: 100%;
  min-height: var(--touch);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-input);
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.task-pick:hover {
  background: var(--neutral-soft);
}

.task-list li[data-current="true"] .task-pick:hover {
  background: transparent;
}

.task-pick:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.task-list li[data-current="true"] {
  background: var(--purple-soft);
  color: var(--text);
  font-weight: 700;
}

.task-mark {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--neutral-dot);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.task-list li[data-current="true"] .task-mark {
  border-color: var(--purple);
  background: var(--purple);
  color: var(--white);
}

.task-list li[data-passed="true"] .task-mark {
  border-color: var(--ok-dot);
  background: var(--ok-dot);
  color: var(--white);
}

.task-list-meta {
  margin-left: auto;
  font-size: var(--size-tag);
  font-weight: 400;
  color: var(--text-muted);
}

.task-list li[data-passed="true"] .task-list-meta {
  color: var(--ok-text);
}

.tasks-note {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--size-tag);
}

.task[hidden] {
  display: none;
}

.task {
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task h3 {
  margin: 0;
  font-size: 17px;
}

.task-story,
.task-prompt {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.task-story {
  color: var(--text-muted);
}

.task-prompt {
  white-space: pre-line;
}

.task-problem {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.problem-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.problem-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.problem-time {
  font-size: var(--size-tag);
  color: var(--text-muted);
}

.problem-box textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-all;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  resize: vertical;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-row .btn {
  font-size: var(--size-sub);
}

.copy-note:empty {
  display: none;
}

.copy-note,
.input-format,
.submit-note {
  font-size: var(--size-tag);
  color: var(--text-muted);
}

.task-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-form input[type="text"],
.task-form select {
  width: 100%;
  min-height: var(--touch);
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 15px;
}

.task-form textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  word-break: break-all;
  resize: vertical;
}

/* 연습 서버: 보내 보기 단추와 응답(배지 + Mono JSON) */
.practice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.server-reply {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: var(--surface);
}

.server-reply[hidden] {
  display: none;
}

.server-reply-label {
  font-size: var(--size-tag);
  color: var(--label);
}

.server-reply-body {
  width: 100%;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text);
}

.task-hints {
  font-size: var(--size-sub);
  color: var(--text-muted);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-input);
  padding: 10px 12px;
}

.task-hints summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
}

.task-hints ul {
  margin: 8px 0 0;
  padding-left: 1.1rem;
  line-height: 1.6;
}

.task-form .submit {
  width: 100%;
}

.submit-note {
  text-align: center;
}

/* 실패와 연결 오류: 칸을 칠하지 않고 점과 글자로만 */
.task-error,
.task-fail {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: var(--surface);
  color: var(--fail-text);
  font-size: var(--size-sub);
  font-weight: 600;
}

.task-error::before,
.task-fail::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fail-dot);
  transform: translateY(-2px);
}

/* 통과 알림: 잉크 카드, 확인 번호는 Mono 34px 밝은 보라 */
.task-pass {
  background: var(--ink);
  color: var(--stage-text);
  border-radius: var(--radius-card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pass-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--size-card-title);
  font-weight: 700;
  color: var(--white);
}

.pass-check-bg { fill: var(--ok-dot); }
.pass-check { fill: none; stroke: var(--white); stroke-width: 2.4; }

.pass-line {
  margin: 0;
  font-size: var(--size-sub);
  color: var(--stage-text-sub);
}

.pass-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--stage-line);
  padding-top: 12px;
}

.pass-code-label {
  font-size: var(--size-tag);
  color: var(--stage-text-sub);
}

.pass-code {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--purple-light);
}

.pass-basis {
  margin: 0;
  font-size: var(--size-tag);
  color: var(--stage-text-dim);
}

/* 고르는 칸: 라디오 단추 둘 */
.choice {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice legend {
  padding: 0 0 6px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-option {
  flex: 1 1 140px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--touch);
  padding: 0 14px;
  border: 1px solid var(--line-input);
  border-radius: var(--radius-input);
  background: var(--surface);
  font-size: 15px;
  cursor: pointer;
}

.choice-option:has(input:checked) {
  border: 1.5px solid var(--purple);
  background: var(--purple-pane);
}

.choice-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
}

.task .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 내 반에 나온 과제의 꼬리표(F19): 「<반 이름> · 마감 <날짜>」 */
.task-class-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0;
  font-size: var(--size-sub);
  color: var(--text-muted);
}

/* 지난 통과 줄(F28): 새 문제를 받거나 새로 고쳐도 확인 번호가 남는다 */
.task-last {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  color: var(--text);
  font-size: var(--size-sub);
  overflow-wrap: anywhere;
}

.task-last[hidden] {
  display: none;
}
