.task-panel {
  padding: clamp(20px, 4vw, 38px);
}

.task-panel h2 {
  font-size: clamp(1.55rem, 4vw, 2.45rem);
}

.task-instruction {
  margin-bottom: 20px;
  font-size: clamp(1.08rem, 2.4vw, 1.3rem);
  font-weight: 800;
}

.task-visual {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  min-height: 90px;
  margin: 18px 0;
  padding: 18px;
  border-radius: 20px;
  background: #e7f0d3;
}

.task-picture {
  margin: 14px auto 18px;
  overflow: hidden;
  border: 4px solid white;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.task-picture img {
  display: block;
  width: 100%;
  max-height: min(34dvh, 330px);
  object-fit: contain;
}

.task-picture + .task-visual {
  min-height: 0;
  padding-block: 10px;
}

.task-item-group {
  display: grid;
  gap: 8px;
  min-width: min(240px, 100%);
  padding: 10px 14px;
  border: 2px solid rgb(39 95 76 / 25%);
  border-radius: 16px;
  background: rgb(255 255 255 / 68%);
  text-align: center;
}

.task-item-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.count-item {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 3px solid #6f482f;
  border-radius: 48%;
  color: #6f482f;
  background: #d9a96f;
  font-weight: 1000;
}

.task-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.task-option {
  min-height: 76px;
  border: 3px solid var(--moss);
  border-radius: 20px;
  color: var(--ink);
  background: white;
  font-size: 1.55rem;
  font-weight: 1000;
}

.task-option.has-copy {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 7px;
  align-items: center;
  padding: 12px;
  font-size: 1rem;
  line-height: 1.25;
}

.task-option-symbol {
  font-size: clamp(1.45rem, 3.5vw, 2.2rem);
  letter-spacing: 0.08em;
  line-height: 1.15;
}

.task-options-sequence {
  grid-template-columns: 1fr;
}

.task-options-sequence .task-option {
  min-height: 68px;
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1.3fr);
  grid-template-rows: 1fr;
  text-align: left;
}

.task-option:hover {
  background: #eef6df;
}

.task-option.is-correct {
  color: white;
  background: var(--moss);
}

.task-feedback {
  min-height: 56px;
  padding: 12px 15px;
  border-radius: 15px;
  background: #f3ead0;
  font-weight: 800;
  line-height: 1.45;
}

.task-feedback.is-success {
  color: #16412f;
  background: #d7edc3;
}

@media (max-width: 480px) {
  .task-options {
    grid-template-columns: 1fr;
  }
}

@media (orientation: landscape) and (max-height: 780px) {
  .app-dialog:has(.task-options-sequence) {
    width: min(94vw, 980px);
  }

  .task-panel {
    padding: 20px 28px;
  }

  .task-panel h2,
  .task-instruction {
    margin-bottom: 8px;
  }

  .task-visual {
    min-height: 68px;
    margin: 10px 0;
    padding: 10px;
  }

  .count-item {
    width: 46px;
    height: 46px;
  }

  .task-picture img {
    max-height: 27dvh;
  }

  .task-options {
    margin: 10px 0;
  }

  .task-option {
    min-height: 62px;
  }

  .task-options-sequence {
    gap: 8px;
  }

  .task-options-sequence .task-option {
    min-height: 54px;
    grid-template-columns: minmax(280px, 0.85fr) minmax(300px, 1.15fr);
    padding: 7px 12px;
  }

  .task-options-sequence .task-option-symbol {
    white-space: nowrap;
    font-size: 1.5rem;
    letter-spacing: 0;
  }

  .task-panel .task-feedback {
    min-height: 44px;
    padding: 9px 13px;
  }

  .task-panel .dialog-actions {
    margin-top: 10px;
  }
}
