.task-instruction-fields {
  display: grid;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f8;
}

.task-instruction-fields label {
  min-width: 0;
}

.task-instruction-fields textarea {
  resize: vertical;
}

.btn-feedback-request {
  min-width: 250px;
  min-height: 64px;
  padding: 8px 16px;
  background: #fff3f1;
  border-color: #efb9b2;
  color: #a83f37;
  overflow: hidden;
}

.btn-feedback-request:hover {
  background: #ffe9e6;
}

.btn-feedback-request.whip-playing {
  display: inline-grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 4px 12px 4px 5px;
  opacity: 1;
  cursor: wait;
}

.feedback-whip-media {
  width: 96px;
  height: 54px;
  overflow: hidden;
  border-radius: 4px;
  pointer-events: none;
}

.feedback-whip-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 79%;
  transform: scale(1.9);
  transform-origin: 50% 79%;
  mix-blend-mode: multiply;
}

.feedback-whip-label {
  min-width: 0;
  line-height: 1.2;
  text-align: left;
}

.btn-feedback-request.whip-playing:disabled {
  opacity: 1;
}

.worker-task-card {
  display: block;
  padding: 0;
  overflow: hidden;
}

.worker-task-summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 16px;
}

.worker-task-summary .my-task-copy,
.worker-task-summary .task-card-flags {
  min-width: 0;
}

.worker-task-summary .my-task-copy h3,
.worker-task-summary .my-task-copy p {
  overflow-wrap: anywhere;
}

.worker-task-summary .task-card-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.quantity-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef1f0;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.worker-task-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f6f8f7;
}

.worker-task-tabs button {
  min-width: 0;
  min-height: 46px;
  padding: 8px 6px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #6f7e86;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.worker-task-tabs button:last-child {
  border-right: 0;
}

.worker-task-tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 -3px var(--accent);
}

.worker-task-panel {
  padding: 14px 16px 16px;
}

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

.worker-task-actions > .task-quantity-control,
.worker-task-actions > .btn-task-timer,
.worker-task-actions > .btn-task-history {
  grid-column: 1 / -1;
}

.worker-task-actions .btn {
  min-width: 0;
  white-space: normal;
}

.task-quantity-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px auto 39px;
  gap: 8px;
  align-items: center;
}

.task-quantity-control label {
  font-size: 11px;
  font-weight: 800;
}

.task-quantity-control input {
  min-width: 0;
}

.worker-task-description {
  display: grid;
  gap: 11px;
}

.worker-task-description section,
.worker-task-safety {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}

.worker-task-description small,
.worker-task-safety small {
  display: block;
  margin-bottom: 6px;
  color: #70818a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.worker-task-description p,
.worker-task-safety p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.worker-task-safety {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  background: #fff8e7;
  border-color: #ead9aa;
}

.worker-task-safety > svg {
  width: 23px;
  color: #a36b16;
}

.feedback-request-banner {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid #efaaa4;
  border-radius: 6px;
  background: #fff2f1;
  color: #8f312b;
}

.feedback-request-banner > span svg {
  width: 22px;
}

.feedback-request-banner strong {
  display: block;
  font-size: 12px;
}

.feedback-request-banner p {
  margin: 4px 0 0;
  color: #8f312b;
  font-size: 11px;
  line-height: 1.45;
}

.feedback-request-banner .btn {
  grid-column: 1 / -1;
}

.btn-feedback-response {
  background: #d64e47;
  border-color: #d64e47;
  color: #fff;
}

.task-feedback-requested {
  border: 2px solid #d64e47;
  box-shadow: 0 0 0 3px rgba(214, 78, 71, .12);
}

.task-feedback-requested:hover {
  border-color: #bd3933;
}

.feedback-choice-content {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.feedback-choice-content > strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.feedback-choice-content > p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
}

.feedback-choice-actions {
  display: grid;
  gap: 9px;
}

.feedback-choice {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 64px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.feedback-choice > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 6px;
}

.feedback-choice > span svg {
  width: 20px;
}

.feedback-choice strong {
  display: grid;
  gap: 3px;
  font-size: 13px;
}

.feedback-choice small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.feedback-choice.completed > span {
  background: #e7f4ec;
  color: #287a52;
}

.feedback-choice.waiting > span {
  background: #fff3d8;
  color: #966313;
}

.feedback-choice.working > span {
  background: #e9f1fb;
  color: #386c9a;
}

.feedback-choice:hover {
  border-color: #aeb9ba;
  background: #f8faf9;
}

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

.modal-layer {
  pointer-events: none;
  overscroll-behavior: contain;
}

.modal-layer.modal-active {
  pointer-events: auto;
}

.modal-layer > .modal {
  pointer-events: auto;
  touch-action: pan-y;
}

.task-card-feedback-results {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #edf0ef;
}

.task-card-feedback-results > span {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 1px 6px;
  align-items: center;
  padding: 6px 7px;
  border-radius: 4px;
  font-size: 8px;
}

.task-card-feedback-results svg {
  grid-row: 1 / 3;
  width: 14px;
}

.task-card-feedback-results b,
.task-card-feedback-results em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-card-feedback-results b {
  font-size: 8px;
}

.task-card-feedback-results em {
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.task-card-feedback-results .completed {
  background: #e9f4ed;
  color: #287a52;
}

.task-card-feedback-results .waiting {
  background: #fff4de;
  color: #92600f;
}

.task-card-feedback-results .working {
  background: #eaf2fb;
  color: #376b98;
}

@media (max-width: 760px) {
  .worker-task-summary {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 13px;
  }

  .worker-task-summary .task-status-icon {
    width: 38px;
    height: 38px;
  }

  .worker-task-summary .task-card-flags {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .worker-task-tabs button {
    min-height: 48px;
    padding-inline: 4px;
    font-size: 9px;
  }

  .worker-task-panel {
    padding: 12px;
  }

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

  .worker-task-actions > * {
    grid-column: 1;
  }

  .task-quantity-control {
    grid-template-columns: minmax(0, 1fr) 78px auto 39px;
  }

  .feedback-choice-content {
    padding: 16px;
  }
}
