/* JWT 실습실: 잉크 머리 + 밝은 작업대(도구 칸 · 과제 칸). 색은 변수만. */
.lab-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-top: 32px;
  padding-bottom: 36px;
}

.lab-head-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
}

.lab-head h1 {
  margin: 0;
  font-size: var(--size-lab-title);
  letter-spacing: var(--tracking-title);
  color: var(--white);
}

.lab-head p {
  margin: 0;
  font-size: 17px;
  color: var(--stage-text-sub);
}

.lab-progress {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 18px;
  border: 1px solid var(--stage-line);
  border-radius: var(--radius-inner);
}

.lab-progress-count {
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
}

.lab-progress-count .dim {
  color: var(--map-route);
}

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

.jwt-lab {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  padding-top: 28px;
  padding-bottom: 64px;
}

.jwt-tool {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.lock {
  fill: none;
  stroke: var(--purple-text);
  stroke-width: 1.6;
}

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

.field-label {
  font-size: var(--size-sub);
  font-weight: 500;
}

.field-hint {
  font-weight: 400;
  color: var(--text-muted);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--touch);
  font-size: var(--size-sub);
  color: var(--text-muted);
}

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

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

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

#jwt-secret {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--touch);
  padding: 0 12px;
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--size-sub);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-input);
  border-radius: var(--radius-input);
}

#jwt-secret:focus {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}

#jwt-input,
.field input[type="text"],
.field select,
.examples select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-input);
  border-radius: var(--radius-input);
}

#jwt-input {
  width: 100%;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: var(--size-tag);
  line-height: 1.55;
  resize: vertical;
  word-break: break-all;
}

#jwt-input:focus,
.field input:focus,
.field select:focus {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.examples select {
  min-height: var(--touch);
  padding: 0 12px;
  font-size: var(--size-sub);
}

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

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

.jwt-error {
  margin: 0;
  color: var(--fail-text);
  font-weight: 600;
}

.jwt-result {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 상태 표시줄: 꼬리표 + 배지 + 설명 한 줄 */
.jwt-status {
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: var(--surface);
}

.status-row {
  display: grid;
  grid-template-columns: 52px auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.status-row + .status-row {
  border-top: 1px solid var(--line-soft);
}

.status-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--label);
}

.status-row .badge {
  justify-self: start;
}

.status-row p {
  margin: 0;
  font-size: 15px;
}

@media (max-width: 600px) {
  .status-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .status-row p {
    grid-column: 1 / -1;
  }
}

.jwt-parts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 14px;
}

.jwt-part {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jwt-part h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.jwt-part-header h3 {
  color: var(--purple-text);
}

.jwt-part pre {
  margin: 0;
  padding: 12px;
  border-radius: var(--radius-input);
  font-size: var(--size-tag);
  line-height: 1.6;
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--line);
}

.jwt-part-header pre {
  background: var(--purple-pane);
  border-color: var(--purple-pane-line);
}

/* 항목 풀이: 줄마다 선 */
.claims {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--size-sub);
}

.claims li {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 2px 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.claims code {
  grid-row: span 2;
  font-weight: 600;
  color: var(--purple-text);
}

.claim-meaning {
  color: var(--text);
}

.claim-value {
  font-family: var(--font-mono);
  font-size: var(--size-tag);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* F12: 키 고르기 · 공개 키 칸 · 토큰 만들기 */
.key-mode {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.key-mode legend {
  padding: 0;
  margin-bottom: 6px;
}

.key-text,
.key-line {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--size-tag);
  line-height: 1.55;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-input);
  border-radius: var(--radius-input);
  word-break: break-all;
}

.key-text {
  resize: vertical;
}

.key-line {
  min-height: var(--touch);
}

.key-text:focus,
.key-line:focus {
  outline: 2px solid var(--purple);
  outline-offset: 1px;
}

.maker {
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

.maker summary {
  cursor: pointer;
  font-weight: 700;
  min-height: var(--touch);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.maker summary .field-hint {
  font-size: var(--size-sub);
}

.maker-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 10px;
}
