@layer views {
  .copy-desk-heading > div > p:last-child {
    margin: 6px 0 0;
    color: var(--muted);
  }

  .copy-desk-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .copy-task-panel {
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
  }

  .copy-task-panel .modal-heading p:last-child {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
  }

  .copy-task-search input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    font: inherit;
  }

  .standalone-copy-task-form {
    display: grid;
    gap: 12px;
    padding: 15px;
    border: 1px solid #b9d5c7;
    border-radius: 8px;
    background: #f5faf7;
  }

  .standalone-copy-task-heading > div {
    display: grid;
    gap: 3px;
  }

  .standalone-copy-task-heading strong {
    color: var(--green-dark);
    font-size: 16px;
  }

  .standalone-copy-task-heading span {
    color: var(--muted);
    font-size: 12px;
  }

  .standalone-copy-task-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .standalone-copy-task-fields label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .standalone-copy-task-fields .wide {
    grid-column: 1 / -1;
  }

  .standalone-copy-task-fields input,
  .standalone-copy-task-fields select {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
  }

  .standalone-copy-task-form > button {
    justify-self: start;
  }

  .copy-task-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
  }

  .copy-task-divider::before,
  .copy-task-divider::after {
    height: 1px;
    flex: 1;
    background: var(--line);
    content: "";
  }

  .copy-task-kind {
    color: var(--green-dark);
  }

  .copy-desk-card.standalone {
    border-color: #b9d5c7;
  }

  .copy-task-state {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 12px;
  }

  .copy-task-options {
    display: grid;
    gap: 7px;
    max-height: 520px;
    overflow: auto;
  }

  .copy-task-option {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--ink);
    text-align: left;
  }

  .copy-task-option:hover,
  .copy-task-option:focus-visible {
    border-color: #82b49b;
    background: #f5faf7;
    outline: none;
  }

  .copy-task-option:disabled {
    opacity: 0.62;
  }

  .copy-task-option img {
    width: 54px;
    aspect-ratio: 1;
    border-radius: 5px;
    object-fit: cover;
  }

  .copy-task-option > span {
    display: grid;
    min-width: 0;
    gap: 4px;
  }

  .copy-task-option strong,
  .copy-task-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .copy-task-option small {
    color: var(--muted);
    font-size: 12px;
  }

  .copy-task-option em {
    font-style: normal;
    white-space: nowrap;
  }

  .copy-task-empty {
    margin: 24px 0;
    color: var(--muted);
    text-align: center;
  }

  .copy-desk-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 14px 0 20px;
    border-block: 1px solid var(--line);
  }

  .copy-desk-tabs {
    display: inline-flex;
    gap: 3px;
    margin: 14px 0 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f1f4f2;
  }

  .copy-desk-tabs button {
    min-height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #65716b;
    font-size: 13px;
    font-weight: 800;
  }

  .copy-desk-tabs button.active {
    background: #ffffff;
    color: var(--green-dark);
    box-shadow: 0 1px 4px rgba(37, 64, 51, 0.09);
  }

  .copy-desk-flow > div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 2px 10px;
    padding: 15px 18px;
    border-right: 1px solid var(--line);
  }

  .copy-desk-flow > div:last-child {
    border-right: 0;
  }

  .copy-desk-flow i {
    display: grid;
    grid-row: 1 / span 2;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: #e5f1eb;
    color: var(--green-dark);
    font-style: normal;
    font-weight: 850;
  }

  .copy-desk-flow strong,
  .copy-desk-flow span {
    display: block;
  }

  .copy-desk-flow span {
    color: var(--muted);
    font-size: 12px;
  }

  .copy-desk-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .copy-desk-card {
    position: relative;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
  }

  .copy-task-more {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
  }

  .copy-task-more summary {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    list-style: none;
  }

  .copy-task-more summary::-webkit-details-marker {
    display: none;
  }

  .copy-task-more summary:hover,
  .copy-task-more[open] summary {
    background: var(--soft);
    color: var(--green-dark);
  }

  .copy-task-more > div {
    position: absolute;
    top: 34px;
    right: 0;
    display: grid;
    min-width: 128px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .copy-task-more button {
    padding: 8px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    text-align: left;
    white-space: nowrap;
  }

  .copy-task-more button:hover {
    background: var(--soft);
  }

  .copy-task-more button.danger {
    color: #a23b32;
  }

  .copy-desk-card > img {
    width: 112px;
    aspect-ratio: 1;
    border-radius: 6px;
    object-fit: cover;
  }

  .copy-desk-card-body {
    min-width: 0;
  }

  .copy-desk-card h3 {
    margin: 4px 0 6px;
    font-size: 18px;
  }

  .copy-desk-card-body > p:not(.section-label) {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
  }

  .copy-desk-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
  }

  .copy-desk-status {
    padding: 3px 7px;
    border-radius: 5px;
    background: #eef1f0;
    color: var(--muted);
    font-weight: 800;
  }

  .copy-desk-status.images,
  .copy-desk-status.not-started {
    background: #fff1dc;
    color: #95630d;
  }

  .copy-desk-status.ready {
    background: #e2f2e9;
    color: var(--green-dark);
  }

  .copy-library-toolbar {
    margin: 12px 0 18px;
  }

  .copy-library-toolbar input {
    width: min(480px, 100%);
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    font: inherit;
  }

  @media (max-width: 980px) {
    .copy-desk-list {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  @media (max-width: 680px) {
    .copy-desk-flow {
      grid-template-columns: minmax(0, 1fr);
    }

    .copy-desk-flow > div {
      border-right: 0;
      border-bottom: 1px solid var(--line);
    }

    .copy-desk-flow > div:last-child {
      border-bottom: 0;
    }

    .copy-desk-card {
      grid-template-columns: 82px minmax(0, 1fr);
    }

    .copy-desk-card > img {
      width: 82px;
    }

    .copy-desk-card > button {
      grid-column: 1 / -1;
      width: 100%;
    }

    .copy-desk-heading-actions {
      align-items: stretch;
      flex-direction: column;
    }

    .copy-desk-heading-actions .settings-save-state {
      text-align: left;
    }

    .copy-task-option {
      grid-template-columns: 48px minmax(0, 1fr);
    }

    .copy-task-option img {
      width: 48px;
    }

    .copy-task-option em {
      grid-column: 2;
      justify-self: start;
    }

    .standalone-copy-task-fields {
      grid-template-columns: minmax(0, 1fr);
    }

    .standalone-copy-task-fields .wide {
      grid-column: auto;
    }

    .standalone-copy-task-form > button {
      width: 100%;
    }
  }
}
