/* Общие стили заданий — мобильный и десктоп */

.fp-task-code {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  overflow-x: auto;
  margin-bottom: 1rem;
  white-space: pre-wrap;
}

.fp-task-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fp-task-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 2px solid #e2e8f0;
  background: #fff;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.fp-task-option:hover {
  border-color: #5eead4;
}

.fp-task-option--active {
  border-color: #0d9488;
  background: #f0fdfa;
}

.fp-task-line {
  display: flex;
  gap: 0.65rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  border: 2px solid #e2e8f0;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.fp-task-line:hover {
  border-color: #5eead4;
}

.fp-task-line--active {
  border-color: #0d9488;
  background: #f0fdfa;
}

.fp-task-line__num {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fp-task-line__code {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  color: #334155;
  word-break: break-word;
}

.fp-task-cloze {
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
}

.fp-task-cloze--code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.25rem;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  background: #1e293b;
  color: #e2e8f0;
}

.fp-task-cloze__bit {
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.fp-task-cloze__select {
  margin: 0.1rem 0.15rem;
  min-height: 2.5rem;
  min-width: 4.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  border: 2px solid #5eead4;
  font-size: 0.9rem;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  background: #fff;
  color: #0f766e;
  max-width: 100%;
}

.fp-task-cloze select {
  margin: 0 0.25rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  border: 2px solid #e2e8f0;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  max-width: 100%;
}

.fp-task-classify__cats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 480px) {
  .fp-task-classify__cats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.fp-task-classify__cat {
  min-height: 3.5rem;
  padding: 0.65rem;
  border-radius: 0.75rem;
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #0f766e;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.fp-task-classify__cat--active {
  border-color: #0d9488;
  border-style: solid;
  background: #ccfbf1;
}

.fp-task-classify__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fp-task-classify__item {
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  border-radius: 9999px;
  border: 2px solid #e2e8f0;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.fp-task-classify__item--done {
  opacity: 0.45;
  pointer-events: none;
}

.fp-task-order-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fp-task-order-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 2px solid #e2e8f0;
  background: #fff;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.fp-task-order-item:active {
  cursor: grabbing;
}

.fp-task-order-item.sortable-ghost {
  opacity: 0.45;
  background: #f0fdfa;
  border-color: #5eead4;
}

.fp-task-order-item .drag-handle {
  color: #94a3b8;
  font-weight: 800;
  user-select: none;
  pointer-events: none;
}

.fp-task-sort-item {
  touch-action: none;
}

.fp-task-sort-item:active {
  cursor: grabbing;
}

.fp-task-sort-item.sortable-ghost {
  opacity: 0.45;
  background: #f0fdfa;
  border-color: #5eead4;
}

.fp-task-sort-item .drag-handle {
  pointer-events: none;
}

.fp-task-pattern {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f766e;
}

.fp-task-pattern__chip {
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  background: #f0fdfa;
  border: 2px solid #99f6e4;
}

.fp-task-hint-bar {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

/* Консоль Pyodide (BOSS / WRITE / COMPLETE) */
.fp-task-console {
  background: #111827;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}

.fp-task-console__label {
  margin: 0 0 0.35rem;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.75rem;
  color: #6b7280;
}

.fp-task-console__out {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4ade80;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
